How can I install the "MBR" on a clean Hard Disk? To get rid of Windows 10 I wiped the HDD using GParted on the Ubuntu 16.04 installation media. Accidentally I also wiped the "MBR", so that my HDD is absolutely clean. This means that nothing will boot. I can boot from an Ubuntu Live USB drive and install Ubuntu 16.04, but Ubuntu doesn't boot. I need to place the "MBR" back on the HDD, but I don't know how - I have tried to solve the problem by using the boot-repair-disk (ISO), but unfortunately it did not work.

Help would be greatly appreciated. Many thanks for your time.  Sincerely, Duncan

The screenshot that you provided shows that two partitions have a boot,esp flag, so something went wrong during the installation. If you had followed the linked Q&A - How to prepare a disk ..., it should have worked properly. Anyway, you are close to get it done and to make it more easy for you, I will provide you with individual instructions containing every important and necessary step.

Boot from the Ubuntu USB installation media (entry with UEFI in front) - select Try Ubuntu
On the Live desktop open GParted, right-click the swap partition (sda3) - click on Swapoff
Click Device in the top menu -> Click Create Partition Table -> Select gpt -> Click on Apply
Click Partition -> Create new Partition -> New size : 1024 MB | File system: fat32
Click Partition -> Create new Partition -> New size: 16384 MB | File system: linux-swap
Click Partition -> Create new Partition -> New size: remaining space | File system: ext4
Click on Apply button (green check mark) in the menu to apply the pending operations
Right-click the first partition (sda1) -> select Manage flags, then mark boot and esp
Close GParted - start the Ubuntu installation process - choose option "Something else"
Select the third partition (sda3) for Ubuntu - set / as mount point | ext4 as file system
Select /dev/sda as Device for boot loader installation ... start the installation process
Once finished shutdown the computer and remove the Ubuntu USB installation media.

Now Ubuntu should boot properly ... if not boot into BIOS and select Ubuntu as the default boot system. Here is a presentation I made which is showing the whole process -> Ubuntu installation
Additional information : What you wiped was not the "MBR" - it was the EFI partition of the disk. The EFI partition size of 1024 MB I suggested allows to add additional boot loaders ... if needed.

Many thanks to you all for your input.  Unfortunately I could get none of the offered solutions to work - I'm sure the fault lay with me.  Anyway, I did finally solve the problem by (after much trying) getting boot-repair-disk to work - I used a friends Windows 10 pc to download the iso and then created a startup disk using Rufus. I then loaded it through Bios and went into the "Advanced" options (in the boot-repair-disk program) - that did the trick.
Once again, many thanks to you all for giving of your time and expertise so willingly.  MUCH appreciated.  Sincerely, Duncan.


Stop Ubuntuone-syncdaemon from running in background automatically Is there a way to stop ubuntuone-syncdaemon automatically (and all other Ubuntu One related processes) from running in the background after I quit the Ubuntu One app? Like when you quit Dropbox, it will also stop all its syncing processes? I mean, there should be some simpler ways of doing it rather than killing it manually via terminal or system monitor?

If you don't use Ubuntu One (Canonical's cloud service), you can just get rid of the entire suite by typing the following into the Terminal:

sudo apt-get purge ubuntuone-client

You can always get it again at a later point with all your files remaining if you want it back.

I know I'm late but this was the first hit on Google when I was looking for an answer to the same question as the OP. So, a note for future me:

u1sdtool -q


Is there an alternative to Adobe Flash? I am having problems with Adobe Flash. I have the latest version installed for Firefox. It keeps crashing my computer and I was wondering if there was any alternative that works with
videos that require an updated Flash. If there isn't an alternative, is there any software that keeps flash stable? Another problem I have is that even though I updated my Flash, some videos say that my Flash isn't updated.
I know Flash is pretty rubbish in Linux and OSX. Is there any alternative for Flash? Is Gnash any good? Is it still supported and developed? Please help.

For alternatives as you said, there's Gnash and Lightspark.

To install open Terminal (Press Ctrl+Alt+T) and copy the following commands in the Terminal:

For "Official PPA of the Lightspark project":

sudo add-apt-repository ppa:sparkers/ppa

or for "Automated daily builds from ustream git master":

sudo add-apt-repository ppa:sparkers/daily

Installation:

sudo apt-get update
sudo apt-get install lightspark browser-plugin-lightspark

Click here for instructions on using PPAs.

NOTE - Update for Ubuntu 15.04, using Lightspark Version 0.7.2-6 (The above PPA repository does not appear to be working in Ubuntu 15.04)

Lightspark 0.7.2-6 deb package can be installed directly via the software centre, which is invoked by clicking the "Install Using Apt" button on the following web page:

http://www.ubuntuupdates.org/package/core/vivid/universe/base/browser-plugin-lightspark

One that I tried recently is swfdec. It is very good! It can be downloaded from

sudo apt-get install swfdec-gnome

It can also be found on the ubuntu software center.


Ubuntu 14.04LTS on ASUS wifi disconnecting and reconnecting Hi I'm a beginner and am currently running Ubuntu 14.04.

When I use rfkill list I get:

0: phy0: Wireless LAN
         soft blocked: no
         hard blocked: yes
1: asus-wlan: wireless lan
         soft blocked: no
         hard blocked: no
2: asus-bluetooth: bluetooth
         soft blocked: no
         hard blocked: no

when I close my laptop lid and reopen it, the WiFi connects to the network and shows that it is not hard blocked any more.
iwconfig gives me:

eth0:   no wireless extensions;
lo:     no wireless extension;
wlan0:  IEEE 802.11bgn ESSID:"XXXXXXX" power management is off.

when I run lspci -vnn | grep Network I receive:

02:00.0 Network controller [0280]: Ralink corp. RT5390 wireless 802.11n 1T/1R PCIe [1814:5390]

will show it greyed out until I suspend or close the lid and the network is found and connected too.

Any help or suggestions would be appreciated.

Good an easy fix

echo "options asus_nb_wmi wapf=4" | sudo tee /etc/modprobe.d/asus_nb.conf

Reboot and if it is still blocked try the keyboard combo to clear it

You could try this, and enter this in the terminal:

 rfkill list up
 lspci wlan0
 nmcli -c -d wlan0

and it might work fine this way.


After UPDATE, I get: "no rule to build the target" running MAKE, why? I frequently run the Ubuntu updates-manager ,
and after that, every time, I need to do a make to re-install my TV tuner driver (like described in here)

But that time, make stops with errors:
Following error messages are translated from french

$ make
make -C /lib/modules/3.2.0-53-generic-pae/build M= modules
make[1]: entering in folder « /usr/src/linux-headers-3.2.0-53-generic-pae »
make[2]: *** No rule to build the target « arch/x86/tools/relocs.c », needed for « arch/x86/tools/relocs ». Stop.
make[1]: *** [archscripts] Erreur 2
make[1]: exiting folder « /usr/src/linux-headers-3.2.0-53-generic-pae »
make: *** [all] Erreur 2

How can I solve this error please ?

For information:

Ubuntu version is 12.04 (precise)
Kernel Linux is 3.2.0-53-generic-pae
Content of /usr/src/linux-headers-3.2.0-53-generic/arch/x86/
is similar to /usr/src/linux-headers-3.2.0-52-generic/arch/x86/
content of folder /usr/src/linux-source-3.2.0 is

$ ls -la /usr/src/linux-source-3.2.0
total 78020
drwxr-xr-x  4 root root     4096 sept. 21 08:44 .
drwxr-xr-x 74 root root     4096 sept. 21 22:44 ..
drwxr-xr-x 10 root root     4096 sept. 21 08:44 debian
drwxr-xr-x  8 root root     4096 sept. 21 08:44 debian.master
-rw-r--r--  1 root root 79874365 aug.  23 00:11 linux-source-3.2.0.tar.bz2

and

$ find /usr/src/linux-source-3.2.0 -name "relocs.c"

returns nothing

The clue to this question is this part of the error message:

  make[2]: * No rule to build the target « arch/x86/tools/relocs.c », needed for « arch/x86/tools/relocs ». Stop.

The makefile is looking for a code module called relocs.c.

Now, code modules don't normally exist in the kernel headers. You need to extract the kernel source first and then the Makefile has something to chew on.

Let's do this.

Navigate to your kernel source folder:

cd /usr/src/linux-source-[version]

In your case [version] kernel version is 3.2.0.

List the contents of the folder. You should see a file in there called linux-source-[version].tar.bz2. N.B. as before replace [version] with your kernel version number.

If you don't, install the source:

sudo apt-get install linux-source

Now extract the source:

sudo tar -jxvf linux-source-[version].tar.bz2

Then you should be able to complete your compilation.

i386 headers required:
sudo apt-get install linux-headers-*(kernel version)*:i386

Example:
sudo apt-get install linux-headers-5.4.0-42:i386


Bash : colored copy / paste As everybody, i have a few colorized output in my bash.
I want to keep the colorized syntax when copying an extract to a HTML editor for example.
Is there a way to handle this ?

Thanks.

If you are talking about colorized output of some command line utilities like ls, grep, cmake, git diff, etc, please note, that it doesn’t have any relations to GNU Bash.

Anyway, there is several tools for converting output colorized with ANSI escape sequences to HTML:

aha from package of the same name
ansi2html from HTML::FromANSI Perl module (not packaged in Ubuntu repo, can be installed from CPAN)
ansi2html.sh by pixelb (not packaged, download from git)

Usage of all of them is rather simple: they read terminal escape sequences from stdin and put HTML to stdout. But note: most of utils don’t colorize output if it is not going to terminal. You have to order them to produce colorized output explicitly. E. g.:

$ ls --color=always | aha | xsel -i -b

xsel -i -b here will copy HTML to clipboard.

You need to use javascript libraries for that, you cannot directly copy/paste and keep the colours as they are. Some of the popular libraries for this are:

Google's prettify
SyntaxHighlighter
Chilli

Source: Similar question on SO


Installing Google Drive on Ubuntu 12.04 I was searching for google drive and its installation instructions in ubuntu 12.04, I tried sudo apt -get install , but didn't find google drive application on  ubuntu repo. Is there any alternative or hack to install google drive on ubuntu 12.04

As you already know, Google (probably hates Linux users) does not provide a Linux client for its awesome Google Drive cloud storage service. But don't worry, as the open source community has its geniuses like Lorenzo Breda, who developed an unofficial Google Drive client for Linux, called Grive.

Adding the PPA Repository

This is an easy step, which requires you to open a Terminal by searching it in the Unity Dash or by pressing the CTRL+ALT+T key combination, and to paste the following code in the Terminal window:

sudo apt-add-repository ppa:thefanclub/grive-tools

Hit the Enter key, type your password when asked, and hit Enter again when asked if you want to add the repository. Do not close the Terminal.

Installing Grive Tools and Grive

Now, paste the following commands in the Terminal window, one by one, hitting enter after each one:

sudo apt-get update
sudo apt-get install -y grive-tools

Once installed, search the application on the Unity Dash by typing Grive, and open it. The application will ask for your password, so insert it and click OK, and then it will start to download and configure the latest version of the Grive application, which will take some time.

When I was on my google drive account, it prompted me to install google drive. I clicked it and everything went smooth. It was kind of pointless though because when I clicked on the google docs icon, all it did was direct me to the google docs webpage. So im not sure if it is even worth your time.


How can I set charge levels on ThinkBook I want to set charge levels on my laptop - lenovo thinkbook 14s with Ubuntu 19.10.
I tried installing tcp but it seems as it works only on thinkpads.
I also tried tp smapi same results.

Happy holidays!

You will have to install and load the tp_smapi kernel module:
Install the tp-smapi-dkms module using

sudo apt-get install tp-smapi-dkms

Now, load the tp-smapi module in the kernel using

sudo modprobe tp_smapi

and set the thresholds to virtual files in /sys/devices/platform/smapi

echo 35| sudo tee /sys/devices/platform/smapi/BAT0/start_charge_thresh
echo 75| sudo tee /sys/devices/platform/smapi/BAT0/stop_charge_thresh

This setting will make sure that it will stop charging once it reached 75% and only start charging when it drops below 35%.

dpkg -l tp-s*

output :

ii  tp-smapi-dkms  0.43-1       all          ThinkPad hardware/firmware access modules source - dkms version

activate

sudo modprobe tp_smapi

output :

 modprobe: ERROR: could not insert 'tp_smapi': No such device

I think tp_smapi only works on thinkpads and not thinkbook
I think it is


Ubuntu 16.04 lock screen without dimming/turning off I'm using an HP laptop with an external screen connected through an HDMI cable, and the lid closed.

Every time I lock the screen, it dims and then cuts signal to the screen, leaving it in a blue screen that says "No Signal", and eventually it just turns off.

I want to be able to lock my screen and walk away from the computer WITHOUT having the external screen turn off.

I have gone into Settings and unchecked "Dim screen to save power" and set "Turn screen off when inactive" to "Never"

I have run xset -dpms

I have gone into dconf-editor and set com->canonical->unity-greeter->idle-timeout to 0

Nothing works.

No matter what I do, when I lock the screen (or it auto-locks), it dims and then turns off.

I use xscreensaver instead of gnome-screensaver.

sudo apt-get remove gnome-screensaver

sudo apt-get install xscreensaver

Configure xscreensaver :

Lock screen

Those instructions are from here :
Configure screensaver in Ubuntu


Using gnome-open to open pdf files I configured evince to be my default application to open pdf files (using Open with... and clicking on always opening pdf files with this application), but when I type gnome-open foo.pdf instead of evince, I have Nautilus that opens up in the correct folder highlighting the file of my choice.

This is especially disturbing since I am using the LaTeX plugin for gedit, and when I try and compile a tex file to pdf, instead of opening up a new window with my compiled pdf file, I just have nautilus pop-up.
I know I can edit the scripts of my gedit LaTeX plugin to call on evince (or acroread) with the pdf I want opened, but this is a workaround and not the solution I am looking for.

Removing exo-utils worked for me perfectly.

Working fine for me, gnome-open opens up Adobe Reader properly.
Could you try with Adobe reader once.

Might be the case that evince is not properly set as default somewhere.

I am using Natty BTW.


SSH connection problem with "Host key verification failed..." error I can connect to another Ubuntu machine in my LAN via SSH. On both of then PC's I installed openssh-server
but from another Ubuntu computer I can not connect to my PC via SSH and I got this error:

  Host key verification failed...

"Host key verification failed" means that the host key of the remote host was changed.

SSH stores the host keys of the remote hosts in ~/.ssh/known_hosts. You can either edit that text file manually and remove the old key (you can see the line number in the error message), or use

ssh-keygen -R hostname

From man page:

  -R hostname Removes all keys belonging to hostname from a known_hosts file. This option is useful to delete hashed hosts .

(which I learned from the answer to
Is it possible to remove a particular host key from SSH's known_hosts file?).

chmod 666 /dev/tty

is yet another tty solution - sometimes, this device file has wrong permissions.


Wifi stops after some time in Ubuntu 14.04 I have installed Ubuntu 14.04. When I start my OS and connect with WiFi and I am surfing the net, after some time – approx. after 2 hours – the WiFi stops.

Assuming you are using Realtek Wifi because it causes problem with new kernel.

You need to install backported modules from the 3.19 kernel (happened to me too)
Here's the code on how to

sudo apt-get install linux-headers-generic build-essential
wget https://www.kernel.org/pub/linux/kernel/projects/backports/stable/v3.19-rc1/backports-3.19-rc1-1.tar.gz
tar -zxvf backports-3.19-rc1-1.tar.gz
cd backports-3.19-rc1-1
make defconfig-rtlwifi
make
sudo make install

HOPE IT WORKS :D


Where can I find Vagrant packages? Vagrant is a tool to build and manage virtual machines for developers.  It has a getting started on Ubuntu guide that contains iffy-looking suggestions like

$ sudo ln -s /usr/bin/ruby1.8 /usr/bin/ruby  # wtf???

or installing RubyGems from source rather than from Ubuntu packages, and then using gem install to install vagrant itself.

I'm not feeling comfortable just following those instructions.  Is there perhaps a PPA?  Are there, perhaps, alternative tools that are packaged for Ubuntu?

Nowadays you can download self-contained .deb files from http://www.vagrantup.com/downloads.html

Not as good as a PPA, but at least you can introspect what files get installed where and remove the package cleanly.

There is nothing to worry about the instructions in this getting started on Ubuntu guide. Making a soft link to /usr/bin/ruby1.8 does not harm your system in anyway. Just go ahead with the tutorial and install vagrant.To install vagrant you can use:

  sudo gem install vagrant

As far as i know there is no PPA available for vagrant. The best method to install it is using the gem.

If you are feeling any difficulties feel free to post it here


Google Chrome does not start: Segmentation fault (core dumped) I am using Ubuntu 18.04.02 LTS. Today after starting the machine, I am unable to start Google Chrome. The version is latest as downloaded from Google. It prints an error as follows:

Segmentation fault (core dumped)

I have tried reinstalling google chrome, and trying the answers as mentioned in the following link
Google Chrome not starting ("Aborted (core dumped)")

The problem is same if I install Chromium. As of now nothing works.
Fresh installation of Ubuntu to me is a big headache. Can anyone help and provide some answers.

It's a known sandboxing issue. Start chrome with
google-chrome-stable  --no-sandbox


Browse local LAMP server by URL I'm working with a user who created a LAMP server to be used as an internal message board, of sorts. I need to be able to browse the site created via a browser URL. Ideally, we would have something like intranet.localdomain.com. I do not want this server to be public facing.

The server is running on Ubuntu 16.04. This is not an area I am familiar with so any help would be appreciated. Thanks in advance.

Note that I can browse to the page using the IP of the server.

This is easiest if you have access to all of the computers in your network. Here are the steps to take:

Set a static IP address for the server on the network.
On every computer, edit the hosts file (/etc/hosts on Linux) and name the local IP address. For example (replace the parentheses and their contents):

  (Local IP address) (tab) (desired hostname)

Restart all of the machines.

And you're done! You should now be able to access your server by typing the hostname into the address bar on any machine with an edited hosts file.


How to unzip .tgz file using the terminal? I've downloaded mongodb-linux-x86_64-2.6.3.tgz file using windows 7 and kept it on D:\Amra\Software\Developing Soft location.

When I right click this .tgz file using Ubuntu  and see property it shows Location:  /media/towhid/Amra/Software/Developing Soft. Now how will I unzip this .tgz file using tar command from terminal?

To extract a .tgz file with tar you need to use,
tar -xvzf /path/to/yourfile.tgz

where,

x for extract
v for verbose
z for gnuzip
f for file, should come at last just before file name.

You can use the following command in a terminal to unzip the file in your case,
tar -xvzf /media/towhid/Amra/Software/Developing\ Soft/mongodb-linux-x86_64-2.6.3.tgz

Extract a .tgz file in different directory:
One can use -C option to extract archive contents to a different directory as following,
tar -xvzf /path/to/yourfile.tgz -C /path/where/to/extract/

Open the terminal and use the cd command to change directories to the directory where the mongodb-linux-x86_64-2.6.3.tgz file is located and the run the following command:

tar xzf mongodb-linux-x86_64-2.6.3.tgz

The above command will extract the contents of the mongodb-linux-x86_64-2.6.3.tgz archive while preserving the archive's hierarchical tree directory structure.

A similar command extracts .tar.xz files. Open the terminal and the run the following command:

tar -xf /path/to/your/file.tar.xz

Explanation:

-x extract files from an archive
-f use archive file


How do I display the whole desktop in Virtual Box fullscreen mode? I am running Ubuntu 12.04 in VirtualBox 4.2.6 on a Windows 7 host. After installing Ubuntu I wanted to get the VB interface in fullscreen. I therefore installed guest additions from Virtual Box Manager (devices > install guest additions -> run --> reboot).

But after booting I can only see a part of the desktop without menus. In addition I am asked again to install the guest additions after every reboot (the guest additions CD reappears even though I had removed it).

Editing the resolution in system settings via right click > appearance -> all settings (since I can only partially see the desktop) the actual resolution changes but the whole desktop still does not fit.

Do I have to uninstall/reinstall the guest additions? What other options do I have?

To be able to scale the screen geometry, and to enable fullscreen mode of a Virtual Box guest Ubuntu we need to install the guest additions:

How do I install Guest Additions in a VirtualBox VM?
In case we have no functioning GUI we may install the guest additions from command line.

In case this fails we may try to reinstall guest additions, and watch out for errors we may get when doing so. Older versions of Virtual Box may be incompatible with either the graphics drivers from the host, or with the guest Ubuntu version. We then have the following options we may try the follwing:

Make sure we have 3D-acceleration enabled in the virtual machine settings, and allow enough of video memory:

How do I install the VirtualBox version from Oracle to install an Extension Pack?

Update the guest operation system from command line (hold left Shift key on booting to enter a root shell) and then run:
  apt-get update && apt-get dist-upgrade

In rare cases we may have a better performance with an older Ubuntu release, or a more lightweight derivate such as Lubuntu, or Xubuntu.

After having installed the guest additions the guest OS needs a reboot for the virtual driver to be loaded. We then should be able to resize or scale the guest screen, or enter full screen mode with Host + F.
Also see Adjusting display geometry in a virtual machine? for additional options to adjust screen geometry.
Note: Pre-release alpha versions of Ubuntu are likely to not yet perform as expected.

I would like to add on to the above answer. When logging into the root shell, the DNS server settings may be missing. In this case, you will need to manually add a DNS server settings prior to apt-get update. Details are over here. If you do not do that, you will not be able to update any repositories/packages.

After that you can then upgrade with apt-get dist-upgrade. Hope it helps!


How to make Boxee work on 11.04 and above? I am trying to install Boxee on Ubuntu 11.04 but it was only released for 10.10.

I am looking for a detail step by step guide to install Boxee on any Ubuntu 11.04 or above.

For those who do not know
Boxee support for Windows, Mac and Linux was dropped, there are no more packages available to download from the site.
Source code is still available for those brave enough to venture down that path.
(If you have any further information about Boxee and Boxee releases that might affect this information please drop a comment so I can updated it.)

Here's a tutorial to install boxee on ubuntu 11.10 and solves the dependency problem.


How to restore automatic backup from UbuntuOne using Dejadup? I used to make an automatic backup of my files in UbuntuOne account using DejaDup. This option is no more availabe in Ubuntu 14.04. How can I get my files? They are compressed in my Ubuntu One account by DejaDup.

There is a script to download all files of a single Ubuntu One folder through the web interface. See blog post for more details. I have tested it again and it doesn't seem to work with Firefox as stated in the post but only with Chrome. Haven't tested it but might also work with Chromium.

Here in brief what you need to do:

Go to blog post and store link Download U1 folder as bookmark
Open Chrome and login to Ubuntu One
Browse to deja-dup backup folder and execute Download U1 folder bookmark

As you have all data now on your machine you can use Deja-Dup to restore it by opening Deja-Dup, press Restore... and choose Local Folder as Backup location.

You can also use duplicity to restore your files with following command

duplicity restore file:///path/to/downloaded/deja-dup/files /path/to/restore

Ubuntu One was announced to be discontinued (file-sync-cloud and mp3 store at least), but it isn't completely discontinued - see this page where they advertise "cloud-syncing database api", and not just files.

You should download all your data from U1 while you can. :( Hopefully they're making something even better soon.


"The Python ssl extension was not compiled. Missing the OpenSSL lib?" error when installing Python using pyenv While installing Python using pyenv, I am getting the following error:

ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?

I am using Ubuntu 18.04 Bionic Beaver How do I solve this issue?

If the python version you are trying to install is equal or lower than 2.7.12, it does not support OpenSSL1.1.0, so you would need to replace libssl-dev with libssl1.0-dev.

Ubuntu 18.04 is the first official release to switch to OpenSSL1.1.0 which is why you might not have been impacted with this in the past.

Reference:
https://github.com/pyenv/pyenv/issues/945

https://github.com/pyenv/pyenv/wiki/common-build-problems#error-the-python-ssl-extension-was-not-compiled-missing-the-openssl-lib

According to the documentation, a simple:

pip install pyopenssl

should do the job. If pip is not installed, run

sudo apt install python-pip

and then run the command again.


Ubuntu live disk stop halt in the boot process I have just bought a new ASUS laptop for my son. It have pre-installed Windows 8.1. I made my usb-live stick as I use to and tried install ubuntu.
It use to be simple.

I switch off fast-boot in bios and also the fast-boot in windows.
I selected to boot the usb in the bios.
The laptop boot up grub and I select Install.
After this the ubuntu shows the slash screen as usual.
But the boot process halts.
The boot console prints the following message.

staring version 219 systemd[1]: [/lib/systemd/system/casper.service:10] Failed to parse input specifier, ignoring: force-tty

And after this nothing happens (The machine is frozen).

Note.
I have tried with Xubuntu 14.04, Xubuntu 15.04, Kubuntu 15.04 and Ubuntu 15.04
Same result on all four distributions.

The laptop is
ASUS F553MA Celeron 4GB 500GB HDD 15.6"

It used to be very easy to install ubuntu.
But for the last 2-3 years it is just getting more and more difficult.

I don't need the Windows OS.
So how can I install ubuntu if I can boot from a live usb.

Same here. Asus n56vm trying Kubuntu with DVD as source.

It only works with Ubuntu, I mean with unity, at least in my PC.


How to get bearable 2D and 3D performance on AMD Radeon HD 6950? I have had an AMD Radeon HD 6950 (i.e., Cayman series) for a couple years now, and I have tried a lot of combinations of drivers and settings with terrible results. I'm completely at a loss as to how to proceed. The open source driver has much better 2D performance, but it offloads all OpenGL rendering to the CPU.

What I've tried so far:

All the latest stable Ubuntu releases in the period, plus one Linux Mint release.
All the latest stable AMD Catalyst Proprietary Display Drivers, and currently 13.1.
The unofficial wiki installation instructions for every Ubuntu version and the semi-official Ubuntu instructions.
All the tips and tweaks I could find for Minecraft (Optifine, reducing settings to minimum), VLC (postprocessing at minimum, rendering at native video size), Catalyst Control Center (flipped every lever in there) and X11 (some binary toggles I can no longer remember).

Results:

Typically 13-15 FPS in Minecraft, 30 max (100+ in Windows with the same driver version).
Around 10 FPS in Team Fortress 2 using the official Steam client.
Choppy video playback, in Flash and with VLC.
CPU use goes through the roof when rendering video (150% for 1080p on YouTube in Chromium, 100% for 1080p H264 in VLC).
glxgears shows 12.5 FPS when maximized.
fgl_glxgears shows 10 FPS when maximized.

Hardware details from lshw:

Motherboard ASUS P6X58D-E
CPU Intel Core i7 CPU 950 @ 3.07GHz (never overclocked; 64 bit)
6 GB RAM
Video card product "Cayman PRO [Radeon HD 6950]", vendor "Hynix Semiconductor (Hyundai Electronics)"
2 x 1920x1200 monitors, both connected with HDMI.

I feel I must be missing something absolutely fundamental here. Is there no accelerated support for anything on 64-bit architectures? Does a dual monitor completely mess up the driver?

$ fglrxinfo
display: :0  screen: 0
OpenGL vendor string: Advanced Micro Devices, Inc.
OpenGL renderer string: AMD Radeon HD 6900 Series
OpenGL version string: 4.2.11995 Compatibility Profile Context
$ glxinfo | grep 'direct rendering'
direct rendering: Yes

I am currently using the open source driver, with the following results:

Full frame rate and low CPU load when playing 1080p video.
Black screen (but music in the background) in Team Fortress 2.
Similar performance in Minecraft as the Catalyst driver. In hindsight obvious, since both end up offloading the rendering to the CPU.

My /var/log/Xorg.0.log after upgrading to AMD Catalyst 13.1. Some possibly important lines:

(WW) Falling back to old probe method for fglrx
(WW) fglrx: No matching Device section for instance (BusID PCI:0@3:0:1) found

The generated xorg.conf. The disabled "monitor" 0-DFP9 is actually an A/V receiver, which sometimes confuses the monitor drivers when turned on/off (but not in Windows). All three "monitor" devices are connected with HDMI.

Edit: Chris Carter's suggestion to use the xorg-edgers PPA (Catalyst 13.1) resulted in some improvement, but still pretty bad performance overall:

Minecraft stabilizes at 13-17 FPS, but at least the CPU load is "only" at 45-60%.
Still 150% CPU use for 1080p video rendering on YouTube in Chromium.
Massive improvement for 1080p H264 in VLC: 40-50% CPU use and no visible jitter
glxgears performance about doubled to 25-30 FPS when maximized.
fgl_glxgears still at ~10 FPS when maximized.

The best and most stable performance I have managed from my Radeon 5450 has been achieved by adding the xorg-edgers ppa found here

Having spent an age experimenting between fglrx proprietary drivers and AMD Catalyst drivers this has been one ppa I have no hesitation in adding.

There is AMD Catalyst 12.12, released today that you can try,
http://support.amd.com/us/gpudownload/embedded/Pages/embedded_linux.aspx
It specifically fixes issues with X.Org 1.13.


Qualcomm Atheros AR8172 Driver fix? (lenovo g500s) Recently I took a lenovo g500s laptop. the product id is LENOVO_MT_20245. after the installation, it could not recognize LAN network adapter. After googling I found out that it has a Qualcomm Atheros AR8172/8176/8178 PCI-E Fast Ethernet Controller

Command lspci -nn | grep 0200 says:

01:00.0 Ethernet controller [0200]: Qualcomm Atheros QCA8172 Fast Ethernet [1969:10a0] (rev 10)

Anybody know a way to fix this driver?

[SOLVED]

first enter lspci -nn | grep 0200
and make sure that your drivers is "Qualcomm Atheros QCA8172 Fast Ethernet[1969:10a0]"

The following fix is is only going to work for-

1969:1091 - AR8161 Gigabit Ethernet
1969:1090 - AR8162 Fast Ethernet
1969:10A1 - QCA8171 Gigabit Ethernet
1969:10A0 - QCA8172 Fast Ethernet

adapters.  and please make sure that your kernel is 2.6.24 or above. It is technically possible for kernels < 2.6.24 but might take some work. (still worth giving a try!)
to check the kernel version type

uname -a

after that, If they are all neat and right.
download compat-drivers-2013-03-04-u.tar.bz2 file and extract it.
go to the extracted directory [ex-  cd Downloads/compat-drivers-2013-03-04-u/]
and type-

sudo ./scripts/driver-select alx

sudo make

sudo make install

reboot the system you are all done :)
apparently this type of ethernet adapters are available in lenovo g500s, lenovo g500 series, lenovo g400 series, asus 3rd gen laptops, (you better check before installing)

for more information go to http://www.linuxfoundation.org

Thanks to Lusus Naturae. His forum showed me this way. so the rewards goes to him. [original link-]
http://meinewenigkeit.blogspot.com/2013/08/gentoo-and-atheros-qca8172-fast-ethernet.html

The compile errors are basically redefinitions of already defined functions.
For me, I was on Kernel 3.2.x and in the include/linux/compat-2.6.h file I just commented out everything after #include , because the compile errors were in 3.4, 3.7 and 3.8.
So basically I commented out all lines from include compat-3.4.h thru compat-3.9.h.
After that the compile and the install worked.

Hope that helps, Denis.


How do I get my desktop Icons back on my primary display? So, I have read several questions - with and without answers - and though this is similar to others, I have found nothing particular to the issues I am experiencing. It is a three-part problem and I think they're all related erego why they are being posed as a single question.

My desktop icons are all on my secondary display and I can't move them back.
I can no longer maximize windows on my primary display by dragging them to the top of the screen, this results in them being dragged to a desktop with no display that shouldn't be an accessible area anyway.
After hours of searching for solutions, I was finally able to write a script that will create and assign the proper resolution and position to my secondary display, and leave it alone if it isn't connected. The catch there is that I have to log in first, so prior to login I am stuck with a sideways login screen that is, oddly enough, on my secondary display.

I am using an older VAIO laptop with a VGA output (hence the need to create the proper resolution for my external monitor) and running Ubuntu MATE 16.04.

Here's a screen shot:

And here's my script: feel free to do whatever you want with it. It may be of use to people with display configuration issues.

#!/bin/bash
xrandr --auto
cvt 1920 1080
xrandr --newmode "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
xrandr --addmode VGA1 1920x1080_60.00
xrandr --output VGA1 --mode 1920x1080_60.00
xrandr --output VGA1 --rotate right
xrandr --output LVDS1 --pos 0x1281 --output VGA1 --pos 1281x0
xrandr --auto

I fixed this in in Display settings (System Settings --> Display). The three monitors I use are different sizes, but after dragging the monitors so that they were aligned along the bottom axis, my icons returned my primary monitor on the left

Like this

The Issue

Icons stay in the top blank black spot of the smaller display (usually laptop)

✅ Ugly Fix

File Manager > Desktop > Drag icons to the smaller display & they will relocate

Pros: Very quick
Cons: Repeat every time a new icon is added


Cannot delete old kernels I ran the command:

dpkg -l | grep linux-image-

and got this list

rc linux-image-3.13.0-51-generic 3.13.0-51.84
rc linux-image-3.13.0-52-generic 3.13.0-52.86 rc linux-image-3.13.0-53-generic 3.13.0-53.89
rc linux-image-3.13.0-54-generic 3.13.0-54.91
rc linux-image-3.13.0-55-generic 3.13.0-55.94 rc linux-image-3.13.0-57-generic 3.13.0-57.95 rc linux-image-3.13.0-58-generic 3.13.0-58.97
rc linux-image-3.13.0-59-generic 3.13.0-59.98
rc linux-image-3.13.0-61-generic 3.13.0-61.100
ii linux-image-3.13.0-62-generic 3.13.0-62.102
rc linux-image-extra-3.13.0-30-generic 3.13.0-30.55 rc linux-image-extra-3.13.0-46-generic 3.13.0-46.79
rc linux-image-extra-3.13.0-49-generic 3.13.0-49.83
rc linux-image-extra-3.13.0-51-generic 3.13.0-51.84
rc linux-image-extra-3.13.0-52-generic 3.13.0-52.86 rc linux-image-extra-3.13.0-53-generic 3.13.0-53.89
rc linux-image-extra-3.13.0-54-generic 3.13.0-54.91
rc linux-image-extra-3.13.0-55-generic 3.13.0-55.94
rc linux-image-extra-3.13.0-57-generic 3.13.0-57.95
rc linux-image-extra-3.13.0-58-generic 3.13.0-58.97
rc linux-image-extra-3.13.0-59-generic 3.13.0-59.98
rc linux-image-extra-3.13.0-61-generic 3.13.0-61.100
ii linux-image-extra-3.13.0-62-generic 3.13.0-62.102
ii linux-image-generic 3.13.0.62.69

So I then ran:

sudo apt-get autoremove linux-image-3.13.0-51-generic

and got this:

Reading package lists... Done Building dependency tree
Reading state information... Done Package 'linux-image-3.13.0-51-generic' is not installed, so not removed 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

So do I or do I not have unused old kernels on my system and how should I remove them??

In the first two columns of your dpkg -l generated list of kernels  you will find information on the package as follows:

Column (desired action):

u = Unknown
i = Install
h = Hold
r = Remove
p = Purge

Column (package status):

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

For your first example

rc linux-image-3.13.0-51-generic 3.13.0-51.84

it will hence tell us that the packages was removed (r) but the configuration files are still there (c). Only those kernels marked ii are actually installed on your system. Autoremove will only remove obsolete kernels but will leave the configuration files.

To also remove these we'd have to purge an installed package (sudo apt-get purge <package>) but leaving them does no harm and they do not need much hard drive space.

sudo apt-get autoremove linux-image-3.13.0-51-generic

In the past I have had success with:

sudo apt-get purge linux-image-3.13.0-51-generic

If that doesn't work try reading this great article:

http://tuxtweaks.com/2010/10/remove-old-kernels-in-ubuntu-with-one-command/


Installing Ubuntu 12.04 freezes when Running “grub-install dummy” When installing Ubuntu 12.04 server from a disc, my system freezes up after the installation comes to Installing GRUB boot loader. I'm installing from scratch, no partitions or OS is on this computer. This is where it hangs:

  Running "grub-install dummy"

Here's my syslog file:

http://paste.ubuntu.com/1122029/

And here's the specs for the computer:

General Spec

Model: TS-0002QC-AMDX203
Processor: AMD Dual Core E-450 1.65GHz
Memory: 2GB
Hard Drive: 500GB

Any help would be great!

No idea what's causing the freeze (your syslog doesn't contain anything I can identify as useful for diagnosis), but a possible workaround would be to use the text-mode installer from the alternate CD (go here and choose one of the options with "alternate" in the filename).

It's less pretty, but more flexible and you're more likely to be able to see what's going wrong.

I don't have a real solution for getting the installer to work - I hit this problem and the only way I found to get around it was to install ubuntu to the drive from another computer. In my case I installed via VMWare on a mac, mounting the SATA drive via a USB adaptor. After reinstalling the drive in the computer, it booted up just fine.


How to disable/hide paid apps from Ubuntu Software Center? Possible Duplicate:
  Is it possible to remove the commercial programs section from the Software Center?

Is there a way to disable or hide paid apps from Ubuntu Software Center (Ubuntu 11.10)? Or a way to permanently filter apps by licence: open source / closed but free / paid?

Also if you click on the more info button on any application it tells you the price, the license and any other info you are likely to need.  I know it's not exactly filtering but it should help you make decisions on whether to install or not.

Yes. In the toolbar, where it says "All programs", you can click the arrow and select "From Ubuntu" instead.


Lubuntu 14.04.1 -- no audio from HDMI I recently put together a new computer as an HTPC. I've tried a few different flavors of Linux on it before settling on Lubuntu. The only problem? I can't get any sound out from the system whatsoever.

I've tried both Lubuntu 14.10, and Lubuntu 14.04. I was able to get the audio working (albeit crackling) when I had Ubuntu 14.04 and Ubuntu 14.10 installed. However, since both had more processing overhead and more features than I was going to use, I stepped down to Lubuntu.

As the header says, I'm running my audio to my TV via HDMI, but I'm getting absolutely nothing out of it. When I run alsamixer, it identifies my card as "HD-Audio Generic", and my chip as "ATI R6xx HDMI". I know the ID for the device is 0,3, but that doesn't do me much good since I'm not much of a Linux power user.

Does anyone have any ideas to help me out? I've been working on it all week and it's driving me nuts. :/

After a little bit more testing, it appears no audio is working on the system at all. I plugged some headphones in, set the default audio output to the analog jack, and still got nothing. I verified nothing was muted, my sound was turned up to a decent volume... I still have no idea.

The output option to HDMI was not shown. In pavucontrol, you could set the whole device to

  Digital Stereo (HDMI) Output

This might fix it for you.

Simply open your video player and set the Video Option Output to HDMI. Bye. Paolo.


How to properly install ubuntu so it will boot on laptops designed for Windows10? I'm still struggling to boot my freshly installed Ubuntu 14 on my Toshiba Satelite Laptop. Previously there was Windows 10 on this laptop preinstalled. I formatted the hard drive and installed Ubuntu, but it won't boot... I can only use my computer from Live-USB Ubuntu... Please help me.

PS: I am NOT interested in dual-boot! I do not want to have any Microsoft products on my laptop. I just want to be able to run this machine with Ubuntu or perhaps other Linux distro if they are easier to boot properly.

PS2: I did disable secure boot!

I would install the Ubuntu 16.04 seeing it will be here in just a few weeks it will save you some time later.

Your best bet maybe booting from a USB drive if your machine is older

I'm not sure what specs you have on that machine but it will help us help you better.


Installing Dual Boot Ubuntu on a Dell Inspiron i5565-5850GRY with AMD FX-9800P My laptop had pre-installed Windows 10. I tried to install Ubuntu 16.043 as dual boot. The installation seems to be having an issue. During installation, while installing Ubuntu from the bootable USB, I have to pass "amd_iommu=off" as a kernel parameter, otherwise the installation goes into an infinite loop of showing the error "AMD-Vi completion loop timed out". Due to passing the kernel parameter, the installation has worked, but I have to pass it again every time I try to boot to Ubuntu. I have read that this kernel parameter is used to turn off virtualization. Is there any way to permanently turn off virtualization? I could not find it in the Boot menu. Is there any way to install and run Ubuntu without turning off virtualiation?

Specs:
Processor: AMD FX-9800P
RAM: 16 GB
HDD: 1 TB
Graphics card: Radeon R7 M445 Graphics
Also, could the issue be something other than virtualization?

You can permanently set the amd_iommu=off kernel parameter by referring to https://askubuntu.com/a/19487


How do I make Update Manager stop opening automatically? Update Manager keeps opening automatically and it's getting very annoying, especially when I'm using Gnome Shell. How do I make it stop?

This may work for you. I haven't verified if it works in GNOME.

Open the Software Sources application.
Select the "Updates" tab.
For the "Automatically check for updates" option, select Never.

After this, you will have to open the Update Manager application manually.

Should be

gconftool -s --type bool /apps/update-notifier/auto_launch false


Windows is not installing in ntfs partition of ubuntu I want to make my computer dual bootable. I have installed ubuntu 14.04. I followed tutorials on youtube. I have already made NTFS partition for the same. (image link from Gparted attached)

https://postimg.org/image/5qtdzhm1x/

While installing windows, it says "You cannt install in GPT partition". So it tried to use diskpart in cmd there, to convert it into MBR (read somewhere), but there it was showing only one disk of volume around 930GB (cant remember the exact value but it was of same range), and had a '*' mark on GPT type. So i cant convert it to MBR, bacause i may loose my data, right? How can i make it to MBR ? Or is there any other method to install/ make proper partition?

First, please understand that both the GUID Partition Table (GPT) and the Master Boot Record (MBR) are partition table formats. As such, they apply to the entire disk, not to individual partitions. That is, you can't have one partition in GPT form and another in MBR form. (A partial exception is if you use a hybrid MBR, but those are ugly and dangerous hacks that should be avoided except in certain limited situations, mostly involving Macs that dual boot with older versions of Windows.)

Second, the error message you received indicates that the Windows installation medium was booted in BIOS/CSM/legacy mode; when booted in this way, Windows insists on installing to an MBR disk, rather than to the GPT disk your computer has. The way the message is written makes it sound as if the partition table is the problem, but that's not really the case here -- it's the boot mode of the installation medium that's the problem. Your partition table makes it look as if Ubuntu is probably installed in EFI/UEFI mode. The key point here is that you should not mix boot modes -- if Ubuntu is installed in EFI mode, you should also install Windows in EFI mode. Although it's possible to back up and re-install Ubuntu in BIOS mode (on an MBR disk), or to convert your existing Ubuntu installation to BIOS mode (and to convert the disk from GPT to MBR), that's the hard way to resolve the problem.

The easy way to resolve the problem is to get the Windows installer to boot in EFI mode. There are several ways this may be done; however, no one method is guaranteed to work, because there are several possible reasons it's booting in BIOS mode now:

Disable the Compatibility Support Module (CSM) in your firmware. Unfortunately, a lot of Web sites suggest enabling the CSM as a routine part of Ubuntu installation, but that's bad advice, as described on this page of mine. If you disable the CSM on your computer, the Windows installation medium may start booting in EFI mode, and the installation should proceed normally.
Re-write the Windows boot medium. Depending on the Windows version, how you obtained the boot image, and how you prepared the boot medium (if the boot image didn't come as a physical medium), you may need to re-write the boot medium. Some tools omit or damage the EFI boot loader when preparing boot media, and some images (especially pirated images or very old versions of Windows) may lack the EFI boot loader entirely. My CSM page covers tools to write images, but from a Linux perspective; some details differ for creating Windows boot media. You might want to ask on a Windows forum if you need more help.
Use the computer's built-in boot manager to select the correct boot option. In some cases, the built-in boot manager may show two options to boot from an external medium, with one option including the string "UEFI" and the other lacking that string. Be sure to select the option that includes the "UEFI" string.

Note that Windows added EFI support with Windows 7; earlier versions lack EFI support and can only be installed in BIOS mode. (There are exceptions for exotic platforms.) Thus, if you're trying to set up a dual-boot with, say, Windows XP, you should ignore most of the preceding and convert to a BIOS-mode installation.

Finally, be aware that when you install Windows on an EFI-based computer, Windows will set its own boot loader as the default, and you will then be unable to boot to Ubuntu. There are several ways around this problem, such as:

You can use the computer's built-in boot manager in perpetuity -- the same one you use to tell the computer to boot to an external medium. It should present options for both Ubuntu and Windows. On many computers, though, accessing this boot manager is inconvenient, and on some there are bugs or design flaws that make this approach unworkable.
In Windows, download the EasyUEFI tool and use it to adjust the boot order; move the ubuntu entry to the top of the boot list. When you reboot, Ubuntu will boot. You'll then need to run sudo update-grub to make GRUB detect Windows. On subsequent boots, you should see both Windows and Ubuntu in the GRUB menu.
In Windows, open an Administrator Command Prompt window and type bcdedit /set {bootmgr} path \EFI\ubuntu\shimx64.efi. This does something similar to what EasyUEFI does, but without involving third-party software.
Install my rEFInd boot manager. You can do this in Windows (which is a bit tedious); or download the USB flash drive or CD-R version, use it to boot to Ubuntu, and install the Debian package or PPA. rEFInd will take over as the primary boot program and give you the option to boot either Windows or Ubuntu.
Run Boot Repair from an Ubuntu emergency disk. This tool will completely re-install GRUB and make it the default boot manager. This approach is overkill and, in rare situations, can make matters worse; but a lot of people are familiar with Boot Repair and so can help if you do run into problems with it.

There are quite a few variants on these options, as well as other more exotic possibilities, such as using any of half a dozen or so other boot loaders for Linux, as described on this page of mine. Using EasyUEFI is probably the easiest solution to the problem, followed by using bcdedit or installing rEFInd.

Note also that some computers have buggy or quirky EFIs that require extra steps to get them working. IMHO, if the computer is new enough, it's best to return it to the store for a refund rather than accept such a defective product, but few people do so.

AFAIK Ubuntu (and most other varieties of Linux-type operating systems) can interact with NTFS partitions but MS-Windows will not load into a Linux controlled environment.  One work-around would be to install MS-Windows onto a new, clean (maybe external) drive using the BIOS setup to make that the first bootable drive. Once MS-Windows is running OK then restart from a Linux bootable USB or DVD to install the Ubuntu system onto the new MS controlled drive. The Ubuntu system on the new drive would be able to access the files on the old drive and could be used to transfer them across to the new drive.


Connect to JBL bluetooth speaker I cannot find it from:

I cannot even turn bluetooth on from:

I can connect to this speaker from my Android phone, so I guess the problem is in Ubuntu 14.04.

I tried:

$ sudo hciconfig hci0 reset
Can't init device hci0: Operation not possible due to RF-kill (132)
$ sudo rfkill list
1: asus-wlan: Wireless LAN
    Soft blocked: no
    Hard blocked: no
2: asus-bluetooth: Bluetooth
    Soft blocked: yes
    Hard blocked: no
3: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
7: hci0: Bluetooth
    Soft blocked: yes
    Hard blocked: no

$ sudo rfkill unblock 2
$ sudo rfkill unblock 7

Now I can turn it on, but adding device button is disabled.

potential reason why...
converting my comment to an answer
Issues such as this are mostly due to kernel issues.  The kernel is the key underlying component that interfaces between the physical hardware and presents this in a controlled way that desktop software can usefully use and allow the user to control.
Bluetooth dongles are mostly USB based.   Most hardware today are USB2 based or USB3 based.  The kernel uses different modules to interrogate these two versions.
Assuming you are using USB3 to connect, there may be an underlying issue with the USB3 kernel module called XHCI.
so what can I do...
You should really test the latest kernels (at the time of writing 3.16 series) - but if you want continued support you need to work with the Canonical kernel developers to identify a solution.  Raise a bug-report - include details of the bug report that you've installed the latest kernels and they did/didnt work etc.
As a workaround, many BIOS's have the ability to downgrade USB3 ports - downgrade them to USB2 speeds.  This is called "XHCI PRE-BOOT MODE"
If you disable this mode, this should force the kernel to see your bluetooth device as a USB2 based device.

For Ubuntu 14.04 LTS:

1) Go to the bluetooth icon, typically top right of your screen

2) Set Up New Device...

3) Device type: Headphones... other audio devices.

That should make the speakers visible.
Select, continue & enjoy.


Cut column from list How can I  cut second column from the following list from terminal?

56    267
57    235
58    255
59    283

If the data is in a file called test.txt, awk '{ print $1 }' test.txt will do it.

If your data was separated with a comma then your operation will be a lot easier:

kmcet@ubuntu:~$ cat data.txt
123,456
123,789
123,567

kmcet@ubuntu:~$ cut -d, -f1,1  data.txt
123
123
123


apache show me php5 but I have already install php7 I have installed php7 but phpinfo() show me php5

Console show me php -v

php -v
jaskaran@jaskaran-OptiPlex-3020:/etc$ php -v
PHP 7.1.0RC6 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.1.0-dev, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.1.0RC6, Copyright (c) 1999-2016 , by Zend Technologies

phpinfo(); //output
PHP Version 5.5.9-1ubuntu4.20

In a php folder PHP 7.1

jaskaran@jaskaran-OptiPlex-3020:/etc$ cd php
php/        php5/       phpmyadmin/

jaskaran@jaskaran-OptiPlex-3020:/etc/php$ ls
5.5  5.6  7.0  7.1

Now can I move my php version in apache2 php5 to php7

Open a terminal

cd /etc/apache2/mods-enabled

sudo a2dismod php5

sudo rm php5.load

sudo rm php5.conf

sudo a2enmod php7.0

sudo ln -s php7.0.conf ../mods-available/php7.0.conf
sudo ln -s php7.0.load ../mods-available/php7.0.load

sudo a2enconf php7.0-cgi
sudo a2enconf php7.0-fpm

# do those commands only if the above didn't work out
sudo ln -s php7.0-cgi.conf ../conf-available/php7.0-cgi.conf
sudo ln -s php7.0-fpm.conf ../conf-available/php7.0-fpm.conf

sudo service apache2 restart


How to kill all tmux sessions (or at least multiple sessions) from the CLI? How to kill all tmux sessions (or at least multiple sessions) from the (Ubuntu) CLI?

When I do ps aux | grep tmux I see 3 processes:

UU      2970  0.0  0.0  19556  1228 pts/0    S+   02:48   0:00 tmux
UU      3445  0.0  0.0  12944   988 pts/5    S+   03:31   0:00 grep --color=auto tmux
UU     27557  0.0  0.2  29788  4840 ?        Ss   Jan04   0:02 tmux

How could I kill all of these at once (or at least some of them, selectivity) ?

You can use tmux kill-server to cleanly and gracefully kill all tmux open sessions (and server).

If you are inside a tmux session you would like to keep, use tmux kill-session -a to close all other sessions.

To close a specific session, use tmux list-sessions to identify the session you want to kill, and then use tmux kill-session -t targetSession to kill that specific session.

Also you can grossly kill all tmux processes with pkill -f tmux.

Hope it helps.

Given:
# tmux ls
session-0a: 1 windows (created Sat Dec  5 02:31:35 2020) [117x30]
session-84: 1 windows (created Sat Dec  5 01:55:18 2020) [190x47] (attached)
session-b3: 1 windows (created Sat Dec  5 03:23:44 2020) [94x13]
session-b2: 1 windows (created Sat Dec  5 02:45:00 2020) [104x14]
session-ae: 1 windows (created Sat Dec  5 01:55:18 2020) [190x47] (attached)

This will kill all sessions not attached by someone:
tmux list-sessions | grep -v attached | awk 'BEGIN{FS=":"}{print $1}' | xargs -n 1 tmux kill-session -t || echo No sessions to kill

References:

https://stackoverflow.com/questions/10411616/grep-regex-not-containing-string
https://unix.stackexchange.com/questions/33049/how-to-check-if-a-pipe-is-empty-and-run-a-command-on-the-data-if-it-isnt
How to kill all tmux sessions (or at least multiple sessions) from the CLI?


No more disk space: How can I find what is taking up the space? I've run into a problem on one of my servers running 16.04: there is no disk space left.

I have no idea what is taking up the space. Is there a command to list the current directory sizes, so I can traverse and end up in the directory taking up all the space?

As always in Linux, there's more than one way to get the job done. However, if you need to do it from CLI, this is my preferred method:

I start by running this as root or with sudo:

du -cha --max-depth=1 / | grep -E "M|G"

The grep is to limit the returning lines to those which return with values in the Megabyte or Gigabyte range. If your disks are big enough, you could add |T as well to include Terabyte amounts. You may get some errors on /proc, /sys, and/or /dev since they are not real files on disk. However, it should still provide valid output for the rest of the directories in root. After you find the biggest ones you can then run the command inside of that directory in order to narrow your way down the culprit. So for example, if /var was the biggest you could do it like this next:

du -cha --max-depth=1 /var | grep -E "M|G"

That should lead you to the problem children!

Additional Considerations

While the above command will certainly do the trick, I had some constructive criticism in the comments below that pointed out some things you could also include.

The grep I provided could result in the occasional "K" value being returned if the name of the directory or file has a capital G or M. If you absolutely don't want any of the K valued directories showing up you'd want to up your regex game to be more creative and complex. e.g. grep -E "^[0-9\.]*[MG]"
If you know which drive is the issue and it has other mounted drives on top of it that you don't want to waste time including in your search, you could add the -x flag to your du command. Man page description of that flag:

  -x, --one-file-system
      skip directories on different file systems

You can sort the output of the du command so that the highest value is at the bottom. Just append this to the end of the command: | sort -h

Similar to @TopHat, but filters some files if they have M, G, or T in the name. I don't believe it will miss size in the first column, but it won't match the filename unless you name files creatively.

du -chad 1 . | grep -E '[0-9]M[[:blank:]]|[0-9]G[[:blank:]]|[0-9]T[[:blank:]]'

Command line switches explained here since I didn't know what the c or a did.


How do I disable middle mouse button click paste? Is there a way to disable the middle mouse button paste behavior that is here by default on gnome?

I have a sensitive mouse wheel and whenever I scroll texts, sometimes it pastes stuff randomly into the text. I lose quite a lot of credibility when I send a file to someone else that has random text snippets pasted all over it.

I have seen a solution that goes by mapping the mouse's middle button to a non-existant mouse button, but that implies getting rid of the middle mouse button altogether (i.e. no tab-closing, opening links into a new tab automatically, etc.). I'd like to keep my middle mouse button active, just disable the pasting behavior.

This also happens when I scroll text with my touchpad (accidentally hit two-fingers without moving, bam.)

So the problem will not be fixed just by changing for a new mouse (in fact I believe it happens more often with my touchpad than with my mouse).

I use gnome-tweak-tool for disabling middle button paste in Ubuntu 16.04.

Install it

sudo apt install gnome-tweak-tool

Run it by searching "tweak tool" in installed apps or just type gnome-tweak-tool in a terminal.
Go to "Keyboard and mouse" -> "Middle-click paste"
Turn off.

That's it.

Or using just CLI

gsettings set org.gnome.desktop.interface gtk-enable-primary-paste false

Tested on 16.04.

did you check out gpm ? More info at http://manpages.ubuntu.com/manpages/lucid/man8/gpm.8.html. Available via sudo aptitude install gpm on lucid. I don't see the disable-paste program in the ubuntu package however, the -A option may be worth giving a try.


I can't play mp4 videos in Parole version 0.9.1 (codec missing), Xubuntu 16.04.6 I can't fix Parole media player to play mp4 videos! I search and research on internet but none of suggestions worked for me. I installed latest version via Ubuntu repositories but no avail to play video, I got the following message :

"Required plugin could not be found"

"Parole Media Player requires to install plugins to play media files of the following type: H.264 (Main Profile) decoder"

Before upgrading to version 0.9.1 I had version 0.8.1, also not playing videos.
What can I do to fix this? I have all dependencies installed (for parole, for gstreamer, and so on). Attached screenshot of parole. Thanks, Vladi

I had this problem on Fedora and fixed it by installing gstreamer1-plugin-openh264. I'm not sure if the package name is the same on Ubuntu though.


bash: ./program: cannot execute binary file: Exec format error I'm trying to run a program, but an error happens like this:

bash: ./program: cannot execute binary file: Exec format error

The result of file program was:

program: ELF-32-bit LSB executable, ARM, EABI4 version 1 (SYSV), dynamically linked(uses share libs), for GNU/LINUX 2.6.16, not stripped

How can I fix this error?

I'm using Ubuntu 14.04.2 (amd64) with VMware. I also tried with Ubuntu i386, but result was same.

You're trying to run an executable compiled for an ARM architecture on an x86-64 architecture, which is much like asking your processor who only speaks English to take directions in Chinese.

If you need to run that executable you have two choices:

Get an x86-64 version of the executable (by any mean; if you're unable to get an x86-64 version of the executable but you're able to get its source code, you can try to recompile it on the virtual machine);
Install Ubuntu Server for ARM in place of Ubuntu 14.04.2 (amd64). This requires either a physical machine running on an ARM architecture or a virtualization software that can emulate it.

This can also happen if the binary uses a libc implementation which is not libc, such as musl. These days this specific problem is most likely encountered when trying to run a binary with libc in a Docker container with an image based on alpine. There is nothing that can be done to the binary itself to support both environments, because the libc implementation must always be linked statically, i.e. built directly into the binary, for reasons.


Ubuntu 16.04 Cannot install libvirt-bin because of dependency errors As the title suggests, I am currently pulling my hair over a dependency error on libvirt-bin. I need it to setup KVM for Android Emulation (learning to make apps for it) and I can't get libvirt-bin to install for the life of me. Here's the terminal output including me trying to go down the dependency rabbit hole:

kyle@kyle-EP43-UD3L:~$ sudo apt -f install libvirt-bin ubuntu-vm-builder bridge-utils Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies:  libvirt-bin : Depends: libnetcf1 (>= 1:0.2.2) but it is not going to be installed E: Unable to correct problems, you have held broken packages. kyle@kyle-EP43-UD3L:~$ sudo apt install netcf Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies:  netcf : Depends: libnetcf1 (= 1:0.2.8-1ubuntu1) but it is not going to be installed E: Unable to correct problems, you have held broken packages. kyle@kyle-EP43-UD3L:~$ sudo apt install libnetcf1 Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies:  libnetcf1 : Depends: libnl-route-3-200 (>= 3.2.7) but it is not going to be installed E: Unable to correct problems, you have held broken packages. kyle@kyle-EP43-UD3L:~$ sudo apt install libnl-route-3-200 Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies:  libnl-route-3-200 : Depends: libnl-3-200 (= 3.2.27-1) but 3.2.27-1ubuntu0.16.04.1 is to be installed E: Unable to correct problems, you have held broken packages. kyle@kyle-EP43-UD3L:~$ sudo apt install libnl-3-200 Reading package lists... Done Building dependency tree        Reading state information... Done libnl-3-200 is already the newest version (3.2.27-1ubuntu0.16.04.1). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Basically, going down the list of dependencies that are not going to be installed, it seems to be because of lbnl-3-200 being an ubuntu version not the version that literally all the other libs want...

Any ideas how to fix this damn issue, I can't find anything on it online.

Install libvirt-bin following the steps below:

Download libnl-route-3-200.
Now similarly download libnetcf1 and libvirt-bin. In a terminal change the working directory to the download directory and the run the commands:

sudo dpkg -i libnl-route-3-200_3.2.27-1ubuntu0.16.04.1_amd64.deb libnetcf1_0.2.8-1ubuntu1_amd64.deb libvirt-bin_1.3.1-1ubuntu10_amd64.deb

Use sudo systemctl restart libvirt-bin.service to restart the service.
Use sudo systemctl status libvirt-bin.service to see the libvirt status.

I faced same issue.
Got resolved by adding xenial-updates and xenial-backports to the sources list.


How to customize GDM Login Screen on Ubuntu 17.04 Zesty ubuntu-gnome How can I customize gdm Login Screen on Ubuntu 17.04 Zesty  ubuntu-gnome? Just background and maybe gtk themes.

I have tried many things and none seems to work.

Like this guide https://help.gnome.org/admin/system-admin-guide/stable/desktop-shield.html.en

Also I have tried to edit:
/usr/share/gdm/greeter.dconf-defaults && dconf update
and similar solutions.

I didn't find any graphic tool that works. Many docs on Internet only talks about really old ubuntu versions, gdm2 etc.

Just to be clear, Im using UBUNTU-GNOME version - 17.04 Zesty

Thanks

The login screen is now managed by ligthdm.

sudo apt-get install lightdm-gtk-greeter
sudo apt-get install lightdm-gtk-greeter-settings

Run lightdm-gtk-greeter-settings to confgure


Running a .sh file without root I've recently downloaded a game (Mark of the Ninja from Humble Bundle 9 to be exact) to play on Ubuntu. From what I can tell after extracting the game, it is stand-alone and doesn't require installation on the computer you want to play it on (I want to play it off my flash drive at university). However, as I don't have root access on the computers at university, I can't use chmod +x ninja-bin to allow executing the main ninja-bin.sh file as a program instead of opening it in gedit. Also, when I try executing it via the terminal using ./ninja-bin I get bash: ./ninja-bin: Permission denied. Is there any workaround for this for which I don't need root access? Or should I just not try to play games on a computer which I don't have root for?

Thanks

If you are not a member of sudo group and if your access to chmod command was blocked, then there is nothing that you can do. Due to these reasons Linux like systems are known for their security.

Or, maybe you can do something: convince the admin (root) to change the permissions for that file :).

Yes, run it with sudo:

sudo ./ninja-bin

I suppose the elevated rights are required during install procedure.


Disable “A new version of Sublime Text is available, download now?” in Sublime 3 (stable channel) I am using package manager to handle updates without manual reinstallation.

I installed Sublime as recommended in How do I install Sublime Text 2/3? with:

sudo add-apt-repository ppa:webupd8team/sublime-text-3
sudo apt-get update
sudo apt-get install sublime-text-installer

My user settings, after change recommended in https://forum.sublimetext.com/t/disable-update-available-pop-up/1381 are following:

{
"font_size": 11,
"ignored_packages":
[
"Vintage"
],
"tab_size": 3,
"update_check": false
}

Despite this on every Sublime Text start I am attacked by "A new version of Sublime Text is available, download now?"

How can I get rid of this obnoxious popup?

I know that it goes away after ppa is updated and I apply upgrade - but after every release I have about week of pointless, unremovable message spam.

According to https://github.com/SublimeTextIssues/Core/issues/1206#issuecomment-221630273 this is one of functions that is removed from evaluation version of Sublime Text.

"update_check": false

in user settings has no effect in an unpaid version.

Set "update_check": false in user settings has no any effects in an unpaid version. Instead, I just take a easy way by adding a hosts rule 127.0.0.0 www.sublimetext.com in /etc/hosts file. But take care, when you want to install some packages, you may remove this rule temporarily.


Ubuntu 20.04 | App to make live ISO? I need an application similar to Pinguy Builder (which creates an installable ISO image of your current system) that works on Ubuntu 20.04

If there isn't one, is it possible to downgrade, make the ISO, install, and then reupgrade?

Thanks in advance.

Pinguy Builder Menu Based 5.2.1 dist mode works after making changes in pinguy conf file in the folder /usr/bin. For me it worked of Linux Mint 20 Cinnamon.
#Cleaning Apt and backing up
# find /etc/apt -type f -iname \*.save -delete &> /dev/null
# find /etc/apt -type f -iname \*~ -delete &> /dev/null
 tar pczvf /root/apt.tar.gz /etc/apt &> /dev/null
 sed -i "s/deb/#deb/g" /etc/apt/sources.list.d/*.list
 sed -i "s/deb/#deb/g" /etc/apt/sources.list
 echo "$SOURCESLIST" >> /etc/apt/sources.list
 apt-get update  &> /dev/null
.
.
.

if [ "`ps axf | grep startkde | grep -v grep`" != "" -o "`ps axf | grep kwin | grep -v grep`" != "" ]; then
        log_msg "Installing the Ubiquity KDE frontend"
    #   apt-get -y -q purge ubiquity-casper &> /dev/null
    #   apt-get -y -q purge ubiquity &> /dev/null
    #   apt-get -y -q remove ubiquity-ubuntu-artwork &> /dev/null
        apt-get -y -q remove ubiquity-frontend-kde &> /dev/null
        apt-get -y -q install ubiquity-frontend-kde &> /dev/null
        apt-get -y -q remove ubiquity-frontend-gtk &> /dev/null
        chmod +x /usr/share/applications/kde4/ubiquity-kdeui.desktop &> /dev/null
        sed -i "s/ubiquity kde_ui/pkexec ubiquity kde_ui/" /usr/share/applications/kde4/ubiquity-kdeui.desktop
    else
        log_msg "Installing the Ubiquity GTK frontend"
     #  apt-get -y -q purge ubiquity-casper &> /dev/null
     #  apt-get -y -q purge ubiquity &> /dev/null
     #  apt-get -y -q remove ubiquity-ubuntu-artwork &> /dev/null
        apt-get -y -q remove ubiquity-frontend-gtk &> /dev/null
        apt-get -y -q install ubiquity-frontend-gtk &> /dev/null
        apt-get -y -q remove ubiquity-frontend-kde &> /dev/null
        chmod +x /usr/share/applications/ubiquity.desktop &> /dev/null
        sed -i "s/sh -c 'ubiquity

    # Replacing Ubiquity icons
    cp -a /etc/PinguyBuilder/icons /usr/share/
    chmod 775 -R /usr/share/icons
    rm -rf /usr/share/icons/hicolor/256x256/apps/ubuntu-logo-icon.png
    ln -s /usr/share/icons/ubuntu-logo-icon.png /usr/share/icons/hicolor/256x256/apps
    chmod 777 /usr/share/icons/hicolor/256x256/apps/ubuntu-logo-icon.png
    chmod 777 /usr/share/icons/ubuntu-logo-icon.png
    gtk-update-icon-cache
    update-icon-caches /usr/share/icons/*
#   rm -r /etc/apt &> /dev/null
#   tar -xf /root/apt.tar.gz -C / &> /dev/null


HDMI TV Stopped Working After Crash - Ubuntu 16.10 - Lenovo Thinkserver TS140 - Integrated Intel HD Graphics 4600 After a system crash my HDMI TV stopped working. I fiddled around with it unplugging and re-plugging the TV and after a while it started working again. After a few weeks my system crashed this morning as I was installing another program and now the TV stopped working again.

I ran sudo xrandr and it does see anything on HDMI-1 or HDMI-2. I've tried different HDMI cords, converters, and different HDMI connections on the TV without luck. I am able to plug in a monitor to the VGA connection see the desktop. The monitor is also choppy on the VGA connection and sometimes super slow when I remote in via TightVNC from my windows laptop.

I also received this message during the troubleshooting:Error

At this point I'm not sure how to troubleshoot (I've searched other posts - still fairly new to Ubuntu).

Any help and/or troubleshooting steps anyone could provide would be very much appreciated!

This is my setup:

Computer
Lenovo Thinkserver TS140
Model: 70A4001MUX
4GB RAM
500GB HD
5U Tower Server Desktop PC
Integrated Intel HD Graphics 4600
https://lenovopress.com/lp0034.pdf

TV
Samsung 43” HDTV
1080p
1920 x 1080

OS
Ubuntu 16.10

Computer to TV Connection
Computer DVI port --> DVI/HDMI converter --> HDMI Cable to TV

Assuming the problem is not with your TV try installing the closed source drivers from Intel https://01.org/linuxgraphics/downloads/intel-graphics-update-tool-linux-os-v2.0.4 and disabling secure boot http://www.techzim.co.zw/2017/01/heres-guide-installing-intel-graphics-driver-ubuntu-16-04/


Error could not find libjava.so when running java binary I uninstalled  jdk 1.8 and installed JDK 1.7 on my ubuntu but when I am trying to run java ,I am getting the following Error:

sana@sana:~$ java -version
Error: could not find libjava.so
Error: Could not find Java SE Runtime Environment.

Try rebooting your computer after installing it and try again.

Or you could have a problem similar to this one: https://stackoverflow.com/questions/25954348/error-could-not-find-libjava-so-error-could-not-find-java-2-runtime-environme

One of the poster mentions he has 2 versions installed: "I encounter this issue before. It turns out there are 2 javac program sitting on my machine. They are in /usr/bin/javac and /bin/javac. My system used the /bin/javac one. The right path for me is /usr/bin/javac. Removing /bin/javac helped"


I cannot play videos in facebook using linux 20.04 I am unable to play videos in facebook or bbc iplayer. I am using firefox as my browser. In facebook,the video looks just the same after I press "play" as before. Its as though I have not pressed play at all.  In bbc iplayer I get the message "this content doesn't seem to be working. Please try again later". I have tried several suggestions from this site including:

$ sudo apt-get install gnome-tweaks
$ sudo apt-get install libdvdnav4 libdvdread4 gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly libdvd-pk
$ sudo apt-get install ubuntu-restricted-extras

amongst others

Each time I get the following error message and have no idea what it means:

Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 4730 (apt-get)
N: Be aware that removing the lock file is not a solution and may break your system.
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?

Please note, I am not an experienced linux user and my knowledge of coding and using the command terminal is very limited (the sudo commands I used above were copy pasted from similar problems posted on this website). I would therefore appreciate any explanations in clear, plain english, assuming no knowledge of coding or even how video enablement works in linux. Thank you

For video playback in the browser you only need to install the package ubuntu-restricted-extras. To do so open a terminal and type:

sudo apt install ubuntu-restricted-extras

Should that still fail with the error message you posted above, reboot and try again. Should the error persist, a previous update might have been interrupted and left the lock file in place, as Pilot6 commented above. To fix that:

In a fresh terminal type sudo rm  /var/lib/dpkg/lock-frontend
Then make sure, all packages are installed correctly with sudo apt-get -f install
Make sure the codecs are installed correctly with sudo apt install ubuntu-restricted-extras. When you are prompted to accept the EULA for the Microsoft fonts package, use Tab and Enter to agree.

After restarting your browser, video playback should work.

I tried and failed to get videos to work.
I install both clv and mpv and found that both worked.
I chose to set music and video in Settings -> Default Applications to mpv.
Whist I was fighting videos I may have install various codex which might just be essential to mpv.


Wireless internet connection not working following update After updating some packages last night my wireless on my Toshiba Satellite A210 isn't working. Any suggestions how I can fix this?

Cheers.

You can use this command to unblock all wireless devices:

sudo rfkill unblock all


Ubuntu phone - cannot pin app to launcher I am attempting to pin an app to the Ubuntu phone (E5 Aquaris) launcher, but when holding the temporary icon the menu to pin the icon does not appear.

Go to system settings scroll down to Reset phone select Reset Launcher, confirm the same and it should work :-)

Are you trying to pin to bar on left? If so open the app you want, then when the app is open slide from left to get bar up, then hold the app icon (on left bar) there for a few seconds, the option to pin should arrive.

Is this what you wanted?


Ubuntu 12.04 32bit cant login I have tried almost every comment in this subject.
my .xsession-errors file says:

openConnection: connect: No such file or directory
cannot connect to brltty at :0

and that is all. I can login as a guest but not with my account.

After some days with this issue and many SO threads read, I found that this seems to be an Ubuntu open Bug (Status 'Incomplete' as of July 2015).

More information about it here: https://bugs.launchpad.net/ubuntu/+bug/1285444

The quick solution seems to be to rename the file that stores dconf settings:

$ mv ~/.config/dconf/user{,.old}

My problem was solved by turn off auto login.


Ubuntu 14.04 install using Wubi on Windows 8.1 no preinstall I have Dell laptop on which I have installed Windows 8.1. It is not pre-installed setup but I have later upgraded my windows to 8.1 version from 7->8->8.1.

I was able to install Ubuntu 12.04 using Wubi (because I don't have that secure boot or UEFI stuff) and it is working great.

But now I want to install Ubuntu 14.04, however upon trying to install, it did not show me the menu and directly went to this page (window).

How can I force it to install with 14.04 because I know it works perfectly atleast on my computer.

You must be trying to install it from disk image after mounting it on Drive G or H or whatever..
YOu have to extract it in to a folder and then have to go for the installation.


Permanently removing apache2 It seems a simple apt-get remove apache2 does not completely remove apache2 as I can still see it on one of the processes when running top. How does one remove apache2 completely on his ubuntu server?

It's not removed indeed:

~# which apache2
/usr/sbin/apache2
~# whereis apache2
apache2: /usr/sbin/apache2 /etc/apache2 /usr/lib/apache2 /usr/share/apache2 /usr/share/man/man8/apache2.8.gz

But when I do apt-get remove apache2 again:

# apt-get remove apache2
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package apache2 is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

apache2 is a metapackage that just selects other packages. If you installed apache by installing that package, you just need to run this to clean up the automatically selected packages:

sudo apt autoremove

If that doesn't work, you might have installed one of the dependents manually. You can target all the apache2- packages from space and nuke the lot:

sudo apt remove apache2.*

For future reference, to find out which package a binary is from, you can run this:

dpkg -S `which apache2`

I'd expect that to come back with apache2.2-bin (at the time of writing).

Remove apache2 from the Ubuntu

To remove totally from your localhost
1st check the current status using
service apache2 status

if it's active (running)
write next
sudo apt remove apache2*

Say yes using y.


Where are MTP mounted devices located in the filesystem? I have an Android phone that connects with my computer via MTP. This works fine; I can see and transfer files with Nautilus. However, I often want to use the terminal to move large numbers of files, and I cannot seem to find the device anywhere in the filesystem tree. Nautilus reports the location as mtp://[usb:003,007]/, but it's not under /media or /mnt.

Does anyone know where it is?

As you have already found out, the mountpoints are in /run/user/$USER/gvfs/ (or /var/run/user/$UID/gvfs) and are named after the protocol, connection type and address they use. Which makes things more difficult, because the connection address may change every time you replug the device, even if it is the same port. If you have the same device twice it gets even worse.

You can use lsusb to display all connected USB devices from terminal:

$ lsusb | grep Google   # Note: This is a Nexus 4, change accordingly
Bus 002 Device 025: ID 18d1:4ee2 Google Inc.

As you have noticed Nautilus also gives this information via tool tip. You will find the encoded form of e.g. mtp://[usb:002,025] in /run/user/$USER/gvfs (or /var/run/user/$UID/gvfs) as mtp:host=%5Busb%3A002%2C025%5D

Asker's edit: This seems to require a newer version of libmtp and/or gvfs than is available per default in 13.04. Run sudo add-apt-repository ppa:langdalepl/gvfs-mtp and update before doing anything else.

Edit: PPA not needed anymore in saucy/13.10 and newer, filenames are listed in terminal as they are in Nautilus.

Edit 2016-01-11: I removed the script that was previously included in this answer due to lack of time for maintenance and improvements. You can still find it in the revision history.

I am able to manage files on a MTP connected Android device using gvfs-* commands (e.g. gvfs-cp, gvfs-move, ...) which are also mentioned in the following Wikipedia article: GVfs.

I wrote a simple CLI utility for file synchronization to/from an Android device: https://github.com/DusanMadar/PySyncDroid


LLVM-3.1 libLLVMSupport.a undefined reference to `dladdr' I'm trying to compile using the llvm-3.1 package.
I'm running 12.04 x64 (3.2.0-26 kernel) && 12.10 (3.5.0-4) x64  backported llvm-3.1 from quantal, then debian experimental.
Next I tried 12.10 with the native ubuntu llvm-3.1 package; this failed as well.

user@system:/tmp/llvm-test# make
compiling cpp yacc file: decaf-llvm.y
output file: decaf-llvm
bison -b decaf-llvm -d decaf-llvm.y
/bin/mv -f decaf-llvm.tab.c decaf-llvm.tab.cc
flex -odecaf-llvm.lex.cc decaf-llvm.lex
g++ -o ./decaf-llvm decaf-llvm.tab.cc decaf-llvm.lex.cc decaf-stdlib.c `llvm-config --cppflags --ldflags --libs core jit native` -ly -ll
/usr/lib/llvm-3.1/lib/libLLVMSupport.a(Signals.o): In function `PrintStackTrace(void*)':
(.text+0x6c): undefined reference to `dladdr'
/usr/lib/llvm-3.1/lib/libLLVMSupport.a(Signals.o): In function `PrintStackTrace(void*)':
(.text+0x18f): undefined reference to `dladdr'
collect2: error: ld returned 1 exit status
make: *** [decaf-llvm] Error 1

I know the code works as I've run it in centos fine using llvm-3.1-6.fc18(rpm)

Google was a bit helpful with this:

"On some systems, incluning Ubuntu 11.10, linking may fail with message
that libLLVMSupport.a in function PrintStackTrace(void*) has undefined
reference to dladdr."

  "Workaround is to compile LLVM with cmake specifying the following
  variable:
  -DCMAKE_EXE_LINKER_FLAGS=-ldl"

http://svn.dsource.org/projects/bindings/trunk/llvm-3.0/Readme

I double checked y ldflags and everything seems ok.

user@system:/llvm-config --ldflags
-L/usr/lib/llvm-3.1/lib  -lpthread -lffi -ldl -lm

I'm unclear of what to do next; any suggestions?

I asked (and answered) a similar question on Stack Overflow. Adapting my answer from that question to yours:

The library requiring the symbols is included by -lLLVMSupport, so -ldl must come after -lLLVMSupport. See Why does the order of '-l' option in gcc matter? on Stack Overflow. You need to change this:

`llvm-config --cppflags --ldflags --libs core jit native`

To this:

`llvm-config --cppflags --libs core jit native` `llvm-config --ldflags`

And the linker should be successful. Let me know if you find a better solution to fix the order of --ldflags.

sudo apt-get install libx11-xcb-dev llvm-dev x11proto-gl-dev x11proto-dri2-dev libxext-dev libxdamage-dev libxfixes-dev libxcb-glx0 libxcb-glx0-dev libpng12-dev


Ubuntu 16.04 LTS still not offering dist-upgrade to 18.04 LTS I'm running Ubuntu 16.04 LTS. From what I understand, by now, sudo do-release-upgrade should offer an upgrade to 18.04 LTS, but I still get No new release found. when trying that. What else could I try?

(I realise that I probably need to supply more information to identify the issue, so please let me know which info I should be adding here.)

MOST IMPORTANT: Disable all power saving, screen time-out, screen
saver, auto logout, etc settings.

[1] In Software & Updates set Notify me of a new Ubuntu version''
    toFor any new version''.

[2] From the command line run ``update-manager''

That should do it.


retrieving contents of multiple subfolders, and move them into single folder I have downloaded over 7000 ebooks from Project Gutenburg, but I have an issue. Each book has been placed in its own zip file, and each zip file has been given its own folder. My problem is that I do not want to have to go through each file and unzip them and put the ebooks in one place manually. If I can get the zip files in one place, it will be an easy job to unpack all of them with one command.

So, how do I get my files into one folder, instead of in their own subfolders?

Assuming that all the directories that contain the zip files have a common parent, you could use find to find all of the zip files then execute unzip on those files specifying the directory to extract the files to:

find /path/under/zip/folders -name "*.zip" -exec unzip {} -d /target/path \;

Do you have experience using wildcards? you could do something like

mv common_part_of_folder_name*/*.zip .

where the asterisk symbol basically means "anything". If you only have the gutenberg in your directory, you can just run

mv ./*/*.zip .

to get all the zip files into your current directory. If it's much more complex than that, a Perl or shell script might be the way to go.


Different behaviors for different user levels I'm using an application which I can install plugins.

When I don't open the application with sudo I can't install those plugins, but when I open the application with sudo, I can.

I don't want to open the application every time using sudo, I just want to login in my user and open the application and work on it. What do I have to do?

As per my comment indicating your problem, you have been running applications under sudo which is giving ownership of files in your personal space to root.

You added an answer, which may have been your attempt to respond to the my comment.  Your question suggested that you have a number of applications that you are having problems with.  You can cure all the problems with two command lines.

You can verify and see which files are not owned by you with this command line:

$ find ~/ -mount ! -user $(whoami)

You can take ownership of the files in your space with:

$ sudo chown -R $(whoami):$(whoami) ~/

Those two command lines will fix all the permissions you have for all your applications.

I just fixed the problem.

I was trying to install a theme in the program named Brackets, it's an IDE I like to write HTML.
Every time I tried to install a theme, the Brackets gave me an unexpected error, so, I tried to do the same thing opening the Brackets in the Terminal with the sudo command, and it worked very well, I could install the theme.
The problem is I did not like to open Brackets with sudo command every time.
I found where Brackets installs the plugins, that is, the directory where Brackets installs the themes, and I gave permission to my user to this directory.

Please, let me know if this is enough.

Thanks !


I've filed an ITP bug on bugs.debian.org - now how do I get the package into Ubuntu? I've written a development library that I would like to include in the Ubuntu archives. From what I understand, the best way to do this is to first get the package into Debian and then request a package sync.

Here is the ITP bug.

What do I do now?

Looking at this page, I see horrifying things like "419 days in preparation" and "last activity 404 days ago". I get the impression that getting a package into Debian is a slow process.

Is there anything I can do to speed up the process? I've tried to do as much work as I can to smooth out the process - I've got a branch with Debian packaging (which gets by Lintian without any errors).

As you've already worked out, creating an ITP bug doesn't get your package into Debian.
ITP bugs are how the Debian maintainers let each other know what they are working on, and elicit comments on proposed new packages.
There are hundreds of such bugs, and most of them aren't showing much progress.

So, you need to move along to the next step, which is to find a sponsor for your package.
The mentors site has a guide that you may find useful here.
You've got as far as step 3 in that process.

I suggest uploading your package to mentors.debian.net, and filing a sponsorship request bug.

Once your package is in Debian unstable, it would be automatically synced to the Ubuntu development release. Assuming Ubuntu was currently pre-Debian-Import-Freeze, if not, it'd have to wait until the next Ubuntu release.

i'll sugget you to connect any Debian Maintainer you know , or you should just go to the irc room and ask for help.

here are few links you should read before you ask question

https://www.debian.org/doc/manuals/debmake-doc/index.en.html

and

https://www.debian.org/doc/manuals/maint-guide/


Can't login after killing X Server with encrypted home directory I have ctrl-alt-backspace enabled to terminate Xorg in an xorg.conf.d file:

Section "InputClass"
        Identifier      "Keyboard Defaults"
        MatchIsKeyboard "yes"
        Option          "XkbOptions" "caps:super,terminate:ctrl_alt_bksp"
EndSection

This successfully kills the server and brings me back to the lightdm login screen. But after doing this I can't login anymore. After entering my credentials lightdm goes black for a second and then brings me back to the login screen.

I think the problem might be related to my encrypted home directory. After a reboot, if I login via a virtal console (ctrl-alt-F1) my home directory gets properly decrypted and mounted. If I stay logged in via the virtual console I can kill the X server and still login again in lightdm, presumably because my home directory didn't get unmounted (as I still had an active session open). But if I logout of the virtual console, killing the X server results in me not being able to login via lightdm and if I login using the virtual console my home directory doesn't get automatically unencrypted/mounted. According to the README that I see when my $HOME isn't mounted, I should be able to run ecryptfs-mount-private, but when I run that it exits immediately with an exit code of 0 and no error messages and it doesn't mount my home directory.

This is happening on Xubuntu 13.10.

I haven't found anything useful in any logs. Any tips on fixing this or diagnosing the problem would be appreciated.

Press Ctrl +Alt +F1 . login there by username and password , then type sudo service lightdm restart

I had a similar problem, my regular account was stuck in a login loop, but my guest account worked. The reason I couldn't login was because I had ssh'd into my computer and ran a sudo startx which changed the ownership of the .Xauthority file in my home directory to root.

A simple fix:

press [CTRL] + [ALT] + [F1] to get to text login.
run sudo mv .Xauthority .Xauthority_bak to disable the root owned .Xauthority
do a sudo reboot to restart.

It will create a new .Xauthority file owned by you and login should work as normal.


mp3 player recommendation I would like to have an mp3 player that only displays a menu in the bar on the top of the screen or / and notifications. I don't want any complex music management, playlists etc., but I want to be able to quickly see (without switching to another desktop or window) what track is being played and select a directory or a particular track. Is such a player available for Ubuntu 12.04 or 13.04?

Most music players for Ubuntu can be minimised to an indicator. I know gmusicbrower is one that can.


Can we create bandwidth Limit for all users Can we create bandwidth limits for all users?

I want to share internet through my Ubuntu Server. Is this possible or not?

Sharing Internet Connection is easy, and DpN has already provided a possible solution to that through a GUI. Alternatively, you can use iptables and masquerading to achieve the same, though it'll be without a GUI. More information can be had on http://www.tldp.org/HOWTO/IP-Masquerade-HOWTO/firewall-examples.html

Following is a sample script that you can run on the server. You can provide the gateway of this server to other machines so that they can access internet through this.

#!/bin/bash

echo -e "\n\nSETTING UP IPTABLES PROXY..."

INTIF="eth0"
EXTIF="eth1"
EXTIP="your.static.IP.address"

echo "Loading required stateful/NAT kernel modules..."

/sbin/depmod -a
/sbin/modprobe ip_tables
/sbin/modprobe ip_conntrack
/sbin/modprobe ip_conntrack_ftp
/sbin/modprobe ip_conntrack_irc
/sbin/modprobe iptable_nat
/sbin/modprobe ip_nat_ftp
/sbin/modprobe ip_nat_irc

echo "    Enabling IP forwarding..."
echo "1" > /proc/sys/net/ipv4/ip_forward

echo "    Loading proxy server rules..."

# Clearing any existing rules and setting default policy
iptables -P INPUT ACCEPT
iptables -F INPUT
iptables -P OUTPUT ACCEPT
iptables -F OUTPUT
iptables -P FORWARD DROP
iptables -F FORWARD
iptables -t nat -F

# FWD: Allow all connections OUT and only existing and related ones IN
iptables -A FORWARD -i $EXTIF -o $INTIF -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT

# Enabling SNAT (MASQUERADE) functionality on $EXTIF
iptables -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE

echo -e "       Proxy server rule loading complete\n\n"

However, managing / limiting bandwidth (also called traffic shaping) is a different ball game. You would need to have some advanced knowledge of the tools to be used and what your needs would be. There are some external firwalls such as pfSense which help you manage it pretty well, but it'll require a different type of network setup.


I can show my Folders in Windows8, but I can't in Ubuntu, Why? I have installed Windows8, then I installed Ubuntu 12.10, all partitions are appeared well in Windows8 & Ubuntu.

I have C which have Windows8 system, and (D & E) as an extended partitions
and Ubuntu two partitions (File-system & Swap)

I can see folders in all partitions but I can't in D (in Ubuntu)

When I want Folders in D, I must restart PC to open windows8

Can you tell me why? How can I solve it?

thanks :)

You need to mount the partitions, they might be in the side bar of your file browser, or you may have to do it through the terminal like so:

sudo mkdir /media/mountpoint
sudo mount /dev/sdaPartiton Number here /media/mountpoint

and when you're done

sudo umount /media/mountpoint


"Jetty is not installed" on boot, and poweroff Every time I boot, or poweroff (without quiet and splash params) I get a red massage saying "Jetty is not installed".

What is Jetty, and why am I getting this?

This command "sudo apt-get purge jetty" to correct this error.


How to uninstall a software that has been installed using wine? I have installed Ms Office 7 using wine, I need to install office 10.
can someone tell me how can i uninstall office 7?

You can use Uninstaller.

  Uninstaller is a GUI uninstaller for all setup programs that put an
  uninstall entry in the registry, e.g. InstallShield or the WISE
  installer. It's similar in function to "Add/Remove Programs" in
  Windows, except much simpler.

  An actual Add/Remove Programs control panel applet (appwiz.cpl) was
  added to Wine 1.1.2, and the existing uninstaller was replaced with a
  stub to launch this control panel in Wine 1.1.3.

  The uninstaller does not work with programs installed with an .msi
  file.

 wine uninstaller

  For versions of Wine before 1.1.16 (which includes 1.0.x), you can
  also use the wrapper in /usr/bin/:

  uninstaller1

1Source:WineHQ