What do the paranthesis and $ sign mean in echo $(ls) The output of

# ls

and

# echo $(ls)

are the same.  What exactly does the $ sign and the parenthesis mean?

Also, what is going on a technical level that causes the output of these two commands to be the same?

This is command substitution for bash.

  Command substitution allows the output of a command to replace the
  command itself. Command substitution occurs when a command is enclosed
  as follows:

 $(command) or

 `command`

http://www.gnu.org/software/bash/manual/bashref.html#Command-Substitution

More:

http://tldp.org/LDP/abs/html/commandsub.html

http://wiki.bash-hackers.org/syntax/expansion/cmdsubst

And a good example similar to your question:

http://bashshell.net/shell-scripts/using-command-substitution-in-a-bash-shell-script/

Using $ in front of a variable name invokes the value assigned to the variable. Echo without the $ will just print the name of the variable to the screen (or standard out).


How to run a batch (.bat) file on Ubuntu using Wine (with complete steps)? I have this old Windows game with a .bat file which doesn't open with Wine and only opens as a text file. I have browsed through and tried several suggested ways of opening it with Wine console without any success. Many other methods are either too complex or coded for a layman like me to understand. So, can someone please provide a simple step-by-step guidance on this? Thanks in advance.

The solution by OP

Install Wine & configure it to relevant Windows version for game

Open Gedit (notepad of Ubuntu)>Edit>Preferences>Plugins>select 'External tools execute external commands shell scripts'>Close

Go to your .bat file>right click>Properties>Permissions>select 'allow executing file as program'>Close

Double-click the .bat file, it will open in gedit>Tools>External Tools>Run command>in the popped up box type 'wineconsole cmd' (without inverted commas)>OK. 5. A Wine console terminal will pop up, in it type 'start yourfilename.bat' and hit enter. That'll run it.

I had the same problem but I solved it with wine.
When you got your .bat file you have to right click on it en go to properties.
Then click on 'open with' then select wine.(if you already downloaded wine)
And then click on 'set as default' and you are finished.
(you can download 'configure wine' in 'ubuntu software'.


Change default 'Print to File' settings How can I change the default settings for 'Print to File' in the Print dialogue?

I would like to change the default save location from ~/ to ~/Desktop.

p.s. I do not want to have to use cups-pdf

Thunderbird

In Mozilla Thunderbird, go to Edit > Preferences, select the Advanced panel, select the General tab, and click Config Editor.

Search for print_to_filename and adjust the property.

You you fill confident, search for print. and change other settings as well.

I've changed:

print.print_paper_name to iso-a4
print.print_paper_height to 297
print.print_paper_width to 210

Firefox

Just open about:config page and search for the same settings.
You don't have to restart the applications to use the new settings.

Units

There are several measurements used in the settings, like print.print_paper_height or print.print_paper_width.

To use millimeters, set print_paper_size_unit is set to 1. To use inches, set print_paper_size_unit is set to 0.

Print to File.  Dialogue box look for the 'Save in Folder' drop down and then choose the location you would like to save it, if its not listed click on the 'other'.  Simple really.


Ubuntu 12.04 is slow and unresponsive My laptop works perfectly fast with Windows 7 but is very slow in Ubuntu 12.04.When I try to open the dash it takes 1-2 sec.even the normal right click on the desktop for the dropdown options is taking time.I installed preload but it made a very slight change. Everything is up to date.

My laptop is : Lenovo ideapad Z560
500 GB hard drive (dual booting win7 and Ubuntu 12.04)
3 GB RAM
Intel® Core™ i3 CPU M 370 @ 2.40GHz × 4  processor
Nvidia GeForce 310M/PCIe/SSE2
Ubuntu 32 bit

any help?

[   26.993526] NVRM: Your system is not currently configured to drive a VGA console
[   26.993530] NVRM: on the primary VGA device. The NVIDIA Linux graphics driver
[   26.993532] NVRM: requires the use of a text-mode VGA console. Use of other console
[   26.993534] NVRM: drivers including, but not limited to, vesafb, may result in
[   26.993536] NVRM: corruption and stability problems, and is not supported.

Did you see that? System does not have proper nvidia driver. It's running in VGA mode. That's why system is not responsive. Open jockey-gtk (default installed), it will automatically show perfect driver for your graphics card. Install it from there. And also remove your existing driver first.

During installation, how much swap partition did you create? Use ubuntu-tweak janitor to clean and cool your Ubuntu and update Ubuntu using update-manager.


Shutting down the PC from Java application I am trying to shut down my Ubuntu PC using a Java Application, but nothing seems to happen. Following is my code:

Runtime runtime = Runtime.getRuntime();

try {
   Process proc = runtime.exec("sudo shutdown -h now");
}
catch (IOException e) {
   e.printStackTrace();
}

What am I missing?

To avoid that sudo asks for a password, edit the sudoers file with visudo:

sudo visudo -f /etc/sudoers.d/shutdown

This will create a new file in the directory /etc/sudoers.d/ which will be included, leaving your original sudoers file intact.

If your user is called myuser and your host is called myhost you could add these lines

myuser myhost = (root) NOPASSWD: /sbin/shutdown
myuser myhost = (root) NOPASSWD: /sbin/reboot

Save your changes and try it out.

Also, you shouldn't do e.printStackTrace() but use a logger.

The sudo asks for a password - you need to provide it.


I have an HP Pavilion dv6 A1U58AV and the headphone jack does not work Whenever I plug a set of headphones or an aux cable into the headphones jack the computers speakers turn off, but no audio comes out of the headphones or the aux cable.

First of all, lets keep it Ubuntu related ;) and second that means your plugin in the wrong aux port:) their are many times two audio ports, and only one will work with most headphones, also certain headphone aren't compatable

Updating ALSA by going to https://wiki.ubuntu.com/Audio/UpgradingAlsa/DKMS fixed the problem.


How can i fix some broken packages PyQt packages? I'm trying to install PyQt but i've met some difficulties (i.e packages that won't be updated and stuff like that). I'm not very proficient with Ubuntu, so some help is needed. Here's the output i get from the terminal:

sudo apt-get install python-qt4
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:
 python-qt4 : Depends: libqt4-declarative (>= 4:4.7.0~rc1) but it is not going to be installed
              Depends: libqt4-designer (>= 4:4.7.0) but it is not going to be installed
              Depends: libqt4-help (>= 4:4.7.0) but it is not going to be installed
              Depends: libqt4-script (>= 4:4.7.0) but it is not going to be installed
              Depends: libqt4-scripttools (>= 4:4.7.0) but it is not going to be installed
              Depends: libqt4-svg (>= 4:4.7.0) but it is not going to be installed
              Depends: libqt4-test (>= 4:4.7.0) but it is not going to be installed
              Depends: libqt4-xmlpatterns (>= 4:4.7.0) but it is not going to be installed
E: Broken packages

It can't install the but python-qt4 because the libqt4* packages are not found in the repositories.
My guess is that you are missing one of the canonical repositories so will you please launch Software Sources and under Ubuntu Software tab make sure it is set similar to:

After changing setting make sure you run sudo apt-get update. You are then ready to retry the installation.

terminal: gksudo nautilus

navigate to /var/lib/dpkg/info
remove the broken package(s) libqt4

navigate to /var/lib/dpkg/status
and do the same.
(Mind: on the right is a search option to find the package(s))

Close nautilus.

important:  sudo apt-get update

         sudo apt-get upgrade


How to avoid apt-get -y dist-upgrade being interactive with waagent? I have an Ubuntu 12.04.5 LTS created in Azure Cloud. I create it from a Jenkins powershell build that:
 1. Create VM in Azure
 2. Execute some remote SSH commands (among them apt-get dist-upgrade)
 3. Create a Virtual Image from VM

But the build hangs in Step 2.In step 2, among other commands, I execute:

apt-get update
apt-get -q -y dist-upgrade

The intention of -y is to avoid interactive questions. If I run manually from a shell apt-get -q -y dist-upgrade it works fine until twice it gets stuck:

First interactive question:

Second interactive question:

Parameter -y is supposed to avoid this situation. As you can see the offending package is waagent, that is Microsoft Azure Linux Agent and it comes installed by default when I finish step 1

My question is: How can I avoid these interactive questions? (either answering Yes, or No, or avoiding to upgrade this package or something else)

Seems that clashes with config files are pretty common in apt-get (dkpg)
I solve the problem by using:

apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" dist-upgrade

The options mean:

--force-confdef: Ask dpkg to decide alone when it can and prompt otherwise...
--force-confold: Do not modify the current configuration file...


How to install OneDrive on ubuntu 13.10 x64 I have Ubuntu 13.10 and I don't know how to install OneDrive on ubuntu 13.10 x64.

You can't. One drive is a Microsoft service and, oddly enough, they don't support Linux but only Windows and OSX. Apparently, there is a project to port it to Linux which looks like it's worth trying, but it is still under development.

In the meantime, I recommend you use another cloud storage service, there are various that have Linux versions. See, for example, here and here.

The Microsoft OneDrive website allows access to onedrive content. Documents can be edited with office online. I like this approach best since office online is 100% compatible with paid versions of Office.


How do I capture a screenshot of a window, and all the windows on top of it? I'm using screenshots as regression tests for GUI software. Before deploying each new version, a series of automatic tasks is run against the old and the new version, screenshots are generated after each command in both cases, and the results are compared. ImageMagick's import command has been working very well fo that.

Recently I added right click menus. Unfortunately, import -window 'id' doesn't capture these menus.

Which command line tools on Ubuntu can take a screenshot of a window, and all windows on top of it?

That is, which tools can, instead of taking a screenshot of a window corresponding to a window ID, take a screenshot of the entire screen and truncate it to the boundaries a given window?

I haven't been able to get this result in a simple way with any of the tools listed at What is the terminal command to take a screenshot?.

Using shutter and wmctrl, an edited version of this script does pretty much exactly what you describe: it takes a screenshot of the area, a specific window covers on your screen, no matter if and how the window is (partially) below other windows.

The marge around the window, to be included in the screenshot, is arbitrary; set it to zero if you like.

In practice

I have an Inkscape window on my screen, with id 0x0520000e, partially covered by a few gedit windows.
I run the script with the window id and the marge (in px) around the window as arguments:

python3 <script> 0x0520000e 10 10 10 10

(where 10 10 10 10 is the marge in px around the window on the left/right/top/bottom. Set to 0 to have no marge in the image)

The result:

The script

#!/usr/bin/env python3
import subprocess
import time
import sys

"""
On different window managers, the window geometry as output of wmctrl differs slightly.
The "deviation" should compensate these differences. Most likely appropriate (tested) settings:
Unity: 0, Gnome: -36, Xfce (Xubuntu): -26, KDE (Kubuntu): 0
"""
#---
deviation = 0
#---

get = lambda cmd: subprocess.check_output(["/bin/bash", "-c", cmd]).decode("utf-8")
time.sleep(0.5)
# targeted window
target = sys.argv[1]; arg = sys.argv[2:]
f_data = [l.split() for l in get("wmctrl -lG").splitlines() if target in l][0][2:6]
xt_data = get("xprop -id "+target).split()
xt_i = xt_data.index("_NET_FRAME_EXTENTS(CARDINAL)")
xt = [int(n.replace(",", "")) for n in xt_data[xt_i+2:xt_i+6]]
# set data for screenshot command
x = str(int(f_data[0])-int(arg[0])-xt[0])
y = str(int(f_data[1])-int(arg[2])-xt[2]+deviation)
w = str(int(f_data[2])+int(arg[0])+int(arg[1])+xt[0]+xt[1])
h = str(int(f_data[3])+int(arg[3])+int(arg[2])+xt[2]+xt[3])

command = "shutter -s="+(",").join([x,y,w,h])+" -e"
subprocess.call(["/bin/bash", "-c", command])

How to use

The script uses Shutter and wmctrl:

sudo apt-get install wmctrl shutter

Copy the script below into an empty file, save it as custom_screenshot.py.
Run it by the command:

python3 /path/to/custom_screenshot.py <window_id> <left> <right> <top> <bottom>

where , <left> <right> <top> <bottom> are the marges you'd like to keep in the image around the window, like in this answer.

Example command:

python3 /path/to/custom_screenshot.py 0x0520000e 20 20 20 20

Explanation

In Shutter, it is possible to take a screenshot of a defined area of the desktop.
With the window id as an argument, the script looks up the window's exact position with the help of wmctrl (wmctrl -lG to be precise), and the output of xprop -id <window_id> (in the line _NET_FRAME_EXTENTS(CARDINAL) = 0, 0, 28, 0 for example).
Subsequently, a screenshot is taken from the found area, with an arbitrary marge.

Note

The script does not overwrite existing screenshots. New screenshots are named:

outputfile_1.png
outputfile_2.png
outputfile_3.png

and so on...

EDIT

Since you mentioned in a comment that speed is an issue:

Based on this script, if we do exactly the same trick, but use Scrot instead of Shutter, we can skip the sleep 0.5 and make it a lot faster:

The script

#!/usr/bin/env python3
import subprocess
import sys
import os

"""
On different window managers, the window geometry as output of wmctrl differs slightly.
The "deviation" should compensate these differences. Most likely appropriate (tested) settings:
Unity: 0, Gnome: -36, Xfce (Xubuntu): -26, KDE (Kubuntu): 0
"""
#---
deviation = 0
#---

get = lambda cmd: subprocess.check_output(["/bin/bash", "-c", cmd]).decode("utf-8")
# targeted window
target = sys.argv[1]; arg = sys.argv[2:]
f_data = [l.split() for l in get("wmctrl -lG").splitlines() if target in l][0][2:6]
xt_data = get("xprop -id "+target).split()
xt_i = xt_data.index("_NET_FRAME_EXTENTS(CARDINAL)")
xt = [int(n.replace(",", "")) for n in xt_data[xt_i+2:xt_i+6]]
# set data for screenshot command
x = str(int(f_data[0])-int(arg[0])-xt[0])
y = str(int(f_data[1])-int(arg[2])-xt[2]+deviation)
w = str(int(f_data[2])+int(arg[0])+int(arg[1])+xt[0]+xt[1])
h = str(int(f_data[3])+int(arg[3])+int(arg[2])+xt[2]+xt[3])

# setting default directories / filenames
home = os.environ["HOME"]
temp = home+"/"+".scrot_images"
img_in = temp+"/in.png"
# if you prefer, you can change the two line below:
output_directory = home+"/"+"scrot_images" # output directory
filename = "outputfile"                    # filename
# creating needed directories
for dr in [temp, output_directory]:
    if not os.path.exists(dr):
        os.mkdir(dr)
# creating filename (-number) to prevent overwriting previous shots
n = 1
while True:
    img_out = output_directory+"/"+filename+"_"+str(n)+".png"
    if os.path.exists(img_out):
        n = n+1
    else:
        break
# Take screnshot, crop image
subprocess.call(["scrot", img_in])
subprocess.Popen(["convert", img_in, "-crop", w+"x"+h+"+"+x+"+"+y, "+repage", img_out])

To use

Use it exactly like the first script, only:

This script needs scrot, imagemagick and wmctrl

sudo apt-get install imagemagick wmctrl scrot

images will be stored in ~/scrot_images

Explanation

While the first script uses the command line option of Shutter to shoot a defined section of the desktop, Scrot does not support that. It only takes a screenshot of the whole screen.

We can combine however imagemagick's option to make an out-take of an image, with the method to find the exact window's coordinates we used in the first script, and crop the image accordingly.
Since Scrot is extremely light weight and quick, even combined with imagemagick's crop action, we have a pretty fast way of making screen shots of a window's area.

Still not fast enough?

Not sure if it is needed, but with a bit of rewriting (see script below), it would be possible to make a series of shots even faster by first shoot the whole series, then (afterwards) do the cropping. Assuming the window would stay in its position, this would save a considearble amount of the time:

Shooting only with Scrot (no cropping):

real    0m0.263s
user    0m0.205s
sys     0m0.037s

Shooting, including cropping:

real    0m0.363s
user    0m0.293s
sys     0m0.040s

Serial shooting

Finally, as an example to make a series of screenshots, the script below, as suggested in the EDIT.
This one first shoots all images in a row, then does the cropping on all created images at once.

Use the script like the second one, but with one additional argument: the number of shoots in a row, for example:

python3 /path/to/custom_screenshot.py 0x0520000e 0 0 0 0 20

to make 20 screenshots of window 0x0520000e at a row (could be hundreds), no marge around the window.

The script

#!/usr/bin/env python3
import subprocess
import sys
import os

"""
On different window managers, the window geometry as output of wmctrl differs slightly.
The "deviation" should compensate these differences. Most likely appropriate (tested) settings:
Unity: 0, Gnome: -36, Xfce (Xubuntu): -26, KDE (Kubuntu): 0
"""
#---
deviation = 0
#---

get = lambda cmd: subprocess.check_output(["/bin/bash", "-c", cmd]).decode("utf-8")
# targeted window
target = sys.argv[1]; arg = sys.argv[2:]
f_data = [l.split() for l in get("wmctrl -lG").splitlines() if target in l][0][2:6]
xt_data = get("xprop -id "+target).split()
xt_i = xt_data.index("_NET_FRAME_EXTENTS(CARDINAL)")
xt = [int(n.replace(",", "")) for n in xt_data[xt_i+2:xt_i+6]]
# set data for screenshot command
x = str(int(f_data[0])-int(arg[0])-xt[0])
y = str(int(f_data[1])-int(arg[2])-xt[2]+deviation)
w = str(int(f_data[2])+int(arg[0])+int(arg[1])+xt[0]+xt[1])
h = str(int(f_data[3])+int(arg[3])+int(arg[2])+xt[2]+xt[3])
# setting default directories / filenames
home = os.environ["HOME"]
temp = home+"/"+".scrot_images"
# if you prefer, you can change the two line below:
output_directory = home+"/"+"scrot_images" # output directory
filename = "outputfile"                    # filename
# creating needed directories
for dr in [temp, output_directory]:
    if not os.path.exists(dr):
        os.mkdir(dr)
# do the shooting
t = 0; l = []; shots = int(sys.argv[6])
while t < shots:
    img_temp = temp+"/"+str(t)+"in.png"
    l.append(img_temp)
    # reading arguments,arranging commands to perform
    subprocess.call(["scrot", img_temp])
    t += 1
# do the cropping on all images in a row
for img in l:
    n = 1
    while True:
        img_out = output_directory+"/"+filename+"_"+str(n)+".png"
        if os.path.exists(img_out):
            n = n+1
        else:
            break
    subprocess.call(["convert", img , "-crop", w+"x"+h+"+"+x+"+"+y, "+repage", img_out])

Read man import. In my .bashrc (actually in a file sourced by .bashrc) I have:

alias tshhmmss='date +%y%b%d-%H%M%S'
screenshot ()
{
   import -window root ~/var/screenshot/$(tshhmmss)_screendump.png
}


Intalled Ubuntu alongside Win 8.1 and it goes only to Ubuntu I installed Ubuntu 12.04LTS without turning off Fast Startup in Windows 8.1 as I was unaware that this needed to be done. I've installed Ubuntu many times before, but this was my first time with windows 8.1, and unfortunately I didn't look up anything before I did it. I resized the partition and installed Ubuntu successfully and upon reboot, it went directly to Ubuntu without grub showing up. Is there anything I can do as the windows partition is my primary one and there is software that I need access to on it.

The answers here may help you. Using boot-repair from a live CD/USB drive is probably the best option because it's a utility designed to fix these kinds of problems. Otherwise, you can try reinstalling grub yourself.

Press shift to open GRUB menu,and then go to windows 8.


How to downgrade from LibreOffice 4.0 to 3.6? How to "properly" downgrade LibreOffice versions deals with a downgrade from 3.5 to 3.4.*. Is there any way to nicely downgrade LibreOffice 4.0 to 3.6? The latter is not in the package lists.

Background: It is because of this bug which is about the incompatibility of an extension which should really be core functionality. Essentially, 4.0 just does not deal with templates in an intelligent way. You cannot fully apply a template to an existing document.

Update: based on apt-cache showpkg libreoffice (found on How to Downgrade a Package via apt-get?) one can confirm that only LibreOffice 4.* is in the repositories.

For me this worked:

sudo apt-get install synaptic
sudo apt-get purge libreoffice*
sudo apt-get clean
sudo apt-get autoclean
sudo apt-get autoremove

Then remove ppa for LibreOffice4
Add ppa for LibreOffice3.6

sudo apt-get update

via synaptic reinstall packages which make problems for me it was libexttextcat

Install LibreOffice via synaptic.

There is a way to downgrade but not as "nicely" as I would like.

Install Synaptic sudo apt-get install synaptic
Uninstall libreoffice sudo apt-get purge libreoffice
Add the Libreoffice 3.6 ppa sudo add-apt-repository ppa:libreoffice/libreoffice-3-6
Refresh the repositories list sudo apt-get update
Install LO 3.6 sudo apt-get install libreoffice=1:3.6.6-0ubuntu1~precise1~ppa1 . I never done this but there is information on how to install specific version here.
Open Synaptic, search for Libreoffice, select the package and from the package menu select Lock version.

Hope this helps.


14.04 crashes after couple hours. Lose control of OS and CPU goes into overdrive I just installed Ubuntu 14.04 on a Dell Vostro 220s with Intel Pentium.

I am trying to figure out if this problem is normal.. should I wait out the hang.

After a couple hours, I will lose control of the operating system. The CPU sounds as if there is a download and install taking place, but there is no information telling me what is going on and I lose control of the system. The mouse will stagger and quickly lose the ability to click on anything and lose all functionality while the CPU is doing something on its own in overdrive. I am forced to do a hard reboot.

It seems as if my computer is being hijacked but can't tell for sure. At first I thought I may have gotten a bug because I clicked a link on a LinuxFromScratch pdf that is now taken over by a porn site. Since the domain used to be Linux based, I figured they had good motivation to target Linux users so I just decided to do a complete re-install since my install was less than a day old.

The problem still persisted. I then checked my fstab and low and behold, the swap partition was commented out. Huh? I uncommented it and figured that was the answer to my problem. After doing a reboot, the problem still persists. I checked fstab and swap is still  uncommented out so should be used when needed.

This is a fresh install from an ISO just recently downloaded. I have also done the updates. I did check the box for third party installs on install.

Is this a current issue with 14.04? I am thinking of using 12.04 which is what I had on my lap top with no issues. However, I would like to stay with a more up to date distro.

Processor: Pentium(R) Dual-Core CPU E5300 @ 2.60GHz * 2

Memory:    1.9 GB

Graphics:  Intel G45/G43

OS Type:   64-bit

Disk:      16.4 GB

*Swap:     1.95 GB

UPDATE

swapon -s shows the following (However, this is after the latest fix - I learned Swap actually was not previously on):

/dev/sda5                               partition   2047996 208 -1

Well i strongly believe that this might be due to memory issue and not with the OS . Please increase memory and check. Also verify whether the download ISO is having any preloaded application like virtual appliance . Where they will bundle application along with OS like a preloaded setup.

try upgrading the libraries

also run sudo apt-get update && sudo apt-get upgrade

try increasing the ram to 4GB and check.

regarding that swap issue

run swapon -a and swapon -s first.
I run GParted to see what was going on with my swap partition.
Then look at fstab and compare it to blkid

the above will help you to get an idea what happened to the swap

your computer is not strong enough to run 64 bit ubuntu 14.04 i think, you should consider using ubuntu 32bit, lubuntu or xubuntu if you want to keep yourself up to date.


How to add Windows 7 to GRUB2? I am currently using Ubuntu 12.04 LTS and I want to dual boot it with Windows 7. Let me explain what did I do:

There was only Ubuntu 12.04 on and I get it's image with clonezilla. Ubuntu was installed on sda which is 128 GB SSD and there was a 1TB harddisk for another purposes.
I desperatly try to install Windows 7 alongside ubuntu but I can't managed it. Windows 7 could not recognize my hard drives.
So I searched and changed my bios settigs to IDE from RAID.
I accomplished to install Win7 on sdb1.
Now I have a running Win7 but there is no sign of SSD on windows. (I know there won't be any ubuntu at boot because mbr writing over grub.)
After installation I tried to re-install grub but I failed.
I used a software named "boot-repair" but that failed too.
I switched my BIOS settings to RAID from IDE and now win7 is not booting.
I tried to use repair tool in windows 7 installation disk which is another fail.
Switched back to RAID and installed brand new ubuntu on sda.
Used clonezilla to restore my first ubuntu back on sda.
Tried to use "boot-repair" but failed again.

Current situation:

In BIOS in storage device options my settings is RAID.
I have ubuntu installed on my sda.
I have win7 installed on my sdb1.
My boot is grub and it only shows ubuntu.

And here is an information about my disks situation which is created with "boot-repair"

http://paste.ubuntu.com/5665110/

My question and desire is simple. I want to dual boot these two systems. If I can add win7 which is in sdb1 at the moment into grub2 my problem will be solved. You can answer it here or I am willing to read any guide you can link to me. But I must say I read a lot of guides none helped. Bootloader could be grub or mbr doesn't matter. I can format all the harddisks there is no important information on both ssd and hdd (which I tried but I failed that too.). I have an external 1tb usb harddrive (if it can help any).

Thank you for your time to read my problem. =)

This answer is rather late, but it may help someone else.

I suspect the problem is due to you having the RAID enabled at the time of the install. With most fake RAID controllers (almost certainly the sort that you have on your board) the RAID BIOS routines will create a special on-disk format. If the disk is then connected with the RAID switched off, then the regular system will not be able to read anything that is on that disk.

Check if with RAID OFF either disk will boot. If not, the way to proceed is to ensure that RAID is off in your BIOS, then wipe each disk and re-install the OS you want to
each of the two drives (if one disk boots then it does not need to be reinstalled).

Check that each disk will boot as the sole (and usually first) disk in the system.

Then ensure that you are booting from the first disk with Ubuntu installed. You can then add the Win disk as the second drive and add its stanza to Ubuntu grub, either manually or using boot-repair.

The only time you need to have RAID on is with multiple hard drives of the same size for striping or for data redundancy. NEVER turn it on with two disks of different sizes or types (unless you know exactly why you are doing so, of course!). And as a last point, if you do need RAID,  most people will find that Linux software RAID is better than all fake-RAID (and often hardware RAID that costs less than $350 and does not have dedicated memory)...

Try os-prober and update-grub, if you haven't already.


How to install php IMAP for php5-fpm? I'm trying to install Vtiger CRM on ubuntu. This require IMAP. How to install PHP IMAP for php5-fpm?

Carry out the following:

apt-get install php5-imap

However it's not enabled by default so enable it with:

php5enmod imap

Then bounce apache:

service apache2 restart

Done.

It in the repositories:

$ apt-cache search php5-fpm
php5-fpm - server-side, HTML-embedded scripting language (FPM-CGI binary)

So, use apt:

$ sudo apt-get install php5-fpm


Why does my kernel fail to build? So I am a Linux noob, but I am still working on getting my Intel tablet working with all the devices, this is very much a learning experience for me. Plan in the end is to just have a bootable image that can be installed. Final goal I wish is to have Ubuntu touch, so thats why I am working with Ubuntu. (I don't know if Ubuntu Touch will turn out great, but I need to have a goal right (-; ) This is the Github page I (and another guy) are using for documentation. Now I am trying to compile my own kernel to add the touchscreen driver, and also try to add the bluetooth controller to rfkill because the wifi/bluetooth driver does not get the bluetooth up and running. I am doing it in Virtualbox on my desktop since i have a 6 core 4.3Ghz Overclocked watercooled CPU, and the tablet has an atom processor (quad, 1.8Ghz but not all Ghz are created equal ;P). I use the same Ubuntu Iso file in Virtualbox as on the tablet.
These are the steps I do to compile, first get the source

 sudo apt-get build-dep linux-image-`uname -r`
 sudo apt-get install libncurse5
 apt-get source linux-image-`uname -r`

Okay, gonna add the touchscreen driver now. This driver was suggested to me to try by a guy that wrote another (not this one) touchscreen driver.

 cd linux-4.2.0/driver/input/touchscreen/
 patch < ~/silead.patch

Now to add my device to rfkill, a guy that have the same chipset had to do this to get the wifi/bluetooth driver to work with bluetooth.

cd ~/linux-4.2.0/net/rfkill/
patch < ~/rfkill-gpio.patch

Now I'm gonna clean, and IDK why but run mrproper and prepare. I get a yes when it asks about the silead driver.

cd ~/linux-4.2.0/
make clean
make mrproper
cp /boot/config-`uname -r` .config
make prepare

Then I select load and load the .config file and save it again to see if there are any errors with the config.

fakeroot make-kpkg -j11 --initrd --append-to-version=-vi8-test kernel_image kernel_headers

This is the output which fails here.

scripts/Makefile.build:258: recipe for target 'ubuntu/vbox/vboxguest/VBoxGuest-linux.o' failed
scripts/Makefile.build:403: recipe for target 'ubuntu/vbox/vboxguest' failed
scripts/Makefile.build:403: recipe for target 'ubuntu/vbox' failed Makefile:959: recipe for target 'ubuntu' failed

I am at a loss here, I dont know what I am doing :(

The resolution to my problem, which was an acceptable solution for me was to pull the kernel source from git instead. This compiled just fine, I don't know why the apt-get source fetched source did not.


Wifi problem with Ubuntu 14.04 and RTL8723ae My laptop MSi S12 has a RTL8723ae PCI card with Ubuntu 14.04 on board. It doesn't detect wi-fi networks.

I tried the answers from ubuntuforums and Wireless card Realtek RTL8723AE-BT is not recognized but make fails.

How can I fix this issue?

UPDATE:

1) Fail with "make" drivers is the same like here - Problem building an rtl8723 driver . And, in my case rtl_92ce_92se_92de_8723ae_linux_mac80211_0007.0809.2012.tar.gz gave me the same error (I suppose drivers have trouble with 3.13 kernel).

2) Wireles modules looks OK:

alex@gendalf:~$ lsmod | grep ^rtl
rtl8723ae              76506  0
rtl8723_common         22417  1 rtl8723ae
rtl_pci                26314  1 rtl8723ae
rtlwifi                52835  2 rtl_pci,rtl8723ae

3) A little bit more information

alex@gendalf:~$ iwconfig
wlan0     IEEE 802.11bgn  ESSID:off/any
          Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm
          Retry  long limit:7   RTS thr=2347 B   Fragment thr:off
          Power Management:off

lo        no wireless extensions.

eth0      no wireless extensions.

`

I've experienced much better performance with this network card following the advice from this user:
https://zach-adams.com/2014/06/fixing-rtl8723ae-driver-ubuntu-linux/
In short, two stages:

Try installing the linux-firmware-nonfree drivers with this command:
sudo apt-get install linux-firmware-nonfree

Try installing the WICD network manager. For instructions for your version of Ubuntu, see https://help.ubuntu.com/community/WICD

I have problem with rtl8723ae when i am using windows 8.After changing os from windows 8.1 it automatically installed wifi driver.After that i changed os windows 8.1 to ubuntu 14.04.
check their official website for more details.


Gmail notification on Ubuntu 13.04 I'm upgraded from 12.04 to 12.10 and then to 13.04. In 12.04 I was usage with gm-notify to alert me when a message is coming in the messaging menu. In 13.04 its not shown in the messaging menu.

There is another sample app that show in the messaging menu when message is coming to Gmail?

For me, Unity Mail resolved the issue.

apt-get install unity-mail or install it from Ubuntu Software Center searching for Unity Mail.

If you have either Firefox or Chromium installed then you can use the Web App.

Click here: https://apps.ubuntu.com/cat/applications/unity-webapps-gmail/

and install the Web App.


Why is kswapd0 running on a computer with no swap? I have a cloud server with ~14G of RAM and no swap. However, I occasionally see kswapd0 taking up some CPU when I run top. Why would kswapd0 be running at all if there's no swap space for it to manage?

Swap space is only used for data that is not backed by any other file.  Data that is mapped from other files on disk ( such as executable programs ) is still swapped to their respective files even if you don't have a swap device.

Well, I had the issue, taking lots of RAM, no swap, and my laptop hangs completely.  Killing the offending processes automatically did not seem to work, so now I made sure I had swap installed, to stabilize my machine.  This seems to have worked.
Like 20 years ago, this also worked in Linux, it just killed what didn't fit, and that was that, now I had to hard boot my machine every time it took up too much RAM, and that's really not what I had expected.  At all.


Can not install MySQL on my Ubuntu 12.04 I had trouble installing MySQL server on my laptop. And now if i try installing anything new it gives an error message. I tried most of the sites but could not find a solution to my problem.

When I run sudo apt-get install -f I get the following message:

 sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  mysql-server-5.5
Suggested packages:
  tinyca mailx
The following NEW packages will be installed:
  mysql-server-5.5
0 upgraded, 1 newly installed, 0 to remove and 497 not upgraded.
1 not fully installed or removed.
Need to get 0 B/8,719 kB of archives.
After this operation, 31.3 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Preconfiguring packages ...
(Reading database ... 152696 files and directories currently installed.)
Unpacking mysql-server-5.5 (from .../mysql-server-5.5_5.5.32-0ubuntu0.12.04.1_i386.deb) ...
groupadd: cannot lock /etc/group; try again later.
addgroup: `/usr/sbin/groupadd -g 139 mysql' returned error code 10. Exiting.
dpkg: error processing /var/cache/apt/archives/mysql-server-5.5_5.5.32-0ubuntu0.12.04.1_i386.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 /var/cache/apt/archives/mysql-server-5.5_5.5.32-0ubuntu0.12.04.1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Restart your system, if the problem persists then run, in a console:

sudo rm /etc/group.lock /etc/gshadow.lock


Problem installing Grub Customizer in Lubuntu I'm using Lubuntu.
I tried to install Grub Customizer but I have problems.
I used the following commands:

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer

But, I can not find Applications > System Tools > Grub Customizer. I also ran gksu grub-customizer in a terminal but nothing happened. What to do?

Simply type grub-customizer in a terminal. It will ask for your sudo password. It should run once you type that in.

I had this problem, couldn't find a solution online, and did the following to get it working.

First, one line at a time, paste these commands into terminal and run.

sudo add-apt-repository ppa:danielrichter2007/grub-customizer

The repository had to be added before I could do the next step:

sudo apt-get update

then,

sudo apt-get install grub-customizer

After these steps, Grub Customizer still didn't show up in System Tools menu, which probably means the app is not installed.

Now, I'm not sure what is necessary to do and what is not, but doing the following got Grub Customizer installed and running. (Again, one step at a time.)

sudo apt-get upgrade grub-customizer
sudo apt-get build-dep grub-customizer

Finally, I went into synaptic, typed "grub" and grub-customizer finally showed up. I had to install it from there. Why it didn't show up in synaptic once the repository was added in the first place, I don't know. But, now it shows up in the application menu, launches, and functions at least on the first tab.


Cannot move file to trash warning when trying to delete a file in Nautilus I am trying to delete files in Nautilus and every time I try to delete one it always gives me this message:

  Cannot move file to trash, do you want to delete immediately?

Then it gives me several questions. All I want is that when I press Delete in the keyboard, it sends it automatically to the trash can. Not to ask me every time.

The problem relates to NTFS partitions, external drives but also include Linux filesystems.

What are the reasons for nautilus beeing not able to move to trash?

(About removable media, not the case from the user since it was a bug solved with an update)

This behaviour happens because when the drive is mounted you are not considered the owner so a trash bin cannot be created. No uid or gid was assigned and since a trash bin folder cannot be created in the drive you are only offered the choice to delete the files automatically.

In that case you have 2 options: cut the files in to your Linux file system and delete them there (which defeats the purpose of press delete and the files are deleted) or make sure you are assigned the correct permissions when mounting the drive.

Create a new rule for your auto-mounted drives with these lines, use your favorite text editor for that

  gksudo gedit /etc/udev/rules.d/10-my-media-automount.rules

# vim:enc=utf-8:nu:ai:si:et:ts=4:sw=4:ft=udevrules:
#
# /etc/udev/rules.d/10-my-media-automount.rules

# start at sdb to ignore the system hard drive
KERNEL!="sd[b-z]*", GOTO="my_media_automount_end"
ACTION=="add", PROGRAM!="/sbin/blkid %N", GOTO="my_media_automount_end"

# import some useful filesystem info as variables
IMPORT{program}="/sbin/blkid -o udev -p %N"

# get the label if present, otherwise assign one based on device/partition
ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}"
ENV{ID_FS_LABEL}=="", ENV{dir_name}="usbhd-%k"

# create the dir in /media and symlink it to /mnt
ACTION=="add", RUN+="/bin/mkdir -p '/media/%E{dir_name}'"

# global mount options
ACTION=="add", ENV{mount_options}="relatime"
# filesystem-specific mount options (777/666 dir/file perms for ntfs/vfat)
ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},gid=46,dmask=000,fmask=111,utf8"

# automount ntfs filesystems using ntfs-3g driver
ACTION=="add", ENV{ID_FS_TYPE}=="ntfs", RUN+="/bin/mount -t ntfs-3g -o %E{mount_options} /dev/%k '/media/%E{dir_name}'"
# automount all other filesystems
ACTION=="add", ENV{ID_FS_TYPE}!="ntfs", RUN+="/bin/mount -t auto -o %E{mount_options} /dev/%k '/media/%E{dir_name}'"

# clean up after device removal
ACTION=="remove", ENV{dir_name}!="", RUN+="/bin/umount -l '/media/%E{dir_name}'", RUN+="/bin/rmdir '/media/%E{dir_name}'"

# exit
LABEL="my_media_automount_end"

Reboot your computer and your ntfs drives will be mounted using this custom rule, to change the permissions for the mounted drive have a look at the line $env{mount_options},gid=46,dmask=000,fmask=111,utf8", the option gid=46 should mount the ntfs drive with group privileges (46(plugdev) is the group that allows a user to mount a drive in Ubuntu), fmask and dmask settings to write, create, delete files/folders on the  drive.

Change it according to needs. You will need to sort out other file systems by yourself according to to each type but this should get your started.

(Source for the udev rule)

For those who like GUIs, here's how to solve this graphically:

Open up the nemo file editor (sudo apt-get install nemo to install) with elevated privileges, by typing sudo nemo into a terminal. [This will probably work in nautilus too, but I've only tested in nemo].
Right-click the mounted device where your files are stored, and go to "Properties."
Go to the "Permissions" tab, and for "Owner," click the drop-down menu and select your username. Close everything and go back to your normal file manager.
With you set as the owner of the device, it should now create a trash for you on that device and allow you to press the delete button to automatically move files to the trash.


Can I get Network Manager to unload/load the wireless driver? Sometimes my wireless loses connection and will not reconnect. However, I find it will reconnect when I open terminal and run

sudo modprobe -r nameOfDriver
sudo modprobe nameOfDriver

However, going to Network Manager and un-checking enable wireless and enable wireless does not fix the problem.

Is there any way to have network manager remove the driver via modprobe? What exactly is disabling in network manager (or with the hardware/keyboard switch) do?

Disabling a wireless connection in Network Manager deactivates the wireless interface (similar to ifdown or ifconfig down), and then soft-blocks (turns off) the hardware device. It does not unload the wireless driver (kernel module).
The hardware/keyboard wireless switch will also soft-block (or hard-block, i.e. cut power) the internal wireless card.
You can customize -- to a limited degree -- what happens when Network Manager enables/disables an interface by editing scripts in /etc/NetworkManager/dispatcher.d; see man NetworkManager for more info.

BUT this cannot be used to load/unload the driver via modprobe, because once Network Manager unloads the driver, the interface ceases to exist and it won't be able to bring it back up! (notice when you modprobe -r that the Wireless options completely disappear from the drop-down menu)

So, the best option is to setup a custom keyboard shortcut to a script which unloads/loads the driver; you can add that script to the sudoers file such that no sudo is needed for it. See this question for details.

modprobe -r is removing the driver but only for the session. To do so permanently, you would need to blacklist it, but I don't remember how sorry. the wireless button/switch is meant to turn off your wifi by disabling the driver btw.


Problem installing ubuntu 12.04 desktop on sony vaio duo 13 I bought new sony vaio duo 13 canadian english keyboard layout with window 8..

I tried more than 5 times installing ubuntu 12.04 using external cd drive. It is not working on sony vaio duo 13. But it working in all other pcs...

I disable safe boot and ubuntu installed in normal mode. But it can't find wireless when starting installation my touch pad also not working during installation process. But i connected internet using lan during installation. During installation it normally open in desktop mode.

After installation complete it open in command prompt only. It is not open desktop environment.

I already updated all packages .. and i also tried re installing ubuntu desktop... i tried every thing... But i am not able to get my ubuntu desktop environment..

Previously i used sony vaio with ubuntu 12.04 desktop.. I want to install ubuntu 12.04 desktop because my website is hosted in ubuntu 12.10 so to develop my website i need ubuntu on laptop..

Please some one help to resolve this problem....Thanks in advance...........

A youtube video : https://www.youtube.com/watch?v=QeNTtn231cU dealing with a vaio pro 13 has the following in the comments:

“I was going to install the current Long-Term Support release of Ubuntu, 12.04 LTS (Precise Pangolin), but as others have noted, this version of Ubuntu has trouble with the wifi hardware on the VAIO Pro. So I ended up using the latest release, 13.10, which supports the wifi.”


how to downgrade JAVA I'm new to linux and I want to install some software. When I downloaded it and launched it with the sh command (I just followed instructions, so I'm not sure what that command is for) the terminal displayed this:

  No suitable Java Virtual Machine could be found on your system.
  The version of the JVM must be at least 1.6 and at most 1.6.
  Please define INSTALL4J_JAVA_HOME to point to a suitable JVM.
  You can also try to delete the JVM cache file

Can someone help me to install this? If so please be specific with everything since this is my first time using Linux.

This is what I'm trying to install:

https://familysearch.org/indexing/get-started-indexer

First, there is no need to "downgrade"; multiple simultaneous versions are supported. You can install Java 6, something like

sudo apt-get install openjdk-6-jdk

Then you can do something like (depending on platform)

export INSTALL4J_JAVA_HOME="/usr/lib/jvm/java-6-openjdk-amd64"

If you find what command you used, you might be able to get other help, like if the command was broken, or may need other packages.

You probably just need to install openjdk-6-jre like Elliot said, but just in case, you might as well.


YouTube not working on 32 Bit Ubuntu 14.04 I am using Ubuntu 14.04 on a 32 Bit PC. For the past two or three days neither of my browsers (Firefox & Chromium) is able to play Youtube.
I see this message:

"pubads.g.doubleclick.net refused to connect"
How can I fix this?

The 32-bit of these browsers and the back-porting to 14.04 is pretty limited. My guess is that at some point some sunset dates on various technologies like what types of ciphers used to encrypt the HTTPS connection have passed and now those ciphers or certificate algorithms are no longer allowed by the server.

If you open the Inspector and go to Console (in both Firefox or Chrome it's almost the same) and try to load the page you should see an error or warning in the console explaining what support is no longer present.

It's a real pain too because 32-bit systems are left mostly just needing to be updated to 64-bit systems, even if they don't use more than 4GB of RAM etc. It's mostly because developers don't want to support both 32-bit and 64-bit and package managers also don't want to.

EDIT If you think this answer is wrong please explain why. I have multiple 32-bit systems I very much want the browser supported, but they aren't.


How do I repackage a .deb for Ubuntu Snappy? I want to convert some Ubuntu software in .deb, specifically guake, to packages for Ubuntu Snappy*.

According to the documentation on the Ubuntu dev tools,

  All metadata lives in meta/package.yaml. The details of that file are documented in the snappy developer documentation, but in short, it's super simple and you can get away with something as straightforward as:

name: pkgname
version: version-string
apps:
  binary:
   - command: path/to/binary
  another-binary
   - command: path/to/another-binary

  ... your package is called "pkgname" ... version "version-string" and ... binaries, called pkgname/name and pkgname/another.

I googled it myself, and have found little on the subject of such conversion.

As a build engineer, by trade, and an Ubuntu enthusiast by love, I may be in a position to benefit from learning this sort of thing.

How does a .deb turn into snap*?

* Apparently, the format for packages for Ubuntu Snappy is called the "snap" format.

Take a look at https://github.com/ubuntu/snappy-playpen/blob/fd5d4a3a1e3f0acc13370adbf98c9a3481d1328a/leafpad/snapcraft.yaml for a simple example.

The relevant part of snapcraft.yaml here is:

parts:
  leafpad:
    plugin: nil
    stage-packages: [leafpad]

Here you define a part called leafpad, for which nothing needs to be done (nil plugin), but the contents of the Ubuntu package leafpad to be staged. That's it.

https://developer.ubuntu.com/snappy/build-apps/ obviously has more information on that.

I found deb2snap which converts deb packages to snaps.

Haven't tried it.


lxsession-default tasks broken Using Lubuntu.

When I hit Ctrl-Alt-Del, it logs me out to the login screen.  It's supposed to bring up the task manager.

Turns out that "lxsession-default tasks" is the problem.

I searched, and there is almost nothing on the web about this command.

In Preference -> default apps for LXsession, I have set the default to Task Manager.  But somehow it's not working.

Disgusting really.

Ubuntu 14.04 LTS, LXDE.

Temporary solution:

Edit  ~/.config/openbox/lubuntu-rc.xml

Find the entry that invokes "task manager", change the command from "lxsession-default tasks" to simply "lxtask".

Why don't you try installing qps (qt process manager)?

sudo apt-get install qps

Now CTRLALTDEL should work.


How do I sync contacts on Ubuntu Touch? How do I sync (upload to/download from) my contacts, with my Ubuntu Touch OS?

Here is a simpler and more up-to-date answer for Ubuntu Touch 14.09/14.10.

Even if it is easier that it used to be (no need to be root, no need to use the developer mode...) an app that automates this would be appreciated.

Import

Copy your contacts (as one or multiple .vcf, other formats might work too) to your device. Let's say that you put them in a "Documents/contacts" folder.
Via the terminal app or via adb/ssh, run the following command:

syncevolution --import /home/phablet/Documents/contacts/your.vcf backend=evolution-contacts

And that's it!

SyncEvolution does not seem to support globbing, so if you have a lot of vcf files you can use a command like this one to import all vcf from the folder at once:

find /home/phablet/Documents/contacts -name *.vcf -exec syncevolution --import {} backend=evolution-contacts \;

Export

To create a "allmycontacts.vcf" files into the "Documents" folder, just run the following command via the terminal app or via adb/ssh:

syncevolution --export /home/phablet/Documents/allmycontacts.vcf backend=evolution-contacts

syncevolution --import /path/to/file/allcontacts.vcf backend=evolution-contacts database=system-address-book


Ubuntu does not detect USB stick with lsblk or fdisk I have a usb stick that needed formatting because ubuntu couldn't detect it or mount it. I found a few solutions online and used lsblk and fdisk commands to list out all devices that are attached. I could see it and when I tried to format it or use mkfs command to make it fat32, I got an error and eventually made things worse, cause now I can't see usb using lsblk or fdisk.
I can see it's plugged in using lsusb as unknown, but don't know what to do from there and how to get it back in life.
Gparted and Disk utility doesn't see it also, but with other usb stick's everything is ok, so it's not the Ubuntu drivers.

Can anyone please help?

Install gparted
    sudo apt-get update; sudo apt-get install gparted

Click here to see image


Boot time is super fast, how come? The boot time in Ubuntu is really fast.  7-10 seconds.  Comparing it to my mac (which is about 30-40 seconds).  How come Ubuntu is so much faster?  I'm thinking that it uses a different kernel (Linux).  I'm not sure if that would come into account for anything...

It boots fast because people have worked very hard toward that goal over the past couple of years since Ubuntu 8.10. Some of the major factors (over pre-10.04 Ubuntu):

Moving the boot process over to an event model (Upstart) so that things both load in parallel and when they're needed. It's a genius system.
X (the graphical desktop to most people) is now loaded very early on. By getting it ready faster, you can show the user something much quicker.
Removing deadwood from initramfs (the image that is loaded by grub to boot the system)
Various caching mechanisms have come and gone including sreadahead and ureadahead. These work by generating a binary block of files your system uses at boot so that can be read off the hard disk in one go.

Comparing 8.10 and 10.10, you probably only see a sixth of the boot time now. It's a very impressive improvement... But that doesn't really explain why it's faster than other systems.

For that I think I can only really say they're heavier and aren't as good at booting service in parallel.

Boot time of ubuntu is not 7 seconds AFAIK. The fastest you can get is 15-30 seconds boot time (login time not included). The fastest boot of a full Desktop OS I have heard of chromeOS which is 3 seconds(that too when it comes with their hardware).
It takes time to load drivers, scripts etc. Any ways boot time in Ubuntu(and other Linux distros) is faster than others because they use modern techniques already discussed above.
http://www.tuxradar.com/content/benchmarked-ubuntu-vs-vista-vs-windows-7


how do I remove the chmod +t file permissions I was setting up a new hard drive for temporary folders and accidentally set the chmod +t (sticky bit) file permission. How can I remove this setting?  I have a program using it as temp folders and when it's done I can delete the files after I read them.

Execute

chmod -t your_folder

to remove the sticky bit.

+ means add and - means remove.

Read the manpage for more details: man chmod

This link have a complete explain for sticky bit


Being new to Ubuntu/Linux, how does one match a brand new laptop to the appropriate version of Ubuntu? I have a brand new Lenovo ideapad U530, pre-installed windows 8.1 64bit 1TB with an ssd.

With so many different variations of Linux I'm confused to which one will work the best
for my laptop specs.

I've done some research and read many reviews. Some issues relating to overheating, issues in BIOS vs UEFI modes, wireless connection problems etc.

I would be extremely thankful if someone could recommend wither I should choose Ubuntu
12.04 LTS, LinuxMint, Luna, Linuxlite, Fedora, Kubuntu.

This is really mostly a matter of taste, and I would advise you to try out and judge for yourself. There simply isn't a unique answer here.

I recommend taking a look at DistroWatch which makes a good job in listing many popular distributions and their differences.

Ubuntu is certainly a good distribution to start with, easily usable by newbies yet as powerful as any Linux for advanced users. But so are many other distributions.

If it's going to be Ubuntu, you should choose between Ubuntu 12.04 (long time support) or Ubuntu 13.10 (the latest release). An LTS version typically has older software without the newest cutting-edge features, but provides a stable experience and you won't have to update for a long time. A non-LTS version such as 13.10 will give you newer software, yet it is only supported for 9 months, so you will have to do an upgrade sometime mid-2014 at the latest.

Ok I got your back so prepare to get.... an answer:

The reason why you should chose Ubuntu ( I say 12.04)  it's because Ubuntu is backed up by Canonical, you see in order for any Linux distro out there to get updates to be: secured, increase performance.... there must be people out there to do that, Canonical is not just some 21 year old computer geek who is still learning Canonical it's a bussines they know what they are doing so being backed up by Canoical Ubuntu it's more reliable, it's more stable and secured. Other distros are developed by either a group either even one person but not much  an Enterprise.

The reason why you should chose 12.04 is because it's LTS (Long Term Support) Canonical will offer updates for this distro for a long time this makes the developers able to make good software for Ubuntu since they have the ensuring from Canonical that the distro is going to be "alive" until 2017.
   There are a lot of great Linux  projects out there that is just great but really if you look on the market there are really only 3 of them RedHat (for like BIG data centers, big cloud infrastructure)
Ubuntu (more geard toward end user (home user) but also on servers and cloud) and Suse with Suse Linux Enterpise the same for all .

For example  really popular software it's available for Ubuntu such as : Skype, Steam, Teamviwer, GoogleChrome and a lot more on the Ubuntu Software Center, Other distros such as Fedora don't come with Steam,Skype you can get them wroking but... not even legal for example Ubuntu has access to legal MP3 encoding and other movie / music formats, again because Ubuntu look towards end-users such us you and me.


How do I get started with Translations? My friend and i would like to translate Ubuntu. where should we start? where to find translation tools?

The Translations page in the Ubuntu Wiki explains the process very well.

You also read https://wiki.ubuntu.com/Translations

Cheers ;)


Where I can find the contents of the default /etc/bash.bashrc file? I accidentally overwrote the /etc/bash.bashrc file.

Please give me the default content in that file to restore, or the file itself.

If you overwrote your bash the best way is to copy it again from your system itself instead of someone else:

rm ~/.bashrc
cp /etc/skel/.bashrc ~/

In addition to the the information given by Braiam, you can copy the contents of the following .bashrc file as commented in How to restore .bashrc file?


Problem with text deletion in vi editor When I am writing C code on the vi editor, I am not able to use the backspace keys or my arrow keys to delete or navigate through lines. Some unexpected special characters occur on the screen that is on middle of my code and I am not able to delete them also. If I use my delete key, the whole code gets deleted. I have tried both insert mode using 'i' and 'a'. I am able to manage this situation for C programming by using the text editors but when I am creating LeX and yacc programs, I find this awkward.

Can you please help me with this?

Help with the vi editer and its commands-

Vi Editor Commands

How to use the vi editor

You can do it easily by typing the following command:

$ vi .vimrc

After creating the file you add the below lines in to it:

set backspace=2


How can I go from hosting locally to being internet accessable? I have a server that is hosting a "shiny" app using shiny-server. I can host locally where my address looks like:

http://charles-p-7805u:3838/histogram/

or

http://127.0.0.1:3838/histogram/

How can I make this hosted on the internet?  Sorry for the general and possibly vague question but I'm not very educated.  My intuition says that I could have others connect to my IP and port if I could make them public.  Is this incorrect?

Thanks a bunch. Working with 12.04.  Please ask for any clarification if I missed any important details to mention.

First thing it to check if you have class A IP address. Just go to this address and note down our ip. http://ipaddress.com

Also look for ifconfig output. Both addresses should be the same.
If yout ip does not start with 172, 10 ,192 then you are ready to go. From a diffrent computer or from your phone just enter http:/yourip:3838/histogram/
If you have an class C ip address then you must have access to your router / gateway and make an port fowarding.


Problems dual-booting Windows 10/Ubuntu 14.04 Completely new to Linux. I tried installing Ubuntu with Windows 10 choosing the installation option for Ubuntu to dual-boot alongside Windows Boot Manager. The installation ran smoothly and I restarted my computer. It restarted and booted Windows 10. I tried many times at it still kept booting up Windows. I also tried Boot-Repair and doing a fresh reinstall. Nothing works. When I start-up my computer, it says 'Reboot and select proper boot device.' The only way i can use my computer is if I boot a LiveCD and choose the 'Try Ubuntu' option. How do I get my computer to boot Windows/Ubuntu?

Boot-info:
http://paste.ubuntu.com/12068275
http://paste.ubuntu.com/12068489

I had the exact same problem and tried everything you did too. Finally this is what helped. I opened CommandPrompt as administrator and ran the following:

bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi

Hope that helps.

You have to go into your uefi/bios settings and either enable legacy boot or disable secure boot, or both. I had the same problem and mixing random settings in there fixed it.


Why does loading my own ~/.Xmodmap freeze my desktop on 18.04? I created a modified Xmodmap file in my home directory. When I try to load it with.

xmodmap ~/.Xmodmap

or on startup, it freezes my desktop for several minutes. It wasn't the case on my Xenial Desktop.

Stackexchange user @kontrollantaren show us here how it can be solved in some situations:
Before initiating custom xmodmap config:

# Store default xmodmap
$ xmodmap -pke > ~/.Xmodmap.default

# Backup your custom xmodmap
$ mv ~/.Xmodmap ~/.Xmodmap.bak

# Make a diff between default and custom xmodmap, and store the diff as .Xmodmap
$ diff ~/.Xmodmap.bak ~/.Xmodmap.default | grep '<' | tr '<' ' ' > ~/.Xmodmap

Also the user @C.T. proposes here using xkb instead of xmodmap.

Offtopic: I cannot comment but when answered the question it was placed as a comment.

When xmodmap runs, it calls the XChangeKeyboardMapping function once for every modified key, generating MappingNotify events each time and slowing down the system. An alternative would be to use xkb instead which does not have this problem.

Just modify the file in /usr/share/X11/symbols/pc which has the following layout

key <LCTL> {    [ Super_L       ]   };
key <LWIN> {    [ Control_L     ]   };
...

Now to make these changes take effect simply clear the xkb cache by using

rm -rf /var/lib/xkb/*


How do you update npm to the latest version? I'm having issues with npm in a Vagrant box I'm setting up. I noticed that the npm version is somewhat old, so I wanted to check the problem with the latest release.

It is my understanding that you should be able to update npm using npm install -g npm, but the command has no effect on the npm being used:

vagrant@box:~$ npm -v
1.3.10
vagrant@box:~$ sudo npm install -g npm
npm http GET https://registry.npmjs.org/npm
npm http 200 https://registry.npmjs.org/npm
npm http GET https://registry.npmjs.org/npm/-/npm-2.1.12.tgz
npm http 200 https://registry.npmjs.org/npm/-/npm-2.1.12.tgz
/usr/local/bin/npm -> /usr/local/lib/node_modules/npm/bin/npm-cli.js
npm@2.1.12 /usr/local/lib/node_modules/npm
vagrant@box:~$ npm -v
1.3.10

I also tried using n (as suggested in How can I update my nodeJS to the latest version?) to update, but it affects neither npm nor node:

vagrant@box:~$ node -v
v0.10.25
vagrant@box:~$
vagrant@box:~$ sudo npm install -g n
/usr/bin/n -> /usr/lib/node_modules/n/bin/n
n@1.2.9 /usr/lib/node_modules/n
vagrant@box:~$ sudo n stable

     install : v0.10.33
       mkdir : /usr/local/n/versions/0.10.33
       fetch : http://nodejs.org/dist/v0.10.33/node-v0.10.33-linux-x64.tar.gz
   installed : v0.10.33

vagrant@box:~$ node -v
v0.10.25
vagrant@box:~$ npm -v
1.3.10

What do I have to do to update npm to the latest version?

I still don't understand why, but I have to run npm install -g npm twice for it to have the desired effect:

vagrant@box:~$ npm -v
1.3.10
vagrant@box:~$ sudo npm install -g npm
npm http GET https://registry.npmjs.org/npm
npm http 200 https://registry.npmjs.org/npm
npm http GET https://registry.npmjs.org/npm/-/npm-2.1.12.tgz
npm http 200 https://registry.npmjs.org/npm/-/npm-2.1.12.tgz
/usr/local/bin/npm -> /usr/local/lib/node_modules/npm/bin/npm-cli.js
npm@2.1.12 /usr/local/lib/node_modules/npm
vagrant@box:~$ npm -v
1.3.10
vagrant@box:~$ sudo npm install -g npm
/usr/bin/npm -> /usr/lib/node_modules/npm/bin/npm-cli.js
npm@2.1.12 /usr/lib/node_modules/npm
vagrant@box:~$ npm -v
2.1.12

Upgrading to nodejs v0.12.7
# Note the new setup script name for Node.js v0.12
curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash -

# Then install with:
sudo apt-get install -y nodejs

Source: Node.js v0.12, io.js, and the NodeSource Linux Repositories | nodesource.com


How can I configure Unity? Are there any configuration options for the Unity desktop?

There are multiple valid answers for this question spanning over several versions of Ubuntu. For your convenience an index of each below (How can I tell which Ubuntu release I'm using?):

13.04
12.10
12.04
11.10
11.04

If you're looking to configure Unity 2D, look here.

Ubuntu 11.04

There are two options to edit the settings. Either using the CompizConfig Settings Manager (ccsm) or the Configuration Editor (gconf-editor). I'll describe both ways.

CompizConfig Settings Manager

Warning: CCSM is in universe and not shipped by default for a reason, it can be flaky, so be careful in there, it can break things, if you find yourself with a broken window manager, see this question to reset your configuration.
Install the CompizConfig Settings Manager
(CCSM).
Hit Alt-F2 and input about:config and hit enter.

You can now configure quite a few different settings. Like key shortcuts, the launcher behavior and appearance of the Launcher.

On the Behaviour tab you can configure:

The Hide Launcher sets the launchers hide behavior.

Never - The launcher will never hide.
Autohide - The launcher will hide automatically based on time.
Dodge Windows - The launcher will hide when a window would overlay it.
Dodge Active Window - The launcher will hide only when an active window would overlay it.

The key to show the launcher which by default is the Super key. This will also affect the key used to show the dash (if tapped) and the shortcuts shown when keeping Super pressed.
The key to put keyboard-focus o the launcher so you can navigate using your keyboard (default Alt + F1).
The key to open a Search Command dash where you can enter a command name you want to execute. (dafault Alt + F2).
The key to open the first panel menu (default F10).

On the Experimental tab (might change hence the name):

The Backlight Mode sets how the icons are back-lit.

Backlight Always On - the icon back light will always be on.

Backlight Toggles - the icon back light will be on as long as the application is running.

Backlight Always Off - pretty much the opposite of the first option.

The Launch Animation sets how the icons are animation.

None - no animation will be shown.
Pulse Until Running - the icon's back light will pulse till it loads up.
Blink - the icon's back light will blink.

The Urgent Animation sets how an icon will inform you of something important.

None - no animation.
Pulse - it will pulse.
Wiggle - it will wiggle.

The Panel Opacity sets the opacity of the panel.
The Launcher icon size sets the size of the launcher in pixels.
The Hide Animation sets how the launcher hide and unhide.

Fade on bfb and Slide - fades based on the position of your cursor in the bfb (big funny button - the one in the top left of your panel with the Ubuntu circle of friends on it) and slides.
Slide only - it will only slide.
Fade only - it will only fade.

The Dash Blur sets the level of blur in the dash

No Blur
Static - snapshot of the desktop that doesn't get updated (in cases where the drivers can't handle it)
Realtime - Updating of things behind the dash in real time (Not implemented yet)

Configuration Editor (gconf-editor)

Open up the Configuration Editor by Pressing Alt + F2 and typing gconf-editor
Navigate to apps -> compiz-1 -> plugins -> unityshell -> screen0 -> options.

Now you can set settings described above. Clicking on an item will show a short description in the Key Documentation panel.

Configuration Editor (dconf-editor)

There are also some options you can edit using dconf-editor (needs to be installed first by installing dconf-tools at Ubuntu Software Center or by clicking here):

Open up the Configuration Editor by pressing Alt + F2 and typing dconf-editor
Navigate to Desktop -> Unity to find the first two options:

form-factor: The form factor chosen will affect the size of the Dash. Desktop uses a fixed sized Dash, Netbook will always maximize the Dash to screen size, Automatic decides whether to use Desktop or Netbook based on the screen resolution.
home-expanded: Whether the home screen of the Dash should be expanded (Expanded) or not (Not Expanded).

Navigate to Desktop -> Unity -> Devices

devices-option: Key for setting the devices that will be shown on the launcher. Never -> never show devices on the launcher, OnlyMounted -> only show devices that are mounted, Always -> also show unmounted devices.

Navigate to Desktop -> Unity -> Launcher

favorites-migration: This is a detection key for the favorite migration script to know whether the needed migration is done or not. You don't want to change that.
favorites: This is a list of desktop files that show up in the launcher.

Navigate to Desktop -> Unity -> Panel

systray-whitelist: List of programs that are allowed to put icons in the panel's tray area: [''] -> none , ['all'] -> all programs, or a list of program names.

Launcher & Menus (unity-preferences)

There is another option to configure how to show the launcher then it is hidden.

Open the Launcher & Menus configuration utility by pressing Alt + F2 and typing unity-preferences.

Pushes the left edge of the screen will make the launcher appear about one second after pushing the cursor to the left edge of the screen.
Touches the top left corner of the screen will make the launcher appear immediately when the cursor touches the top left corner of the screen.

Select the desired option.

Unsettings

Unsettings is a graphical configuration program for the Unity desktop environment that lets you change some of the Unity settings.

Unsettings can only change your users’s settings, you can’t use it to change global settings or do anything else that needs root privileges.

You can use Unsettings to change the themes for GTK, window manger, icons and cursors. But it doesn’t support the installation of new themes.

With Unsettings you can switch off the global menu and the overlay scrollbars used in Unity.

In addition to just applying the settings Unsettings lets you to save your settings into and load from a text file (JSON format) so you can easily backup you settings or copy them to a different account.

Unsettings is available for Ubuntu 11.10 and later.


Netgear A7000 on Ubuntu 16.04 not working output from lsusb:

Bus 002 Device 004: ID 0846:9054 NetGear, Inc.

and from iwconfig:

lo        no wireless extensions.

enp0s25   no wireless extensions.

Im new to linux and currently tethering connection from my windows desktop any help is appreciated

I suggest that you get a temporary working internet connection by ethernet, tether or whatever means possible. Open a terminal and do:

sudo apt-get update
sudo apt-get install git dkms
git clone https://github.com/zebulon2/rtl8814au.git
sudo dkms add ./rtl8814au
sudo dkms build -m rtl8814au -v 4.3.21
sudo dkms install -m rtl8814au -v 4.3.21

Reboot with the device inserted and your wireless should be working.

That solution didn't work for me. But after the installation of realtek 802.11ac driver netgear A7000 works fine now. (Ubuntu 20.04.1 LTS)
The steps are on this blog post
The driver is from this Kali Linux repository
Simply download the latest .deb package for the driver from there, and install using a command like this (depending on the version you download) in the same directory as the downloaded file: sudo apt install ./realtek-rtl88xxau-dkms_5.6.4.2~git20200916-0kali1_all.deb (tip: type realtek and then press tab to get the full name!).


18.04 Server - can't install much of lamp suite through standard repos with apt I'm deploying a small VPS, needing standard LAMP. The problem is, I can't install standard software through apt, like phpmyadmin, some php libs, nor even mc. Also can't find xrdp.

I've picked the x64 server live ISO.

Please help

Package phpmyadmin is in Universe repository. You may have to enable this first:

sudo add-apt-repository universe
sudo apt update
sudo apt install phpmyadmin mc xrdp

In my case I got it to work only after  applying "apt clean".

In particular:

sudo apt clean
sudo apt update
sudo apt install packyouneed


invalid extent - grub rescue TRANSLATION

I've Ubuntu 12.04 and ArtistX on a laptop with a external HDD. These work great.

After this I installed these in two PC and I get the next message on both:

-error: invalid extent.  grub rescue-.

I used CD SuperGrub and tried all their options and it doesn't work.

On the laptop the GRUB is on the external disk and I wanted the same for the PC's.

If anyone know the reason of why happens this, I'll appreciate.

TEXTO ORIGINAL

Tengo instalado en un portátil sobre un disco externo Ubuntu 12.04 y ArtistX, y van de maravilla.
Pero mi sorpresa es que después de cogerle el gustillo lo fui a instalar en dos PCs de sobremesa, ambos distintos, y lo único que consigo es

-error: invalid extent.  grub rescue-.

He recurrido al CD SuperGrub, y probado todas las opciones y no hay manera.

En el portátil el GRUB esta en el disco externo y quería que fuese así en los de sobremesa.

Si alguien conoce la causa de porque pueda pasar esto, se lo agradecería.

Muy agradecido por la contestación.
Mi problema no es no poder arrancar W7 sino arrancar UBUNTU.
Hice lo siguiente.-Grabe desde el CD de instalacion una memoria de stick, para crear un pendrive de instalación con el programa de 'crear disco de arranque'.
Luego con este pendrive instalé de nuevo Ubuntu, en el ordenador elegí multiarranque de la BIOS, seleccioné mi disco HDD USB y maravilla esta vez funcionó, me salió GRUB con las opciones de Linux y W7, estando el Grub grabado esta vez correctamente en HDD USB.
Pero mi ilusión duró poco, despues de actualizar, a la hora de reiniciar me volvió a machacar el GRUB, hablo de la versión 12.04, y la actualización del SO 27.
Esto me hace suponer que es claramente algo que ha dejado de funcionar a la hora de la acualización con el Grub.

Piensos que el GRUB en los ordenadores modernos, con multiarranque, si Usas Discos duros externos no tenga mucha razon de ser, ya que  bastaría con hacerlos bootables. De hecho ahora que he comenzado a probar Linux, hubo una distro que por desgracia no recuerdo, que a la hora de la instalación me preguntaba si quería instalar Grub o Lilo -no recuerdo cual- dándome la opción de instalarlo o saltarlo.

De todas formas muy muy agradecido.
Luis


How do I uninstall Ubuntu from my laptop? How to remove ubuntu 14.04 dual boot with windows 7 ?

Turn on the computer.
Wait for the HP logo to show.
Keep tapping the Shift key until you see this screen:

Use the ↑ and ↓ keys on your keyboard (no mouse!) to navigate to Windows and you should be back up and running!

If your screen does not contain an entry for Windows, we're sorry to say but after 2 months, all your files will be lost. The only thing you can do is take the Windows Recovery Environment from the same menu which will wipe your entire PC. If you also have no recovery environment in the menu, please restore your PC with the HP Recovery DVD and then your file back-up.

If you also have no HP Recovery DVD, contact HP, they will be able to send you one (this is probably a payable service)

Alternatively
You can use this procedure to reset the Ubuntu password, which would give you access to Ubuntu itself.

Ouch, that sucks.

There are a few ways to do this, the "best" (almost certainly will work):

Boot your computer

Press Esc

What do you see? If you see an option that says "Windows" or "Windows 7" or something like that, use the down arrow to move so that that choice is highlighted.

If the above doesn't work, you may need to boot into your BIOS setup program. Instead of pressing Esc, you may need to press one of the function keys (I think yours may be f10 based on the model).


Ubuntu 12.10 Software Center crash I looked at many other questions but none of them helped me. It closes immediately after I open it. When I opened it it Terminal I got this...

2013-03-15 17:20:07,156 - softwarecenter.ui.gtk3.app - INFO - setting up proxy 'None'
2013-03-15 17:20:07,160 - softwarecenter.db.database - INFO - open() database: path=None use_axi=True use_agent=True
2013-03-15 17:20:07,440 - softwarecenter.backend.reviews - WARNING - Could not get usefulness from server, no username in config file
2013-03-15 17:20:07,447 - softwarecenter.fixme - WARNING - logs to the root logger: '('/usr/lib/python2.7/dist-packages/gi/importer.py', 51, 'find_module')'
2013-03-15 17:20:07,446 - root - ERROR - Could not find any typelib for LaunchpadIntegration
2013-03-15 17:20:07,518 - softwarecenter.ui.gtk3.app - INFO - show_available_packages: search_text is '', app is None.
Bus error (core dumped)

I realised that I installed 32 bit, I have a 64 bit processor. I Installed 64 bit Ubuntu 12.04 and so far it's running perfectly, thank y'all for your help.

You might want to try system testing in the applications menu

Applications | System Tools | Administration | System Testing


SSH failing on different tries getting a public key error Trying to log into a server, I've messed the ssh auto login without keys trying to add a key.

When I try here's the issue I'm getting

samuel@samuel-pc:~/Documents/code/revamp$ ssh-copy-id root@67.205.154.128
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
Permission denied (publickey).

samuel@samuel-pc:~/Documents/code/revamp$ cat ~/.ssh/id_rsa.pub | ssh root@67.205.154.128 "mkdir -p ~/.ssh && cat >>  ~/.ssh/authorized_keys"
Permission denied (publickey).

samuel@samuel-pc:~/Documents/code/revamp$ ssh root@67.205.154.128
Permission denied (publickey).

You have to specify the key

ssh-copy-id -i .ssh/id_rsa.pub root@67.205.154.128

See http://bodhizazen.com/Tutorials/SSH_keys/#ssh-copy-id for details / additional information.

You can not use ssh-copy-id to transfer your key unless you can log in via another method (ie password).

If you can not read the key, then in addition you have a permissions problem. The key should be owned by your user (not root) and permissions of 400 or 440.

Permission denied (publickey).

means that the only allowed authentication method is public key and it did not work. For ssh-copy-id you usually need to have different method allowed (password) to initially connect to the server and set up the key.

At this point, it is not possible to copy your key using ssh-copy-id and you will need either somebody who still has the access to that server, remote console, or physical access to set up the key/allow password authentication.


Problem starting JACK server "Jack Server is not running or cannot be started" I haven't been able to get JACK to work despite googling and reading on forums. Please help me to get JACK to work. I am attaching the message log of JACK Control here.

02:15:40.109 Patchbay deactivated.
02:15:40.117 Statistics reset.
02:15:40.123 ALSA connection change.
02:15:40.147 D-BUS: Service is available (org.jackaudio.service aka jackdbus).
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
02:15:40.169 ALSA connection graph change.
02:15:43.877 D-BUS: JACK server could not be started. Sorry
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
Mon Dec  8 02:15:43 2014: Starting jack server...
Mon Dec  8 02:15:43 2014: JACK server starting in realtime mode with priority 10
Mon Dec  8 02:15:43 2014: ERROR: Cannot lock down 82274202 byte memory area (Cannot allocate memory)
Mon Dec  8 02:15:43 2014: ERROR: cannot register object path "/org/freedesktop/ReserveDevice1/Audio0": A handler is already registered for /org/freedesktop/ReserveDevice1/Audio0
Mon Dec  8 02:15:43 2014: ERROR: Failed to acquire device name : Audio0 error : A handler is already registered for /org/freedesktop/ReserveDevice1/Audio0
Mon Dec  8 02:15:43 2014: ERROR: Audio device hw:0 cannot be acquired...
Mon Dec  8 02:15:43 2014: ERROR: Cannot initialize driver
Mon Dec  8 02:15:43 2014: ERROR: JackServer::Open failed with -1
Mon Dec  8 02:15:43 2014: ERROR: Failed to open server
Mon Dec  8 02:15:45 2014: Saving settings to "/home/rythem/.config/jack/conf.xml" ...
02:15:47.373 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info.
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started

First you need to kill the existing pulseaudio process, start the jack_control process and re-start the pulseaudio process.

Please use the below commands:

pulseaudio --kill

jack_control start

jack_control exit

pulseaudio --start

in otions connect the correct input ,output devices
in my motherboard gigabyte F2A88X-D3HP with on board sound card jack work only if selected frame rate as 192000
i hope this work for you!


How can I convert .msg files (Outlook email message) into .eml? I have just started using Ubuntu & Thunderbird.

I have saved my Outlook emails in my hard disk and they have an .msg extension. Now when I try to open them in Thunderbird it doesn't open them because Thunderbird used .eml extension.

Please advise how I can convert my old emails from Outlook into Thunderbird format.

Install the following modules:

sudo apt-get install libemail-outlook-message-perl libemail-localdelivery-perl

When installed, download the .pl file named msgconvert.pl, then run:

./msgconvert.pl --mbox [desiredFilename].eml [currentFileName].msg

Now you can open your .eml file in thunderbird.

Reference:

Kosala's - Blog: Convert Outlook .msg to Thunderbird .eml
libemail-outlook-message-perl
libemail-localdelivery-perl
Virustotal report for msgconvert.pl

Just save the mail in .txt format and change the extension to .eml

Saw it here and it works: Super User - How to save a mail into an .eml-file with Outlook?

The most funny is that there are proprietary converter for that!


Why is my network interface named enp0s25 instead of eth0? A lot of my scripts stopped working after installing Ubuntu 15.10 and I have trouble remembering this new name as I was used to ethx and wlanx for years. Is there a reason for this change? Do I have to get used to this or can I just rename it and go back to good old eth0?

$ ifconfig

enp0s25   Link encap:Ethernet  HWaddr 77:5a:5e:a6:86:d5
      inet addr:192.168.31.239  Bcast:192.168.31.255  Mask:255.255.255.0
      inet6 addr: fe80::725a:b6ff:fea6:86d7/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:4833 errors:1332 dropped:0 overruns:0 frame:666
      TX packets:5589 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000
      RX bytes:3266446 (3.2 MB)  TX bytes:1046654 (1.0 MB)
      Interrupt:20 Memory:d3500000-d3520000

This is known as Predictable Network Interface naming and is part of systemd, to which Ubuntu has been transitioning as of version 15.04.

Basic idea is that unlike previous *nix naming scheme where probing for hardware occurs in no particular order and may change between reboots, here interface name depends on physical location of hardware and can be predicted/guessed by looking at lspci or lshw output. Conversely we can guess information about it's physical position in the pci system. In your case that would be pci bus 0, slot 2. According to the freedesktop.org article, there actually are 3 ways how interface name is assigned: based on BIOS/Firmware for onboard cards, based on PCI information, and based on MAC address of the interface. Refer here for other examples.

According to the freedesktop.org page one of the reasons for switching to predictable naming is that classic  naming convention can lead to software security risks in multi-interface systems when devices are added and removed at boot. Also, according to the comment by Sam Hanes, "On a big server with many Ethernet ports it's invaluable: you can immediately tell which interface goes to which port and adding or removing hardware doesn't change the names of other ports."

See How to rename network interface in 15.10 in case you decide to revert back to the other version of naming.

FWIW the freedesktop.org PredictableNetworkInterfaceNames file references a source file's comments as canonical but that file has been altered to remove the comments - see https://github.com/systemd/systemd/pull/12518.


A fresh install and clean up? I started with Ubuntu around 3 years ago and have been a dedicated user ever since. During that time I tried out lots of apps, themes, etc. And, I've updated every version as it has come along so now I'm running Lucid.

Basically, my system has gotten sort of "messy" and I'm planning a vigorous clean up and a fresh install. My /home is on a separate partition from everything else, so I can preserve that. I want to find and remove unused, unneeded apps (which I pretty much understand how to do). Also, I want to get back to the default desktop theme and build back up from there. And other messes surely exist.

So, my question is, What is a good, logical plan to clean up and freshly reinstall my system?
(One note is that I have found many links in searches on this issue. There are many links on this topic and many are out of date. So, it's gotten rather confusing to say the least.)

Thanks.

There are 4 things you generally want to preserve when you do a re-install.

Your home directory - as mentioned, you have home on a separate partition.
Any customisations you've made in /etc. If you've made any, you probably did them by hand and therefore have some idea of what they are.
Your list of installed programs. Executing dpkg --get-selections | grep install > installed.txt will create a list of packages that are currently installed. In your case this doesn't sound like something you want to preserve, so you could skip this step.
Your /var directory. Some programs store important data here, so it's worth backing up. Things I've seen stored in /var include mail directories, databases, game save files, and web configuration files. Having a backup means you can selectively restore anything that turns out to be needed.

So, a plan would probably look something like this:

Back up any customisations in /etc.
Back up your /var directory.
Either run dpkg --get-selections | grep install > installed.txt or run an eye over the Applications menu for the names of any applications you use regularly.
Re-install your system.
Install any missing applications. If you want to use the generated list, you can do:

sudo dpkg --set-selection < installed.txt
sudo apt-get install --yes dselect

Re-apply your customisations in /etc (if still needed).
Upgrade your home partition to ext4 (optional, see the Ubuntu wiki for details).
Restore anything that turns out to be needed from /var.

I would recommend against wiping out the configuration files in your home directory; you'll lose things like your browser bookmarks and security keys, for example. A better strategy for getting back to default settings would be to create a new user account and compare their settings to the ones your normal account is using.

$ sudo tasksel remove desktop && sudo tasksel install desktop

That will remove all packages in the desktop set and then re-install them.  This will have the side-effect of removing all packages that depend on them, providing you with the purge you mentioned wanting.  You can see the package list using:

$ tasksel --task-packages desktop | less


Ubuntu fails to Shutdown When I go to shutdown or use poweroff code in the terminal, it does not complete the shutdown. I use force shutdown by long pressing the power button. How can I overcome this? Help me thanks.

Nixon.

Open your terminal with CTRL+ALT+T and do these following commands

To shutdown the system:

sudo shutdown -h now

To restart:

sudo reboot

& one more command for restart:

sudo shutdown -r now

Another way as one of the user mentioned.

For shutdown:

sudo halt

or:

sudo init 0

For restart:

sudo init 6

You can get more info on the shutdown command by using one of the following:

shutdown --help
man shutdown

Please share the results.


More modern or more conventional version of Emacs Is there a more modern or more conventional version of Emacs?

I'm thinking something like Aquamacs from Mac OS X. I'd like the standard conventional keyboard shortcuts found in common programs to work to work and more organized menus with modern naming conventions.

Really I'm just looking for an Aquamacs like Emacs for Ubuntu.

Thanks

As far as I can see it is more or less the initiative behind the ErgoEmacs. Though it is not recommended to start using Emacs with it.

Personally I'd recommend customize Emacs to fit Your needs step-by-step. No one really knows what You want Emacs to be. But Emacs allows almost any kind of configuration. You can cast each of Your requirenments to a separate stackexchange question -- Ask Ubuntu, StackOverflow or SuperUser -- depending on the feature.

Aquamacs is an Emacs clone for OS X, the about page makes it very clear:

  Aquamacs is an Aqua-native build of the powerful Emacs text editor. By
  "Aqua-native," we mean more than just the fact that this version of
  Emacs runs as a standard OS X application.  Aquamacs features
  extensive customization: it will feel and behave mostly like an Aqua
  program - while still being a real GNU Emacs with all the ergonomy and
  extensibility you've come to expect from this world-class editor.

  [...] Aquamacs is a modern editor based on GNU Emacs that makes the
  Mac user feel at home. For instance, in addition to traditional Emacs
  shortcuts like C-x C-f (open a new file), Aquamacs understands
  Command-O.

Meaning that the extra functionality provided by the Aquamacs build is specifically directed at OS X and will not function (or even make sense) on other systems.

Instead of an alternative you should simply go for the real thing - available from the Software Centre.


Booting Ubuntu into the Command Line? Possible Duplicate:
  How to disable X at boot time?

How do I boot Ubuntu by default into the CLI using a multiuser runlevel? I wish to still maintain my graphical desktop manager (GDM or whatever replaced it) since I do use that to switch between Unity and Awesome WM. I do however wish to boot by default into a CLI login shell. I could then startx to start my GUI if I need it. I am aware that Ctrl-Alt-(F1-6) will open a separate tty instance with a login shell but it seems wasteful to have a GUI running even if asleep if I am working purely from the command line.

Add text as a kernel boot parameter.

Explained in detail in this answer to a possible duplicate question "How to disable X at boot time?".

This Document Should help

Basically you edit /etc/init/rc-sysinit.conf and add/change

  env DEFAULT_RUNLEVEL=2


USB Headset not working propperly I am using a USB Headset on ubuntu 14.10. The problem is that when I go to sound settings and test sound, if I click on front left I don't hear anything. But when I click on front right I hear front right in both ears.

Here is the output of pacmd list-sinks
Output of pulseaudio --log-level=4 --log-target=stderr (the last
two lines are in red)
Screenshot of AlsaMixer, which also looks fine.

I also tried updating to a new kernel(v3.17.1-utopic), but it did not work.

Can anyone please help me fix this?

EDIT

It turns out that the problem was with the headset. I tried them on a windows pc an the problem was the same. I'm going to leave the question because it might help someone with another problem.

Ubuntu's built in sound manager doesn't support USB headsets. I would recommend PulseAudio (https://apps.ubuntu.com/cat/applications/pavucontrol/) over the default sound manager anyways just because of the ease of use.

Happy Travels!


no wi-fi connections visible laptop:  MSI CR61 Dual Core 4GB 500GB HD8210G
wi-fi card: Realtek RTL8723AE Wireless LAN 802.11n PCI-E NIC
system: ubuntu-14.04.3-desktop-amd64
experience with ubuntu: beginner

problem:
wi-fi connection is not visible

I don't have cable connection, so solution with apt-get are not available

where can I download driver files for that card? (using windows)

view1

view2

edit:
I need to somehow get drivers, download them on windows and then run them on Ubuntu (can't find url for drivers that is still active)
all links to drivers I found are inactive,
other solutions I found use cable connection and apt-get, which doesn't work for me

Try with this on the console.

sudo rfkill list

it should show you if your wifi card is soft or hard blocked.

0: samsung-wlan: Wireless LAN
    Soft blocked: no <---- THIS COULD BE YES
    Hard blocked: no <---- THIS COULD BE YES
1: samsung-bluetooth: Bluetooth
    Soft blocked: no
    Hard blocked: no
3: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
8: hci0: Bluetooth
    Soft blocked: no
    Hard blocked: no

It happens on my laptop whenever I close the screen and reopen it. For some reason the wlan does not come up automatically. I had to write a script to unblock my card.

To unblock just execute this command on the console

sudo rfkill unblock all

Hope it helps.


how to open multiple files with the default program from terminal? I tried to open all my .mp3 files from a folder using xdg-open  but I found out it opens just one! So I searched a little but there was not such a question! I found "evince" but apparently it open text files and gnome-open also opens one file.

I want to open all files of the same format in a folder from the terminal.
I'm new to Ubuntu so please explain a little more.

Indeed. You could use shell to get around this, like this:
ls *.mp3 | xargs -n 1 xdg-open

This is very simplistic though, and doesn't work for any special case (spaces, non-ascii characters). An improvement for this would be
ls -b *.mp3 | sed -e s+^+\"+ -e s+\$+\"+ | xargs -n 1 xdg-open

This is quite complex this way, though. A more robust, but simpler solution in this case would be to use find:
find -iname '*.mp3' -print0 | xargs -0 -n 1 xdg-open

You can use these commands

cd /path/to/source_folder

find . -type f -name *.mp3 -exec vlc {} \+

only if your music player supports multiple files as command line arguments. Replace vlc with your music player of choice.

This works with RhythmBox and VLC in my testing.


Question about dual-booting 13.04 and Windows 8/8.1 So, after learning that in order to boot into Ubuntu from a usb drive, I had to go into my bios and change the boot setting from UEFI to Legacy, I managed to install Ubuntu 13.04. Now, when I restart my laptop, it pops up the GRUB menu thing, and I can load Ubuntu no problem. But if I try to select Windows, I get an error saying windows can't be booted, and I need the recovery disc to repair this. but, since I don't have one, I thought it'd be a good idea to look around the boot settings again. Changing the boot settings from Legacy back to UEFI lets me boot into windows normally, but there is no option to get into Ubuntu unless I change it back to Legacy, which locks me out of Windows again. My question is, how can I make these options bot available to me without having to mash f2 to get into the bios every time I want to change my OS? Thank you in advance.

Although the symptoms are slightly different, the solution I offered to this question is likely to work for you.

try using these recovery disks

alternatively you can use EasyBCD (Easy Boot Configuration Data) and chain load grub.
This guide shows you how to use it.


Don't run this as Root! - Docker Image I'm running Ubuntu xenia in my docker container (this is a container running in my OS X VM Host).  When you run the docker run command that created my container, it logs you in as root.

So when I try to install Linuxbrew after all this and after installing curl and ruby in my container via app-gret, I get the error don't run this as root! when I try to then install Linuxbrew:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/linuxbrew/go/install)"

I want to be able to sill run this somehow.  If docker run logs me in as root, what are my options here to get around this limitation on root so I can still run this command?  If docker always logs me in as root to a container, what do people usually do in the situations where they want to install stuff like this as a non-root user on a container with Ubuntu?

Note: I'm new to both Ubuntu, Linux, and docker.  So that implies I may not be aware of all basics and there is a lot to know.

You can use the USER command to change the user commands are run as. Of course you need to create the user first, so your Dockerfile would contain something like this:

RUN useradd --system -s /sbin/nologin someuser

USER someuser

Since you can "log out" of root from command line, run the first command that logged you in as root, type exit, (logs you out) and then run the command that tells you to "Don't run this as root!".