How to install my ATI graphic card? my laptop has a ATI Mobility Radeon HD 5650, and I've tried many ways to install the drivers but nothing has worked for me, how can I do it?

Also, I'm not sure why but when I put 'lspci -vvnn | grep VGA' it showes me this:

VGA compatible controller [0300]: Advanced Micro Devices [AMD] nee ATI
 RS880M [Mobility Radeon HD 4225/4250] [1002:9712] (prog-if 00 [VGA
 controller])

VGA compatible controller [0300]: Advanced Micro Devices [AMD] nee ATI
 Madison [Mobility Radeon HD 5650/5750 / 6550M] [1002:68c1] (prog-if
 00 [VGA controller])

What does this mean?

I recommend to install xserver-xorg-video-radeon, the driver works great in trusty

sudo apt-get install xserver-xorg-video-radeon

xserver-xorg-video-nouveau mentioned in this answer is a driver for NVIDIA.

Well, Radeon has officially dropped support for the HD series, so you'll have to use the open-source driver.

sudo apt-get install xserver-xorg-video-nouveau
sudo apt-get install --reinstall libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core
sudo dpkg-reconfigure xserver-xorg
sudo update-initramfs -u
sudo reboot #This will reboot your computer, so save any open files first.

That should get you going.

Credit and thanks to Bashing-om and QIII from the Ubuntu Forums for helping me get my card working.
This has been tested with a Radeon HD 4350.


Increase height of onboard in lock screen On my tablet I use a fresh install of trusty with gnome flashback compiz session.
At login screen gnome provides an own on-screen keyboard which is kind of ok.

Within the session I use onboard in normal mode and I enabled it for the unlock screen as well. There it is a little bit too small and I found no way to increase its height.

Adjusting the docked height of onboard does not affect the appearance within the lock screen (where it is docked automatically with no option to change this).

Is there a possibility to increase the dock styled height of onboard at gnome lock screen?

If not, is it possible to display onboard normally (not docked) at gnome lock screen?

If none of them, I am open for proposals of onboard alternatives.

Thanks in advance,

Nicolas

Dunno if you still need help, but I have something for you.

Run the following:

gsettings set org.onboard.window.landscape dock-height 405

It works fine while logged in, so presumably making a script that does this automatically upon lock will work for you.


How to install Ubuntu on VirtualBox? I would like to know if anyone can help me with installing Ubuntu on VirtualBox

Open VirtualBox and select New . A new window will come out.
Choose your guest OS and architecture (32 vs. 64 bit, e.g select Ubuntu)
Set your Base Memory (RAM)
Click next until it show the vm storage size. Put how much space you need depending on your hardisk and finish the wizard by clicking the create button.
On VirtualBox main window, select START and pick your MEDIA SOURCE. In your case, select the .iso on your desktop.
Finish the installation as normal install.
Remove your installation .iso from the virtual optical disk drive before restarting the VM.
Install Guest Additions.

Follow this guide:

Open Virtualbox and click at New button.

Setup Wizard will appear and click at Next button.

Enter your Virtual Machine name, and choose your guest OS and architecture (32- vs. 64-bit) from the dropdown menu and click Next button.

  A 64-bit guest needs the CPU virtualization technology (VT-x AMD/V) to be enabled in BIOS.

Enter memory (RAM) to reserve for your virtual machine and click Next button.

  Leave enough memory to the host OS.

Tick at Startup Disk and Create New Hard disk and click at Next button.

Choose the type of file that you want to use for virtual disk and click Next button.

Choose your storage detail and click Next button.

Enter the size of your virtual disk (in MB) and click Next button.

  A dynamically growing virtual disk will only use the amount of physical hard drive space it needs. It is better to be rather generous to avoid running out of guest hard drive space.

You will see the detail of your input here. Click Create button to continue.

The "New Virtual Machine Wizard" will close and back to VirtualBox Manager. Select your Virtual Machine and click Start button.

"First Run Wizard" will appear and click Next button.

Click at 'folder' icon and choose your Ubuntu iso directory.

Select your Ubuntu iso file and click Next button.

In 'Summary' box, click Start button.

This screen will appear when it start boot.

After a successful installation we have to remove our installation .iso image from the virtual optical drive before we reboot. This can be done from the "Devices" menu or by removing the .iso from the VM settings:

For smooth graphics, and to be able to use shared folders it is recommended to install the guest additions.

Download Ubuntu ISO
Download Oracle Virtual Box and install it. https://www.virtualbox.org/
Create a new Virtual Machine, go with the flow and choose settings as you feel right.
You would be booted in a live mode and greeted with a desktop where you can see install Ubuntu icon.
Click on it and complete the installation.
Once done, restart the VM and now you have a complete VirtualBox running Ubuntu.

Source : Install Ubuntu 20.04


My blutooth device not work in KUBUNTU The blutooth device doesn't detects any devices neither it is being detected by any other devices.

the blutooth buttons just disable & enable the blutooth software but it doesn't work atall

I had the same problem, then I solved it this way:

Turn off Bluetooth.
Open a terminal window (Ctrl+Alt+T) and run sudo service bluetooth restart.
Turn on Bluetooth.

Good luck.


Problem installing phpMyAdmin on Ubuntu 19.10 (Eoan Ermine) I just recently upgraded from Ubuntu 19.04 (Disco Dingo) to Ubuntu 19.10 (Eoan Ermine). My phpMyAdmin was removed while upgrading. Now I can't install it again.

I tried using:

sudo apt-get install phpmyadmin php-gettext

but it shows something like this:

Package phpmyadmin is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'phpmyadmin' has no installation candidate

So I searched from phpMyAdmin, apt search phpmyadmin, but I didn't find any.

How can I install phpMyAdmin on this version?

I am a member of the packaging team and we are doing our best to get back phpMyAdmin in the Debian buster repository ASAP (buster-backports), this will update Ubuntu afterwards.

You can use our PPA: https://bugs.launchpad.net/ubuntu/+source/phpmyadmin/+bug/1837775/comments/7

There is an open issue on our tracker for Ubuntu: https://github.com/phpmyadmin/phpmyadmin/issues/15515

And for Debian:
https://github.com/phpmyadmin/phpmyadmin/issues/15236

Hope the PPA or installing manually using our website will help someone

You can just use heidiSQL instead of phpmyadmin.


Cant connect to wireless network automatically even though the box is checked! My mum, who lives 400 miles away, has a problem with her wireless network with Ubuntu 12.04, upgraded from 11.04 on her Acer Netbook.  The problem is that when she boots up her netbook she has to manually sign in to her wireless network despite ticking the automatically connect checkbox.  It's as if she doesn't have the correct permissions to automatically sign in to her network.  She is also unable to tick the 'Available to all users' checkbox.

Can anyone advise me further?

Thanks in advance

A question like this may not have a simple answer, since it's impossible to know what is causing that behavior. However, this is what I'd suggest doing:

Select "edit connections" from the wireless dropdown menu
Click the "wireless" tab
Delete any and all connections for her wireless network.

Then, next time she manually connects, Ubuntu will set up an "Auto FooBar" connection, which by default will connect upon login.

You could try the following:

sudo gedit /etc/rc.local

Enter your administration password. Now insert the following line right after the last line of the comment section (those lines that start with #).

nmcli con up id SSID

You replace SSID by the official name of your wireless network, for example myWireless. After a reboot your NetworkManager should connect to the network automatically.


After locking the screen in Ubuntu 14.04, password is not accepted, How can it be fixed? I'm running Ubuntu 14.04 fully updated on my laptop.
Since the last update every time I lock the screen (when leaving my room for example) - when I get back and input my password, it is not accepted even though it's the correct password, the error I get is:

Password incorrect, please try again

I found that clicking the "Switch Account" fixes the issue but it is very annoying, if you know any way to fix it, it would be nice.
Thanks in advance

I've found that in some cases the input language is set to Hebrew even though it shows a "EN" icon in the gnome systray, hitting the input language changer sequence does nothing visibly but when I enter the password again it works.

This procedure gives you a full root shell! You can damage your system if you are not careful!

When booting up press SHIFT and use the arrow keys to select the rescue mode option and press enter.

The file system may be read only (it is in all currently supported releases). Remount as read write

mount -rw -o remount /

This will boot the system in rescue mode and you should arrive at a prompt that looks like this

root@something

To reset your password type this in

passwd <username>

Press return, then you will be prompted to enter and confirm a new password.
Once you are done resetting your password you can than switch back to the normal GUI mode by putting this in

init 2

If if appears to boot normally, but you see a message that says:

Give root password for maintenance (or type Control-D to continue):

then you will need a different solution.

Next Option

If the "Standard Way" does not work for you and you recieve the "Give root password for maintenance" message, you can recover your password using the following steps

Reboot your computer
Press SHIFT or ESC at the grub prompt (as earlier).
Select your image.
Highlight the line that begins kernel and press 'e' to edit
Go to the very end of the line, change the ro to rw and add init=/bin/bash

press enter, then press b to boot your system.

Your system will boot up to a passwordless root shell.

Type in passwd username
Set your password.
Type in reboot

If this doesn't work I am out of suggestions.

Correction, my only other suggestion would be a clean install, but this should work.


Ubuntu has wrong resolution and won't let me change it Ubuntu 15.04 x64 gives me 800x600 when my screen can output 1600x900. I went into my display settings and there was only one option. Anything I can do to fix it?
    lspci -k | grep -EA2 'VGA|3D'
Outputs

VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Kabini

[Radeon HD 8240 / R3 Series]
Subsystem: Acer Incorporated [ALI] Device 083a
Kernal driver in use: fglrx_pci

Sorry for formatting issues

Run

sudo apt-get install mesa-utils

in terminal.This should hep you to change to correct resolution.
In case your drivers are not upto date , try installing proprietary drivers from the Software and Updates section of ubuntu.


Typing "↑" (upwards arrow) with a keyboard shortcut When I'm programming, I find useful to use some unicode symbol like ← ↓ → to indicate in comments different things.

In ubuntu I can type ← ↓ → respectively with ALT GR + Y, ALT GR + U, ALT GR + I.

But to get the symbol "↑" I have to type CTRL + SHIFT + U , and then 2191 (i.e. I have to insert the unicode code).

Is there a shortcut for the upwards arrow? If there isn't, how could I manually add it?

If you look at the file /usr/share/X11/xkb/symbols/latin, you will find the following lines:

key <AD06>  { [         y,          Y,    leftarrow,          yen ] };
key <AD07>  { [         u,          U,    downarrow,      uparrow ] };
key <AD08>  { [         i,          I,   rightarrow,     idotless ] };
key <AD06>  { [         z,          Z,    leftarrow,          yen ] };

So apparently an up arrow (↑) is already defined -- for ALT GR+SHIFT+U. If not, you can copy the file to a directory, edit it at will, name the profile somehow (say "foo" instead of "latin") and simply run

setxkbmap -I. -layout foo

(the -I. makes setxkbmap look for layout files also in the current directory).

The four strings assign to each key give the four characters that are produced by pressing the key, key with shift, key with altgr and key with algr+shift. The names of the entities (keysyms) that xkb can recognize can be found here.

To type up ↑,down ↓, right →, and left ← arrows, make sure activate Num Lock then Press Alt, while pressing the Alt button type 24, 25, 26, or 27 respectively and release the Alt button and the arrows will appear.


Cannot execute binary file: Exec format error: (Compiling 32 bit code on 64 bit machine) I want to execute a 32-bit assembly code, and I am using gcc for linking my object file (created by NASM) to an executable.
I have already tried methods stated in the post Linking an assembler program: error “undefined reference to `printf'”.
Executable is created but whenever I try to run it, I get the following error:
-bash: ./asmTest: cannot execute binary file: Exec format error

I have used the following commands:
nasm -f elf -g asmTest.asm
gcc -m32 asmTest.o -o asmTest

I have installed the Multilib version of gcc so that I can run 32-bit code on 64-bit machine.
I am using NASM version 2.13.02 and Ubuntu app (available for Windows, Ubuntu 18.04.1 LTS).
GCC version: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Please help.
EDIT
strace ./asmTest

gives the following output:
execve("./asmTest", ["./asmTest"],  0x7fffd49a5000 /* 19 vars */) = -1 ENOEXEC (Exec format error)
fstat(2, {st_mode=S_IFCHR|0660, st_rdev=makedev(4, 1), ...}) = 0
ioctl(2, TCGETS, {B38400 opost isig icanon echo ...}) = 0
write(2, "strace: exec: Exec format error\n", 32strace: exec: Exec format error
) = 32
getpid()                                = 1110
exit_group(1)                           = ?
+++ exited with 1 +++

I am having problems running hello_world.c, compiled for 32 machine, on Ubuntu 20.04 64 bit OS.  No problems when run natively.  Here is my process for creating the executable:
gcc -march=i386 -m32 hello_world.c -S -o hello_world.s
as --32 hello_world.s
as invokes the linker and generates a 32 bit executable image.
jeffs@jeffs-desktop:~/VarsityTutors$ file a.out
a.out: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped
jeffs@jeffs-desktop:~/VarsityTutors$
jeffs@jeffs-desktop:~/VarsityTutors$ ./a.out
bash: ./a.out: cannot execute binary file: Exec format error
jeffs@jeffs-desktop:~/VarsityTutors$ ls -l ./a.out
-rwxrwxrwx 1 jeffs jeffs 1476 Oct 28 15:24 ./a.out
jeffs@jeffs-desktop:~/VarsityTutors$

I have read several articles, most of which seem antiquated.  So I have tried:
jeffs@jeffs-desktop:~/VarsityTutors$ arch
x86_64
jeffs@jeffs-desktop:~/VarsityTutors$ sudo apt-get install multiarch-support
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package multiarch-support is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'multiarch-support' has no installation candidate
jeffs@jeffs-desktop:~/VarsityTutors$
jeffs@jeffs-desktop:~/VarsityTutors$

I am doing this project for a friend who is taking a class in assembler as part her CS degree.


Ubuntu live cd : black screen and blinking cursor I try to install ubuntu 12.04 on my computer. I can get to the purple screen on the live cd but then, if I choose "Installing Ubuntu", I have a black screen with a cursor blinking (and nothing else happens).
My PC : acer aspire M3920, CPU i5-2300, 8 Gb RAM, NVIDIA gt 405.
What I already tried :

I tried with 12.04 and 13.04 daily build
I tried with a live usb and with a live dvd
I tried the following boot options : nomodset, acpi=off

I googled a lot and it seems that it could be a graphic card problem. Do you know any other boot options that I could try ?
UPDATE
This is not a duplicate : I've tried all the common boot options (nomodeset, noacpi...) and it doesn't change anything.
With the option "no splash" (instead of "quiet splash"), I can see what happens before the forever-blinking cursor :
[sdg] no caching mode present
[sdg] assuming drive cache : write trough

ata8.00: excetion Emask 0x52 ... frozen
ata8 : SError : { RecovData RecovComm UnrecovData...}
ata8.00 : failed command : IDENTIFY PACKET DEVICE
...
ata8.00 : status : { DRDY }
ata8 : hard resetting link

Does somebody know what it means ?
N.B. astonishingly, Puppy Linux boots fine (but Debian, Fedora and Ubuntu do not)

The original poster solved the problem and reported the solution in an edit:

  In fact, it was not a graphic card problem. I had to disconnect the
  dvd drive and connect it to another free sata connector (I don't
  really understand why Ubuntu had trouble with this connector and
  Windows 7 not). After that, everything worked fine.

i suggest to redownload ubuntu , sometimes it (iso) got wrong writing.

i suggest to use LINUX LIVE USB CREATOR

it happened alot with me this issue


Lock screen does not unlock with correct password Gnome and Ubuntu 14.04 I had to reinstall recently. I installed normal Ubuntu 14.04. I then installed gnome/gnome shell/gdm. I then logged in my user to gnome. Since then I have been configuring my system.

Yesterday, unlock was working fine. Today, the automatic lock screen is not accepting my password as valid. It just takes the input like it's processing it, then takes me right back to the same password prompt. If I click the 'login as a new user' link, it takes me right back to the lock screen. Ctrl+Alt+F1, etc, does nothing.

I had to resort to a hard boot. I've tried this more then once. (first time was from automatic, idle time lock, second time was from my triggering the lock screen with the keyboard command).

I'm certain I have my password right, as I am able to get logged in after the cold boot.

Neither of the other two answers solved the problem for me, but some additional searching led to this bug report:

sudo chown root:shadow /sbin/unix_chkpwd
sudo chmod 2755 /sbin/unix_chkpwd

which solved the issue for me.

Neither of the 5 answers solved my problem, but this did on Ubuntu 18.04:

I remembered what language/keyboard layout I have used last before letting the screen locked, then I entered my password in that language, despite what language was shown in the lock-screen app.

There is a bug in the lock-screen app which doesn't change the keyboard layout despite it shows it was changed.


How do I install "Need for Speed World"? How do I install Need for Speed World?

Please don't just say "use wine", I am a newbie and I need a detailed way to install it (Step by Step).

I use Ubuntu 11.10.

I don't think Need for Speed World can be run on Ubuntu, at least not without difficulties. It's designed specifically as a Windows application.

In some cases, you can still use Wine, but it's no guarantee. It is far beyond the scope of this site. However, wine itself has a community that is suitable for those types of things.

For Need for Speed World, you can look here.

this doesn't work in Ubuntu because Ubuntu doesn't support the functions that the game need to work/run, and wine doesn't neither.... so there's only four things to do....
A) wait until need for speed world is supported by Ubuntu
B) switch to windows
C) run windows in virtual-box
D) or don't play it any at all


how to install imagemagick for php7 on ubuntu? well, just after upgrading my Ubuntu and therefore moving to php7, I seem not to be able to install imagick extension for php using the same old command

sudo apt-get install php5-imagick

I get this error (tried php7-imagick too)

 Package php5-imagick is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'php5-imagick' has no installation candidate

what should I do?

Just do:

sudo apt-get install php-imagick

This should install imagick for PHP 7.0.

Now it is 2018, just wanted to highlight, in many cases, you would also want to install php-gd along with php-imagick (if you are installing this for wordpress for example).

sudo apt install php-imagick php-gd
sudo systemctl restart apache2

The use of php-imagick implies php7.2-imagick if 7.2 is what your php version is.


Why do top and lxtask show different degrees of memory usage? Why does top show 730MB of RAM used, but the "Task Manager" shows 190MB?
Some more information on my system:

Lubuntu 14.04
VirtualBox

Screenshots:

Because it includes cache and buffers in top (you can see them as individual items to the right of the total memory).

I believe i found the answer:

    To understand the process architecture of VirtualBox see The
    VirtualBox architecture :

    Once you start a virtual machine (VM) from the GUI, you have two
    windows (the main window and the VM), but three processes running.
    Looking at your system from Task Manager (on Windows) or some system
    monitor (on Linux), you will see these:

  VirtualBox, the GUI for the main window;
  Another VirtualBox process that was started with the -startvm parameter, which means that its GUI process acts as a shell for a VM;
  VBoxSVC, the service mentioned above, which is running in the background to keep track of all the processes involved.

    This was automatically started by the first GUI process.

The source with more information.


I repeatedly get an error about unmet dependencies for adobe-flashplugin while trying to install anything Whenever I try to install anything I repeatedly get the error below and then the installation stops. Moreover I also get the error that I have to fix the Ubuntu software center but I cant due this same error.

For example, when I run the command:

sudo apt-get install unity-tweak-tool

I get this error:

Reading package lists... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
  adobe-flash-properties-gtk:
        Depends: adobe-flashplugin (= 1:20160310.1-0ubuntu 0.12.04.1)
                 but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages
   (or specify a solution)

I've already faced similar problems and I figured that in most cases the only thing you have to do is

sudo dpkg --configure -a

and then

sudo apt-get install -f

If that doesn't help, you should edit file /var/lib/dpkg/status and delete whole blocks of broken packages. Then repeat first two commands and that should fix it.

Try to start aptitude

sudo aptitude

aptitude should also determines the problems and often proposes a solutions with can be applied pressing the "!"-key. Have a look in the bottom line of aptitude. There should be some hints in a red backgrounded line.

Often the solution is to remove the incomplete installed packages.


Hard disk not detected during Dual boot installation on New Acer Aspire A315-56 laptop I purchased a new Acer Aspire A315-56 laptop few days ago with Windows 10 preinstalled in that.  Now I wanted to dual boot with Ubuntu 20.04 version.
I created the necessary USB bootable drive using Rufus using UEFI (non CSM) and GPT partition scheme [This is because the new laptop is using UEFI and GPT schemes after checking the Disk management and BIOS configurations].
I disabled Secureboot and Fastboot both before trying Ubuntu and tried installing Ubuntu.
So when I tried installation, it did not show up the 1 TB Hard drive for installation.  It only showed up the USB pen drive which was used for the Live session and installation.
Also one thing which I noticed in the BIOS Information tab that SATA mode was "Optane without RAID". Now I don't know whether this is the one creating issues.  I checked that I can change it to AHCI using Ctrl+S combination in the Main Tab of BIOS but I have read it in some responses that it can create problems in Windows 10 booting.  So I did not go further doing that as laptop is in warranty period.
Hopefully, I don't need any backup data as its a new laptop.  Also I have already created a USB Windows bootable disk for Windows 10 Home edition just in case something goes wrong during setting configurations.
Please help me to get the Ubuntu dual boot in this laptop.  I have been using Ubuntu in my older Lenovo laptop with BIOS legacy mode enabled and all works fine there absolutely.

I am fan of Ubuntu and other Ubuntu based Linux distros also, hence I need this solution to use it on my new laptop.  You can consider that I am desperate to install dual boot in the new laptop.
Thanks in advance. Regards.
Update as on 7-Aug-2020:
I did the following steps till now:

Changed to AHCI mode successfully and booted Windows 10 normally with Secure boot off and Fast boot also off.  That was good for me. (2) Again tried Live Ubuntu usb drive and before the Ubuntu Live environment there was an error on black screen something like "Certificate - 65" two lines of that. The screen flashed for a second and vanished and Ubuntu Live environment screen started. (3) I found a link where this error can be prevented by putting "nomodeset" instead of "quiet splash" while booting Ubuntu and then pressed F10. I did that also.  Then the error went away in next booting with Live USB Ubuntu stick (4) Still the problem of not detecting the hard disk persists.
Now I am exhausted out of options to install dual boot linux in this laptop.  Can anybody really help me on this please.
THANKS IN ADVANCE ALL OF YOU and especially @oldfred.

UPDATE - 28AUG2020:
@oldfred Sir - I am also planning to buy a Dell Vostro 3590 laptop for me. But I also saw this link: <https://www.dell.com/community/Inspiron/Not-able-to-set-SATA-operation-to-AHCI-in-BIOS-Inspiron-7490/td-p/7393794/page/2>
There iS a problem in the post regarding AHCI option not there in BIOS of the Dell Inspiron laptop. And there is a big statement made by "U2CAMEB4ME" as below:
"I think maybe Ubuntu needs to look into updating their software installation instead of depending on the computer manufacturers to accommodate 1% of their computer sales???".
And there is another statement in this link that already HP and Lenovo do not have AHCI SATA option in their BIOS setup.  This means that all major manufacturer's do not want Linux to be installed at all because AHCI will never be made available. And the guy "U2CAMEB4ME" is warning Linux community to do something about this, which is to plan for SATA RAID installation in quick time.  Otherwise I am worried that Linux will never be available in newer laptops and new kids won't be able to see Linux in their lifetime.
I respectfully request oldfred Sir and others who would see this post, if you are influential in Ubuntu Linux team, then please request them to seriously look into these aspects.  Thanks in advance again.

I have same issue, with a doctor in computering we tried all, the only way was to change to another HDD.....
That laptop with that 1tb HDD and Linux do not work......
And if you change to another HDD, please set your BIOS properly, in secure boot something you must inform your BIOS to start from your debian(in my case)..... I think like shim64 or shrim64 something I forgot please forgive me about that, it's in EFI folder... I think grub64 option also there, total 4 options maybe....


Problem with dual-booting Ubuntu 14.04.2 and Windows 7 x64 Ultimate I have a very interesting question.
Okay, so when I boot Ubuntu 14.04.2 x64 from my USB stick, it doesn't detect Windows 7!
I have tried to convert my disk to basic, but I don't seem to have an option for it so I guess I already have a basic one! My computer is custom built so it is NOT UEFI based. When I open Disk Management in Windows 7, there's a green box around my C drive (I have managed to remove it now using a partitioning tool). People have told me that it's because it's a logical partition and I have more than 4 primary, which is wrong. I have 1 (System reserved) which is primary, 1 unallocated for Ubuntu 14.04.2 and my C drive. Is this why Ubuntu is not recognizing my Windows 7 install? I would greatly appreciate any help!
!

My computer is custom built so it is NOT UEFI based.

This logic is flawed. Most motherboards introduced since mid-2011 are UEFI-based. Most of these motherboards also provide a Compatibility Support Module (CSM), which is essentially a BIOS emulator -- a CSM enables an EFI-based computer to boot using BIOS-mode boot loaders, much like WINE enables Linux to run Windows binaries. Your system might or might not be using BIOS/CSM/legacy-mode booting for your Windows installation, but if the computer is newer than mid-2011, it almost certainly is UEFI-based.

To determine your Windows boot mode, look at the partition table type. If it uses the Master Boot Record (MBR), the computer is booting in BIOS/CSM/legacy mode; if it uses the newer GUID Partition Table (GPT), it's booting in EFI/UEFI mode. You can check this detail using parted in an Ubuntu installer; open a Terminal and type:

$ sudo parted /dev/sda print | grep Table
Partition Table: gpt

This example shows a GPT disk; an MBR disk will show up as Partition Table: msdos. If parted complains about a missing GPT protective partition (I don't recall the exact wording of this complaint), then you probably have a partition table inconsistency (described later).

As to the main problem, most complaints that the Ubuntu installer "doesn't detect Windows" actually mean that the installer isn't presenting an "install alongside" option. This can happen for any number of reasons, and in most cases you must use the "Something Else" option instead. I recommend you read the following questions and answers:

"Install alongside" option missing. How do I install Ubuntu beside Windows using "Something Else"?
How to use manual partitioning during installation?

Note that you should install Ubuntu in the same boot mode (BIOS vs. EFI) as used by Windows. As the Ghostbusters would say, don't cross the streams! You can check the boot mode of the Ubuntu installer by dropping to a shell and looking for a directory called /sys/firmware/efi. If it's present, you've booted in EFI mode; if it's absent, you've booted in BIOS mode.

Another possibility is that your disk uses to use GPT but was converted to use MBR by the Windows installer or some other GPT-unaware tool. In this case, the disk will appear to be completely unpartitioned to the Ubuntu installer. If this is your problem, you must wipe the stray GPT data. This is most easily done with fixparts, which is part of the gdisk package in Ubuntu:

sudo fixparts /dev/sda

See this question and answers or my official FixParts documentation for more details. (I'm the author of FixParts.)

What do you mean green box? can you be more specific? If it is not uefi mode, your disk should be MBR disk, which won't allow you to have more than 4 primary partitions.you will not have the option to convert to basic disk in disk management if it is a dynamic disk unless you delete all volumes on it. You can use third party software, such as AOMEI Partition Assistant, to convert dynamic disk to basic disk without data loss.I think this should be the cause.


"Unknown option "--enable-libfaad" ERROR: libfaac not found" while configuring ffmpeg I trying to install this following these instructions:

sudo apt-get remove ffmpeg x264 libx264-dev
sudo apt-get update
sudo apt-get install build-essential subversion git-core checkinstall yasm texi2html libfaac-dev libfaad-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libx11-dev libxfixes-dev libxvidcore4-dev zlib1g-dev
cd
mkdir ffmpeg-x264-avfilter
cd ffmpeg-x264-avfilter
git clone git://git.videolan.org/x264.git
cd x264
./configure
make
sudo checkinstall --pkgname=x264 --pkgversion "1:0.svn`date +%Y%m%d`+`git rev-list HEAD -n 1 | head -c 7`" --backup=no --default
cd ..
svn checkout svn://svn.ffmpeg.org/soc/libavfilter
cd libavfilter
./checkout.sh
cd ffmpeg
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avfilter-lavf
make
sudo checkinstall --pkgname=ffmpeg-avfilter --pkgversion "4:0.5+svn`date +%Y%m%d`" --backup=no --default

I got these errors:

Unknown option "--enable-libfaad".
Unknown option "--enable-avfilter-lavf".
ERROR: libfaac not found

What am I doing wrong?

Well, install libfaac first. It seems there was an error doing so. Make sure apt-get install libfaac-dev works.

The proper instructions for installing FFmpeg and x264 are here.

sudo apt-get update
sudo apt-get -y install build-essential checkinstall git libfaac-dev libgpac-dev \
  libjack-jackd2-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev \
  libsdl1.2-dev libtheora-dev libva-dev libvdpau-dev libvorbis-dev libx11-dev \
  libxfixes-dev texi2html yasm zlib1g-dev

Then, for x264:

cd
git clone git://git.videolan.org/x264
cd x264
./configure --enable-static
make
sudo checkinstall --pkgname=x264 --pkgversion="3:$(./version.sh | \
  awk -F'[" ]' '/POINT/{print $4"+git"$5}')" --backup=no --deldoc=yes \
  --fstrans=no --default

And for FFmpeg:

cd
git clone --depth 1 git://source.ffmpeg.org/ffmpeg
cd ffmpeg
./configure --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb \
  --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis \
  --enable-libx264 --enable-nonfree --enable-version3 --enable-x11grab
make
sudo checkinstall --pkgname=ffmpeg --pkgversion="5:$(date +%Y%m%d%H%M)-git" --backup=no \
  --deldoc=yes --fstrans=no --default
hash x264 ffmpeg ffplay ffprobe

That's it — filters should be automatically included.

Then, for x264:

    cd

    git clone git://git.videolan.org/x264

    cd x264

    ./configure --enable-static

    make

    sudo checkinstall --pkgname=x264 --pkgversion="3:$(./version.sh | \
     awk -F'[" ]' '/POINT/{print $4"+git"$5}')" --backup=no --deldoc=yes \
     --fstrans=no --default

This is not enough for a static build
x264 must not link to other dynamic libraries, use the following to avoid problems when it comes to compiling ffmpeg:

x264:

cd

clone git://git.videolan.org/x264

cd x264

./configure --enable-static
--disable-opencl \
--disable-avs \
--disable-cli \
--disable-ffms \
--disable-gpac \
--disable-lavf \
--disable-swscale

make

sudo checkinstall --pkgname=x264 --pkgversion="3:$(./version.sh | \ awk -F'[" ]' '/POINT/{print $4"+git"$5}')" --backup=no --deldoc=yes \ --fstrans=no --default


"Requires to install untrusted updates" Error in Update Manager I selected security updates and other updates in update manager and I clicked 'install updates'. It showed up an error like so 'Requires to install untrusted updates' and I clicked 'close', and it was the only button visible. The update manager started to build the list of updates again and it showed up 'install updates' button once again. Same thing happened again and again and I was not able to install any updates.

In the software centre go to edit and software sources (type in your password) one of your software sources in the other sources tab does not have a key.

This does not necessarily mean it is bad but that you would need a key

Check this url:

http://www.liberiangeek.net/2010/10/fix-requires-installation-untrusted-packages-error-ubuntu-10-10-maverick-meerkat/

This will help you to resolve the error.

You can install Muon package manager and use it instead of the update manger, its great to install it write on you terminal:

apt-get install muon


How to lock screen 30 minutes after unlock I would like my children to only use the computer for 30 minutes, at which time I would like the screen to be locked.  At that point, if I choose to unlock the screen again, I would like the screen to lock again in another 30 minutes.

How can I write a script to do this?

Run the script below in the background, and it will lock the screen after an arbitrary number of minutes:

The script

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

t = 0; max_t = int(sys.argv[1])

while True:
    # check runs once per minute
    time.sleep(60)
    # check the lock status, add 1 to current time if not locked, else t = 0
    try:
        subprocess.check_output(["pgrep", "-cf", "lockscreen-mode"]).decode("utf-8").strip()
        t = 0
    except subprocess.CalledProcessError:
        t += 1
    # if unlocked status time exceeds set time (in minutes), lock screen
    if t >= max_t:
        subprocess.Popen(["gnome-screensaver-command",  "-l"])
        t = 0

How to use

Copy the script into an empty file, save it as lock_screen.py
Test- run it from a terminal with the lock- time as an argument (minutes)

python3 /path/to/lock_screen.py 30

(Although for the test, I'd take a shorter time)
If all works fine, add it to Startup Applications Dash > Startup Applications > Add. Add the command:

python3 /path/to/lock_screen.py 30

Thank you for the help.  I decided to combine parts of your answer with other stuff I found online and came up with this solution in python 2.x:

import gobject, dbus, time, subprocess
from dbus.mainloop.glib import DBusGMainLoop

time.sleep(30*60)
subprocess.Popen(["gnome-screensaver-command", "-l"])

def lock_status(bus, message):

    if message.get_member() != "EventEmitted":
        return

    args = message.get_args_list()

    if args[0] == "desktop-unlock":
        time.sleep(30*60)
        subprocess.Popen(["gnome-screensaver-command", "-l"])

DBusGMainLoop(set_as_default=True)
bus = dbus.SessionBus()
bus.add_match_string("type='signal',interface='com.ubuntu.Upstart0_6'")
bus.add_message_filter(lock_status)
gobject.MainLoop().run()


How do I move a subfolder with contents to a different source folder without copying? I know it's been asked a million times, but I can't find the answer to what I'm trying to do specifically.

Here's the directory structure:

Main Folder1
|
|-Subfolder 1
|-Subfolder 2 HasAReallyLongName
|---files
|-Subfolder 3-1000

Main Folder2
|
|-Subfolder 2 HasAReallyLongName
|---files

I want to try to achieve moving Subfolder2 with its files to a
different directory.
I don't want to copy and then remove anything because I don't have enough space.
I don't want to mv /Main/Sub2/* /Main2/ because that puts everything in the /Main2 folder and not in a subdirectory.
I don't want to mkdir /Main2/... because it's a really long name (timestamps mostly) and I don't want to manually type it (and probably mess it up)
As far as I know, rsync copies the files too, so I'm not sure that it
would work.

Any suggestions or other tools would be much appreciated!

This is completely straightforward.

mv /Main1/Sub2 /Main2

This creates the directory /Main2/Sub2 with all the contents of the original, and deletes the directory /Main1/Sub2. If you don't want to type the full name, you can use a glob; just stop typing the name and end with * when you have entered enough characters to distinguish the directory name from everything else in the directory (be careful!):

mv /Main/Sub* /Main2

Possible problems that could be causing this not to work as expected:

There is already a directory inside /Main2 with the same name as /Main1/Sub2. This causes the error directory not empty, as mv is refusing to overwrite the existing directory. If this is the case, rename (or remove) the existing directory in /Main2 first:

mv /Main2/Sub2 /Main2/SomethingElse

Using an incorrect path. Remember that everything is case sensitive and be aware of relative paths and ~ expansion. These are all different depending on the current working directory

/Main1/Sub2
Main1/Sub2
~/Main1/Sub2

You do not have permission to write to the source and/or destination directory. This will be very obvious from the error message: mv: cannot move 'thing' to '/place': Permission denied. In which case you can run my favourite command to overcome the problem

sudo !!

Got it:
Using sudo mv /Main1/Sub2 /Main2 did it for me.
The main difference is being root I suppose.


WD Passport external device not recognized I am getting following error when I connect my external HDD.

Error mounting: mount exited with exit code 13: The disk contains an unclean file system (0, 0).
The file system wasn't safely closed on Windows. Fixing.
ntfs_attr_pread_i: ntfs_pread failed: Input/output error
Failed to read NTFS $Bitmap: Input/output error
NTFS is either inconsistent, or there is a hardware fault, or it's a
SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows
then reboot into Windows twice. The usage of the /f parameter is very
important! If the device is a SoftRAID/FakeRAID then first activate
it and mount a different device under the /dev/mapper/ directory, (e.g.
/dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation
for more details.
Failed to sync device /dev/sdc1: Input/output error
Failed to close volume /dev/sdc1: Input/output error

This started happening after I copied some data from a Windows machine.

Can someone please help me out, I want the data to be recovered.

Unfortunately, it looks like the filesystem on your passport is corrupted. If chkdsk hasn't fixed the issue it would suggest that the filesystem is corrupted beyond repair (at least the repair offered by chkdsk).

If you still have the data on your windows machine, the quickest fix would probably be to reformat the drive and re-copy the data.


How to install the latest Octave I want to install Octave on my Ubuntu LTS with apt-get. The problem is that the official repositories list only Octave 3.0 and Octave 3.2, whereas the latest Octave is Octave 3.6.

How do I update the repositories of apt-get to get Octave 3.6?

This PPA should solve your problem, provided you are running the latest 12.04.

Open Terminal Ctrl-Alt-T and type:

sudo apt-add-repository -y ppa:picaso/octave
sudo apt-get update
sudo apt-get install octave
sudo apt-get install liboctave-dev

Latest ppa is ppa:octave/stable.

https://launchpad.net/~octave/+archive/ubuntu/stable

This ppa is maitained by the "GNU Octave" team and has version 3.8.1 available for lucid and precise.


Reverse two finger scroll direction (natural scrolling)? Two-fingered scrolling is working fine, but is there a way that I can reverse the direction (natural scrolling)? It seems backwards opposed to the way OSX does it.

First way: using GNOME Settings
I don’t know which version of Ubuntu you’re using, but in Ubuntu 13.04 to Ubuntu 20.04 (I guess), it’s possible via Mouse and Touchpad settings.
So first, open System Settings > Mouse and Touchpad. As seen in the screenshot below if there’s an option for content sticks to fingers, check it. Then the scrollbars will work in reverse direction. I recommend clicking the "Test Your Settings" button to try it out.

Second way: using DConf Editor
This is also accessible via DConf Editor as well. To install DConf Editor, run:
sudo apt-get install dconf-editor

Then go to org.gnome.settings-daemon.peripherals.touchpad and check natural-scroll.

You can also set this option on the command line:
gsettings set org.gnome.settings-daemon.peripherals.touchpad natural-scroll true

OK, so I had Firefox scrolling one way and Evolution scrolling the other.
I set natural scrolling under System settings, but find that Ubuntu tweak natural scrolling counteracts it in certain apps. I have to have both system settings AND Ubuntu tweak set to natural scrolling to get universal scroll in the same direction, otherwise they seem to fight each other. It took me many hours to figure this out.


Is there a desktop-wide privacy mode? With Zeitgeist now tracking everything I really think we need a privacy mode like the one Firefox offers. There is a ridiculous amount of history and caches being stored in Ubuntu from thumbnails to file history.

And god forbid you install a KDE application in gnome, then you get even more file indexers and recently used tracking! Is there a way to clear everything? Even better would be a way to run the OS in a privacy mode that never even wrote to the disk. How can I disable all caching and thumbnailing and history in the OS? Firefox provides private browsing. IE only allows you to delete the cache when you close IE. Firefox wins! Can I get a private session in Ubuntu?

Also, my company would like to run Ubuntu off an SD card. Limiting the number of writes to update a cache, history or log would be a really good idea. Switching back and forth would be perfect. Right now Zeitgeist is working on a way to clear history, but come on, can we have an option to not write a history at all? Am I missing something here?

I am not sure this is what you are looking for, but it will provide a "privacy mode". I am citing webupd8.org:

  Until Zeitgeist Global Privacy is released, install Activity Journal
  (don't use the version in the official Ubuntu 11.04 Natty Narwhal
  repositories - that doesn't seem to work), go to its Preferences and on
  the Plugins tab, enable "Blacklist Manager" (seems you have to double
  click the checkbox to enable it) - now a new "Blacklist" tab should be
  displayed. Here, click the add button and enter the path to your private
  files (porn). If you want to block all files, use "*" for the path.

  You can also clear the Zeitgeist history (this is the history of recent
  files that's display in Dash) by using the following commands:

rm ~/.local/share/zeitgeist/activity.sqlite
zeitgeist-daemon --replace

check out this thread on ubuntu forums, might give the answer you want.

ubuntuforums Zeitgeist


Can't access windows after installing ubuntu 16.04 I installed Ubuntu 16.04 alongside windows 10.  Now unable to boot into Windows 10.  How can I get the dual-boot and get Windows 10 back?

When I turn on the system I get the following options:

Ubuntu
Advanced options for Ubuntu
Windows UEFI bootmgfw.efi
Window Boot UEFI loader
EFI/Ubuntu/fwupx64.efi
efi/ubuntumokmanager.efi
efi/toshiba/boot/bootmgfw.efi
Windows boot manger (on /dev/sda2)
System setup

Selecting any windows option gives error. Given below is the error that I got when I selected Window Boot UEFI loader option

/EndEntire file path: /ACPI(a0341do,0) /PCI(2,1f)/Sata(0,0,0)/HD(2,200800,820000,60466f299ba3e211,2,2)/File(\EFI\Boot)/File(bk.pbootx64.efi)/EndEntire
error:  cannot load image
Press any key to continue....

Boot info from Boot-Repair.

What worked for me is changing the secured Boot from Enabled to Disabled status in BIOS.  When I rebooted after this change I was able boot to windows 10.  Although it took little longer than normal.

Is there any risk in leaving it disabled?

Another thing that I cannot verify right now is if windows updates and other features will work correctly after this fiasco.  When I check for windows update.  Instead of showing the current time, it's showing the time of last windows update before ubuntu installation.

You should use the windows disk to repair your installation, it would fix the windows boot problem but maybe break your Linux boot, use Linux rescue disk to reinstall Grub and you should be OK.


Is it possible to theme the BFB launcher background separately in Unity 7? I already had a look at this related question, which covers changing the BFB icon in older versions of Unity. But the information there is probably dated, and does not entirely cover what I'm planning on doing in my theme.

I want to create an Ubuntu 15.10-compatible Unity 7 theme which mimics the current look of Unity 8 (used in Ubuntu Touch) as closely as possible. I'm now satisfied with how all the launcher buttons look, except for the BFB. Changing the icon inside the BFB itself should not pose a problem, but as you can see below the BFB background itself is differently-shaped from the other icons:

The Ubuntu Wiki's guide to theming Unity 7 explains how to create the background images for the launcher icons in general, but does not give any indication for whether it is possible to theme the BFB background separately. Does anyone know if this is possible to do in Unity 7, or is the BFB internal icon the only part that can be changed?

Dash Button can't be themed separately

With Unity 7 from Ubuntu 13.04 and up, the Dash Button (also known as BFB in short of "Big Freakin Button") and other icon buttons on the launcher were unified to use the same theming assets. So, when you follow Unity Theming guide to theme the launcher icon buttons on Ubuntu 14.04LTS or up, you theme the Dash Button/BFB along with it.

Don't worry, there's a workaround

Include blank/transparent svgs for these assets in the unity folder of your theme:

$THEME_PATH/unity/launcher_icon_shadow_62.svg
$THEME_PATH/unity/launcher_icon_back_54.svg
$THEME_PATH/unity/launcher_icon_selected_back_54.svg
$THEME_PATH/unity/launcher_icon_edge_54.svg
$THEME_PATH/unity/launcher_icon_shine_54.svg
$THEME_PATH/unity/launcher_icon_glow_62.svg

Make a 128x128 png image with any icon you like and add your preferred background too to the same png. The default 'Circle of Friends' Whirlwind logo in Dash Button is located here: /usr/share/unity/icons/launcher_bfb.png. Replace it with the png image you made and then restart Unity. There are some disadvantages with this workaround though:

The logo icon isn't as big as the whole Dash Button. So, the final result won't look as good as the Unity 8 screenshot shown in question.
The BFB logo icon can't be changed by themes. It needs to be manually modded.

Used to be possible in older Unity versions

Versions prior to Unity 7, like Ubuntu 12.04LTS's Unity 5 had separate assets for Dash Button and other icon buttons. This can be seen in the image shown here:

Though it didn't have any theming support like Unity 7, the BFB could still be manually modded to have a different look. See this answer to know more on modding Unity 5's BFB: Change Dash Button on Ubuntu 12.04LTS

For Ubuntu 16.04 LTS

The version of Unity which will be included in the upcoming Ubuntu 16.04 LTS release will likely support this. From the Ubuntu Wiki's Unity theming guide:

  The BFB (Big Fat Button) icon (starting from Ubuntu 16.04) can be
  themed as well by adding an icon in the path below. We ask you to keep
  the Circle of Friends
  logo in your implementation, though.

  $THEME_PATH/unity/launcher_bfb.{svg, png}

The first Unity package version containing this functionality is unity (7.4.0+16.04.20160310-0ubuntu1) xenial, which contains some other fixes and theming improvements as well.


How do I set system-wide proxy servers in Xubuntu, Lubuntu or Ubuntu Studio? I cannot find the proxy settings anywhere. Do I have to set it through terminal, through gconftools or is there some GUI present for it?

System-wide proxies in Ubuntu Studio, Xubuntu and XFCE must be set via environment variables

Ubuntu Studio, like Xubuntu, uses the XFCE desktop environment which does not contain a graphical settings tool to set systemwide proxies (unlike the default Ubuntu desktop environment, Unity).

1. Set up the proxy/proxies for most programs

Open the /etc/environment file with gksudo leafpad (or your favorite editor). This file stores the system-wide variables initialized upon boot.
Add the following lines, modifying appropriately. You must duplicate in both upper-case and lower-case because (unfortunately) some programs only look for one or the other:

http_proxy=http://myproxy.server.com:8080/
https_proxy=http://myproxy.server.com:8080/
ftp_proxy=http://myproxy.server.com:8080/
no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"
HTTP_PROXY=http://myproxy.server.com:8080/
HTTPS_PROXY=http://myproxy.server.com:8080/
FTP_PROXY=http://myproxy.server.com:8080/
NO_PROXY="localhost,127.0.0.1,localaddress,.localdomain.com"

2. Then set up proxies for GTK3 programs such as Rhythmbox:

Some newer GTK3 programs such as Rhythmbox ignore the environment variables set above, and rely on Gnome settings instead. To make sure they are covered, open a terminal and paste the below line-by-line, modifying as appropriate:

gsettings set org.gnome.system.proxy mode 'manual'
gsettings set org.gnome.system.proxy.http host 'myproxy.server.com'
gsettings set org.gnome.system.proxy.http port 8080

3. Finally, set up the proxies for apt-get and Update Manager

These programs will not obey the environment variables either. Create a file called 95proxies in /etc/apt/apt.conf.d/, and include the following:

Acquire::http::proxy "http://myproxy.server.com:8080/";
Acquire::ftp::proxy "ftp://myproxy.server.com:8080/";
Acquire::https::proxy "https://myproxy.server.com:8080/";

Finally, logout and reboot to make sure the changes take effect.

Sources: 1, 2, 3. See 1 in particular for additional help, including a script to quickly turn on/off the proxies.

Scripts for turning Proxy server on/off:

Disclaimer:: Before proceeding, note that I have tried this on Lubuntu 14.04 and it is IMPORTANT that before you run the mentioned scripts, the file /etc/environment should have only one line in it i.e. '$PATH...' and there should be nothing else in the file, else you might need to modify the script's code. These scripts set and unset the proxy as described above, but they rely upon file truncation and file appending to change /etc/environment and /etc/apt/apt.conf.d/95proxies files. So make sure that:

1) /etc/environment contains only one line i.e. '$PATH:...'. And nothing else.

2) The file /etc/apt/apt.conf.d/95proxies does not exist or does not have anything
important in it.

So! If you want to automate the process of turning proxy on and off without having to type allot. you can make two executable shell scripts proxyon.sh and proxyoff.sh as:

proxyon.sh:

if [ $(id -u) -ne 0 ]; then
  echo "This script must be run as root";
  exit 1;
fi

if [ $# -eq 2 ]
  then

  gsettings set org.gnome.system.proxy mode 'manual' ;
  gsettings set org.gnome.system.proxy.http host '$1';
  gsettings set org.gnome.system.proxy.http port $2;

  grep PATH /etc/environment > lol.t;
  printf \
  "http_proxy=http://$1:$2/\n\
  https_proxy=http://$1:$2/\n\
  ftp_proxy=http://$1:$2/\n\
  no_proxy=\"localhost,127.0.0.1,localaddress,.localdomain.com\"\n\
  HTTP_PROXY=http://$1:$2/\n\
  HTTPS_PROXY=http://$1:$2/\n\
  FTP_PROXY=http://$1:$2/\n\
  NO_PROXY=\"localhost,127.0.0.1,localaddress,.localdomain.com\"\n" >> lol.t;

  cat lol.t > /etc/environment;

  printf \
  "Acquire::http::proxy \"http://$1:$2/\";\n\
  Acquire::ftp::proxy \"ftp://$1:$2/\";\n\
  Acquire::https::proxy \"https://$1:$2/\";\n" > /etc/apt/apt.conf.d/95proxies;

  rm -rf lol.t;

  else

  printf "Usage $0 <proxy_ip> <proxy_port>\n";

fi

proxyoff.sh:

if [ $(id -u) -ne 0 ]; then
  echo "This script must be run as root";
  exit 1;
fi

gsettings set org.gnome.system.proxy mode 'none' ;

grep PATH /etc/environment > lol.t;
cat lol.t > /etc/environment;

printf "" > /etc/apt/apt.conf.d/95proxies;

rm -rf lol.t;

How to use: Once you have made these scripts, make them executable, you may keep them anywhere you like. To turn on proxy all you have to do is go to the directory containing the 'proxyon.sh' script and then you need to type sudo ./proxyon.sh {host} {port}. As an example consider this:

 $ sudo ./proxyon.sh 10.2.20.17 8080
 OR
 $ sudo ./proxyon.sh myproxy.server.com 8080

Where '10.2.20.17' is the proxy server's IP - you can also type something like myproxy.server.com - and '8080' is the port. After that just log out and login to your account, to make sure that everything is set. You can start using the internet or whatever then. And when you want to turn the proxy off, go to the directory containing 'proxyoff.sh' and type:

 $ sudo ./proxyoff.sh

This will unset all of your proxies. Now logout and login again to switch to normal mode.

Go to Dash Home type System Settings, click system settings then network.Proxy settings will be visible to you. Click system wide. It may work as in system proxy settings.


Libre Office Impress opens in 11.10, but not in the launcher I double click my presentation to open it w/Impress and it opens, but there is no icon in the launcher (or alt-tab switcher) to indicate that its open. I tried keeping the Impress icon in the launcher, then opening my presentation, but the same thing happened. Then I tried opening Impress from the launcher and opening my file from inside impress...no luck either. What's up with that?

btw, im using 11.10 and the file was made with office 2010 and saved as a .ppt if that has anything to do with it.

Any help is appreciated

It's an annoying bug.

https://bugs.launchpad.net/unity/+bug/1026426

Well apparently it had to do with the lo-menubar package. I uninstalled that and it works. Atleast it worked for me, apparently there is another bug


What are the differences between "su", "sudo -s", "sudo -i", "sudo su"? I already read it from manual but I can't see difference..

su - change user ID or become superuser

sudo -s [command]

The -s (shell) option runs the shell specified by the SHELL environment variable if it is set or the shell as specified in passwd(5).  If a
                   command is specified, it is passed to the shell for execution.  Otherwise, an interactive shell is executed.

sudo -i disappear description in manual

The main difference between these commands is in the way they restrict access to their functions.

su (which means "substitute user" or "switch user") - does exactly that, it starts another shell instance with privileges of the target user. To ensure you have the rights to do that, it asks you for the password of the target user. So, to become root, you need to know root password. If there are several users on your machine who need to run commands as root, they all need to know root password - note that it'll be the same password. If you need to revoke admin permissions from one of the users, you need to change root password and tell it only to those people who need to keep access - messy.

sudo (hmm... what's the mnemonic? Super-User-DO?) is completely different. It uses a config file (/etc/sudoers) which lists which users have rights to specific actions (run commands as root, etc.) When invoked, it asks for the password of the user who started it  - to ensure the person at the terminal is really the same "joe" who's listed in /etc/sudoers. To revoke admin privileges from a person, you just need to edit the config file (or remove the user from a group which is listed in that config). This results in much cleaner management of privileges.

As a result of this, in many Debian-based systems root user has no password set - i.e. it's not possible to login as root directly.

Also, /etc/sudoers allows to specify some additional options - i.e. user X is only able to run program Y etc.

The often-used sudo su combination works as follows: first sudo asks you for your password, and, if you're allowed to do so, invokes the next command (su) as a super-user. Because su is invoked by root, it does not require you to enter the target user's password. So, sudo su allows you to open a shell as another user (including root), if you're allowed super-user access by the /etc/sudoers file.

In Ubuntu or a related system, I don't find much use for su in the traditional, super-user sense. sudo handles that case much better. However, su is great for becoming another user in one-off situations where configuring sudoers would be silly.

For example, if I'm repairing my system from a live CD/USB, I'll often mount my hard drive and other necessary stuff and chroot into the system. In such a case, my first command is generally:

su - myuser  # Note the '-'. It means to act as if that user had just logged in.

That way, I'm operating not as root, but as my normal user, and I then use sudo as appropriate.


Ubuntu Software Center does not proceed from applying changes I have a problem with Ubuntu software center. It is "Searching" and "applying changes" for long period of time. I tired to cancel by clicking cross(X) mark. However, it is now stuck at "cancelling". It won't let me download any new application even from terminal i guess.

neal@neal-G50VT:~$ sudo apt-get install gnome-tweak-tool
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
neal@neal-G50VT:~$ sudo dpkg --configure -a
dpkg: error: dpkg status database is locked by another process

There are similar question here, but with no answers:

Software Center stuck for Dropbox

Software Center freezes during “applying changes

I had the same issue too. However, I tried the following. Ran

sudo lsof /var/lib/dpkg/lock

From there I identified the PID of the process causing my dpkg to lock. Then I did

sudo kill -TERM <PID>

Next, I did a

 sudo dpkg --configure -a

and waited for the result... after that i did a regular

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

Hope it will work for you too.

You could try a reboot.

It would solve your problem.


How to use find when there are spaces in the directory names? I need to find all .nfo files in my media directory so I can use sed to change some parts. The problem is my folders have spaces in the names.

find  /media/media1/HDTV -name  \*.nfo -type f
media/media1/HDTV/Band of Brothers/Season 1/
…

The output file won't found by a sed command to change the strings I want.

find doesn't care about special characters in file names, but the program that's parsing the output of find might. If you're using xargs, use the -print0 option to find, and the -0 option to xargs. This tells find and xargs to use null characters (which cannot appear in file names) as a separator between file names, and xargs not to do any other parsing which would mangle file names containing spaces.

find /media/media1/HDTV -name '*.nfo' -type f -print0 |
xargs -0 sed -i 's/pattern/replacement/'

Another way to invoke a command on many files is to use find only.

find /media/media1/HDTV -name '*.nfo' -type f -exec sed -i 's/pattern/replacement/' {} +

Type normally but put a \ after the word and before the space.

i.e. cd ~/home/New\ Volume/movies/new\ stuff


Disable Auto Adjust microphone in Skype for Linux Beta My question is similar to How to disable microphone from auto adjusting it's Input volume, but the new Skype for Linux Beta lacks any of the advanced settings about audio or video.

This is how its settings look like:

Is there any way to disable Auto Adjust by editing a config fail or something like that?

As far as I know you can adjust the Mic on the top right corner (with the speaker). I am not using lubuntu (just plain ubuntu), so it may be slightly diffrent. But you should be able to adjust the mic settings under System Settings --> Sound --> Input.


How to move taskbar to bottom position as in Windows I'm very new to Ubuntu. I have just installed it on my pc and i liked it. But as i'm from Windows background i like the taskbar at the bottom and not at the left position. So is there any way to move it to bottom position? I searched on the net and found a solution but it is for 32 bit version 11.10 and i'm using version 14.04 LTS the latest one on 64 bit machine. Thanks for your kind help.

I know this question is for 14.04, but as this is one of the first results for "moving taksbar to bottom", I think it will be helpful to others like me who want to do this on Ubuntu 16.04:

Just execute the following command:

gsettings set com.canonical.Unity.Launcher launcher-position Bottom

Or, if you prefer something more detailed, and more options, install unity tweak tool, as explained in the accepted answer.

if you click on panel preferences (right click), you can move the panel whilst in this mode (on my computer it is highlighted with a red dashed border). The icons don't line up but its better then before. You also delete the panel, by using the plus or minus on the panel preferences pane.


How do I uninstall BManager? How do I uninstall BManager from my computer? I have an empty box on my desk top that will not close. Due to the fact the box will not close, I can't delete BManager.

First I uninstalled from the control panel. It still would not go away even though it did not show up in the program list.

Next I opened Task Manager and closed BManager in the task manager, then rebooted computer. It no longer opened at start up. Don't know if it is totally gone but it is no longer bothering me.


wired connection detected but no internet access in ubuntu 14.04 lts i am having ubuntu 14.04 lts on machine.Though it is showing connected to LAN in network manager but it cant access internet.

There are few steps you should follow while debugging internet connectivity
I assume you use DHCP and NetworkManager for configuration.

1) Check if you have IP address assigned
Open terminal end enter

ifconfig

If you see something like this containing inet addr than it is ok

eth0      Link encap:Ethernet  HWaddr 00:23:74:3d:92:90
          inet addr:192.168.1.2  Bcast:192.168.1.15  Mask:255.255.255.240

2) Check if you have default gateway assigned. Open terminal and enter

netstat -r

If you see similar output containg line beginning with default than it is ok

Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
default         192.168.1.1     0.0.0.0         UG        0 0          0 eth0

3) Check if you can ping default gateway. Open terminal and enter

 ping 192.168.1.1

where 192.168.1.1 should be replaced with adress you see in nestat -r output

You should see something like this

PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_req=1 ttl=64 time=0.265 ms
64 bytes from 192.168.1.1: icmp_req=2 ttl=64 time=0.235 ms
64 bytes from 192.168.1.1: icmp_req=3 ttl=64 time=0.221 ms

4) Check if you have DNS server assigned. Open terminal and enter

cat /etc/resolv.conf

You should see at least one line containing word nameserver

nameserver 8.8.8.8

5) Check if you can ping DNS server. Open terminal and enter

 ping 8.8.8.8

where 8.8.8.8 should be replaced with address you see in cat /etc/resolv.conf output

You should see something like this

PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_req=1 ttl=48 time=25.5 ms
64 bytes from 8.8.8.8: icmp_req=2 ttl=48 time=26.1 ms
64 bytes from 8.8.8.8: icmp_req=3 ttl=48 time=24.9 ms

6) Check if you can resolve DNS names. Open terminal and enter

host www.google.pl

You should see something like this

www.google.pl has address 216.58.209.67

If any of the steps fails than it needs further investigation.

if you got step 6 of @Darek's answer and saw this in your
/etc/resolv.conf file has comments like this: (it might be empty without the commments too)

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN

generate the DNS contents like this:

Step 1:
Install the resolvconf package, it enables you to make permanent changes to the resolv.conf file
sudo apt install resolvconf

Step 2:
Edit /etc/resolvconf/resolv.conf.d/head and add the following:

   # Make edits to /etc/resolvconf/resolv.conf.d/head.
   nameserver 8.8.4.4
   nameserver 8.8.8.8

Step 3:
Restart the resolvconf service.

sudo service resolvconf restart

NB: This problem may arise if you upgraded from a previous version of ubuntu to 18.04


NetGear a600 won't connect to 5GHz I did a clean install of Ubuntu 16.04LTS.  My wireless dongle did not work.  No surprise - it didn't work when I first got it.  I had to manually download, compile and install a driver for it.  So I tried the same thing.  This time the dongle doesn't connect to the 5GHz band on my router.  It connects to the 2.4 GHZ with no problem.  Now I've crowded my system with too many drivers and still can't get the 5GHz band.

 dkms status

8812au, 4.3.20, 4.4.0-83-generic, x86_64: installed (WARNING! Diff between built and installed module!)
bbswitch, 0.8, 4.4.0-83-generic, x86_64: installed
nvidia-375, 375.66, 4.4.0-83-generic, x86_64: installed
rtl8812au, 4.3.8.12175.20140902+dfsg, 4.4.0-83-generic, x86_64: installed (WARNING! Diff between built and installed module!)

Why is it that the drivers I've tried will connect to the low band but not the high band?  How to I clean my system of unwanted/unused drivers?
Can anyone help?

So after removing all of the drivers and cleaning out dkms, I went into my router.  I had both the 2.4GHz and 5GHz bands hidden.  I left the 2.4GHz band hidden but unhid the 5GHz band.  I rebuilt the driver and it worked like a charm.

First you have both 8812au and rtl8812au installed they will conflict since both drivers are for the wifi dongle.
Second in both cases the installed module is not the built module (possibly they are switched). It appears that rtl8812au is the ubuntu kernel module.

Edit /etc/modprobe.d/blacklist and add the line blacklist rtl8812au
then rebuild and reinstall 8812au. verify that the installed module matches the built module. dkms status

and reboot.


How do I fix the GPG error "NO_PUBKEY"? I added some extra repositories with the Software Sources program. But when I reload the package database, I get an error like the following:

  W: GPG error: http://ppa.launchpad.net trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8BAF9A6F

I know I can fix it using apt-key in a terminal, according to the official Ubuntu documentation. But I would have liked to do it graphically. Is there a way to do this without using a terminal?

Execute the following commands in terminal

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <PUBKEY>

where <PUBKEY> is your missing public key for repository, e.g. 8BAF9A6F.

Then update

sudo apt-get update

ALTERNATE METHOD:

sudo gpg --keyserver pgpkeys.mit.edu --recv-key  <PUBKEY>
sudo gpg -a --export <PUBKEY> | sudo apt-key add -
sudo apt-get update

Note that when you import a key like this using apt-key you are telling the system that you trust the key you're importing to sign software your system will be using. Do not do this unless you're sure the key is really the key of the package distributor.

I had the same problem with DynDNS's Updater client.

Turns out it was just expired keys.

Reinstalling the software (downloading a new .deb from the website, then using Software Centre to reinstall) fixed the problem.

Error message for reference:

W: GPG error: http://cdn.dyn.com stable/ Release: The following signatures were invalid: KEYEXPIRED 141943.......


How to enlarge encrypted swap partition? I have added some RAM to my netbook. I'd like to save an option to hibernate my computer, so I have to increase my SWAP from 2GiB to 4GiB.

My /etc/fstab looks like this:

UUID=57b6e4ca-86f6-440d-8d45-2295a86a946b /               ext4    errors=remount-ro 0       1
/dev/mapper/sda6_crypt /home           ext4    defaults        0       2
/dev/mapper/sda5_crypt none            swap    sw              0       0

My /etc/crypttab looks like this:

sda5_crypt UUID=17ec5831-e49e-4eb0-aa63-05101038a85c none luks,swap
sda6_crypt UUID=2a01b2a0-e954-4a97-9202-6cdbc0152e73 none luks

Appreciate any help.

Because the partitions are encrypted, it's not possible to resize them using the normal tools such as parted/gparted.  This is because the actual partition on disk is not a valid file system, but just an encrypted block, which appears like a string of seemingly random data.

You can delete them and totally recreate them.  If you only need to resize your swap, and to do this you don't need to resize any other (encrypted) partition, then trashing and re-installing it is going to be easy.  But I assume that's not the case, as not many people will just leave unallocated space on the drive should they want to increase the swap partition (unless you're able to expand it into your un-encrypted root partition?).  Otherwise you may be able to recreate your swap and home partitions, and copy across your files from an external drive.  You will probably need to be familiar with cryptsetup and the way luks works.  Otherwise a clean install is in order.

A common configuration with LUKS is to use LVM on top of it, which gives you a much easier way of resizing partitions inside your encrypted block - because LUKS means you have multiple partitions inside the same block, you don't need to resize the container to resize the partitions inside.  If you are going to resort to a clean install, the alternate installer CD makes setting up a LUKS partition with LVM on top of it easy.

Most online tutorials you'll find about resizing a LUKS partition are actually about resizing LVM volumnes inside of one instead.

Try booting on a Live CD or Live USB stick. Then choose "Try Ubuntu without installing it". When you get to the desktop, launch the app called Gparted.

In this application, you will be able to change the size of the partitions, including the swap one. But the latter one requires you first to right-click on the swap partition line and select "Swap off". Then you will be able to make your changes.


Dynamic Right sizing for TCP implementation in linux Is Dynamic Right Sizing(DRS) implemented in linux kernel(3.4 and above) by default?.In this link(http://public.lanl.gov/radiant/software/drs.html) patches for kernel 2.4.23 and 2.4.8 are available but nothing is mentioned about later versions of kernel. If it is not implemented by default in later versions of kernel can someone please direct me in the right direction to get it  installed(or implemented) in the later versions.

I think DRS is implemented. Looking at tot Linux tree:
https://github.com/torvalds/linux/blob/master/net/ipv4/tcp_input.c#L482

The linux kernel auto tunes the TCP receive buffer size.

tcp_moderate_rcvbuf (Boolean; default: enabled; since Linux 2.4.17/2.6.7)
If enabled, TCP performs receive buffer auto-tuning, attempting to automatically size the buffer (no greater than tcp_rmem) to match the size required by the path for full throughput.

Source: http://linux.die.net/man/7/tcp


How to install PHP `mbstring` extension in Ubuntu? What is the  PHP mbstring extension, and what is the best way to install it on Ubuntu 14.04?

EDIT: Dylan Pierce has confirmed that you can already install some PHP 7.2 extensions in the same way you would for PHP 5. For mbstring in particular, you can execute:

sudo apt-get install php7.2-mbstring

To complement sparkmood's answer, this now works for PHP 7.2 if you already imported ondrej's PPA for it.

sudo apt-get install libapache2-mod-php7.2

Don't forget, either PHP 7 is available through ubuntu's official repositories or you will need an external PPA.

For Ubuntu 14.04 extension mbstring should be built in.

For Ubuntu 16.04:

sudo apt-get install php7.0-mbstring

See also Introduction to Multibyte String


How to run 32-bit app in Ubuntu 64-bit? I installed Ubuntu 14.04 and the current Android development SDK, which contains 32-bit executables. I found that I cannot run those 32-bit binaries. Trying to start them from bash gives me an error:
$ ./adb
bash: ./adb: No such file or directory

It is there though:
$ ls -al ./adb
-rwxrwxrwx 1 thomas thomas 1231255 Jan 17 13:31 ./adb
$ file ./adb
./adb: ELF 32-bit LSB  executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, not stripped.

Same symptom for all the other 32-bit tools in the Android SDK.
In olden days one could just install 32-bit libraries on 64-bit Ubuntu to get 32-bit support, but that does not seem to work anymore.
How do I run 32-bit apps on a 64-bit Ubuntu distribution?

To run a 32-bit executable file on a 64-bit multi-architecture Ubuntu system, you have to add the i386 architecture and install the three library packages libc6:i386, libncurses5:i386, and libstdc++6:i386:

sudo dpkg --add-architecture i386

Or if you are using Ubuntu 12.04 LTS (Precise Pangolin) or below, use this:

echo "foreign-architecture i386" > /etc/dpkg/dpkg.cfg.d/multiarch

Then:

sudo apt-get update
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386

If fails, do also

sudo apt-get install multiarch-support

After these steps, you should be able to run the 32-bit application:

./example32bitprogram

Just an addition to Zanna:
The following has solved the android studio problem of "unable to install libraries":

sudo apt-get install libdb1-compact tzdata initscripts

This replaces missing library libstdc++6-i386 which is probably because the package has been obsoleted. Not sure why this specific library was important.


Copying files from hard disk to LiveUSB I am very new to Ubuntu. I am using the latest desktop version of Ubuntu 12.04. I have created a live USB and booted in to my desktop.I want to copy files from my desktop hard disk to the live USB so that I can copy them back to my laptop hard disk.

Is it possible?

It's possible by any USB, but i don't think you will be able to copy files using live USB.

Ubuntu will auto mount your USB and show in the Home Folder Devices list.Copy and paste files just like you do in Windows or other OS.

If you make USB persistent so you can't copy files from my desktop hard disk to the live USB.
If you are running Ubuntu from USB you can't do it
If you have already setup your system then you can do it


HW requirements for 13.04/13.10 I'm sorry if this has been asked and addressed already.

What are the HW pre requisites for Ubuntu 13.04/13.10?

I'm a big fan of Ubuntu and wish to install it on my 9 year old PC. Wondering if it will work.

According to:

https://help.ubuntu.com/13.04/serverguide/preparing-to-install.html

these are the minimum hardware requirements for 13.04:

    Install Type      CPU        RAM             Hard Drive Space
                                            Base System     All Tasks Installed

Server (Standard)    1 GHz      512 MB         1 GB               1.75 GB

 Server (Minimal)   300 MHz     128 MB       700 MB               1.4  GB


mtp usage: how to mount and transfer files to and from a Samsung: Galaxy model Android phone how do I use mtpfs to read/write to a USB connected Android phone, connected as a mass storage device:

thufir@dur:~$
thufir@dur:~$ mkdir phone
thufir@dur:~$
thufir@dur:~$ sudo mtpfs -o allow_other phone
[sudo] password for thufir:
Unable to open ~/.mtpz-data for reading, MTPZ disabled.Listing raw device(s)
Device 0 (VID=04e8 and PID=6860) is a Samsung Galaxy models (MTP).
   Found 1 device(s):
   Samsung: Galaxy models (MTP) (04e8:6860) @ bus 1, dev 6
Attempting to connect device
ignoring libusb_claim_interface() = -6PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
LIBMTP PANIC: Could not open session! (Return code 8195)
  Try to reset the device.
Unable to open raw device 0
thufir@dur:~$

and:

thufir@dur:~$
thufir@dur:~$ mount
/dev/mapper/ubuntu--vg-root on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
none on /sys/fs/pstore type pstore (rw)
/dev/sda1 on /boot type ext2 (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=thufir)
thufir@dur:~$

and lsusb shows:

thufir@dur:~$ lsusb
Bus 001 Device 006: ID 04e8:6860 Samsung Electronics Co., Ltd GT-I9100 Phone [Galaxy S II], GT-I9300 Phone [Galaxy S III], GT-P7500 [Galaxy Tab 10.1]
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 003: ID 045e:00cb Microsoft Corp. Basic Optical Mouse v2.0
Bus 004 Device 002: ID 0461:0010 Primax Electronics, Ltd HP Keyboard
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
thufir@dur:~$

Toggling the phone between MTP and PTP allows:

thufir@dur:~$
thufir@dur:~$ sudo mtpfs -o allow_other phone
[sudo] password for thufir:
Unable to open ~/.mtpz-data for reading, MTPZ disabled.Listing raw device(s)
   No raw devices found.
thufir@dur:~$ sudo mtpfs -o allow_other phone
Unable to open ~/.mtpz-data for reading, MTPZ disabled.Listing raw device(s)
Device 0 (VID=04e8 and PID=6860) is a Samsung Galaxy models (MTP).
   Found 1 device(s):
   Samsung: Galaxy models (MTP) (04e8:6860) @ bus 1, dev 8
Attempting to connect device
Listing File Information on Device with name: GT-S7560M
thufir@dur:~$
thufir@dur:~$ ls phone
ls: cannot access phone: Transport endpoint is not connected
thufir@dur:~$

although I don't know what that accomplishes.

see also:

https://askubuntu.com/a/57306/45156

I'm on Debian derived Bunsen Labs Linux 8.6 bunsen-hydrogen
So,you can try this:

$ sudo apt-get install mtp-tools
$ man mtp-tools

This is kinda clunky, but I've used it to get files off my ultra low-end Alcatel (KitKat) phone.
There's got to be a better way...

#!/bin/bash
# copies all the pictures out of my Android phone

echo "Creating list of .jpg files..."
mtp-files | \
egrep '^File ID|Filename' | \
perl -pe 'm/^File/ && s/\n//' | \
perl -lane 'print "$F[2] $F[4]" if m/\.jpg/' > camera_files.lst

while read field1 field2; do
  echo "Copying $field2..."
  mtp-getfile $field1 $field2
done < camera_files.lst

magically, works now:

It's mounted?

thufir@tleilax:~$
thufir@tleilax:~$ mount
/dev/sda5 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,nodev,noexec,nosuid)
sysfs on /sys type sysfs (rw,nodev,noexec,nosuid)
none on /sys/fs/cgroup type tmpfs (rw,uid=0,gid=0,mode=0755,size=1024)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,nodev,noexec,nosuid,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,nodev,noexec,nosuid,size=104857600,mode=0755)
none on /sys/fs/pstore type pstore (rw)
systemd on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,noexec,nodev,none,name=systemd)
/home/.ecryptfs/thufir/.Private on /home/thufir type ecryptfs (ecryptfs_check_dev_ruid,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_unlink_sigs,ecryptfs_sig=c36b5937afc3da6c,ecryptfs_fnek_sig=bd3e015ffef0ebaf)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=thufir)
/dev/sr0 on /media/thufir/Ubuntu 14.10 amd64 type iso9660 (ro,nodev,nosuid,uid=1000,gid=1000,iocharset=utf8,mode=0400,dmode=0500,uhelper=udisks2)
thufir@tleilax:~$


When installing user applications, where do "best practices" suggest they be located? Occasionally I install applications manually, rather than using apt or another package manager.

What location (/usr/, /usr/local/, /opt/, /home/, etc.) is suggested by "best practices" for the installation of user applications?

That depends, really. If the application has a makefile, or for example for python apps if the application uses distutils (e.g., has a setup.py file), or a similar build/install system, you should install it into /usr/local/.  This is often the default behavior.

From what I understand, /usr/local/ has a hierarchy that is similar to /usr/. However, directories like /usr/bin/ and /usr/lib/ are usually reserved for packages install via apt. So a program expecting to get "installed" into /usr/ should work fine in /usr/local/.

If you just need to extract a tarball and run directly (e.g. Firefox) then put it into /opt/. A program that just needs one directory and will get all files/libraries relative to that directory can get one directory for itself in /opt/.

Use "checkinstall" to convert your alien package to a deb so that it is uninstallable using the package manager.

Do note that config files will often not be handled as config files (perhaps ignored, or perhaps treated as part of the app), and that pre- and post-install scripts sometimes get bungled, though it will usually warn you when it thinks the deb will have a bad pre- or post-install script.


ubuntu 20.04 not getting locked after lid close I have installed the latest ubuntu 20.04 and recently noticed a bug that whenever I close my lid the screen only goes blank instead of going into hibernate or suspend. Earlier after reopening the lid, I was presented with a lock screen.

I noticed that there is no longer an option in gnome-settings as it was in ubuntu 18.04.
tried changing the values in /etc/systemd/logind.conf.
changing values in gnome-tweaks.
tried installing hibernate from sudo apt-get install hibernate and running

sudo hibernate

getting this error

hibernate:Warning: Tuxonice binary signature file not found.
Some modules failed to unload: nvidia_drm nvidia_modeset nvidia
hibernate: Aborting suspend due to errors in ModulesUnloadBlacklist (use --force to override)

How to resolve this?

Yes, changing the display manager to GDM3 worked for me as well.  It was as simple as:
sudo apt-get install gdm3

During the install process a screen pops up that allows you to choose GDM3 instead of LightDM.  Choose GDM3!
Before that though, I made several failed attempts to install other display managers such as SLIM, CDM, XDM, etc.  I spent hours trying to "compile" and "make" (a bit over my head) and they were all dead ends.


Ubuntu Server 16.04.2 - Wifi connection So, quick story. I found an old laptop and decided to convert it into a server. Just to see if I was able to.

Installation went smoothly.

The problem was when connecting to the network, it just... Didn't. So I've been googling and tweaking all night and my eyes are too tired and I decide to simply ask.

The wireless network card is a Qualcomm Atheros AR242x.

The interfaces file reads as follows:

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto wlan0
iface wlan0 inet static
   address 192.168.x.xx
   netmask 255.255.255.0
   gateway 192.168.x.xx
   wpa-ssid foo
   wpa-psk boo

I then run

sudo /etc/init.d/networking restart

Which fails.

What am I doing wrong? What am I missing?

Thanks in advance

Because of persistent interface naming which started in Ubuntu 16.04, I suspect that your interface name is not wlan0. Confirm:

iwconfig

You may find that it is something like wlp3s0 or similar. If so, amend the interfaces file to read:

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto wlp3s0
iface wlp3s0 inet static
   address 192.168.x.xx
   netmask 255.255.255.0
   gateway 192.168.x.xx
   dns-nameservers 192.168.x.xx 8.8.8.8
   wpa-ssid foo
   wpa-psk boo

Check in the administration pages of your router or access point to find the range of addresses used for DHCP; select an address for your static server outside that range so that there is no collision.

Either reboot or retstart the interface:

sudo ifdown wlp3s0 && sudo ifup -v wlp3s0

Did you connect?

ping -c3 8.8.8.8
ping -c3 www.ubuntu.com

There is a static IP address set on the machine. To fix that, first let's open the terminal:
ctrl-alt-t

Copy/paste the following few commands into the terminal.
Next let's use chili555's command (which he mispelled) to verify the correct interface:
ifconfig

Now,  let's reach out to the router and say hello, with the verbose switch on to see what happens:
sudo dhclient -v

Type in your root password.
You should see lines for an IP address request and offer in the output
Now, let's release the static IP address (with -v to see what is going on):
sudo dhclient -v -r

No need to type in your password again for this session.
On some variants of linux this will bring the network interface down and not renew the IP address. If this happens, you can now simply reconnect to the wireless network with your GUI Network Manager like you did the first time, or use chili555's ifdown/ifup command (not sure of his accuracy on that, never used it myself).
If you are still having issues, the next thing to do is open the laptop up and make sure the wireless antenna is connected and not broke. You see: the antenna goes through the hinge and extends up around the screen. Sometimes when laptops age, that wire can get damaged in the hinge. Simple enough to reattach, but it can be difficult to open a laptop with hidden screws and such, so please youtube the procedure for you model.
If it became disconnected, reconnect it and try again. If it is damaged, you can either replace it, or get a USB Wifi adaptor. Ofcourse no need to open the laptop to use a USB adaptor!
Source:
https://www.computerhope.com/issues/ch001078.htm


Laptop freezes whenever it isn't plugged in I have a docked Dell laptop and, if I undock, it freezes and nothing works. I have to do a hard reset and put in the docker to get working again. When it restarts, I get a message about unsupported splx structure. I test this, shut down, and start over, but the problem persists every time. Any suggestions as to what I can do?

I had the same problem and I fixed it by doing:

Open Terminal (Ctrl + Alt + T)

sudo apt-get update

sudo apt-get upgrade

Now reboot the system.


How do I restore the original color scheme, icons, and theme? I'd like the original colour scheme, icon style of 12.04.

I somehow lost the Ambiance theme (possible error or upgrade error).
I re-installed 'light-themes' from the terminal and got it back.

But the panel on the top that shows the options of sound, battery and wi-fi has changed and I can-not get the original setting back.

In the windows, the close, minimize tools have shifted to the right instead of the original left side.

I had installed MyUnity and Ubuntu Tweak but deleted them. As such, I want the original setting back.

Kindly help me with the commands.

I have searched for solutions; there are multiple and I need to be sure if I should follow the same. Kindly bear before marking duplicate.

Discoveries:

The appearance is gray and boxy as outlined here. Not sure same problem.
Similar 'gray and boxy' article here.
Desktop forgets theme.
I have also tried the unity --reset command. It never completes. I gave it 20 minutes.

Open terminal Ctrl+Alt+T and run following command:

Reset Icon Pack

gsettings set org.gnome.desktop.interface icon-theme ''

Reset Theme

gsettings set org.gnome.desktop.interface gtk-theme ''

gsettings set org.gnome.desktop.wm.preferences theme ''

gconftool-2 --set --type string /apps/metacity/general/theme ''

Reset Launcher

gsettings reset com.canonical.Unity.Launcher favorites

Reset Panel

gsettings set com.canonical.Unity.Panel systray-whitelist "['all']"

After run this command logout and login back.

What you can do is reinstall MyUnity and open up the themes menu. There is a button to reset it to the defaults, but you can manually set the theme to "Ambiance" and the icon theme to "Ubuntu-Mono-Dark" and that should bring you back to the default 12.04 set-up.


Active Pen support in Linux for HP X360 i have recently bought a HP Pavilion x360 14-ba017ng with only Windows atm, but i want to install a Linux Distribution on this notebook.
My only concern is that this notebook has active pen, tablet mode and touch and if this works correctly.

I already did some research but most posts and information i found are at least a year old.

So my questions are,

what distribution would you people prefer for active pen input and touchscreen/table mode?

are there any actual known problems with this kind of inputmethods?

Best Regards :)

I have just received my new Asus Zenbook Flip and I'm about to install Ubuntu 17.10, so I'll report back here on my success / lack thereof.

You asked 4 months ago, did you learn anything yourself about this in the meantime?

Update: I'm running Ubuntu 18.04 and the pen works 100%.

HP support is garbage. Touch screen works out of the box and tilt driver was promised by AMD since August. General compatibility, particularly around ACPI though is horrible.


Are Ubuntu builds deterministic? Why not? Are Ubuntu builds deterministic? I assumed they are, that is, if I recreate the process of building Ubuntu installation media, I will get the same image, (bit-for-bit, with the same checksums) as the one on the Ubuntu mirrors.

Recent post by Joanna Rutkowska (lead developer of Qubes OS distro) suggests that it isn't so:

  currently most projects, including all Linux distributions, do not build deterministically

Why not?

No they're not. Let's clarify a distinction here,

Does the system support "reproducible builds"?

Yes all systems support packages that are deterministic.
Does the system enforce "reproducible builds"?

Nope, though it does help diagnose problems, and works is being done to make packages reproducible -- bugs are being reported and handled anyway.
Is everything, without exception, reproducible?

Not even close.

Now let's define "reproducible builds"

  A build is reproducible if given the same source code, build environment and build instructions, any party can recreate bit-by-bit identical copies of all specified artifacts.

  The relevant attributes of the build environment, the build instructions and the source code as well as the expected reproducible artifacts are defined by the authors or distributors. The artifacts of a build are the parts of the build results that are the desired primary output.

Now let's talk about what is required

Check out this page under "How" which lays down three criteria

the build system needs to be made entirely deterministic: transforming a given source must always create the same result. Typically, the current date and time must not be recorded and output always has to be written in the same order.
the set of tools used to perform the build and more generally the build environment should either be recorded or pre-defined.
users should be given a way to recreate a close enough build 3., perform the build process, and verify that the output matches the original build.

You can find more documentation about all of that here.

As to why Ubuntu isn't currently reproducible, things like Perl currently fail because -V stores the compiler args for convenience -- they're waiting on GCC to patch this upstream. A lot of this functionality could simply nuked. Some other problems: some man pages and programs have the build dates compiled in, others compile in mutable paths to shared libraries and the like.

Not being reproducible isn't a problem or a vulnerability. It just makes it harder to verify that you haven't been tampered with, and currently that functionality is being viewed as more valuable.

You can follow Debian's progress towards determinism here

For starters, I don't think Rutkowska was talking about building installation media deterministically, but about packages (deb, rpm).

Debian is working on building packages reproducibly  (https://wiki.debian.org/ReproducibleBuilds) but there are still lots of packages that don't build that way...

Building a whole distribution deterministically surely is even more of a challenge.


how do you play world of tanks on ubuntu how do you play wot on unbuntu.I`m new to linux os and know how to do about nothing on how to use it.

Just works under wine 3.21-staging and up.Current stable version is 4.0.

Based on wine application database, the game has gold status, which means it should work without any problems. If something turns out, check the linked website for all the available workarounds.

Install

If your system is x64, you need to enable x86 architecture

sudo -i
dpkg --add-architecture i386

Download and add the repository key

wget -nc https://dl.winehq.org/wine-builds/winehq.key
apt-key add winehq.key

Add the repository based on your ubuntu version

  One line here is one command for terminal. Use copy-paste.

apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ cosmicmain'
apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionicmain'
apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ xenialmain'
apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ trustymain'

Update packages with apt update

Install one of the following packages

  Note, that there is no space between winehq-stable etc.

sudo apt install --install-recommends winehq-stable
sudo apt install --install-recommends winehq-devel
sudo apt install --install-recommends winehq-staging


keyboard not working in grub I installed Ubuntu alongside windows 7. Now when I get to the menu to select my keyboard will not work so I cannot choose any os to boot. My keyboard works in bios. And I have checked and legacy is enabled. I don't have another keyboard to test. And frankly I'd rather not go buy one. This is very annoying that I can't even boot once... Any help is appreciated.

Have you tried to grub? Perhaps updating/repairing it work.

http://ubuntuforums.org/showthread.php?t=2041483


Vodafone usb Modem(ZTE K3770-z) is not working I have purchased new vodafone usb modem (ZTE K3770-z) and  tried to  connect it with ubuntu 11.04. But it is not automatically detected on  ubuntu.

I have installed  windows 7 and ubuntu 11.04 on my laptop.

To detect the modem on ubuntu I did the following steps :-

1) Connect the modem with laptop and boot the machine with windows 7
2) After detecting the modem on wndows, restarted the machine and enter into ubuntu.

Does anyone know any solution to detect the modem automatically on ubuntu?

Thanks in advance.

open Synaptic Package Manager Type "Smartlink" into the search field in the Synaptic Package Manager and install all of smarlink package. http://www.ehow.com/how_5435902_install-modem-drivers-ubuntu.html#ixzz2BcaT8Ean it works with me very well

Install usb-modeswitch:

sudo apt-get install usb-modeswitch