What is the correct command to create a snapshot of my home partition on Ubuntu 12.04?

Given the fact that home is on a btrfs partition and it is mounted as /home, the correct command is:

sudo btrfs subvolume snapshot /home/ /home/<any_name_you_choose_for_the_snapshot>

Here are my results:

Before running the command today:

$ btrfs subvolume list /home
ID 256 top level 5 path @home
ID 257 top level 5 path @home/@snapshot_20120521_1936

The command:

$ sudo btrfs subvolume snapshot /home/ /home/@snapshot_20120611_1307
Create a snapshot of '/home/' in '/home/@snapshot_20120611_1307'

After running the command today:

$ btrfs subvolume list /home
ID 256 top level 5 path @home
ID 257 top level 5 path @home/@snapshot_20120521_1936
ID 258 top level 5 path @home/@snapshot_20120611_1307

The only issue with this method is that snapshots show up when you ls (list) /home.

The Ubuntu community Wiki has been updated with a solution for this. Here it is:

How to work with snaphots in Ubuntu's layout

In order to work with snapshots of / or /home in the Ubuntu layout it is very convenient to mount the btrfs filesystem at a separate location, and work from the top of the btrfs tree, rather than from the mounted subvolumes. <-- that is the solution. Unfortunately, it is not convenient.

sudo mount /dev/sdX# /mnt

To create a snapshot use the same syntax I used above:

sudo btrfs subvolume snapshot /mnt/@ /mnt/@_snapshot

This will create a snapshot of the @ subvolume named @_snapshot located also in the top of the btrfs tree. Since it is in the top of the tree, it will not show up when listing files in a mounted volume.

To roll back to a snapshot, you simply need to change its name to the name that ubuntu mounts and reboot. Here's how to change the name:

sudo mv /mnt/@ /mnt/@_badroot
sudo mv /mnt/@_snapshot /mnt/@

To delete a snapshot use:

sudo btrfs subvolume delete /mnt/@_badroot

btrfs snapshots are subvolumes in themselves, and self-contained, deleting the old @ subvolume like this is fine, provided we have a replacement.

NOTE: The btrfs-tools command set-default will break Ubuntu's layout.


Try to set the configuration with the menu and not the hot-key.

Open System Settings

You can either open it with the cogwheel symbol in the upper right corner -> System Settings...

Or you just open the menu and type "System Settings".

Open the Displays configuration

In the "System Settings" menu, there is a monitor icon that reads Displays, open that menu.

Change display settings

Your projector is like a second display. You should see a "buit-in display" for your notebook and a second display for your projector.
Click on it and switch it to "On".
You can then change settings if you want to have the two screens running, then it they will behave as if it was one big screen. That means you have to move the presentation window to the projector display. Or you can just mirror them and they will show the same stuff. You can also turn your internal display to "off" and just use the projector.

There is also some official documentation, but it doesn't say more than I just did.


How to redirect the output of `apt-file update` into a file?

apt-file is a perl script.
It uses diffindex-download. That is another perl script.
That one writes to /dev/tty and not to stdout (the difference is explained on this SO answer)
Soooo... this will log the output to logfile.log

script -c "apt-file update" logfile.log


Put HDDs in standby after X minutes using hdparm doesn't work

Is AHCI enabled in your BIOS? If not try turning it on and re-trying.

If that still doesn't work, then you may have to try something a bit more complicated, as hdparm doesn't always play nicely with SATA drives, which is what I presume you have.

Check out this page for the following relatively simple solution that uses crontab:

sudo apt-get install sg3-utils
crontab -e

Now, add this to the bottom of your crontab (replace sdx with the drive you wish to put in standby):

0-59/15 * * * * ( if [ ! -f /dev/shm/1 ] ; then touch /dev/shm/1 /dev/shm/2; fi ; mv /dev/shm/1 /dev/shm/2; cat /proc/diskstats > /dev/shm/1 ) >/dev/null 2>&1
0-59/15 * * * * ( export HD="sdx "; if [ "$(diff /dev/shm/1 /dev/shm/2 | grep $HD )" =  "" ] ; then /usr/bin/sg_start --stop /dev/$HD; fi ) >/dev/null 2>&1

Of course, before attempting any of this, it's highly advisable to perform a full backup of the contents of your hard drives.


Upgrade Kubuntu 20.04 to latest release (21.04), instead of next release (20.10)

There is no tested, supported upgrade path from 20.04 to 21.04.
You have three options:

Release-upgrade from 20.04 and 20.10, then again from 20.10 to 21.04.

Back up your data and clean-install 21.04.

Use the Debian dist-upgrade method. We do not test that method, nor provide support if you break your system using it, so I'm not going to explain it.

Mark your calendar: 21.04 will live for only 9 months. You are committing to upgrades every 6 months when you migrate to a non-LTS release. Do not miss the upgrade window.


How to View the Entire Contents of a dat File

Since you know its binary, I assume you understand HEX.
If so, you can "dump" the file with "od -xc filename".

If you are familiar with the "vi" editor, then you could use
a "binary vi editor", called "bvi".


How to extend partition with unallocated space?

In GParted, right click on the partition you would like to extend (/dev/sdb5 in this case) and select the option "Resize/Move". Then, set the ticker box labeled "Free space following (MiB)" to 0.


How to add a member to my group with a permission to change my files?

Just use sudo whenever you want to change files?

That way, you're normally a Standard user, but can be an Administrator.

Use sudo -i for graphical programs.


You need to install a driver from your additional drivers section
like nvidia-340 + install nvidia-prime + enable performance mode
in nvidia-settings


Change the port not in the file:

/etc/ssh/ssh_config but in
/etc/ssh/sshd_config  (file with d letter, meaning "daemon")

Just edit this change and change uncomment and update the line

#Port 22

Don't forget to restart your service as you done it with

service ssh restart


expect interferes with character encoding during ssh

expect is written, as you know, in the tcl language, and you can look here for information on how it handles internationalisation. Internally, tcl converts characters to utf-8, but assumes all input and output uses the system encoding, namely the locale of your terminal.

To override this for a particular data stream you can use fconfigure on the channel id to specify the encoding to use.  The spawn command exposes the created channel by setting the variable spawn_id. (Beware, there is a common mistake where you sometimes need to declare this variable as global, e.g. in a procedure).

For your simple example, you need to tell tcl the encoding of the ssh i/o stream and it should do the necessary conversions for you, without you needing to change the gnome terminal locale in any way.

#!/usr/bin/expect --
spawn ssh user@server
fconfigure $spawn_id -encoding iso8859-1
interact


Many Japanese users say that ibus-mozc has many bugs or uncomfortable features. So I think, until the bug-fix comes you can use other InputMethodEngine for a while.

sudo apt install fcitx-mozc

or

sudo apt install uim-mozc

After install open System preference > Language

Please change this into your choice iBus/fcitx/uim and restart computer or your session.

If you are keen to stick on iBus and you can build Mozc from the source code with a handy Mozc support package Mozc UT. I omit how you download and extend source files.

$ vim src/mozc/src/unix/ibus/property_handler.cc

...
// Some users expect that Mozc is turned off by default on IBus 1.5.0 and later.
// https://code.google.com/p/mozc/issues/detail?id=201
// On IBus 1.4.x, IBus expects that an IME should always be turned on and
// IME on/off keys are handled by IBus itself rather than each IME.
#if IBUS_CHECK_VERSION(1, 5, 0)
const bool kActivatedOnLaunch = true; //false;
#else
const bool kActivatedOnLaunch = true;
#endif  // IBus>=1.5.0
...

Then build and install this. This information is provided from A wise programmer's blog "karelie" and Glasse-age

If this is too much work for you, there's an alternative. You can switch Composition Mode by the hotkey.

First activate the Mozc then,  click on Mozc Icon on the menu bar.
Mozc Tool > Configuration Tools.

Like this.

The Mozc Settings Window should appear and click on the Customize button.

When you click on the Command column, you can select actions for a hotkey, choose set input mode to Hiragana. Then you can assign your favourite hotkey, this example is for the Hiragana key that most of US keyboard layout doesn't have it. You may need to restart your computer after this setting.

Note: I think the window and the menu bar look different on 18.04 but it's essentially the same, in my opinion and I hope this helps or gives you a hint.


How can I change what keys on my keyboard do? (How can I create custom keyboard commands/shortcuts?)

xbindkeys..
sudo apt-get install xbindkeys

Xbindkeys is a very versatile program that lets you remap keys very easily.  It uses a config file, my default located in your home directory, to change key bindings into certain commands.
To create a default config file you use the command:
xbindkeys --defaults

Which prints the default config file.  So if you want to create the file containing the default values you would use:
xbindkeys --defaults > $HOME/.xbindkeysrc

Which prints the default values into a hidden file named .xbindkeysrc located in home (~).
Now to actually change the bindings of keys we first need to know what the name or keysym of those keys is.  xbindkeys allows us to use the -k handle to find the name of a key or key combination.  Run:
xbindkeys -k

And press a key or key combination.  Your output will look something similar to this (when pressing space):
"NoCommand"
m:0x10 + c:65
Mod2 + space

"No Command" tells us that currently no command is associated with the Space key.
m:0x10 + c:65
Mod2 + space

Is the name of the key/key combination.
the config file..
Lets open up the config file you made earlier:
gedit .xbindkeysrc

Here is an excerpt from the default config file:
#
# A list of keys is in /usr/include/X11/keysym.h and in
# /usr/include/X11/keysymdef.h
# The XK_ is not needed.
#
# List of modifier:
#   Release, Control, Shift, Mod1 (Alt), Mod2 (NumLock),
#   Mod3 (CapsLock), Mod4, Mod5 (Scroll).
#

# The release modifier is not a standard X modifier, but you can
# use it if you want to catch release events instead of press events

# By defaults, xbindkeys does not pay attention with the modifiers
# NumLock, CapsLock and ScrollLock.
# Uncomment the lines above if you want to pay attention to them.

#keystate_numlock = enable
#keystate_capslock = enable
#keystate_scrolllock= enable

# Examples of commands:

"xbindkeys_show"
 control+shift + q

Every line beginning with # is a comment and won't be read or run by xbindkeys.
So far the only line that isn't commented out is:
"xbindkeys_show"
 control+shift + q

This excerpt shows the basic syntax of xbindkeys commands:
"Command to run (in quotes)"
key to associate with command (no quotes)

So as you can see:
"xbindkeys_show"
 control+shift + q

Runs the command xbindkeys_show when you press Ctrl+Shift+q.
bind keys to commands..
Now lets try binding a few keys.  I recommend clearing the entire default file so that it's blank.  It contains preset key bindings you probably don't want.
Now lets say you want to use Ctrl+b to open your browser.  First you need to know what the name or keysym of Ctrl+b is.  As mentioned earlier you can use xbindkeys -k to find the name of a key or keys, but there is an easier way.  For simple combinations like Ctrl+b you can just use:
Control+b

A lot easier isn't it!
Now find the command for your favorite browser:

For Firefox: firefox

For Chromium: chromium-browser

For Opera:  opera

Remember the syntax from earlier?  The xbindkeys command to launch Firefox (or your other favorite browser) when you press Ctrl+b is:
"firefox"
Control+b

Now put that in your config file and save it.  Now you might notice your command doesn't work yet, that's because xbindkeys isn't running.  To start it just run xbindkeys from a terminal.  Your Ctrl+b should now start your browser!
bind keys to other keys..
If you want a key on your keyboard to call a different key on your keyboard, you will need an extra piece of software as xbindkeys does not support this on it's own.  I know of two programs which we can use, xdotool and xte.  I prefer xte so I'm going to use that.
Install it:
sudo apt-get install xautomation

The syntax for xte is like this:
xte 'command key/mousebutton/xyCoordinates'

Examples:

To call a single key press:  xte 'key keyName'

To call a key combination:  xte 'keydown keyName' 'keydown secondKeyName' 'keyup keyName' 'keyup secondKeyName

To call a mouse button:  xte 'mouseclick buttonNumber'  (We'll discuss finding button numbers a little latter)

To move the mouse:  xte 'mousemove xCoordinate yCoordinate'

And more! Read man xte

Now that you know the command for simulating key presses you can call it from your xbindkeys script, like this:
"xte 'key b'"
Control+b

As you might guess, this calls xte 'key b' when we press Ctrl+b, which would enter a b into any document you might be currently working on.
I thing to note however is that xbindkeys and xte don't always work very well together.  Sometimes you have to press the keys exactly at the same time to get output, other times it works just fine.  This may or may not have to do with system configuration and/or hardware.. I'm not sure.  See maggotbrain's answer for a more reliable way of binding keys to other keys.
bind mouse buttons to commands..
You can also use xbindkeys to bind mouse buttons to commands (and thence keyboard shortcuts, see above). The basic format for mouse buttons should be familiar to you now:
" [command to run]  "
b:n

Where [command to run] is the command you want to run and n the number of the mouse button you want to use for that command.
If you don't know the number of your mouse button you can use xev to find out what it is:
xev | grep button

The output will be something like this:
user@host:~$ xev | grep button
    state 0x10, button 1, same_screen YES
    state 0x110, button 1, same_screen YES
    state 0x10, button 2, same_screen YES
    state 0x210, button 2, same_screen YES
    state 0x10, button 3, same_screen YES
    state 0x410, button 3, same_screen YES

When I press each of my mouse buttons.
For example:
" firefox "
b:2

Launches firefox when I press my middle mouse button.


Auto-login user to TTY on boot, and then auto-run command within GNU screen

Answers (to my own questions)

Is this the most effective way to achieve the desired outcome?
I am still unsure if the solutions below are the most effective, but I can confirm that it at least works on the stated version on Ubuntu.
How can the commands in step 2 & 3 be automated?
How can the commands in step 2 & 3 not activate when I log in manually in step 4?
Step one
I put the following at the bottom of the .profile file in the user directory of the user being automatically logged in during step 1 above (/home/ubuntu/.profile):

pgrep processname || /home/ubuntu/processscript.sh

When the user is automatically logged in, this command will execute automatically because it is in .profile. The first part of the command (before the "||" checks if 'processname' is already running. If not, it will execute the second part of the command (after the "||") i.e. "processscript.sh" ... If 'processname' is already running, it won't.
This check was necessary as the process I wanted to run could not have multiple instances running at the same time. In addition, it solves the problem of process running a second time when I log in manually later.

Step two
Create a shell script file called "processscript.sh" with the following contents:

#!/bin/bash
screen -d -m -S screenname &&
screen -S screenname -p 0 -X stuff "/home/ubuntu/command.sh^M"

Ensure "processscript.sh" is in the /home/ubuntu directory, and that it is executable with the command:

chmod 744 processscript.sh

The above shell script creates a screen instance with the name "screenname", and if completed successfully, it stuffs the commandline of that screen instance with the command "command.sh" with a carriage return (which is what the "^M" at the end does).
Step three
In the previous step, I encountered some problems when stuffing a command with attributes to the screen commandline (I think some character escaping was required). To resolve this simply, I added the full command with attributes to a shell script and used that instead. Therefore, create another shell script (as above) called "command.sh" and add the full command in there.


You didn't specify what distro you are working on, but supposingly its ubuntu you can follow the steps in this link How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 16.04 .. and change the version of the distro if you are working on a different version .. but if you are working on a non(debian/ubuntu) based distros just change the package manger in the command and it will be almost the same steps.

Step 1: Install Apache and Allow in Firewall

sudo apt-get update
sudo apt-get install apache2
sudo ufw allow in "Apache Full"

Step 2: Install MySQL

sudo apt-get install mysql-server

Step 3: Install PHP

sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql

then modify the way that Apache serves files when a directory is requested.
To do this, type this command to open the dir.conf file in a text editor with root privileges:

sudo nano /etc/apache2/mods-enabled/dir.conf

It will look like this:

<IfModule mod_dir.c>
    DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm
</IfModule>

We want to move the PHP index file highlighted above to the first position after the DirectoryIndex specification, like this:

<IfModule mod_dir.c>
    DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm
</IfModule>

After this, we need to restart the Apache web server in order for our changes to be recognized. You can do this by typing this:

sudo systemctl restart apache2


Can I specify particular LTS release in /etc/update-manager/release-upgrades?

Upgrading from 8.04 will only get you to 10.04, not to 12.04.
You don't have to install 12.04, nor should it be offered as upgrade, not before having upgraded to 10.04.


Disabling the anti-aliasing for a specific font with user's fonts.conf

[I know this question is 5 years old, but it still appears in search engines.]

I just made a .fonts.conf file in the Home directory. It worked right away in Ubuntu 18.04 LTS.

(Replace the font names accordingly!)

<!--
~/.fonts.conf

Remember to run "fc-cache" after you modify this file.
-->

<fontconfig>

  <match target="font">
    <test name="family" qual="any">
      <string>Ubuntu Mono</string>
      <string>Free Pixel</string>
    </test>
    <edit name="antialias" mode="assign">
      <bool>false</bool>
    </edit>
  </match>

</fontconfig>

I put it into a Gist, plus some additional documentation just in case:
https://gist.github.com/gonzalocesar/7ef41572a2627b65da976001a29ba7ee


How do you use ipython with pip --user installed libraries?

The answer is here. Credit due to Griboullis.

  In Ubuntu, pip install --user installs the ipython executable in the $HOME/.local/bin directory. This directory needs to be added to the $PATH environment variable.


I can't install libdvdcss - script not finding medibuntu, How to get DVD playback?

UPDATE: The fix has now been released. On 12.04, 12.10, 13.04, 13.10.

Do:

sudo apt-get update

Then just like on PlayingDVDs Wiki:

sudo apt-get install libdvdread4

(make sure to do this step, or do sudo apt-get upgrade)

And:

sudo /usr/share/doc/libdvdread4/install-css.sh

Old Information on bug

A Fix has been proposed on Launchpad and is not yet released to fix that script(although it is not in effect yet, the wiki instructions will be the same once it is released).

To get it released as fast as possible:

Test out the proposed update(using instructions below)
On the Bug Page, Click on the yellow icon, then "Yes, it affects me"

Comment on the Launcpad page to say whether or not the update works mentioning the Ubuntu version you use(after following instructions below).

libdvdread4 percise-proposed update instructions

I am going to show you how to "Cherry pick" the update from precise-proposed. (for releases newer than "percise" substitute with release name whenever it appears)

Open Software Center → Edit → Software Sources... → Select the Updates tab → Check the box "Pre-released Updates(precise-proposed)" → Then click "Close"

In terminal run:

sudo nano /etc/apt/preferences

Add the text:

Package: *
Pin: release a=precise-proposed
Pin-Priority: 400

After done entering text, hit Ctrl+x then hit Y then Enter to save changes.

This will prevent unwanted upgrades of other packages in proposed and give you a shortcut to pick a single upgrade.
Now Type in terminal:

sudo apt-get update

Then install libdvdread4 with:

sudo apt-get install libdvdread4/precise-proposed

And now the new script should work using:

sudo /usr/share/doc/libdvdread4/install-css.sh

Try out DVD(commercial) playback.


No such acrobatics are necessary. YOU do not need to patch apt. The Ubuntu Security Team has already patched apt for you.

If you are using Unattended Upgrades, then you already have the patched version of apt.

If you are paranoid about security (not a bad thing!), then download the patched apt package yourself from https://packages.ubuntu.com. Be sure to pick the correct version for your release of Ubuntu.


gtk-key-theme Emacs: what keystroke is for select-all?

There is a simple binding for "Select all" in gtk: C-/

It’s defined as a general GtkTextView signal and not specifically part of the emacs key theme. But it works fine with it. It's defined as an alternative to C-a. While the latter gets reinterpreted by the emacs theme C-/ remains valid for "Select all".


To simply list the content of the parent directory, just use

ls ..

as ls accepts a path as argument and .. represents the parent of your current working directory.


It is possible that the machine is overheating and the CPU was turned off when it hit a thermal trip threshold.  If it is overheating, you could try using thermald which will try and prevent thermal overrun by using various passive cooling mechanisms.  See: https://wiki.ubuntu.com/Kernel/PowerManagement/ThermalIssues


Access Denied for user 'linuxuser'@'localhost' (using password: no)

Which version is your wordpress installation?

If it is >= 3.9 read this:

https://make.wordpress.org/core/2014/04/07/mysql-in-wordpress-3-9/

In WordPress 3.9, we added an extra layer to WPDB, causing it to switch to using
the mysqli PHP library, when using PHP 5.5 or higher.

For plugin developers, this means that you absolutely shouldn’t be using PHP’s mysql_*()
functions any more – you can use the equivalent WPDB functions instead.

So basically if you are using WP >= 3.9 and you are using PHP >= 5.5 you can not access db with mysql_* function (it is bad practice though, they are deprecated).

You should consider lowering PHP version if you do not want to change the code, or change the code to use $wpdb object instead.

The best solution will be to update your plugin you are using with the one for your WP version if it exists. You should seek the developer of the plugin.


I need to see the BCDedit for a Windows10/Ubuntu install both by Wubi and by separate partition

If you want to add an UEFI entry for Ubuntu with bcdedit, you can use the following commands as administrator:

List all BCD entries for UEFI:

bcdedit /enum firmware

Copy UEFI entry of "Windows Boot Manager" to create a new entry for Ubuntu:

bcdedit /copy {bootmgr} /d "Ubuntu Secure Boot"

Set file path for the new Ubuntu entry. Replace {guid} with the returned GUID of the previous command.

bcdedit /set {guid} path \EFI\ubuntu\shimx64.efi

Set optionally Ubuntu as first entry in the boot sequence. Replace {guid} with the returned GUID of the copy command.

bcdedit /set {fwbootmgr} displayorder {guid} /addfirst

Alternatively, you can use a script which does the job for you:

@ECHO OFF
rem add Ubuntu EFI entry

bcdedit /enum firmware

for /f "tokens=2 delims={}" %%a in ('bcdedit /copy {bootmgr} /d "Ubuntu Secure Boot"') do set guid={%%a}
bcdedit /set %guid% path \EFI\ubuntu\shimx64.efi
bcdedit /set {fwbootmgr} displayorder %guid% /addfirst

bcdedit /enum firmware


Allowing a particular user to access a blocked site for a limited time

The !allowip... records are exceptions for certain IPs. You would need to define a new one (following the syntax of the existing acl src rules) and then just add that name to the list.

So if you start with:

http_access deny facebook all !allowip118 !allowip113 !allowip108 !allowip18

You end with:

acl allowbob src 192.168.0.34
http_access deny facebook all !allowip118 !allowip113 !allowip108 !allowip18 !allowbob

Or instead of editing the deny, add an explicit allow for allowbob:

http_access allow facebook allowbob

If you need to time-limit this, say you wanted to explicitly allow Bob to use Facebook between 6pm and 8am, you could slip the following in before the deny facebook record:

acl facebooktime time MTWHF 18:00-8:00
http_access allow facebook facebooktime allowbob


Accessing my website hosted on apache changes the port number.

You are have two VirtualHost's with the same ServerName directive, so Apache can't threat this and uses only the first one. The first one is those defined in the file nextcloud.conf, because the letter 'n' is located before 'w' in the alphabet.

One way to solve this is to combine the content of nextcloud.conf and wordpress.conf and create one VirtualHost - you can name the new configuration file mydomain.com.conf, for example:

<IfModule mod_ssl.c>
    <VirtualHost _default_:443>

        ServerAdmin mail@mymail.com
        ServerName mydomain.com      # Note along with mydomain.com your cert. file must
        ServerAlias www.mydomain.com # contain www.mydomain.com to use ServerAlias here

        DocumentRoot /var/www/html
        <Directory /var/www/html/>
            AllowOverride All
        </Directory>

        Alias /nextcloud "/var/www/owncloud/"
        <Directory /var/www/owncloud/>

            Options +FollowSymlinks
            AllowOverride All

            <IfModule mod_dav.c>
                 Dav off
            </IfModule>

            SetEnv HOME /var/www/owncloud
            SetEnv HTTP_HOME /var/www/owncloud

            <IfModule mod_headers.c>
                Header always set Strict-Transport-Security "max-age=15768000; preload"
            </IfModule>

        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        SSLCertificateFile /etc/letsencrypt/live/mydomain.com/fullchain.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/mydomain.com/privkey.pem
        Include /etc/letsencrypt/options-ssl-apache.conf

    </VirtualHost>
</IfModule>

In this case you should be able to access the WordPress installation at https://mydomain.com and the ownCloud installation at https://mydomain.com/nextcloud. Don't forget to a2dissite the old conf files, a2ensite the new one and restart Apache.

Another way is to use different domain names (FQDN) for the booth VirtualHosts. For example mydomain.com for WordPress and www.mydomain.com (or cloud.mydomain.com) for ownCloud. In this case you do not need to use the directive Alias /nextcloud "/var/www/owncloud/" instead that you can use DocumentRoot /var/www/owncloud/, so you will be able to access your ownCloud directly at https://www.mydomain.com (respectively at https://clould.mydomain.com).

In addition: within the Apaches documentation you will be advised to do not use the rewrite engine when you can use more simple directives. Within your HTTP host definition you can use the Redirect directive as it is shown here. The only limitation of this approach is that you must create HTTP VirtualHost per FQDN.


Problems running: apt-get -o Acquire::ForceIPv4=true

To enable proxy-connections to your computer, you must edit /etc/apt/apt.conf.

There are two ways to do it:

1. Unity:
Launch network app at Unity launcher, follow as the picture shows:

2. Terminal

Edit /etc/apt/apt.conf, adding these lines (IP and port are just examples):

Acquire::http::proxy "http://172.24.12.50:3128/";
Acquire::https::proxy "https://172.24.12.50:3128/";
Acquire::ftp::proxy "ftp://172.24.12.50:3128/";
Acquire::socks::proxy "socks://172.24.12.50:3128/";

If this proxy requires authentication, so you must change IP info with user:password@ip:port. e.g below:

Acquire::http::proxy "http://user:password@172.24.12.50:3128/";
Acquire::https::proxy "https://user:password@172.24.12.50:3128/";
Acquire::ftp::proxy "ftp://user:password@172.24.12.50:3128/";
Acquire::socks::proxy "socks://user:password@172.24.12.50:3128/";

If your network proxy is Microsoft NTLM-authenticated, as I've got here, then you must create a local-proxy to overcome it. I use CNTLM. It's in Universe repository.


Can't see USB drive connected to Netgear router when selecting a media library for Videostream

So.. you have a USB drive connected to your wireless router. I'm going to go out on a limb and assume it cannot be directly linked to the computer and it contains other folders due to lack of specification. If you can clearly see it on your folder application, try copying and pasting the required files from the USB drive to a location Videostream can see. If this fails to work, try to find a way to directly connect a USB device to your computer.

NOTE: Removing a USB drive from a wireless router does not destroy the data. However, I'm not sure what's on it, so this is my best answer.


If they are both booting to the same OS then I don't see a huge problem, my solution simply involves editing the grub menu in order to get rid of the other option. First of I would check your grub.cfg file. This can be accessed typically via the following commands:

 cd /boot/grub/
 **insert favorite text editor here** grub.cfg (you may need root access to perform this operation)

This is an important file to your system, so messing with it is not advised unless you know what you are doing, hence the DO NOT EDIT THIS FILE at the top of the file.

In terms of your question, we are going to be removing a menuentry. Scroll through this file until you find something resembling the following:

menuentry 'Windows 7 (loader) (on /dev/sda2 *this may be different depending on the computer*)

The following lines are important, if I am right about this file there should be two of these menuentry's and THEY SHOULD BE THE EXACT SAME. A simple solution would be to remove one of the entries. I will emphasize this again THEY MUST BE THE SAME. A good move would be to make a copy of this file and save it somewhere where you can access it in case of a failure. Something like:

cp grub.cfg ~/

This should solve your problem. I would advise against removing the old GRUB files in the recovery partition as it could cause some problems later, unless they are causing problems now.


Not booting into grub (boot-repair log included)

From your booted Ubuntu install, run sudo grub-install /dev/sda.

While it's possible that you also have a buggy BIOS and need a separate /boot partition that is not what is causing the problem here (if that were the problem, you would still get a grub rescue shell rather than just a blinking cursor) and therefore I would recommend  not creating a separate /boot partition (at least until you find that you really do have a buggy BIOS which can't properly handle large disks).


I am trying to build libmtp 1.1.14 but I cannot fix this error

I ended up getting the tarball from here http://sourceforge.net/projects/libmtp/files/libmtp/1.1.4/libmtp-1.1.4.tar.gz/download

then the package compiled without hassle.

had both iconv and gettext installed as detailed on GNU site.


Boot into a live system so no partition is mounted, then open GParted. Make sure swap isn't used either (if you have a swap partition) by right-clicking it and choosing "swap off".

Then resize your partitions as you choose. Resizing from the right hand side of a partition is generally fast, resizing from the left and moving a partition is generally slow. There is a program called "Disks" which you can open from the dash. It comes with a benachmark tool for drives. Make sure only to perform a read benchmark. Use the mean value and approximate the data which has to be copied. This gives you a rough estimate of how long it's going to take.

Keep in mind that playing with partitions is dangerous, especially if there is a power failure, so make sure to have a backup. If you have to make one in advance, use the mean value from the bench mark for an estimate and the tool dd do make the backup. The estimate for this one should be pretty accurate if you're using an external hard drive with usb 3.0 for the backup. If yours is usb 2.0, it'll take a lot longer. 30 MB/s as an estimate.


Default portrait mode for Ubuntu 20.04.1 lts

For me running a startup script did the trick.  I used  'xrandr --output HDMI-1 --rotate left'  for some reason it was not working the first time around.


How to delete a folder named ${system:java.io.tmpdir}?

You need to use proper escaping, use any one of the following:

rm -r '${system:java.io.tmpdir}'
rm -r \$\{system:java.io.tmpdir\}

In bash, escaping just the $ would do:

rm -r \${system:java.io.tmpdir}

You can not use double quotes here, like rm -r "${system:java.io.tmpdir} because the shell will then take the whole thing as variable expansion with the variable being system:java.io.tmpdir, which is in fact an invalid variable name, and then the expansion will always result in an empty string. So eventually, it would try to do: rm -r ''.


Upgrade Ubuntu 14.04 to 16.04 using a bootable USB stick

Go to your Unity Dash, locate "Startup creator" and create a bootable installation USB disk using it. You will of course first download the *.iso image. Make sure that your USB is recognized when you plug it in, so that the creator knows which drive to use.

Then boot your computer using the USB.


No login screen after boot screen on installaion of NVIDIA drivers

Install the NVIDIA drivers and NVIDIA Optimus (PRIME) in a different way :
1. Remove all NVIDIA software you tried to install before.
Highlight the Ubuntu menu entry and  press the E key.
Add nouveau.modeset=0 to the end of the linux line.
Press the F10 key to boot into the Ubuntu system.
When the login screen appears press Ctrl+Alt+F1.
Enter your user name and password ... then execute :
sudo apt-get purge nvidia*
sudo reboot

2. Install NVIDIA drivers 352 from the Ubuntu repositories.
Highlight the Ubuntu menu entry and  press the E key.
Add nouveau.modeset=0 to the end of the linux line.
Press the F10 key to boot into the Ubuntu system.
When the login screen appears press Ctrl+Alt+F1.
Enter your user name and password ... then execute :
sudo apt-get update
sudo apt-get install nvidia-352 nvidia-prime
sudo reboot

Update addressing your feedback that it still doesn't work with drivers 352 :
1. Remove the currently installed NVIDIA 352 drivers.
Highlight the Ubuntu menu entry and  press the E key.
Add nouveau.modeset=0 to the end of the linux line.
Press the F10 key to boot into the Ubuntu system.
When the login screen appears press Ctrl+Alt+F1.
Enter your user name and password ... then execute :
sudo apt-get purge nvidia*
sudo reboot

2. Install the latest official stable NVIDIA 361 drivers.
Highlight the Ubuntu menu entry and  press the E key.
Add nouveau.modeset=0 to the end of the linux line.
Press the F10 key to boot into the Ubuntu system.
When the login screen appears press Ctrl+Alt+F1.
Enter your user name and password ... then execute :
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-361 nvidia-prime
sudo reboot


Flux, Redshift and Night Color don't work (Ubuntu Budgie)

If, for whatever reason, Flux, Redshift or the Night Color applet do not work for you, consider installing sct from the universe repository provided you're on 18.04 or higher. sct isn't available for 16.04 or older versions.

It's a small program and probably won't pull in many dependencies. You can try apt install -s sct to preview what will be installed: -s provides a simulation and doesn't need sudo.

If you do decide to try sct, man sct has

DESCRIPTION
       sct sets the screen's color temperature in a range from 1000 to 10000

OPTIONS
       temperature
              If passed a value in the correct range (see above) sct will set the current screen temperature to this value

       -h     If -h is passed sct will display usage information

       none   If no options are passed sct sets the color temperature to the default of 6500

So when you want a warmer screen, open a terminal and run sct 3500 for example. And when you want to revert to normalcy, just run sct.


How to upgrade from 16.04 LTS to 16.04.1 LTS

16.04.1 is a point release of 16.04, so you don't need to use the do-release-upgrade command, instead:

sudo apt-get update
sudo apt-get dist-upgrade

Will get you there.
In the GUI, just installing all required updates will do the same job. To check that you're on 16.04.1 use:

lsb_release -a


Recent updates caused return of audio glitching with 5.1 surround sound

Finally I found this post How to enable 5.1 channel playback on a Realtek ALC887-VD chip?

The solution was to open alsamixer, select your sound card and set channels to 6, even though I set default channels to 6 in the pulse daemon.conf file already. Moreover the gnome audio settings behaves badly with 5.1. You have to use pavucontrol to select the correct profile. ONLY use the gnome sound settings to select the 5.1 output device, if you touch the profile dropdown box, the output device completely disappears from the list!


Here is an awk command:

awk -v RS="first:|last:" '{gsub("first:|last:","",$0);print $1","$2}' RS='' infile.txt

Output is as you are expecting:

John,Smith
David,Bennet


ext4, btrfs, zfs and Ubuntu's future in 2017

Chances are, ext4 will remain the default file system for a while.

I say this mostly because of precedent. Ubuntu tends to change very little 'under the hood' unless a major change is made in Debian Unstable, which Ubuntu is based on. (Example: The move from Upstart to SystemD)

Chances are unless Debian adopts btrfs as it's default filesystem, which most likely isn't going to happen anytime soon, ext4 will remain the default file system for a long time.


Better yet, instead of perpetrating a Federal offense by sneaking in to an office ( I  know you're kidding and you know you're kidding but the Secret Service and other Feds have no sense of humor at all, as Steve Jackson found out), find a library with open WiFi and connect there. Your webwork will be buried in hundreds of other people's webwork, and, at least around here the libraries are getting down right uppity about not giving anything to the Feds (like logs) they can avoid (forex, not retaining logs for more than 30 days).

The shorter the log retention, the better your privacy.


New User, Please Help with PassPhrase Question

Probably you made your home folder encrypted.

Take a look on this article, maybe will help you.


My keyring info references "The Secret Service was already initialized" - Am I being hacked?

Believe it or not, but these are bona fide warnings issued by the gnome-keyring-daemon process. If you are interested, you can find them in the source code here.

Simply googling error messages is often a good way to figure out if the error is critical, or a mere warning.


How to reset some packages in ubuntu 14.04

Sounds like you should reinstall GTK 3.10 as that is the default GTK package in Ubuntu 14.04. Hopefully, that overwrites your custom installation and fixes your UI problem.

Unfortunately, that seems like it will break your Gnome-Photos app unless you find out a way to install GTK 3.0 for just that app. (I don't know if that's possible)


Plugging two external screens to laptop via VGA and HDMI

Open terminal and run

xrandr

You will get something like this

LVDS1 connected 1024x768+360+1050 (normal left inverted right x axis y axis) 246mm x 185mm
   1024x768       50.0 +   60.0*    40.0
   800x600        60.3     56.2
   640x480        60.0     59.9
VGA1 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 434mm x 270mm
   1680x1050      59.9*+   60.0
   1280x1024      75.0     60.0
   1440x900       75.0     59.9
...

Xrandr lists your video outputs including your laptops built-in screen. If there are three video outputs you should be able to connect two external monitors to your computer. If there are just two you most likely won't be able to connect more than one external monitor at a time.


Having a hard time installing Ubuntu onto a USB stick

you need to make ESP partition for UEFI install. during partitioning Hard drive on install, it's seen as EFI "System Partition" beside "use as" combo-box. Use 100-500 MB approx. for the partition depending on your needs.

if you're using dual boot, one ESP partition for each Hard drive should be enough, as you can mix it with windows EFI partition(leave the windows EFI partition unchanged).


How to add Launchpad PPA of different Ubuntu versions to my Machine?

That's definitely possible, but you shouldn't be doing that as different binary packages have different dependencies which usually are only available in specific versions of Ubuntu.

By adding a ppa with packages build for another version of ubuntu, and installing the packages you'll either end up in messed up system, or won't be able to install the packages due to missing dependencies.
Though it might work for a packages with a very limited number of dependencies.


Error is occured when I try to build and install Numeric-24.2, anybody, help please me

This link should point you in the right direction:
https://docs.python.org/2/install/

Note: the Permission denied error is a reference to privileges. try instead:

python setup.py build
sudo python setup.py install

OR

another alternative, if you choose not to use root permissions:

python setup.py build
python setup.py install --user


The images for the N10 have not been given too much attention due to Canonical having 3 official headsets out to support. Once a company starts making a tablet I'm sure they will give tablets more love.


How can I configure dbus to allow ssh-user to suspend server?

There are two basic ways this can be done and a workaround:
Either you need to modify /usr/share/polkit-1/actions/org.freedesktop.upower.policy, set the XDG_SESSION_COOKIE environment variable to the appropriate value or use pm-suspend:
Modifying /usr/share/polkit-1/actions/org.freedesktop.upower.policy
Apply this patch:
--- /usr/share/polkit-1/actions/org.freedesktop.upower.policy.orig  2011-11-16 19:06:59.274055248 +0100
+++ /usr/share/polkit-1/actions/org.freedesktop.upower.policy   2011-11-16 19:11:15.178864922 +0100
@@ -21,6 +21,7 @@
     <defaults>
       <allow_inactive>no</allow_inactive>
       <allow_active>yes</allow_active>
+      <allow_any>yes</allow_any>
     </defaults>
   </action>

(To the <action id="org.freedesktop.upower.suspend"> tag/section), and it'll work too...
or
XDG_SESSION_COOKIE
When you're using the desktop, you'll see that $XDG_SESSION_COOKIE has one value, but in an ssh session, it has another. Store XDG_SESSION_COOKIE e.g. in a .dotfile or something when the desktop starts and source it in your script that needs to do it over ssh.
pm-suspend
Or you could just give up on doing it with dbus and UPower and just issue pm-suspend as root and get it over with! :-)


grubx64.efi cannot find grub config or grub files, boots to grub console

If you're using the grubx64.efi file from Ubuntu, in theory it should be looking on your Ubuntu /boot/grub directory for its support files. If it's not finding them, then I'm not sure what's wrong. If you've built GRUB from source code or installed in some other way, though, you might need to copy all its support files, as you suggest.

Another alternative is to install rEFInd as EFI/Microsoft/boot/bootmgfw.efi on the ESP and leave GRUB where it is (presumably EFI/ubuntu/grubx64.efi). With a little extra configuration (described on the rEFInd Web page), you should even be able to bypass GRUB completely, if it's giving you problems.

More broadly, you may want to check out my Web page on EFI boot loaders, which includes information on boot loader installation and at least the basics of configuring all of them. (GRUB 2 is the hardest in this respect. It's only easy when the distribution installer gets it right.)


Opening identical application of two in Gnome's Applications overview opens the first one

Likely because both versions use the same identifiers to check for a running instance. In many such apps (browsers, editors) when you invoke the program:

it checks if some global resource exists (PID file, or else) that indicates that an instance is already running.

if yes, it passes the arguments to the existing instance and exits. The window opens in the existing instance.
if no, it creates the global resource making it point to itself, and so becomes the existing instance.

So if both versions use the same identifier for the global resource, they will share instances and you will only run the first one. There are sometimes flags to force the creation of an "isolated" instance.


You need to create a Presistent USB to be able to do so.  To create a presistent USB you can use the universal USB installer.

Once you run the program, you can set the amount of space that you want to accomplish your task.  You can do that under Step 4 in the program.  See image below.


Go to the directory where you have Android Studio. Then go to the bin/ subdirectory. Locate the following files, which contains Java Virtual Machine options:

studio.vmoptions
studio64.vmoptions

Open these files and locate line with MaxPerSize parameter. It should look as follows:

XX:MaxPermSize=256m

Remove this line in both files. I don't know if you are using 32-bit or 64-bit operating system, so you can update both files just in case.

I'm not sure if it will solve your problem, but I would try it in such situation. In my case, with this option and Java 8, I just get the warning, but Android Studio starts anyway. After removing this parameter, Android Studio still starts, but without warning. I'm using Ubuntu 14.04 LTS.

EDIT:

There is another solution for this problem described here: https://stackoverflow.com/a/27913562/1150795.

Go to File > Other Settings > Default Project Structure > JDK location and check the path.

In case of Ubuntu Linux, we can set /usr/lib/jvm/java-7-oracle as default JDK if we are using Oracle JVM. JDK 7 is the safest option for Android.


2 GB Ram, but Ubuntu runs slowly and hangs if doing too much

Running these commands may help in speeding things up a little by freeing some caches, but this won't fix the cause:

sudo su -

enter your password

sync
echo 1 > /proc/sys/vm/drop_caches
echo 2 > /proc/sys/vm/drop_caches
echo 3 > /proc/sys/vm/drop_caches


Comparing with mainline kernels, you don't need to pick a kernel version or manually download the deb files. That part is handled by Ubuntu. The only action left is installing the upgrades - for which, usually you have to manually allow the Update Manager to install updates. I'd modify that to "extra action" - nothing more than you'd need for any other package.

You can turn on unattended upgrades, then the kernel should be updated for security upgrades without asking you, but that's neither here nor there.


xserver-xorg-video-intel packages have unmet dependencies

The package is xserver-xorg-video-intel-hwe-16.04
instead of xserver-xorg-video-intel
and it should be already installed by default.


Disable top sites from Ubuntu Touch's default browser

You can select individual sites from "Top Sites" by touching and dragging to the right - a trashcan icon will appear and allow you to delete selected sites.

Otherwise I haven't seen the option to change the new tab page.


CPU fan deactivated during 11.10 installation

boot the installer with the switch

acpi=off

or

noapic

You should find that the boot cd has other options and some of these relate to power (usually accessed by Functon keys).

Disabling acpi will remove ubuntus ability to interact with the systems power management.

Also check the bios. Some systems have accelerators for graphics and cpu (like cruise control or load sensing overclocking).

Many of these were designed to work with Windows and do not conform to normal standards. Try disabling these by elimination.


How to enable the pc power button at the lock screen?

It only works for me if I short circuit the /etc/acpi/powerbtn.sh completely by inserting

shutdown -h now

at the very beginning. It's still a hack but now it works every time.


I Want To Install Ubuntu 13.04 On Windows 8 With Dual Boot

As Windows 8 boot loader option (that blue screen, not the Ubuntu screen asking for it)

This guide might help you get it done. Basically:

Create 3 partitions
Install Windows 8
Install Ubuntu
Swap

  If i dont choose within 15 seconds, windows 8 loads default as automatically

For this you need EasyBCD

  Also I want to be able to change the defaults

I'm not sure what you mean here, but I'm guessing which OS comes first. You can also edit this with EasyBCD. I believe it's either in the Advanced Settings or Edit Boot Menu categories.

Though honestly if you want to avoid troubles getting an external drive to install either OS will save you from further troubles in setting up boot options and the like.


Ubuntu 16.04 nvidia lib32gcc1 unmet dependencies and broken packages after upgrade

sudo apt-get autoclean

It is last end solution : remove sources.list file.and create new sources.list...

sudo rm /etc/apt/sources.list

Then, type in

sudo software-properties-gtk

This will open software-properties-gtk and a newsources.list will be created automatically.

Then change the server to US or to any other server of your choice. You must enable repositories from the new dialog in order to create new sources.list.

Tick all the boxes then click on Revert then click close.

Need to restore default repositories

 sudo apt-get update && sudo apt-get dist-upgrade -y

(it is good practice to backup this file before installing to recover if such things happen)


Ok, mdpc was right, it was a problem of the filename. The strange thing is:

The Project-Name (and with that the Folder-Name) may not contain special characters but spaces. But it is completely ok if the files have special characters, e.g.
C:\Cakewalk Projects\My Project(Testing)\My Project(Testing), Voclas, Rec (8).wav
will NOT work, where as
C:\Cakewalk Projects\My Project Testing\My Project Testing, Voclas, Rec (8).wav
will work.


how to configure wordpress to run with PHP 7

You need to install libapache2-mod-php7.0 and if it doesn't enable automatically (it should) at install time, enable it with:

a2enmod php7.0

If libapache2-mod-php5 is still installed, either disable it first with a2dismod php5 or uninstall with apt-get purge libapache2-mod-php5.


nautilus-compare (meld integration with nautilus) and other nautilus-actions-extra packages not working with Ubuntu 13.04

I think this is the bug report.

https://bugs.launchpad.net/nautilus-compare/+bug/1172953

Which suggests this WORKAROUND:

sudo ln -s /usr/lib/x86_64-linux-gnu/libpython2.7.so /usr/lib/libpython.2.7.so
sudo ln -s /usr/lib/x86_64-linux-gnu/libpython2.7.so.1 /usr/lib/libpython.2.7.so.1
sudo ldconfig
# fresh login or reboot of machine may be needed here
nautilus

Note:

If /usr/lib/x86_64-linux-gnu/libpython2.7.so doesn't exist, replace that line with:

sudo ln -s /usr/lib/x86_64-linux-gnu/libpython2.7.so.1 /usr/lib/libpython.2.7.so
If /usr/lib/x86_64-linux-gnu/libpython2.7.so.1 doesn't exist, replace that line with:

sudo ln -s /usr/lib/x86_64-linux-gnu/libpython2.7.so /usr/lib/libpython.2.7.so.1

In deed, this also re-enables all other Nautilus Actions Extra context menu items that stopped working with nautilus-compare.


The difference between the two is actually the answer to both questions posed. See https://askubuntu.com/a/27444/23727


The issue of "apt-get update" is that you are missing the public key 1E9377A2BA9EF27F. You can add this key to your keyring through executing:

sudo apt-key adv --recv-key 1E9377A2BA9EF27F

It will show you something like:

Executing: /tmp/apt-key-gpghome.IA65nrxcnz/gpg.1.sh --recv-key 1E9377A2BA9EF27F
gpg: key 1E9377A2BA9EF27F: public key "Launchpad Toolchain builds" imported
gpg: Total number processed: 1
gpg:               imported: 1

Now you can run "apt-get update", or "apt update" and it will fetch the index of "http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial InRelease" as well.


Instead of swapping out your drives back and forth, you can install all three hard drives right away and then make sure to configure the correct drive/partition(s) for Ubuntu installation.

If your 2nd drive is empty, note its size and then run ls /dev/sd*. This will give you a listing of available hard drives, as in sda, sdb, sdc (and possibly more).
To find out which one is your 2nd drive, do sudo fdisk -l /dev/sdX, where X is the last letter of the drive (a, b, or c). This will list the drive size and its partition table, if any. The drive size should be close to the size of your 2nd drive. If it doesn't, check another drive. If the drives are equal in size, look at the partition table (if one shows up). The Windows drive will have multiple HPFS/NTFS/exFAT entries - that's the drive you do not want to touch!
Once you found your target drive, launch Ubuntu installer and point it at that drive, i.e. /dev/sdb (or whichever one is your 2nd drive). Unless you know what you're doing, let it auto-partition the drive. It will not touch your Windows drive or the SSD. As a part of the installation, it will add the GRUB bootloader which will auto-detect Windows and will let you choose the OS to boot when the computer starts.

Hope this helps.


Ubuntu 18.04.1 LTS Wifi Connectivity Issue

I had the same problem!
I solved it by creating an executable file (* .sh) with the following codes:

sudo /etc/init.d/dns-clean restart
sudo /etc/init.d/networking force-reload
sudo /etc/init.d/nscd restart

----- copy code in an empty file ----

#!/bin/bash

# NB: **First install nscd** with sudo apt-get install nscd

# run this command to flush dns cache:
sudo /etc/init.d/dns-clean restart
# or use:
sudo /etc/init.d/networking force-reload
# Flush nscd dns cache:
sudo /etc/init.d/nscd restart
# If you wanted to refresh your settings you could disable and then run
sudo service network-manager restart

echo "DNS Flushed!";

---- save as something.sh ----

Execute your bash file in terminal with:

chmod +x /path/to/your/something.sh
./path/to/your/something.sh


Permanent custom keyboard shortcuts for Evince (Document Viewer)

For Ubuntu 12.04 and up:

Use dconf-editor instead of gconf-editor:

sudo apt-get install dconf-tools

Then set the key /org/gnome/desktop/interface/can-change-accels to true.

Setting shortcuts when using global menu:

Open evince (or any app) with UBUNTU_MENUPROXY=0 evince
Browse menus, hover an entry, type your shortcut


Read a part of massive online CSV file using its URL from command line

It may be not just the beginning of the file that you need to read:

Use HTTP Content-Range

To read other parts than the first, you could use a HTTP request for a range, for example with the --range option of curl, to get a part of the file from some byte position to another:

curl --range 500-700 ...

Regarding the file format CSV - you would guess which part could be useful, get that part, and edit it manually to remove partial lines of data.

For example, to take a look at the 500 bytes/characters starting from byte 50000:

URL="http://datagov.ic.nhs.uk/presentation/2014_03_March/T201403PDPI+BNFT.CSV"
   curl --range 50000-50500 "$URL"

2.79,0000030,201403,
Q44,RXA,Y00327,1108010F0AAABAB,Hypromellose_Eye Dps 0.5%               ,0000001,00000000.81,00000000.76,0000010,201403,
Q44,RXA,Y00327,110801000BLAPA0,Blephasol_Lot                           ,0000001,00000007.53,00000006.97,0000100,201403,
Q44,RXA,Y00327,110801000BLAQA0,Blephaclean_Eye Lid Wipe                ,0000001,00000010.68,00000009.89,0000040,201403,
Q44,RXA,Y00327,1201010F0BBAAAA,Locorten-Viof$

Note how the first and last line are cut off, as the actual part of the file was "just some text" of the file, not "some CSV records".

When Range is not supported

Common web servers support "Range" in general,
but it's possible that for some reason "Range" is not working
(eg. it's not supported by a custom server, or it does not work because there is a proxy in between)

In this case, we can not avoid to download the data before the part we're interested in. But then, we can cut out the part we need, by bytes, or by lines:

URL="http://datagov.ic.nhs.uk/presentation/2014_03_March/T201403PDPI+BNFT.CSV"
   curl -s "$URL" | head -c 50500 | tail -c 500

2.79,0000030,201403,
Q44,RXA,Y00327,1108010F0AAABAB,Hypromellose_Eye Dps 0.5%               ,0000001,00000000.81,00000000.76,0000010,201403,
Q44,RXA,Y00327,110801000BLAPA0,Blephasol_Lot                           ,0000001,00000007.53,00000006.97,0000100,201403,
Q44,RXA,Y00327,110801000BLAQA0,Blephaclean_Eye Lid Wipe                ,0000001,00000010.68,00000009.89,0000040,201403,
Q44,RXA,Y00327,1201010F0BBAAAA,Locorten-Viof$

Just the same!

Read by line

To get lines, instead of characters, use -n instead of -c.
For lines 100 to 110 ("the last 10 lines of the lines up to 110"):

URL="http://datagov.ic.nhs.uk/presentation/2014_03_March/T201403PDPI+BNFT.CSV"
   curl -s "$URL" | head -n 110 | tail -n 10

Q44,RXA,Y00327,0206030Y0AAAAAA,Ivabradine_Tab 5mg                      ,0000001,00000020.09,00000018.68,0000028,201403,
Q44,RXA,Y00327,0208010W0AAAIAI,Tinzaparin Sod_Inj 20 000u/ml 0.7ml Pfs ,0000003,00000154.77,00000143.20,0000013,201403,
Q44,RXA,Y00327,0208010W0AAANAN,Tinzaparin Sod_Inj 10 000u/ml 2ml Vl    ,0000001,00000021.13,00000019.65,0000002,201403,
Q44,RXA,Y00327,0208020V0AAAAAA,Warfarin Sod_Tab 1mg                    ,0000002,00000001.34,00000001.37,0000042,201403,
Q44,RXA,Y00327,0209000A0AAAJAJ,Aspirin_Tab 75mg                        ,0000001,00000000.12,00000000.22,0000004,201403,
Q44,RXA,Y00327,0211000P0AAACAC,Tranexamic Acid_Tab 500mg               ,0000001,00000006.31,00000005.85,0000060,201403,
Q44,RXA,Y00327,0212000Y0AAADAD,Simvastatin_Tab 40mg                    ,0000001,00000000.17,00000000.27,0000004,201403,
Q44,RXA,Y00327,0301011R0AAAPAP,Salbutamol_Inha 100mcg (200 D) CFF      ,0000037,00000058.50,00000054.54,0000039,201403,
Q44,RXA,Y00327,0301011R0BEAIAP,Ventolin_Evohaler 100mcg (200 D)        ,0000014,00000021.00,00000019.59,0000014,201403,
Q44,RXA,Y00327,0301011V0BBAMAL,Bricanyl_Turbohaler 500mcg (100 D)      ,0000001,00000006.92,00000006.41,0000001,201403,

Now, as CSV records are lines, we have a clean start and end of the section.

The HTTP Content-Range does not support using line ranges; The HTTP server would need to read the whole file, including the part before the range, to count line numbers.


Lots of resources on the web recommend pdfedit but that's not available in the latest ubuntu.  xournal works perfectly for this.


Bluetooth Mouse need to re-connect every time I restart. How to add it permanently?

hcitool scan  # it will find MAC of the mouse
sudo bluez-simple-agent hci0 <MAC>
sudo bluez-test-device trusted <MAC> yes
sudo bluez-test-input connect <MAC>


No WiFi internet on Ubuntu under VirtualBox

What Virtualbox actually does is share the internet connection of your host (Windows 8.1), with your guest (Ubuntu 14.04). Your guest should be able to detect the wireless internet connection of your host as ethernet connection.

You can check http://www.virtualbox.org/manual/ch06.html for more information about how to set this up.


You will have to boot from Windows install media to install it on the hardware. You can install it in a VM without having to boot off any special media, but you won't be able to boot directly into it either. I wouldn't recommend trying to install Windows to real hardware, from within a VM though. It is very easy to break everything in that case.

Also, you will need to be aware that installing Windows after Ubuntu, will make it difficult to boot into Ubuntu, as it will overwrite the boot record on the primary drive. Also, Windows is very picky and tends to require that it be installed on the first drive, in case you were planning to install it on a second drive.


How Do I install Ubuntu minimal few require components ?

Welcome to Ubuntu !
Will answer you one by one, starting with simple ones !

What is MD5
This is an algorithm used to verify the consistency of your download.
There are chances that during download the file may not get properly downloaded.
Just to verify that the file now on your desktop is exactly the same as on the server, you calculate the its Hash (MD5).
This is a alphanumeric string corresponding to a file, which is unique to it.
If your MD5 string matches with the one on the publisher's website, then you have a proper download !

Terminal in Minimal Install
A minimal install of ubuntu is a bootable CD with file size of ~35MB
This CD contains only the most essential files which merely boots up the system to and talk to your LAN port (RJ-45) with generic drivers.
Once you are here, system requires active internet connection, and downloads freshest of the files and the end result is that you have a system with a potent terminal giving you complete control of your system.
NOTE: This can't be done with any USB modem/Dongle !

Now to install the packages you need, you have 2 choices; use either of the utilities you wish to

via aptitude
This is almost a graphical installes, displaying you all the installed and available for installation packages. just expand the sub-categories and select all that you need!
sudo aptitude in terminal will take you to aptitude menu !
via apt-get (recommended)
This is more powerful method and most of the ubuntuers use this..
It is beyond the scope of this answer to explain all the possibilities of apt-get, and unlike aptitude it's not possible to play around apt-get as noob ! However this might help you kickstart !

NOTE: No matter whatever you use, in the end the installations are handled by [dpkg][4] which you might learn if really super interested & a geek !

As a noob you may use a very powerful application "tasksel" which will help you install the packages (even a complete desktop env. or powerful LAMP server); and you don't have to bother about any of the packages dependencies.
Moreover this has the power to auto configure itself according to the system you are using!
LINUX is intelligent !
This question points how to achieve tasksel and use it !
Also, post launch of unity or GNOME3, I've started using "Cinnamon" Desktop environment
and here is how to install it on minimal environment (even tough u'll have to fix icons and eye-candy because minimal system won't have then prior).
You will also need a login manager if going for custom desktop environment !

Installing firmware drivers
Many major firmware drivers are not included in ubuntu by default just because they don't comply with Open Source license of ubuntu !
However in almost every case it's extremely easy to get these drivers installed !
Additional Drivers Utility may be installed from this ubuntu applications page !


windows 7-like snap window maximize and vertical feature

If you don't mind using keyboard shortcuts instead of the mouse, there is a very simple solution built into compiz.

Enable the compiz plugin called 'grid'. It's under window management in compizconfig-settings-manager (which is in the repos if you don't have it installed).

Then press ctrl-alt-num6 say, to place a window on the right half of the screen. ctrl-alt-num4 for the left, 5 for maximise, and the other numpad keys all put the window somewhere. Tap the same shortcut repeatedly to change what fraction of the screen the window takes up.

You can of course choose other keybindings if you don't like the defaults!


Bluetooth detected on 12.04LTS but cannot connect

Check this bug out. It is more generic but the solution there (installing blueman through sudo apt-get install blueman ) should also fix your problem.


Grub Rescue when trying to boot into my main drive

Burn Ubuntu to USB flash, boot using it.

then use Boot-Repair to repair the boot

That's worked for me in a similar situation.


The version 0.15.1 installed via the repository has this problem, but do these steps will solve (by compiling 0.15.2):

Open a terminal (Ctrl + Alt + T) and enter these commands (after each line typed below press "Enter"):

sudo apt-get build-dep pitivi
wget -c http://ftp.gnome.org/pub/GNOME/sources/pitivi/0.15/pitivi-0.15.2.tar.xz
tar Jxvf pitivi-0.15.2.tar.xz
cd pitivi-0.15.2/
./configure && make && sudo make install


Installed Ubuntu-Tweak but there's no icon

Ubuntu Tweak is in Applications>System Tools

From Unity, press the Super or Windows key, then type "tweak" to display it.


You can use this sed filter to convert your text table into json objects:

cat your_text_file | \
sed -e "s/.*\(fr-\w*\)\s*\([0-9A-F:]*\).*/{"user":\"\1\",\"mac\":\"\2\"},/g"

You will get objects like this:

{user:"fr-65111111","mac":"F0:24:75:33:22:11"},
{user:"fr-x0584444","mac":"50:32:75:33:22:11"},
{user:"fr-AA055555","mac":"3C:AB:8E:33:22:11"},
{user:"fr-1126666","mac":"90:B6:86:33:22:11"},

Which you can then process further to insert into database or you can directly update the sed command to generate you sql insert query.


dpkg was interrupted. How do I do this? manually run 'sudo dpkg --configure -a' to correct the problem

Open a terminal window (press ctrl+alt+t), and type in the line:

sudo dpkg --configure -a


Ubuntu 16.04 : Center greeting command in terminal

One fairly crude way would be to print the string in a field width that uses the value of the terminal's COLUMNS variable e.g.

user@pc:~$ str='Hello Alex!'
user@pc:~$ printf '%*s\n' $(( (COLUMNS+${#str})/2 )) "$str"
                                  Hello Alex!
user@pc:~$

If you want something fancier, there are a number of 'banner' packages available - such as figlet

user@pc:~$ figlet -c "$str"
                  _   _      _ _            _    _           _
                 | | | | ___| | | ___      / \  | | _____  _| |
                 | |_| |/ _ \ | |/ _ \    / _ \ | |/ _ \ \/ / |
                 |  _  |  __/ | | (_) |  / ___ \| |  __/>  <|_|
                 |_| |_|\___|_|_|\___/  /_/   \_\_|\___/_/\_(_)


By default Ubuntu uses the nouveau driver. I have the same issue and due to my /var/log/Xorg.0.log0 this driver seems not yet to be ready to drive 640M (which is very new). I tried to upgrade to the latest nouveau driver manually with no success. For now the only way to go for you is to use the proprietary Nvidia driver:

https://help.ubuntu.com/community/BinaryDriverHowto/Nvidia


What to use to annotate PDF (Highlight/Underline)

You can use Xournal. Works on my 64bit system.


You can use -u or --user with "user:password" format:
#!/bin/bash
user=Linus
read -sp "Enter Password: " password
curl -u "$user:$password" http://example.com/file1.txt -o /path/to/output1
curl -u "$user:$password" http://example.com/file2.txt -o /path/to/output2


increasing the size of root partition and reducing the size of home

Your fstab won't need updating if UUIDs of your partitions dodn't change. But it is worth checking.
But you'll need to re-install grub.


How to connect to a VPN site using console only?

Step 1: First, you need to install the strongswan package on your Linux system.

Open terminal and paste the following line:

sudo apt -y install strongswan-plugin-eap-mschapv2 libcharon-extra-plugins libstrongswan-extra-plugins

Step 2: Edit your config by running the command:

sudo nano /etc/ipsec.conf

  conn is the name of the connection, it can be any as you like
  eap_identity is your login that can be found in the Customer Area of your VPN.
  right is your server address.
  In auto write add.

Login and server address are the credentials that you have got from the Customer Area of your VPN. Use Tab key to follow the indentation of the parameters.

When you finish, your config will look similar to this:

 conn example
                keyexchange=ike
                dpdaction=clear
                dpddelay=300s
                eap_identity=login
                leftauth=eap-mschapv2
                left=%defaultroute
                leftsourceip=%config
                right=example.com
                rightauth=pubkey
                rightsubnet=0.0.0.0/0
                rightid=%any
                type=tunnel
                auto=add

To save the file you need to press Ctrl   X  key combination, then  Y  key and then  Enter .
Now you are back to the command line.

Step 3: Disable the constraints plugin.

sudo nano /etc/strongswan.d/charon/constraints.conf

Change load = yes to load = no
To save the file you need to press Ctrl   X  key combination, then  Y  key and then  Enter .

Step 4: Write your credentials into /etc/ipsec.secrets

sudo nano /etc/ipsec.secrets

login: password

You need to replace them with your login and password that you obtained from the Customer Area of your VPN.

Step 5: Execute the following two commands so StrongSwan can verify VPN's certificate:

sudo rmdir /etc/ipsec.d/cacerts
sudo ln -s /etc/ssl/certs /etc/ipsec.d/cacerts

Step 6: Restart strongswan daemon:

sudo ipsec restart

Step 7: To start the connection:

sudo ipsec up example

example is the name of the VPN connection that you used in Step 2.

To disconnect, type:

sudo ipsec down example

Step 8: To be sure if you are successfully connected please visit http://ipinfo.io/ip in your web browser and check your IP address at the top of the page.

You can also check the status of your connection by typing:
sudo ipsec status


Transfer speeds - running Ubuntu from external HDD via eSATA

Quote from Wikipedia, the free encyclopedia:

  [...] eSATA (e standing for external) provides a variant of SATA meant for
  external connectivity. It uses a more robust connector, longer
  shielded cables, and stricter (but backward-compatible) electrical
  standards. The protocol and logical signaling (link/transport layers
  and above) are identical to internal SATA.

In other words, you would not tell the difference because there is none.

One might argue that you could have a controller with SATA 3 Gbit/s capability providing eSATA connectivity and a controller with SATA 6 Gbit/s capability only providing internal connectivity and therefore have a difference in transfer speeds. However as you stated in your question, you want to connect a HDD, which currently do not exceed SATA 3 Gbit/s transfer speeds like SSDs.

In the long run eSATA will be phased out and replaced by USB 3.0 (currently 5 Gbit/s transfer speed with 10 Gbit/s already planned). Therefore my advice would be to consider using USB 3.0 instead of eSATA, since USB 3.0 enclosures are backwards compatible to USB 2.0 and therefore more versatile.


When you boot to Recovery Mode, the root partition / goes into Read Only mode by default.  Before you can make any changes run the following line:

mount -o remount,rw /

Or

sudo mount -o remount,rw /

Then when you are completed with your changes to your /etc/fstab file all you should have to do is reboot the system.


The device is locked. Enter the passcode

Configuring Automounting

To enable or disable automount open a terminal and type dconf-editor followed by the [Enter] key.
Browse to org/gnome/desktop/media-handling. The automount key controls whether to automatically mount media. If set to true, then Nautilus will automatically mount media such as user-visible hard disks and removable media on start-up and media insertion.

There is another key, org/gnome/desktop/media-handling/automount-open. This controls whether to automatically open a folder for automounted media. If set to true, then Nautilus will automatically open a folder when media is automounted. This only applies to media where no known x-content/* type was detected; for media where a known x-content type is detected, the user configurable action will be taken instead.

Turning both of these values to false should stop the problem.


Issue with AlpsPS/2 ALPS GlidePoint touchpad on DELL PRECISION M6700

To get touchpad properties on M6700, enter this:

xinput list-props "AlpsPS/2 ALPS DualPoint TouchPad" | grep -i finger

To set touchpad properties to be a bit less touchy than default, I entered this:

xinput set-prop "AlpsPS/2 ALPS DualPoint TouchPad" "Synaptics Finger" 15, 20, 128


Simply edit your /etc/apt/sources.list for normal repositories. PPA entries you can find in /etc/apt/sources.list.d/. Simply edit with sudo nano.

Or you can use banish404 which you can find in the official repositories:

sudo apt-get install banish404 gksu

And starting it with:

gksudo banish404


Ubuntu 18.04 and it's spins freeze on shutdown

Suspend doesn't work in 18.04 either for me and many others. Reboot works though. If reboot works for you too then from Grub menu it is safer to power off.

In the GRUB menu, press C and then enter halt

Hopefully 18.04 will be mostly fixed by the July 26, 2018 release of version 18.04.1.


How to tell whether a bash script has root privileges

The script /tmp/a.sh only works with #!/bin/bash on the first line.  When actually running the example I gave, the ! was accidentally omitted and the only user reported was the non-root user as shown in the question.


No, there is not such a general feature in Ubuntu. There may be some keybindings like this in specific applications, though.

Just use Ctrl+C to copy and Ctrl+V to paste, then move word by word with Ctrl+◂.


Gnome extensions don't work! I've tried everything!

I had the same problem, but when I'm behind a proxy. In my case I had to configure the global network proxy under Settings, Network, Network Proxy.


alien cannot built package for architecture "ubuntu amd64"

I had the same problem and solved it this way:

alien --to-tgz --scripts file.i386.rpm
mkdir unpack
cd unpack
tar -xpzf ../file.tgz
mv install ..
cp -rv * /
cd ../install
./doinst.sh

The RPM is converted to a TGZ file.
Be aware that the ".386" is not in the name of the TGZ file.


Default DNS Server not switched after connecting to OpenVPN

Add to the client configuration file (the file with extension .ovpn) downloaded from the OpenVPN server the line:

dhcp-option DOMAIN-ROUTE .

As you know, before adding this line, in Ubuntu 18.04 you must install update-systemd-resolved scripts as described in https://github.com/jonathanio/update-systemd-resolved

If it still does not work, perhaps you must add your internal DNS server too. Check the lines you add at the end of the .ovpn file looks like:

script-security 2
dhcp-option DNS 10.1.0.1  # replace this IP with your DNS server IP.
dhcp-option DOMAIN yourinternaldomain.local  # replace this with your internal domain name.
dhcp-option DOMAIN-ROUTE .
up /etc/openvpn/update-systemd-resolved
down /etc/openvpn/update-systemd-resolved
down-pre

If you use the UI (gnome) to connect

Last, if you are using the UI VPN Icons to connect to your VPN, you must re-import the .ovpn modified file.

To do that execute in a terminal:

sudo apt install openvpn openvpn-systemd-resolved resolvconf
sudo apt install network-manager-openvpn network-manager-openvpn-gnome

Click in Ubuntu start menu:

Type the word "network" and click on Network. It should show somthing like:

Click in the "+" sign on VPN and click in "import from file" option:

Once imported, add a name and click the "add" button at the top right of the dialog.

You are all set!

To connect to the VPN, click in the network icon and after that in the lock icon.


How to change profile picture in User Accounts

Same problem here. Recent upgrade from 15.10. In 15.10, it worked just fine within the account. In 16.04, I had to change the profile picture from a dummy account.


Why can an unauthorized user have full access to an smb share they have no permissions on?

So the lines at 346 and 361 where they have 'user' is incorrect.

These should be replaced with 'valid users'

Upon doing this and restarting the smbd service, everything as far as credentials worked as expected.


I have an Intuos CTH-480 (not Manga --- no idea if they are different; mine has also the
wireless adapter) and it works out of the box in 14.04, needs manually compilation of the driver in older distro: https://askubuntu.com/a/390795/16395.

Notice however that the level of "works" depend on your definition --- the support for the tablet in Windows is greatly superior. For example, I am still struggling to define the tablet hardware keys.


Visual Studio Code can't connect to internet. As if I set proxy settings

Okay finally it worked. Fixed it using dconf-editor

(if you don't have it then sudo apt install dconf-editor)

open it and go to system > proxy there's ftp,http,https and socks. Just set them all to default (button on the bottom right).


Can't install Ubuntu 15.10 from USB - Windows Dualboot

I've had some issues with a usb and 15.10 too. I solved it by going old-school, burn the iso to a dvd and installed it that way. Maybe this works for you too, if not.... Well, at least you tried.


Fglrx problem with HL-based applications in Wine

I had some problems to.

I did not find the reason why, but at a certain moment I uninstalled fgrlx completely, and reinstalled it afterwards.

It works fine again. I thought something with the latest updates of Mesa 7.11, but not sure at all. Maybe this is useful for you.


Will nvidia-340 driver stop working in 2020?

The nvidia-340 is a closed-source binary-blob supported by Nvidia.

Nvidia can stop supporting it whenever they wish, so unless they open-source the source code, which is unlikely in my opinion, it'll stop receiving updates when they state & may not run on later linux kernels, or later software. It'll continue to operate on existing software, but updates in other software packages may cause issues if used with the non-updated Nvidia software.


Super weird since yesterday i happen to install Scribus for my girlfriend since libreoffice does NOT YET have something similar to Microsoft Publisher.

I follow the guide here: http://wiki.scribus.net/canvas/Debian

But before you do it. Please do a sudo aptitude purge scribus-ng

Make sure that there are not problems when using aptitude when installing another program then do the following as the guide says:

Add the Repository to your list (Open the Update manager and click on Settings). the repository is deb http://debian.scribus.net/debian/ maverick main Close the Repository Manager and it reload the repository (It will do it automatically but if it does not then do a sudo aptitude update )
Open your Synaptic Package Manager (Am just telling you how i did it step by step) and search for Scribus. The scribus-ng will appear. Double click on it and install.

Let me know how it went.


Screen Goes Black/Blank After Trying to Run Xubuntu?

Try setting the nomodeset boot option, following the Wubi-specific instructions at http://ubuntuforums.org/showthread.php?t=1613132 (method 2 in post #8, assuming you used Wubi to install Xubuntu 11.10).


How to build curl with the latest openssl?

You need to specify the directory where OpenSSL is installed (your symlink is neither necessary nor sufficient)

./configure --with-ssl=/usr/local/ssl

EDIT: Alternatively, you can set your PKG_CONFIG_PATH environment variable (as suggested by ./configure --help):

PKG_CONFIG_PATH=/usr/local/ssl/lib/pkgconfig ./configure


In addition to what the OP describes, my do-release-upgrade was interrupted by this issue.  Josh.F's comment did the trick for me:

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get -f install

That fixed gcc-5 for me and then I still needed to sudo apt-get upgrade


How to set password-less ssh login for multiple remote severs?

Why my public key can't be saved as /root/.ssh/myvps.pub?

Your keys can be saved with any name you'd like.  However, the ssh client will only automatically search for a few standard names, id_rsa, id_dsa, id_ecdsa, or id_ed25519.  If you want to save it under any other name, you need to specify the file name either on the command line:

ssh -i ~/.ssh/myvps root@vps_ip2

or in your ~/.ssh/config file:

Host vps_ip2
    IdentityFile ~/.ssh/myvps
    User root


Apple Keyboard fn not working with Bluetooth but works with USB

The fn key on my Apple bluetooth keyboard model A1644 would turn down the screen brightness (keysym was XF86MonBrightnessDown).  My interest was to change tabs in Firefox with Ctrl+PageDown and Ctrl+PageUp which requires fn and the up/down arrows for (PageUp/PageDown).  The solution (inspired by this exchange) was to change fn to a modifier key (Shift, AltGr, or Shift+AltGr) and then set the corresponding keysym for the up/down arrows.  I used xev to figure out that the keycode for fn is 232 (and 111 and 116 for up and down arrows, respectively).  As mentioned in the link, the first keysym (character or function key name) after the equal sign is the one corresponding to the bare key, then comes the one corresponding to the key with Shift, then AltGr, and finally with Shift+AltGr.  Then I used the following for mapping and setting up modifier:

xmodmap -e 'keycode 232 = Mode_switch'
xmodmap -e 'keycode 111 = Up Up Prior'
xmodmap -e 'keycode 116 = Down Down Next'

Instead of the up (111) and down (116) arrows, you could use this for F1-F12.


Ubuntu doesn't automatically starts in graphical mode after upgrade to 11.10

I had the same behaviour with my Lenovo Ideapad Y560p running 11.10. First install went fine but after restarting it didn't boot the GUI.

The issue was to do with the graphics driver. In the kern.log file I found the message "failed to load module "fglrx"". Which is the ATI Catalyst driver for linux.

So I did a "sudo apt-get install fglrx" . It installed the driver and now it boots up every time.


Open your terminal and run the command:

$ sudo update-grub

This will update GRUB and show you a list of all the OSes installed. You should see  options like Ubuntu 18.04, Windows 10, etc.


Why does my Firefox profile folder keep showing up in Recently Used (files/folders)?

The Gtk File Open Widget does not look into the Privacy settings when logging or displaying the "Recently Used" folders.

To manually remove the entries and disable entries, you have have a look at this Webupd8 blog post


Run the following commands in Terminal:

sudo dpkg --add-architecture i386
sudo apt update
sudo apt install libcurl3:i386

Source: Google and guesswork. This gist confirmed what I thought.


how to mount with udisks to specified directory

udisks won't mount your partitions like this. Moreover if you want persistent mount I'd suggest to edit /etc/fstab to add:

UUID=YOUR_OWN_PARTITION_UUID /media/AUX/ ext4 defaults 0 0

Note: edit /etc/fstab using sudo as it requires root privileges

Then reboot to see your drive / partition properly mounted


How do you install Intel video drivers for a Toshiba Satellite A665-S6086?

You shouldn't need to install any video drivers for this computer. AFAIK this is an integrated i3 GPU and it should work out of the box in 11.10. If it doesn't then this is some kind of bug.

You can run this command to discover what driver are you running:

lshw -c video

There should be a line that this one:

configuration: driver=i915 latency=0

That means that I'm using the i915 driver in my computer.

Why are you trying to install drivers?. Do you notice any problem?.


You can find packages containing a file using the web interface http://packages.ubuntu.com

Here's the result for all packages containing Xlib.h:

http://packages.ubuntu.com/search?searchon=contents&keywords=Xlib.h&mode=exactfilename&suite=trusty&arch=any


Can I automatically purge every package I've ever uninstalled?

A simpler alternative, using aptitude (not installed by default)

sudo aptitude purge '~c'

~c is an aptitude search pattern, it means 'Select packages that were removed but not purged'. (The single quotes are to prevent the possible expansion of ~c by the shell as the home directory of a user c.)

Note that purging will remove system configuration files, usually located in /etc, but personal configuration files, usually in some hidden directory in your home, are not removed (it is not always simple to know which they are).


What is a "Failed to load module "module-ladspa-sink"" error?

I found this blog post with the same error  and an explanation:

  A few days ago I started having issues with the equalizer that is, no sound. I removed the equalizer as well as ladspa-sdk. I promptly forgot about the whole thing until I rebooted and my machine began running super slow. Checking in syslog I found stuff like this:

pulseaudio[3662]: module-ladspa-sink.c: Failed to load LADSPA plugin: file not found
pulseaudio[3662]: module.c: Failed to load module “module-ladspa-sink” (argument: “sink_name=ladspa_output.mbeq_1197.mbeq master=alsa_output.pci-0000_05_00.0.analog-stereo plugin=mbeq_1197 label=mbeq control=-0.2,-0.2,-0.2,-0.2,3.5,3.5,3.5,3.5,3.5,3.5,3.5,2.5,2.5,0.0,0.0″): initialization failed.
pulseaudio[3662]: main.c: Module load failed.
Failed to initialize daemon.
pulseaudio[3660]: main.c: Daemon startup failed

  Clearly the equalizer had left something behind when I removed it. Turned out the problem was in ~/.pulse/default.pa. The file had been modified in the install and not removed with it. The offending lines were at the end of the file. They looked like:

### Generated from: pulseaudio-equalizer
load-module module-ladspa-sink sink_name=ladspa_output.mbeq_1197.mbeq master=alsa_output.pci-0000_05_00.0.analog-stereo plugin=mbeq_1197 label=mbeq #control=-0.2,-0.2,-0.2,-0.2,3.5,3.5,3.5,3.5,3.5,3.5,3.5,2.5,2.5,0.0,0.0
set-default-sink ladspa_output.mbeq_1197.mbeq
set-sink-volume alsa_output.pci-0000_05_00.0.analog-stereo 65536
set-sink-mute alsa_output.pci-0000_05_00.0.analog-stereo 0
### END: Equalized audio configuration

  I commented out all lines shown by adding a # at the beginning of each line and saved the file. Problem solved.

So in short:

sudo nano ~/.pulse/default.pa

scroll down to the line shown in the quote and add a # in front of all the lines. Save and exit.

In newer versions, this file could also be at ~/.config/pulse/default.pa.


Only 4GB RAM out of 8 shown in Ubuntu 12.04 LTS 64 bit and in BIOS

If the BIOS shows only 4GB, it's a hardware problem. One of your chips is not working, or quite possibly, one of your chips is not properly seated. (Or you actually have 4GB.)

Under Linux, the command sudo dmidecode -t 6 (from the dmidecode  package) will tell you which memory banks have a chip connected and what size chip. If some banks are reported empty but you think there is a chip in them, take the cheap out and insert it back, making sure to seat it properly.


How to create an android html app easily?

You can use phonegap with any editor you like, Sublime-text, Brackets, Eclipse etc.

For a more gui like design tool take a look at http://xdk-software.intel.com/


Can't set permissions for files on an NTFS partition

NTFS doesn't support the execute permission because it's designed for Windows, which doesn't have the same concept of "executable" files as Linux does. If you're trying to run Windows .exe files in Wine, it should still work if you run wine explicitly, like this:

wine /path/to/executable.exe

If you do need to execute files directly, you can set the permissions that will be applied to all files with the fmask option in /etc/fstab. You may also need to add the exec option if that's not the default for NTFS (I don't have a drive handy to check right now). The value for fmask tells the driver which bits to turn off, so, for example, to allow read, write, and execute for all users, you should have something like this:

/dev/hda1  /mnt/windows  ntfs-3g  defaults,exec,fmask=000  0  0

If there's already an fmask option, the simplest way to turn on the execute bit is to subtract 1 from any digit that's odd.

If you don't know how permission masking works, the basic idea is that the read, write, and execute permissions are represented by the values 4, 2, and 1 respectively. You can add them together to combine permissions so, for example, reading + writing would be 6. The permission mask is a combination of three digits that apply to the owner, group, and "others" (everyone else).

Just remember that fmask (also, umask and dmask) in fstab are the permissions you want to turn off.

As a slightly more interesting example, this would set the permissions to "rwx" for the owner, "rx" for the group, and "r" for everyone else:

/dev/hda1  /mnt/windows  ntfs-3g  defaults,exec,fmask=023  0  0


dpkg-checkbuilddeps: Unmet build dependencies: libutouch-grail-dev (>= 1.0.20) libutouch-geis-dev (>= 2.0.10)
dpkg-buildpackage: warning: Build dependencies/conflicts unsatisfied; aborting.

libutouch-grail-dev is one of the build dependencies, but you have not installed it. Do:

apt-get build-dep unity

Your second error happens because the package build failed, so you do not have a built package. You can not install a package that you do not have.


How to close/end/terminate an accidental "if" in the terminal?

Use Control-D in cases like this.

You've gotten stuck in a bash shell if conditional control structure.

This is the output I see:

$ if
>
> '
> "
> sdf
> )
> []

Control-D

  bash: syntax error: unexpected end of file


Ubuntu automatically installed a previous kernel version than the one I installed

If you do not want apt to upgrade the 3.13 kernels, remove meta packages by

sudo apt-get remove linux-image-generic linux-headers-generic

If you want to get updates for the 4.2 kernel, install the meta package for it by

sudo apt-get install linux-generic-lts-wily

The 4.2 is shipped with Ubuntu 14.04.4 by default. You have older meta packages because you installed Ubuntu before 14.04.4 has been released, or installed linux-image-generic manually following some guide.


From the comments...

You have a 1TB external HDD that used to work fine on your old laptop, but fails to operate properly on your new laptop.

The 1TB external drive requires more power than one USB port can supply. (More so than a 500GB drive).

Either utilize the double USB cable supplied with the external HDD, or connect an external power supply to the external HDD (if it supports it), or obtain a POWERED USB hub.


Quick format of USB drive or external HDD

A simpler option than Gparted is Disks
from terminal:
gnome-disks

or from GUI:
System tools > Preferences > Disks


Can't login after upgrading graphics card

Generally you should use the drivers from the official Ubuntu repositories.
But install the latest official NVIDIA drivers 358 from the GPU Drivers PPA.
These drivers are known to work well with new NVIDIA GEFORCE GTX 960.

Highlight the Ubuntu entry in the GRUB boot menu and press the E key.
Add nouveau.modeset=0 to the end of the linux line - press F10 to boot.

On login screen press Ctrl+Alt+F1 ... enter user name and password.

Then execute the following commands :

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


I have no idea what your problem is. May the USB key is dead ?

If you're desperate, you could try the drivers available from https://github.com/lwfinger/rtlwifi_new via the PPA at https://launchpad.net/~hanipouspilot/+archive/ubuntu/rtlwifi

This is the driver from realtek, updated and patched, with fixes.

First, uninstall the realtek driver (sudo make uninstall ? and remove blacklist file in /etc/modprobe.d). Then,

sudo add-apt-repository ppa:hanipouspilot/rtlwifi
sudo apt-get update
sudo apt-get install rtl8192cu-dkms


You can still partition your disk if you have that much space free. However, you won't be able to move the Windows partition up to the front of the drive after installing it. The best way to go would be to buy an external hard drive and move your files onto it before installing Windows over the whole disk; otherwise, you can use this method but will be limited to those 70 free GB.

Open a terminal and

sudo apt-get install gparted

You can, at this point, use gparted (running as root) to shrink your Ubuntu installation to its minimum size. If you really want to maximize the amount of free space, you can uninstall programs and delete files you don't need (again, I would strongly suggest backing up) and then do the shrink.

After you shrink, you can install Windows 7 to that empty space, but I'd advise printing this first so you can recover any more files you might need. Hope this helps.


How 'juju deploy' on dedicated OpenStack availability zone/aggregate in non-MAAS environment?

The deploy command allows for zone placement.

Here is the example from the 'juju deploy --help' command:

juju deploy mysql --to zone=us-east-1a
(provider-dependent; deploy to a specific AZ)

I believe that zone placements work with openstack, so targetting zone=testing should work.


Redirect existing windows via SSH and X11 forwarding?

It looks like xpra is an active successor to xmove, and does exactly what you want. The devs bill it as "screen for X clients". While it needs to run on your remote server, it runs just fine out of a home folder. Besides python, xvfb is a runtime dependency.

Once you get it installed on the remote server, it's pretty easy to use.

xpra start :8 --start=xeyes

On your local machine, run:

xpra attach ssh:YOURSERVERHOST:8


Disable SSLv3 in Apache2 on a clean install of ubuntu 14.04.1 Server

I found that I had other config files which overrode the option.

It was possible to find the files by running:

cd /etc/apache2
grep -r "SSLProto" .


Try installing i.e upgrading it from terminal. Open a terminal with Ctrl+Alt+T keyboard combo and use these commands:

sudo apt-get update
sudo apt-get install cairo-dock

This will solve your problem.


How to get dark color chema for kdevelop?

I had to install Kubuntu to do so. I am sure that a special customization of the colors in the Ubuntu may lead to something similar (see this for some ideas), but did not try.


It is due to the fact that the message is repeated x number of times. You will see the time stamp of the first message, which apparently is repeated 14 times with 6 seconds in between, thus showing up 84 seconds (and a bit) later in the log.Generally, if you look at the output of grep -a3 -b3 repeated /var/log/syslog you will see that the repeated message has a different time stamp from those before and after.


Unity intercepts drag and drop file uploads to webpages

I had the same problem with chromium when i want to upload files with drag and drop.

I suggest you do this trick: start drag your file and select the Chrome window with Windows(Super)+Tab. Finally it will focus you the chrome window and hide the Unity Launcher, so you will be able to drop your file correctly.


Make a test folder such as usbmount under /:

sudo mkdir /usbmount
and change

UUID=E89AF5299AF4F542 /usbmount ntfs defaults,users 0 0

and sudo reboot or     sudo mount -a

In a nutshell avoid these kind of strings such as /media/username/f6c682f3-5271-4f2b-99e8-93aa3bd39990/ in fstab previously i had such a bad experience with such strings i.e samba share not working under such strings.


Can't install Ubuntu from an USB stick: AE_NOT_FOUND, AE_ALREADY_EXISTS

As per this Arch Linux thread it's not an error:

These kinds of "errors" have been discussed ad nauseam, it's simply
the kernel telling you that the ACPI information received from the
system seems to be incomplete in some way, update your BIOS/UEFI in
hopes for a proper fix or ignore the error if you don't notice
anything off with your system.
(And please don't do something dumb like setting acpi=off just to get
rid of these messages)

What is causing the freeze is AFTER the ACPI messages
Below is a "good" boot log. What you need to figure out is which program after the ACPI entries is causing the lock up:
Aug 11 15:28:35 alien kernel: [    0.004000] pid_max: default: 32768 minimum: 301
Aug 11 15:28:35 alien kernel: [    0.004000] ACPI: Core revision 20170531
Aug 11 15:28:35 alien kernel: [    0.025175] ACPI Error: [\_SB_.PCI0.XHC_.RHUB.HS11] Namespace lookup failure, AE_NOT_FOUND (20170531/dswload-210)
Aug 11 15:28:35 alien kernel: [    0.025179] ACPI Exception: AE_NOT_FOUND, During name lookup/catalog (20170531/psobject-252)
Aug 11 15:28:35 alien kernel: [    0.025206] ACPI Exception: AE_NOT_FOUND, (SSDT:xh_rvp10) while loading table (20170531/tbxfload-228)
Aug 11 15:28:35 alien kernel: [    0.032753] ACPI Error: 1 table load failures, 9 successful (20170531/tbxfload-246)
Aug 11 15:28:35 alien kernel: [    0.033477] Security Framework initialized
Aug 11 15:28:35 alien kernel: [    0.033479] Yama: becoming mindful.
Aug 11 15:28:35 alien kernel: [    0.033493] AppArmor: AppArmor initialized
Aug 11 15:28:35 alien kernel: [    0.034589] Dentry cache hash table entries: 1048576 (order: 11, 8388608 bytes)
Aug 11 15:28:35 alien kernel: [    0.035039] Inode-cache hash table entries: 524288 (order: 10, 4194304 bytes)
Aug 11 15:28:35 alien kernel: [    0.035066] Mount-cache hash table entries: 16384 (order: 5, 131072 bytes)
Aug 11 15:28:35 alien kernel: [    0.035081] Mountpoint-cache hash table entries: 16384 (order: 5, 131072 bytes)
Aug 11 15:28:35 alien kernel: [    0.035221] CPU: Physical Processor ID: 0
Aug 11 15:28:35 alien kernel: [    0.035222] CPU: Processor Core ID: 0
Aug 11 15:28:35 alien kernel: [    0.035226] ENERGY_PERF_BIAS: Set to 'normal', was 'performance'
Aug 11 15:28:35 alien kernel: [    0.035227] ENERGY_PERF_BIAS: View and update with x86_energy_perf_policy(8)
Aug 11 15:28:35 alien kernel: [    0.035228] FEATURE SPEC_CTRL Present


Can I prevent myself from deleting a file?

Deleting a file is an operation on the containing directory. If you don't have write permissions on that directory, you cannot delete files within it. Note: you won't be able to delete any file within it.


Well, after extensive research on my own, I guess, there is no such a tool...

However, for what it's worth, I did discover hxnormalize which made writting a particular script I needed, a relatively simple matter.


Is it possible to customize a removable drive launcher/quicklist?

This is currently not possible because the menu items are hardcoded.

However, if you think that feature should be discussed, you can write a mail to the Ayatana mailing list and elaborate on why it should be included. :)