Installing Broadcom Wireless Drivers I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.

What are the steps to install Broadcom wireless drivers for a BCM43xx card?

I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.

lspci -vnn | grep Network showed:

Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]

iwconfig showed:

lo        no wireless extensions.
eth0      no wireless extensions.

NOTE: Answer below is updated every time new information is added and confirmed working.

0. Introduction and Background
This answer is based on an extensive research done by various Ubuntu users that worked together in almost all issues related to Broadcom. Special thanks to chili555 who helped in the Ubuntu forums and on this site with many questions related to Wireless devices and to others who have contributed through E-Mail, chats, IRC and more in testing various drivers with several of the most popular Broadcom Wireless cards (Huge Thanks to Chili555 really. This guy knows his stuff).
In total we wanted to offer an answer that could be easy to follow and covered most Broadcom Cards / Drivers. After you follow this guide, you will NEED to test your wireless connection for at least 2 hours (I actually recommend 8 hours) with another device in either Ad-Hoc Mode, Infrastructure Mode or Both. Common problems that will be solved (Apart from drivers not installing) are:

Connections timeout after several minutes or hours
Stops searching for other devices (Does not see any other device)
Keeps asking for password even on cases where AP does not have any
Stops any receiving/transmitting traffic (Needs reboot to temporarily fix)
Crashes system with dmesg errors in log (Link 1 Below)
System freezes completely (You can only press Reboot/Power button) (Link 1 Below)
Creates huge log reports trying to correctly configure or connect
Fails when installed via Additional Drivers / Additional Hardware (Link 3 Below)
Connects and disconnects continuously every X amount of seconds
Appears connected on Network Manager but does not receive Internet
Tries to connect many times without correctly finishing connection
Takes too long to connect
After upgrading from a previous version (eg: 12.04 to 12.10) it stops working
Wireless card does not turn on, enable or disable (Link 2 Below)
Wireless card blocked by hardware
More problems found in Launchpad, Ubuntu Forum and Askubuntu

Link 1 -  https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1060268
Link 2 - https://bugs.launchpad.net/ubuntu/+source/bcmwl/+bug/732677
Link 3 - Gives an error similar to "Sorry, installation of this driver failed."
So with that in mind, the following is what we have right now which is simplified in just 3 steps:
1. Knowing what Broadcom Wireless Card you have
There are dozens of Broadcom wireless cards and more seem to appear every day. The key to finding the correct driver for any network card is what is known as the PCI ID (PCI.ID). To find out which PCI.ID you have, we proceed to opening the terminal by pressing CTRL+ALT+T (It should open a window with a blank background) and inside this terminal we run the following command:
lspci -nn -d 14e4:

You will get something like the following if you have a Broadcom Wireless Adapter (The ID 14e4 used in the example above in most cases is a Broadcom Wireless Card):
Broadcom Corporation BCM4306 802.11bgn Wireless Network Adapter [14e4:4320] (rev 03)

The PCI.ID in this example is 14e4:4320 as seen inside the Brackets [...]. In some cases you will also need the revision version (if it appears) for some special cases. In this case, the revision version is rev 03 as shown inside the Parentheses (...) at the end. So what you will need after this search is:
[14e4:4320] (rev 03)

With this new information you can look in the table below and select the appropriate method to install your driver. For example, In this case, since you have the 14e4:4320 rev 03, if we go down the list to the one that shows the exact same PCI.ID you will see that in the columns for Ubuntu 18.04 or 20.04 it shows the firmware-b43-installer package driver. This means that you will only have to install this particular package since it appears in all Ubuntu version columns.
NOTE - Before proceeding, if you have previously installed any drivers, have blacklisted or uncommented any driver files or configuration files or have done any changes whatsoever to the system to make the drivers work in previous attempts, you will need to undo them in order to follow this guide. We assume you are doing this from scratch and have not changed any configuration files, modules or drivers in the system in any way (apart from updating the system). This includes any installations using apt-get, aptitude, synaptic, dpkg, software center or manual compilation and installation of the packages. The system has to start from scratch in order for this to work and to avoid any conflicts that may appear if earlier work was done.
For example, if you have previously installed the bcmwl-kernel-source package, you will need to remove it by using the purge method:
sudo apt-get purge bcmwl-kernel-source

2. Preparing the System
If you have just installed Ubuntu, you will need to build an index of available packages before we can install your driver if you have not done so already:
sudo apt update

I would even go so further as to update the Ubuntu list of PCI.IDs:
sudo update-pciids

Just in case the ID of a particular new Broadcom Device you are using has just appeared.
Now using the PCI.ID you found in the steps above, we then search in the list below to find the matching PCI.ID and the method to install the driver associated with it in a simple and correct way. The terminal will be used to avoid any GUI related issues. This applies with all cases, except as noted. The installation procedure is done only via terminal and also while connected to the internet with a temporary wired ethernet connection or USB modem or any means possible that can give your PC, for the time, Internet access. After you find in the list below the correct package we then proceed with the installation.
3. Installing the Package (online)
Assuming you used the PCI.ID 14e4:4320 rev 03 as found in your search above, and then looked at the table below and found that the correct package to install is the firmware-b43-installer (Specific to Broadcom) and the linux-firmware (Carries over Broadcom related drivers along with other types of drivers), we then proceed to simply install this package in the terminal:
sudo apt install firmware-b43-installer

sudo apt install linux-firmware

and then reboot
sudo reboot

The format to install is pretty simple, it's just:
sudo apt install <PACKAGE_NAME>

In the example above, the PACKAGE_NAME is firmware-b43-installer.
BROADCOM WIRELESS TABLE (Updated Oct 29, 2020)
PCI.ID              18.04 LTS                        20.04+
------------------------------------------------------------------------------------
14e4:0576           Special Case #1                   UNKNOWN
14e4:165f           UNKNOWN                           UNKNOWN
14e4:1713           firmware-b43-installer            firmware-b43-installer / linux-firmware
14e4:4301           firmware-b43-installer            firmware-b43-installer / linux-firmware
14e4:4306           firmware-b43-installer            firmware-b43-installer / linux-firmware
14e4:4306 rev 02    firmware-b43-installer            firmware-b43-installer / linux-firmware
14e4:4306 rev 03    firmware-b43-installer            firmware-b43-installer / linux-firmware
14e4:4307           firmware-b43-installer            firmware-b43-installer / linux-firmware
14e4:4311           firmware-b43-installer            firmware-b43-installer / linux-firmware
14e4:4311 rev 01    firmware-b43-installer            firmware-b43-installer / linux-firmware
14e4:4312           firmware-b43-installer            firmware-b43-installer / linux-firmware
14e4:4313           firmware-b43-installer            firmware-b43-installer / linux-firmware
14e4:4315           firmware-b43-installer            firmware-b43-installer / linux-firmware
14e4:4315 rev 01    firmware-b43-installer            firmware-b43-installer / linux-firmware
14e4:4318           firmware-b43-installer            firmware-b43-installer / linux-firmware
14e4:4318 rev 02    firmware-b43-installer            firmware-b43-installer / linux-firmware
14e4:4319           firmware-b43-installer            firmware-b43-installer / linux-firmware
14e4:4320 rev 02    firmware-b43-installer            firmware-b43-installer / linux-firmware
14e4:4320 rev 03    firmware-b43-installer            firmware-b43-installer / linux-firmware
14e4:4321           firmware-b43-installer            firmware-b43-installer / linux-firmware
14e4:4324           firmware-b43-installer            firmware-b43-installer / linux-firmware
14e4:4325           firmware-b43-installer            firmware-b43-installer / linux-firmware
14e4:4328           firmware-b43-installer            firmware-b43-installer / linux-firmware
14e4:4328 rev 03    bcmwl-kernel-source               bcmwl-kernel-source
14e4:4329           bcmwl-kernel-source               bcmwl-kernel-source
14e4:432a           bcmwl-kernel-source               bcmwl-kernel-source
14e4:432b           bcmwl-kernel-source               bcmwl-kernel-source
14e4:432c           bcmwl-kernel-source               bcmwl-kernel-source
14e4:432d           bcmwl-kernel-source               bcmwl-kernel-source
14e4:4331           firmware-b43-installer            firmware-b43-installer / linux-firmware
14e4:4335           firmware-b43-installer            firmware-b43-installer / linux-firmware
14e4:4350           firmware-b43-installer            firmware-b43-installer / linux-firmware
14e4:4353           Special Case #1                   UNKNOWN
14e4:4353 rev 01    Special Case #1                   UNKNOWN
14e4:4357           Special Case #1                   UNKNOWN
14e4:4358           bcmwl-kernel-source               bcmwl-kernel-source
14e4:4359           firmware-b43-installer            firmware-b43-installer / linux-firmware
14e4:4360           firmware-b43-installer            firmware-b43-installer / linux-firmware
14e4:4365           firmware-b43-installer            firmware-b43-installer / linux-firmware
14e4:4365 rev 01    bcmwl-kernel-source               bcmwl-kernel-source
14e4:43a0           bcmwl-kernel-source               bcmwl-kernel-source
14e4:43a3           UNKNOWN                           firmware-b43-installer / linux-firmware
14e4:43ae rev 02    UNKNOWN                           UNKNOWN
14e4:43ba rev 01    UNKNOWN                           firmware-b43-installer / linux-firmware
14e4:43b1           bcmwl-kernel-source               bcmwl-kernel-source
14e4:43b1 rev 03    bcmwl-kernel-source               bcmwl-kernel-source
14e4:43c3 rev 04    UNKNOWN                           firmware-b43-installer / linux-firmware / Special Case #2
14e4:4727           bcmwl-kernel-source               bcmwl-kernel-source
14e4:4727 rev 01    Special Case #1                   Special Case #1
14e4:a962           firmware-b43-installer            firmware-b43-installer / linux-firmware
------------------------------------------------------------------------------------

For All cases, always install the linux-firmware package. This will always be up-to-date with the latest Broadcom drivers along with other binary files that could be needed depending on the driver PCIID.
Special Case #1 - Uses bcma and brcmsmac driver combination. Required firmware is installed by default in the package linux-firmware.
Special Case #2 - For the ASUS PCE-AC88 AC3100 the steps are:

Download This file and after extracting it, put it in /lib/firmware/brcm
sudo cp brcmfmac4366c-pcie.bin /lib/firmware/brcm/brcmfmac4366c-pcie.bin
Then sudo nano /etc/rc.local add modprobe brcmfmac and save
sudo reboot

In hardware like the Lenovo S10-2, if your wireless card gets stuck trying to connect to an SSID (keeps trying to connect), then the alternative to get it working would be to install the bcmwl-kernel-source package (Remove any other installed packages related to it). Read the Debugging section below for more information regarding this wireless device.
IMPORTANT NOTE - After September 2014, if you follow this answer and still you have problems installing the correct driver, please try the firmware-b43-installer package and the linux-firmware package and notify us via comments. There were some changes and some drivers will only work with this package. Remember to have a clean system before installing it:
sudo apt install firmware-b43-installer

sudo apt install linux-firmware

In some particular cases, after installing the firmware-b43-installer you need to remove the b43 module, enable it again and even proceed to unblock with rfkill:
 sudo modprobe -r b43
 sudo modprobe b43
 sudo rfkill unblock all

If you have a Broadcom card that has a different pci.id, please ask a new question. Once solved, the solution will be added to this howto.
4. Installing the Package (offline)
4.1 Installing firmware-b43-installer
To install firmware-b43-installer offline see this answer.
4.2 Installing bcmwl-kernel-source
For cases where you need to install bcmwl-kernel-source but you are offline, here is an excellent answer about it.
But basically follow this steps:

Search for the package in the Ubuntu Package Repositories
Make sure you select the correct architecture (32-Bit, 64-Bit, etc..)
Download package and dependency packages related to it on the same folder.
When you have all packages needed (and their dependencies), proceed on going to the folder that has all packages and run sudo dpkg -i *.deb. This will install all packages in that folder. If it gives any errors, read the error and follow the steps it mentions.

To give an example, after going to point 1 mentioned above, If you had the
Broadcom 14e4:43a0, you would search for the bcmwl-kernel-source package and after selecting the corresponding Ubuntu version (In my case 16.04 or Xenial) I would land on the following page:
http://packages.ubuntu.com/xenial/bcmwl-kernel-source
On this page I would select the corresponding architecture (32 or 64) but would also need to download the 3 package dependencies mentioned on that page as seen in the following image:

After downloading all packages and dependencies, you can proceed on copying all packages to a single folder and running the dpkg command as mentioned on step 4 above.
NOTE
In some computers, before performing the commands, you will need to deactivate the Secure Boot Options in your BIOS. This applies for cases, for example, where the bcmwl-kernel-source is already installed but the driver does not yet work. You can do a reinstall like so, or disable Secure Boot by going to your BIOS Setup:
sudo apt-get install --reinstall bcmwl-kernel-source

DEBUGGING
The following information is additional material to read about solving various issues related to Wireless Management and conflicts with other Network devices. Know that it some cases you need to have an updated Kernel version, since each new version of the Kernel introduces either new Network drivers, improvements over existing drivers or solves bugs regarding them.
Before reading the points mentioned below, be sure to have all repositories enabled on your Ubuntu system. To check, run on the terminal software-properties-gtk and make sure all options on the Ubuntu Software Tab are enabled.

Make sure the Wireless card is not hardware disabled. For example on some laptops you need to press Fn + F2

To configure your wireless devices through the terminal I recommend How to connect and disconnect to a network manually in terminal?

If your connection drops every so often some users have suggested to set IPv6 to Ignore. Just go to Network Manager (The network icon on the top panel). Click on it then select Edit Settings. Then go to the Wireless connection you are using, select it. Now go to the last Tab in there that mentions IPv6 Settings. In the Method field select Ignore.

If your laptop does not detect your wireless card some users have mentioned that using rfkill unblock all will solve the problem. Others simply turned the WiFi switch on their laptops off and then on again (Physical switch available on this laptops). For more information about rfkill please read rf kill unblock all DOES NOT WORK!

If you are getting b43-phy0 ERROR: Fatal DMA error /  b43-phy0 warning: Forced PIO do the following:
  sudo rmmod b43
  sudo modprobe b43 pio=0 qos=0

If it works then add it to you RC files so it is executed every time you boot. You can change PIO to 1 if you need to it.

If you are having a Required key not available when installing a DKMS module (Like Nvidia, Broadcom or others) you can go to Pilot's Answer Here

If your wireless card see/not see the router and gets stuck in an endless "Trying to connect (Try 1/3)" loop the solution might be proper configuration of your router or wireless SSID device.

For all Wireless cards in general, it is very important to also take into consideration the network devices you are using (Routers, Switches, Wireless Channels and Wireless Bands, etc..). With this information you will be able to evaluate better what the source of the problem could be when you arrive at a dead end. An example would be the Lenovo S10-2 which uses the 14e4:4315 rev 01 PCIID. Even after installing the correct driver the user would end up in a "trying to connect" loop. It would see the wireless SSID but when trying to connect to it, it would enter an reconnecting loop.
The solution was that this particular wireless device did not support 40 Mhz channels nor does it support 802.11N. The router in that case was actually broadcasting with a forced 40 Mhz and on WiFi-N only. When the router was set to Auto mode and 20/40 Mhz Channel, the wireless card worked correctly. This is a case scenario that also repeats in other cases, so a proper evaluation of the network equipment would help a lot.
For cases where you get repeated:
ERROR @wl_cfg80211_get_station : Wrong Mac address...
when doing a dmesg and your wireless connection drops often (Several times an hour or a day), the issue here might be that you are inside a wireless signal that is used as a Wireless Bridge (2 Routers sharing the same SSID and connection). This can happen with modern Routers that have the ability to extend the wireless connection by offering the same SSID. your wireless connection might drop because you might be between both routers and the signal strength between both is almost the same.
If your connection drops very often, it means you are almost in the middle of both router devices. To lower or eliminate the dropping rate of your wireless device, try to position yourself where your wireless card can see only one router or at least one of the routers has a higher signal strength than the other one.
There are also some techniques to force the wireless device to only connect to a specific router by setting the BSSID to the MAC Address of the router you wish to connect to. This will force your wireless device to ONLY connect to it.

Secure Boot Issues
On some specific scenarios, installing the drivers, be it in offline mode through various DEB packages or through apt-get with internet access, will not work if Secure Boot is not disabled.
This is because the access needed is denied by Secure Boot so the drivers will look like they are installed correctly when in fact the did not. So for VERY specific cases, you will need to temporarily disable Secure Boot in order for the drivers to work.
Linux Firmware Update
On other cases looking for and installing the latest Linux Firmware would solve the issue. Either solving minor problems that were happening with a working card or making the card work for the first time.

I found the light wouldn't come on when I switched it to the op position. A utility you can try is rfkill to get it to come on. You have to do this every time you reboot.

sudo rfkill unblock all


No sounds from headphone jack Ubuntu 16.04.1 I am running Kubuntu 16.04.1 on a machine with a Realtek ALC898 audio card.

My system can now normally detect the card and play sounds via the speaker however the headphone is not working. I have gone through No sound output from headphone jack Ubuntu12.04 and tried the solutions introduced but no luck.

Here are some debug info...

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC898 Analog [ALC898 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC898 Digital [ALC898 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0

$ lspci | grep audio -i
00:1f.3 Audio device: Intel Corporation Sunrise Point-H HD Audio (rev 31)
01:00.1 Audio device: NVIDIA Corporation GM204 High Definition Audio Controller (rev a1)

$ lsmod | grep snd
snd_hda_codec_hdmi     53248  1
snd_hda_codec_realtek    86016  1
snd_hda_codec_generic    77824  1 snd_hda_codec_realtek
snd_hda_intel          36864  4
snd_hda_codec         135168  4 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_intel
snd_hda_core           73728  5 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_codec,snd_hda_intel
snd_hwdep              16384  1 snd_hda_codec
snd_pcm               106496  4 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel,snd_hda_core
snd_seq_midi           16384  0
snd_seq_midi_event     16384  1 snd_seq_midi
snd_rawmidi            32768  1 snd_seq_midi
snd_seq                69632  2 snd_seq_midi_event,snd_seq_midi
snd_seq_device         16384  3 snd_seq,snd_rawmidi,snd_seq_midi
snd_timer              32768  2 snd_pcm,snd_seq
snd                    81920  19 snd_hda_codec_realtek,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_seq,snd_rawmidi,snd_hda_codec_generic,snd_hda_codec,snd_hda_intel,snd_seq_device
soundcore              16384  1 snd

I have also tried alsamixer to ensure that the headphone is not muted, and installed pavucontrol to check the configurations. I can even see the current volume bar pulsing while playing audio.

I'm using an MSI GT72S laptop and I have this issue when the Nvidia VGA card is enabled.

Any help would be appreciated, thanks.

Well,this counld be an harware problem.Does your laptop detects headphone?

Try this :-

Open the terminal and enter the following commands:

cd /usr/share/pulseaudio/alsa-mixer/paths/
sudo cp analog-output-headphones.conf analog-output-headphones.bak
sudo nano analog-output-headphones.conf

Look for the section called [Element Speaker] and change it so that it looks like this:

[Element Speaker]
switch = on
volume = ignore

Save the changes and exit nano.

Create a backup of the corrected analog-output-headphones.conf:

sudo cp analog-output-headphones.conf analog-output-headphones.fixed

Now you can restore the fix if a future installation or update overwrites it.

Reboot.

After rebooting, you may need to remove and reinsert the headphone plug to get it to work. After it's working, though, you will be able to remove and insert the plug, and behavior will be as expected.


How to set up good video support on radeon 3850 So, I've got radeon 3850 agp card. It seems that all videos and graphics are handled by CPU, according to cpu usage. All effects are enabled and working(like compiz), but videos and 3d are extremely slow and low-fps, though I use proprietary ati drivers. What do I need to do to get normal fps? Ready to answer additional questions.

So, I think 10.7 finally installed, but nothing new happend. Hi-res video still 0.3 fps.(video is 1280x720, screen is 1920x1080).

Decided to show my xorg.conf:

Section "ServerLayout"
    Identifier     "aticonfig Layout"
    Screen      0  "aticonfig-Screen[0]-0" 0 0
EndSection

Section "Module"
EndSection

Section "Monitor"
    Identifier   "aticonfig-Monitor[0]-0"
    Option      "VendorName" "ATI Proprietary Driver"
    Option      "ModelName" "Generic Autodetecting Monitor"
    Option      "DPMS" "true"
EndSection

Section "Device"
    Identifier  "aticonfig-Device[0]-0"
    Driver      "fglrx"
    BusID       "PCI:1:0:0"
EndSection

Section "Screen"
    Identifier "aticonfig-Screen[0]-0"
    Device     "aticonfig-Device[0]-0"
    Monitor    "aticonfig-Monitor[0]-0"
    DefaultDepth     24
    SubSection "Display"
        Viewport   0 0
        Depth     24
    EndSubSection

    EndSection

Thanks everyone, I also wanted to ask: everybody tell me, that this parameter:

creitve@localhost:~$ glxinfo|grep render
direct rendering: No (LIBGL_ALWAYS_INDIRECT set)
OpenGL renderer string: ATI Radeon HD 3850

must be "yes", but I didn't manage to enable it. What do I need to get it running? Im sure, it's 100% related to my problem, right?

90% of the time this type of problem is resolved by doing a purge and reinstall of the driver stack, because either the mesa GLX driver or the kernel driver is messed up.  https://wiki.ubuntu.com/X/Troubleshooting/FglrxInteferesWithRadeonDriver

As far as open source drivers, xserver-xorg-video-ati in Lucid supports 2D but not 3D acceleration for this hardware, so depending on your definition of 'good' it likely isn't going to suffice for you.

3D support is coming in Maverick, although there's still a lot that's incomplete.  See http://www.x.org/wiki/RadeonFeature for a detailed breakdown of the 3D support with this driver.  (Your card fits under the R600 column.)

Note that with the open driver and AGP hardware, sometimes you have to tweak AGPMode either in BIOS or (for -ati) in the xorg.conf.  (See 'man xorg.conf' or 'man radeon').

Have you tried the open source drivers? I have a slightly newer card (I think) and the proprietary drivers were slow, buggy, and leaked memory. The open drivers work perfectly. Have a look for the xserver-xorg-video-radeonhd packages.


How to setup ds4drv as DAEMON on Ubuntu? I have a Dualshock 4 controller, Kubuntu 15.10, and ds4drv installed. Everything is working fine, but I would like that ds4drv works as a daemon.

How can be done?

Follow the instructions from this answer ==> https://askubuntu.com/a/188148/483417

Use this file ==> https://gist.github.com/mariosotil/ed4293660c600fbe24b0

Found this trying to get mine running completely

https://github.com/chrippa/ds4drv
https://github.com/chrippa/ds4drv/blob/master/ds4drv.conf!


Dual boot Windows 8 on already installed Ubuntu I had three drives on my computer:
C:
D:
E:

I installed Ubuntu 12.04 on the E: partition and now I'm using Grub boot manager to boot into Windows 7 and Ubuntu

I'm planning to install Windows 8 by removing Windows 7 on C:, but I don't want my old Ubuntu Installation to suffer.

Is there are way that after Windows 8 removes Grub from C: that I'm able to boot to Ubuntu again.

explain to me!
you want dual booting with
windows 8 mbr or grub mbr!
if it's windows mbr try this :

http://www.iceflatline.com/2009/09/how-to-dual-boot-windows-7-and-linux-using-bcdedit/

I try it by myself!
it's realy work good!

The last time lost Grub I used an Ubuntu live CD to reinstall grub ... worded pretty well. Just make sure you have a working Ubuntu live CD ready before you start to install Windows. I followed more or less the instructions here How to repair,retore or reinstall grub ...

It boils down to boot from live CD, mount ubuntu partition from HD, chroot and reinstall grub.


Newbie needs installation help I have installed Ubuntu onto an old Dell laptop from a USB stick and chose the dual option of using Windows Xp or Ubuntu during the installation options.

I then allocated about 50:50 partition drive space using the slider. So far so good. I then chose to install updates during the installation and pressed install.

Everything seemed to be installing ok Until it seemed to get stuck - I left it for about 10 hours reading somewhere else that it can take time to install. After this time I decided to shut down the computer and see if I could install again only this time the dual boot option was missing. I removed the USB stick and rebooted but now all I get is a black screen with a flashing prompt.

Have I lost my Windows Xp?

Is there something I can do to get things back to normal?  Thanks in advance for any help.

You needed to allocate unassigned space within Windows XP beforehand, I do not believe doing so in the Ubuntu installer will work when the goal is to dual boot.

I hope you lost windows XP , when you were trying to dual boot , from windows you need to allocate some space for ubuntu and then install ubuntu on that freespace ,  as you changed the partition to 50:50 using slider , you are disturbing the windows partitions thereby you lose your windows and it does not functions as it did previously , when trying to dual boot necessary steps have to be followed carefully .

Try this :
Installing Ubuntu Alongside a Pre-Installed Windows with UEFI


Firefox stuck opening rar files as videos When I try to open downloaded rar files, firefox attempts to handle it like a video by default. Choosing "other" option and heading to /usr/bin/file-roller isn't a permanent solution.

Try right clicking on the file in the File browser (Files or Nautilus), selecting 'Properties', then choose the 'Open with' Tab, find the program you want to to open the file with by default (I would guess you want to use 'Archive Manager', and then clicking on 'Set as default'. This should tell firefox (and any other application) which program to open the file with by default.

Suggest choosing Save File, and only try to open after the download completes. Much more reliable, and the only way to handle multi-part RAR achives.


How to convert mkv to dvd or avi I have some mkv files, and while Totem plays them perfectly, when i use Devede to burn them to dvd it all gets messed up: the video is ok, but the audio is out of sync.

I did see that Devede does write my dixv avi files correctly to disk.

So i am thinking what the best way could be to convert my mkv for playback on dvd?

I was thinking maybe converting them to avi first? But i did not find a good way for that to happen.

What do you suggest?

Handbrake is the best video converter tool I know.
From the details page:

Supported Sources:
Any DVD-like source: VIDEO_TS folder, DVD image or real DVD (unencrypted--protection >methods including CSS are not supported internally and must be handled externally with >third-party software and libraries), and some .VOB and .TS files
Most any multimedia file it can get libavformat to read and libavcodec to decode.
Outputs:
File format: MP4 and MKV
Video: MPEG-4, H.264, or Theora
Audio: AAC, CoreAudio AAC (OS X Only), MP3, or Vorbis. AC-3 pass-through, DTS pass-thorugh >(MKV only)

You can install it via Software Center or sudo apt-get install handbrake-gtk if you use their PPA:
deb http://ppa.launchpad.net/stebbins/handbrake-snapshots/ubuntu UBUNTU_VERSION main
deb-src http://ppa.launchpad.net/stebbins/handbrake-snapshots/ubuntu UBUNTU_VERSION main

Personally recommend three solutions to convert MKV to AVI.

HandBrake: it's free and has the feature of converting MKV to AVI.

Cons:

HandBrake is too professional to handle for most people;
It doesn't support MOV as output format.

a video tool which can convert MKV to AVI. It's not expensive and runs well on Mavericks and Windows 8. Most of all, the converted video will keep the same quality with the original video.


Upgradable packages seem to appear from nowhere on Ubuntu 14.04 server? My Ubuntu 14.04 server has the default settings for fetching updates i.e. /etc/apt/apt.conf.d/10periodic has following entries:

APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "0";
APT::Periodic::AutocleanInterval "0";

My understanding is that APT::Periodic::Update-Package-Lists "1"; means APT will run apt-get update once a day.

When I log into the terminal, it prints out messages about updates, so this seem to confirm the fact that APT is updating the local package cache automatically.

3 packages can be updated. 3 updates are security updates.

Last login:

So I run apt-get dist-upgrade to upgrade to newest available packages, but then once the update is performed, if I happen to log out and then log back into the server, I get a message saying:

Now there are 30 packages to be updated - 25 security.

So then typically I run sudo apt-get update just to be sure I actually have the most up to date package cache and then run apt-get dist-upgrade again. But even after that, I get a similar prompt when I log out and log back in i.e. There are more packages to be installed.

So the typical process involved running sudo apt-get update, apt-get dist-upgrade 3, 4, or 5 times until the prompts saying There are more packages to be installed goes away.

Does anyone know why this keeps happening?

dist-upgrade is not the option you want to resolve that issue.

Use apt-get update and then apt-get upgrade.

dist-upgrade is meant to upgrade to a higher version of Linux. The two commands look similar but all you need is apt-get upgrade.


Installing TinyOS on recent version of Ubuntu I am following this tutorial to install TinyOS but when I run sudo apt-get install tinyos it says unable to locate package. I have tried all distributions.

From the TinyOS tutorial at your link:

  Supported distributions are (hardy, intrepid, jaunty, karmic)

All of these Ubuntu releases are end of life and are no longer supported by updates. You are using Ubuntu 14.04 which is not supported by the TinyOS package repository that is shown in the tutorial at your link.

Instead I followed the instructions from Automatic installation - TinyOS Wiki to install TinyOS in Ubuntu 14.04 (it also works in Ubuntu 16.04).

Install TinyOS in Ubuntu 14.04 and 16.04

Visit TinyOS (TinyProd) Debian Development Repository and follow these instructions:

Tell apt about the TinyProd Signing Key.

wget -O - http://tinyprod.net/repos/debian/tinyprod.key | sudo apt-key add -

Add the two new lines to /etc/apt/sources.list.d/tinyprod-debian.list:

sudo -s
cd /etc/apt/sources.list.d
echo "deb http://tinyprod.net/repos/debian wheezy main" >> tinyprod-debian.list
echo "deb http://tinyprod.net/repos/debian msp430-46 main" >> tinyprod-debian.list

Install the new packages:

sudo apt-get update
sudo apt-get install nesc tinyos-tools

I didn't install either msp430-46 or avr-tinyos at this step, in case you want to install them later after you have tested your TinyOS installation.

Get the code from the TinyOS release repository:

wget http://github.com/tinyos/tinyos-release/archive/tinyos-2_1_2.tar.gz
tar xf tinyos-2_1_2.tar.gz

This will extract the actual TinyOS code in a folder named tinyos-release-tinyos-2_1_2 inside the directory the command was issued. Feel free to rename this folder to tinyos-main.
You will need to add some environment variables to your shell. The following file includes the necessary ones. Substitute the placeholder  with the path where you chose to place the code in the previous section (full path recommended).

# Here we setup the environment
# variables needed by the tinyos
# make system

export TOSROOT="<local-tinyos-path>"
export TOSDIR="$TOSROOT/tos"
export CLASSPATH=$CLASSPATH:$TOSROOT/support/sdk/java
export MAKERULES="$TOSROOT/support/make/Makerules"
export PYTHONPATH=$PYTHONPATH:$TOSROOT/support/sdk/python

echo "setting up TinyOS on source path $TOSROOT"

Suppose you named this file tinyos.env. There are now at least two possibilities to have these variables accessible in your shell:

Place it as root user in /etc/profile.d/
Place it in <local-tinyos-path> and add the following line to your .bashrc

source <local-tinyos-path>/tinyos.env

After the TinyOS installation is finished, you can check if it is successful by executing some of these commands:

tos-bsl                 tos-ident-flags         tos-serial-debug
tos-build-deluge-image  tos-install-jni         tos-set-symbols
tos-channelgen          tos-locate-jre          tos-storage-at45db
tos-check-env           tos-mote-key            tos-storage-pxa27xp30
tos-decode-flid         tos-mviz                tos-storage-stm25p
tos-deluge              tos-ramsize             tos-write-buildinfo
tos-dump.py             tos-serial-configure    tos-write-image

That will happen if the package
name is typed incorrectly , you can
double check package name in the
software center or install from there .
The terminal is case sensitive for
some operations , use lower case for
installing packages. sudo apt- get
install name.
It may depend which repository
those packages are in and whether
those repositories are enabled. I am
no expert on apt - get, but if you list
which packages you are looking for ,
someone may be able to help.


Ubuntu on a (mid) 2007 Mac Mini? I have a 2007 Mac Mini that has reached the end of its useful life. It won't run anything newer than OSX 10.7.5. The built in CD drive is questionable (last time used it scratched the disk up pretty bad).

I've tried, and utterly failed, to get it to boot from a USB with Ubuntu on (tried installing a bootloader), can't seem to find any guides for this specific Mac either.

Any hope or into the trash?

https://support.apple.com/kb/SP7?locale=en_US[1] (1.83GHz Intel Core 2 Duo, 3GB Ram)

I have the same year/model running Ubuntu 15.04 successfully. However, my DVD drive is still functional so I was able to use that for the installation.

A bit of Googling yielded:

http://www.makeuseof.com/tag/how-to-boot-a-linux-live-usb-stick-on-your-mac/

which should help get you started with USB based installation.

Also, I used reFind which seems a newer fork of reFit.

http://www.rodsbooks.com/refind/

Ubuntu breathed new life into this box, and I was able to turn into a fairly secure home NAS + HTPC. Good luck.

I also Have a 2007 mac mini that I opened to upgrade to 4GB ram and an SSD then tried to install 64bit Ubuntu with no Luck. I read the answers here and other places but could not get it to work. no problem for 32bit, unfortunally chrome says it wont be supported anymore for updates. I wanted 64 bit OS.
I tried my way and it worked! hope this helps anyone else that is trying to do this and feels confortable opening up the macmini and has access to another computer.
I used a PC HP Athlon II X4 and placed the SSD (sandisk 64GB SSD)in it and USB with Ubuntu 14.04.4 LTS 64bit install. ran the install from USB onto the hard drive on the PC then when it said to reboot to complete I shut down the PC took the ssd out and put it into the mac mini and booted up. it took a minute or two but I was in Ubuntu did all the updates and rebooted no problems it works and its perfect for my Daughter to play. she uses it for going to turtlediary and starfall. I do notice it does run a bit warm and lags a bit on the animations but it WORKS!!
oh I did also do the codes for turning off sound at boot up and boot bless.. I was pointed to at http://www.geek-tips.com/2013/03/09/install-linux-mint-on-a-mac-mini-2-1/
hope this also helps some one else out there.


Upgrading xubuntu broke brazilian keyboard I upgraded by xubuntu notebook to 11.10 and accents in my brazilian keyboard
no longer work. They work neither in the basic Brazilian keyboard layout
nor does the compose key work in the nodeadkeys layout.

Xfce Goodies Project has a plugin that allows you to setup and use multiple keyboard layouts:

panel-plugins: xfce4-xkb-plugin

  It enables a convenient way of changing keyboard layouts and showing currently active layout on the xfce4-panel. It also makes install for keyboard layouts available and setting default keyboard change shortcut in a easy way.

Install and use it to change you keyboard layout to Brazilian.

Note:

There's a known bug where users report that the plugin resets all the settings (languages used and a switch layouts hotkey) every time the system gets rebooted.

If it happens to you, there's already a work around at this askubuntu answer.


how to install openjdk When I try

sudo apt-get install openjdk-7-jdk

I got a message telling me that the package could not be found in database. I guess I'm missing repositories.

here's the content of sources.list file :

deb http://fr.archive.ubuntu.com/ubuntu/ saucy restricted universe multiverse
deb http://fr.archive.ubuntu.com/ubuntu/ saucy-updates restricted universe multiverse
deb http://fr.archive.ubuntu.com/ubuntu/ saucy-security restricted universe multiverse
deb http://archive.canonical.com/ubuntu saucy partner
deb http://extras.ubuntu.com/ubuntu saucy main
deb http://fr.archive.ubuntu.com/ubuntu/ saucy-proposed restricted universe multiverse
deb http://fr.archive.ubuntu.com/ubuntu/ saucy-backports restricted universe multiverse

Which is the repository to install openjdk 7. Thanks

When I do

sudo apt-get install -f
apt-cache policy openjdk-7-jdk

I got this :

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded

openjdk-7-jdk:
  Installé : (aucun)
  Candidat : 7u51-2.4.4-0ubuntu0.13.10.1
  Table de version :
     7u51-2.4.4-0ubuntu0.13.10.1 0
         500 http://archive.ubuntu.com/ubuntu/ saucy-updates/main amd64 Packages
         500 http://archive.ubuntu.com/ubuntu/ saucy-security/main amd64 Packages
     7u25-2.3.12-4ubuntu3 0
        500 http://archive.ubuntu.com/ubuntu/ saucy/main amd64 Packages

As JohnnyD said, add ppa:openjdk/ppa repository and then update it.After that, you can be able to install openjdk-7-jdk directly from that repository,

sudo add-apt-repository ppa:openjdk/ppa
sudo apt-get update
sudo apt-get install openjdk-7-jdk

Edit :

sudo apt-get install aptitude && sudo aptitude install openjdk-7-jdk

and not choose to keep the current version of the conflicting packages.

In Ubuntu Default Repository Every packages are too old than what we need, better we can download it from official sites and install it, me too faced several issue for installing openjdk for setting up video management server's while that time i got some points from Google after a long search i got this good solution and i have documented, you can go to oracle java

Download the 32bit or 64bit Linux "compressed binary file" - it has a ".tar.gz" file extension and uncompress it

Download JRE from Here

Download Java from here

Check the java version

# java -version

Create a Directory JVM if not available in the location

# sudo mkdir -p /usr/lib/jvm

Move the download Java to the location

# sudo mv jdk-7u51-linux-x64.tar.gz /usr/lib/jvm

Navigate to the location

# cd /usr/lib/jvm

Extract the Java om the location

# sudo tar zxvf jdk-7u51-linux-x64.tar.gz

Delete the tar file if we need are keep it for backup

# sudo rm jdk-7u51-linux-x64.tar.gz

# ls -l

# jdk1.7.0_51

Set path for java

# sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0_51/bin/javac" 3

# sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0_51/bin/java" 3

# sudo update-alternatives --set "javac" "/usr/lib/jvm/jdk1.7.0_51/bin/javac"

# sudo update-alternatives --set "java" "/usr/lib/jvm/jdk1.7.0_51/bin/java"

Edit the profile file and Enter the java location

# sudo vi /etc/profile

Add the following entries to the bottom of your /etc/profile file:

# JAVA_HOME=/usr/lib/jvm/jdk1.7.0_51 PATH=$PATH:$JAVA_HOME/bin export JAVA_HOME export PATH

Run the Command to update the java to run

# . /etc/profile

Check the Version of java version using command

# java -version

Please Visit here for the same information what i have posted.


How to convert ext2 to ext4? I installed Ubuntu 12.10, and I don't know why, I have an ext2 partition.

How can I convert this ext2 file system to an ext4?
Will I lose all my data?

Follow the instructions detailed in this post: Convert ext2/3 to ext4

Reformat the drive
Yes

As an alternative, you can enable some of the features of ext4 by running the following command, and rebooting:

sudo tune2fs -O has_journal,uninit_bg,extents /dev/sda1


Bash: delete from cursor till end of line with a keyboard shortcut Consider the following bash prompt, where ^ denotes the prompt location:

$ git commit -am "[bug 123456] Do this and that with the bug"
                               ^

Suppose that I want to commit again to the same bug, with a different commit message. Is there a way to delete the text from the cursor position till the end of line?

Use Ctrl+K to delete from the cursor to the end of the line.

Use Ctrl+U to delete from the cursor to the beginning of the line.

In case you're only familiar with one of Zsh and Bash, here are the equivalent key bindings you (may) need:

bash

bind '"\C-k"':kill-line

zsh

bindkey "\C-k"      vi-kill-eol

Other relevant information

To get a list of key bindings:

# bash
bind -p

# zsh
bindkey


can't download and install updates on ubuntu 14.04.1 lts I recently installed Ubuntu 14.04.1 LTS in my laptop. I am new to this OS, I previously used windows 8.1,  so I don’t know much. I am having problem with updating. I cannot install and update softwares from software update. So please help me. I have also tried to update through terminal using,

sudo apt-get update

But it says.....

Err http://extras.ubuntu.com trusty InRelease
Err http://extras.ubuntu.com trusty Release.gpg
Unable to connect to extras.ubuntu.com:http:
0% [Connecting to in.archive.ubuntu.com (91.189.92.200)] [Connecting to securit

I want some suggestions.

You may want to try,

sudo apt-get dist-upgrade

and see what happens. It can be a quick fix sometimes.


Unity File Lens Giving Useless or No Results I just installed Natty fresh on my laptop, and for the purposes of this experiment, I have one file on my system. My Downloads, Documents, Music, etc are all empty, but Pictures contains one file named "tornado.png". If I simply hit the super key and search through that main lens, I don't get results for "to", "torn", or even "tornado" -- only for "tornado.png". And, if I search using the Files Lens (Super+S), I get no results at all, even for "tornado.png".

Is this not getting indexed properly? What's going on?

The file lens displays results based on files that you have actually opened. It does NOT search a full index of all your files.

At a technical level the results come from a tool called Zeitgeist rather than Tracker.

If you search for files useing Super +F you have the added advantage of having search results arranged by how recently you opened the files.

I had the same problem with an empty dash.  Check out this fix: http://ubuntuforums.org/showthread.php?t=1853156.


Blank screen with AMD Sapphire RX 580 on Ubuntu 16.04 To have a new AMD Sapphire RX 580 Nitro up and running on a fresh Ubuntu 16.04.3 64bit, I have followed AMD instructions and installed their (default) amdgpu-pro 17.50.
It seems to be installed:
# dpkg -l amdgpu-pro
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
ii  amdgpu-pro     17.50-511655 amd64        Meta package to install amdgpu Pr

But after reboot,  while I plugged the monitor to the GPU instead of the motherboard socket DVI, the screen is blank.
And the GPU not recognized:
# lspci -nn | grep -E 'VGA|Display'
00:02.0 VGA compatible controller [0300]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller [8086:0412] (rev 06)

Ubuntu Wiki says:

Ubuntu 16.04 LTS and newer: for some most recent graphics cards (R9
285, R9 380/380X, R9 M395X, R9 Nano/Fury/FuryX, RX 460/470/480, RX
550/560/570/580...) and APUs (Carrizo, Stoney), the open-source AMDGPU
driver is enabled by default. For Ubuntu 16.04 LTS AMDGPU-Pro hybrid
driver is also available to download here

The GPU is fixed the slot on which I had an Nvidia driver previously with no issues. Also, I see that the light on the GPU is on but the fans do not rotate.
My ubuntu-desktop is gnome-fallback, in case that's relevant.
What can be wrong here? How can I troubleshoot/fix this?
Really appreciate your help. This problem bugs me for hours.
UPDATE:
Just figured that AMD confirms this problem:

Installation of AMDGPU-PRO drivers on Ubuntu 16.04.3 will likely
result in issues, such as black screen hang or defaulting to a lower
graphics mode without acceleration.  This also applies to Ubuntu
16.04.2 users who have been upgraded to 16.04.3.

but oddly does not offer any solution!

If you use 17.50 version of the driver, it isn't your fault, I'm on 17.10 testing with a RX 580 sapphire and it do that.
So download an old driver version (for me 17.10 (of the driver) work).

It's just the splash sscreen.

sudo apt-get install gdm

And then

sudo apt-get remove lightdm

Reboot and you're good to go.


Cannot boot from USB created by Startup Disk Creator First I zeroed out the entire USB flash drive:
dd if=/dev/zero of=/dev/sdb

And then I used fdisk(8) to create a type c W95 FAT32 (LBA) partition on it and formatted the partition as FAT32:
mkfs -t vfat /dev/sdb1

And then I used Ubuntu Startup Disk Creator to make it a bootable Ubuntu USB stick (the .iso file is verified and not at fault). However, whenever I use the drive to boot I get a Boot error message. What's going wrong? How to fix this?
Edit: No other distributions (Fedora, Debian, etc.) on other bootable USB disk creators (UnetBootin, etc.) work. The tool runs on Ubuntu 15.10; the file used is of Ubuntu 15.10.

Ubuntu Startup Disk Creator is sometimes buggy. Use dd command instead.

sudo umount /dev/sdb1
sudo dd if=/path/to/ubuntu.iso of=/dev/sdb bs=4M; sync

Wait for it to write to the device. That's it. Here bs refers to Byte Size

You have formatted it from FAT32 and FAT32 is only for Windows/MS-DOS booting and not Ubuntu, so zero it again but choose EXT3/4 and make the Ubuntu Startup Disk again and boot from USB.


How do I change my timezone to UTC/GMT? Currently when I execute the date command from bash I get the following displayed

Thu May 17 12:21:00 IST 2012

Below is my timezone config based on executing dpkg-reconfigure tzdata

  Current default time zone: 'Europe/Dublin'
  Local time is now: Thu May 17 12:32:52 IST 2012.
  Universal Time is now: Thu May 17 11:32:52 UTC 2012.

Any idea how I change from IST to UTC/GMT?

Any idea how I change from IST to GMT?

To switch to UTC, simply execute sudo dpkg-reconfigure tzdata, scroll to the bottom of the Continents list and select Etc or None of the above; in the second list, select UTC. If you prefer GMT instead of UTC, it's just above UTC in that list. :)

In case you need this for only a single command, say, ls, use this:
TZ=UTC ls -l --full-time


How do I install curl in php5? I currently have PHP 5.3 installed with Apache in 10.04 Lucid. How can I add the PHP Curl libraries? Do I need to install any other dependencies for curl?

I believe that the package php5-curl should do the trick.  Use the package manager of your choice and the deps should be taken care of.

sudo apt-get install php5-curl

You will need to restart the server afterwards:

sudo service apache2 restart

Alternatively, if you are using php-fpm, you'll need to restart php5-fpm instead

sudo service php5-fpm restart

For php 5.6 this will do the trick:

sudo apt-get install php5.6-curl

sudo service apache2 restart


SSD and HDD Dual Boot I have got Win 8 on my SSD and I want to install Ubuntu on my HDD. Can I? Thanks.
My SSD is 120 GB and when I try to access it gives this error in "trying Ubuntu" :

Error mounting /dev/sda2 at /media/ubuntu/2284BD1E84BCF57F: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=999,gid=999,dmask=0077,fmask=0177" "/dev/sda2" "/media/ubuntu/2284BD1E84BCF57F"' exited with non-zero exit status 14: Windows is hibernated, refused to mount.
Failed to mount '/dev/sda2': Operation not permitted
The NTFS partition is in an unsafe state. Please resume and shutdown
Windows fully (no hibernation or fast restarting), or mount the volume
read-only with the 'ro' mount option.

Thanks for advance.

The answer is in the question.

Windows is hibernated, refused to mount.

You have to shutdown Windows, not just hybernate it.

I think that on windows 8 (at least on some versions) this is an hidden option not showing up in the standard menus.

Some links to more instructions.
Fast Startup off/hibernation

http://www.eightforums.com/tutorials/6320-fast-startup-turn-off-windows-8-a.html

Force removal of hiberfil from Ubuntu

http://www.hecticgeek.com/2013/01/mount-windows-8-partition-ubuntu-hybrid-boot/


Duplicate sources.list entry cdrom: I am getting the following error msg when entering sudo apt-get update in terminal:

W: Duplicate sources.list entry cdrom://Ubuntu 13.10 _Saucy Salamander_ - Release i386 (20131016.1)/ saucy/main i386 Packages (/var/lib/apt/lists/Ubuntu%2013.10%20%5fSaucy%20Salamander%5f%20-%20Release%20i386%20(20131016.1)_dists_saucy_main_binary-i386_Packages)

W: Duplicate sources.list entry cdrom://Ubuntu 13.10 _Saucy Salamander_ - Release i386 (20131016.1)/ saucy/restricted i386 Packages (/var/lib/apt/lists/Ubuntu%2013.10%20%5fSaucy%20Salamander%5f%20-%20Release%20i386%20(20131016.1)_dists_saucy_restricted_binary-i386_Packages)
W: You may want to run apt-get update to correct these problems

I'm running Ubuntu from a flash-drive. I've run apt get update several times, to no avail. How do I correct these?

Try removing everything in the /var/lib/apt/lists directory first (sudo rm /var/lib/apt/lists/*) and then updating again.


How to find out how much disk space is remaining? What is the command to find out how much disk space is being used/remaining?

You can use two commands: df and du.

df - report file system disk space usage

Usage works like such:

df -h

Which should output something like this:

Filesystem            Size  Used Avail Use% Mounted on
/dev/vzfs              20G  3.5G   16G  18% /

The -h flag provides human readable output (which makes reading of the output - easier).

du - estimate file space usage

A second tool is with du which is a slower approach but will give you a better break down of a per directory. Information on that can be found in How to determine where the biggest files/directories on my system are stored?

Note that df -h will show you only remaining space on mounted partitions. Suppose there are NTFS and FAT32 partitions too before running it note that mount all the partitions. If Ubuntu is sole OS on your machine then I don't see any problem with df.


ssh server: allow only login with key I know, this question has been ask several times. But Im trying to setup a ssh server.

I thought the critical setting is that I have to set PasswordAuthentication no. But I already did so and rebooted the machine. But Im still able to login with my local username and password.

Please find attached my sshd_config file

# Package generated configuration file
# See the sshd_config(5) manpage for details

# What ports, IPs and protocols we listen for
Port 22
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
Protocol 2
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
#Privilege Separation is turned on for security
UsePrivilegeSeparation yes

# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 3600
ServerKeyBits 1024

# Logging
SyslogFacility AUTH
LogLevel INFO

# Authentication:
LoginGraceTime 120
PermitRootLogin without-password
StrictModes yes

RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile  %h/.ssh/authorized_keys

# Don't read the user's ~/.rhosts and ~/.shosts files
IgnoreRhosts yes
# For this to work you will also need host keys in /etc/ssh_known_hosts
RhostsRSAAuthentication no
# similar for protocol version 2
HostbasedAuthentication no
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
#IgnoreUserKnownHosts yes

# To enable empty passwords, change to yes (NOT RECOMMENDED)
PermitEmptyPasswords no

# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication no

# Change to no to disable tunnelled clear text passwords
PasswordAuthentication no

# Kerberos options
#KerberosAuthentication no
#KerberosGetAFSToken no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes

X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
#UseLogin no

#MaxStartups 10:30:60
#Banner /etc/issue.net

# Allow client to pass locale environment variables
AcceptEnv LANG LC_*

Subsystem sftp /usr/lib/openssh/sftp-server

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
UsePAM yes

Simply set PasswordAuthentication to "no" and "UsePAM" to "no", too. Afterwards make sure to reload sshd.

You will want to edit your sshd_config file and restart the ssh server.

sudo vim /etc/ssh/sshd_config or gksudo gedit /etc/ssh/sshd_config
Set PasswordAuthentication no
(PermitRootLogin no is recommended)
sudo service ssh restart


How do I convert image and audio into avi video file? I need to convert image and audio into avi video files for use with a video mixing tool that only accepts avi video.

How do I:

convert mp3 audio to avi without video channel
convert jpg image to avi without sound

Without unnecessary re-encoding, if possible. Also, I think I can use black background image as an input, but I'd rather do without video channel altogether, if possible.

I would prefer a simple command-line solution, if possible.

Get the real ffmpeg. The fake ffmpeg from the repository is buggy. This command will download a recent static build of ffmpeg, so there is no installation required and it will not interfere with anything from the repository:

wget http://ffmpeg.gusari.org/static/32bit/ffmpeg.static.32bit.$(date +"%F").tar.gz
tar xzvf ffmpeg.static.32bit.$(date +"%F").tar.gz

Run the commands (note the ./ before ffmpeg):

convert mp3 audio to avi without video channel

./ffmpeg -i input.mp3 -map 0:a -codec:a copy output.avi

convert jpg image to avi without sound

./ffmpeg -loop 1 -i input.jpg -codec:v copy -t 10 output.avi

Notes:

The album art in MP3 files is considered to be a video stream by ffmpeg. Since you wanted no video using -map 0:a tells ffmpeg to copy only the audio stream from input 0 (the first input is 0, and in your case it is also the only input). Otherwise the default behavior is to include one stream per stream type from the input to the output (see stream selection for more info). Alternatively, -vn can be used instead.
-codec:a copy will enable stream copy mode. This just re-muxes the stream, so there is no re-encoding and no loss of audio quality.
-loop 1 will loop the input file, and -t 10 creates a 10 second output; otherwise it will loop forever. If you want a certain number of frames use -vframes instead.
By default the input image will have a frame rate of 25. If you want to change that then use -r as an input option (before -i). The output will then inherit the input frame rate. If you want to change the output frame rate as well, then add another -r as an output option. ffmpeg will then drop or duplicate frames to reach your desired output frame rate.
AVI is a container format and can use a variety of audio and video formats, so if something claims to only support "AVI" then you should ask for more specific information.

You need a more generic video editing tool. Some options are Novacut and Blender, both of which should provide sufficient features to do what you need.


Ethernet Network card BCM4401-B0 no longer recognised? I updated Ubuntu to 14.04 LTS and I can no longer see my network - No network devices available shows in the network drop down menu. Networking is enabled and if I choose to boot my Dell Inspiron 1300 from the network I do see some activity on the card but none in Linux. Both lights on the nic stay on permanently.

I don't know where to look for the equivalent of event viewer or similar to even start to troubleshoot, having only about two hours with the install before I updated. Original install was last October.

Any pointers on where to look in logs etc would be gratefully received.

02:00.0 Ethernet controller [0200]: Broadcomm Corporation BCM4401-B0 100base-tx [14e4:170c] (Rev 02)
Subsystem dell Device [1028:01c9]

cat /etc/modprobe.d/blacklist-bcm43.conf
# Warning: This file is autogenerated by bcmwl. All changes to this file will be lost.
blacklist b43
blacklist b43legacy
blacklist ssb
blacklist bcm43xx
blacklist brcm80211
blacklist brcmfmac
blacklist brcmsmac
blacklist bcma
blacklist b44
install wl
modprobe -r b43 b44 b43legacy ssb; modprobe --ignore-install wl ; modprobe --ignore-install b44

Your wired network driver b44 is probably blacklisted by your wireless driver.

This should be fixed by

sudo -H gedit /etc/modprobe.d/blacklist-bcm43.conf

And removing blacklist b44, b44 and ; modprobe --ignore-install b44
from the last line.

The file should look this way

# Warning: This file is autogenerated by bcmwl. All changes to this file will be lost.
blacklist b43
blacklist b43legacy
blacklist ssb
blacklist bcm43xx
blacklist brcm80211
blacklist brcmfmac
blacklist brcmsmac
blacklist bcma
install wl
modprobe -r b43 b43legacy ssb; modprobe --ignore-install wl

Save the file.

After that wired network should work after reboot.

Note In case bcmwl-kernel-source is upgraded, this procedure probably should be done again.

Wired fix:

sudo gedit /etc/modprobe.d/blacklist-bcm43.conf

And removing blacklist b44, b44 and ; modprobe --ignore-install b44 from the last line.

The file should look this way

# Warning: This file is autogenerated by bcmwl. All changes to this file will be lost.
blacklist b43
blacklist b43legacy
blacklist ssb
blacklist bcm43xx
blacklist brcm80211
blacklist brcmfmac
blacklist brcmsmac
blacklist bcma
install wl
modprobe -r b43 b43legacy ssb; modprobe --ignore-install wl

Save the file.

After that wired network should work after reboot.

Once connected run all updates though terminal or Apps

sudo apt-get upgrade

Wifi Fix:

sudo modprobe b43

dmesg |grep -e b43 -e bcma


Noticeable performance drop after suspend on 19.04 I'm on precision 5530, i9, 32GB RAM, SSD, using nvidia drivers. When booting I have no performance issues. But if I suspend then resume I see performance and lag drop considerably.

I saw online this might be cpu throttling, but running cpupower frequency-info yields

analyzing CPU 0:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 800 MHz - 4.80 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 800 MHz and 4.80 GHz.
              The governor "powersave" may decide which speed to use
              within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 3.80 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes

It doesn't seem to be throttled but everything is obviously slow.

I do see that the chrome gpu-process is using up 50-100% CPU, which is suggestive.

I didn't have this problem on 18.10.

What might cause this and how can I debug and fix?

Use sudo -H gedit /lib/systemd/system-sleep/custom-xhci_hcd
Copy these lines into the editor:
#!/bin/bash

# Original script was using /bin/sh but shellcheck reporting warnings.

# NAME: custom-xhci_hcd
# PATH: /lib/systemd/system-sleep
# CALL: Called from SystemD automatically
# DESC: Suspend broken for USB3.0 as of Oct 25/2018 various kernels all at once

# DATE: Oct 28 2018.

# NOTE: From comment #61 at: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/522998

TMPLIST=/tmp/xhci-dev-list

# Original script was: case "${1}" in hibernate|suspend)

case $1/$2 in
  pre/*)
    echo "$0: Going to $2..."
    echo -n '' > $TMPLIST
          for i in `ls /sys/bus/pci/drivers/xhci_hcd/ | egrep '[0-9a-z]+\:[0-9a-z]+\:.*$'`; do
              # Unbind xhci_hcd for first device XXXX:XX:XX.X:
               echo -n "$i" | tee /sys/bus/pci/drivers/xhci_hcd/unbind
           echo "$i" >> $TMPLIST
          done
        ;;
  post/*)
    echo "$0: Waking up from $2..."
    for i in `cat $TMPLIST`; do
              # Bind xhci_hcd for first device XXXX:XX:XX.X:
              echo -n "$i" | tee /sys/bus/pci/drivers/xhci_hcd/bind
    done
    rm $TMPLIST
        ;;
esac

Save the file and exit the editor. Then use:
sudo chmod a+x /lib/systemd/system-sleep/custom-xhci_hcd

After rebooting your suspend / resume issues will hopefully be resolved. If not let me know and I'll delete this answer.

NVMe M.2 "gum stick" SSD
These tiny SSD's pack a powerful punch but require special attention in regards to suspend/resume as per this bug report. Edit the file /etc/default/grub and search for this line:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash ... acpiphp.disable=1 pcie_aspm=force"

Don't add the ... but some place after the other parameters add acpiphp.disable=1. Do not add the acpi_aspm=force though unless adding the first option alone doesn't work.
Save the file and use sudo update-grub. Then reboot to test.

It could be related to this bug: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/671932.
What have done each time it's reproduced that I restarted the thermald service:
sudo systemctl restart thermald.service


ubuntu terminal is not working properly in vi editor Recently I installed ubuntu in my laptop for using c programming. but when I open the terminal and typed vi test.c, It open it but it will not work properly. when i pressed backspace it will not work and when i press arrow key it will print some alphabets. What will i do to work properly. please anybody help for this related problem.
thank you

Type
sudo apt-get install vim

in your terminal,
this will solve your problem

Uninstall "vim".
sudo apt-get remove vim

Then, install "vim".
sudo apt-get install vim

I also experienced the same errors as yours so I just uninstalled & installed "vim". Then, these errors were solved.


Getting the version number after library's name and extension in Bash How can I get the version number after a .so file using Bash?

I have obtained the library's full path and extracted the name. Like libpcap.so.1.1.1. Now I need to get the version number after so; for example:

libpcap.so.1.1.1 --> 1.1.1
libusb-0.1.so.4.4.4 --> 4.4.4
libpcap.so.1.8.0-PRE-GIT --> 1.8.0

Edit: A sample code using grep can handle the first two examples. But not the third.

grep -Eo '[0-9][^[:alpha:]]+$' <<<'libpcap.so.1.5.3'

I won't guarantee that it will catch every corner case, but how about

grep -Po '\.so\.\K([0-9]+\.)*[0-9]+'

match and discard literal .so. on the left (using the PCRE \K modifier)
match zero or more occurrences of one or more digits followed by .
match one or more digits

Note that we don't want to anchor it to the end of the string ($) as your original expression does, to allow for a trailing string such as -PRE-GIT

This works for the examples you provided, and will work as long as the input string follows the pattern .*\.so\.[0-9.]*.*:

grep -Po '.*\.so.\K[0-9.]*' <<<'libpcap.so.1.1.1'

It will match the widest possible sequence of digits / dots after the last .so. substring, if any.

% grep -Po '.*\.so.\K[0-9.]*' <<<$'libpcap.so.1.1.1\nlibusb-0.1.so.4.4.4\nlibpcap.so.1.8.0-PRE-GIT'
1.1.1
4.4.4
1.8.0


How can I protect against my laptop being stolen? Can it share its location? In case my laptop gets stolen, is it possible to use some kind of service or something that shares its location at all times? In other words, what to do against the thievery?

Others had mention Prey (open source and freemium). You can also try Pombo. But your question is What to do against the thievery?. This is more broad.

Avoid being robbed

Use security/Kensington lock cable
Activate an alarm when stolen ("kill cord", pendrive or AC power removed). Something like BusKill (LAlarm or A.L.A.R.M. equivalent for Linux¹).

Avoid others access to your data

Full disk encryption LUKS: This and a backup are probably the best things to do. Hardware is replaceable, your data probably not.
Always lock your laptop (and use a strong password)

Get you laptop back

Engrave contact info so could reach you if it end on honest hands.
Prey/Pombo: Probably a little bit naive.
Add a RFID tag for tracking/SmartTag
Could be useful to save on a safe location your make, model and serial numbers (sudo dmidecode -s system-serial-number/-t chassis, lsblk --nodeps -no serial /dev/sda)

¹ Please comment for more/better alternatives.

full answer (and tutorial) for sharing PC GPS:

go to settigs/privacy/location and enable location services
install wayland (if you didn't installed/had built-in)
install anbox (it run only in wayland, so you needed to install that)
setup anbox kernel (just t be able to run app on that)

now you have second system inside ubuntu. now we need to setup anbox to share location:

download android's app for sharing GPS (there are many, you choose what to take, i won't decide for you)
install and run app inside anbox. wifi, another networks and GPS should be immediately enabled on "android" as you enabled on PC, so just remember to NOT shutdown PC, cause it could kill anbox and this GPS sharer as you installed. :) PS: a good fix to be able to close laptop and prevent sleeping is installing and enabling caffeine. ;)


How to install libpng and zlib I'm completely new to Ubuntu. I got installed it because my school uses a lot of Linux type stuff in my school's Computer Science program so I figured I would use Ubuntu on my own machine and just do my code from there instead of the computer labs. However, I'm having a lot of trouble trying to install the numerous packages that aren't included natively on Ubuntu. Can someone help me install the PNG library, libpng and zlib. This is just one of many things I need to get on here but I think I need to first start off with this. I did download both packages, did the tar xf thingy on the download, and looked at the README files for insight on installing the software. I get weird errors though. I first tried installing libpng and the terminal was like zlib isn't installed so I was like ok, I'll just get zlib but permission is denied. Do I need to get root or something? I remember seeing people say root before, but I don't know if it is relevant. I'm really new so I don't understand a lot of these things and it's kinda scary. Please help.

Open terminal by CtrlAltT

For libpng, run:

sudo apt-get install libpng-dev

For zlib, run:

sudo apt-get install zlib1g-dev

Ubuntu uses a thing called apt, which is a package manager. It installs, manages, upgrades, and removes programs. If at all possible, you should try to install programs via Ubuntu Software Center. What you were likely attempting to do was install from source, which is only recommended if you know what you're doing.

Try to get out of the Windows mentality, which is to search google and download an installer. The Ubuntu Software Center searches Ubuntu's online repositories, which are generally guaranteed to work. Programs installed via Software Center or apt will also be updated automatically by Ubuntu's Software Updater.

You can install libpng from the Software Center by searching libpng and choosing "PNG Library - runtime". Or from here libpng12-0  by clicking "available on the Software Center". Or using sudo apt-get install libpng12-0 from a terminal.

The zlib1g package should be installed automatically when you install libpng12-0, because it is one of the libpng12-0 package's dependencies. The package manager apt installs all of a package's dependencies before it installs the package.


How to make Ubuntu 10.10 boot faster? Possible Duplicate:
  How to make Ubuntu boot fast?

hi, i m using Ubuntu 10.10 64bit OS. while booting in a black screen it shows blinking "_" about 10 seconds. how can it be solved?

the blinking dash is usually your gui loading.
for any operating system windows ubuntu or otherwise you can go to your startup programs menu and limit the ammount of programs that load at startup and that will definitely speed up your startup. the other option is to turn off your gui and rely on the cli as some users do it would boot alot faster as there are no graphics to load


"EggSMClient-WARNING **: Failed to connect to the session manager: None of the authentication protocols specified are supported" I am on ubuntu 12.10.

Every time that I try to open gedit on root this appears:

(gedit:3254): EggSMClient-WARNING **: Failed to connect to the session manager: None of the authentication protocols specified are supported

** (gedit:3254): WARNING **: Could not connect to session bus

Use gksudo for this:

gksudo gedit

That should do the trick.

I had the same issue. Resolved with the following command

sudo gedit &


How to send mail from the command line? How to send mail from the command line?

Install ssmtp :

sudo apt-get install ssmtp

Edit the ssmtp config file:

gksu gedit /etc/ssmtp/ssmtp.conf

Append the following text:

root=username@gmail.com
mailhub=smtp.gmail.com:465
rewriteDomain=gmail.com
AuthUser=username
AuthPass=password
FromLineOverride=YES
UseTLS=YES

Run ssmtp and provide the recipient email address:

ssmtp recepient_name@gmail.com

Provide the message details as follows:

To: recipient_name@gmail.com
From: username@gmail.com
Subject: Sent from a terminal!

Your content goes here. Lorem ipsum dolor sit amet, consectetur adipisicing.
(Notice the blank space between the subject and the body.)

Press Ctrl + D to send.

You can also put the text in file and send it as follows:

ssmtp recipient_name@gmail.com < filename.txt

You can use cURL. Take a file like this:

From: Sunday <sunday@gmail.com>
To: Monday <monday@gmail.com>
Subject: Tuesday

Wednesday

and send it:

curl \
--netrc \
--mail-rcpt monday@gmail.com \
--upload-file a.txt \
smtps://smtp.gmail.com

https://myaccount.google.com/lesssecureapps


What does apt-get --fix-missing do and when is it useful? From the man page:

-m, --ignore-missing, --fix-missing
  Ignore missing packages; if packages cannot be retrieved or fail the integrity
  check after retrieval (corrupted package files), hold back those packages and
  handle the result.

  Use of this option together with -f may produce an error in some situations. If a
  package is selected for installation (particularly if it is mentioned on the
  command line) and it could not be downloaded then it will be silently held back.

 Configuration Item: APT::Get::Fix-Missing.

This is confusing:

How can 'ignore missing' and 'fix missing' be synonyms for the same option?
What does 'hold back' mean in this context?
What does 'handle the result' mean?

And in what situation is it useful anyway? When you try to install a package not in the apt index, you get this message:

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Are the two suggestions (apt-get update, apt-get install --fix-missing...) at all equivalent?

Ok, in order:

(1) -m ignore missing or fix missing packages (as opposed to -f broken packages). These options are synonyms for the same option. (Since to fix it ignores from here it takes its own weirdness  :-) )
(2-3) When you install/upgrade with apt-get upgrade or with apt-get install somepackage, usually apt tries to update dependencies. This means that it may find that some packages need new or updated versions of existing packages, and so on in a cascade of dependencies. If some of those packages are missing or fail the integrity check, it seems to  suspend this package, and wants you to go to handle the result following the handle method of the requiring package, if possible. Often it stops installing this package.
(4)  With apt-get update you download what is needed to rebuild the list of dependencies.
After that you can try apt-get install --fix-missing again, in the hope that the updated list fixes the problem by itself.
This can be very useful at times, such as when you add a source for packages in your /etc/atp/sources.list,
or when the package index files have been updated.

Not all the programs you can use under Ubuntu came from the official Ubuntu repositories, and are updated with the same versions -- this is rare.

Moreover, there are many reasons why an installation can be abruptly interrupted (A kill signal, a power shortage, a failure of graphic driver...)  In those situations, apt-get update may not work, so you first need to fix the problem with apt-get install --fix-missing or with some dpkg  commands.

You can see apt-get install --fix-missing as a light and friendly version of commands like dpkg-reconfigure --all or dpkg.

The following steps will solve the issue:

Update the nameserver 8.8.8.8 in /etc/resolve.conf
Run sudo apt-get update


"sed" to add a space only under a certain condition I have to add a space after the # to every occurrence, only if the # is at the beginning of the line and after the # there is at least one character that is not the space. For example this code:
echo "# ok" | sed "s|^#[^ ]|# |g"

Returns # ok as expected, but this code:
echo "#ok" | sed "s|^#[^ ]|# |g"

Returns # k and not # ok as expected.
How do I get the # ok output?
Edit:
This is the code that solves my problem, thanks to @FedonKadifeli:
echo -e "#ok\n# ok\n #ok\n#ok #ok\n##ok #ok"

Returns:
#ok
# ok
 #ok
#ok #ok
##ok #ok

This code:
echo -e "#ok\n# ok\n #ok\n#ok #ok\n##ok #ok" | sed -r 's|^#(#*)([^[:space:]#])|#\1 \2|g'

Returns:
# ok
# ok
 #ok
# ok #ok
## ok #ok

One fairly straightforward approach would be to replace the first "hash" by "hash space" only in lines that begin with "hash not space":
$ echo "#ok" | sed "/^#[^ ]/s|#|# |"
# ok

In regex variants that provide it, like Perl, you could use negative lookahead:
$ echo "#ok" | perl -pe 's/^#(?! )/# /'
# ok

This is the code that solves my problem, thanks to @steeldriver and @FedonKadifeli:
echo -e "#ok\n#ok\n# ok\n# ok\n#ok\nnobegin #ok"

Returns:
#ok
#ok
# ok
# ok
#ok
nobegin #ok

This code:
echo -e "#ok\n#ok\n# ok\n# ok\n#ok\nnobegin #ok" | sed "\|^#[^[:space:]]|s|#|# |g"

Or this more logic code:
echo -e "#ok\n#ok\n# ok\n# ok\n#ok\nnobegin #ok" | sed -r "s|^#([^[:space:]])|# \1|g"

Returns:
# ok
# ok
# ok
# ok
# ok
nobegin #ok


Ubuntu running slow and laggy My Ubuntu has been running pretty slow, but I don't know why. I have the latest updates and all. I installed Ubuntu i368 on a AMD processor does that effect the speed?
Thank you.

Very little information to go on here, but I'm going to take a shot at it anyway.  Normally when Ubuntu gets laggy for no obvious reason it has to do with gvfs-metadata.  This is particularly true if you've been moving files around a bit.  It's a pretty easy fix.  All you have to do is close Nautilus or whatever file browser you are running, open an terminal and type the following:

pkill gvfsd-metadata

then hit ENTER and when you get the prompt back, type:

rm -rf ~/.local/share/gvfs-metadata

The first command stops the gvfsd process, and the second command erases gvfs-metadata file which often becomes corrupt or just too big.  Don't worry, though, a fresh new gvfs-metadata file is created as soon as the gvfsd process starts back up.  At the very least this does no harm and gives you a bit more speed / CPU usage.  The worst case scenario is that you see a bit of improvement.  The best case is that this fixes your problem.

If you followed Blind Fish replied you may also would want to consider installing Preload, (adaptive readahead daemon) see here:https://apps.ubuntu.com/cat/search/?q=preload&op= read the description FYI....

Luis


Cannot install Wine on Ubuntu 18.04 lts After installing per the installation instructions from Wine:

sudo dpkg --add-architecture i386
wget -nc https://dl.winehq.org/wine-builds/winehq.key
sudo apt-key add winehq.key
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'
sudo apt update
sudo apt install --install-recommends winehq-stable

Staring Wine fails:

wine start /unix %f
0009:fixme:exec:SHELL_execute flags ignored: 0x00000100
0009:fixme:exec:SHELL_execute flags ignored: 0x00000100
0009:fixme:exec:SHELL_execute flags ignored: 0x00000100
0009:fixme:exec:SHELL_execute flags ignored: 0x00000100
0009:fixme:exec:SHELL_execute flags ignored: 0x00000100
0009:fixme:exec:SHELL_execute flags ignored: 0x00000100
0009:fixme:exec:SHELL_execute flags ignored: 0x00000100
0009:fixme:exec:SHELL_execute flags ignored: 0x00000100
0009:fixme:exec:SHELL_execute flags ignored: 0x00000100
0009:fixme:exec:SHELL_execute flags ignored: 0x00000100
Application could not be started, or no application associated with the specified file.
ShellExecuteEx failed: Invalid window handle.

This is the error code I get when I try to open Wine in Terminal. I first ran Wİne on Terminal and it said it couldn't find Mono and Gecko and said it can install it for me. I clicked ok and it installed Mono without any problem but with Gecko it got an error and couldn't install it. It was able to install it in the second try and I ran Wine again, but I got the error above. Did I do anything wrong? I should also mention, when I try to open it from /usr/share/applications nothing happens.

Use the installation instructions from Wine instead:

sudo dpkg --add-architecture i386
wget -nc https://dl.winehq.org/wine-builds/winehq.key
sudo apt-key add winehq.key
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'
sudo apt update
sudo apt install --install-recommends winehq-stable


How to install MySQL GUI Tools in 12.04+ versions? I want to install the MySQL GUI Tools in 12.04 and future version because frankly the way workbench works is not even close to how friendly the GUI tools were, specially for simple stuff like doing a quick SELECT of something or selecting a table. I like using MySQL Administrator and MySQL Query Browser. The way they work is much more intuitive than Workbench. How can I install them in 12.04 and newer versions?

I tried to compile without success because many bugs to fix :(
I tried to convert .rpm package with alien, its convert and install well but doesn't work :(
go to this page and download this packed : see UPDATE

32 bits

Generic x86 Linux TAR (bundled dependencies)         5.0r12

mysql-gui-tools-5.0r12-linux-i386.tar.gz

64 bits

Generic x86/64 Linux TAR (bundled dependencies)      5.0r12

mysql-gui-tools-5.0r12-linux-x86_64.tar.gz

extract the tar.gz with nautilus doble-click :

Open mysql-gui-tools-5.0 with nautilus an you will see :

The first time open a terminal an execute ./mysql-administrator

if you see one error like that just execute ./mysql-administrator --update-paths

for second time an more just execute via nautilus

and voala! happy rocking...

UPDATE 23/02/2013

MYSQL Announcement the EOL for the MySQL GUI Tools Bundle (Administrator, Query Browser, Migration Toolkit), please use MySQL Workbench has replaced the GUI Tools Bundle instead, and you can't download from the MYSQL web page but I found another page where you can find it:

MySQLGUITools

Run these commands in the Terminal:

aptitude search mysql-query-browser mysql-admin mysql-workbench

aptitude show tora


111: Connection Refused When I attempt to install packages through sudo apt-get install, no matter what I try to install, it returns a 111: Connection Refused error.

The web browser appears to work, but not sudo apt-get install. I attempted to install Ruby, PHP, and open-shift RHC tools, and I also attempted to use Synaptic to update/install packages, and I was unable to.

I get errors similar to the following, every time:

W: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main          /liby/libyaml  > /libyaml-0-2_0.1.4-3ubuntu3.1_i386.deb
Could not connect to 155.238.4.87:8080 (155.238.4.87). - connect (111: Connection refused)

I am using Ubuntu 14.04.1 LTS.

I connect to my adsl router via wireless, and am running an image that i got from my university running on vmware, using Windows 10. The university used a proxy but I edited it out in the M2 setting file and edited firefox to auto detect proxy to get my internet working

Please can someone help me figure out how to fix this?

See if there's a proxy set in /etc/apt/apt.conf (or somewhere in /etc/apt/apt/apt.conf.d).

There'll be a file with a line something like:
Acquire::http::Proxy "http://155.238.4.87:8080";

Comment the line(s) by putting a # at the beginning of it and try again.

In command prompt, enter sudo nano /etc/apt/apt.conf
Delete (or comment out) the contents of the file, press Ctrl+O and then Ctrl+X
Enter sudo apt update
Resume doing what you were previously doing.


How to Download the video files on internet? Like Internet Download Manager for windows,Is there any software to download all files like videos,audios,softwares and all other files in Ubuntu 11.10?

Here is a quick solution. You do not even need a software to download videos from web.

All you have to do is run following commands after the video has been completely loaded on browser.

$lsof | grep Flash

$cat > /proc/PID/fd/FD > filename.flv

Replace PID and FD with their corresponding value from the output obtained from the first command.

Consider following example.

lsof | grep Flash

chrome     3151     abnormal   23u      REG       8,23  1274744  1058929 /tmp/FlashXXmkVBxq (deleted)

cat /proc/3151/fd/23 > "video.flv"


WD 3TB external HD that is not recognized by Ubuntu 14.04 (the BIOS does support +2.2TB drives) I've got an Ubuntu 14.04 64-bit, with a 4 TB hard drive.
My mother is an Asus P8Z68-V/GEN3, which natively supports hard drives larger than 2.2TB in 64-bit.

I've have two WD (western Digital) external USB 3.0 disks. One of 4TB and the other or 3TB. I can use the 4TB ithout any issue, but when I add the 3TB, it says that "this location could not be displayed". I've tried the 2.0 and 3.0 USB slot.

I do have a Windows 7 machine that does recognize it.

What can I do?

The issue was solved after I accessed the drive from a Windows computer. Just that.

I've inserted it again on my linux machine and it works normally, as it should.

Just in case it helps someone, some day.


How to increase waiting time for non responding programs? I have installed a Ubuntu GNOME and found that I am getting lots of PROGRAM is not responding messages.

I have either to "Force Quit" the program or "Wait" for it a little more.

I've noticed that each time I wait for the program, the program eventually continues without issues.

So, I think there might be a "timeout" configuration for programs to be considered non-responding and I want to increase this timeout.

It could not be configured, because the timeout value is defined as constant value in the mutter source.
gnome-shell refers mutter library.
I found the timeout value at the mutter source, mutter-3.10.4/src/core/display.c.

...
#define PING_TIMEOUT_DELAY 5000

And it's used by a below function named as meta_display_ping_window

ping_data->ping_timeout_id = g_timeout_add (PING_TIMEOUT_DELAY, meta_display_ping_timeout, ping_data);

It's referred from the function when the window is activated:

window_activate(mutter-3.10.4/src/core/window.c) -> meta_window_check_alive(mutter-3.10.4/src/core/delete.c) -> meta_display_ping_window(mutter-3.10.4/src/core/display.c)

As you can see at above, the timeout is 5 seconds.

You can modify the value just for you because mutter is open source project.

And the timeout value is referred another case when the window is closed.
Window delete flow is as

meta_window_delete(mutter-3.10.4/src/core/delete.c) -> meta_window_check_alive(mutter-3.10.4/src/core/delete.c) -> meta_display_ping_window(mutter-3.10.4/src/core/display.c)

However, I think that you need to modify the source for your delayed window. Or I think that you can discuss about it with the mutter developers/maintainers.

You can prepare the build environment and get the source with following commands.

$ sudo apt-get build-dep mutter
$ sudo apt-get source mutter

To build it, Refer

https://www.debian.org/doc/manuals/apt-howto/ch-sourcehandling.en.html
https://wiki.debian.org/BuildingTutorial

I don’t know if answering this old question has any sense, but maybe for someone it will be helpful.

I tried to build the mutter library from source, but I gave up, because this library depends on many other libraries, and those libraries also depends on other libraries.

I needed a way to close this dialog once if it appears, but I was not able to close it in the wine application. So I wrote a small script in bash, that will kill this window if it appears.

#!/bin/bash

while [  true ]; do
    VAL=$(ps -fA | grep "class mutter-dialog" | grep -cv grep)

    if [ $VAL -eq 1 ]
    then
            ID=$(ps -fA | grep "class mutter-dialog" | grep -v grep | awk '{print $2}')
            sleep 5
            echo killing $ID
            kill $ID
            exit 0
    fi

    sleep 10
done


I can't find ./usr/bin/wine executable after I installed it I've been trying to install Microsoft Office 2007 and seem easy using Wine but when I install Wine i just can't run it, I tried to install Wine 1.2 and 1.3 by terminal and by the center.

In the menu of apps its the Wine icon of Winetricks and Wine configure but they don't do anything.

i tried to look for the folder in my personal folder, I already know it's a hidden folder and when i press Ctrl+H appear other folders but .wine
when i apply the command WINECFG in terminal appears this:

carlos@CARLOS-ACER:~$ winecfg
exec: 29: /usr/bin/wine: not found

I hope you can help me. I'm a little new
PS: sorry for my English, I'm learning and thanks for the time to read :)

This is a known bug.

https://bugs.launchpad.net/ubuntu/+source/ia32-libs/+bug/852101

Workaround:

reinstall libc6-i386 by running: sudo apt-get install --reinstall libc6-i386

Wine is not a program that you run as you run other programs. We use wine to install Windows programs and then when we run that Windows program wine will load it and be the means of communication between the Windows program and the Linux operating system.

Look for a program called Uninstall Wine Software. Run that and click the Install button and then browse to the setup.exe file of the Windows program or whatever exe file is used to install the Windows program.

Wine will then install the program on the hard disk in .wine folder Look for a program files folder in the drive_c folder. That is where wine will put the program files.

The installation of the Windows program should put an icon for that program on the desktop. Click that icon and wine will load the program as if it was running on the Windows operating system. At least that is the theory.

A better name for Uninstall Wine Software would be Wine Add/Remove programs. But there you are.


Wine complete removal from Ubuntu 14.04 I have installed wine from Ubuntu software centre but I don't need that & want to remove the software completely from my system so please tell me How to completely remove wine from Ubuntu 14.04?

Open the terminal by pressing Control+Alt+T and type:

sudo apt-get remove wine

That will uninstall wine but if you want to get rid of wine and anything related to wine run:

sudo apt-get purge wine


Skype shows "Virtual device" for Microphone, speakers and ringing I have Ubuntu 14.04.1 and Skype 4.03.0.37.
my audio devices are working fine but when I make  Skype calls I can't hear the other person neither they can hear me.

when I checked Skype audio settings it showed virtual device as the only option for all devices.

I tried a lot of proposed solutions on the web and nothing helped.

what could be the problem and how can I fix it?
I know there is not a lot of details in the question to help, what extra details do  I need to provide ?

Thank you so much.

finally solved.
I am running a 64-bit machine and a 32-bit Skype, so I just installed the libpulse 32 bit version:

sudo apt-get install libpulse0:i386
is all what was needed to solve the problem

The "solve everything" command from https://help.ubuntu.com/community/SoundTroubleshootingProcedure made it work on Ubuntu 15.10.

Warning: This solution may create problems for users of the other flavors of Ubuntu like Lubuntu.

sudo apt-get update;sudo apt-get dist-upgrade; sudo apt-get install pavucontrol linux-sound-base alsa-base alsa-utils lightdm ubuntu-desktop  linux-image-`uname -r` libasound2; sudo apt-get -y --reinstall install linux-sound-base alsa-base alsa-utils lightdm ubuntu-desktop  linux-image-`uname -r` libasound2; killall pulseaudio; rm -r ~/.pulse*; ubuntu-support-status; sudo usermod -aG `cat /etc/group | grep -e '^pulse:' -e '^audio:' -e '^pulse-access:' -e '^pulse-rt:' -e '^video:' | awk -F: '{print $1}' | tr '\n' ',' | sed 's:,$::g'` `whoami`

Then reboot.


Converting a windows drive to Ubuntu Drive I am recent convert to Ubuntu and just loving it. Right now, I can access my windows drive from ubuntu, however, I want to delete the windows partition and make it an ubuntu partition. I have already backed up my data. How do I go about it.

If you're using Ubuntu 12.10, you can format your partition by opening the Disks application, select the partition, click the two cogs icon below and select format.
Then choose ext4 as the file system type. Your windows NTFS partition is now a Linux ext4 partition.
Automounting your partition (optional)
If you want it to automount at boot, you may want to modify your /etc/fstab file.
Create your mount point. You may choose to mount wherever you want but normally partitions are mounted either under /media or under /mnt. The former place would make the partition easily unmountable like a pendrive while the latter is more "permanent".
Open a terminal (ctrl + alt + t) and type sudo mkdir /mnt/choosename. Change choosename to whatever you like.
Type sudo blkid and copy the UUID of your drive.
Press Alt + F2 and type gksudo gedit /etc/fstab, then add a line like this:
UUID=your-UUID-here /mnt/choosename               ext4    errors=remount-ro 0       1

Once you reboot, your partition will be present in the selected mount point.

the Disk Utility program (ubuntu 12.04) or Disks (12.10) allows you to do basic partition operations in a nice GUI interface.

You have it in the Software Center.

Once installed, open it, select the partition you want to edit, then format it. Choose the ext4 partition file system as you don't need to access with windows anymore.


From DigiKam to WhatsApp? I want to send an image which I see in DigiKam via WhatsApp.
What is the easiest way to do this?

Short story
No native WhatsApp application that supports receiving files as arguments is available for Ubuntu yet. All the available solutions rely on WhatsApp Web and implement some sort of web browser.
So drag and drop images from DigiKam to your WhatsApp "application" / web browser is the obvious way.
Long story
Application launchers are located in the /usr/share/applications/ directory. These launchers are files with .desktop extension and each contain something like this:
[Desktop Entry]
Name=Amazon
Comment=Online Shopping for Electronics, Apparel, Computers, Books, DVDs & more
Type=Application
Categories=Network;
Icon=amazon-store
Exec=/usr/share/ubuntu-web-launchers/amazon-launcher
X-Ubuntu-Gettext-Domain=ubuntu-default-launchers

The above example is for the amazon app.
In order for an app to be available and usable in the open with menu when a file is selected, it needs to have two things in its .desktop launcher file:

Exec key code which is in this case %F if the app is capable of accepting multiple files as arguments or %f if it can only accept a single file as an argument. This code is added at the end of the Exec= line with a space before it. So that line from the above example will look like this:
Exec=/usr/share/ubuntu-web-launchers/amazon-launcher %F

MimeType= which specifies file type association. For images for example, this line needs to be present in the .desktop application launcher and looks like so:
MimeType=image/bmp;image/gif;image/jpeg;image/jpg;image/pjpeg;image/png;image/svg+xml;image/tiff;image/x-bmp;image/x-gray;image/x-icb;image/x-ico;image/x-png;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/x-xbitmap;image/x-xpixmap;image/x-pcx;image/x-targa;image/x-tga;image/openraster;

So the end result of the example above will look like so:
[Desktop Entry]
Name=Amazon
Comment=Online Shopping for Electronics, Apparel, Computers, Books, DVDs & more
Type=Application
Categories=Network;
Icon=amazon-store
Exec=/usr/share/ubuntu-web-launchers/amazon-launcher %F
X-Ubuntu-Gettext-Domain=ubuntu-default-launchers
MimeType=image/bmp;image/gif;image/jpeg;image/jpg;image/pjpeg;image/png;image/svg+xml;image/tiff;image/x-bmp;image/x-gray;image/x-icb;image/x-ico;image/x-png;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/x-xbitmap;image/x-xpixmap;image/x-pcx;image/x-targa;image/x-tga;image/openraster;

What you need to do is to find the .desktop launcher file for your  application and modify it like the above example. Your application will then be available in the open with menu. That being said, your application must have the capability of accepting files as arguments and be able to handle them properly or otherwise the arguments will be ignored by the application.
One more thing: If you have installed DigiKam from snap, I would advise to remove it like so:
sudo snap remove digikam

then, reinstall it with APT like so:
sudo apt install digikam

APT installed applications provide better integration with other desktop applications.
Notice:
Amazon app is not capable of handling file arguments and I used it as just an example on how application launchers are modified, how they look and where they are located.

My son has no clue about software, linux or other computer stuff, but he found the most easy solution immediately: He took his mobile phone, took a picture of image on the monitor and sent this via WhatsApp.
I think I think too complicated.