You will need root privileges for any the following. To get root, open a terminal and run the command
sudo -i

and the command prompt will change to '#' indicating that the terminal session has root privileges.
Alternative #1: Add commands to /etc/rc.local
vi /etc/rc.local

with content like the following:
# This script is executed at the end of each multiuser runlevel
/path/to/my/script.sh || exit 1   # Added by me
exit 0

Alternative #2: Add an Upstart job (for systems older than 15.04) (not recommended)
Create /etc/init/myjob.conf
vi /etc/init/myjob.conf

with content like the following
description     "my job"
start on startup
task
exec /path/to/my/script.sh

Official statement from upstart website ->  "Project is in maintaince mode only. No new features are being developed and the general advice would be to move over to another minimal init system or systemd."
Alternative #3: Add an init script (obsolete)
Create a new script in /etc/init.d/myscript.
vi /etc/init.d/myscript

(Obviously it doesn't have to be called "myscript".)  In this script, do whatever you want to do. Perhaps just run the script you mentioned.
#!/bin/sh
/path/to/my/script.sh

Make it executable.
chmod ugo+x /etc/init.d/myscript

Configure the init system to run this script at startup.
update-rc.d myscript defaults


Ubuntu 14.04 home server won't connect via ethernet after moving

I suggest that you edit your /etc/network/interfaces file to read something like this:

auto lo
iface lo inet loopback

auto p10p1
iface p10p1 inet static
address 10.0.0.101
netmask 255.255.255.0
gateway 10.0.0.1
dns-nameservers 8.8.8.8 10.0.0.1

Reboot and check to see if you are connected:

ping -c3 10.0.0.1
ping -c3 8.8.8.8
ping -c3 www.ubuntu.com

If you get ping returns from all three, you are all set.


I think that if you create a ssh key without protecting it with a "passphrase", you can skip the keyboard interactive part and thus easily create the upload script you need. See for example here :

ssh-keygen -t rsa -C "Your Name" -f your_key

This will create the necessary files, you then just have to copy the public one (*.pub) on the remote server.


TL;DR Yes.

Ubuntu Security Team will support whatever PHP they have in the LTS releases.  They already do that for PHP 5.4 in Ubuntu 12.04 LTS.  You have to count on the fact, this will not include all security issues, but only those critical enough (such as remote unauthenticated vulnerabilities).


When I use some themes my menu tabs become white. How can I fix it?

Depending on how you installed this theme, the control file could be in one of the following directories:

/usr/share/themes/Numix/

or

~/.themes/Numix

Now, assuming Lubuntu uses the openbox-3 theme settings from numix: the config file should be either here:

/usr/share/themes/Numix/openbox-3/themerc

or

~/.themes/Numix/openbox-3/themerc

You will have to figure out which value to change and what to change it to.

Also, it could be one of the color settings in your .gtkrc file or /usr/share/themes/Numix/gtk-3.0/gtk-dark.css or something similar.

All color values are in hex values from 000000, which is red 00 green 00 blue 00 (black), all the way up to ffffff, which is red ff green ff blue ff (white).

0123456789abcdef

It looks like dcdcdc might be the one you need to change but i'm not sure because that one was for alot of text IDK. Use something like gimp to figure out the color values.

also, on xubuntu, you can set those to show only the icon of the windows instead of the icon and title like you have shown


If you have an Nvidia card in your system, this could be the G-Sync visual indicator. It's something that is seen rarely, but can be an issue. To resolve it, follow these steps:

Open your Nvidia X Server Settings panel (or nvidia-settings from terminal)
Go to "X Screen 0" ⇢ "OpenGL Settings"
Uncheck the "G-Sync Visual Indicator"

Hope this helps.


Yes it is possible to download packages without installing them. This is often used in cases where internet access on another computer is not available, and one needs to be able to sideload the packages onto the machine. Here is what you do:

Remove any packages currently saved in the cache by running sudo apt clean.
Include --download-only in the command, e.g: sudo apt install --download-only <NameOfPackage>. This also works for multiple packages, e.g: sudo apt install --download-only <package1> <package2> <package3>

All packages downloaded via this method will be saved in the /var/cache/apt/archives directory. You'll be able to copy them to your desired location or leave them there for future sudo apt install operations.


After trying and failing to get it to work with a combination of xbindkeys and xvkbd/xte (I could never get certain characters {, [, ], }, \, etc. to behave properly, perhaps because I use a Scandinavian keyboard layout), I finally found a simple and practical solution: Autokey. Here are the exact instructions to get it working:

Install Autokey through Ubuntu Software (I used the GTK-version, not KDE) or by: sudo apt-get install autokey-gtk.
Configure one script per key, e.g. for { use this code: keyboard.send_keys("<alt_gr>+7") and set the hotkey to Ctrl+Alt+7 (first set hotkey to 7 then add Ctrl and Alt as modifiers). This at least worked for the most important code-writing keys: { [ ] } \.
Add autokey to Startup Applications (search for “start” to find it) and then add a program with “autokey” as the command.

This solution will work for anything running in the current X-session (I think) but will not work if you start a new terminal session using Ctrl+Alt+[F2-F6].


How to discover workstation or server is installed

Just the set of packages installed. You can start off with an Ubuntu Server installation and install ubuntu-desktop package to get the desktop OS. There is no guarantee that the absence of a *-desktop package implies a server OS, or that the presence of X11 implies a desktop OS.


Was this theme reviewed and made official by Ubuntu themselves?

If no additional apt repository needs to be added, then it means it is in the standard repository, yes.

On 16.04:

#: apt-cache policy numix-gtk-theme
numix-gtk-theme:
  Installed: (none)
  Candidate: 2.1.2-0ubuntu1
  Version table:
     2.1.2-0ubuntu1 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu xenial/universe i386 Packages

However, this does not necessarily it has had any special review. It simply means that someone in Debian or Ubuntu volunteered to maintain a package in the archive. It will not necessarily be the latest version, depending on the version of Ubuntu you're using.


Ubuntu server 12.04 use apt-get to update but error

bizip exit code 2 means corrupted file .

man bzip2

.... to indicate a corrupt com‐pressed file, 3 ... ( line 76 )

i suggest you to check another source

direct download : http://archive.ubuntu.com/ubuntu/pool/main/l/linux/linux-image-3.2.0-40-generic_3.2.0-40.64_amd64.deb


Screen turns after off after a couple of minutes

Well I assume you are using some brand of laptop having backlight issue in ubuntu, probably emachines(old acer) laptops shows off. I recommend you to create file and add contents as follows.

Become Root .

sudo -i

Create a new file

gedit /etc/pm/sleep.d/99_backlight

Enter the following contents in it.

  #!/bin/sh
   #run 'setpci -s 00:02.0 F4.B=00' when waking up

case "$1" in
        thaw|resume)
           setpci -s 00:02.0 F4.B=00
            ;;
esac

Save the file.
Make it executable

sudo chmod +x /etc/pm/sleep.d/99_backlight

Reboot your system.

sudo reboot


Why does my VLC window show weird fonts?

Tools >> Preference

Set Subtitle Language >> Default Encoding to

System codeset or Universal (UTF-8)

In my case, VLC 2.2.2 it works fine.

Best Regards,


Use the following steps to solve your problem:

Boot from a live CD/USB, and choose try without installing.
Open the dash once you are in the desktop, and type gparted and open the app. It will take a while to find all the partitions so be patient.
Right-click and choose move and drag and drop the Linux swap onto the small partition all the way at the right.
Right-click on the Ubuntu partition and choose resize and drag one side all the way to take up all of the unalocated space.

You're done!


I would recommend Artha, It is an Offline dictionary, I find it really comprehensive and it also suggests you synonyms of the word you are looking up.
You can download Artha from Ubuntu Software Centre.

  Artha is a free cross-platform English
  thesaurus that works completely
  off-line and is based on WordNet

Website: http://artha.sourceforge.net


I needed to add vers=1.0:

sudo mount -t cifs -o username=mediadrive,vers=1.0 //192.168.1.1/MediaDrive /mnt/MediaDrive


Launch terminal from bash and run program?

Does this work?

gnome-terminal -e ranger


There is something better already in the manual of zip, that makes use of find

man zip

Modifying it a bit it becomes

find . -type f -exec zip source {} \;

You can use it after a cd to the folder you want, or you can substitute the . with it, like

find ~/Downloads/ -type f -exec zip source {} \;


Ubuntu 12.04 Synaptic tooltips are white on yellow

Change the superuser's theme, and/or ensure that the theme you want (without the ugly tooltips) is installed in /usr/share/themes so that it will be in the same location for the superuser as for your normal account and the superuser can use it upon starting.


In the terminal navigate to /home/$USER/Documents/ and type :

ls -la

to see if you can spot those missing folder(s).

To navigate to the folder names /home/$USER/Documents/New Folder_A/New Folder_B type the following in the terminal:

cd "/home/$USER/Documents/New Folder_A/New Folder_B"


Can I upgrade 10.04 to 12.04.1 with the desktop image?

YES.

If was always intended that the point-release (Ubuntu 12.04.1 LTS) would allow you to update from 10.04 LTS to 12.04 LTS.

However, if you simply run the install it will try to do a fresh install of 12.04.1 LTS.

If you insert the disk (or USB), does it not prompt you to upgrade to 12.04?

(Sorry, I haven't tried this recently on 10.04 LTS.)


High-End Ubuntu Desktop Still Feels not as smooth

Here are a few tips and tricks to make ubuntu much more responsive.

Change Swap
gksudo gedit /etc/sysctl.conf

Add this entry at the end and save:
vm.swappiness=10

Remove bloatware
https://fixubuntu.com/
wget -q -O - https://fixubuntu.com/fixubuntu.sh | bash

Get the following Tweak Tools:
Ubuntu Tweak ( sudo apt-get install ubuntu-tweak )
Tweak Tool ( sudo apt-get install gnome-tweak-tool )
Unity Tweak ( sudo apt-get install unity-tweak-tool )
Dconf Editor ( sudo apt-get install dconf-tools )
Compiz Config Editor ( sudo apt-get install compizconfig-settings-manager compiz-plugins-extra -y )
Review each section of each tool and modify as desired

Get Bleachbit
I suggest downloading the newest version as the one in the repository(Software Center) is old.  You can download it here:
http://bleachbit.sourceforge.net/download/linux

Review the following sites and modify your system as needed.
https://sites.google.com/site/easylinuxtipsproject/first#TOC-Decrease-the-swap-use-very-important-
https://sites.google.com/site/easylinuxtipsproject/speed
http://www.techsupportalert.com/content/best-free-software-linux.htm?page=0,0#Introduction
http://smashingweb.info/things-to-do-after-installing-ubuntu-14-04-lts-for-perfect-desktop/
http://ubuntuforums.org/showthread.php?t=140920
http://www.techsupportalert.com/content/tips-and-tricks-ubuntu-after-installation-ubuntu-1404.htm

Check FPS
Open terminal, type glxgears and hit enter.
Hope this info helps a bit.
One other awesome tool I use is CPU Indicator
Open Terminal and install:
sudo apt-get install indicator-cpufreq
Then run:
indicator-cpufreq in terminal to launch
Reboot! You will see the icon in the top bar of unity interface.
Right click icon and select the fastest CPU speed or desired speed! This tool is AWESOME and will help a TON!


A Virtual?...Desktop? question....(wondering if this is possible)

Yes, but there are things you should be aware of. At least in the past, switching hardware for Windows has caused issues. That means you'd either always run Windows virtualized or always on metal. However, this is very rarely an issue with Ubuntu. I don't know what the situation is with Windows 10.

So what you can do, is to have Windows on one drive and Ubuntu on another. Then you can create a VirtualBox VM definition that uses the Ubuntu drive directly as a raw device. That way you can choose whether to boot it on metal or as a virtual machine while running Windows. However, you must not boot the VM while Ubuntu is running, or you'll break your system.

I've always done this with separate physical disks and it works quite well. I'm not sure if it's possible to do the same using different partitions on the same disk, but I wouldn't recommend it, or at least you should investigate it thoroughly before you make an attempt. Having two OSs accessing the disk directly at the same time is a very bad idea.


No Boot Device Found on partitioned laptop after Windows 10 upgrade

Why not use your Ubuntu USB stick to do a reinstall, DO NOT format anything - install ubuntu onto itself, so everything is kept as it was. Now set Grub2 to install on SDA no number, and let grub find your Windows and create a boot option for that too. That should do it! I know there is a way of rescuing Grub, but I have not been lucky trying that so far.


You may only be missing the actual encryption method, which seems to be specified in the

  [Server&PPTP  2.8]

and

  [Server&PPTP  2.8 Tunnel]

blocks from your example. This should roughly translate to the Advanced window in nm-applet's PPTP VPN configuration:

I'd suggest first trying to enable MPPE and keeping all other options as default (so that it enabled MPPE, which offers encryption, and MSCHAP-type authentication methods, which are enabled in your example for the PPTP 2.8 section). If it doesn't work, disable all the authentication options but PAP, so that things would equate to about the same as the "PPTP 2.8 Tunnel" section in your example.

If it's any use, there is now a bug open on Launchpad about supporting the import of CMS-type configuration in NetworkManager: bug 711282


I think that there is a solution on Ubuntu website. If you have your desktop or laptop computer, then you can try this, but it is not stable and any few devices are supported...

Here is the supported devices:
https://wiki.ubuntu.com/Touch/Devices

And here is the way to install ubuntu for phone:
https://developer.ubuntu.com/en/phone/devices/installing-ubuntu-for-devices/


You don't, you extract the file to a directory then run the executable file located in the directory, eclipse.

I have my running out of the Downloads directory under the folder eclipse. It's all Java based itself, so it doesn't require an actual installation to anywhere but your user folder in linux. On first run it will ask your for the workspace folder in your user directory, select it. Then to move to another machine just copy this folder and the workspace folder and run there, your good to go.

http://wiki.eclipse.org/Eclipse/Installation#Install_a_JVM


filter packages that can be reconfigured with dpkg-reconfigure

You should be able to use

debconf-show --listowners

From man debconf-show:

   --listowners
       Lists all owners of questions in the database. Generally an owner
       is equivalent to a debian package name.

"having questions in the database" is equivalent to "being reconfigurable" I think.


Uninstalling ubuntu from one hard drive and installing on another

Copy the partitions over to the other disk.  Boot.  Update-grub so it sees both as bootable.  Fix your fstab on the second one.  Make sure it's only using the second disk with df.  Once it's working delete the old partitions.


How about dd? Probably the original "ghost" program.


Ubuntu 18.04 freezes randomly after RAM and SSD upgrade

There is a good chance that your system is looking for free swap space that does not exist.

When this happens, the system will grind to a halt as the system constantly pages your storage device for swap space that is not there.

There are two things causing this to happen.

1 - Your swappiness is set too high. For a solid state drive with 16 GB of RAM, you don't need to set your swappiness to 60.

Run the following command to set your swappiness to 10:

echo 'vm.swappiness = 10' | sudo tee -a /etc/sysctl.conf

To change your swappiness in the future you can edit the file /etc/sysctl.conf or you can use sed. The following example will change swappiness from 10 to 20:

sudo sed -i 's/swappiness = 10/swappiness = 20/g' /etc/sysctl.conf

Run the following command to apply the changes:

sudo sysctl -p

You can play around with this setting. You may do better with setting swappiness to 20 or higher using a solid state drive as the system will be able to take advantage of cached RAM. Personally, I have about 5GB of RAM with a solid state drive and 10 works fine.

2 - You can also increase your swap space to free up more RAM. Right now, you have 16 GB of RAM which is a lot. However, you don't have much swap space. This can cause the system to slow down when RAM usage is too high.

Use the following commands to increase the size of your swapfile:

sudo swapoff -a
sudo dd if=/dev/zero of=/swapfile bs=1M count=8192
sudo mkswap /swapfile
sudo swapon /swapfile

this will set your swapfile to 8 GB. To set your swapfile to 16 GB you can increase count=8192 to count=16384. Use count=4096 reset the size back to 4 GB.

You will not need 16 GB of swap space for RAM unless you use hibernation. If you use hibernation, it is recommended you set your swap space the same size as your RAM. The recommended minimum for 16 GB of RAM on a system that does not use hibernation is 4 GB.

Also, when your swappiness is set to a lower number, the size of your swap file becomes less important.

EDIT

I just checked your laptop model and it says that you have Nvidia graphics. Run the following commands to install the Nvidia drivers:

sudo apt update
sudo ubuntu-drivers autoinstall

Reboot to apply the changes.


I found an answer to my question by diving into the official Ubuntu documentation related to restricted formats.

As mentioned there, I resolved the problem by running:

sudo apt-get install ubuntu-restricted-extras

I restarted Ubuntu and everything is working fine.

Hope this can help someone else in the future.


How to reset scale menu size back to default?

Try holding ALT and move the windows by dragging it while holding ALT, this will allow you to move the windows out of bounds.


Ubuntu Wifi drivers not working after getting update

The version of the Broadcom driver that matches your running kernel 4.15.0-xx is 6.30.223.271+bdcom-0ubuntu4. Because you started with and still have the apt repositories for Ubuntu 16.04, the system tries to install an earlier version; viz:

  Unpacking bcmwl-kernel-source (6.30.223.271+bdcom-0ubuntu1~1.2) ...

Please open a terminal and do:

wget http://mirrors.kernel.org/ubuntu/pool/restricted/b/bcmwl/bcmwl-kernel-source_6.30.223.271+bdcom-0ubuntu4_amd64.deb
sudo dpkg -i bcmwl-kernel-source_6.30.223.271+bdcom-0ubuntu4_amd64.deb

Reboot.


First of all: If it's a production server. Don't do it. Installing a GUI will slow performance and may open more security holes. Also never develop directly on a production server.

Secondarily: If anyone sees this prior to installing Ubuntu Server, you should probably install the desktop version of Ubuntu instead and then install the server-services, since that's quite a lot more well documented and you're probably not going to run Eclipse on a dedicated (production-)server anyway.

And now the answer:

First install the ubuntu-desktop package with # apt-get install ubuntu-desktop (do this as root, or by prepending sudo to the command), then reboot your computer and install eclipse as you would on any other Ubuntu computer.

See section one on http://www.ubuntugeek.com/install-gui-in-ubuntu-server.html for more detailed instructions


Permission Error copying files into Ubuntu on Windows with Windows copy/paste

You should not be manually copying data into the WSL installation from Windows - it will give you this permissions error when you do this.
 Rather, you should be copying from windows into WSL from within the WSL environment instead.

The Windows C drive is located at /mnt/c within WSL.  If the scripts are located in C:\Users\username\My Documents\Python\ then you can do the following from within WSL to copy the scripts into the Ubuntu environment:

cp /mnt/c/Users/username/My\ Documents/Python/*.py ~

This will copy the data in and retain permissions so it works properly within the Windows subsystem for Linux.  This also saves you from having to chmod typically.


some files in shared drive between Windows 10 and ubuntu gone

When Windows deletes files, it puts them in the trash.  I am guessing you looked in Windows trash and didn't find them.  You could search for them from within Ubuntu with the following commands.  Since you say the drive is shared I am assuming an NTFS file system.  If it is not, these command will not work.

Run this command and save the output to a file:

sudo ntfsundelete /dev/sdxx (where sdxx is the windows drive/partition you want to undelete from such as sda1.)
This produces a list of deleted files.  The list may be very long.

Read through the list to select the id (or ids ex: 123-176) of the files you want to undelete. Use the command:

ntfsundelete /dev/sdxx -u -i id# (change xx to your drive/partition and id# to the ID of the file to undelete)

Here is an example for sda1 using a range of IDs to undelete:

ntfsundelete /dev/sda1 -u -i 4775-4786


I suggest installing libinput instead of using xorg-synaptics.

lininput is available in Ubuntu 15.10 repositories. Install it by running

sudo apt-get install xserver-xorg-input-libinput

By default tapping is disabled in libinput. To enable it. you need to edit /usr/share/X11/xorg.conf.d/99-libinput.conf and add

Option "Tapping" "True"

to "InputClass" section, before EndSection.

In newer versions of libinput, e.g. available for Ubuntu 16.04, the file is called 90-libinput.conf and the file have a few sections.

In this case you need to add Option "Tapping" "True" to the touchpad section.


Postgis 2.3 on Ubuntu 16.04 Server without X11

If the package developer says his/her package depends on "x11, libgl, libpulse, libqt and others", believe him/her.

How would one use postgis without X11?


Ubuntu does not recognize my nVidia GPU driver

Ubuntu is recognizing your Nvidia video card driver otherwise it would not be able to activate it and you would not be able to have a 3D desktop.
It is System Info that is not recognizing the video card. It is my guess that this is because the Nvidia driver is proprietary code and not open source code.
I get the same information from System Info on my machine with Nvidia Geforce GT220. Accept this as the present situation regarding proprietary video drivers.
Last night I ran a test on a default install of 12.04 Beta 1. I deactivated the Nvidia driver and I re-booted. I got a 2D desktop running under the open source video driver called Nouveau.
In 12.04 System Info is called Details. The details of my graphic set up under Nouveau are:

Graphics: VESA:GT216 Board-0682vb12
Driver: 0682vb12 Experience:
Standard

Notice, that the graphic experience is listed as standard. This means 2D. In 12.04 you can confirm this by running System Settings>Appearence. If you see a method of adjusting the Launcher icon size, then you are in 3D. You do not get (at present) a method to adjust the Launcher icon size in 2D.
When I re-activate the Nvidia driver, Details (System Info) says:

Graphics: Unknown
Driver: Unknown
Experience: standard

The experience is standard even though I know I am in 3D mode. I can see the effects. Therefore I conclude that System Info at present cannot get information from a proprietary video driver because it is closed source code.
For your information, the video card that you have is a key component for having a good visual experience in any operating system.
You do not give us your hardware specifications. Does your video card have a powerful GPU (Graphic Processing Unit)? How much video memory is on the card itself? This can make all the difference to a user's visual experience.


Ubuntu resolution problem after updating on virtual box

I just had this problem as well.

In the past this trick worked:

  sudo apt-get install virtualbox-guest-*

This no longer worked for me with broken virtualbox-guest-x11 dependencies in 14.04.2.  Instead once I installed I did the following:

Update to latest VirtualBox version (4.3.12 to 4.3.26)
Start the vm
Select "Insert Guest Additions CD" from the Devices Menu and ran it
Restart

Screen resolution / zoom in virtual box now works properly.  I'm on a mac / osx yosemite.


You should edit /etc/locale.gen and comment the locales you don't want. Then run

sudo locale-gen

There does not exist any locale with the name en. The one you probably want to use is en_US.UTF-8 and not en_US. (The latter enables latin1 encoding.)


Error 500 with euca2ools UEC (enterprise cloud)

Can you clarify what you mean by, But when I visit "192.168.2.14:8773"....  As you shouldn't be visiting that URL from your browser.  It is to use against euca2ools application for controlling your cloud.


Changing the disk to partition when wanting to dual boot install

Exit the Ubuntu installer and open gparted partition editor from dash. If it's not installed by default then run the below commands to install gparted.

sudo apt-get update
sudo apt-get install gparted

Format your D drive into ext4 filesystem
Now run the installer, choose something else option to install Ubuntu on the created ext4 partition.


generic/include/config/rds/rdma.h': Not a directory

Finally I did it

Delete headers

sudo rm -rf /usr/src/linux-headers-4.4.0-51-generic

Reinstall headers

sudo apt install --reinstall linux-headers-4.4.0-51-generic

That's all that was needed.


If you have no idea where the file could be, you can search for it with the command

find / -name "your_file_name.docx" 2> /dev/null

which searches the whole disk and discards any error messages (like permission denied to access system folders). This can take some time...

If you don't know the exact name of your file either, you can search for all .docx files with

find / -name "*.docx" 2> /dev/null

To enter these commands, open a terminal with Ctrl-Alt-T


JBL bluetooth speakers play no sound, a2dp off?

I too do have the same JBL flip as yours and I do face the same issue, sometimes we dont hear any sound after pairing.

I am not an expert but after hit and trial: I realized you need to click on the  "bluetooth" icon on top right and choose "JBL FLIP" under scroll down and move tab to "Connection ON" and then test it by clicking on sound settings

** Short flow:

*blue-tooth icon>> JBL flip (after pairing)>> move tab to COnnection ON>> sound settings>> choose JBL flip>> Choose the mode HIGH Fidelity Playback (A2DP)>> "Test Sound"

You see a "Speaker Testing for headset" window.
Test it by hitting on the left and right (Front left and Front Right). You can hear the sounds on the JBL speaker.*

Note: Sometimes when you play Videos through VLC player and if you pause it for a short-while to take a break like say ten minintes. When you come back and hit play: you might not hear the sound on the JBL nor the computer speakers (Sometimes).
I just UN-pair and pair speakers: Do the same test. It works! :)

This is just a workaround.

Same problem when you connect a headphones- it doesn’t automatically detect, you will have to manually select it by the above path(** Short flow)- instead of option JBL Flip, select wired headset/headphones.

Hope this helps.


I had this same problem, as well as several other problems related to having multiple monitors.

It turns out this is an open unsolved bug for Ubuntu; meaning the solution link posted in the above comment does not actually contain a solution that fully works.  See open bug report here:
https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/1425000

Fortunately I spent a bunch of time figuring out how to configure this as well as the orientation of the login screens but that's explained in a different thread (I have four monitors and login orientation was wrong but it's all sorted now, if you also have this issue see solution here: Where does Unity/Unity-Greeter Load X Configuration From?)

The quick simple solution to the problem of not being able to set your default display, and/or the default display getting reset after reboot is to put a short shell command that changes the primary monitor as one of your "Startup Applications" which will automatically run every time you log in (this should work for any recent Ubuntu running the Unity display manager which is the default display manager and probably other DMs but I didn't test that):

1) First, you will want to install arandr to easily find your monitor display names, run this in a shell:

sudo apt-get install arandr --upgrade

2) Next, run the arandr command and look at it's user interface that loads (it will probably load on the wrong screen since you haven't configured anything yet).

3) Now, take note of which display (the names should be something like HDMI-# for hdmi or DP-# for display port, DVI-I-# for digital video, etc).  The label should be big and obvious once you run arandr. You can either write down the display name, or just keep arnadr window open, so you can see it, and launch a new shell if you need to for the next part.  My default display is called DP-4 used in the next example, but undoubtedly yours will be different so take note for the next step.

4) Next, load up the "Startup Applications" tool.  You can find it by going to the dash and typing "Startup Applications" and Ubuntu will find it for you, or you can run this command in a shell:

gnome-session-properties

5) Now, from within the Startup Applications tool, click the "Add" button and add a new program to run upon logging in.  A window will pop up asking you what to run, here is what to type:

Name: Set Default Monitor
(Note: put any name you want)
Command: xrandr --output DP-4 --primary
(Note: change DP-4 *to whatever monitor code you found you want to be the default display when you ran *arandr)
Comment: Leave blank or put a reminder for yourself later what this does.

Reboot to fully test it worked and that should do the trick.  If you aren't sure if the command will work and want to test it first, you can run xrandr --output DP-4 --primary (again, replace DP-4 with your default monitor) from a shell then launch a window and see if it shows up on the correct default monitor.  But in order to have this save and work each time, to work around the bug, you need to add that command to Startup Applications.

UPDATE:  It seems here is a second step / part 2 to this solution in order for it to fully work.  After several days of testing on Ubuntu 16.04, I discovered it was also necessary to modify ~/.config/monitors.xml to specify the primary monitor.  If you don't set the primary monitor in ~/.config/monitors.xml then it appears some windows and/or programs obey the xrandr command and some do not.   All you need to do in order to perform this step is open up  ~/.config/monitors.xml in a text editor like gedit and set the <primary> tag to yes for the display monitor you want as primary and no for all other displays.
Here are the steps:

1) In a shell, first backup your existing monitors.xml file so you can restore it if something unexpected goes wrong during the editing process:

cp ~/.config/monitors.xml ~/.config/monitors_OLD.xml

2) Open monitors.xml in gedit to change the config settings tags:

gedit ~/.config/monitors.xml

3) Now, inside of the gedit editor window, find the output tag labeled for the monitor you want to be primary, then under that <output> block, change the <primary> tag to yes.  Be sure to look at all other monitors and change the primary tag for all the other monitors to no.

For me, doing these two things has solved the problem in all cases I've encountered so far.


I had the same error as this one :

  error : qemuMonitorJSONCheckError:387 : internal error: unable to execute QEMU command 'query-cpu-definitions': The command query-cpu-definitions has not been found

I solved it by enabling the virtualization options in the computer bios as well as disabling the secure boot option.

Hope it was any help.


After install ubuntu 14.04 , windows 8 not showing in grub

There is no Windows installation to be found on your disk as shown in your post.

This is the reason why the GRUB boot menu doesn't have a  Windows menu entry.

Maybe you selected to use the whole disk for Ubuntu when you installed Ubuntu.

You may see a BIOS entry because /EFI/Boot/bootx64.efi is still present on sda1.

When you want to have Windows back you unfortunately will have to reinstall it.


Can I make my keyboard disable / enter tablet mode when folding back my display?

I have the following script to disable my laptop keyboard (as a file in ~/.local/bin/disable_laptop_keyboard)

#!/bin/bash
KeyboardID=`xinput --list | grep "AT Translated Set 2 keyboard" | sed 's/[^=]*=\([1-9]*\).*/\1/'`
sudo xinput set-int-prop $KeyboardID "Device Enabled" 8 0

And then I have a similar enable_laptop_keyboard file where the only difference is that it says 8 1 instead of 8 0 on the last line.

You will just have to figure out which string identifies the keyboard that you want to disable. In my case it is "AT Translated Set 2 keyboard". If you first run xinput --list | grep keyboard you should be able to find out what your keyboard is called.


Type java -version and see if it says you are running x86 (32bit) or 64 bit java.

If you are running 64 bit Java, you need to re-download the 64 bit version of Eclipse.  Your error shows -arch x86 (meaning it wants a 32 bit OS/Java)

Why don't you use the Eclipse from the software center?  It's much easier to install.  You are, however, more than welcome to install from source, or a downloaded deb :)


Mouse scroll slow, settings not present (Ubuntu 14.04, hyper-v, xfce4, xrdp)

Here's my own answer, or maybe it could be considered a slightly-adjusted, alternative solution. Upon further diagnosis, here is what I found:

A) The command xset worked on both the Hyper-V Manager Connect session and the Xrdp session. Unfortunately, it only allows three mouse movement (not scrolling) parameters: acceleration multiplier, acceleration divider, and pixel threshold for applying the acceleration parameters.

B) Looking further into the X (X11?, Xsession?, Xorg?) settings, there are additional mouse options. The command xinput worked on the Hyper-V Manager > Connect session but did not work on the Xrdp session. So, it appeared that the Xrdp session somehow did not make use of many (or any) X settings, which apparently help with the graphical user interface in aspects such as the display, keyboard, and pointers (like the mouse).

C) Just now (after-the-fact), scouring my history to find related commands that might be of interest, in addition to xset and xinput, I found: X, Xserver, xterm, xrandr, xsetpointer, xfconf-query. (I expect these will help in a local connection or a Hyper-V Manager > Connect session, not in an Xrdp remote connection.)

D) Reading about how Xrdp and other remote connection programs work, it seems to me that the Xrdp version (v0.6) that I first used might have been using the VNC protocol, which to my understanding does not use X settings. I further found that another package, X11rdp, might make use of more X settings in an Xrdp remote desktop session.

E) Finally, I found a very helpful pair of scripts that helps to download and build packages for debian (which Ubuntu is based upon). The scripts, by www.scarygliders.net, are X11rdp-o-matic.sh and RDPsesconfig.sh. Very helpful documentation is provided at http://scarygliders.net/x11rdp-o-matic-information/ , however, other pages on that site as well as pages on www.xrdp.org and http://sourceforge.net/projects/xrdp/ will likely round out the information you might need. After downloading a repository with git, the X11rdp-o-matic.sh took quite some time to do its work. At the end of the script, a message stated that X11rdp and Xrdp were installed and were expected to be running. It was also suggested that I might not need to run the RDPsesconfig.sh script, but instead just try to login with a Remote Desktop Connection, which is exactly how it worked out. One thing I wish that I had done is to use the option to install audio sound, but the recommended option to --justdoit, with the latest stable Xrdp version (--branch v0.8), really provided all that I currently need.

In conclusion, X11rdp-o-matic.sh helped to download, build, and install the latest stable versions of X11rdp and Xrdp. This configuration provides a way to use Windows Remote Desktop Connection terminal server to connect to a Windows-hosted Hyper-V virtual machine with Ubuntu 14.04 installed. The Xrdp connection is quick and responsive and some of the X settings that I know of (such as some of those listed in C, above) appear to be available in the remote session (thanks to X11rdp). Copy and paste both into and out of the remote session work well. The mouse scrolling issue is resolved; it is fast enough and smooth enough. I might only consider using the option to include audio sound in the future.

MANY THANKS to the authors and contributors to Xrdp, X11rdp, and X11rdp-o-matic!


Why can I watch 1080p videos if my Pc has a lower resolution?

It's called scaling.

There is both hardware scaling (which is done by the video card or the monitor) and software scaling.

That is an example of software scaling.

It's much like watching a big picture, at some point if the image can't be rendered directly the image is passed to an algorithm which tries to resize it in a reasonable way (notice that resizing itself implies quality loss); the same goes for videos.

More on picture scaling


It's not possible
To the best of my knowledge it's not possible. Updated applications are supposed to query global settings for HDPI (High Dots Per Inch) and behave accordingly.
Work around with xrandr
Luckily (or unluckily) some applications do not query the global settings in Unity Tweak Tools (or in your case Gnome Tweak Tools) and their settings depending on xrandr instead.
Take for example kid3 which ignores global settings by the tweaking tools. When started it looks like this:

If you open the terminal first and use:
xrandr --dpi 144

then call kid3 the screen is magnified and easier to read:

Work around with Zoom
Within applications like LibreOffice and Google Chrome you can zoom in and zoom out to adjust HDPI to your liking.
For example in Chrome you can use Ctrl++ to zoom in and Ctrl+- to zoom out for an individual tab.
Additionally in Chrome you set the global page zooming factor in system settings:

Notice the last option sets Page Zoom to 110%.
Generally speaking then you can solve most HDPI issues on an application by application basis but not within tweaking tools.
17" laptop at 1920x1080
On my 17" 1920x1080 laptop screen I use tweaking tools to set font scaling to 1.5:

In Ubuntu System Settings -> Screen Display I set monitor scaling to:

I spent a lot of time getting my settings just right for me with the laptop 3 feet away. I expect you and others might also have to invest considerable time too.
There are other issues to consider such as icon size in Desktop and Nautilus which you can also experiment with.


USB dock for 4TB Seagate HDD only works with less then 2.2TB of data

2.2 TB ≈ 2 TiB, which corresponds to the largest number of 512-byte blocks addressable by 32 bits (232 × 512 B = 232 × 29 B = 241 = 2 × 10244 B = 2 TiB). I suspect that your USB-to-ATA bridge doesn't support more blocks or larger blocks, because it's cheap and/or old.
Does your storage drive allow you to set the block size to 4 KiB (Advanced Format)? Many newer drives allow the selection of a legacy mode with 512 B through a set of jumpers (see example picture below), which is often the default. If so, it's worth a try, but in that case you'll need to repartition the drive. Simply changing the jumper, trying to read the drive and changing it back, won't harm any existing data though, as long as you don't write anything while the jumper is out of its original position.


There are two main ways of doing this, it's genearlly down to personal preference which you choose:

Ctrl+Shift+u, then 0
1 9 2 and Enter

or

Ctrl+Shift+u0192

EDIT: Option 2 will work in most cases, but may not work in some places, including certain terminals.

Ctrl+Shift+U is the command sequence for inserting any unicode character, and 0192 is the character code for "LATIN SMALL LETTER F WITH HOOK"


The screen freezes dragging windows between workspaces in Ubuntu 14.04 LTS

alt + enter seems to do the trick for me!


sudo apt-get remove --purge apache2 php5 mysql-server-5.0 phpmyadmin
sudo apt-get autoclean
sudo apt-get autoremove

Hope this was helpful.
if not ping me sudo apt-get remove --purge phpmyadmin


Dual Booting Ubuntu along with Windows 10

To install Ubuntu 16.04 try to create Live USB using LinuxLive USB Creator.


Firefox always crash on startup after last updates

I ran into the same problem, after updating yesterday morning.
I solved my problem by removing the pepper flash wrapper from chrome called freshplayerplugin.
sudo apt-get purge freshplayerplugin


Alias to search files by name and open them in vim

Since the -exec {} arguments must come after the -iname (since find 'executes' its arguments from left to right), you can't do what you want using an alias. Instead let your alias invoke a script containing for instance:

#!/bin/sh
find . -iname "$1" -exec vi {} \;

Note that this will invoke vi once for each file found. If there are many such files, you'll be doing many :q!'s or ZZ's to get out of them. If you want to invoke one instance of vi to edit all files found, change the \; to a +:

find . -iname "$1" -exec vi {} +

Alternatively, you could use command substitution to provide the arguments to vi:

vi $(find . -iname "$1")   # do not use when file names may contain whitespace

However the downside to this is that it will fail on file names containing whitespace.

If you prefer not to create a script file for the command, instead put the statement in a shell function:

fvi () { find . -iname "$1" -exec vi {} + ; }


You can grab the Precise package from the Launchpad page, and should be able to install it again on a newer version of Ubuntu. The package was simply synchronized over from Debian. I'm not sure why it's not synchronized over for newer versions of Ubuntu, as it does seem to still exist in Debian (whre you could also grab the package from instead, if you would prefer).


Just Install a android emulator and then you can run any android app into this.
Genymotion is one nice emulator you can download it from this link, http://linuxicle.blogspot.com/2013/10/install-genymotion-in-linuxubuntu-1304.html
Or you can use this, http://linuxicle.blogspot.com/2013/06/how-to-run-android-emulator-on-ubuntu.html

I am currently using kik,whatsapp,instagram under genymotion.

Hope it works with ur case too.


"Low disk space" messages despite ample virtual space

Unless you tell the filesystem to expand, the guest cannot see the extra space you made available. Just because you add extra space does not mean that the filesystem will automatically resize itself to fill up the available space.

It might be worth using df to see what volume is your root (and low on space) like this:

df -h

It is most likely that your main root drive will be reported as /dev/vda. Assuming this is the case, you can try using resize2fs to resize the filesystem and make use of the extra space, like this:

sudo resize2fs /dev/vda

Make sure you use your actual drive name if it's something different to vda.


Trying to re-install VLC player but it aint work

Please update your repositories first by following command(check if you get any errors while update):

sudo apt-get update

Then try this:

sudo apt-get -f install vlc

The -f option will try forcefully install the package.

If nothing works please try removing the dependencies or purging vlc.


Another ask for change Ubuntu 18.04 Orange color - it persists changing Gnome themes

By default Ubuntu 18.04 uses /usr/share/gnome-shell/theme/ubuntu.css file for GDM Login and for user theme (gnome-shell)

this means, changing the contents in it will effect both GDM Login screen and user theme (gnome-shell) unless you configure both with other files.

So first take the backup of the file and then edit it,

sudo -H gedit /usr/share/gnome-shell/theme/ubuntu.css

for the changes you are looking for, search for this field and concentrate on the colors blue, green and red. Note that I have already edited the colors from default orange to blue, green and red.

.window-clone-border {
  border: 4px solid blue;
  border-radius: 4px;
  box-shadow: inset 0px 0px 0px 1px green; }

.window-caption {
  spacing: 25px;
  color: #ffffff;
  background-color: red;
  border-radius: 8px;
  padding: 4px 12px; }

concentrate on text "magenta" in below field.

.workspace-thumbnail-indicator {
  border: 4px solid magenta;
  padding: 1px; }

Concentrate on text "cyan" in below field

#panel .panel-button:active, #panel .panel-button:overview, #panel .panel-button:focus, #panel .panel-button:checked {
  background-color: rgba(0, 0, 0, 0.01);
  box-shadow: inset 0 -2px 0px cyan;
  color: white; }`

for login screen changes you are looking for refer to this post Changing the Colour of GNOME (GDM) Login Box on Ubuntu 18.04

for the dot color on dock indicator, refer to this post
How can I change the color of the marker on the dash that indicates an application is "up"?

you can replace the svg icon with your custom svg icon with the same name or you can define the custom icon path in the same .css file.

/* window close ubuntu image */
.window-close {
  background-image: url("ubuntu-close-window.svg");
}

below pic is a self explanatory.


How can I get raw text output of a manual in my terminal

You can change the pager to cat using the -P option:

man -P cat command

where command is the command of interest whose man page you wish to read.

You can also redirect the man page to a file which you can then open to read:

man command > file


Ubuntu installation on Dell XPS 9380 issues

http://tutorials.ubuntu.com have the preferred methods for downloading then  verifying the ISO file, the making a Live USB or Live DVD, before installation. Using other tools such as that Dell app are not recommended.


Not sure if this is the same issue I saw, but on Ubuntu they require bash to be run in login mode to set the prompt, as such unless you have login=yes in the sshd_config you will not get a prompt.


Route internet from built-in WiFi to USB WiFi adapter, which will be used as Access Point or WiFi Hotspot

So you want to make a wifi repeater ?

Assuming you have the needed driver for your EW-7811Un dongle; if not try to use the PPA at ppa:hanipouspilot/rtlwifi and the rtl8192cu-dkms package.

TL;DR

If you can't bear to read it all and want to be spoon feed instead, run this script, close your eyes and cross your fingers.

How to do it

You need hostapd but a specially crafted version because of the subpar realtek driver. You will need to uninstall the ubuntu version (if it is installed) and install a patched version.

You can download the original file from realtek.com.tw (but I use here the same file from a github user repo):

sudo apt-get remove hostapd
cd /tmp
wget https://github.com/XiaoxiaoPu/hostapd-8192cu/raw/master/RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911.zip
unzip RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911.zip
cd RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911
cd wpa_supplicant_hostapd
tar -zxf wpa_supplicant_hostapd-0.8_rtw_r7475.20130812.tar.gz
cd wpa_supplicant_hostapd-0.8_rtw_r7475.20130812
cd hostapd

You can (must ?) use this file and save it as .config

# Example hostapd build time configuration
#
# This file lists the configuration options that are used when building the
# hostapd binary. All lines starting with # are ignored. Configuration option
# lines must be commented out complete, if they are not to be included, i.e.,
# just setting VARIABLE=n is not disabling that variable.
#
# This file is included in Makefile, so variables like CFLAGS and LIBS can also
# be modified from here. In most cass, these lines should use += in order not
# to override previous values of the variables.

# Driver interface for Host AP driver
#CONFIG_DRIVER_HOSTAP=y
CONFIG_DRIVER_RTW=y

# Driver interface for wired authenticator
#CONFIG_DRIVER_WIRED=y

# Driver interface for madwifi driver
#CONFIG_DRIVER_MADWIFI=y
#CFLAGS += -I../../madwifi # change to the madwifi source directory

# Driver interface for drivers using the nl80211 kernel interface
#CONFIG_DRIVER_NL80211=y

# Driver interface for FreeBSD net80211 layer (e.g., Atheros driver)
#CONFIG_DRIVER_BSD=y
#CONFIG_SUPPORT_RTW_DRIVER=y
#CFLAGS += -I/usr/local/include
#LIBS += -L/usr/local/lib
#LIBS_p += -L/usr/local/lib
#LIBS_c += -L/usr/local/lib

# Driver interface for no driver (e.g., RADIUS server only)
#CONFIG_DRIVER_NONE=y

# IEEE 802.11F/IAPP
#CONFIG_IAPP=y

# WPA2/IEEE 802.11i RSN pre-authentication
CONFIG_RSN_PREAUTH=y

# PeerKey handshake for Station to Station Link (IEEE 802.11e DLS)
CONFIG_PEERKEY=y

# IEEE 802.11w (management frame protection)
# This version is an experimental implementation based on IEEE 802.11w/D1.0
# draft and is subject to change since the standard has not yet been finalized.
# Driver support is also needed for IEEE 802.11w.
#CONFIG_IEEE80211W=y

# Integrated EAP server
CONFIG_EAP=y

# EAP-MD5 for the integrated EAP server
CONFIG_EAP_MD5=y

# EAP-TLS for the integrated EAP server
CONFIG_EAP_TLS=y

# EAP-MSCHAPv2 for the integrated EAP server
CONFIG_EAP_MSCHAPV2=y

# EAP-PEAP for the integrated EAP server
CONFIG_EAP_PEAP=y

# EAP-GTC for the integrated EAP server
CONFIG_EAP_GTC=y

# EAP-TTLS for the integrated EAP server
CONFIG_EAP_TTLS=y

# EAP-SIM for the integrated EAP server
CONFIG_EAP_SIM=y

# EAP-AKA for the integrated EAP server
CONFIG_EAP_AKA=y

# EAP-AKA' for the integrated EAP server
# This requires CONFIG_EAP_AKA to be enabled, too.
#CONFIG_EAP_AKA_PRIME=y

# EAP-PAX for the integrated EAP server
#CONFIG_EAP_PAX=y

# EAP-PSK for the integrated EAP server (this is _not_ needed for WPA-PSK)
CONFIG_EAP_PSK=y

# EAP-SAKE for the integrated EAP server
CONFIG_EAP_SAKE=y

# EAP-GPSK for the integrated EAP server
CONFIG_EAP_GPSK=y
# Include support for optional SHA256 cipher suite in EAP-GPSK
CONFIG_EAP_GPSK_SHA256=y

# EAP-FAST for the integrated EAP server
# Note: Default OpenSSL package does not include support for all the
# functionality needed for EAP-FAST. If EAP-FAST is enabled with OpenSSL,
# the OpenSSL library must be patched (openssl-0.9.9-session-ticket.patch)
# to add the needed functions.
#CONFIG_EAP_FAST=y

# Wi-Fi Protected Setup (WPS)
CONFIG_WPS=y
# Enable WSC 2.0 support
#CONFIG_WPS2=y
# Enable UPnP support for external WPS Registrars
#CONFIG_WPS_UPNP=y

CONFIG_TLS=internal
CONFIG_INTERNAL_LIBTOMMATH=y

# EAP-IKEv2
#CONFIG_EAP_IKEV2=y

# Trusted Network Connect (EAP-TNC)
#CONFIG_EAP_TNC=y

# PKCS#12 (PFX) support (used to read private key and certificate file from
# a file that usually has extension .p12 or .pfx)
#CONFIG_PKCS12=y

# RADIUS authentication server. This provides access to the integrated EAP
# server from external hosts using RADIUS.
CONFIG_RADIUS_SERVER=y

# Build IPv6 support for RADIUS operations
CONFIG_IPV6=y

# IEEE Std 802.11r-2008 (Fast BSS Transition)
CONFIG_IEEE80211R=y

# Use the hostapd's IEEE 802.11 authentication (ACL), but without
# the IEEE 802.11 Management capability (e.g., madwifi or FreeBSD/net80211)
#CONFIG_DRIVER_RADIUS_ACL=y

# IEEE 802.11n (High Throughput) support
CONFIG_IEEE80211N=y

# Remove debugging code that is printing out debug messages to stdout.
# This can be used to reduce the size of the hostapd considerably if debugging
# code is not needed.
#CONFIG_NO_STDOUT_DEBUG=y

# Add support for writing debug log to a file: -f /tmp/hostapd.log
# Disabled by default.
#CONFIG_DEBUG_FILE=y

# Remove support for RADIUS accounting
#CONFIG_NO_ACCOUNTING=y

# Remove support for RADIUS
#CONFIG_NO_RADIUS=y

# Remove support for VLANs
#CONFIG_NO_VLAN=y

# Enable support for fully dynamic VLANs. This enables hostapd to
# automatically create bridge and VLAN interfaces if necessary.
#CONFIG_FULL_DYNAMIC_VLAN=y

# Remove support for dumping state into a file on SIGUSR1 signal
# This can be used to reduce binary size at the cost of disabling a debugging
# option.
#CONFIG_NO_DUMP_STATE=y

# Enable tracing code for developer debugging
# This tracks use of memory allocations and other registrations and reports
# incorrect use with a backtrace of call (or allocation) location.
#CONFIG_WPA_TRACE=y
# For BSD, comment out these.
#LIBS += -lexecinfo
#LIBS_p += -lexecinfo
#LIBS_c += -lexecinfo

# Use libbfd to get more details for developer debugging
# This enables use of libbfd to get more detailed symbols for the backtraces
# generated by CONFIG_WPA_TRACE=y.
#CONFIG_WPA_TRACE_BFD=y
# For BSD, comment out these.
#LIBS += -lbfd -liberty -lz
#LIBS_p += -lbfd -liberty -lz
#LIBS_c += -lbfd -liberty -lz

# hostapd depends on strong random number generation being available from the
# operating system. os_get_random() function is used to fetch random data when
# needed, e.g., for key generation. On Linux and BSD systems, this works by
# reading /dev/urandom. It should be noted that the OS entropy pool needs to be
# properly initialized before hostapd is started. This is important especially
# on embedded devices that do not have a hardware random number generator and
# may by default start up with minimal entropy available for random number
# generation.
#
# As a safety net, hostapd is by default trying to internally collect
# additional entropy for generating random data to mix in with the data
# fetched from the OS. This by itself is not considered to be very strong, but
# it may help in cases where the system pool is not initialized properly.
# However, it is very strongly recommended that the system pool is initialized
# with enough entropy either by using hardware assisted random number
# generatior or by storing state over device reboots.
#
# If the os_get_random() is known to provide strong ramdom data (e.g., on
# Linux/BSD, the board in question is known to have reliable source of random
# data from /dev/urandom), the internal hostapd random pool can be disabled.
# This will save some in binary size and CPU use. However, this should only be
# considered for builds that are known to be used on devices that meet the
# requirements described above.
#CONFIG_NO_RANDOM_POOL=y

Then

make
sudo make install

One can use create_ap which a little helper script to setup the wifi AP. It takes care of setting up hostapd, iptables if needed (when using NAT). It is a replacement for the old ap-hostspot.

cd /tmp
git clone git@github.com:oblique/create_ap.git
sudo cp create_ap/create_ap /usr/local/bin/create_ap
sudo apt-get install dnsmasq-base iptables # if you don't have them already

You then create the hotspot with create_ap

sudo create_ap -w 2 -c 6 --driver rtl871xdrv wlan1 wlan0 MyHotspot mysecretpassword

You have to use the default method (NAT) because you can't bridge 2 wifi interfaces.

Assuming the USB dongle is wlan1 and the built-in card wlan0. Use a different channel (at least with a +/-3 channels gap) that the channel that wlan0 use.

Done! You should have you AP setup and client should access the net via your built-in wifi card.

From multiple sources but mainly using script from hostapd-8192cu AUR package

Uninstallation

sudo rm /usr/local/bin/hostapd /usr/local/bin/hostapd_cli /usr/local/bin/create_ap


Checking internet connectivity in Ubuntu

You can use ping from the terminal.  It should be available by default.  In Linux, your ping will continue to ping forever.  You can use the -c flag to limit the number of pings:

ping -c 1 172.16.0.1

After reading the Windows Docs for ping, I understand the -t flag is to make the ping keep pinging forever.  As this is the default behavour of ping on Ubuntu, you would simply do the following:

ping 172.16.0.1

Check man ping to read up on more options for ping.


How is it that the size of Ubuntu Core grew so much between 13.10 and 14.04?

In Ubuntu Core for amd64 the number of packages did grow from 103 to 184. This can be verified in the ubuntu-core-13.10-core-amd64.manifest and ubuntu-core-14.04-core-amd64.manifest.

81 New packages

adduser <- new dependency of ifupdown
apt-utils
bzip2
console-setup
cron
debconf-i18n
dh-python
dmsetup
eject
file
gcc-4.9-base:amd64 <- new dependency of libgcc1
init-system-helpers
iputils-ping
isc-dhcp-client
isc-dhcp-common
kbd
keyboard-configuration
less
libapt-inst1.5:amd64
libarchive-extract-perl
libbsd0:amd64
libcap2-bin
libcgmanager0:amd64 <- new dependency of libudev1
libdebconfclient0:amd64 <- new dependency of base-passwd
libdevmapper1.02.1:amd64
libestr0
libexpat1:amd64
libffi6:amd64
libfribidi0:amd64
libgcrypt11:amd64
libgdbm3:amd64
libgnutls-openssl27:amd64
libgnutls26:amd64
libgpg-error0:amd64
liblocale-gettext-perl
liblockfile-bin
liblockfile1:amd64
liblog-message-simple-perl
libmagic1:amd64
libmodule-pluggable-perl
libmpdec2:amd64
libnewt0.52:amd64
libp11-kit0:amd64
libpam-cap:amd64
libpod-latex-perl
libpopt0:amd64
libpython3-stdlib:amd64
libpython3.4-minimal:amd64
libpython3.4-stdlib:amd64
libsqlite3-0:amd64
libssl1.0.0:amd64
libtasn1-6:amd64
libterm-ui-perl
libtext-charwidth-perl
libtext-iconv-perl
libtext-soundex-perl
libtext-wrapi18n-perl
lockfile-progs
logrotate
lsb-release
mime-support
net-tools
netbase
netcat-openbsd
ntpdate
perl
perl-modules
python3
python3-minimal
python3.4
python3.4-minimal
resolvconf
rsyslog
sudo
ubuntu-minimal
ucf
ureadahead
vim-common
vim-tiny
whiptail
xkb-data

ARM architecture

Linaro nano

  Provides a very minimum rootfs that's contains a fully function
  support for apt (the package management system used by Ubuntu). This
  image only provides console support, and should be used in case you
  want a fast and small image to develop and verify the kernel and
  system functionality. — https://wiki.linaro.org/Platform/DevPlatform/Rootfs

Even the minimal rootfs distribution Linaro nano Ubuntu Trusty (14.04) has 171 packages and is relatively huge with 48MB in download size compared to the 184 packages for Ubuntu Core Trusty (14.04) ARMhf release.


Which Ubuntu for Toshiba Satellite M70-168

With Ubuntu you're more lucky than with Windows. You can try before install any Ubuntu version you want. You can create a Ubuntu LiveDVD or LiveUSB and try everything in live mode without damaging anything inside your PC. Maybe start with 14.04 as a reference. See how fast it goes, and then move up (or down) a version or two.

You can also try other Ubuntu flavors: liter (Xubuntu, Lubuntu, Cubuntu, UbuntuMate) or heavier (Kubuntu).


How can I run original command that aliased with same name?

You can bypass aliases by the following methods:

the full pathname of the command: /bin/ls
command substitution: $(which ls)
the command builtin: command ls
double quotation marks: "ls"
single quotation marks: 'ls'
a backslash character: \ls


How do I decide which manpage to use on the Ubuntu Manuals site?

As the man manual page says:

A section, if provided, will direct man to look only in that section of the manual.
The default action is to search in all of the available sections, following a
pre-defined order and to show only the first  page  found,  even  if
page exists in several sections.

In the config file /etc/manpath.config you find the actual order used:

1 n l 8 3 2 3posix 3pm 3perl 5 4 9 6 7

Also, man -a $command will show all pages found in all sections, and -S $section-list option override default order.

A last note: you probably will find man 1posix grep will not work on your system, because the package manpages-posix is not installed by default.


Lync (formerly Office Communicator) with pidgin-sipe => Read Error

~$ export NSS_SSL_CBC_RANDOM_IV=0

~$ pidgin

Seems to do the trick, not sure exactly what it does. I need to read up on it.

Here is the bug traq for the issue: https://bugs.launchpad.net/ubuntu/+source/pidgin/+bug/950790


g++-4.3 not in repos anymore, how to install it?

For such tasks I usually create a Virtual Machine with the proper tools and bridged networking. Both Lucid and Maverick have gcc-4.3 available. If you had a CD image of these versions available, boot into it and setup a SSH server. This SSH server is optional, you could use the Terminal inside the VM as well, but you cannot interact with the clipboard of the host system without installing Guest Additions.

(to save resources, I would use Debian Squeeze which has gcc-4.3 as well. Whether this is possible depends on the dependencies of your package)


Just create new folder ".pulse"  in your home


How can I uninstall grub and get back my mac bootscreen (rEFIt)?

Easiest way would be to boot into OSX then run.

/efi/refit/enable-always.sh

See refit install change enable.sh to enable-always.sh. This will bless the drive and efi startup file. Hold down X on boot might force OSX to boot. See boot select. If none of that works boot from OSX CD and then run the script that way.

there is also something called mactel I'm not sure if its in the ubuntu repositories or not and I have not used it yet myself. mactel could in theory bless the drive and file from linux.


Disable automount of a specific mtp device?

First, find the VendorID and ProductID of the device using lsusb. For my Samsung Galaxy S7 Edge, the appropriate line is below.

Bus 001 Device 029: ID 04e8:6860 Samsung Electronics Co., Ltd Galaxy (MTP)
---------------VendorID--^ : ^--ProductID

You also need the directory associated with where this device is plugged in. You can go hunting around /sys/bus/usb/devices/*/idProduct manually, or you can use this quick little script by @radu-rădeanu.

Save this to ~/bin/findUSBbyID.sh and chmod +x it.

#!/bin/bash

if [ $# -ne 2 ];then
  echo "Usage: `basename $0` idVendor idProduct"
  exit 1
fi

for X in /sys/bus/usb/devices/*; do
    if [ "$1" == "$(cat "$X/idVendor" 2>/dev/null)" -a "$2" == "$(cat "$X/idProduct" 2>/dev/null)" ]
    then
        echo "$X"
    fi
done

Run it as ~/bin/findUSBbyID.sh 04e8 6860. The output will look somthing like this:

/sys/bus/usb/devices/1-1.2

With this information you want to create a new file called /etc/udev/rules.d/90-disable-usb-device.rules. You'll need root permissions so sudo or gksudo your favorite editor as appropriate.

The file should contain one line like below. Correct the VendorID and ProductID to match your device. Also correct the /sys/bus/usb/devices/$something/authorized path to match your product as found with the findUSBbyID.sh script.

ACTION=="add", ATTR{idVendor}=="04e8", ATTR{idProduct}=="6860", RUN="/bin/sh -c 'echo 0 > /sys/bus/usb/devices/1-1.2/authorized'"

You may get another popup "Unable to mount an MTP device". That issue is being discussed here.


How to fix disturbing screen while login to Ubuntu?

Probably you should check for correct graphics driver updates.
i had similar problem in my windows 8 pc with no additional drivers.
And again with no updated graphics driver on my ubuntu machine. updated it and works great for me.


Memory usage doesn't add up - what is using my memory?

In my case, some memory is reserved for hugepage. Considering the hugepages reserved memory, it adds up.

controller-0:/home/wrsroot# grep -i huge /proc/meminfo
HugePages_Total:    1000
HugePages_Free:      488
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB


how to do an on-change one-way sync/backup between folders on primary drive to secondary drive?

I use lsyncd for this exact thing. It will watch a directory and sync changes over whenever files change, without needing cron.

This page over at LiquidWeb may help you get up and running.
This page over at Rackspace may help too, but seems to require more manual labor.


NVME Disk failure causing boot partition corruption, bad-superblock error

If using an older kernel a newer one might solve the problem. However in Arch Linux Solid state drive/NVMe it says:

  Samsung drive errors on Linux 4.10

  On Linux 4.10, drive errors can occur and causing system instability.
  This seems to be the result of a power saving state that the drive
  cannot use. Adding the kernel parameter
  nvme_core.default_ps_max_latency_us=5500 disables the lowest power
  saving state, preventing write errors.

This sounds like your best first step.

Reply to comments

My Samsung 960 Pro is similar to your Samsung 970 EVO. As a reference I'll include my own system and yours will look similar after repair:

$ lsblk -o NAME,FSTYPE,LABEL,MOUNTPOINT,SIZE,MODEL | egrep -v "^loop"

NAME         FSTYPE LABEL            MOUNTPOINT   SIZE MODEL
nvme0n1                                           477G Samsung SSD 960 PRO 512GB
├─nvme0n1p9  swap                    [SWAP]       7.9G
├─nvme0n1p7  ext4   Old_Ubuntu_16.04 /mnt/old    23.1G
├─nvme0n1p5  ntfs                                 859M
├─nvme0n1p3                                        16M
├─nvme0n1p1  ntfs                                 450M
├─nvme0n1p8  ntfs   Shared_WSL+Linux /mnt/e         9G
├─nvme0n1p10 ext4   Ubuntu_18.04     /mnt/clone  27.2G
├─nvme0n1p6  ext4   New_Ubuntu_16.04 /           45.1G
├─nvme0n1p4  ntfs   NVMe_Win10       /mnt/c     363.2G
└─nvme0n1p2  vfat                    /boot/efi     99M
sr0                                              1024M DVD+/-RW DW316
sda                                             931.5G HGST HTS721010A9
├─sda4       ntfs   WINRETOOLS                    450M
├─sda2                                            128M
├─sda5       ntfs   Image                        11.4G
├─sda3       ntfs   HGST_Win10       /mnt/d       919G
└─sda1       vfat   ESP                           500M


Ethernet not working on Dell WD15 docking station and Latitude 5491 - 16.04

I use lenovo l390 + ThinkPad hybrid docking station + ubuntu 18.04 (4.15.0-46-generic) and I have the same issues :
- Charge is okay
- USB ports through the docking station work
- neither the screen nor internet work through the docking station

I guess this problem comes from the version of the kernel. The same kind of issues appeared in 4.15.0-44-generic and has been fixed in 45 version.

Downgrading the kernel was proposed when this bug appears :

After most recent kernel update (4.15.0-44-generic) my tablet freezes whenever plugged into docking station

Ubuntu 18.04.1 LTS issue with Dell Thunderbolt 3 Dock after update


There's a nice graphical tool that alows you to simply enable and disable the touchpad. You can install it by typing on a console:

sudo add-apt-repository ppa:atareao/atareao

sudo apt-get update

sudo apt-get install touchpad-indicator

Official page

You can try to enable it from the System Settings
You can try running from the console
synclient TouchpadOff=0

sudo gedit /etc/rc.local
Before the line exit 0 you will add the following lines:

sudo modprobe -r psmouse

sudo modprobe psmouse proto=imps

Save the file and reboot the computer

Source


Ubuntu 14.04 freezes on an Asus G75v laptop

Remove the currently installed NVIDIA drivers and the xorg-edgers PPA.

Open a terminal and execute :

sudo apt-get purge nvidia*
sudo apt-get install ppa-purge
sudo ppa-purge ppa:xorg-edgers/ppa
sudo reboot

Install the latest stable NVIDIA drivers that support GEFORCE GTX 660M.

Open a terminal and execute :

sudo apt-get update
sudo apt-get install nvidia-352 nvidia-prime
sudo reboot


Why does linux-image-virtual depend on a generic kernel now?

lower code maintenance requirements.  the generic kernel now has the bits and bobs from the virtual kernel, and is bright enough to know when it should or should not use them.

This Is A Feature, Not A Bug :)


How can I compress my .PDF (two pages) to less than 100 kB?

Below 90 value the text in pdf is not visible clearly and I am sure my application will be rejected then.

It's a scanned document. That means it's not text, it's an image of the page. PDF supports multiple image compression schemes, including lossless, but quality and degradation suggest that you're using JPEG.
This is probably the most efficient way to store it.
You want to store two pages in <100kB. That's 50kB per page. That's a tall order - but probably possible.
I would export the pages as JPG's and play with quality settings and resolution until you get your result:
convert file.pdf file.jpg

This will give you file-0.jpg and file-1.jpg for page 1 and two respectively.
Now we can try to reduce the resolution of the pages:
mogrify -resize 600x700 -quality 45 file-0.jpg

By this measure, I managed to get an A4 page down to 28kB. It's legible, but not very clear:

To convert your files back to a PDF after playing with them to reduce size, run
convert file-?.jpg file.pdf

In addition to mogrify to modify files, you can use tools such as gimp.


Tell `ls` to sort by regular ASCII codes, not "intelligently"

As a one-off command you can do this:

LC_COLLATE=C ls

Or you can add export LC_COLLATE="C" to your .bashrc to make it permanent (may have unexpected results sorting elsewhere).

More information on Ubuntu forums.


Blender 2.62 tutorial for architectural works?

I'd just start using Blender for some project (that's exactly what I did some time ago). Just configure it to have 1 Blender unit == 1 meter (or feet).

There are lots of free tutorials (including video tutorials) all over the Internet - just start doing it and after a while you'll get some speed.

IMO the best way of learning is doing.


Does posting my computer name publicly make my system vulnerable?

It depends on your privacy concerns...

Your username and hostname could be used by someone who cracked your wifi as a "hint" to access your samba/netatalk shares. It can reveal some info about you depending on how you named the host and your username...

But these are not a system vulnerability, but a privacy concern. I, personally, change my hostname and use non-identifier username... just in case.


Have you tried using sftp?  Also, if you have ssh access, you can use scp, which allows you to upload and download files.  As ftp is not encrypted, it is highly recommended you find an alternative solution.

$ scp path/to/local/file me@domain.tld:/path/to/remote/file  # Download file
$ scp path/to/local/file me@domain.tld:path/in/home/directory  # Download file in home directory
$ scp me@domain.tld:/path/to/remote/file path/to/local/file  # Upload file

Whether you chose sftp or scp is up to you, but it is highly recommended to use over ftp, as ftp doesn't support encryption.

rsync allows for more complicated syncing procedures, and can also utilize ssh/scp.

You can set up your .ssh/config to make this easier and look into setting up ssh keys as well.

Many servers nowadays do not support ftp.  Are you 100% sure that this server does?  The ports are all filtered:

$ nmap -p 22,21 x10hosting.com
Starting Nmap 7.70 ( https://nmap.org ) at sometime
Nmap scan report for x10hosting.com (104.24.22.72)
Host is up (0.013s latency).
Other addresses for x10hosting.com (not scanned): 104.24.23.72

PORT   STATE    SERVICE
21/tcp filtered ftp
22/tcp filtered ssh

Nmap done: 1 IP address (1 host up) scanned in 12.73 seconds

Similar to debugging ssh, have you checked the server's ftp log to see if there are any details there?


Uninstalled snapd from Windows 10 WSL. Now can't install anything

You could trying removing the offending apt hook, like this:

sudo rm -rf /etc/apt/apt.conf.d/20snapd.conf


Since Matlab for Linux exists, the number of users who have experience with Matlab on wine is probably very limited.

If you cannot get a license that is valid on Linux, running Windows 7 (or any Windows) and Matlab with VirtualBox or KVM is certainly an option. The biggest issue is that a significant amount of RAM will be wasted for Windows.


To get that you need to check the man page of dpkg-query. From man dpkg-query :

  The first three columns of the output show the desired action, the
  package status, and errors, in that order.

          Desired action:
            u = Unknown
            i = Install
            h = Hold
            r = Remove
            p = Purge

          Package status:
            n = Not-installed
            c = Config-files
            H = Half-installed
            U = Unpacked
            F = Half-configured
            W = Triggers-awaiting
            t = Triggers-pending
            i = Installed

          Error flags:
            <empty> = (none)
            R = Reinst-required


Ubuntu 12.04 LTS fails to recognize my laptop as laptop

I don't know if this helps (maybe charger, battery problem). Found it on Youtube. Kind of old and it is Dell. Your charger is not recognized by your BIOS. And if your computer does not see an original charger the battery will not charge at all. Can sort this out by removing this idiotic option from the BIOS. They will give you another charger or change your motherboard (useless) and this problem will appear again after your warranty has expired.

Another reason why this is happening could be because you broke the prong on your charger, that's why its not charging. You must fix or replace the charger. It has nothing to do with the Laptop or battery. I had the same problem. I just added a new prong and it worked fine. It only took me about 5 minutes to fix. Easy fix if you know what you are doing.


The 10 digit number is what the physical address is but converted into decimal form (try it out for your self http://www.binaryhexconverter.com/hex-to-decimal-converter).
The information I am interested in is 0x76f2f034, this is the 32 bit value. You need to convert this into binary to find out which which GPIO pin is high or low (0111 0110 1111 0010 1111 0000 0011 0100).
However i don't think that it is a straight 1 to 1 mapping regarding the data sheet and the actual GPIO pins located on the Raspberry PI


The cd dvd boot option isn't showing up in bios

If you mean option for DVD player in bios, I would say the bios couldn't see DVD player, you can check hardware connection or try UEFI bios if you have this function on your bios.

Correct me if I'm wrong. Thanks.


Nautilus stop working after recent software updates

Similar bug had caused in multiple cases, where the ones that managed to fix it was by reinstalling the streamed broken package which in your case is libexempi3. Try reinstalling with,

sudo apt purge libexempi3
sudo apt install eog libexempi3 nautilus nautilus-share
sudo apt install -f

If that doesn't work, look for any libexemp library that is a dependency of nautilus in your system apt depends nautilus | grep libexempi and try reinstalling that package.


Can I "cryptsetup ... luksFormat" a partition formatted with Ext4, or must it be unformatted?

You have the order wrong. Assuming sdb1 ...

sudo dd if=/dev/urandom of=/dev/sdb1
sudo cryptsetup -y -v luksFormat /dev/sdb1
sudo cryptsetup luksOpen /dev/sdb1 $name #change "$name" to any name you wish
# now format
sudo mkfs.ext4 /dev/mapper/$name
sudo mkdir /media/mount_point
sudo mount /dev/mapper/$name /media/mount_point

See:

http://www.cyberciti.biz/hardware/howto-linux-hard-disk-encryption-with-luks-cryptsetup-command/

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

https://wiki.archlinux.org/index.php/Dm-crypt


Fixed address on DHCP server isn't working

In your /etc/dhcp/dhcpd.conf file, move your fixed, MAC based, assignment list to before the generic dynamic pool declaration. If your client has an old, even expired, lease from the pool it will never get to the MAC based area unless it is declared first.
Note even though things might work properly, you still might get undesirable entries in your log files, which can be corrected by deleting the stale entries in your /var/lib/dhcp/dhcpd.leases file and its backup /var/lib/dhcp/dhcpd.leases~.


Atheros AR9485 wifi disconnects randomly

I have a Lenovo with a AR9485 but I don't have any close neighbors with wifi and your channel and regulatory settings are the only issues I saw. I know chili555 would suggest using 20Mhz instead of 40 if you have that option on the wireless router

Here is one of his posts copied:

  First, check the settings in the router. WPA2-AES is preferred; not
  any WPA and WPA2 mixed mode and certainly not TKIP. Second, if your
  router is capable of N speeds, I have better luck with a channel width
  of 20 MHz in the 2.4 GHz band instead of automatic 20/40 MHz. I also
  have better luck with a fixed channel, either 1, 6 or 11, rather than
  automatic channel selection. After making these changes, reboot the
  router.

Next, I recommend that your regulatory domain be set explicitly. Check yours:

sudo iw reg get

If you get 00, that is a one-size-maybe-fits-all setting. Find yours here
Then set it temporarily:

sudo iw reg set IS

Of course, substitute your country code if not Iceland. Set it permanently:

gksudo gedit /etc/default/crda

Use nano or kate or vim if you don't have the text editor gedit.

Change the last line to read:

REGDOMAIN=IS

Proofread carefully, save and close the text editor.

Next, I'd set IPv6 to Ignore in Network Manager


Dual Boot (Ubuntu and Windows 7) on a RAID SSD's with UEFI

A kernel panic is unlikely to be caused by your partitioning. It's more likely a kernel bug or hardware incompatibility. The two easiest solutions are likely to be:

Return the computer and buy something else in its place.
Switch to another distribution.

Also, it appears that your computer is booting in UEFI mode and using GPT, which means that there's no 4-primary-partition limit as there is with older computers that boot in BIOS mode and use MBR partitioning. Thus, there's no point to deleting those two partitions except to reclaim the space they consume, which you haven't specified as an issue.


Changing shutdown sound effect in Ubuntu 16.04

You can find system sounds in the /usr/share/sounds/ubuntu/ directory. From there, you can change the .ogg files with your own.


You have to run it from application menu. You added it as widget, but you have to run as an application. Then it will appear in the bottom centre


In five years I've never run into anything (DRM excluded) that can't play. Some things need restricted codecs, some required VLC... But everything played in the end.

That's not to say there aren't rare codecs out there (there are) but unless you're doing pretty niche stuff, you're unlikely to bump into them.


Trouble compiling a 32 bit binary on a 64 bit machine

Lekensteyn's answer conflicted with lots of existing packages for me (on 64-bit oneiric).
I instead did this, which pulled in the libc6-dev-i386 package:
sudo apt-get install gcc-multilib


Two different versions of Ubuntu, separate hard drives, but single boot?

On two different drives? Not really. But, this technically doesn't mean it's impossible, just hard.

You seem to want something called a Virtual Machine for your testing version of Ubuntu. In short, this is a computer inside a computer, and the data can be stored (theoretically) anywhere. I would advise using a virtual machine image directly (as it can be imaged, backed up, deleted, and is a lot smaller than a full partition). However, if you really want your test OS to be installed on a real partition, you can.

Note: I will be using VirtualBox for this example. You can do this with almost any hypervisor, but I'm giving instructions with VirtualBox.

Create a new VM in VirtualBox and set it up. Do not attach a hard drive to it during creation!
Open a terminal and use lsblk to find the partition/disk you want to give to the VM. In my example, I will be assigning /dev/sdc to the virtual machine.
Run the following command in a terminal:

VBoxManage internalcommands createrawvmdk -filename "~/DevSDC.vmdk" -rawdisk /dev/sdc

Move this .vmdk file from your home directory to wherever you want it to be.
In VirtualBox settings, attach the .vmdk file you made to the virtual machine.
Start the VM and install Ubuntu as normal.

You will be able to mount the other Ubuntu install partition from your host OS without a problem, and you can use VirtualBox's Shared Folders to copy information live. There isn't really a way you can expose your real machine's drive to the VM (and you shouldn't).

Also note that there's really no expectation that you'll actually be able to boot directly into your second hard drive/partition. While you may be able to, I'd be very impressed if it actually worked without some serious bugs/flaws.

Really, though, what you're wanting to do is pretty insane. Just use a regular virtual machine and a regular disk image file instead of jumping through the hoops. It'll be more stable and you'll be a lot less likely to accidentally break something important.


How to share wired network connection in 18.04

The graphical program that shows the feature you need is

nm-connection-editor

You can launch it from a terminal window or with Alt+F2

Higlight an adapter and hit the cog


Openconnect keeps asking for username in Ubuntu 20.04

I found a solution by modifying manually the vpn configuration file in the /etc/NetworkManager/system-connections/ folder.

First close any active VPN connection
Close the VPN GUI
Open with root privilege the file corresponding your VPN settings in the /etc/NetworkManager/system-connections/ folder,
Then find the vpn-secrets section and add your credentials

    [vpn-secrets]
    form:main:group_list=FOO
    form:main:username=foo@bar.net
    lasthost=vpn.bar.net
    save_passwords=yes

Save, close (don't open VPN GUI before reboot) and reboot

Enjoy your automatic VPN login..


Ubuntu 15.10 update-motd.d not affects the MOTD

Mostly likely you need to add UsePAM no to your /etc/ssh/sshd_config file. That solved the issue for me.

Also see No MOTD on Ubuntu 14.04...?


Ubuntu 12.04 Problem connecting Internet by Mobile Broadband through LG GU220

First call your Aircel customer care and asked following GPRS setting details.

Dial up No. ( may be something like *99# )

APN.

Go to Network settings, Mobile Broadband , choose country, Choose provider, Finish.
You will be able to see aircel connection in  Mobile broadband section. select it and choose edit from right pane.

Fill dial up no and APN given by aircel customer care. Make sure that you have filled perfect details

Try to Connect internet, You will have success.


Kubuntu corrupt screen after lid close/screensaver

Do you happen to use Desktop Effects? Most display issues go away if I toggle desktop effects off/on by pressing Alt + Shift + F12 twice. If graphics effects are still buggy, I disable desktop effects.

Sometimes, the issue goes away if I disable desktop effects, start a full-screen application like Hedgewars, from there enable graphics effects and exit hedgewars.


How can I extract all PDF links on a website?

Overview

Ok, here you go. This is a programmatic solution in form of a script:

#!/bin/bash

# NAME:         pdflinkextractor
# AUTHOR:       Glutanimate (http://askubuntu.com/users/81372/), 2013
# LICENSE:      GNU GPL v2
# DEPENDENCIES: wget lynx
# DESCRIPTION:  extracts PDF links from websites and dumps them to the stdout and as a textfile
#               only works for links pointing to files with the ".pdf" extension
#
# USAGE:        pdflinkextractor "www.website.com"

WEBSITE="$1"

echo "Getting link list..."

lynx -cache=0 -dump -listonly "$WEBSITE" | grep ".*\.pdf$" | awk '{print $2}' | tee pdflinks.txt

# OPTIONAL
#
# DOWNLOAD PDF FILES
#
#echo "Downloading..."
#wget -P pdflinkextractor_files/ -i pdflinks.txt

Installation

You will need to have wget and lynx installed:

sudo apt-get install wget lynx

Usage

The script will get a list of all the .pdf files on the website and dump it to the command line output and to a textfile in the working directory. If you comment out the "optional" wget command the script will proceed to download all files to a new directory.

Example

$ ./pdflinkextractor http://www.pdfscripting.com/public/Free-Sample-PDF-Files-with-scripts.cfm
Getting link list...
http://www.pdfscripting.com/public/FreeStuff/PDFSamples/JSPopupCalendar.pdf
http://www.pdfscripting.com/public/FreeStuff/PDFSamples/ModifySubmit_Example.pdf
http://www.pdfscripting.com/public/FreeStuff/PDFSamples/DynamicEmail_XFAForm_V2.pdf
http://www.pdfscripting.com/public/FreeStuff/PDFSamples/AcquireMenuItemNames.pdf
http://www.pdfscripting.com/public/FreeStuff/PDFSamples/BouncingButton.pdf
http://www.pdfscripting.com/public/FreeStuff/PDFSamples/JavaScriptClock.pdf
http://www.pdfscripting.com/public/FreeStuff/PDFSamples/Matrix2DOperations.pdf
http://www.pdfscripting.com/public/FreeStuff/PDFSamples/RobotArm_3Ddemo2.pdf
http://www.pdfscripting.com/public/FreeStuff/PDFSamples/SimpleFormCalculations.pdf
http://www.pdfscripting.com/public/FreeStuff/PDFSamples/TheFlyv3_EN4Rdr.pdf
http://www.pdfscripting.com/public/FreeStuff/PDFSamples/ImExportAttachSample.pdf
http://www.pdfscripting.com/public/FreeStuff/PDFSamples/AcroForm_BasicToggle.pdf
http://www.pdfscripting.com/public/FreeStuff/PDFSamples/AcroForm_ToggleButton_Sample.pdf
http://www.pdfscripting.com/public/FreeStuff/PDFSamples/AcorXFA_BasicToggle.pdf
http://www.pdfscripting.com/public/FreeStuff/PDFSamples/ConditionalCalcScripts.pdf
Downloading...
--2013-12-24 13:31:25--  http://www.pdfscripting.com/public/FreeStuff/PDFSamples/JSPopupCalendar.pdf
Resolving www.pdfscripting.com (www.pdfscripting.com)... 74.200.211.194
Connecting to www.pdfscripting.com (www.pdfscripting.com)|74.200.211.194|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 176008 (172K) [application/pdf]
Saving to: `/Downloads/pdflinkextractor_files/JSPopupCalendar.pdf'

100%[===========================================================================================================================================================================>] 176.008      120K/s   in 1,4s

2013-12-24 13:31:29 (120 KB/s) - `/Downloads/pdflinkextractor_files/JSPopupCalendar.pdf' saved [176008/176008]

...


Cannot install libcairo2-dev in Ubuntu 20.04

Focal Fossa's official repository contains liblibpcre2-8-0 v10.34-7. However, you have v10.34-7+ubuntu18.04.1+deb.sury.org+1 installed which clearly seems to be from third party source. Since the output of apt-cache policy libpcre2-8-0 shows that you don't have any sources which provides the unofficial version, you can install v10.34-7 using apt. To install run,

sudo apt install libpcre2-8-0=10.34-7


how to open usb drive on my virtualbox installed in ubuntu

Go into Settings --> USB, and make sure that its enabled.  Then add the USB device that you want making sure that its connected, and click OK.


wget seems to crawl only first page when using -A, despite using both -r, -e robots=off, -l inf, etc

The result obtained by the o/p, stanny, is surprising but true.

I get the same result, yet I also get a successful result from an ordinary Wikipedia page, with the following command:-

wget --no-check-certificate --span-hosts -e robots=off -p -A png https://en.wikipedia.org/wiki/Antimatter

I am using wget 1.16, running on a Windows PC using Windows 7 64-bit.


Update failing (index failed to download)

That simply means that the index file it downloaded did not match the expected checksum hash. That could simply be because it downloaded incorrectly (corrupted/truncated) or for whatever reason the original archive on the server was not created correctly and its currently of no use to anyone.

This does happen occasionally and can be considered "normal". Try again in a few hours when a new index file is generated as new updates are applied to the repository and you will likely download it without any problem this time.

If it occurs regularly, consider changing mirrors.


Using user input to determine how many times a for loop iterates

The problem is this line:

for number2 in {1..${loops}}

This is a question of precedence. As explained in man bash:

  The order of expansions is: brace expansion; tilde expansion,
  parameter    and variable expansion, arithmetic expansion, and command
  substitution    (done  in a left-to-right fashion); word splitting;
  and pathname expansion.

So, brace expansion happens before variable expansion. Therefore, when the braces are expanded, $loops has not been evaluated to 5. This means that {1..$loops} (you don't need the second {}) expands to the string {1..5} and not the sequence of numbers from 1 to 5. The same thing happens if you use  a string instead of a variable:

$ echo {1..5}  ## works: prints a sequence
1 2 3 4 5
$ echo {1..foo} ## fails: prints a string with no expansion
{1..foo}

As a workaround, you can use seq:

for number2 in $(seq 1 "$loops"); do ...

Or, even better, the right loop for the job:

for((number2=0;number2<=$loops; number2++)); do ...

Note: As a general rule, you should also always quote your variables.


Why are the Ubuntu SDK Publish and Devices tab blank?

The instructions for installing the SDK tell you to add the ubuntu-sdk-team/ppa PPA. However, it seems that some updates from the phablet-team/tools PPA are also required for it to work correctly. Running

sudo apt-add-repository ppa:phablet-team/tools
sudo apt-get update
sudo apt-get upgrade

made the UI of the Publish and Devices tabs appear, and allowed me to create an emulator.


Are there linux distros running Unity by default, besides Ubuntu?

Well you just answered yourself. Yes OpenSuse, Fedora and Arch have a repo for Unity. In the Ubuntu ecosystem, all direct Ubuntu based distros (Lubuntu, Xubuntu, Kubuntu...) have Unity in the package manager, so you can install it if you want to change from the default this distros carry.

Outside of the Ubuntu world (In other distros not based on Ubuntu directly) we can see the following:

Arch Linux offers Unity and Unity 2D for low end systems.

Fedora and OpenSuse do offer Unity, but this need to be installed from a repository.

Other distros like Frugalware and Leeenux have or had Unity in some version or another and at some point in their development.

The small amount of distros offering Unity as an alternative is because:

Unity is/was still under heavy development so the decision was on hold.
Unity uses Compiz which some distros do not want
Unity has compatibility problems with Gnome libraries
Unity is a radical change.

Of course, there are many benefits of using Unity, and most of this points in later versions were fixed, but depending on the distro (Is it orientes towards and old linux user, is it for low end systems...) they would use or not use Unity.

I myself, can't really go back to another since Unity really covers everything I do in a strange way that after using it for a week had/needed to stay with it.

Linked Questions:

Do any Ubuntu-based distributions ship with Unity?
https://askubuntu.com/questions/71345/have-any-other-distributions-packaged-unity


You can use Google Chrome downloaded from here.

  Renato, you can still play on linux. All you need is the chrome browser from https://www.google.com/chrome/browser/. This version (in contrast to the default chromium browser that comes in the repositories of your version of linux) does not use Adobe flash but instead uses pepper flash player which still works with FV2.

Quote from here.


Change Stackapplet tray icon to be more unity-like

I found that you can you can fix this by opening StackApplet's icon in the /usr/share/pixmaps folder with administrative privileges. Shrink the size of the image, then save. Restart StackApplet, and the icon in the notification area will be smaller.


Connect Internet in ubuntu Laptop to linux mint Desktop - Has Crossover Cable

I did a little searching and found some answers, not quite identical but should work, it's supposed to be "easy" using the Ubuntu GUI tools. It'll set up some IP tables / NAT magic (somehow), so we were close with using "route - show / manipulate the IP routing table" but just didn't know the "secret words"

On the internet connected computer (server), go to the Network Manager (right-click on the network icon(s) in the toolbar and edit the wired connection (eth0), go to the IPv4 tab and in "Method", choose "Shared to other computers". Apply everything and close the network manager windows.

Answers are a little different for the non-internet (client) computer.

Some say to just plug it in & it'll work. Or set it to "Automatic" (and maybe set the dns server to the "server" computer if required) [Share wireless with wired, share Ubuntu to WinXP]
Another says to manually set it's IP to one in the same LAN network, as in if the "server" is 192.168.1.4, then set the "client" to 192.168.1.5 with the same Netmask (255.255.255.0).
Then use the "server" ip as the gateway and dns.

There's also a manual, terminal way to do it too using iptables, but the fellow's instructions are very sparse and don't explain what it does at all, except "this will configure the nat" (probably copypasta'd from somewhere else). I don't think it'd be useful to paste it here without an explanation so I won't, but here's the link if you're interested (or a masochist ;-)


`uname -r` shows same kernel after aptitude upgrade has completed successfully

uname -r reports the running kernel. Switching to the newly installed kernel doesn't happen on-the-fly.

The newest kernel will be booted by default, so after rebooting the system normally, uname -r returns v3.16.0-34-generic.


From what I can gather, it could be a few different bugs. Please read and follow the instructions. I listed them in descending order from easiest to hardest.

1. Updates

  Problem: If there's ever an issue, by habit, updating and upgrading might help it, especially with new releases having bugs.

solution:
Run in your terminal. autoremove will remove any unused packages files. Might be an incompatibility issue with 20.04 that you weren't even aware of.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get autoremove

2. GRUB bootloader

  Problem: the GRUB boot loader may have been overwritten (MBP), preventing Ubuntu from booting

Solution:  check is whether you can access the GRUB2 boot loader. Boot your computer while holding the Shift key. If you see a menu with a list of operating systems appear, you’ve accessed the GRUB boot loader.

If you see the Grub boot menu:
 Select the “Advanced options for Ubuntu” then select the “Ubuntu (recovery mode)” option. Checkout the 1st URL in the appendix for which menu option to use.

If you don't see the Grub boot menu: Make sure you have working wifi then following below.

If you have the media you installed Ubuntu from, insert it into your computer, restart, and boot from the removable drive. If you don't, download a Ubuntu live CD and burn it to a disc or create a bootable USB flash drive.
When Ubuntu boots, click "Try Ubuntu" to get a usable desktop environment.
Open a Terminal window from the Dash and run the following commands:

This will install and launch Boot Repair to scan your system.

sudo apt-add-repository ppa:yannubuntu/boot-repair
sudo apt update
sudo apt install -y boot-repair
boot-repair

Choose recommended repair and follow the instructions.
Restart your computer. It should  boot up normally if that was the issue.

Note: if you want the original walk-through or another way check out the 2nd URL in the appendix.

3. Reinstall Ubuntu while keeping files and programs

  Problem: Might be a problem with Ubuntu 20.04. I currently use 20.04 version without this bug. It might be that it wasn't downloaded properly.

Solution:
Follows instructions from the 2nd and 3rd URL in the appendix.
From the least aggressive to the most. Follow these terminal commands:
to update the snap store to was recently switched.

sudo apt update
gnome-software
// if you don't have it then run:
sudo apt install gnome-software

to reinstall Ubuntu software -shouldn’t erase your files but if you want, make a backup of your files

sudo apt install --reinstall ubuntu-software

appendix:
https://www.howtogeek.com/196740/how-to-fix-an-ubuntu-system-when-it-wont-boot/
https://www.howtogeek.com/114884/how-to-repair-grub2-when-ubuntu-wont-boot/
How do I reinstall Ubuntu Software in Ubuntu 20.04 LTS version?


Permanently deleting an mdadm array created during OS installation

I learned of a simple and reasonable solution from one of our VAR solutions engineers, which was to temporarily append the following line to mdadm.conf to ignore the array, first getting its uuid from mdadm and colon-separating it as indicated, and then running the mdadm --manage --stop command followed by update-initramfs -u.
ARRAY <ignore> UUID=2e69e366:2002beea:811ff014:8dce9e33


It works well , but it's not 'fully integrated' yet.

You can find out more at https://devices.ubports.com/#/

Note that the Nexus 6 isn't available yet.
The Fairphone2 should be along in 2/3 months,
and the Nexus 10 isn't a real option either.

Are you in the US ?
https://youtu.be/pe9QCZKJYOQ?t=55m38s


I don't know whether it will improve things at all or not, but I point out the problems I see with the line you posted anyways:
Instead of:
/dev/md3 /media/DATOS   ext3 realtime, errors=remount-ro 0 1

have it as:
/dev/md3 /media/DATOS   ext3 relatime,errors=remount-ro 0 1

I have changed realtime to relatime and removed the space between the two options delimited by the comma.
Point being, entries in /etc/fstab need to be divided into 6 columns (divided by spaces or tabs), as such:
<file system>   <mount point>   <type>   <options>   <dump>   <pass>

That's why it's important not to put spaces between the options: to maintain the six columns.

Regarding the first, "file system" column (in your entry /dev/md3):
Maybe this is not mandatory (I don't know), nevertheless I see that it's a tendency that people use UUIDs (unique identifier) of partitions in that column.
That would alter your entire entry as such:
UUID=something123-like456-this789-asdfjkl   /media/DATOS   ext3   relatime,errors=remount-ro   0   1

You can find out the actual UUID for all the partitions with the following command:
sudo lsblk -o UUID,NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL,MODEL


Adding 'tap zones' to Synaptics touch pad?

The definition of corners of the touchpad to certain mouse button in synclient plus the use of easystroke to link the additional mousebutton to actions allows you to achieve exactly what you are looking for. See the link to get detailled instruction. Easystroke can be found in the software center.

how to add functions to your touch pad