Atheros Wifi works on one desktop computer but not another My Wifi card worked on my old desktop fine but is not working whe I moved it to my new one.

Here is the output of sudo lshw -C network

-network UNCLAIMED
       description: Ethernet controller
       product: Atheros Communications Inc.
       vendor: Atheros Communications Inc.
       physical id: 0
       bus info: pci@0000:04:00.0
       version: 01
       width: 32 bits
       clock: 33MHz
       capabilities: pm bus_master cap_list
       configuration: latency=32
       resources: memory:fb200000-fb20ffff

and sudo lspci

00:00.0 Host bridge: Intel Corporation Sandy Bridge DRAM Controller (rev 09)
00:01.0 PCI bridge: Intel Corporation Sandy Bridge PCI Express Root Port (rev 09)
00:16.0 Communication controller: Intel Corporation Cougar Point HECI Controller #1 (rev 04)
00:1a.0 USB Controller: Intel Corporation Cougar Point USB Enhanced Host Controller #2 (rev 05)
00:1b.0 Audio device: Intel Corporation Cougar Point High Definition Audio Controller (rev 05)
00:1c.0 PCI bridge: Intel Corporation Cougar Point PCI Express Root Port 1 (rev b5)
00:1c.2 PCI bridge: Intel Corporation 82801 PCI Bridge (rev b5)
00:1c.3 PCI bridge: Intel Corporation Cougar Point PCI Express Root Port 4 (rev b5)
00:1c.4 PCI bridge: Intel Corporation Cougar Point PCI Express Root Port 5 (rev b5)
00:1d.0 USB Controller: Intel Corporation Cougar Point USB Enhanced Host Controller #1 (rev 05)
00:1f.0 ISA bridge: Intel Corporation Cougar Point LPC Controller (rev 05)
00:1f.2 IDE interface: Intel Corporation Cougar Point 4 port SATA IDE Controller (rev 05)
00:1f.3 SMBus: Intel Corporation Cougar Point SMBus Controller (rev 05)
00:1f.5 IDE interface: Intel Corporation Cougar Point 2 port SATA IDE Controller (rev 05)
01:00.0 VGA compatible controller: nVidia Corporation Device 0de1 (rev a1)
01:00.1 Audio device: nVidia Corporation Device 0bea (rev a1)
03:00.0 PCI bridge: Device 1b21:1080 (rev 01)
04:00.0 Ethernet controller: Atheros Communications Inc. Device ff1a (rev 01)
05:00.0 USB Controller: NEC Corporation uPD720200 USB 3.0 Host Controller (rev 03)
06:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)

and sudo iwconfig

lo        no wireless extensions.

eth0      no wireless extensions.

and sudo ifconfig

eth0      Link encap:Ethernet  HWaddr 6c:62:6d:e6:8f:6f
          inet addr:192.168.0.143  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::6e62:6dff:fee6:8f6f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5772951 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5587811 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:996414964 (996.4 MB)  TX bytes:1604420754 (1.6 GB)
          Interrupt:44 Base address:0x2000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:60498 errors:0 dropped:0 overruns:0 frame:0
          TX packets:60498 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:9892064 (9.8 MB)  TX bytes:9892064 (9.8 MB)

I totally have no idea what to do, or even what most of this means, any help at all to get my wifi working again would be appreciated.

Thanks!

Ash

Look into your logfiles:
 dmesg | grep ath
 grep ath /var/log/*.log* | egrep -iv path

Maybe issues with an interrupt. I could heal such a thing in the bios, but with intel-IPW2100. Maybe some other idea can be found.
update after comment:
On my older laptop, ubuntu 9.04, I get:
locate ath_pci
/etc/modprobe.d/blacklist-ath_pci.conf
/lib/linux-restricted-modules/2.6.27-14-generic/ath_pci
/lib/linux-restricted-modules/2.6.27-14-generic/ath_pci/ath_pci.mod.o
/lib/linux-restricted-modules/2.6.27-14-generic/ath_pci/if_ath.o
/lib/linux-restricted-modules/2.6.27-14-generic/ath_pci/if_ath_pci.o
/lib/linux-restricted-modules/2.6.28-16-generic/ath_pci
/lib/linux-restricted-modules/2.6.28-16-generic/ath_pci/ath_pci.mod.o
/lib/linux-restricted-modules/2.6.28-16-generic/ath_pci/if_ath.o
/lib/linux-restricted-modules/2.6.28-16-generic/ath_pci/if_ath_pci.o
/lib/modules/2.6.24-24-generic/madwifi/ath_pci.ko
/usr/share/linux-restricted-modules/2.6.27-14-generic/modules.alias.override/ath_pci
/usr/share/linux-restricted-modules/2.6.28-16-generic/modules.alias.override/ath_pci

On the newer one (10.04) only line 1, modprobe-blacklist.
But on both a lot of ath5k-files, mainly .ko-related (Kernel object, alias: driver).

I believe these cards should work out the box on the newest kernels but unless you want to upgrade your version of Ubuntu, this particular chipset is known to misbehave and forcing it onto the ath5k driver should work.

In older versions of Ubuntu, especially where the madwidi driver is involved, the ath5k driver ends up blacklisted by other drivers. To fix this, you need to find out where it's blocked. Fire this off into a terminal:

grep -R 'ath5k' /etc/modprobe.d/

If that comes back with any lines that start with blacklist, you need to edit that file and comment the line out. grep will output the name of the file so just run sudo nano the_filename, stick a # in front of the applicable line (control+w in nano to search) and then control+x to save. Reboot and hopefully you'll have a wireless card.


Why does my laptop with AMD Radeon HD 76xx graphics get overheated when using Ubuntu? I bought a new laptop which came pre-installed with Windows 7. I love working on Ubuntu and hence installed 12.04 on my laptop. I can work on Windows for 6 hours at a stretch and feel the laptop being only slightly warm, but 15 minutes into running Ubuntu and my laptop is too hot.

The battery also drains out very quickly on Ubuntu. 1.5 hrs of backup on Ubuntu compared to 5-6 hrs on Windows.

I previously owned a Dell Inspiron N5010 and everything ran smoothly on that. No heating issues. It came with Intel i3 processor. So I'm wondering whether this problem has something to do with the processor? (AMD A8)

Specs:

HP Pavilion G6-2005AX Laptop (APU Quad Core A8/ 4GB/ 500GB/ Win7 HB/ 1.5GB Graph)
1 GB AMD Radeon HD 7670M Dedicated 512 MB AMD Radeon HD 7640G Graphics Integrated

I've already installed ATI proprietary drivers suggested by Ubuntu. But sensors temperature is 70 deg C.

Is there any fix for this problem?

OP reported in Revision 2 of the question that he managed to solve the problem:

Managed to fix the problem by installing AMD proprietary drivers downloaded from AMD website, after deactivating the driver suggested by Ubuntu!
Right now the sensors temperature is 47deg C! and battery backup of 4 hrs! HOORAY!

On my HP Pavilion g6 I solved by installing the AMD drivers.
Download from http://support.amd.com, choose the proper driver, download and install it.


Moving windows from the keyboard Is it possible to move windows from the keyboard itself without touching the mouse?

I know I can do a Alt + Left Click and drag the window, however I am hoping there is something I can use to move it from the keyboard without the mouse.

You can move a window by pressing

Alt+F7, then moving it around with the arrow keys, and finish by hitting Return.
The same goes for resizing, using Alt+F8

You can also press Esc to cancel

Also, while I'm at it:

Alt+F9 minimises the window
Alt+F10 maximises it

You can also bring up the application's window menu with Alt+space:

If you want to change those shortcuts, you can go to System → Preferences → Keyboard Shortcuts and find them under Window Management:

Instead of moving windows around by keyboard as if you're moving a mouse, you might just as well use a tiling window manager like awesome or xmonad, where everything is done by keyboard, anyway. In these window managers, windows only exchange places with other windows, and together they cover the whole screen.


How to avoid duplicate entries in .bash_history The same command is listed in my history again and again. How can I avoid this? I know it's possible via HISTCONTROL but I haven't found the right way.

From the bash man page:

  HISTCONTROL

    A colon-separated list of values controlling how commands  are  saved  on
    the  history  list.   If  the  list of values includes ignorespace, lines
    which begin with a space character are not saved in the history list.   A
    value  of  ignoredups causes lines matching the previous history entry to
    not be saved.  A value of ignoreboth is  shorthand  for  ignorespace  and
    ignoredups.   A value of erasedups causes all previous lines matching the
    current line to be removed from the history  list  before  that  line  is
    saved.   Any  value  not in the above list is ignored.  If HISTCONTROL is
    unset, or does not include a valid value, all lines  read  by  the  shell
    parser are saved on the history list, subject to the value of HISTIGNORE.
    The second and subsequent lines of a multi-line compound command are  not
    tested,  and are added to the history regardless of the value of HISTCONTROL.

So put the following line in your ~/.bashrc:

export HISTCONTROL=ignoreboth:erasedups

To uniqely record every new command is tricky. First you need to add to
~/.profile or similar:

HISTCONTROL=erasedups
PROMPT_COMMAND='history -w'

Then you need to add to ~/.bash_logout:

history -a
history -w


My system takes too long to boot is there a fix? i just installed Ubuntu 11.04 fresh install with Windows 7 already installed.. when i chose ubuntu from the grub menu it shows the purple screen for too long with no activity from the laptop then after a while it boots normally. Is there a fix for that because really it takes tooooooo long.

dmesg reports the following:

[    3.078617] IP route cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    3.080423] TCP established hash table entries: 524288 (order: 11, 8388608 bytes)
[    3.084959] TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)
[    3.085502] TCP: Hash tables configured (established 524288 bind 65536)
[    3.085506] TCP reno registered
[    3.085524] UDP hash table entries: 2048 (order: 4, 65536 bytes)
[    3.085576] UDP-Lite hash table entries: 2048 (order: 4, 65536 bytes)
[    3.085736] NET: Registered protocol family 1
[  150.340039] pci 0000:00:13.5: EHCI: BIOS handoff failed (BIOS bug?) 01010001
[  150.340069] PCI: CLS mismatch (64 != 32), using 64 bytes
[  150.340088] pci 0000:01:05.0: Boot video device
[  150.340698] PCI-DMA: Disabling AGP.
[  150.340825] PCI-DMA: aperture base @ cc000000 size 65536 KB
[  150.340827] PCI-DMA: using GART IOMMU.
[  150.340831] PCI-DMA: Reserving 64MB of IOMMU area in the AGP aperture
[  150.344449] Simple Boot Flag at 0x44 set to 0x1
[  150.344892] audit: initializing netlink socket (disabled)
[  150.344906] type=2000 audit(1304603463.330:1): initialized

Googling around, various reports mention that it may be due to a USB issue with your BIOS.

Suggestions range from

Remove all USB devices to see if its resolved
Disabling USB legacy in the BIOS
Upgrade the BIOS to the latest firmware

However, I note the next item in your trace log is AGP - so possibly an issue with the video card?  Are there any options in your BIOS which you can play with that relate to AGP/video card?

Suggest have a go with the above and report back.

I had problem with login and boot time also, reason was in xorg.conf file configuration
Problem was coming from synaptics touchpad, where the special .conf file was created to make a scrolling work.

Below is outtake from launchpad bug report my comment, how I made scrolling work
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/565543

  It was annoying to be without scrolling, so created a file with name psmouse.conf in:

  /etc/modprobe.d

  with text inside:

  options psmouse proto=imps

  Saved and run through commands:

sudo modprobe -r psmouse
sudo modprobe psmouse

  After this my ALPS is detected as ImPS/2 Generic Wheel Mouse, but scrolling is working

After making this, I totally forgot about xorg.conf, that I had a Section InputDevice with assigning a driver to my touchpad, what was creating and error, because after making scrolling to work my touchpad was recognized as imPS2 mouse, but not as Synaptics Touchpad... so it was causing the long LOGIN time and partly a boot time

X was trying to find Synaptics Touchpad but there was imPS assigned Physically, so this so to speak searching time made an interface to stuck...

Solution

Simply comment out Section InputDevice and InputeDevice in Server Layout in xorg.conf

It solved the problem in my case, hope it will help someone


Output only MAC address on Ubuntu In Ubuntu, with command ifconfig -a, I obtain all the information about my ethernet/wifi interfaces.

But I need to obtain as output only the MAC address, like:

ab:cd:ef:12:34:56
57:89:12:34:ac:23
12:34:56:ab:cd:ef

How can I obtain this?

You can access the address file for each device on the /sys virtual filesystem. The MAC address should be in /sys/class/net/<device-name>/address:

$ cat /sys/class/net/enp1s0/address
34:17:eb:5d:88:7c

For all devices:

$ cat /sys/class/net/*/address
34:17:eb:5d:88:7c
00:00:00:00:00:00
64:5a:04:69:50:45

ifconfig -a | grep HWaddr | awk '{print $5}'

If your system output is non-English in this command, then it makes sense to run it this way.

LANG=C ifconfig -a | grep HWaddr | awk '{print $5}'

This is applicable to all solutions.


How to remove a user from a group? I added a user account to the admin group and discovered I added wrong user. So I now have to remove the account from the admin group.

How can I remove an account from a group without deleting the user?

Portablejim's answer is accurate but dangerous -- if you typo something, your system may be unusable, especially if you alter the admin group improperly.  If you must edit the groups file, use the vipw -g or vigr commands, which verify the syntax before saving.  Even then, there are better ways.

From a commandline, the one you probably want to use is the following (as root):

deluser <username> <groupname>

This will remove the specified user from the specified group. You must relogin to see the effect. It will not delete the user, or the group, just the membership.  There are also ways of doing it with the usermod command, but it's harder to use as you need to replace the entire list of groups for a user in order to remove a single group.  The gpasswd command is also capable of doing this (as sagarchalise points out), but is mostly deprecated. As always, see the man pages for more details.

See zanfur's answer.

Edit the /etc/group file as root (i.e. gksudo gedit /etc/group) and remove the username from the line that starts with 'admin'

i.e.

...
admin:x:120:adminuser,adminuser2,userthatshouldnotbeadmin
...

becomes

...
admin:x:120:adminuser,adminuser2
...

Be warned, typos within the file could break your system.


Ubuntu 16.10 NVIDIA OpenCL? I have a brand new install of Ubuntu 16.10.  I want to test against the NVIDIA version of OpenCL (I need portability across devices).  So, I installed the CUDA toolkit via

sudo apt-get install nvidia-cuda-toolkit clinfo

However, when I run clinfo all I get is:

Number of platforms:            0

I have also tried to find the libOpenCL.so shared object, but I cannot find it anywhere. Any insight?

EDIT

The output of sudo lshw -C display

  *-display
       description: VGA compatible controller
       product: VirtualBox Graphics Adapter
       vendor: InnoTek Systemberatung GmbH
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 00
       width: 32 bits
       clock: 33MHz
       capabilities: vga_controller bus_master rom
       configuration: driver=vboxvideo latency=0
       resources: irq:18 memory:e0000000-e0ffffff memory:c0000-dffff

You will notice that this is a virtual machine.  This is where I prototype everything and have done previous work with CUDA before on older OS (e.g 14.04).

Make sure you are using the NVidia proprietary driver. Then installing nvidia-opencl-dev and nvidia-opencl-icd-xxx where xxx correspond to the driver version you are running should be fine. That worked for me on 16.04


Recursive grep fails for *.c files I tried to recursively search a pattern in all the .c files in the following way

> grep -lr search-pattern *.c

But got this as the output

> grep: *.c: No such file or directory

When I use this:

> grep -lr search-pattern *

I get plenty of . c files in the directories with the pattern.

What is wrong with the earlier expression?

I suggest to use the --include option of grep:

grep -lr --include='*.c' search-pattern .

I know this is a rather old thread, but since I had the same question, I wanna share my preferred way of acheiving the same, In a much shorter form.

ls | grep "file.*.c"


How heavy on resources is Cinnamon desktop environment? I have a 1GB RAM PC running Lubuntu. In Xubuntu is still ok, but in KDE and Unity it is not. (The condition of my PC appears clearly in this answer).

Compared to these DE-s, where stands Cinnamon? I am in the mood to try it but I thought maybe to ask first :)

Cinnamon vs...
I haven't found anyone who has done a direct Cinnamon vs anything else resource usage study.
Its arguable that Phoronix has done the closest to this looking at the performance comparison between gnome-shell (Mutter) & unity (compiz) using both NVIDIA and ATI graphics. They have also looked at battery usage between Gnome, KDE, LXDE and XFCE.
Since Cinnamon's Muffin is a fork of Mutter - you should perhaps assume the performance and resource usage will be similar or the same i.e. you could argue there is a direct read-across for the Gnome results to Cinnamon.
My reading of the results - and making the assumption that better performance is equivalent to less resource usage for the same work - is that gnome-shell and unity were equally resource hungry.  Thus expect Cinnamon and Unity to be similar.
Results varied depending on the actual graphics card - when using NVIDIA drivers, these were equally resource hungry, whereas gnome-shell using ATI was more resource hungry than Unity.
Thus - you should expect Cinnamon to have the same resource profile as Gnome-Shell.
The study also revealed KWin trumped both Mutter and Compiz - LXDE and XFCE trumped these all.
Usual caveats should apply when trying to interpret Phoronix results & methodologies - arguments should be directed to the Phoronix forums!

No, in general, IMO, your performance is not dependent on the Desktop environment. I advise you use the one you like.

Performance can be affected by hardware drivers, most common video and wireless. It is also dependent on what services you are running in the background and what applications you use.

IMO, The Desktop environment matters least.


VLC in Xubuntu 15.04 I am trying to install VLC on Xubuntu 15.04 (clean installation), however I am getting this error:

 vlc : Depends: vlc-nox (= 2.2.1~trusty) but it is not going to be installed
       Depends: libfreerdp1 (>= 1.0.1) but it is not installable
       Recommends: vlc-plugin-notify (= 2.2.1~trusty) but it is not going to be installed
       Recommends: vlc-plugin-samba (= 2.2.1~trusty) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

when I try to install vlc-nox as well it adds even more depencies

 vlc-nox : Depends: libavcodec54 (>= 6:9.1-1) but it is not going to be installed or
                    libavcodec-extra-54 (>= 6:9.18) but it is not going to be installed
           Depends: libavformat54 (>= 6:9.1-1) but it is not going to be installed
           Depends: libdvbpsi8 (>= 1.0.0) but it is not installable
           Depends: libgcrypt11 (>= 1.5.1) but it is not installable
           Depends: libgnutls28 (>= 3.2.10-0) but it is not installable

How can I get it work?
Thanks

Please try to remove and install it again

to remove the vlc

Sudo apt-get remove vlc

to install it again

sudo add-apt-repository ppa:videolan/stable-daily
sudo apt-get update
sudo apt-get install vlc

to install extra packages for VLC

sudo apt-get install libavcodec-extra-53

check and advise with the output


User account doesn't display anything except background and cursor I did something in CompizConfig Manager and the launcher and other bars was gone!

I tried using the set background from right click menu and checked if it was a driver problem, but it was not.
I also tried keyboard shortcuts for terminal etc. but none worked.
I switched my PC off and logged in with standard user which doesn't have a password and it worked completely.

So I went back to the account with problem (admin) and made it a standard user and the other user an admin but I forgot to set a password for the other account.

Now I can't do anything in the other account because it requires admin password and my not working admin's user password doesn't work, and the other user which I made admin doesn't have a password so I can't do anything like access hard drive to save my user files to windows partition, delete account, delete compiz etc.

Your original problem could have been solved by opening a terminal and issuing the command:

unity --reset

It's likely that your easiest course of action at this point is to:

Boot from live installation media (CD/DVD/USB)
Select "Try Ubuntu without making changes to your computer"

Mount the drive that contains your user files, back them up by copying them to the aforementioned windows partition or other available media as desired.

Reinstall.

In future, I highly recommend backing up regularly and prior to making any changes to your system.

I fixed the problem. I somehow deleted unity. Reinstalled unity and used setsid unity to fix!


Unable to connect the weak wifi signal to Ubuntu 16.04 I have Ubuntu 16.04 installed in my computer, I have Broadcom Wifi in my computer. This wifi is not able to connect to the weak wifi signals around the computer, these are connected by my friends' laptops having Windows and my Smart Phone can too connect to the wifi, but my laptop cannot connect to those signals, in my hostel given to the students.

For the PC, info i ran command

sudo lshw -c network

and the output was:

*-network
       description: Wireless interface
       product: BCM43142 802.11b/g/n
       vendor: Broadcom Corporation
       physical id: 0
       bus info: pci@0000:06:00.0
       logical name: wlp6s0
       version: 01
       serial: ac:d1:b8:ca:93:d5
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet  physical wireless
       configuration: broadcast=yes driver=wl0 driverversion=6.30.223.248 (r487574) ip=172.16.14.193 latency=0 multicast=yes wireless=IEEE 802.11abg
       resources: irq:18 memory:f7200000-f7207fff

and the driver information i got from the the settings is given under:

Please help me I initially had Ubuntu 14.04, same problem was there then I washed it and newly installed Ubuntu 16.04, the problem continues here too.

And at my home, we have a good wifi, strong signal, it connects easily.

So please help me.

I've been using Linux for a while in many multiple computers, work, home, the laptop I got from work, girlfriend's computer... And I never had a worse experience than with the Wifi card you have. My employer gave me a Dell Vostro 3306 if I recall correctly, which had this card.

The solution I found was simply to change the Wireless adapter. I tried many things, different drivers, distros and approaches; and I ended up using a card from a dead notebook. Replacing the Wifi card is very easy, so don't be afraid. Trust me, you'll save a lot of time by using a different card, and they are not expensive.

If you remind me later, I can send you the models I have in my 2 laptops, which work great in Linux, without any strange setup.

Maybe this is not what you were expecting as an answer, but at least will help you save time -or invest it in the right things.

Good luck!

I am using Ubuntu 15.10. I too had this same problem. The only solution that worked for me is to change the network driver.

Try this ...

https://github.com/lwfinger/rtlwifi_new

download the zip file and unzip it.

In the unzipped folder,right click and select open in terminal,Then enter the following commands

make
sudo make install
sudo modprobe -rv rtl8723be
sudo modprobe -v ips=0 ant_sel=0
echo "options ant_sel=2" | sudo tee /etc/modprobe.d/rtlbetcoex.conf

Then reboot the system.. and it should work.
I tried it and it worked for me. Good luck


Ubuntu 13.04 Wifi is connected but doesn't work after a while I run ubuntu server 13.04 with kernel 3.8.0. My wireless card is "Intel Corporation Centrino Advanced-N 6205". The loaded module for this card is iwlwifi.

In the past I simply used the /etc/network/interfaces and wpa_supplicant combo. Then the problems began. I'm connected to my access point but after a short while network communication doesn't work, I even can't ping anything. Then I switched to network manager but it didn't helped anything.

This problem only appears at my home network. I have a d-link wireless router.

And I didn't had the problems when I started to use ubuntu. They appeared at some point but I can't remember whether their was any special event before it began.

Any hints?

check ifconfig output when you dont have connection. Then if you see wlan0 interface and ip address on it try to ping your gateway. If you cant - see the otput of arp -n. If there is no record for your gateway ip address then try to reestablish wireless connection. Repeat all this if you dont have connection. If it is the same try with another router or change the configuration of your router - wireless mode b/g/n , channel number etc.. if the problem persists try changing your router.

Solution/fix and it's a permanent.

Type in command line:

sudo modprobe ath5k nohwcrypt
sudo sh -c "echo 'options ath5k nohwcrypt' >/etc/modprobe.d/custom-wireless.conf"


Ubuntu 18 terminal not opening I just installed Ubuntu 18 on my desktop PC alongside Windows 10 and have been using Ubuntu without any problems for a couple of days. Today, when I booted up my computer, I am no longer able to open the terminal at all. I've tried restarting it multiple times, but it still won't work. If I click the terminal icon on my task bar, nothing happens. If I try opening the terminal with CTRL+ALT+t, it still doesn't work.

How can I resolve this?

I had the same problem. After updating Python to version 3.7, some applications like Jupyter Notebook, Meld and the terminal, did not launch.
The problem was that the symbolic link to python3.4 was lost. Reinstalling python3-minimal solved it:
sudo apt-get --reinstall install python3-minimal

You can use ctrl+alt+F1 up to F6 to open multiple terminals in text mode. If you want to return to GUI press ctrl+alt+F7.


How to reset Ubuntu Fonts? Possible Duplicate:
  Reset gnome font configuration?

I've just followed some advice on askubuntu and installed gnome-shell over lubuntu. Everything went smooth, apart from the fonts that look different and ugly (as in some java programs).
I've tried with xubuntu and it's the same.
Is there a way to fix this?

Try the gnome tweak tool, open up your terminal and type.

sudo apt-get install gnome-tweak-tool

When it has finished just type .

gnome-tweak-tool

From the menu select fonts and try some combinations until you are happy with the look. The original setup would have been.

Default font -> Ubuntu

Monospace font -> Ubuntu Mono

Go to gnome settings application. There choose the fonts section. From here you can tweak the appearance of fonts.


Installing Kubuntu or Gnome3 on ubuntu I am using Ubuntu 14.04. I like default unity desktop environment, but now I want to try Kubuntu.
So please tell me a way to do that.

I should have options for choosing which desktop environment to start at log in screen as i do not want to replace unity with KDE.
So please help me...
Thanks in advance!!!!

for Kubuntu:

sudo apt-get install kubuntu-desktop

EDIT: for gnome3

sudo add-apt-repository ppa:gnome3-team/gnome3-staging
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install gnome-shell ubuntu-gnome-desktop


14.04 /etc/hosts ignored I have added a line like the following to my /etc/hosts file:

159.253.x.xxx www.***.nl

When I ping to www.***.nl it gives me the correct ip address back but when I use my browser I do not get to 159.253.x.xxx (which is my development server containing a copy of the actual site).

My question is, how do I solve this?

I'm running Ubuntu 14.04.

Until and unless a website is hosted on a dedicated IP, you will never be able to reach the website/domain by typing in the IP in the address bar even though you will be able to ping the ip address. This is the reason, Hosting companies are able to host thousands/millions of domains on a single IP via shared hosting plans and as a result the hosting charges are less.


Sudoers file, enable NOPASSWD for user, all commands Preface
This is a fairly complex question related to the Sudoers file and the sudo command in general.
NOTE: I have made these changes on a dedicated machine running Ubuntu Desktop 13.04, that I use purely for learning purposes. I understand it's a huge security risk to enable NOPASSWD sudo.
Question
Initially, my only change to the sudoers file (/etc/sudoers) was one line, a user specification that should have enabled 'nicholsonjf' to run all commands with sudo without having to enter a password (see the line that starts with 'nicholsonjf'):
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults        env_reset
Defaults        mail_badpass
Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL:ALL) ALL
nicholsonjf    ALL=NOPASSWD: ALL

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d

However, this did not work, and I was still prompted for my password every time I ran a command as 'nicholsonjf'. I was only able to start running sudo commands as 'nicholsonjf' once I removed 'nicholsonjf' from the sudo and admin groups.
Can anyone explain why this worked?
Is it because the user 'nicholsonjf' was inheriting sudo rights from the two group specifications of 'admin' and 'sudo' (seen below in the sudoers file), which were overriding the 'nicholsonjf' user specification because they were further down in the config file?

The line you added was overridden. From man sudoers:

  When multiple entries match for a user, they are applied in order. Where there are multiple matches, the last match is used (which is not necessarily the most specific match).

In your case nicholsonjf was a member of the group sudo so for him this line applied:

%sudo   ALL=(ALL:ALL) ALL

If you want to override entries in /etc/sudoers just put the new entries after them.

The new entry should look like

myuser ALL=(ALL) NOPASSWD: ALL for a single user, or

%sudo  ALL=(ALL) NOPASSWD: ALL for a group.

As I was researching this, I realized that there's a line in the /etc/sudoers file that is not a comment, but a directive that makes any file or folder under the directory /etc/sudoers/* override the contents of /etc/sudoers.

This is a sneaky little directive, as it appears to be a commented line upon first glance. It looks like this:

#includedir /etc/sudoers.d

This is how I've implemented the non-root, passwordless user in an ephemeral Docker Image for use in a CICD pipeline with the base image of ubuntu:18.04:

RUN \
  useradd -U foo -m -s /bin/bash -p foo -G sudo && passwd -d foo && passwd -d root && \
  sed -i /etc/sudoers -re 's/^%sudo.*/%sudo ALL=(ALL:ALL) NOPASSWD: ALL/g' && \
  sed -i /etc/sudoers -re 's/^root.*/root ALL=(ALL:ALL) NOPASSWD: ALL/g' && \
  sed -i /etc/sudoers -re 's/^#includedir.*/## Removed the #include directive! ##"/g' && \
  echo "Customized the sudoers file for passwordless access!" && \
  echo "foo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
  echo "root ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
  echo "foo user:";  su foo -c 'whoami && id' && \
  echo "root user:"; su root -c 'whoami && id'

What happens with the above code:

The user and group foo is created.
The user foo is added to the both the foo and sudo group.
The home directory is set to /home/foo.
The shell is set to /bin/bash.
The sed command does inline updates to the /etc/sudoers file to allow foo and root users passwordless access to the sudo group.
The sed command disables the #includedir directive that would allow any files in subdirectories to override these inline updates.


Version 14.04 crashes too often I just did the upgrade from version 12.04 to 14.04 and immediately had some problems.

Whenever I try to open certain webpages using Firefox or Chrome, the screen just freezes. Mouse and keyboard are not responding and shortly after that system automatically logs out.

It's especially problematic with Firefox. Most of the time it freezes right after the launch.

Couple of other programs I have used so far seem to work fine.

I examined the error messages and it seems that there is something going on with Xorg. But I have no idea how to fix it.

Any ideas?

UPDATE:

So far I've noticed that only the Firefox and Chrome are causing the crash (haven't tested the Opera yet). All the other applications (termial, gedit, Virtualbox, qFTP etc...) seem to run smoothly.

I tried to remove the Firefox and install it again, but it didn't solve the problem.

On one occasion, when the crash happened, similar message was shown on the screen:

INFO: task Xorg:2746 blocked for more than 120 seconds.

So I'm not sure whether or not the Xorg is responsible.

Use command of "software-properties-gtk -open-tab=4" to change the your graphic card driver (called as restricted drivers)

rm -fr ~/.mozilla and then try run firefox again!

~/.mozilla is firefox user data folder including personal input info and your own plugins, removing will let you run firefox from zero configuration, just like you run firefox at first time


Accidentally deleted icons in /usr/share, how do I get them back? okay, so tyeing to type "icons" in the /usr/share/ directory, hit the delete key as root, now my icons are gone, all of them, the options for play in totem or the ones on the desktop....all of them, any help?

I like Bash porn so I wrote you a present:

for p in `dpkg -l | awk '/^ii  [^\ ]+/ {print $2}'`; do
    if [[ $(dpkg -L $p | grep /usr/share/icons/) ]]; then
        echo $p;
    fi;
done

That echos out all the installed packages that had files in /usr/share/icons/. If that works for you (it does for me) you can replace the echo statement with:

        sudo apt-get --reinstall install $p

It's going to use a lot of bandwidth and whatever you do, don't interrupt it, but it should get you all your packaged icons back.

Of course you can reverse that logic so you use something like this:

sudo apt-get --reinstall -s install $(for p in `dpkg -l | awk '/^ii  [^\ ]+/ {print $2}'`; do if [[ $(dpkg -L $p | grep /usr/share/icons/) ]]; then echo $p; fi; done)

The -s in there means simulation mode. That command won't actually do anything unless you remove the -s, it'll just show you what it would do. I'd probably recommend that before you jump in.

As Andrea points out dpkg -S can do all this on its own. Plus it's much quicker.

sudo apt-get -s --reinstall  install `dpkg -S /usr/share/icons/ | sed 's/,//g; s/\:.*$//'`

Accidentally deleted icons in /usr/share, how do I get them back?

Steps:

Go to rescue mode  before booting os in linux.  You will get command prompt. #
Install gnome* packages , icon* packages and tweak packages.
Reboot machine

That's all . It worked for me in federo :)


How can I play DirectX 10 games with an HD6450 video card? My question would be about video card compatibility with DirectX 10. I wanted to play a game (Star Trek Online) with Steam, but after loading it says my Radeon HD6450 2 GB video card is not compatible. Meanwhile with Windows it does work. Thanks for any helpful suggestions.

The message says:

Unsupported DirectX Version
Support for the Video Card you are using has ended. You will be unable
to play using this Video Card. Please upgrade your Video Card to one
that supports DirectX Hardware Feature Level 10.0 or higher; See you
Video Card manufacturer's documentation for information on DirectX
Hardware Feature Level support.

AMD's 32-bit Ubuntu drivers are found here and 64-bit Ubuntu drivers are found here.  Sadly, AMD has not kept up with the times and those are v14 drivers, last updated four (4) years ago, for an eight year old card design.

Therefore, I would recommend making sure the old AMD drivers are removed, and using the CAICOS version of the Open Source drivers.


I can't boot after upgrading to 16.04 (from 14.04) I updated to Ubuntu 16.04 from 14.04 and I can't boot. It gets stuck at the loading screen (plymouth) and doesn't do anything.

I searched and it can be fixed installing or reinstalling some video drivers and removing plymouth, but I can't do that because apt is also broken! It says

relocation error: /usr/lib/x86_64-linux-gnu/libapt-pkg.so.5.0:
 symbol _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareERKS4_,
 version GLIBCXX_3.4.21 not defined in file libstdc++.so.6
 with link time reference.

How can I fix this? Also, when I was upgrading it said something about not being able to process a package named click.

Had a similar problem on a Dell Latitude 5450.  It stalled at the Plymouth splash screen every time.  My guess is that Plymouth depends on an Nvidia driver that wasn't installed with 14.04 since the Latitude is Intel Skylake architecture.

After hours of trying every bit of advice I could find without success, I booted 16.04.1 as a trial from the USB stick.  Since it logs in as root, I could mount a spare external USB hard drive and copy the entirety of the laptop's /home directory structure to it.  I then repartitioned the internal drive, did a clean install of 16.04.1 on it without problems using the same user id, then copied the external /home back over the internal one.

Had to reinstall a bunch of apps.  Everying but Pithos picked up configuration data from the long gone 14.04 /home and came right back just as I had left it - Pythos did too, but choked on it and a file in .config had to be deleted.  It took about 2.5 hours of copying which could have been halved had my grsync backup been just before I accepted the upgrade rather than 2 days before.  Won't make that mistake again!

Download boot repair disk from here on sourceforge

Create a bootable disk or usb media
Boot up with Ubuntu repair disk
Connect to internet
Follow the instruction
Click on recommend repair option.

Wait till the process is completely finished.

Shut down the system.
Remove Ubuntu repair disk/usb.
Boot into Ubuntu.

Ubuntu will start normally if the Ubuntu repair disk resolved the error.

I have resolved the same problem using this Ubuntu repair disk.


Login freeze after update to 20.04 I have just upgraded from 18.04 to 20.04 on a Dell XPS 9560. The login screen was frozen and with no response on input from the mouse or keyboard.
I have booted using a recovery mode option and purged nvidia* and now I am able to log in. I can successfully login only to Ubuntu on Wayland.
If I login to regular Ubuntu, my computer freezes again immediately. On tty or Wayland, should I install nvidia drivers again (tried nvidia-440 and nvidia-435), I cannot even log in again.
I've also tried adding nouveau.nomodeset=0 to GRUB_CMDLINE_LINUX_DEFAULT, but it made no difference in my case.
I would really appreciate any advice.

If you choose to use proprietary binary drivers (as the nvidia-* drivers are) then you really need to approach NVIDIA to get support for them. The drivers are completely outside of the Linux kernel, and so kernel developers and Linux distributions like Ubuntu shouldn't provide end-user support for them.

That said, if you want to go down this path, you'll need to ensure the version of nvidia-* binary drivers which you install provides support for the Linux 5.4 kernel shipped in Ubuntu 20.04.

To install the latest NVIDIA proprietary drivers, you may need to disable the open source drivers first on boot:

Boot the computer and hit the Shift key to bring up the GRUB boot menu. Highlight the Ubuntu entry in the GRUB boot menu and press the E key.

Add nouveau.modeset=0 (you should use this instead of instead of nouveau.nomodeset=0) to the end of the linux line - press F10 to boot.

On the login screen press Ctrl+Alt+F1

Enter user name and password - execute:

sudo apt-get update
sudo apt-get install nvidia-driver-440
sudo reboot

Generally it is recommended to use the NVIDIA drivers from the restricted Ubuntu repositories. This package was only updated for Ubuntu 20.04 two days ago (22 April 2020), so it's quite bleeding edge, and might be why your prior testing with a nvidia 440+ series did not work.

Alternative

As you have to find NVIDIA drivers (440.31+) which support the Linux 5.4 kernel shipped by Ubuntu, you could also install the latest official NVIDIA drivers.
The xorg-edgers PPA does not provide the drivers anymore and was replaced by GPU Drivers PPA.

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

After the installation adding the kernel parameter nouveau.modeset=0 is not necessary anymore.

Before dancing around with NVIDIA driver versions, check if your computer BIOS version is not too old.
Particularly for my Dell Vostro 5459 laptop with NVIDIA 930M GPU and stock BIOS version 1.0.4, after upgrading Linux Mint from 19.3 to 20 (based on Ubuntu 20.04 LTS), it refused to work with any NVIDIA driver version and froze with black screen on boot. Fresh Linux Mint 20 reinstall didn't helped as well.
I noticed that BIOS version for Vostro 5459 was updated to 1.1.1 and decided to upgrade it. After the BIOS upgrade, the NVIDIA driver instantly came alive.


Ubuntu 14.04 stuck on shutdown When I try to shut down my computer, it hangs at the shutdown screen and these are the only lines I can see:

wait-for-state stop/waiting
Stoping GNUstep distributed object mapper: gdomap.
* Stopping rsync daemon rsync [ OK ]
* Stopping Speech Dispatcher speech-dispatcher [ OK ]

And thats all.

I'm using gnome 3.10 (had 3.12 but downgraded because of some problems) if it has something to do with that.

Rebooting the computer works; it doesn't hang.

In my case these simple steps worked for me fine:

Press Ctrl+Alt+T to go to a terminal and type:

sudo gedit /etc/default/grub

This will open the grub config file. Change the line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi=force apm=power_off"

Then save & close it.
Type in the same terminal:

sudo gedit /etc/modules

This will open the modules config, just add the following:

apm power_off=1

and save the file.
Next type in the terminal:

sudo update-grub

Source

I still have the same problem, despite following the advices,

Here is the output of

  sudo gedit /etc/default/grub

GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi=force apm=power_off"
#GRUB_CMDLINE_LINUX_DEFAULT="quiet splash reboot=bios"
GRUB_CMDLINE_LINUX=""

And output of

  sudo gedit /etc/modules

lp
rtc
apm power_off=1

Thanks,


My external hard drive won't mount. I am using Ubuntu 14.10 The error message is:

Error mounting /dev/sdb1 at media/dennis/TOSHIBA EXT :Command-line 'mount-t "ntfs"_o
"uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177"
"/dev/sdb1""media/dennis/TOSHIBA EXT"' exited with non-zero exit status13:$MFTMirr does not match $MFT(recordo).

Failed to mount '/dev/sdb1':Input/output error

NTFS is either inconsistent,or there is a hardware fault, or it's a
SoftRAID/FakeRAID hardware. In the first case run chkdsk/f on windows then
reboot into windows twice. The usage of the /f parameter is very
important! If the device is a SoftRAID/Fake RAID then first activate it
and mount a different device under the /dev/mapper/directory, (e.g.
/dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation for more details.

(udisks-error-quark,0)

The third paragraph says NTFS is inconsistent, and tells you how to fix it with Windows. NTFS is a Microsoft secret that Linux can't fix.

Also see this answer.


How to fix "The system is running in low-graphics mode" error? Note:
This is an attempt to create a canonical question that covers all
instances of "low-graphics mode" error that occurs to a user,
including but not limited to installation of wrong drivers,
incorrect or invalid lightdm greeters, low disk space, incorrect
installation of graphics card like ATI and Nvidia, incorrect
configuration of xorg.conf file while setting up multiple monitors
among others.
If you are experiencing the "low-graphics mode" error when trying to
login but none of the following answers work for you, please do ask a
new question and then update the answers of this canonical question as
and when your new question gets answered.

When I try to boot into my computer, I am getting this error:

The system is running in low-graphics mode
Your screen, graphics cards, and input device settings could not be
detected correctly. You will need to configure these yourself.

How do I fix the failsafe X mode and login into my computer?

Answer index:

The greeter is invalid

Will try to answer the ones I can:

Assuming the answer by Jokerdino was already checked: The greeter is invalid

Issues with Nvidia or AMD/ATI graphics

This happens when a driver has a problem installing correctly (Most cases). For this do the following:

Boot PC leaving SHIFT pressed to make the GRUB Menu show.

Select Recovery Mode which will continue booting correctly until the Recovery Menu appeares.
Select from the recovery menu failsafeX.

In some cases failsafeX will load fine (You lucky dog), for others (Me) it will give  an error along the lines of "The system is running in low-graphics mode" and will stay there forever. When this happens, press CTRL+ALT+F1 to go to the terminal. Type in your Username and Password.

Reinstall the drivers depending on your case:

Nvidia

sudo apt-get install nvidia-current - More stable/tested version
sudo apt-get install nvidia-current-updates - More up-to-date version

For other cases see this answer for details and follow the links there to help you along the way.
AMD/ATI

The simple way is to sudo apt-get install fglrx. If this does not work keep reading.

Go to AMDs support site and download the driver you need. (If you have a newer card, you may want to download be the latest beta driver instead of the stable one. You would need to compare release dates and read through release notes to find out which driver version supports which chips.) Put the downloaded driver in some folder and rename it to "amd-gpu.run" to simplify name. Go to the folder where you downloaded the file and type chmod +x amd-gpu.run to give it Executable Permission. Now just simply run ./sh amd-gpu.run and follow the onscreen steps.

After rebooting all problems should be solved. If you test 'Additional Drivers' with a problem like this it will finish downloading the package but then it will give an error. It also gives the same error if you use 'Software Center' and 'Synaptic'. The only way was to go to the failsafeX option and do the workaround about changing to the tty1 terminal and doing it via command line.

Note that if the problem occured after installing an unsupported driver from the amd site then you may have to first delete the driver you had installed. For this, run in the tty session (i.e) in the terminal screen you get after pressing CTRL+ALT+F1 :

sudo aticonfig --uninstall

(If this command didnt work then check this site . Look under the "Uninstalling the AMD Catalyst™ Proprietary Driver" heading.) After doing this, you may reboot with the command :

sudo shutdown -r now

Now you must get back access to the Unity desktop(Of course with the AMD driver uninstalled). Then you can get to this site which clearly helps in choosing the right AMD driver for your System specifications. Also read the release notes for the latest driver for your graphic card(Especially check if your system satisfies all the system requirements). Then after downloading your driver installer(the .zip file) get to this site and follow the instructions to install your driver. Your driver must be installed and it should work successfully.

I also need to add that I do not recommend downloading the Drivers from the Nvidia site since they:

 * Might create additional problems with Ubuntu
 * Are not updated automatically
 * Are not tested thoroughly in Ubuntu

Always use the nvidia-current package or the nvidia-current-updates one. These are tested and approved already for the Ubuntu version you are using and will give less errors and incompatibility bugs.

Issues with Intel graphics

For Intel it is recommended to do the following after doing all the steps mentioned above but before installing anything (When you are in the Terminal). You can choose Xorg-Edgers which is a PPA that brings many improvements, latest video drivers and more:

Warning: This PPA is very unstable for some things. So do it with that in mind.
 sudo add-apt-repository ppa:xorg-edgers/ppa -y

After that sudo apt-get update and you should receive several updates. X-Swat currently does not have Intel drivers in the latest versions of Ubuntu.

Update log

UPDATE 1: Added this extensive answer to solve many of the problems that might end with the error mentioned here: How do I install the Nvidia drivers?

UPDATE 2: AMD is no longer releasing (stable) graphics drivers on a monthly basis and not all graphics chips are supported by their Linux drivers upon product release. At the time of this update the latest stable driver is almost 5 months older than the latest beta driver. You should look at the release notes to check if there is a driver that supports your graphics chip and the software versions you are using (X.org xserver or Mir).

Like always please test and give feedback so I can enhance my answer since others will be also reading it. The better it is, the more people it will help.

I had a special case of this problem, where I somehow caused the removal of some packages. I only noticed the actual problem after some time spent looking at the problem.

So:

Log into the text mode console
Enter the command: sudo apt-get install ubuntu-desktop

This will ensure all the needed packages are installed. Without some of those, symptoms like those described here may occur.


How to replace Mutter with Compiz to enable Wobbly effect? I'm running Ubuntu 11.10 with Gnome shell, because Unity is too slow. Is there a way I can enable extra visual effects which I had in Lucid Lynx? How can I replace my Windows managers? I prefer to use Gnome 3 or Gnome classic if Compiz works.  Thanks!

From the Gnome 3 Myths page:

I can't use Compiz with GNOME Shell!
Because the GNOME Shell project wanted "tighter integration" between the panel and window manager than cooperating with the Compiz project would allow, this could actually be true. This mailing list post has more information.

Gnome Shell relies on Mutter to do its fancy work, just as Unity (3D) relies on Compiz. You can't mix and match unfortunately.
This might get fixed in time but I wouldn't hold my breath.

Gnome Classic does work with Compiz though. If you're happier with a panel-based setup and want the wobblyness, you can turn compiz on by running compiz --replace.
To turn on wobbly windows, I suggest you install compizconfig-settings-manager and then run ccsm to change the compiz settings. A word of warning: CCSM is a powerful tool without any safety latches. It's quite easy to break Compiz with it so if you do ever get stuck, you can reset your settings by running:
gconftool-2 --recursive-unset /apps/compiz

Just install Compiz from the Ubuntu Software Centre, and run compiz --replace. That should do (it if your hardware is supported).

You can open a Run dialog by pressing Alt+F2.


How do I restore .bashrc to its default? I've been trying to install Android developer tools on Eclipse, and I followed the information in this video.

Like the video said, I added the following two lines of code to the .bashrc file:

export PATH=$(PATH):-/android-sdk/tools/
export PATH=$(PATH):-/android-sdk/platform-tools/

It seems, however, that this did not help me to install the Android files on Eclipse, as I am still having problems with that. What's more, it seems that I can't make any command in the terminal without getting a major error now! Every time I try to make a command in the terminal I get the following message:

  The command could not be located because '/usr/bin' is not included in
  the PATH environment variable.

Is there away to restore .bashrc to its default?

Idea: There exist backup copies of .bashrc, .profile etc. in /etc/skel/. So one could replace a corrupt .bashrc simply by overwitting from there.

Caution:  if you replace the .bashrc file with a fresh one, it will remove any other modification(s) you have made to it. For example, one could add aliases, custom function or PATH in .bashrc. When you replace the file, all those modifications will be lost. Better you can keep a copy of your modified .bashrc before replacing it. Later, you can carefully extract the required part from it. To keep a backup copy of your modified .bashrc in your home directory with name my_bashrc use the following in a terminal,

/bin/cp ~/.bashrc ~/my_bashrc

Why /bin/cp: In case if you have messed with your $PATH variable when changed ~/.bashrc all the executable will be unavailable from your terminal and cp will not work anymore. So it is recommended to call cp with its full path as /bin/cp while you are trying to copy something with corrupt ~/.bashrc.

Finally, use the following command in your terminal to replace the ~/.bashrc with a fresh copy,

/bin/cp /etc/skel/.bashrc ~/

It will replace your corrupt ~/.bashrc with a fresh one. After that, you need to source the ~/.bashrc so that the change takes place immediately, write in the terminal,

. ~/.bashrc

or,

source ~/.bashrc

or, if that does not work you can close the terminal and open it again.

I tried the above answers, but for some reason my /etc/skel/ directory did not have the correct files in it.

I found a copy of the default ~/.bashrc file on this GitHub Gist by Mario Bonales. The full script is copied here for completeness.

# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace

# append to the history file, don't overwrite it
shopt -s histappend

# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
    debian_chroot=$(cat /etc/debian_chroot)
fi

# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
    xterm-color) color_prompt=yes;;
esac

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

if [ -n "$force_color_prompt" ]; then
    if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
    # We have color support; assume it's compliant with Ecma-48
    # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
    # a case would tend to support setf rather than setaf.)
    color_prompt=yes
    else
    color_prompt=
    fi
fi

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

# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
    PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
    ;;
*)
    ;;
esac

# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
    test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
    alias ls='ls --color=auto'
    #alias dir='dir --color=auto'
    #alias vdir='vdir --color=auto'

    alias grep='grep --color=auto'
    alias fgrep='fgrep --color=auto'
    alias egrep='egrep --color=auto'
fi

# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'

# Add an "alert" alias for long running commands.  Use like so:
#   sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'

# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.

if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
    . /etc/bash_completion
fi


How can I backup VPS server while it is running? I am using debian and ubuntu on my vpses. How can I backup my vpses while they are running? And how can I restore on any emergency?

If you've got a good deal of time on your hands, and can leave your system online, you can do a remote rsync down to your system.

rsync --recursive --progress user@host:sourcedir /path/to/save/backup/on/local/machine

That should do what you want, but it'll take up a ton of space on your computer, because its literally a copy of the data on your VPS.  Note you might want to run this with the root user, if you want a total copy.  Also, this won't preserve the permissions, it'll just give you a copy of the files.

About the Arguments Used Above
In case you're curious as to what the arguments for the rsync directory:

user@host:sourcedir:  user means the username to use on the VPS (in this case, probably root).  host means the connection address you use for your VPS.  sourcedir means the directory you want to copy from.  In your case of a full VPS backup, you would probably want this to be /.

/path/to/save/backup/on/local/machine/:  You've got several different options with where you want to store your backup when its on your local drive.  In any case, you will want to make sure you can access this, so you would probably end up with something like /home/user/VPSbackup/ where user is your local username on the local system (not on the VPS)

The --recursive argument will copy all files in every subdirectory from sourcedir.

The --progress argument will show you the progress of each file as its being downloaded (can be helpful in certain cases), because it can show you the time left to download each file (it'll flood your terminal screen, but that's not necessarily a bad thing if you want to see the progress).

Most  importantly...
BE VERY VERY VERY CAREFUL!
An rsync in which you switch the user@host:sourcedir and the /path/to/save/ arguments will OVERWRITE your VPS with old data or no data.  This can also lead to you breaking things if you specify the wrong /path/to/save/.

Take an LVM snapshot and back it up with dump.


PHP script not executing on Apache server I have just reinstalled Apache and PHP5 but when I visit my doc root it just downloads a "download" file. And when I try documentroot/index.php it just downloads the PHP file.

I have PHP installed but Apache doesn't seem to want to execute it.
People suggested adding a 'Load Module' line to my httpd.conf but I don't have that file.

Typing:

sudo apt-get install apache2 php5 libapache2-mod-php5

will install everything you need and will start the apache server with support for PHP.

To verify that the php module is loaded, type:

a2query -m php5

if not enabled, then load with:

sudo a2enmod php5

and restart apache:

sudo service apache2 restart

Update for php7.x (tested on Ubuntu 16.04, 16.10, 18.04, 18.10)

Thanks to the comments, I update the answer for php7.x.

Install:

sudo apt-get install apache2 php7.x libapache2-mod-php7.x

Verify:

a2query -m php7.x

Load:

sudo a2enmod php7.x

Restart apache:

sudo service apache2 restart

Open php.ini with nano in terminal:

sudo nano /etc/php/php5.6/apache2/php.ini

Then change:

short_open_tag = Off

to

short_open_tag = On

Then save and then restart apache2:

sudo systemctl restart apache2


How to start gnome-shell? I successfully installed GNOME 3 and GNOME Shell from the Launchpad PPA on my fully updated Natty test system. However, nothing I tried could get it to actually run.

If I selected it in the startup options, I got a plain light blue screen with absolutely nothing on it.

If I tried to start it using gnome-shell --replace, I got:

gnome-shell --replace &
[2] 3251
tim@nattytest:/usr/lib$ Traceback (most recent call last):
  File "/usr/bin/gnome-shell", line 705, in <module>
    normal_exit = run_shell()
  File "/usr/bin/gnome-shell", line 293, in run_shell
    if shell is None:
UnboundLocalError: local variable 'shell' referenced before assignment
/usr/bin/compiz (core) - Error: Screen 0 on display ":0.0" already has a window manager; try using the --replace option to replace the current window manager.

[2]+  Exit 1                  gnome-shell --replace

I also tried preceding that with metacity --replace, as suggested at ubuntuforums.com. But, I got the same failure.

I also linked /usr/lib/libmozjs.so to /usr/lib/xulrunner-2.0b12/libmozjs.so, which did not help either. No matter what I try, I get the same error messages.

Try installing xulrunner-2.0 manually and try invoking gnome-shell. That worked for me.
[Edit]
I am not sure if I noticed the fact that you tried creating a link to xulrunner.
I identified my problem using pdb (python debugger). If you are familiar with it, give it a shot.
I added these lines before the line where the error was thrown:

import pdb
pdb.set_trace()

Then basically walked through the code until I found that one of the dependencies (xulrunner) in my case was not installed. So I installed the missing dependency using synaptic. The problem may be that it requires a very specific version.

Hope this helps.

To start Gnome Shell, select your username in the login screen as you normally do to login. Next, click the arrow at the bottom of the screen where it says "Ubuntu Desktop" and instead select "Ubuntu Gnome Shell Desktop". Now enter your password and you'll be in Gnome Shell.

To return to Unity, select "Ubuntu Desktop" when you login. You can also try out "Ubuntu Classic Desktop" to get a desktop similar to previous Ubuntu releases.

Please do not set Gnome Shell in your Startup Options. You also shouldn't need to do anything with xulrunner.


Where is autostart in lubuntu 18.10? In previous versions it was located in:

~/.config/lxsession/Lubuntu/autostart

in 18.10 I can't find it.

What I want is to run a terminal command every time I login in lubuntu 18.10

For a GUI way, it's under Preferences / LXQT settings / Session Settings

Then pick Autostart on the left.

In Gnome Ubuntu 18.10 it's ~/.config/autostart.
Check it for LXDE.


Ubuntu 14.04 32bit OS with 4g physical ram and pae still shows 3.2g ram I upgraded 2gb memory to 4gb on Lifebook 6025. I followed instructions for pae to recognize the 4gb by doing

sudo apt-get install linux-headers-server linux-image-server linux-server
edit grub by adding forcepae -- forcepae
reboot

But still it shows the same as before with 3.2gb as below.

jmin@jmin-LifeBook-A6025:~$ free -h
             total       used       free     shared    buffers     cached
Mem:          3.2G       966M       2.3G        60M        51M       530M
-/+ buffers/cache:       384M       2.8G
Swap:         3.9G         0B       3.9G
jmin@jmin-LifeBook-A6025:~$ dmesg | grep -i pae
[    0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-3.13.0-74-generic root=UUID=2fca00b1-5199-4d2d-bb5f-9728c10d7a05 ro quiet splash forcepae -- forcepae vt.handoff=7
[    0.004596] PAE forced!
[    0.008000] PAE forced!

What am I doing wrong?  How can I make it use all 4GB memory?  Thank you.

Part of the memory is allocated to the on-board Video card. You may be able to adjust the amount of memory the card can use, in the system BIOS, but you will never see the full 4GB, as the video card must be allocated some amount. You could theoretically disable on-board video if your BIOS allows it, but then your system would have no video, as it's a laptop.

You do not need to force PAE to on. Ubuntu now only supports PAE for 32-bit Intel systems. So forcepae doesn't actually do anything, but give you some extra messages in the log about it being forced.

Installing the linux-image-server packages was also not necessary. You only seeing 3.2GB vs 4GB, is unrelated.

On my system, with Intel video, I have 32GB of RAM installed, which is  33554432 kilobytes, while free shows I have 31860640 kB total, which is 30.39 GB. Some of that difference is the allocated video memory, and some of that difference is the kernel memory.

Unfortunately, a 32 bit operating system can only address 4GB of memory. Your swap space and graphic memory space will be included in this address block, so you might only be able to see 3.2GB memory; if this is insufficient, I'd recommend using the x64 version of 14.04. I've had no problems with compatibility.


How do I enable a touchpad? I installed Ubuntu 11.10 several months ago, but I haven't found a proper way to enable the touchpad.

I once tried something I can't recall the name.

Does any one have any suggestions?

Update:
Here's what cat /usr/share/X11/xorg.conf.d/50-synaptics.conf shows:

# Example xorg.conf.d snippet that assigns the touchpad driver
# to all touchpads. See xorg.conf.d(5) for more information on
# InputClass.
# DO NOT EDIT THIS FILE, your distribution will likely overwrite
# it when updating. Copy (and rename) this file into
# /etc/X11/xorg.conf.d first.
# Additional options may be added in the form of
#   Option "OptionName" "value"
#
Section "InputClass"
        Identifier "touchpad catchall"
        Driver "synaptics"
        MatchIsTouchpad "on"
# This option is recommend on all Linux systems using evdev, but cannot be
# enabled by default. See the following link for details:
# http://who-t.blogspot.com/2010/11/how-to-ignore-configuration-errors.html
      MatchDevicePath "/dev/input/event*"
EndSection

Open the Software Center and search for synaptics, should have a couple of packages that after install should enable your touchpad.

I had the same problem on a Dell Inspiron 1545!


Double title bars/ Two title bars appear in Ubuntu 20.04 Everything was fine till I installed KDE desktop environment too, and that is when this started for me. (I installed KDE, so that i can use dark theme in my KDE apps like Kdenlive and Krita, as they were not available after installing 20.04) Gnome terminal, Nautilus, Ctrl+I, Properties have this problem. Maybe because they don't have such regular title bar by default. But now it is added/enabled because of something, KDE or GNOME extensions did. Did anyone find a solution? Check the image:

You can disable the secondary header as stated here by using:
gsettings set org.gnome.Terminal.Legacy.Settings headerbar false

Log out of your session and log back in for the setting to take effect.
I'm on ubuntu 20.04 LTS and it's works for me
PS: I noticed this after the installing of gnome-flashback

I solved my own situation with a little trial and error.
Installing gnome session and logging into it solved my problem. This gave me all gnome customizations I needed too.
sudo apt install gnome-session

 Now I can see 4 environments to choose while logging in. Click on the white circle which appears on bottom right corner of the login screen if you want to check how many you have. By default this is hidden, but it appears when we click on username to enter password.


Isn't open-source a two-edge sword? Possible Duplicate:
  Wouldn’t writing an open source program make it available for anyone to freely hack and exploit, thus making it less secure?

I know that ubuntu is an open source OS, which is a great thing because all people can contribute. However, doesn't this make it more vulnerable to hackers also, as they can alter the code in a malicious way more easily?

Do the code or updates undergo some review before being released to the public?
Thanks.

My understanding is that when an update is released, it is reviewed by the whole sayd community and then published. So i think it would be very hard to slip some bad code in when so many people who know their code, watch the code very deeply before it gets published.

Why it is a double-edged sword tough is that it's being developed by a big community who don't all work under one company with a single view on things. The devs here all have their own visions and everyone tries to push THEIRS through. So this basically makes the overall progress very slow.


I cant install Ubuntu alongside Windows 8.1 I have a computer running windows 8.1, and I want to install ubuntu along side of it. However, my computer has some corrupted system files on it when I bought it, so I took it into a local store to have them look at it. They re-installed windows 8.1. Its all been working fine, until I went to install Ubuntu. I cannot access my UEFI firmware settings menu to turn off secure boot. So i tried changing my boot mode, through BIOS, to UEFI from Legacy. This worked! Ubuntu booted up and I started the install process but when I got to the part where I tell it what partition on my hard drive to put it on, it shows one partition of my whole hard drive with the full terabyte available for storage. And that's not the case, there should be 3. My windows system reserved partition, my main windows partition, and the 85 gigabyte partition I made for Ubuntu.

I change my boot mode to UEFI and turn off secure boot, install Ubuntu, and then go back and install windows. This makes me uneasy though as I'm not sure everything would work.

The main issue that I've figured out, cause I posted over at reddit too, is that the partitions cant be seen by the installer and I don't want to only run Ubuntu

Go to disk management in windows and check for that extra storage place and if not of use then format it. After that you can proceed to installation.

If the problem persists please provide better insight to problem by errors prompted snaps, snapshot of the disk management from windows and fdisk command from live CD ubuntu.

You can use the Wubi Method Of Installation for installing Ubuntu alongside Windows 8/8.1. In this method:

Open the downloaded ISO file.
Run Wubi.exe.
Select the relevant options on the Ubuntu Installer Window that open.
Select "Reboot Now" and Click Finish.

For more details visit this link.


Cannot bootstrap due to clout-init "errors running cloud_config [final]: [scripts-user]" I have installed maas server and configured juju also, And bootstrapped juju for 1st time, which I know will install zookeeper on 1 "ready" state VM available in MAAS.

So I observed this installation, it installed OS and the rebooted and came to this screen  and since then its stuck,

Error command failed: cannot inject a machine without a instance id
errors running cloud_config [final]: [scripts-user]

What are these errors? How can I resolve them?
I am running 12.04.2 LTS, juju version is 1.13.1-precise-amd64 and maas version - 1.3.1

I also checked juju status -v, its gives following message continuously:

2013-08-08 16:31:17 INFO juju open.go:107 state: connection established
2013-08-08 16:31:17 INFO juju conn.go:64 juju: authorization error while connecting to state server; retrying
2013-08-08 16:31:17 INFO juju open.go:69 state: opening state; mongo addresses: ["pxp7m.master:37017"]; entity ""
2013-08-08 16:31:17 INFO juju open.go:107 state: connection established
2013-08-08 16:31:18 INFO juju open.go:69 state: opening state; mongo addresses: ["pxp7m.master:37017"]; entity ""
2013-08-08 16:31:18 INFO juju open.go:107 state: connection established
2013-08-08 16:31:18 INFO juju open.go:69 state: opening state; mongo addresses: ["pxp7m.master:37017"]; entity ""

This looks like an issue with finding appropriate tools.  The juju client you said you were using was 1.13.1, but the tools it is finding is for 1.10.  These will almost certainly not work.

There is a sync-tools command that will get the latest tools from the public location to put into the local tools bucket.

i have no clue how, i followed same procedure - which i was using earlier and did everything again from scratch (might 6th or 7th time) and it worked, but i am suspecting there were few updates in juju package this time, which might have resolved my issue.


How to make a custom keyboard layout? Can I create a new keyboard layout or add Unicode characters to my current keyboard layout in Ubuntu? I have found something called KMFL (Keyboard Mapping for Linux), however, I could not install it because I could not find the package ibus-kmfl.

Is there maybe an easier way create a new keyboard layout? Something as easy as the the Microsoft Keyboard Layout Creator?

See this link for custom keyboard layout definition


Can i use Ubuntu 11.10 for netboot? can i use an Ubuntu 11.10 for netboot over PXE? im aware of the LTSP and other similar proyects, but i dont find information using ubuntu 11.10 (the latest)

The short answer is basically yes (of course) :)

Without more information it's hard to give a better answer (do you want Ubuntu to be the PXE server? the clients? Ubuntu can trivially do both), but you probably want to start with something like this:

https://help.ubuntu.com/11.10/installation-guide/i386/install-tftp.html

I don't think it's really worth copying an entire "how to set up a TFTP server" here, the Internet is teeming with examples already.

yes, i am using ubuntu 11.10 on acer aspire one d257 and its working great


How to split larger files into smaller parts? I have a large file (8GB for Example). How can I split it into multiple parts, let's say 3 equal parts, and after that how do I integrate them later?

There are several ways to accomplish this. Let's start with the basic ones.
Using the split and cat commands:
Lets says I have an image and its too big (10MB). All I do is:
split --bytes=1M /path/to/image/image.jpg /path/to/image/prefixForNewImagePieces

and then to put it together I use cat:
cat prefixFiles* > newimage.jpg

For example:
Assuming am inside the folder where the image is:
split --bytes=1M myimage.jpg new

if the image is inside a directory called images you can also do this:
split --bytes=1M images/myimage.jpg new

If the image is inside the directory /home/cyrex/images you can do this:
split --bytes=1M /home/cyrex/images/myimage.jpg new

(In all the cases above it will split myimage.jpg in 1MB pieces and prefix the name of the pieces with the word new. So they would look like newaa, newab, newac, newad...)
If you are splitting a Text file and want to split it by lines you can do this:
split -l 1000 book.txt new

Which will split the text file in output files of 1000 lines each. This is another way to split a file and is mostly used for text files like logs, sql dumps, csv files, etc..
Then I merge them
cat new* > newimage.jpg

This is one way. You can even change the size of the splitted pieces. Just change the part that says --bytes=1M to --bytes=1K for 1 kilobyte or 1G for giga, or another number like --bytes=4K for 4KB pieces.
Using Nautilus
Another way is the compress option in the gui of Nautilus. It gives you an option to split the file or files you want to compress into smaller megabyte sizes. Its simple and easy.
Yet another way is using 7z
Assuming you have an ISO image called ubuntu.iso you could do this:
7z a -v5m -mx0 ubuntu.7z ubuntu.iso

This will create 5MB size files from the ubuntu.iso. The -v5m is the volume size so you can change it to 10, 12, 1, 3 and also the m can be changed to k for kilobytes, etc; the -mx0 switch tells 7-Zip to use no compression, that is, just to split data into parts.
To extract just do
7z x ubuntu.7z.001

this way you extract the first file and 7z starts extracting from the following files in order. You can also do
7z e ubuntu.7z.001

which has the same effect here.

WoodCutter

A free file split and merge utility developed in Java.
It is a small size application that allows a user to split any type of file in smaller sizes in KB, MB or GB.

It is available for Linux as well as Windows.

WoodCutter offers 3 ways of merging back the original files. WoodCutter creates a merge file which can be processed by the WoodCutter application to join all the files back. In case the receiver of split files does not have WoodCutter installed, then also the original file can be obtained as WoodCutter also creates a batch file and a Shell script file to merge the files back. The batch file will be used in Windows platform and Shell script will be used in Linux platforms.

http://java-puzzle.blogspot.com/2009/07/woodcutter.html


Stream files from FTP to DLNA We have a FTP server here in the dorm, and I would like to reach the files on it over DLNA with my TV. I am looking for a software that can do this.

You will need to run a DLNA server such as minidlna on the machine with the files you wish to access via DLNA. The FTP server is not necessary.

the app DLNAserver does perfectly the job. You acces the ftp server and the app translates the files on the ftp to DLNA and makes them accessable on any DLNA device, so also your TV. I have an ancient HD recorder with a hugh harddisk (2 terra) and ftp function, so I installed on my old smartphone from 10 years ago the app and it serves permanently as my dlna server and all my ftp files are everywhere available all the time on dlna. My kids love it to watch there cartoons. At the same time I gave my old phone a second useful life!


Can't install anything from software center I'm trying to install the Synaptic package manager, but the installation fails due to

Unable to install "Synaptic Package Manager": Error whiles installing package: trying to overwrite shared '/usr/bin/unity-scope-loader', which is different from other instances of package libunity9

The same error also comes up regardless of what program I try to install from the software center.

Have you tried to install from a terminal? open a terminal and type the command

sudo apt install synaptic

You will then be asked for password for authentication. Enter password and Synaptic will install. I believe you will find Synaptic easier to work with.
Software center seems to have issues in 16.04 as well.

Edit - after a bit of research (should have done in 1st place - sorry) I discovered the correct command to install from terminal. give this a try.


apt-get install -f errors Whenever I try doing

sudo apt-get install -f

I get this

dell@elliot:~$ sudo apt-get install -f
Reading package lists... Done
Building dependancy tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  linux-headers-4.4.0-31 linux-headers-4.4.0-31-generic linux-image-4.4.0-31-generic linux-image-extra-4.4.0-31-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libdbusmenu-qt5-2
The following NEW packages will be installed:
  libdbusmenu-qt5-2
0 upgraded, 1 newly installed, 0 to remove and 1262 not upgraded.
6 not fully installed or removed.
Need to get 0B/71,3 kB of archives.
After this operation, 227 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 300026 files and directories currently installed.)
Preparing to unpack .../libdbusmenu-qt5-2_0.9.3+16.04.20160218-1_amd64.deb ...
Unpacking libdbusmenu-qt5-2:amd64 (0.9.3+16.04.20160218-1) ...
dpkg: error processing archive /var/cache/apt/archives/libdbusmenu-qt5-2_0.9.3+16.04.20160218-1_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/x86_64-linux-gnu/libdbusmenu-qt5.so.2.6.0', which is also in package libdbusmenu-qt5:amd64 0.9.3+16.04.20160218-0ubuntu1
Processing triggers for libc-bin (2.23-0ubuntu4) ...
Errors were encountered while processing:
 /var/cache/apt/archives/libdbusmenu-qt5-2_0.9.3+16.04.20160218-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
dell@elliot:~$

Force overwrite

sudo dpkg -i --force-overwrite <archive_path>

Finish installing

sudo apt -f install

If you still have problems then execute whatever commands it presents to you afterwards.


Unity runs slow, how can I improve its performance? I like how Unity looks but I have 2 problems:

Unity 3D
When I login with Unity 3D, my pc becomes slower, I got an AMD II X3 with 2GB of RAM, Nvidia Gforce 6150SE nForce 430/PCI/SSE2 integrated.
When I try to open the dash, take a lot of time to open, most often takes up to 5 seconds and while its opening remains fuzzy and unreacted, even the apps or folders take the same time to open and the same reaction.
Unity 2D
When I login with Unity 2D my pc goes more faster, the only problem is that i cant configure Unity as I want, I try to configure the Unity plugin in CCSM.
For eg: I changed "hide Launcher" to: Never. It does not save changes, even when I restart my computer.

I don't know if the problem is with Unity 3D or with my pc.

In CCSM, go into the options for Ubuntu Unity Plugin and in the tab Experimental, change option Dash Blur from "Active Blur" to "Static Blur" or "No Blur".

You can also go into option Composite and disable "Detect Refresh Rate" and increase option Refresh Rate to over 60.

To increase performance further, you have to have Nvidia's propietary drivers installed (make sure you are using the latest version). Go into NVIDIA X Server Settings and in Open GL Settings Change "Image Settings" to "High Performance".

Remember these options will only apply with *Unity 3D*

Try using the CCSM (CompizConfig Settings Manager) to disable other plugins first.

Does that help?


cant find a driver for HP AMD Radeon HD 6450 512MB PCIEX16 for Ubuntu 14.04 LTS I have been trying for quite some time to get a "HP AMD Radeon HD 6450 512MB PCIEX16" GPU to work. I have a HP 6200 Compaq pro SFF, so my gpu options were limited but I picked what I thought was the best of them. After installing the GPU, my PC would turn on but the screen stays black (so that kinda eliminates the option of Ubuntu installing the driver as far as I know). I'm guessing that's because it is trying to use the GPU I just installed instead of the imbedded graphics. I took the GPU out and scoured the BIOS and found no option to change anything GPU related in there (and it looks like others have had the same problem and just updated the BIOS, but on Windows). I checked the HP update list on Ubuntu's website, but my PC was not listed so I cannot update the BIOS that way either. I browsed through AMD's website, and I couldn't find anything for my particular GPU (although I'm new to linux in general so I could have looked at it and had no idea I was). I really don't feel like downloading Windows again at 200 kb/s just to update the BIOS then install Ubuntu again. Any ideas on how I can get this thing working?

Checking on unofficial ATI graphics wiki, saw tour hardware in supported list. http://wiki.cchtml.com/index.php/Hardware

Please follow The steps listed here: http://wiki.cchtml.com/index.php/Ubuntu

Good luck.

Try going to the Unity search by clicking the top left icon in the Unity launcher. From there search "system settings" and you should find a program bearing the same name as the search. Click that and you should see an icon called "Software and Updates"; click there. Go to the last tab called "Additional drivers" and download whatever drivers you may deem necessary. I had to do the same thing with my old Geforce 6300. Hope it works!


Wireless connection works but the internet is too slow to use in Ubuntu 11.04 The internet is so slow as to be unusable. And I'm not being picky. Even after minutes I can't get my Google home page to load. I tried installing a package through apt-get and was getting rates between 0 and a few hundred bytes/s. That's bytes, not kilobytes! Mostly 0 however (no exaggeration, it spends large amounts of time stalled). And I would go to a speed test web site of some kind but I can't since nothing will load.

Briefly put, the laptop I am using was connected to two wireless networks while using Ubuntu 11.04 without any issues before this. It was also connected to a wired network without any issues. It dual boats Windows 7 which has never had any issues, not even with the current wireless network.

Just to be clear, on the current wi-fi network, Windows 7 encounters no issues (speedtest.net puts the network speed at 1mb/s) but my network connection in Ubuntu 11.04 is so slow as to literally be unusable.

I am unfamiliar with the router except for the fact that it boasts a Rogers logo (that's a large ISP/cable provider in Canada for those not familiar with the land of igloos and polar bears). I am far from the router and some desktop widget I use tells me the signal strength is at 58% (it seems fairly reliable and this would appear to match up with the filled bars in the network icon).

I should also mention I'm just renting a room in this house so I'm not the network administrator and while I can access the 192.168.0.1 router page, the password wasn't set to 'password' so it's not much use to me.

Here are a bunch of commands I ran which don't tell me a whole lot but I thought might be more instructive to the wise around here:

lspci (just showing my network card):

05:00.0 Network controller: Atheros Communications Inc. AR928X Wireless Network Adapter (PCI-Express) (rev 01)

This one is self explanatory.

PING www.googele.com (216.65.41.185) 56(84) bytes of data.
64 bytes from nnw.net (216.65.41.185): icmp_req=1 ttl=51 time=267 ms
64 bytes from nnw.net (216.65.41.185): icmp_req=2 ttl=51 time=190 ms
64 bytes from nnw.net (216.65.41.185): icmp_req=3 ttl=51 time=212 ms
64 bytes from nnw.net (216.65.41.185): icmp_req=4 ttl=51 time=207 ms
64 bytes from nnw.net (216.65.41.185): icmp_req=5 ttl=51 time=220 ms

--- www.googele.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4003ms
rtt min/avg/max/mdev = 190.079/219.699/267.963/26.121 ms

ifconfig

eth0      Link encap:Ethernet  HWaddr 20:6a:8a:02:20:da
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:42

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:16 errors:0 dropped:0 overruns:0 frame:0
          TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:960 (960.0 B)  TX bytes:960 (960.0 B)

wlan0     Link encap:Ethernet  HWaddr 20:7c:8f:05:c6:bf
          inet addr:192.168.0.16  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::227c:8fff:fe05:c6bf/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:982 errors:0 dropped:0 overruns:0 frame:0
          TX packets:658 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:497250 (497.2 KB)  TX bytes:95076 (95.0 KB)

Thank you

The answer from the blog is:

sudo iwconfig wlan0 power off

The blog then went on to describe how to automate that command. Using any editor, open /etc/pm/power.d/wireless

# Command line
sudo -e /etc/pm/power.d/wireless

# gedit
gksu gedit /etc/pm/power.d/wireless

And add in the following line

#!/bin/sh

/sbin/iwconfig wlan0 power off

And the final tip is to edit /etc/nsswitch.conf. Search for the hosts line

hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4

and change it to

hosts:          files dns


Change default application for a File type I have installed MS Office 2007 via wine, which all works remarkably well.

However, MS Office has now laid claim to any 'office' files on my computer.

Is there a way to change the default application for a file type?

Can't you just right click the file, properties > Open with, and move the mark to the program you wish to be default?

Ubuntu-Tweak has a file type manager however to install it you will have to google for it and if you want to use it in natty you will need a ppa.


Installing mongodb on ubuntu 16.04 So, I'm trying to install mongodb on Ubuntu 16.04, I followed the steps described here and here but the service fail to start. When I run sudo systemctl status mongodb I end up with this :

● mongodb.service - High-performance, schema-free document-oriented database
    Loaded: loaded (/etc/systemd/system/mongodb.service; disabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since dim. 2016-07-24 11:33:25 WEST; 17s ago
   Process: 21404 ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf (code=exited, statu
  Main PID: 21404 (code=exited, status=14)

juil. 24 11:33:25 younes-X551CA systemd[1]: Started High-performance,schema-free document-orien
juil. 24 11:33:25 younes-X551CA systemd[1]: mongodb.service: Main process exited, code=exited, s
juil. 24 11:33:25 younes-X551CA systemd[1]: mongodb.service: Unit entered failed state.
juil. 24 11:33:25 younes-X551CA systemd[1]: mongodb.service: Failed with result 'exit-code'.

Any help would be greatly apreciated

I still don't know/don't understand what caused all this but a system reboot got rid of it...


How to install 11.04 on a different partition? I have windows 7 installed. The Hard disk is composed of C: for windows 7, D: recovery; E: HP tools. I want to install Ubuntu on a different partition to be safe in case I need to remove either windows or Ubuntu without any problems.

Another question: Does the dual boot using automatic partition by Ubuntu to solve my problem?

When you boot to the graphical installer (not the installer in Windows) then you'll be able to choose which harddisk to install it on. If you already have Windows installed there, then you can choose how much disk space each operating system shall have. It's just a slider from 0% to 100%, although those extremes won't be valid if you want to have both. :)

The installer will add entries to your boot menu automatically so that you can choose between Windows and Ubuntu when you start the computer.

Avoid using automatic-anything on a computer that already has an OS installed on it.

What you should do, for example by using GParted from a Ubuntu Live CD, is to re-size one of your partitions (preferably your largest) so that you shrink it. It will then leave x amount of unallocated space, which you can select and then use to create a brand new partition where you will later install Ubuntu on.

Repeat the process, but this time, create yet another partition that is slightly larger than your RAM.

When installing Ubuntu put it on the large empty partition you created above, using a ext filesystem. You will want to mount it as "/". Mount the other smaller partition as "swap", and then start the install.

To answer your other question: Dual booting doesn't touch your partitions. To speak of dual booting is just to say that you have a computer with two OS:s on it, and that you, when you start it up, are allowed to choose which one you will boot up.


Unlock all private keys on Ubuntu, entering password only once at login I login to Ubuntu 12.04 using a password.  Later on, when I use my browser(Chrome), I'm asked for a password to unlock the keychain so that the browser can access my saved credentials for various websites (it's the same password).  Also, whenever I use SSH to connect to other computers using my private key, I am prompted for the same password to unlock my private key.

How can I make it so that I am asked for my password exactly once per login (given that my login password is the same as the one I use for all my private keys)?  One important requirement: all of my private keys should have a password. This means that I will have to type in one password on login, which will unlock some key which in turn decrypts the passwords for all other keys (which are also unlocked).  It also means that if someone else gets access to my private keys, they will not be able to use them without at least one password.

Probably someone will try to label this question as a duplicate of this question, this question, or this question. While these questions are similar, none of them explicitly say that there still needs to be a password entered on login, as I am demanding here.  As a result, the accepted solutions just say "set your passwords to blank"--I don't want that, it's dangerous!  So I am aware of the similar questions, but none of them has received the correct answer yet, because they are slightly different.

1) After Creating the Public Key By Following,

The first step involves creating a set of RSA keys for use in authentication.
This should be done on the client.
To create your public and private SSH keys on the command-line:

mkdir ~/.ssh
chmod 700 ~/.ssh
ssh-keygen -t rsa

You will be prompted for a location to save the keys, and a passphrase for the keys. This passphrase will protect your private key while it's stored on the hard drive and be required to use the keys every time you need to login to a key-based system:

Generating public/private rsa key pair.
Enter file in which to save the key (/home/b/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/b/.ssh/id_rsa.
Your public key has been saved in /home/b/.ssh/id_rsa.pub.

  2) You must add your private key (might be not secure) but still you
  can do this,

ssh-add ~/.ssh/id_rsa

Source From Ubuntu Wiki.

Set a blank keyring password and you won't be bothered again.


Chrome/Chromium middle mouse button for scroll Linux, Mac Clicking the middle button doesn't allow me scroll the page. Is there any way to fix this behavior?

Information:

Ubuntu 10.10
Chromium 9.0.597.94
Logitech MX518

Update: also Chrome, and the other Chromium based ones.

In Linux based/Mac systems, Google Chrome / Chromium hasn't got this feature.
You have to get an extension, eg.:  AutoScroll.

I have Ubuntu 14.04 and mouse wheel stopped working on one of my Chrome instances.  I followed the tip here and it works great.  When I go into the page about::flags, the "Smooth Scrolling" option was enabled. I disabled it and it works.


How to install the MPEG-4 AAC decoder and the H.264 decoder? Where do I get the MPEG-4 AAC decoder, and the H.264 decoder.

How to install them and play the multimedia?

ubuntu-restricted-extras package allows users to install ability to play popular non-free media formats, including DVD, MP3, Quicktime, and Windows Media formats.
To install ubuntu-restricted-extras package:

Open a terminal by pressing Ctrl+Alt+T.

Run this command:
 sudo apt-get install ubuntu-restricted-extras

Alternatively, you can install the package via Software Center by launching it via Dash and searching the package and clicking on Install.

Also, try installing libavcodec54 libav-tools and ffmpeg with this command:
sudo apt-get install libavcodec54 libav-tools ffmpeg

EDIT: Ubuntu 20.04
In Ubuntu 20.04, you want libavcodec58 instead of 54:
sudo apt-get install libavcodec58 libav-tools ffmpeg

In the last Ubuntu ver 14.04 , 14.10 the best way for setup them is :

To install ubuntu-restricted-extras package:

Open a terminal by pressing Ctrl+Alt+T.

sudo add-apt-repository ppa:mc3man/trusty-media
sudo apt-get update
sudo apt-get install ffmpeg gstreamer0.10-ffmpeg libavcodec-extra-53 libavcodec53

and N-joy


How to add the logs to a crontab with time stamp In crontab, I scheduled a daily backup script. Now when the cron executes the script the status are logged to a log file as shown below.

0 0 * * * /home/backup.sh > /home/groupz/db-backup/fbackup.log 2>&1

Now, when the cron executes a script the contents of the log get renewed everytime. So, I want the contents to be added to the same file with time stamp of the executed time and below the contents of each time along with the existing contents. How can I do this.

why not just

0 * * * * (/bin/date && /home/backup.sh) >> /var/log/backup.log 2>&1

You can append something to a file using two of these things '>'.

$ echo "test" >> test.txt
$ echo "test" >> test.txt

$ cat test.txt
test
test