How do I set focus follows mouse? Is there a way to set up "focus follows mouse" behavior in Unity?

13.04 and later (GUI)

Follow-on-focus settings can be set using the unity-tweak-tool

12.10 and later (command line)

The following controls follow-on focus

gsettings set org.gnome.desktop.wm.preferences focus-mode 'sloppy'

or

gsettings set org.gnome.desktop.wm.preferences focus-mode 'mouse'

Use the value 'click' to reset to the standard focus-control.

Note: the difference between 'sloppy' and 'mouse' is described at the bottom of this answer.

In addition you have the following option which when set, automatically raises the window to have focus:

gsettings set org.gnome.desktop.wm.preferences auto-raise true

You can control the delay for this auto-raise capability (in milliseconds):

gsettings set org.gnome.desktop.wm.preferences auto-raise-delay 500

You can change raise-on-click to control what window is on top:

gsettings set org.gnome.desktop.wm.preferences raise-on-click false

12.04

Two methods for 12.04 are presented below:

method 1

Use gconf-editor and change the focus-mode value shown to mouse or sloppy

(see note below)

If do not have gconf-editor already installed then you can install via the terminal command:

sudo apt-get install gconf-editor

In addition you have the following key which when set, automatically raises the window to have focus - auto-raise.

You can control the delay for this auto-raise capability (in milliseconds) by changing the key value auto-raise-delay

method 2

use gnome-tweak-tool

change windows focus mode to mouse or sloppy

(see note below)

"mouse" vs "sloppy"

A focus mode "sloppy" seems to work better at allowing Alt+TAB to override focus.

"mouse" means that if the mouse isn't in the window, the window isn't selected, no matter what you've selected in any other way.

  The window focus mode indicates how windows are activated. It has
  three possible values; "click" means windows must be clicked in order
  to focus them, "sloppy" means windows are focused when the mouse
  enters the window, and "mouse" means windows are focused when the
  mouse enters the window and unfocused when the mouse leaves the
  window.

Controlling What Window is on Top

The following window options control what window is in the front of others (or "on top").  It's slightly different than what window has the input focus.  The following descriptions help explain slightly.

raise-on-click

Some users who use focus-follows-mouse do not like the windows the interact with to come to the top unless they explicity click on the tilebar of the window.  This gives a finer grain of control when working with multiple windows, but can be frustrating for most users.

auto-raise

Some users who use focus-follows-mouse, like to have the window their cursor is over automatically raise to the top.  This makes the window in full view, with no other windows eclipsing it.

auto-raise-delay

The length of time to wait before triggering the auto-raise behavior.

Another way to enable focus-follows-mouse worked for me in a recent 12.10 install. There is currently a bug in 12.10 (and a special shout-out to nealmcb for the link) that causes changes made with ccsm or gsettings to revert on logout or reboot. I tried a couple different ways of tricking the bug, but eventually had success with this post about using Unsettings.

In case that page migrates away, the process boils down to:

sudo add-apt-repository ppa:diesch/testing
sudo apt-get update
sudo apt-get install unsettings

Start up unsettings, go to the Windows tab, and turn off Click to Focus. I rebooted to get it to "take", but probably only needed to log out and back in again.

For future reference, it sounds like this bugfix will be available shortly, so the normal methods of CCSM or gsettings should go back to working correctly.


How do I install Python 3.3? I have downloaded Python 3.3 from the official site but no idea how to install it.

I'm using Ubuntu 12.04

Python 3.3 has been released on 29 September 2012, several months after Ubuntu 12.04 was released. It is included in Ubuntu 12.10 though as python3.3 package

If you want to install Python 3.3 on Ubuntu version which does not have it in its repositories, you have the following options:

Use a PPA

There's a PPA containing Old and New Python versions maintained by Felix Krull. See Luper Rouch's answer for installation instructions.

Compile Python from source

This is very easy and allows you to have multiple Python versions without messing with system python interpreter (which is used by a lot of Ubuntu own programs). On my dev machine I have literally dozens of different Python versions from 2.4 to 3.2 living happily in /opt.

we need C compiler and other stuff to compile Python

sudo apt-get install build-essential

SQLite libs need to be installed in order for Python to have SQLite support.

sudo apt-get install libsqlite3-dev
sudo apt-get install sqlite3 # for the command-line client
sudo apt-get install bzip2 libbz2-dev

Download and compile Python:

wget http://www.python.org/ftp/python/3.3.5/Python-3.3.5.tar.xz
tar xJf ./Python-3.3.5.tar.xz
cd ./Python-3.3.5
./configure --prefix=/opt/python3.3
make && sudo make install

Some nice touches to install a py command by creating a symlink:

mkdir ~/bin
ln -s /opt/python3.3/bin/python3.3 ~/bin/py

Alternatively, you can install a bash alias named py instead:

echo 'alias py="/opt/python3.3/bin/python3.3"' >> .bashrc

And this is it. Now you can have any Python version, even an alpha, or, say, to have a few copies of Python 3.3 compiled with different settings... not that many people need that though :)

Use pyenv

There's a software called pyenv which may help you to automate the procedure - what it essentially does is compile Python from source, installing it in your home directory. Its goal is to help you manage multiple Python versions.

Here are the steps that I followed:

wget http://python.org/ftp/python/3.3.2/Python-3.3.2.tar.bz2
tar -xvjf ./Python-3.3.2.tar.bz2
cd ./Python-3.3.2
./configure --prefix=/opt/python3.3
make && make install
mkdir ~/bin
ln -s /opt/python3.3/bin/python ~/bin/py
echo 'alias py="/opt/python3.3/bin/python3"' >> .bashrc


How to fix very slow Ubuntu booting? When I boot up my my newly installed copy of Ubuntu on my custom rig w/4GB DDR3 RAM and a 3 Ghz Intel Core i7, it takes about a minute and a half at the purple loading screen, and then after logging in it takes a while for the icons to show up on the screen. This computer could run and boot Windows 7 faster, so  i have a problem here.

Easiest would be to open the terminal and then write "dmesg" to look for gaps as Peck proposed. The output would be less verbose than the messages one. You will see the time stamps within "[]" brackets.

This is clearly a bug. With that system you should not have a boot longer than ~10 seconds.

in BIOS menu, change SATA controller to compatible. worked on lenovo z500. it's not miracle but it boosts startup considerably.
also kill ALL the startup applications.
Desktop environments do not matter at all, at least not that much. on my computer Unity, Gnome shell and XFCE take almost the same time to start up so don't put a lot of effort into changing your DE.


How do I show the git branch with colours in Bash prompt? I am using this guide to show the branch name in gnome terminal (Ubuntu 15.10) when working in a git repository. Based on the above I now have the below in my ~/.bashrc file:

# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes

...

# Add git branch if its present to PS1
parse_git_branch() {
 git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
if [ "$color_prompt" = yes ]; then
 PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;31m\]$(parse_git_branch)\[\033[00m\]\$ '
else
 PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$(parse_git_branch)\$ '
fi
unset color_prompt force_color_prompt

As a result I now get:

so it works. But why has the coloring of my user@host been removed? And I would also expect that the branch name should be colored. Before it looked like this:

UPDATE:
I have now tried this guide instead:

https://coderwall.com/p/fasnya/add-git-branch-name-to-bash-prompt

adding this to .bashrc:

parse_git_branch() {
     git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\u@\h \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ "

and that works:

Notice in .bashrc I also have this (default):

# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes

I have yet to find the reason why that snippet gives the correct result and the other version does not. Any input on this?

Here is the version of my .bashrc that has the old snippet enabled that does not work:

http://pastebin.com/M8kjEiH3

This snippet:

# Add git branch if its present to PS1

parse_git_branch() {
 git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
if [ "$color_prompt" = yes ]; then
 PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;31m\]$(parse_git_branch)\[\033[00m\]\$ '
else
 PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$(parse_git_branch)\$ '
fi

Is meant to replace the default prompt definition:

if [ "$color_prompt" = yes ]; then
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi

Which ends with:

unset color_prompt force_color_prompt

The .bashrc you posted shows you're adding it after the default prompt definition and unset color_prompt force_color_prompt (line #64).

Either replace the default prompt definition with the snippet or leave your ~/.bashrc as it is and comment the default prompt definition along with unset color_prompt force_color_prompt on line #64:

So part of your .bashrc could look like

parse_git_branch() {
 git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
if [ "$color_prompt" = yes ]; then
 PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;31m\] $(parse_git_branch)\[\033[00m\]\$ '
else
 PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$(parse_git_branch)\$ '
fi
# THE SIX LINES BELOW are the default prompt and the unset (which were in the original .bashrc)
#if [ "$color_prompt" = yes ]; then
#    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
#else
#    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
#fi
#unset color_prompt force_color_prompt


Lenovo Yoga 13 Realtek wireless driver I've recently purchased a Lenovo Yoga 13 and put Ubuntu 13.04 on it last night. I was unable to get wireless to come on and thought that I would mess around with it today.
Today I have followed the detailed 'how-to' at:
http://majordamo.wordpress.com/2013/05/15/getting-the-realtek-rtl8723ae-bt-wi-fi-card-to-work-on-a-lenovo-yoga-13-on-linux-mint-13-ubuntu-12-10/
The problem is I can not download and install the required headers as I do not have ANY internet connection on this device.
Is there any way for me to get them on a flash drive and bring them to the Lenovo?

Any and all help is appreciated.
Thanks

Update: as of 14.10 utopic, there is a semi-working driver included by default, but it frequently disconnects and has difficulty reconnecting.  The best solution is to continue to build the lwfinger driver as described below and then blacklist the driver included in Ubuntu.

That how-to link is outdated; the latest version of the rtl8723au wireless driver can be found at https://github.com/lwfinger/rtl8723au.

In preparation we'll need some build tools and kernel headers:

sudo apt-get install git build-essential linux-headers-generic linux-headers-$(uname -r)

Here are the steps to install:

git clone https://github.com/lwfinger/rtl8723au.git
cd rtl8723au/
make
sudo make install
sudo modprobe 8723au

When you update the kernel, you'll need to run these steps again to get wireless working (except for the git clone).  To fetch the latest version of the code, use git pull. Alternatively you can set up DKMS to do that for you as described in user20826's answer.

The bluetooth driver for that chip can then be found at https://github.com/lwfinger/rtl8723au_bt. Perform the preparation as above and install like this:

git clone https://github.com/lwfinger/rtl8723au_bt.git
cd rtl8723au_bt/
make
sudo make install

I made a youtube video to walk everyone through this it is at http://www.youtube.com/watch?v=H3WdsSHo5Sw justfollow the instructions in the notes section or watch the video very carefully.

Sorry I just made a new channel and had to change the link


Huawei k4203 HSPA+ dongle install help I have Ubuntu 12.10

Have Huawei k4203 USB broadband dongle and although there are instructions for linux , they don't work.

Here are the instructions:

(1) Insert stick
(2) Dismiss all popups about running the auto install scripts(they can't work)
(3) Open terminal
(4) cd $HOME
(5) mkdir vmb
(6) cd vmb
(7) (cd "/media/QuickStart ”?.0 && tar -cf - .) | tar -xf -
(8) chmod +x autorun.sh install_linux
(9) sudo ./autorun.sh
(10) Type user password
(11) Wait for last command to finish, then close terminal

All steps up to step 6 seam like something is happening, but after entering line 7 the terminal changes to a ">" and then I copy/paste steps 8,9 and enter 10, but nothing happens.

How to solve this?

I think you have unmatched quotations, and Ubuntu is awaiting the closure. I see that the closing quotation is different. If you just copy pasted that might explain why.


Sound plays from laptop speakers only even when headphones are connected I'm using a Dell Vostro 1014 laptop with Ubuntu 11.10. From the time I had Ubuntu 9.04, sound comes from the laptop speakers only even when I plug in earphones or external speakers. Also, if an external microphone plugged in, it does not work. Dell even replaced my motherboard to check for hardware issues but the problem persists. So it is definitely not a hardware issue. The sound plays perfectly through the headphones in the pre-boot diagnostics. So I figure, this must be a problem with Ubuntu not recognizing my sound card.

Please try to give a solution for this problem.

I had the same problem:  I plug in headphones, and sound comes out of the headphones and my laptop speakers.

Here's how I fixed this problem:

Go to Sound Preferences [click on the Sound icon in the top-right, on the bottom of the menu, you'll see sound preferences]

Next, go to the Output tab.

Here, look at the bottom, where it says "Connector:"

I think mine was on "Analog Speakers" [or possibly "Analog Headphones"].

Change it to "Analog Output"

Please try to tell me if this solution fixes your problem.

Also, you can try alsamixer to manaully turn down the Speaker volume.

Ok heres how I fixed mine for my nokia earphone (its not on the playback devices list)
On your bottom right icons, right click the sound icon then pick playback devices
then pick speaker and click its properties
go to levels and change the balance of the audio output (set max 100 to right and 0 to left) that should work if you had the same issue with me. I hope it helps


How to create doc file using 'touch' command on terminal I have created text file by using touch command on terminal.

touch file_name

But i want to create doc,ppt etc file.
Can anyone tell me about the commands to create doc,ppt files or is there any option to change extension when i am using touch command?

Use the desired extension when you are using the touch command:

touch file_name.doc

or

touch file_name.ppt

Then open that file and input some data. It will be automatically changed into a valid office file.


Lock Screen not working. 14.04 I recently upgraded to 14.04 and since then my lock screen is not working.I read online that gnome-screensaver is not supported in Trusty and it was suggested that I install xscreensaver instead. The latter worked fine for only a few days. Moreover even when I log out, I'm not prompted for a password while logging back in.
I read a bit more and found that in Trusty Unity has its own lock screen. So instead of the old lightdm/gnome-screensaver we can use Unity. I found this and tried to check if enabling the lightdm lock screen helped in any way. As it turns out I don't have the Lockscreen option as mentioned in the link.
What could be a possible way to solve the issue?

Try these:

sudo apt-get remove gnome-screensaver
sudo apt-get install xscreensaver xscreensaver-gl-extra xscreensaver-data-extra

Then search for "Screensaver" in the menu and tweak its settings to your needs.

To add Xscreensaver to startup, open Startup Applications and add "xscreensaver -nosplash".

To get CTRL + ALT + L to lock the screen and start the screensaver, go to System Settings > Keyboard and on the "Shortcuts" tab, under "System", change the "Lock screen" keyboard shortcut from CTRL + ALT + L to something else, then under "Custom Shortcuts", click the "+" button to add a new custom shortcut, under "Name" enter "Xscreensaver" and under "Command" enter "/usr/bin/xscreensaver-command -lock", then click "Apply".

And finally, click next to the newly created shortcut and press CTRL + ALT + L to assign it to it (or use any other keyboard shortcut you want, but make sure it's not already assign to something else). Alternatively, you can run the following command instead of assigning a new keyboard shortcut for the old screensaver:

sudo ln -s /usr/bin/xscreensaver-command /usr/bin/gnome-screensaver-command

To revert the changes (go back to the black GNOME Screensaver screen), use the commands below:

sudo apt-get remove xscreensaver xscreensaver-gl-extra xscreensaver-data-extra
sudo rm /usr/bin/gnome-screensaver-command
sudo apt-get install gnome-screensaver

If you've used the alternative method to assign CTRL + ALT + L to Xscreensaver lock screen, open System Settings > Keyboard again, remove the custom Xscreensaver command and assign CTRL + ALT + L back to "Lock screen" (under "System").

To manually lock, use the "Ctrl + Alt + L" key combo. For automated locking use the "Brightness and Lock" applet in "System Settings"


How to launch a newly installed program I have just downloaded and installed Google Chrome for Linux, using Software Center. How do I now run the browser? This was simple in Windows - the program would typically be appended to the Start Menu, but there is no such thing in Ubuntu. I've noticed that stuff related to Chrome has been installed in the /opt/ directory, but I cannot find the equivalent to a .exe that would launch the browser.

After you successfully installed Google Chrome, click on the Dash and search for "Chrome". When you find it, open it:

Another way is to open the terminal and run inside of it the following command:

google-chrome

Next, if you want to have it all the time on the Launcher, just right click on the Google Chrome icon from the Launcher when it is opened and select "Lock on Launcher":

In general, when you set it to install something, the icon shows at the bottom of the left dash icons, with a progress bar. When it is finished, click to run it.


Problem installing steam in Ubuntu 16.04 I have just install steam from the terminal as you can see:

But when I try to open steam as you can see:

And finally, if I continue with it I get this:

I have already install the Canonical packages from software update, I have tried use the .deb file from steam website but it also didn't work, it always shows me the same. Also, if I click on steam icon it shows me the same image 3.

So, what should I do?

If you're getting

Error: "You are missiing the following 32-bit libraries, and Steam may not run: libc.so.6"

try running:

sudo apt-get install libc6-i386


Some devices don't work on 3.0 USB port? My laptop a HP DV6-1149wm has 2x 3.0 USB, and 2x 2.0 USB ports.

Some devices will work fine on both, like flash drives, but some other devices, like my iPod, and my Android phone will not work on my 3.0 ports.  They just don't show up at all, lsusb shows nothing, nor syslog.

Any idea why it is device-specific?  Or is there any way to force my 3.0 ports to act as 2.0 for the time being? I don't have any 3.0 devices.

You didn't say which version of Ubuntu you are using. USB 3.0 is problematic (buggy) in all versions prior to 12.04 in my personal experience.

Your best options may be to upgrade to 12.04 (or upgrade your kernel to at least 3.2).

Also, your drivers could not be fully functioning yet. There is a reason you're not supposed to use USB3 for important installs yet.


Will Ubuntu run smoothly on my 2012 MacBook Air? Tech Specs:

1.7GHz dual-core Intel Core i5 (Turbo Boost up to 2.6GHz) with 3MB shared L3 cache
4GB of 1600MHz DDR3L on-board memory
Intel HD Graphics 4000
64GB flash storage

Mostly It'd..because it runs fine on my brother's 1.6Ghz dual core Atom, but it may use up to 12gb of your flash storage.

I think the retina display might impose some problem, ubuntu is not yet ready to be working with such high pixel display.


How to get Ubuntu-desktop back after once removing it completely In past 6 months, I have tried to experiment with different desktop environments. At first, I completely removed Ubuntu-desktop-environment and installed Kubuntu-desktop. It was successful. Then after some days I installed Lubuntu-dektop. It was successful too. However, I miss Ubuntu-desktop now, and I want to get back to my Ubuntu-desktop. How to do it?

Thanks.

Update:
I have done the following:

sudo apt install ubuntu-desktop

sudo apt-get install ubuntu-gnome-desktop

sudo apt-get install gnome-shell

And as a result I have got many options to login with. But When I choose Ubuntu after reconfiguring into lightdm it says insufficient memory.

I also tried reconfiguring to gdm and after reboot it does not show previous users but shows a welcome screen to create a new user. After I make a new user, I login just to get a black screen.

Now, as suggested by WinEunuuchs2Unix, I tried

sudo apt install --reinstall lightdm

and lightdm error is gone. I am able to log into unity-dektop, now.

gdm part is still remaining.

It is much easier to install ubuntu-desktop and leave lubuntu installed, it is much easier to reinstall Ubuntu

sudo apt install ubuntu-desktop lightdm

We included lightdm in case it was removed

You may also need to reconfigure lightdm

sudo dpkg-reconfigure lightdm

If you wish to remove lubuntu-desktop you will need to examine the package and remove them one by one, you do not want to remove or purge the desktop, depending on your situation this may produce unpredictable results
While the notes say that it's ok to use apt remove lubuntu-desktop I have destroyed several installations this way

Since ubuntu-desktop and lubuntu-desktop are meta-packages you may have some luck examining the differences between the two with commands like apt show ubuntu-desktop and apt show lubuntu-desktop

If you are having problems with other packages that are installed you could try sudo dpkg-reconfigure package-name on the package you are having trouble with, this will resolve most issues

Make a backup from your important data. Before you install anew try

sudo apt purge lubuntu-desktop lubuntu-default-session  kubuntu-desktop plasma-desktop  plasma-workspace

Make a simulation for

sudo apt --dry-run autoremove purge

Take a good look, what would be removed. You need a displaymanager and a networkmanager on your system.

sudo apt autoremove purge


How to press ENTER in Nano on Ubuntu-touch via abd? When I'm connected to Ubuntu Touch (bq Aquaris E4.5 Ubuntu-Edition phone) via adb shell and I'm editing a shell script with Nano.

How can I press ENTER to save changes? Nano does not accept the Enter key via adb shell.

You must use phablet-shell command rather than adb shell. It open a console with the device too. Then, you can put enter in nano and save files.


Grub Error after installing Ubuntu 12.10 I received a GRUB error after upgrading my perfectly working Ubuntu 12.04 installation to 12.10. The machine is a fairly new Toshiba C640 Satellite laptop. Ubuntu was the only OS on it.

The solution being suggested is to reinstall 12.04 which is unacceptable, as I have a lot of docs and files in my home folder which I can't lose. Is there a way to perform a rollback or reinstall without losing my files and settings? If not, why was 12.10 released when it doesn't work? Just curious.

You could download and burn this disc, Ubuntu Secured Remix,
It is also a live cd where you can boot it from the cd and then use Boot-Repair to repair GRUB.
Hope this helps

ubuntu secured remix

Re the re-installation of GRUB, I found this solution great.
http://ubuntuguide.net/how-to-restore-grub-2-after-reinstalling-windows-xpvistawin7

The site takes you through the steps to install Boot repair from your live boot, and this is quite smooth. I've used it a couple of times messing around with my home PC - wife and kids were thrilled to bits when they got their installation back :)

Re docs and other settings, I have found a nifty way to future-proof this. Learned it from a friend.
When you partition the system for installing windows,(or even just for Ubuntu) keep

(1) a 15 GB partition separately for the system folder "/" ,

(2) A separate partition equal to 2-times-the RAM for SWAP, and

(3) A separate "/home" partition. This way, whenever you want to update your Ubuntu version, all you need to do while installing, is to select "something else" during the partitioning process. Mark this 15 GB and format as Ext4, use this partition as   "/". Mark this  partition to be formatted.

Now is the best part.

Mark the existing /home partition that you are already using to be mounted as "/home" but DO NOT FORMAT IT. (that is, don't check the "format" box)
Make sure that you give the existing user name and password when installing the new version . This way, once you reinstall,your system will be installed (old one will be deleted, of course) and your entire home folder will remain as it is. Not only that, much to my pleasant surprise, even my addons, bookmarks, saved passwords - everything was fully intact.

You will need to however, update the software, and reinstall all the other software / packages that you want, once again , since the new one will not be compatible.

You could also try to google for "aptoncd" which is a programme used to backup your existing installation packages, and this can be re-installed on your other computer  (or friend's Comp) running the same version of Ubuntu so you don't need to download the packages each time. You will have to select these packages from the Ubuntu Software Centre. It will not download these packages.

Hope this helps - at least for the future.
(I did exactly this - had to go back to 12.04 after installing 12.10)

Yash


How can I fix "The package system is broken"? These are the updates:

-Safe and easy web browser from Mozilla firefox
-Safe and easy web browser from Mozilla- Unity menubar integration firefox-gobalmenu
-Safe and easy web browser from Mozilla-GNOME support firefox-gnome-support
-Linux kernal image for version 3.5.0 on 32 bit x86 SMP linux-image-3.5.0-gereric (New install)

And this is the output:

The package system is broken

Check if you are using third party repositories. If so disable them, since they are a common source of problems.
Furthermore run the following command in a Terminal: apt-get install -f

Details:

The following packages have unmet dependencies:

linux-image-generic-lts-quantal: Depends: linux-image-3.5.0-26-generic but it is not installed

a few simple things I would try when this happens: (but I am not an expert...)
- click the Check button again before clicking the install updates button.
- disable ppa's that cause problems (I don't know whether you use a ppa for linux-image-generic-lts-quantal?)
- chose an other Download server under update manager -> settings -> ubuntu Software -> download from:


Bluetooth speaker via ALSA I have Lubuntu 14.10 so I run ALSA instead of PulseAudio and I am not about to change it. blueman-manager lets me detect my speaker as headphones but choosing Setup-Audio Receiver(A2DP) results in error The device has been successfully added but playback is impossible (nearly translated). Launching this manager from console complements error mentioned above with this output. I googled the problem around, but most of the information I found felt very, very outdated. So I thought that it would be safer to re-raise the issue here. Searching for bluetooth in Synaptic results in  Everything was here before, I only tried to install bluez-alsa, but it didn't change anything. Before going any further and randomly trying advices from those suspicious obsolete guides I halted and I'm here, waiting for your solutions

UPD: I looked into similar questions and tried this script which seemed simple and comprehensible. It printed same error that GUI applet did

mekkanizer@N76VB:~$ ./калонка.sh on
Connecting to /org/bluez/7563/hci0/dev_CC_C5_0A_62_E8_43...
Error org.bluez.Error.Failed: Stream setup failed

UPD2: Installed an additional pile of useless packages (screenshot updated), still no effect

Seems every laptop I wanted to connect to headphones using bluetooth I had to sudo pactl load-module module-bluetooth-discover and then redo the pairing to get the headphones to work


libc6:i386 : Depends: libgcc1:i386 but it is not going to be installed (on 14.04.2 64-bit) Please do not mark this as duplicate. I already studied
libc6:i386 : Depends: libgcc1:i386 but it is not going to be installed
and
How do I resolve unmet dependencies after adding a PPA?
and tried all their suggestions. Still, I cannot install libc6:i386 and, therefore, cannot run any 32-bit apps on my newly installed Ubuntu 14.04.2 64-bit.

sudo apt-get -f install libc6:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
  libc6:i386 : Depends: libgcc1:i386 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

sudo apt-get -f install libgcc1:i386
...
The following packages have unmet dependencies:
 libgcc1:i386 : Depends: libc6:i386 (>= 2.2.4) but it is not going to be installed
                PreDepends: multiarch-support:i386
E: Unable to correct problems, you have held broken packages

sudo apt-get -f install multiarch-support:i386
...
The following packages have unmet dependencies:
 multiarch-support:i386 : Depends: libc6:i386 (>= 2.13-5) but it is not going to be installed
E: Unable to correct problems, you have held broken packages

I also tried:

sudo apt-get -f install libc6-i386
...
libc6-i386 : Depends: libc6 (= 2.19-0ubuntu6) but 2.19-0ubuntu6.5 is to be installed

By the way, what's the difference between libc6-i386 and libc6:i386?

cat /etc/apt/sources.list
  (I removed comments)
deb http://us.archive.ubuntu.com/ubuntu/ trusty main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty main restricted
deb http://us.archive.ubuntu.com/ubuntu/ trusty universe
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty universe
deb http://us.archive.ubuntu.com/ubuntu/ trusty multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty multiverse
deb http://extras.ubuntu.com/ubuntu trusty main
deb-src http://extras.ubuntu.com/ubuntu trusty main

cat /etc/apt/sources.list.d/*
  nothing

So, simple question: how to run 32-bit apps on Ubuntu 14.04.2 64-bit?

I had this same issue and after searching the internet over and over nothing seemed to work. Then I noticed the version's being referenced and that the the numbers were off for the version of Ubuntu 2.4.X installed but required 2.6.11??! Pretty fishy!!! So on a very wild shot in the dark and feeling like it was this or a re install I downloaded the latest kernel set and installed it ...POOF issue gone!. I am including a link to the kernel repo. make sure you grab all 3 files of whatever your going with (Master Header, Headers, and image..master header will be the top file in the group). Put all three in there own folder and run a batch dpkg install from the folder. That way the packages are installed in the proper order. Reboot right after, oh and dont get scared and start reading about the patch files... That is only if you are going to compile your own kernel. Not a complicated process like some will have you think.
Kernel Repository


How to diagnose problems with a DVD drive? I'm having trouble playing DVDs. I've installed all the libraries and whatnot (ubuntu-restricted-extras, libdvdcss2, libdvdread4, etc.). I was getting a lot of I/O errors on my DVD drive at startup and when I tried to play a DVD.

But I just bought a new DVD drive and I'm having the same problem. I switched out the SATA cables and tried a couple different SATA ports on my mother board, so I'm pretty sure that's not the issue.

Basically, the situation is this. I start up and after BIOS loads, but before GRUB shows up, I get a quick error saying error: cdrom read error. Then I boot normally, and everything is seemingly great. If I put in a DVD, it mounts, but I'm not able to play it or copy the files off of it.

I did a dmesg | tail before and after putting in the DVD.

Before

[  119.467771] wlan0: direct probe responded
[  119.515673] wlan0: authenticate with 00:23:69:5b:30:0f (try 1)
[  119.519117] wlan0: authenticated
[  119.520288] wlan0: associate with 00:23:69:5b:30:0f (try 1)
[  119.522256] wlan0: RX AssocResp from 00:23:69:5b:30:0f (capab=0x411 status=0 aid=2)
[  119.522259] wlan0: associated
[  119.523002] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[  119.840039] Intel AES-NI instructions are not detected.
[  119.976906] padlock_aes: VIA PadLock not detected.
[  129.770718] wlan0: no IPv6 routers present

After

[  256.096324] cfg80211:     (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[  256.096326] cfg80211:     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[  256.096329] cfg80211:     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[  257.539308] wlan0: authenticate with 00:23:69:5b:30:0f (try 1)
[  257.541105] wlan0: authenticated
[  257.541129] wlan0: associate with 00:23:69:5b:30:0f (try 1)
[  257.543374] wlan0: RX AssocResp from 00:23:69:5b:30:0f (capab=0x411 status=0 aid=1)
[  257.543378] wlan0: associated
[  273.100632] UDF-fs: Partition marked readonly; forcing readonly mount
[  273.126058] UDF-fs INFO UDF: Mounting volume 'DVD_MOVIE', timestamp 2002/04/15 14:14 (1ed4)

so no errors there. With my old drive I was getting a whole host of errors, none of which seem to be appearing now. Unfortunately they don't seem to be the cause of the problem.

Does anyone have any idea what's wrong or how I might diagnose this?

Just an update to the issue. I've just tried playing a DVD on the same computer running Windows 7 and there was no issue. So now I'm just confused. I assumed the error message at boot indicated a hardware issue, but Windows doesn't seem to care. So I guess it's just Ubuntu that has an issue.

To make your drive region free you need to flash new firmware onto it so that the drive itself will not check the region.  This is knows as RPC1, search for  rpc1.org.  New drives won't read "out of region" DVDs.

To enable greater DVD support open Accessories;Terminal and enter the following two commands:

sudo apt-get install ubuntu-restricted-extras

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


In a bash script what does a dot followed by a space and then a path mean? I came across this example when trying to mount a usb device inside a openvz container and I have never seen the construct in the second line before. Can you explain what it signifies?

#!/bin/bash
. /etc/vz/vz.conf

It's a synonym of the builtin source. It will execute commands from a file in the current shell, as read from help source or help ..

In your case, the file /etc/vz/vz.conf will be executed (very likely, it only contains variable assignments that will be used later in the script). It differs from just executing the file with, e.g., /etc/vz/vz.conf in many ways: the most obvious is that the file doesn't need to be executable; then you will think of running it with bash /etc/vz/vz.conf but this will only execute it in a child process, and the parent script will not see any modifications (e.g., of variables) the child makes.

Example:

$ # Create a file testfile that contains a variable assignment:
$ echo "a=hello" > testfile
$ # Check that the variable expands to nothing:
$ echo "$a"

$ # Good. Now execute the file testfile with bash
$ bash testfile
$ # Check that the variable a still expands to nothing:
$ echo "$a"

$ # Now _source_ the file testfile:
$ . testfile
$ # Now check the value of the variable a:
$ echo "$a"
hello
$

Hope this helps.

When a script is run using `source' it runs within the existing shell, any variables created or modified by the script will remain available after the script completes.

Syntax
      . filename [arguments]

  source filename [arguments]


System boots straight into Windows without showing GRUB I installed Ubuntu alongside Windows but I did not disable secure boot as someone told me it could cause problems with boot loader. So when installation finished and I rebooted, the system went straight into Windows. I went to Ubuntu IRC Support and they told me to turn off the secure boot and reinstall Ubuntu. I did that but my system still
boot into windows.

This is a picture of partitions on my system:

This is my first Ubuntu install on my new laptop.
I followed everdaylinux guide to install it and I used something else option.

Re-installing GRUB is almost certainly overkill, and carries a small risk of messing things up. Instead, try this:

Boot to Windows.
Open an Administrator Command Prompt window by right-clicking the Command Prompt icon and selecting the option to run it as Administrator.
Type bcdedit /set {bootmgr} path \EFI\ubuntu\shimx64.efi
Reboot.
If you boot into Ubuntu but GRUB did not give you a menu or if that menu did not include Windows, type sudo update-grub in a Terminal.

That should fix it. Alternatively, instead of steps #2-3, you could try the third-party EasyUEFI, which gives you a GUI menu for rearranging EFI boot priorities. Some EFIs provide similar functionality in their setup utilities. You can also do the same thing with efibootmgr in Ubuntu, but that sometimes fails due to bugs in either efibootmgr or EFIs, and it's harder to explain than is the same procedure with bcdedit in Windows.

ISSUE --

  " I CAN'T ACCESS THE GRUB (UBUNTU) MENU BECAUSE MY LAPTOP/PC BOOTS
  DIRECTLY TO WINDOWS. "

SOLUTION --

  " PRESS THE KEY THAT OPENS YOUR BIOS SETTINGS DURING START. UNDER BOOT
  CONFIGURATIONS,YOU SEE UEFI BOOT ORDER , CLICK ON /OS BOOT
  MANAGER/ (ON TOP) , PRESS F5/F6 TO CHANGE THE PRIORITY OF WINDOWS /
  UBUNTU . KEEP UBUNTU ON TOP.

VOILA! IT'S DONE. :)


Nokia Bluetooth headset Bh 503 not recognized I bought an Nokia Bluetooth Phone Bh 503. It works just fine with my Android phone, but with Ubuntu it even get recognized. I already paired the Ubuntu with my Android, but with the bluetooth phone it even find it.

What can be the problem?

Already search in Google for answers, but almost always the problem is with bluetooth that doesn't work, but in my case it works, but not with the headset.

Already install almost all packages about bluetooth, like blueman, bluez, gnome-bluetooth, bluetooth, etc.

(comment to answer solved issue)

I just connected my bh-503 few days ago with precise, you have to turn-off and turn-on again your headset, when turning on hold the button until the lights turn into blue and green, scan the device. that works for me. but the audio is very awful. it works great with lucid. – erickjohncuevas Jan 23 at 10:25
It's just working, I Don't have sure if it's because the packages or not. – euDennis Mar 9 at 0:14

The awful sound can be solve by changing the mode to High Fidelity Playback(A2DP) at sound setting there.

step:

go to sound setting
click Headset Nokia BH-503
change the mode to High Fidelity Playback(A2DP)

Then viola! problem solve!


Snap packages can't use my SSH key I have installed GitKraken, a git client, through snappy.

$ sudo snap install gitkrakren

But when I try to push to my repository, I get an authentication error. This was weird since I can make the push from the terminal without problems. So I went into the configuration and tried to manually set the public and private key. But when I tried to open the folder ~/.ssh I got a message that it was forbidden.

Could it be that GitKraken uses its own SSH keys, since it is a snap package?
Is there a way to make it use my own keys or am I forced to use the SSH keys from the snap package?
If it is the last case, where can I find them?

It is intentional that by default confined snaps cannot access your ssh keys (or indeed anything in hidden folders/files in your home directory) for good reason. You don't want a random application grabbing your keys and sending them to a remote server.

You can however copy all or some of your keys from ~/.ssh into the home directory the snap sees under ~/snap/gitkraken/current/

Since there is a reason NOT to allow snaps to access your .ssh directly I would advice to copy only PUB key to a 'readable' folder.

I created a second .sshpub folder and copied over only the public keys to it, not the private ones.

mkdir ~/.sshpub
cp ~/.ssh/*.pub ~/.sshpub


How can I break out of ssh when it locks? I frequently ssh into my box at home from school, but usually when I change classes and my computer suspends, the pipe will be broken. However, ssh simply locks up - Ctrl+c, Ctrl+z and Ctrl+d have no effect.

It's annoying to have to restart my terminal, and even more annoying to have to close and re-create a new screen window.

So my question, is there an easy way to make ssh die properly (i.e. when the pipe fails "normally" it will exit with a message about a broken pipe)? Or do I have to figure out what the PID is and manually kill it?

Normal keys are forwarded over the ssh session, so none of those will work. Instead, use the escape sequences. To kill the current session hit subsequently Enter, ~, ..
(Keep in mind that in international keyboards where ~ is set to be a composing character, you have to hit it twice: Enter, ~, ~, .)
More of these escape sequences can be listed with Enter, ~, ?:
Supported escape sequences:
     ~.   - terminate connection (and any multiplexed sessions)
     ~B   - send a BREAK to the remote system
     ~C   - open a command line
     ~R   - request rekey
     ~V/v - decrease/increase verbosity (LogLevel)
     ~^Z  - suspend ssh
     ~#   - list forwarded connections
     ~&   - background ssh (when waiting for connections to terminate)
     ~?   - this message
     ~~   - send the escape character by typing it twice
(Note that escapes are only recognized immediately after newline.)

You can close the list of Escape sequences by hitting Enter.
Notice that because hitting ~~ causes ssh to send the ~ instead of intercepting it, you can address N nested ssh connections by hitting ~ N times. (This only applies to ~s that directly follow an Enter.) That is to say that Enter~~~~~. terminates an ssh session 5 layers deep and keeps the other 4 intact.

As noted in geekosaur's answer, the escape sequence ~. will terminate the connection.

The full list of escape sequences and what they do can be displayed by typing ~?:

Supported escape sequences:
  ~.  - terminate connection (and any multiplexed sessions)
  ~B  - send a BREAK to the remote system
  ~C  - open a command line
  ~R  - Request rekey (SSH protocol 2 only)
  ~^Z - suspend ssh
  ~#  - list forwarded connections
  ~&  - background ssh (when waiting for connections to terminate)
  ~?  - this message
  ~~  - send the escape character by typing it twice
(Note that escapes are only recognized immediately after newline.)


Bash script not executing from crontab I have the following bash script:

#!/bin/bash
mysqldump -u ******** -p********  --all-databases | gzip > /home/srvlinux01/MySQLBackups/database_$(date +\%Y-\%m-\%d).sql.gz

which is located in /home/srvlinux01/MySQLBackups/ as backup.sh with the following permissions

-rwxr--r-- 1 root       root           134 feb 27 12:48 backup.sh

I've set up a cronjob on sudo crontab -e to run it every day, at night

#Automatic MySQL backup
30 3 * * * sh /home/srvlinux01/MySQLBackups/backup.sh

But I get emailed the following error:

sh: 0: Can't open /home/srvlinux01/MySQLBackups/backup.sh

I've been trying different setups, but can't figure out what is wrong. I can run the script manually and everything goes perfectly, so I guess there is something wrong with my cronjob entry, but can't really understand what. Could you please help me figure it out? Thanks!

You need to give your cron a PATH. For instance:

SHELL=/bin/sh PATH=/bin:/sbin:/usr/bin:/usr/sbin

In your case, try putting this before your command. Check the community wiki in this question for more information on why the PATH variable is needed. Here is an excerpt; essentially the idea is that cron does not read /etc/environment:

  A common "gotcha" is the PATH environment variable being different. Maybe your cron script uses the command somecommand found in /opt/someApp/bin, which you've added to PATH in /etc/environment? cron does not read that file, so running somecommand from your script will fail when run with cron, but work when run in a terminal. To get around that, just set your own PATH variable at the top of the script.

You forgot the dot '.' before the execution path.

30 3 * * * sh ./home/srvlinux01/MySQLBackups/backup.sh
              ^


How do I enable wireless on HP Pavilion dm1? My wireless network is physically enabled and the "enable wireless" appears properly on the top menu, however checking it doesn't seem to have any affect. Anyone came across this problem? I have a new HP Pavilion dm1-4000, installed Ubuntu 11.10 yesterday.

The wireless worked fine yesterday, today I've got nothing. It also seems to have problems with the wired connection, however I have no idea if it's related.

in terminal type:

sudo rfkill unblock all

dv2000 wireless button has some detailed erratic issue , i use this command always works
cheers

Ndiswrapper, good tool. You take a windows driver of wifi adapter, and install on Ubuntu with this tool


How to disown a chromium or chrome app on double click I wrote a bash script to open an app (by double click) in my chromium. The code works but after opening the app when i close terminal the app also closes. I have searched through web and found out nohup, disown and & commands  and tried it on my bash script but nothing works can you tell me what is happening

This will open the app

#!/bin/bash
/usr/bin/chromium-browser --disable-gpu --enable-offline-auto-reload --enable-offline-auto-reload-visible-only --app=chrome-extension://jbnkffmindojffecdhbbmekbmkkfpmjd/foreground.html

when i added disown to it the app is not even opening

#!/bin/bash
/usr/bin/chromium-browser --disable-gpu --enable-offline-auto-reload --enable-offline-auto-reload-visible-only --app=chrome-extension://jbnkffmindojffecdhbbmekbmkkfpmjd/foreground.html & disown

Try the following code:-

nohup /usr/bin/chromium-browser --disable-gpu --enable-offline-auto-reload --   enable-offline-auto-reload-visible-only --app=chrome-extension://jbnkffmindojffecdhbbmekbmkkfpmjd/foreground.html &

Is this what you wanted? Did it work for you?

disown is a separate command you have run it on it's own. The best way to do so is to put it in an extra line:

#!/bin/bash
/usr/bin/chromium-browser --disable-gpu --enable-offline-auto-reload --enable-offline-auto-reload-visible-only --app=chrome-extension://jbnkffmindojffecdhbbmekbmkkfpmjd/foreground.html &
disown


How to switch preinstalled Ubuntu from Windows 8? I have Ubuntu preinstalled in my PC and I have installed Windows 8 afterwards. Now I want to use Ubuntu but don't know how to open it. Please help!

You might have to give more details on how exactly are you unable to access your ubuntu. One of the problems might be with your grub loader. A grub menu basically lists all the available operating systems installed in your computer. You might have to install a custom grub so that you can get the access to grub menu.

"When you install Windows, Windows assumes it is the only operating system (OS) on the machine, or at least it does not account for Linux. So it replaces GRUB with its own boot loader. What you have to do is replace the Windows boot loader with GRUB. I've seen various instructions for replacing GRUB by mucking around with GRUB commands or some such, but to me the easiest way is to simply chroot into your install and run update-grub. chroot is great because it allows you to work on your actual install, instead of trying to redirect things here and there. It is really clean.

Here's how:

Boot from the live CD or live USB, in "Try Ubuntu" mode.
Determine the partition number of your main partition. GParted (which should already be installed, by default, on the live session) can help you here. I'm going to assume in this answer that it's /dev/sda2, but make sure you use the correct partition number for your system!

Mount your partition:

sudo mount /dev/sda2 /mnt  #Replace sda2 with your partition number

Bind mount some other necessary stuff:

for i in /sys /proc /run /dev; do sudo mount --bind "$i" "/mnt$i"; done

chroot into your Ubuntu install:

sudo chroot /mnt

At this point, you're in your install, not the live session, and running as root. Update grub:

update-grub

If you get errors, go to step 7. (Otherwise, it is optional.)

Depending on your situation, you might have to reinstall grub:

grub-install /dev/sda
update-grub # I'm not sure if this is necessary, but it doesn't hurt.

If everything worked without errors, then you're all set:

exit
sudo reboot

At this point, you should be able to boot normally.

If you cannot boot normally, and didn't do step 7 because there were no error messages, try again with step 7.

Sometimes giving GRUB2 the correct configuration for your partitions is not enough, and you must actually install it (or reinstall it) to the Master Boot Record, which step 7 does. Experience helping users in chat has shown that step 7 is sometimes necessary even when no error messages are shown."

-This ain't my answer.


Failed to increase root partition size ( / ) with Gparted, Ubuntu 16.04 When am trying to increase the root partition (/) on Ubuntu 16.04 using Gparted it failed and gave me this message.

# umount -v "/"
umount: /: target is busy
        (In some cases useful info about processes that
         use the device is found by lsof(8) or fuser(1).)

What other method can I use to extend my root partition.

While doing df -h returns

Filesystem      Size  Used Avail Use% Mounted on
udev            2.9G     0  2.9G   0% /dev
tmpfs           591M  8.9M  582M   2% /run
/dev/sda1       138G  111G   20G  85% /
tmpfs           2.9G  336K  2.9G   1% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           2.9G     0  2.9G   0% /sys/fs/cgroup
/dev/sda5        20G  243M   18G   2% /boot
tmpfs           591M   68K  591M   1% /run/user/1000
/dev/sda3       197G   25G  173G  13% /media/kilasa/Personal-db
/dev/sda7       116G   17G   99G  15% /media/kilasa/Water
/dev/sda6       194G   59G  125G  33% /media/kilasa/Tutorials
/dev/sda4       176G   51G  125G  29% /media/kilasa/Wind

While lsblk returns

 NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 931.5G  0 disk
├─sda1   8:1    0 139.9G  0 part /
├─sda3   8:3    0 196.6G  0 part /media/kilasa/Personal-db
├─sda4   8:4    0 175.8G  0 part /media/kilasa/Wind
├─sda5   8:5    0  19.6G  0 part /boot
├─sda6   8:6    0 196.5G  0 part /media/kilasa/Tutorials
└─sda7   8:7    0 115.2G  0 part /media/kilasa/Water
sr0     11:0    1  1024M  0 rom
sr1     11:1    1   128M  0 rom

The screenshot I took from Gparted shows this

View Gparted Screenshot

The error you received was because the partition was currently being used by your current session.

The only way to safely move/resize partitions is to boot from a Ubuntu LiveCD and use gparted. This way, the partitions on hard disk are not actively being used.

If you need further help, please post a screenshot of how gparted see's your disk configuration now. Please explain more about your intent for the final/new disk configuration. Then I can give a better recommendation.

In gparted, Rclick the partition to the R of /, select 'unmount'. Rclick on the unmounted partition, delete it. Then Rclick on your / partition (doesn't matter if it is mounted), select 'resize', and expand into the empty space.

If you don't want to delete the partition that is to the right of /, you can delete a partition to the left of /, then copy the partition to the right of / into the empty space by opening a terminal (ctrl+alt+t) then
$ sudo dd if=/dev/sd!!! of=/dev/sd@@@
where sd!!! is the partition you want to copy, and sd@@@ is the partition you want to delete. Make sure sd@@@ is unmounted. You may prefer to use
$ copy if=/dev/sd!!! of=/dev/sd@@@, if you have formatted sd@@@ as ext4.

If you want to move / to the left, you will have to close the computer then reboot into a live usb/CD, unmount / partition, then shift it to the left (which can be very time consuming).

Of course, you can only copy a partition into a space at least as large as that which you copy. You may need to shrink a partition by unmounting it, then (using gparted) resizing it. After you copy it, you can expand it to fill empty space in the partition. To do this, in gparted Lclick the partition,  select 'Partition' from the dropdown menu, then select 'Disks' from the menu, and the next option for repair or somesuch.

In effect, you can use gparted to totally re-arrange your partitions' alignment. You can delete the swap space (after first Rclick and select 'swapoff', then recreate it.

The drawback to doing this is boot-up time blows out, I suspect root partition is not sure where swap has moved to. Perhaps someone can enlighten...


No sound after 14.10 -> 15.04 -> 15.10 upgrade I've upgraded from 14.10 to 15.04 and then directly to 15.10.

I have a TV connected to the computer via HDMI cable.
The sound was working ok after the upgrade but after using the TV and coming back to the computer, I do not have the sound anymore.

Tried restarting the computer but no sound.
When getting the logging screen, I do hear the sound though.

Looking into the settings->sound I only have the digital option and no analog option in the drop down menu.

Things I've tried:

sudo alsa force-reload

Killed the pulseaudio process and it restarted again automatically. Still no sound.

Reinstalled Alsa and Pulseaudio

$ sudo apt-get remove --purge alsa-base pulseaudio
$ sudo apt-get install alsa-base pulseaudio
$ sudo alsa force-reload

Restarted but no success.
I also lost the volume icon in the top bar and the settings-sound looks a bit different now.

The device option did change though and now shows

HDMI / DisplayPort - built-in Audio

instead of just built-in Audio

Tried uninstalling Alsa and Pulse and reinstalling with the HDMI and TV not connected to the computer but got the same results.

Deleting the .config->pulse folder + logout, login didn't help

Here is the result of a $ aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: MID [HDA Intel MID], device 0: VT1708S Analog [VT1708S Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

card 0: MID [HDA Intel MID], device 3: VT1708S Digital [VT1708S Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

card 2: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

In the settings->sound profile, I only have

  Digital Stereo (HDMI) Output

This is a screen shoot of the Alsamixer

Any ideas?

Thanks a lot

I'm answering my own question. I found out that the card profile is changing automatically to Digital each time I choose to use a different card (the one from the TV) and come back to the one of the computer.
So, it come back to

  Digital Stereo (HDMI) output

and I need to change it manually each time to

  Analog Stereo Output (unplugged)

It is a bit strange to me because the Analog Stereo is marked as "unplugged" but it is working and I'm getting the sound back.

Tried to change the default profile of the card but no success so far. I will open another question about it

Try in console, as normal user:

pacmd set-card-profile 0 output:analog-stereo

and reiniciate, after that analog stereo will be configurated


How to see all my fans in sensors? I use Ubuntu 18.04.2, I installed lm-sensors and what it gives when I command sensors in the terminal:

(base) avy@avy-Moi:~$ sensors
asus-isa-0000
Adapter: ISA adapter
cpu_fan:        0 RPM

acpitz-virtual-0
Adapter: Virtual device
temp1:        +27.8°C  (crit = +119.0°C)

nouveau-pci-0100
Adapter: PCI adapter
fan1:           0 RPM
temp1:        +35.0°C  (high = +95.0°C, hyst =  +3.0°C)
                   (crit = +105.0°C, hyst =  +5.0°C)
                   (emerg = +135.0°C, hyst =  +5.0°C)

coretemp-isa-0000
Adapter: ISA adapter
Package id 0:  +27.0°C  (high = +82.0°C, crit = +100.0°C)
Core 0:        +26.0°C  (high = +82.0°C, crit = +100.0°C)
Core 1:        +26.0°C  (high = +82.0°C, crit = +100.0°C)
Core 2:        +27.0°C  (high = +82.0°C, crit = +100.0°C)
Core 3:        +27.0°C  (high = +82.0°C, crit = +100.0°C)
Core 4:        +25.0°C  (high = +82.0°C, crit = +100.0°C)
Core 5:        +27.0°C  (high = +82.0°C, crit = +100.0°C)

But my fans are not appearing, and I have 4. 3 only for the box itself and connected to the motherboard, 1 for the watercooling device which is also connected to the motherboard.

Even with fancontrol:

(base) avy@avy-Moi:~$ sudo pwmconfig
# pwmconfig revision 6243 (2014-03-20)
This program will search your sensors for pulse width modulation (pwm)
controls, and test each one to see if it controls a fan on
your motherboard. Note that many motherboards do not have pwm
circuitry installed, even if your sensor chip supports pwm.

We will attempt to briefly stop each fan using the pwm controls.
The program will attempt to restore each fan to full speed
after testing. However, it is ** very important ** that you
physically verify that the fans have been to full speed
after the program has completed.

Found the following devices:
   hwmon0 is acpitz
   hwmon1 is coretemp
   hwmon2 is asus
   hwmon3 is nouveau

Found the following PWM controls:
   hwmon3/pwm1           current value: 0
hwmon3/pwm1 is currently setup for automatic speed control.
In general, automatic mode is preferred over manual mode, as
it is more efficient and it reacts faster. Are you sure that
you want to setup this output for manual control? (n) y

Giving the fans some time to reach full speed...
Found the following fan sensors:
   hwmon2/fan1_input     current speed: 0 ... skipping!
   hwmon3/fan1_input     current speed: 0 ... skipping!

There are no working fan sensors, all readings are 0.
Make sure you have a 3-wire fan connected.
You may also need to increase the fan divisors.
See doc/fan-divisors for more information.

I came across this problem a while back. From what I understand, the kernel is preventing lm-sensors from looking at fan usage, so I modified my GRUB settings to allow lm-sensors to access this information. First, open the configuration file:

sudo gedit /etc/default/grub

Then set the GRUB_CMDLINE_LINUX option to the following:

# This allows fan usage to be read by lm-sensors
GRUB_CMDLINE_LINUX="acpi_enforce_resources=lax"

Save the file and close, then update your GRUB settings:

sudo update-grub

Executing sensors in the terminal should show your fans' RPMs now.  It may be the case that not every fan for your machine is being shown - for my machine, none of the ASST_FANs are shown.

Perhaps I could solve this issue by making a configuration for your mobo, as described here, but I am happy with the information I have been able to get with the adjustment to the GRUB configuration.

Go to the standard Ubuntu Software, press Add-ons and go to the Shell extensions TAB.
Find "Sensory Perception GNOME Shell Extension."press install.

All temp sensory info are shown next to the clock.

Works perfectly out of the box after a fresh install.


How do I get a 3G USB modem to work? Since at least Jaunty, I've tried to get my wife's 3G USB modem to work on Ubuntu, always with the same result - instant, complete system freeze.

I've tried installing`wvdial and usb-modeswitch, I've read tons of documentation but it gets quite disjointed from one release to the next, nothing works. I can't run lsusb because the system hangs immediately.

I'm using Lucid and it's a Rogers "Rocket Stick" (in Canada)

Try this “automagic” script: sakis3g. No need to install anything, just run the script; it will guide you through menus.

After you make it work, you can create a small script calling the sakis3g-script having set up some environment variables for your convenience. Here follows mine:

export BAUD=MAX MODEM=1bbb:0000 APN=3g-internet SIM_PIN=1234
(sakis3g-script helper&)&

The $MODEM is the vendor-id:product-id code so I don't have to select it everytime I start the sakis3g-script; $APN is your provider's suggested login name; the SIM_PIN is rather obvious.

See also that question in SuperUser.

The real answer is to start with a supported device. See http://en.wikipedia.org/wiki/NetworkManager for a list of working devices.


Does gnome-schedule run things on startup if the run time is missed? I have a script that I would like to run daily. I set it up in gnome-schedule to run every day at 00:00, and I'm wondering whether it will run on startup if my computer was not turned on at 00:00. If not, is there a way to make it do that?

Gnome-schedule is just a GUI to cron. Cron itself doesn't support what you're asking for but anacron does. Examples of its usage are in the link provided in Ward's comment.

gnome-schedule depend on/use anacron, so I think it would not miss your job.


How to create a Wi-Fi Hotspot (in Access Point mode)? How to setup an Access Point (AP) mode Wi-Fi Hotspot?

Point to be noted: Wireless access points aren't the same as ad hoc networks. They differ significantly. In short, ad hoc networks aren't supported on newer devices and most Android, Windows Phone and Blackberry devices (and maybe iOS devices too), whereas AP mode Wi-Fi hotspots are. To get an idea about AP mode hotspots, ad hoc networks and their difference, refer to this Wikipedia page.

Whether your wireless card support Access Point mode.

First thing to be done is perform the test whether your wireless card support going into wireless access point mode.  As told earlier following test is for mac80211 framework based driver.

Install iw & execute following

sudo aptitude install iw
iw list

Look for supported interface section, where it should be a entry called AP like below

Supported interface modes:
         * IBSS
         * managed
         * AP
         * AP/VLAN
         * monitor
         * mesh point

If your driver doesn't shows this AP, It doesn't mean it can't create wireless hotspot. But those cards aren't in scope of this tutorial. For more tests follow ubuntu documentation on master mode.

The setup is divided in three sections,

Setup & host a wireless network
IP address setup
Internet sharing

1.Setup and host a network

Software required: hostapd  (install it)
Press alt + F2 and type gksu gedit & press enter. We are going to edit a lot of files.
In gedit, press ctrl+o, ctrl+l & paste it in location box /etc/hostapd/hostapd.conf. Press Enter.
Paste the following code,

interface=wlan0
driver=nl80211
ssid=test
hw_mode=g
channel=1
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=3
wpa_passphrase=1234567890
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP

Please make sure there are no trailing white space and the end of the line! Hostapd is very sensitive to ending white spaces that are hard to troubleshoot!

Changes you need to do:

Change interface=wlan0 to your wireless card name. (If you have one wireless card it should be wlan0)
ssid=test. test is the name of your hosted network.
wpa_passphrase=1234567890, 1234567890 is the password of your network.

The configuration above creates a wpa & wpa2 enabled access point in g mode. A more detailed instruction to build configuration file can be found here

Now start the hostapd. Edit the file /etc/default/hostapd and modify the line of DAEMON_CONF like this:

DAEMON_CONF="/etc/hostapd/hostapd.conf"

Then start the hostapd service using the following command,

sudo service hostapd start

It should start a wireless network. In your mobile device now you can see a wireless network and can authenticate.  But the device won't get IP address. Stop it with the command sudo service hostapd stop

  If you get any error, possibly your card doesn't support g mode. Try with other >modes. Guide

Part 2: Set up DHCP server for IP address management

Install isc-dhcp-server

Edit the file /etc/default/isc-dhcp-server and set INTERFACES like this:

INTERFACES="wlan0"

In gedit, press Ctrl+O, in location box paste /etc/dhcp/dhcpd.conf
Find (ctrl+F) below lines and put # before it. It should look like after editing

# option definitions common to all supported networks…
#option domain-name “example.org”;
#option domain-name-servers ns1.example.org, ns2.example.org;

Again comment out following lines too

#default-lease-time 600;
#max-lease-time 7200;

Add following lines at end

subnet 10.10.0.0 netmask 255.255.255.0 {
        range 10.10.0.2 10.10.0.16;
        option domain-name-servers 8.8.4.4, 208.67.222.222;
        option routers 10.10.0.1;
}

Range describe how long the address pool will be. you need to adjust subnet value also. This config can give IP up to 15 devices

Again press Cctrl+O in gedit and paste following in location bar /etc/network/interfaces, Add below

auto wlan0
iface wlan0 inet static
address 10.10.0.1
netmask 255.255.255.0

wlan0 is your wireless interface. Change it accordingly.

  Note: After reboot the wireless will be shown as not managed. So you
  can't use any other wi-fi network. To get wireless with normal
  behaviour, put # before those newly added line and execute sudo start
  networking

now run

sudo service isc-dhcp-server start

sudo service hostapd start

At this point , your mobile device will see a network, authenticate it & after authentication it will get ip address something like 10.10.0.2.

Setup internet connection settings

For Internet connection sharing we need ip forwarding and ip masquerading.
Enable ip forwarding : execute

echo 1| sudo tee /proc/sys/net/ipv4/ip_forward

Now say you are using to a dial up/usb modem connection to connect to INTERNET. You need to get the logical interface name. For that execute ifconfig or ip address

For dialup/usb modem: it should be ppp0. If you want to share Ethernet connection you should use ethXwhere X is your ethernet device number. If you are connecting to internet through an android device with USB tethering, then the interface name should be usb0.

Now once you get the interface name execute
sudo iptables -t nat -A POSTROUTING -s 10.10.0.0/16 -o ppp0 -j MASQUERADE

The ppp0 in above command is the interface whose internet connection you are sharing over wireless.

If you have edited upto /etc/network/interfaces you can use this script to start the service. Edit it if you are not sharing ppp0. if you are using script and want to stop the server, use sudo killall hostapd

A blog that is mostly a summary of what has been described here: http://dashohoxha.blogspot.com/2013/06/how-to-setup-wifi-access-point-on-ubuntu.html

A script that tries to automate the steps described here: https://gist.github.com/dashohoxha/5767262

Please feel free to report or fix any bugs that you notice.

Great helps from :

https://help.ubuntu.com/community/WifiDocs/MasterMode
http://linuxwireless.org/en/users/Documentation/hostapd
http://thenewbieblog.wordpress.com/2012/05/01/wifi-hotspot-setup-on-ubuntu/
How do I install and configure a DHCP server?

@Web-E's answer was helpful, but also configures the computer as a router. I wanted only an Access Point, since I am already using my ISP's router.

I'm also running Ubuntu Server (18.04.2), so I couldn't use any GUI tools to set this up.

So, what I did was install and configure hostapd as described in this answer and then simply bridged my Ethernet and Wi-Fi adapters. Here are the contents of my `/etc/netplan/01-netcfg.yaml file:

network:
  version: 2
  renderer: networkd
  ethernets:
    # My Ethernet adapter
    enp1s0:
      # For some reason it seems I must specify at least something here.
      dhcp4: no
    # My Wi-Fi adapter
    wlp2s0:
      dhcp4: no
  bridges:
    br0:
      interfaces:
        - enp1s0
        - wlp2s0
      # Using a static IP for this box.
      addresses:
        - 192.168.0.45/24
      gateway4: 192.168.0.1
      nameservers:
        addresses: [1.1.1.1,1.0.0.1]

Of course you will need to tweak your config file for your own needs. Just run sudo netplan apply afterwards to apply the configuration.


Ubuntu Software is not installing or updating anything. (16.04.1) When I try to install something via a .deb file or just from software center it will say installing for a second or so then go back to the button saying install. When I try to update the software I have installed it just shows the installing sign but doesn't update, I left it running over night but still nothing updated

Picture of me trying to update:

First, fix your dependencies. To do this, open a terminal and enter this command:

sudo apt-get install -f

After that, update your software:

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

Don't use the application Ubuntu Software. The scientific term for it is "complete and utter garbage with tons of bugs which doesn't work 90% of the time and shouldn't be used by anyone for any purpose whatsoever". If you want to use a graphical interface, use Ubuntu Software Center. You can install it with this command:

sudo apt-get install software-center

It's a bit slower but it works and gets the job done.

If you want to install a Debian package, you can either open it with Ubuntu Software Center or you can install it on the command line (assuming the package is in your downloads folder):

sudo apt-get install ~/Downloads/thepackage.deb

Note that you probably can install the Debian package directly from the repos without first downloading it. If your Debian package is called Awesome-Application_1.37_amd64.deb, try this command:

sudo apt-get install awesome-application

It either finds something with that name or tells you that it can't find it. In the latter case, execute the command mentioned two above to install the package you downloaded.

In Ubuntu 16 I highly recommend installing GDebi package installer from the Ubuntu Software Center. Then open any downloaded .deb files with that. It will automatically install dependencies.


Cannot move windows to second screen I have an external monitor plugged into my notebook, but I cannot move windows from the bottom screen (built-in screen) to the upper screen (external monitor).

The windows stick at the top border (below the panel) of the built-in screen, while the mouse moves into the second screen.

I think, it's because of the top panel; It works if I place the external monitor below the built-in screen.

How can I solve this issue? Or move windows directly without using drag and drop.

Solution:

Go to Settings->Display.

Turn Off Sticky edges.

Solved the problem for me.

I just happen to have the same problem with 16.04 and here is what it fixed it for me.

Go to the "burger menu" on the right end of the control bar. Then select "additional settings" and allow the programs to "slip" under the control bar.

I'm not sure with the exact wording since I'm using the German localization.


How to make 'python' program command execute Python 3? The python program command executes Python 2. Python 3 can be executed using the python3 command.  How can Python 3 be executed using the python command?

A simple safe way would be to use an alias. Place this into ~/.bashrc or ~/.bash_aliases file:

alias python=python3

After adding the above in the file, run source ~/.bashrc or source ~/.bash_aliases.

For example:

$ python --version
Python 2.7.6
$ python3 --version
Python 3.4.3
$ alias python=python3
$ python --version
Python 3.4.3

To circumvent the alias use the command built-in command:

$ command python --version
Python 2.7.6

Another way to circumvent the alias is to use \ before the command.

$ \python --version
Python 2.7.6

To disable the alias in the current shell use the unalias built-in command:

$ unalias python
$ python --version
Python 2.7.6

cat > /usr/local/bin/py << 'EOF'
#!/bin/dash
python3 "$@"
EOF

(provided you have write permission to /usr/local/bin)
likewise

cat > /usr/local/bin/pyi << 'EOF'
#!/bin/dash
python3 -i "$@"
EOF

then you only type py (and use py in #! lines) for your chosen python.


Is there a way to keep the application switcher active on the screen all time? I like the way it works. I like the way it looks. It could be more better If i can keep the application switcher on screen all time, not only when pressing Alt+Tab, and switch apps using mouse click on it.

Is there a way to do it in a safe way? I don't want to use Compiz Settings Wizard. Is there a way doing it using Dconf Editor? I feel it more safer.

Heres the Image what I was indicating:

AFAIK this is not possible. You can switch your applications easily by pressing the icon on the launcher to the left. Isn't an application switcher annoying which appears permanently in front of all windows?

Ubuntu 12.04

Startup System Settings
Click Appearance
Click the tab Behavior
Slide the bar for "Auto-hide Launcher" to OFF


Failed to download repository information (related topics did not seem to answer my question) W:Failed to fetch http://archive.ubuntu.com/dists/pangolin/main/binary-i386/Packages  404  Not Found [IP: 91.189.92.190 80]
, W:Failed to fetch http://archive.ubuntu.com/dists/pangolin/universe/binary-i386/Packages  404  Not Found [IP: 91.189.92.190 80]
, E:Some index files failed to download. They have been ignored, or old ones used instead.

I am running 12.04 x86, but when I check the sources.list file, there is nothing in there that seems to reference anything i386 (but the error spits out 'i386' as part of the repo url). I think it has to do with my above setup, because I am choosing to run the latest software? I'm just not sure where to look to resolve this. sources.list isn't helping :(

The error you are getting is 404 HTML not Found.
In order to solve this.

Try using a different Mirror:

Click on Download From.
Click on Download From.
Then Choose Other Location
Then choose Choose Best Server
it will scan and find the best servers closest to you.

If you want to do this manually you will need to look in:

/etc/apt/sources.list
 /etc/apt/sources.list.d

in sources.list.d there are individual files for each of the sets of external sources. Instead of everything in one sources.list file.

you could do a grep to find the offending line in /etc/apt:

grep -Hrin "http://archive.ubuntu.com/dists/pangolin/main/binary-i386/Packages" /etc/apt

grep -Hrin "http://archive.ubuntu.com/dists/pangolin/universe/binary-i386/Packages" /etc/apt


Terminal command ping makes sound on fail Is there a way to make the Ubuntu 14.04 terminal trigger a success or, if it fails to ping Google, a different sound, such as if the wifi goes down? If so, how would I do so on constant loop in the background, after a certain length of time passes? I assume it would be something like (command); sleep (time length); done or similar?

The question is actually a bit broad, AskUbuntu is for specific questions and this is more like can someone make me a script.
But hey, it's just a couple of lines, let's get you started:

#!/bin/bash
while "true"
do
    ping -w 10 -c 5 www.google.com
    if test $? -ne '0'
    then
            spd-say "connection lost"
            sleep 3s
    fi
done

Basically we repeat a endless loop with ping and check if it exits with an error. ($? gives the exit-code of the previously executed program).

For timing you can just alter the ping command. Now turn on your speakers and enjoy. :)

ping -A 1.2.3.4
The uppercase A parameter to send us a beep sound whenever the target stops replying to our ping.


Wi-Fi is not working in Ubuntu 14.04 LTS Here is the information gathered about my wi-fi using the script provided by you guys here at AskUbuntu: http://paste.ubuntu.com/12733543/

I use a laptop dualboot Windows 7 and Ubuntu 14.04 LTS.

I just moved to a hostel and the wifi is provided by the hostel.

In the first few days, I had no problem using the wifi. However, I noticed wifi connection problem since yesterday and it is turning on and off. In other words, the connection would break at any time. I tried to use Windows 7 and there were no wi-fi problem. I could stream movies smoothly.

Could you please help me out? For now I use iphone hotspot shared via cable to go to internet.

I had the same problem.
I don't know how to solve it on Ubuntu 14.04 LTS. This is probably the fault of the kernel 3.16.
The problem arises on any distribution based on the kernel 3.16 and Ubuntu 14.04 LTS (Linux Mint 17.x etc).

Upgrade to Ubuntu 15.04 and kernel 3.19 solves the problem.


re-installing x86_64-linux-gnu directory I have a directory in /usr/lib/x86_64-linux-gnu/ There are several files removed from this directory. How can I re-install x86_64-linux-gnu directory? My operating system is ubuntu 16.04.

Find all packages that have changed or missing files with debsums, limit it to those with bad files containing the path /usr/lib/x86_64-linux-gnu/, get the package names, remove duplicates, and reinstall those packages:

sudo apt install debsums
sudo debsums -s 2>&1 | fgrep '/usr/lib/x86_64-linux-gnu/' | awk '{print$6}' | uniq | xargs sudo apt install --reinstall

You may wish to run the second line with xargs echo instead of xargs the first time to check what it's going to reinstall, then run it with just xargs if the package list presented is acceptable.

I ran into this same issue recently with Ubuntu 16.04.4 LTS server and Samba 4.3.11.

This fixed it for me:

apt-get install --reinstall samba-common smbclient samba-common-bin


upgrading from 12.04 to 14.04.1 After upgrading (12.08.2014) from version 12.04 to 14.04.1

I get an notification:
System program problem detected. Do you want to report the problem now?
So, after I click  "report problem" I get an empty desktop.
The only thing I can is to use command-line interface by Ctrl+Alt+F1.
What should I do to get Unity work correctly?

I think you should try starting the gui first by using the command sudo startx.


How to unblock something listed in rfkill? I think I may have found the cause of my problems with connecting to wifi in Ubuntu 11.10.

I type this in Terminal:

$ rfkill list all
0: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: yes
1: acer-wireless: Wireless LAN
    Soft blocked: yes
    Hard blocked: no
$ rfkill unblock all
$

If I am correct I must unblock all of those "yes", right? But nothing happens when I try to unblock. Am I typing the wrong command?

Typing sudo modprobe -r acer_wmi seem to have added another problem, now I can't even try to click on the "Enable wireless"-button as it has been grayed out and 1: acer-wireless: Wireless LAN does not show anymore in the rfkill list. Does anyone have any idea how to fix that?

EDIT: I rebooted and now it is not grayed out anymore and the rfkill list all shows as:

0: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
1: acer-wireless: Wireless LAN
    Soft blocked: yes
    Hard blocked: no

The 0 is not Hard blocked anymore, but I guess 1: acer-wireless needs to be put off soft blocked somehow.

"Hard blocked" cannot be changed by software, look for a wifi toggle on your keyboard or edges of the laptop; the device can also be hard blocked if disabled in the bios.

"Soft blocked" means "blocked by software". A faulty driver or other kernel module can lead to connectivity loss.

Some methods to get WiFi working are described on help.ubuntu.com/

There is also a Launchpad question on this issue: answers.launchpad.net

This answer is for hp-probook with toggle wifi button and only ubuntu installed :

Restart your computer and,
just after restart press F2 to enter boot menu
press F10 BIOS Setup
Reset BIOS default
Save changes and exit


What is desktop environment? I am new to Ubuntu. What is desktop environments, and how do I install them?
I tried to install Gnome using Terminal but I couldn't.

A desktop Environment is, put very simply, a window manager (graphical interface) + other utilities on top of the operating system.

If you want to install gnome:

Log out of your current session then press ctrl+alt+f1

sudo apt-get update && sudo apt-get upgrade
sudo apt-get install ubuntu-gnome-desktop

If you get any errors after installing, try

sudo apt-get install -f

If you don't, then

sudo service gdm restart

Then you can click the little icon next to your log in name and should be good to go


Installing Ubuntu on the SSD of ASUS Vivobook S400CA I have an ASUS Vivobook S400CA, and I am considering of getting rid of the Windows 8.1 and install Ubuntu 14.04 instead for my studies purposes. I see that I actually have two hard drives on this computer: Disk 0 a ST500LT012-9WS142, and Disk 1 a SanDisk SSD U100 24GB. At the Disk 0 I have several partitions, one of them is OS (C:) and another is DATA (D:), and I have several others which I don't know their purposes, together with one partition for recovery. Disk 1, the SSD, is divided into two partitions.

Would it be beneficial to install the Ubuntu on the SSD (will it give better performance?), and if it is, how should I proceed to doing this?

I've just got an Asus Vivobook S46CA (i7 / 6GB RAM / 20GB SSD / 1TB HDD), with Windows 8 pre-installed by factory.

I've tried a bit to install the Ubuntu 14 as a dual boot with Windows 8. But I was not successful. So I have decided to remove Windows and install Ubuntu 14. Be aware that I'm a beginner in Linux world and my answer might be improved somehow by a more experienced user. But the configuration below has worked up to now.

What I've done with the partitions:

20GB SSD:
. 10GB for /
. 3GB for /var
. 1GB for /tmp
. 6GB for swap
I've based my partitioning on Ubuntu's official installation manual. Please refer to that document.

1TB HDD:
. 200GB for /usr
. 400GB for /home
. 400GB for /DATA (personal media files)

That has worked pretty fine (1 day after). I've formatted all partitions as "primary" and EXT4. It feels that the speed was improved. The boot loader was kept at the 1TB HDD. Everything was done using Ubuntu's 14.10 live session CD, GParted (to remove the old Windows 8 partitions and set the new partitions configuration), and the Ubuntu's installation wizard.

SSD in Asus s400ca used to cache frequently used blocks on main HDD.
Despite on it, it is not so easy to install Ubuntu due to UEFI on this machine.

So, the easiest way for study purposes is install Ubuntu inside of VirtualBox under Windows.


Desktop bigger than screen My desktop has an inch cut off on the bottom and right side.

This is not a resolution problem -- changing the resolution only makes the text blockier. (so xrandr doesn't work)

I need to somehow resize the desktop to fit my monitor. It's natively 1400 by 900, but it thinks the screen is 1680 by 1050 (so it cuts off 280 pixels on the right and 150 on the bottom).

I did not install any new video drivers or anything. I think I'm running an intel 950 GMA chipset.

xrandr incorrectly reports in the second line: LVDS1 connected primary 1680x1050 -> this should be 1400x900

Do anyone have any ideas? thanks

I had the same problem: desktop resolution was way bigger than my screen. After reading this ubuntu wiki page I fixed the problem just by changing the resolution with a command like this: xrandr --output VGA1 --mode 1024x768 (you'll have to change the output and resolution to your needs)

I dont know if this solution will work for everyone, but it seemed to work for me.

Basically I ran a bunch of videos on VLC and the nytimes for a while until my computer fan turned on high, then reboot. The problem fixed itself. Maybe running a lot of videos does something to remind the computer what the right size is?

I don't know, but anyway, if I check xrandr --verbose before and after, all the weird monitor configurations were gone after the monitor resized itself. Go figure.


Where is dualboot.sh? I want to install Ubuntu touch, dualbooted with android, as explained in this section:
https://wiki.ubuntu.com/Touch/DualBootInstallation

There seems to be one problem though, the link to the dualboot.sh script is broke:
http://humpolec.ubuntu.com/latest/dualboot.sh

I searched all trough google, but I can't mamage to find a download link for this script.

Can somebody please enlighten me?

Here: http://humpolec.ubuntu.com/20131220/dualboot.sh

Someone should update that wiki page.

Take a look in  http://humpolec.ubuntu.com/latest/UPDATE-UbuntuInstaller.zip in META-INF/com/google/android/updater-binary


How do I deactivate F1 and F10 keybindings in gnome-terminal? How can I turn off the F1 (help) and F10 (notifications menu) key bindings?

First one I need for screen utility and second to exit mc in console.

There are no such key bindings in the Keyboard Shortcuts system settings.

11.04

Disabling the F1 shortcut

In a gnome-terminal open up Edit ➜ Keyboard Shortcuts.
Scroll down to the Help/Contents shortcut, click where it says "F1" and hit Backspace:

Disabling the F10 shortcut

Install the compizconfig-settings-manager package.

Warning: What are some of the issues with CCSM and why would I want to avoid it?

Open up CompizConfig Settings Manager.

Hit Super to open the Dash, type "Compiz" and hit Enter.

Type "unity" in the Filter entry and select the Ubuntu Unity Plugin.
Click the button to the right of Key to open the first panel menu and uncheck the Enabled checkbox.

That disabled the global F10 shortcut, now disable gnome-terminal's F10 shortcut:

In a gnome-terminal open up Keyboards Shortcuts (Edit ➜ Keyboard Shortcuts) and
uncheck Enable the menu shortcut key (F10 by default)

F10 is mapped to menubar_accel by something in Ubuntu. Gnome? Metacity? Not sure what exact thing it is that steals it, but the key doesn't make it to Eclipse.

Run gconf-editor, browse to /desktop/gnome/interface then scroll down to menubar_accel and delete the F10 value. [Stolen from here]

Ctrl+F1 doesn't work either. The solution is the same as for Shift+F10. Don't forget the semicolon as separator!

Place this in ~/.config/gtk-3.0/gtk.css:

@binding-set NoKeyboardNavigation {
     unbind "<shift>F10";
     unbind "<control>F1";
}

* {
     gtk-key-bindings: NoKeyboardNavigation;
}


Low brightness: Ubuntu 13.04 I recently dual booted my Windows 8 with Ubuntu 13.04. The first thing that came to my notice was that the brightness was too low. I increased the brightness to maximum from system settings, but still, it remains low. I did not face any such issue with Ubuntu 12.10 that I had earlier.

Graphics Card: ATI Radeon 7730M

Laptop Model: Dell Inspiron 15R Turbo

So, is there a way to increase the brightness to the actual maximum?

you may need to use the acpi_osi='!Windows 2012' boot parameter

sudo sed -i "s/quiet splash/quiet splash acpi_osi=\'\!Windows 2012\'/" /etc/default/grub;sudo update-grub;echo 'Reboot to apply'

here is the command to undo that, if it makes it worse or does not do anything

sudo sed -i "s/ acpi_osi=\'\!Windows 2012\'//" /etc/default/grub;sudo update-grub;echo 'Reboot to apply'

It could be possible that you may have to re-install the OS and junk if you are not going to loose a lot of stuff.


Kernel compilation fails against "spl-dkms_*.deb" package not found! I'm attempting to compile the kernel using this guide but I got an error.

cp -rp "/home/stibbons/build/ubuntu-disco/debian/linux-headers-5.0.0-15-generic/usr/src/linux-headers-5.0.0-15-generic" "/home/stibbons/build/ubuntu-disco/debian/linux-headers-5.0.0-15/usr/src/linux-headers-5.0.0-15" "/home/stibbons/build/ubuntu-disco/debian/build/build-generic/___________________________________dkms/headers"
/bin/bash -e debian/scripts/dkms-build /home/stibbons/build/ubuntu-disco/debian/build/build-generic/___________________________________dkms 5.0.0-15-generic '  /home/stibbons/build/ubuntu-disco/debian/build/build-generic/scripts/sign-file sha512 /home/stibbons/build/ubuntu-disco/debian/build/build-generic/certs/signing_key.pem /home/stibbons/build/ubuntu-disco/debian/build/build-generic/certs/signing_key.x509'  linux-modules-5.0.0-15-generic  /home/stibbons/build/ubuntu-disco/debian/linux-modules-5.0.0-15-generic/lib/modules/5.0.0-15-generic/kernel  spl  pool/universe/s/spl-linux/spl-dkms__all.deb
II: dkms-build downloading spl (spl-dkms__all.deb)
--2019-05-16 23:04:11--  https://packagecloud.io/AtomEditor/atom/any/pool/universe/s/spl-linux/spl-dkms__all.deb
Resolving packagecloud.io (packagecloud.io)... 54.241.144.200, 52.9.242.175, 2600:1f1c:2e5:6901:4eff:41b9:710a:77ff, ...
Connecting to packagecloud.io (packagecloud.io)|54.241.144.200|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2019-05-16 23:04:11 ERROR 404: Not Found.

--2019-05-16 23:04:12--  http://security.ubuntu.com/ubuntu/pool/universe/s/spl-linux/spl-dkms__all.deb
Resolving security.ubuntu.com (security.ubuntu.com)... 91.189.88.152, 91.189.88.161, 91.189.88.162, ...
Connecting to security.ubuntu.com (security.ubuntu.com)|91.189.88.152|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2019-05-16 23:04:12 ERROR 404: Not Found.

--2019-05-16 23:04:12--  http://security.ubuntu.com/ubuntu/pool/main/s/spl-linux/spl-dkms__all.deb
Resolving security.ubuntu.com (security.ubuntu.com)... 91.189.88.149, 91.189.91.26, 91.189.91.23, ...
Connecting to security.ubuntu.com (security.ubuntu.com)|91.189.88.149|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2019-05-16 23:04:12 ERROR 404: Not Found.

--2019-05-16 23:04:12--  http://us.archive.ubuntu.com/ubuntu/pool/universe/s/spl-linux/spl-dkms__all.deb
Resolving us.archive.ubuntu.com (us.archive.ubuntu.com)... 91.189.91.23, 91.189.91.26, 2001:67c:1562::19
Connecting to us.archive.ubuntu.com (us.archive.ubuntu.com)|91.189.91.23|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2019-05-16 23:04:13 ERROR 404: Not Found.

--2019-05-16 23:04:13--  http://us.archive.ubuntu.com/ubuntu/pool/main/s/spl-linux/spl-dkms__all.deb
Resolving us.archive.ubuntu.com (us.archive.ubuntu.com)... 91.189.91.26, 91.189.91.23, 2001:67c:1562::19
Connecting to us.archive.ubuntu.com (us.archive.ubuntu.com)|91.189.91.26|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2019-05-16 23:04:13 ERROR 404: Not Found.

dpkg-deb: error: failed to read archive 'spl-dkms_*.deb': No such file or directory
make: *** [debian/rules.d/2-binary-arch.mk:219: install-generic] Error 2

Any idea how to resolve this?

@RedHatter I ran into this same issue and traced the failure to the version string parsing code in debian/rules which relies on gawk.

# Versions of dkms packages.
dkms_zfs_linux_version=$(shell gawk '/^zfs-linux / { print $$2; }' debian/dkms-versions)
dkms_spl_linux_version=$(shell gawk '/^spl-linux / { print $$2; }' debian/dkms-versions)
dkms_nvidia_version=$(shell gawk '/^nvidia-graphics-drivers-/ { print $$2; }' debian/dkms-versions)

As I was compiling this on a fresh install of Kubuntu, gawk was not available by default, causing a silent failure.

The fix for me was easy, sudo apt install gawk before starting your build.


setting editor for crontab -e , why always using basic vim? When issuing crontab -e as root , i always got messages like the following (partial) , however , executing vim directly doesn't have problems at all.
$EDITOR was set to vim in /root/.bash_profile already.

%> sudo crontab -e
Error detected while processing /root/.vimrc:
line    2:
E319: Sorry, the command is not available in this version: autocmd! BufNewFile * silent! 0r ~/.vim/skel/tmpl.%:e
line   20:
E319: Sorry, the command is not available in this version: autocmd VimEnter * set vb t_vb=
line   57:
E518: Unknown option: autochdir
line   65:
E319: Sorry, the command is not available in this version: syn on
line   78:
E538: No mouse support: mouse=a
line   79:
E319: Sorry, the command is not available in this version: filetype plugin indent on
line   87:
E319: Sorry, the command is not available in this version: funct! CommentBlock(comment)
line   88:

When you use "sudo command" the root user profile is not loaded, use sudo -i and crontab -e instead.

in ubuntu-14.04,  use select-editor choose "vim-gnome" but not "vim-basic"


How can I browse view missing manpages from the command line? http://manpages.ubuntu.com is a great resource for viewing manpages not installed in the system. However, it uses some weird programming to redirect short URLs like http://manpages.ubuntu.com/ls.1 to http://manpages.ubuntu.com/manpages/wily/en/man1/ls.1posix.html, and it always picks the latest release. Otherwise, it works fine when using lynx with the full URL. It even looks like a normal manpage:

The redirection doesn't work in lynx (or elinks or w3m). Just to check, I tried on my Arch Linux elinks, which apparently does support JavaScript:

$ elinks -version
ELinks 0.13.GIT a3751107033599b835eaafa61177c8d4dda4b7ef-dirty
Built on Oct 31 2013 20:43:18

Features:
Standard, IPv6, gzip, bzip2, UTF-8, Periodic Saving, Viewer (Search
History, Timer, Marks), Cascading Style Sheets, Protocol
(Authentication, File, CGI, FTP, HTTP, URI rewrite, User protocols),
SSL (OpenSSL), MIME (Option system, Mailcap, Mimetypes files), LED
indicators, Bookmarks, Cookies, ECMAScript (SpiderMonkey), Form
History, Global History, Scripting (Lua, Spidermonkey ECMAScript), Goto
URL History

edbrowse didn't redirect either. That's that for the suggestions from Is there a text mode browser which supports javascript?

Using the full URL would be workable if I knew the section, which is not always the case. Is there a program which can bring up the online manpage, preferably for the running Ubuntu version? In case of matches in multiple sections, it should behave like man does.

You can just give lynx the search url with the man page you want. In the search results use the lynx l command to list the returned links and choose the one you want. Eg for ls.1:

lynx 'http://manpages.ubuntu.com/cgi-bin/search.py?lr=lang_en&q=ls.1'


What command changes the Group setting for a directory? I am having an access problem to some files and directories that I have tracked down to the group assigned to access them.

When I manually change the name of the group in the properties/permissions menu for a directory from the default setting (MyGroup) to www-data used by my Drupal Website, the directory error messages I get are gone.

There are a large number of files and directories that require this change.  If believe using chmod will change the owner which is set correctly and being new to Ubuntu, I am reluctant to experiment without a better understanding of how owner and groups work in the permissions settings.

What command changes the Group setting for a directory?

chmod does not change owner. It changes permissions. chown changes owner (and group if need be) and chgrp changes group.

You can use

chown {-R} [user]{:group} [file|directory]

to set user and group ownership where -R does everything that is inside directory.
So sudo chown -R rinzwind:rinzwind /tmp/ would set /tmp/ and everything in it to user rinzwind and group rinzwind.

There is also

chgrp {-R} [group] [file|directory]

if you do not need to touch the user permissions and only need to set the group.

Oh and you can check what group a user belongs to with groups {username}.

To change group to current user, use this:

sudo chgrp -R $USER ~/.blabla


Easiest way to copy ssh keys to another machine? I am lazy at home and use password authentication for my home machines. I am ready to move to key based authentication. There are many options on the web on how to do this, including catting then sshing the key over, scping the key over directly, etc.

I am looking for the easiest and recommended way to copy a key over, hopefully there is a convenience wrapper somewhere in the Ubuntu ssh package?

I'm already aware on how to shut off password logins.

The ssh-copy-id command (in the openssh-client package and installed by default) does exactly this:

ssh-copy-id user@hostname.example.com

copies the public key of your default identity (use -i identity_file for other identities) to the remote host.

The default identity is your "standard" ssh key. It consists of two files (public and private key) in your ~/.ssh directory, normally named identity, id_rsa, id_dsa, id_ecdsa or id_ed25519 (and the same with .pub), depending on the type of key. If you did not create more than one ssh key, you do not have to worry about specifying the identity, ssh-copy-id will just pick it automatically.

In case you do not have an identity, you can generate one with the tool ssh-keygen.

In addition, if the server uses a port different from the default one (22) you should use quotation marks in this way (source):

ssh-copy-id "user@hostname.example.com -p <port-number>"

If you already have a host key like in the case of AWS EC2, then do this

cat ~/.ssh/id_rsa.pub | ssh -i hostkey.pem hostname@hostaddress 'cat >> .ssh/authorized_keys && echo "Key copied" '

Next time, simply do this:

ssh hostname@hostaddress