How to check if a command succeeded? Is there any way to check if there is an error in executing a command?

Example :

test1=`sed -i "/:@/c connection.url=jdbc:oracle:thin:@$ip:1521:$dataBase" $search`
valid $test1

function valid () {
  if $test -eq 1; then
    echo "OK"
    else echo "ERROR"
  fi
}

I already tried do that but it seems it isn't working. I don't how do that.

The return value is stored in $?. 0 indicates success, others indicates error.

some_command
if [ $? -eq 0 ]; then
    echo OK
else
    echo FAIL
fi

Like any other textual value, you can store it in a variable for future comparison:

some_command
retval=$?
do_something $retval
if [ $retval -ne 0 ]; then
    echo "Return code was not zero but $retval"
fi

For possible comparison operators, see man test.

For easier debugging, I make commands to only output errors with:

so [-tag] [commands]

After that $? is 0 if success, otherwise failure.


How to use Plop Boot Manager to boot from USB in Linux? I failed to upgrade from 12.04 to 12.10, so I decide to make a fresh install of 12.10. My old computer doesn't support boot from usb, and its cd-rom is broken.
I know Plop Boot Manager can make my computer boot from usb. I know how to use it in Windows, and I did use it when I tranfer from Win-XP to Ubuntu 12.04. But now, I don't know how to use it under Linux.

As far as I know, despite of the lengthy documentation, using Plop to boot from usb under Windows is as simple as double clicking a bat file. But doc for linux is not that straitfoward and contains daunting terminologies such as LILO for a Linux newbie. What makes it worse is that I'm not a native English speaker.

So could someone show me a brief and concise instruction how to boot from usb?

This should work if you have GRUB2. Follow the source link to see other methods using LILO and other options.

Quote from the PLOP Boot manager site.

  Download the current boot manager plpbt-5.0.14.zip. Extract it to get the boot manager install program. You find the install program plpinstc.com in the install directory.

  Copy plpinstc.com to /boot.

  Example file /etc/grub.d/40_custom

#!/bin/sh
exec tail -n +3 $0

menuentry "Install Plop Boot Manager" {
    set root='(hd0,1)'
    linux16 /boot/plpinstc.com
}

  Then run update-grub2 or update-grub.

  When you reboot, you should be able to choose the install program from your grub menu.

  Info: You have to choose the correct root settings in your configuration or you get a "Error: file not found". See also this Forum entry.

First, you need to get Plop Boot Manager.

  As far as I know, despite of the lengthy documentation, using Plop to boot from usb under Windows is as simple as double clicking a bat file. But the doc for Linux is not that straight forward and contains daunting terminologies such as LILO for a Linux newbie.

Well, straight forward, LILO is a boot manager. Basically, it's saying it will boot into LILO. It's a bit like GRUB. Plop Boot Manager comes with LILO, so it will install it with Plop Boot Manager. That will go into the USB. Then, when you boot, LILO will come up.

  So could someone show me a brief and concise instruction how to boot from usb?

Well, to boot off the USB, you need to go into the BIOS.

At the screen, go into the Boot section.

Put the USB in the Boot order. Remember to put the USB before your SSD/HHD.

Then save changes and re-boot.

Hope this helps!


How to install second life? I downloaded Second life from the website for Ubuntu . And I extracted the file but I cant get it to run or know how to get it to run so that I can install it right.The program is in script until I can get it to run. Can someone please tell me what to do after I extracted the file. Please try to make it simple instructions, step by step, not to great on knowing how to do computer stuff.

Follow this step by step:

Press here to download the file: Second_Life_3_7_24_297623_i686.tar.bz2.
Save it to your home folder(/home/YOUR USERNAME).
Right click the downloaded file, select extract here.
Open up a terminal.(On your keyboard: CTRL-ALT-T-)
Typ in the terminal: cd Second_Life_3_7_24_297623_i686
Then in the same terminal: sudo ./install.sh,

typ in your password, press enter,
press enter again

Go to dash (Windows key on your keyboard, left top right button on your screen.)

Typ in secondlife, click on the second life icon, and voila:

this is how you get secondlife on Linux:

Download it from website
Extract to desired install location
Open terminal and type cd /path/to/second/life then type ls to display files
type sudo ./install.sh
type sudo apt-get install ./secondlife
type cd /second/life/directory
then type " ./secondlife


Very slow startup after update to 12.04 My hardware:

Dell Latitude D600 laptop
Processor: Intel Pentium (r) 1.8 GHz
Memory 1.2 GiB
Graphics R200 (RV250 4C66) x86/MMX/SSE2 TCL DRI2
Disk: 37.7 gb

I did an update from 11.?? using the automatic system update that pops up when you switch/log on.

Ever since then when I switch on the machine it takes approximately one hour to get to the login screen.

Sometimes the actual login will take time too, but sometimes within a couple of minutes I am logged in.

Once I am logged in I find I can work normally, the response is not swift, but is neither too slow that I cannot work.

I was wondering if there was anything I could do to speed things up.

I deliberately did not do a clean install from disk, because I did not want to loose settings on the machine.

Have you tried doing some, 'spring cleaning' removing old kernels? If not open up terminal (ctrl+alt+T) and paste the following commands:

Taking note of the most recent kernel

dpkg --list | grep linux-image

This will reveal all kernels presently installed on your system. Look for outdated kernels.

sudo apt-get purge linux-image-x.x.x.x-generic

Where x.x.x.x is the kernels you're wanting to remove, that is, outdated kernels.

sudo update-grub2

To update grub2.


Problem with LVM over mdadm with NTFS. Is it possible? I am a bit of a linux newbie, and i have come across an error that i dont really know how to troubleshoot.

my idea is to cram 6TiB drives into a box, make three sets of raid1, then stretch a logical volume over the three raided sets. then make a samba share with an NTFS filesystem for a neat fileserver for a small production environment.

here is my error:

user@FSrv:~$ sudo mount /dev/box1/Recordings /rec -t ntfs
NTFS signature is missing.
Failed to mount '/dev/mapper/box1-Recordings': Invalid argument
The device '/dev/mapper/box1-Recordings' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
user@FSrv:~$

here is lsblk:

user@FSrv:~$ sudo lsblk
NAME                       MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda                          8:0    0  29.8G  0 disk
├─sda1                       8:1    0   243M  0 part  /boot
├─sda2                       8:2    0     1K  0 part
└─sda5                       8:5    0  29.6G  0 part
  ├─box1-root (dm-0)       252:0    0  15.8G  0 lvm   /
  ├─box1-swap_1 (dm-1)     252:1    0   7.9G  0 lvm   [SWAP]
  └─box1-Recordings (dm-2) 252:2    0   2.7T  0 lvm
sdb                          8:16   0 931.5G  0 disk
└─md0                        9:0    0 931.4G  0 raid1
  └─box1-Recordings (dm-2) 252:2    0   2.7T  0 lvm
sdc                          8:32   0 931.5G  0 disk
└─md0                        9:0    0 931.4G  0 raid1
  └─box1-Recordings (dm-2) 252:2    0   2.7T  0 lvm
sdd                          8:48   0 931.5G  0 disk
└─md1                        9:1    0 931.4G  0 raid1
  └─box1-Recordings (dm-2) 252:2    0   2.7T  0 lvm
sde                          8:64   0 931.5G  0 disk
└─md1                        9:1    0 931.4G  0 raid1
  └─box1-Recordings (dm-2) 252:2    0   2.7T  0 lvm
sdf                          8:80   0 931.5G  0 disk
└─md2                        9:2    0 931.4G  0 raid1
  └─box1-Recordings (dm-2) 252:2    0   2.7T  0 lvm
sdg                          8:96   0 931.5G  0 disk
└─md2                        9:2    0 931.4G  0 raid1
  └─box1-Recordings (dm-2) 252:2    0   2.7T  0 lvm
user@FSrv:~$

here is fdisk -l : http://paste.ubuntu.com/1623016/

Here is pvdisplay, vgdisplay, and lvdisplay: http://paste.ubuntu.com/1623019/

Does anyone know what the root cause would be? Or what my next troubleshooting step would be?

You probably have not created a filesystem on the partitions; see man mkfs.ntfs. Just setting the partition type is not enough.

First of all, you don't want to use NTFS unless you are dual booting with Windows.  For sharing files with samba to Windows or other clients, you are better off using a normal filesystem like ext4.

Second, you are better off with a single raid array than letting lvm stripe over multiple raid1s.  A raid5 or 6 will give you the most usable space with good performance.  The raid6 can handle two disks failing without data loss.  A raid10 will give the same space as what you proposed, but better performance.  You should use the offset or far layout depending on whether you want to optimize for writes or reads.


Ubuntu won't boot beyond tty1 screen I had upgraded to 15.04 few days back. Yesterday, I tried downloading a noobslab Mac theme and played and also changed the default graphic driver. Now, the GUI won't booot. I have tried following methods that are not working:

Apt-get upgrade - failed to fetch certain files
Tried installing xorg drivers. Won't work
Tried installing unity desktop and lightdm - xorg and amd 64.deb error
Tried to install Ubuntu desktop - still same failed to fetch error
Tried connecting to internet - could'nt. I had uninstalled network managed and added some other software.

Sorry for being a noob but all my work is stuck. All help would be appreciated

Here's how I solve problem to login again:

I press ctrl+alt+F1, give username and password.  Then I run

$mv .Xauthority .Xauthority.bak

Then I press ctrl+alt+F7
Then login page is open; I type password, and can then login again.

I'm running 15.04 version.


How can I move a terminal screen from one workspace to another? I tried to drag a terminal screen from one workspace to another, and it didn't work.

From the keyboard you can use Ctrl+Shift+Alt+Right/Left/Down/Up depending on which direction you want to move it to. To do it graphically select the workspace switcher in the Launcher (or press Super+s) and drag it from workspace to workspace while in that view. Hit return when you're finished to return to the normal view.

Just right click on the terminal's title bar and select "Move to Workspace ...". It works with any window.


I just installed Mythbuntu, what is the MySQL root password? After installing Mythbuntu, I am unable to access MySQL as I don't remember setting a root password. What is the default password?

Early versions allowed blank root password. Newer versions set root password to the main user login password during the install.

MYSQL Administrator gives great Management GUI with debian-sys-maint account whose username and password are present in /etc/mysql/debian.cnf you can configure all accounts as super user

see if it helps


Low disk space: home/user folder occupies 94GB I am low on disk space and when I check the Disk Usage analyzer (using gksudo baobab) it indicates that my home/teddy folder is using 94GB, but when I browse through its contents I can only account for about 1gb of that usage. I've tried sudo apt-get clean and deleting the cached package files from Synaptic Package Manager, emptied trash but that has not changed the amount of free space I have.

It seems similar to this problem
But using the root disk usage analyzer has not given any insight into what is consuming so much space.

Any ideas?

Looks like there is a very big file in /home/teddy. You can look for it either in Nautilus, checking view hidden files, list view and ordering by size, or from the command line:

du -a --max-depth=1 ~ | sort -n

The last entry before the home dir itself should be the biggest file.

du reports the file size of the first argument and all it's subdirs.

-a makes it show all files and dirs
--max-depth=1 keeps it from looking on all subdirs.

sort will sort the results

-n they will be sorted numerically.

because u install Ubuntu from windows wubi installation u choose the space u want in advance say 10 giga when u reach this space u will have low disk space even your drive is still have more memory ,as drive i mean the partition u install the release on it

in linux i prefer to install it from cd ,or from wubi with determine an enough space to ur relaese
:D :D


Unable to install Steam 64bit - Wrong architecture (Lubuntu 12.04) I'm on a new install of Lubuntu 12.04 on an Acer Aspire 5534 (specifications here, tl;dr: AMD dual-core 64bit) trying to install steam_latest.deb from the Steam website. When I open gdebi to install, it tells me that it's uninstallable because it's for a i386 architecture. I've tried installing ia32-libs (installed, no success), gdebi --add-architecture i386 (with and without --force, command unknown). This is all I've found to fix the problem, but none of it has worked for me. Any suggestions are welcome, thanks for your time.

Some similar questions have already been asked here.

The problem, in short, is trying to force the installation of a 32 bit package on a 64 bit machine.

I would suggest you to have a look at these questions:

How do I apt-get a 32-bit package on a 64-bit installation?
How do I install a 32-bit proprietary deb on a 64-bit system without causing dependency problems?

If you intend to play somewhat modern games on this computer, you need to do at least two things:

Download and install a recent 64-bit version of Lubuntu.  Currently, this is 16.04 LTS.  Anything less than this, and you're asking for trouble.  12.04 was released in April of 2012.
Download and install the latest 64-bit version of Steam, either from the Ubuntu repository or steampowered.com.

Of course, install your graphics drivers, as needed, and otherwise do everything necessary to make it go.  If this computer is too old to run anything 64-bit, at least get a current version of Lubuntu, and install the latest 32-bit Steam package.  There are still some games that don't require a modern processor.


How do I enable or disable Apport? The system crash dialog is annoying me, how can I turn it off? I'd also like to know how to turn it back on just in case I need it to report a problem.

As of Ubuntu 16.04 systemd apport does not seem to honor its config file

The systemd commands to enable / disable apport are:

Disable

sudo systemctl disable apport.service

If that does not work, you would then need to mask the service

systemctl mask apport.service

To reenable

systemctl unmask apport.service # if you masked it
sudo systemctl enable apport.service

Previous versions of Ubuntu:

You need to edit /etc/default/apport. The following changes will prevent Apport from starting at boot:

Graphical:
Open a terminal with (CTRL+ALT+T) and type this:

sudo -i gedit /etc/default/apport

and then push ENTER. You password is being typed, but will not display as dots.

or

Command line:

sudo nano /etc/default/apport

A file editor is now open. Change enabled from "0" to a "1" so it looks like this:

enabled=1

To turn it off make it:

enabled=0

Now save your changes and close the file editor. Apport will now no longer start at boot. If you want to turn it off immediately without rebooting, run sudo service apport stop.

You can also use sudo service apport stop without modifying /etc/default/apport to turn it off temporarily.

See also:

https://wiki.ubuntu.com/Apport
https://help.ubuntu.com/community/ReportingBugs#A4._Collect_information_about_the_bug

I found that I still wanted to disable Apport's crash handling in Python3. I had both tried disabling apport via cmdline (sudo systemctl disable apport.service), GUI (see this hopefully-original blog post), and via removal (sudo apt purge); however, Python backtraces showed apport still being present.
It seems like python3-apport is a prereq of ubuntu-desktop (relates launchpad bug 1773087), so may be hard to remove it.
I then looked at the Apport#Crash_interception, and seems like we can hack /etc/python*/sitecustomize.py.
As an example, the following worked (disabled apport) on my system for python3.6:
# N.B. Authenticate sudo first!
cat | sudo tee /etc/python3.6/sitecustomize.py <<EOF
## install the apport exception handler if available
#try:
#    import apport_python_hook
#except ImportError:
#    pass
#else:
#    apport_python_hook.install()
EOF

EDIT: Didn't try doing stuff like isolated mode in python3 - dunno if that'd work with Ubuntu-baked site customizations.


How do I use a specific AMI for juju instances? I would like to use another AMI with juju instead of the default AMI, where do I specify this?

This used to be supported in ~/.juju/environments.yaml as default-image-id in older versions of Juju but is currently unimplemented in Juju 2.x.

According to this thread it just needs to be implemented:

https://lists.ubuntu.com/archives/juju/2013-April/002389.html

If the image id is absolutely necessary for you, then this how you can get it working in precise.

Create a directory of your choice. cd into it and run:

bzr branch lp:juju/0.5

However before you can run from source, you need to make sure you have the dependencies installed.

sudo apt-get install python-zookeeper python-virtualenv python-yaml

Next cd into the 0.5 directory and run bzr revert -r479

Now run python setup.py develop inside the directory. Juju works great :)


Script to Update Host File I have the following command that correctly creates the /etc/hosts file that I want to build.  However, I cannot write it per the 2nd form due to permissions, of course.  So I tried variations of the 3rd form, but it still errors on permissions.  Can someone give me a suggestion to try?

cat hosts.tmp ; echo -n "myremotehost " ; cat ip.txt

cat hosts.tmp ; echo -n "myremotehost " ; cat ip.txt > /etc/hosts

cat hosts.tmp ; echo -n "myremotehost " ; echo mypassword | sudo -S cat ip.txt > /etc/hosts

This was hard for me to find out! (Relative newbie to Linux.)

In terminal, type sudo -i, then log in with your user password.
You will be in the root directory, with God-like powers...  :>)

I also found bash filename.sh will start the script.
Forgive me, I feel a great sense of accomplishment having
written a script (per suggestions in another post) which
killed all ads in Youtube!

I would put the instructions to modify your /etc/hosts file in a shell script, say modify-hosts.sh, then execute

sudo modify-hosts.sh

If you insist on running the script without having to provide a password, then add a NOPASSWD entry specifically for this script and your username to /etc/sudoers.

As for the contents of the file, you could do:

cp hosts.tmp > /etc/hosts
echo "myremotehost $(cat /path/to/ip.txt)" >> /etc/hosts

More conveniently, if myhostname already has an entry in /etc/hosts you can edit it in place:

sed -i -e 's/myhostname .*/myhostname '$(cat ip.txt)'/' /etc/hosts

And that statement you can even sudo on one line

sudo sed -i -e 's/myhostname .*/myhostname '$(cat ip.txt)'/' /etc/hosts

without running into redirection issues.


How can I suspend/hibernate from command line? How can I suspend or hibernate my laptop using command line, without installing additional software?

Traditionally ubuntu supported a fairly blunt method of suspend and hibernate. Neither would integrate well with other apps and sometimes not even work on some machines. This new method doesn't require root and notifies all applications listening for power events.
Systemd Method
Starting with Ubuntu 16.04, systemctl call must be used (See Suspend command in Ubuntu 16.04)
systemctl suspend

and
systemctl hibernate

New Method (obsolete)
Obsolete circa Ubuntu 16.04; use systemctl instead, as above.
See the answer here on this page from Adam Paetznick regarding the use of dbus. Ideally you would create a ~/bin/suspend shortcut/script that makes the use of this action easy.
For use over ssh, you should modify policykit rules as outlined by Peter V. Mørch
Old Method
According to the Ubuntu Forum you can use the following commands:
pmi action suspend

and
pmi action hibernate

This requires that you install the powermanagement-interface package (not tested).
sudo apt-get install powermanagement-interface
I have also found the commands sudo pm-suspend and sudo pm-hibernate to work on my netbook.

Personally, I've been experimenting with the pmi method. However, when I tried this, I got an error message: Error org.freedesktop.DBus.Error.Spawn.ChildExited: Launch helper exited with unknown return code 1. However, there is a workaround in the 3rd comment of this bug report, which seems to have worked for me (I'm using Ubuntu 13.03).


Upgrading from a smaller hard drive to a larger one on a dual boot system So I have Ubuntu and Windows 7 on a 500GB hard drive setup for dual boot. Recently some of the sectors on the Windows 7 partition of the drive went bad. I want to upgrade the hard drive I have now to a 2TB one and also get rid of the sector issue at the same time.

What would be the best (and safest) way to go about transferring the whole system to a new, larger hard drive?

clonezilla is an excellent software for duplicating drives.

get a bootable image here http://clonezilla.org

burn the image to disk. and boot it.
it supports all file systems


How do I start Nautilus as root? I've got a problem with Nautilus in Ubuntu 12.04 LTS.

When I run the command gksu nautilus /, the password ask box appears and I type my super-user password, then the password box disappears and Nautilus is not opened.

When I try to open Nautilus as a normal user in with the command nautilus, the folder is opened.

When I try in terminal

$ sudo nautilus

I got the following error

$ sudo nautilus /

** (nautilus:8523): WARNING **: Command line `dbus-launch --autolaunch=2c8ce9b7da2257c2609b749700000007 --binary-syntax --close-stderr' exited with non-zero exit status 1: Autolaunch error: X11 initialization failed.\n Could not parse arguments: Cannot open display:

How can I fix this error?

How to run Gedit AND Nautilus as administrator with pkexec instead of gksu or gksudo
GVfs method tested in Ubuntu 18.04
Use the GVfs admin backend, just add admin:// to the beginning of the full path to your preferred directory.
Open Nautilus the usual way and press Ctrl+L to enable typing in the address-bar, and then enter for example admin:///usr/ to open the /usr/ directory.
Enter your admin password when prompted and you will see something like this:

At this point clicking on the folders with locks will open with admin privileges.
You may bookmark a folder that is opened with admin:/// prefix. When you click on such a bookmark later you may be prompted for the admin password again.
Alternatively, from the Terminal open nautilus with the argument admin:///usr/:
nautilus admin:///usr/

to open the /usr/ directory as root in Nautilus.
Editing text files with admin privileges
From Nautilus opened in this way, if you click on a text file that needs admin privileges, you will be prompted for password again, before it opens in your default editor such as Gedit.
If you are using Ubuntu 17.10
The following method does not work with Wayland by default. There are some workarounds. The easiest one is not to use Wayland. How do you switch from Wayland back to Xorg in Ubuntu 17.10? Other alternatives are described in Why don't gksu/gksudo or launching a graphical application with sudo work with Wayland?
Ubuntu will switch back to Xorg by default in 18.04 LTS and the workarounds will not be needed then.
Original answer
Source: WebUpd8
gksu hasn't been updated since 2009 and is not recommended any more. In fact, Ubuntu no longer ships with gksu by default (though it may be installed for many of you, because some apps still depend on it) and it may even be completely removed at some point.
Nautilus admin adds PolicyKit files for both Nautilus and Gedit and it allows opening a file or folder from Nautilus as root, via PolicyKit:
To install Nautilus Admin in Ubuntu, open a terminal by pressing Ctrl+Alt+T and use the following command:
sudo apt-get install nautilus-admin

And to restart Nautilus use either of the following commands:
nautilus -q or killall nautilus
After this when you right click on a folder you will see:

If you right click on a text file editable by Gedit you will see:

Then you will be prompted for password:

Related question: "Open in terminal" not working on nautilus as root
Finally, installing nautilus-admin also allows opening nautilus as root from the command line. Use the following command instead of gksu or gksudo:
pkexec nautilus

to open nautilus as root.
Hope this helps

Edit your /etc/profile with:

sudo nano /etc/profile

Then add this to the end of the file:

xhost +local:all

Ctrl+X to quit.
Y to confirm.
Enter to confirm path.
Done.

Run anything as root.


Installing from minimal CD I'm a windows xp user and I'm new to Linux
I decided to install Xubuntu on my machine since it's quite old (512 MB ram and 2.66 GHZ P4 processor)
My machine doesn't support booting from USB so the only choise for me was installing xubuntu from minimal CD
The problem is that I'm new to Linux ,the only OS I've ever used was windows
So in the setup process every thing went fine until the partionning process
I want to install xubuntu next to my XP and I got only tow partitions on my 160 GB HD
So anyone who know how to partition my HD in a way that keeps my xp and my other files ?
Thanx in advance :-)

Although installing from minimal will work, if you are new to linux it might be lots of touble for you. Instead, you might want to look into something called Plop Boot. Essentially, you burn a CD, then create a ubuntu usb key. You put them both in the computer, boot from CD and it will then allow you to continue booting from USB. Used it myself awhile back and works like a charm. Plop Boot Page
After booting, you can use Gparted to resize your partitions, then run the install.

If you want to install ubuntu alongside xp, then your best bet is to use wubi. Just login into xp , open your cd . Click the wubi.exe and select install inside windows


NVIDIA 96 not working in Maverick I recently upgraded to Maverick and X stopped working. I used to run NVIDIA-96, but now when I modprobe nvidia I'm getting the following error:

FATAL: Error inserting nvidia (/lib/modules/2.6.35-22-generic/kernel/drivers/video/nvidia.ko): No such device

Installing 96-series driver from nvidia.com yields the same result. I also tried to run on nouveau drivers, but it can only give me 640x480 resolution, which is not acceptable.

Graphics card details are:

# lspci -nn | grep VGA
01:00.0 VGA compatible controller [0300]: nVidia Corporation NV18 [GeForce4 MX 440 AGP 8x] [10de:0181] (rev a2)

Is there any PPA with updated driver?

Nvidia 96 drivers are not released for maverick (xorg 1.9) yet.
But work is in progress. It will be available soon.
http://www.nvnews.net/vbulletin/showpost.php?p=2326233&postcount=5

For now, you can downgrade xorg to 1.7 or even downgrade to Lucid.

EDIT:
Now you can use 96 drivers!!!
http://www.nvnews.net/vbulletin/showthread.php?p=2341157

sudo add-apt-repository ppa:dajhorn/nvidia-96
sudo apt-get update
sudo apt-get install nvidia-96
sudo nvidia-xconfig
sudo nano /etc/X11/xorg.conf

Add to Section "Device"

Option "AddARGBGLXVisuals" "True"
Option "DisableGLXRootClipping" "True"

reboot and profit!

this is because you don't have this routine compiled for this kernel.

nvidia-glx-96 nvidia-96

nvidia-96-modaliases

nvidia-common

nvidia-96-kernel-source

.. Check this to completely uninstall.

  sudo aptitude purge
  nvidia-glx-96 nvidia-96
  nvidia-96-modaliases nvidia-common nvidia-96-kernel-source

then the follow :

  sudo apt-get install
  nvidia-glx-96 nvidia-96
  nvidia-96-modaliases nvidia-common nvidia-96-kernel-source

and in the final of this process, you can see this :

First Installation: checking all kernels...

Building only for 2.6.35-22-generic

Building initial module for 2.6.35-22-generic

Done.

nvidia-96.ko: at this point you now have the nvidia driver compiler for this kernel

Running module version sanity check.

Original module

No original module exists within this kernel

Installation

Installing to /lib/modules/2.6.35-22-generic/updates/dkms/

depmod.......

DKMS: install Completed.

now you can go to System - Administration - Hardware Controler and you can see the new controler there and you can enable it...


wifi network not showing in ubuntu 16.04 I am new to ubuntu, recently installed ubuntu 16.04 LTS on laptop.

After install my wifi network is not showing up on the laptop.

Need help.

Thanks
Arun

It sounds as if you may need to dig a little deeper. I'd start out by restarting your network manager by typing:
sudo service network-manager restart.

Your wifi network may not be listed first in the list of available networks. Look down the entire list. Also check the list of hidden networks. If you still don't see your wifi network, try to disable and re-enable the network. The latest kernel update to 4.4.0-22 works better at detecting and connecting to wifi networks. If you can connect to the internet over a wired interface, be sure to update and down load any upgrades. In a terminal window, enter sudo apt-get update; sudo apt-get upgrade

You may need to enter your log on password.


Computer is really messed up, need to know how to salvage ubuntu after hard reset during 14.10 installation I bought my Lenovo T520 back in 2011, and for a while I had no problems, but then I decided to install Windows 8, which was initially unsuccessful because I was using unofficial methods. I eventually managed it, although I am sure some of the files were missing or something like that.

Eventually I got curious about Ubuntu last year and gave it a try.

Now because (I think) of these files or drivers or whatnot missing, the update popup for 14.10 always would pop-up, and then ask for my password so it could go forward with the upgrade.

The upgrade was going fine, and I just locked my PC only to come back and being unable to do anything except look at the lock screen and wave my mouse around. I did a hard reset, and when I tried to go to Ubuntu from my GRUB menu,it gave me a weird message saying it was unable to mount my kernel.

The exact message is

unable to mount root fs on unknown-block(0,0)

Even the recovery wouldn't work, so I went to a previous version of Ubuntu, which lost a lot of the configurations I made on Ubuntu recently, but all my files are there. The problem is it won't even try to connect to wifi, and it's very slow.

It won't even shut down, it just lets me log out.

So after almost a full year I'm back on Windows having decided it'd be best to just do a factory reset. Unfortunately Windows is saying I have missing files which I'll need to provide through recovery media, which I don't have. Same with refresh.

Is there anyway to do a factory reset through Ubuntu, or a way to fix whatever mistake I made by doing the hard reset? Please try to keep the explanations basic.

From what i've heard from this post,it looks like you don't have any important files on your PC, and I assume you have backups.For this the best thing to do would to:

Download Ubuntu 14.04 LTS from another computer
Get a usb with about 2GB of space on it
Make it bootable. (Follow this guide if the computer is Windows)
Plug that in to the computer you are having issues with
And then as the computer is starting up go to the boot menu and boot from the USB

Let me know if this works.

You will have to reinstall Ubuntu. There is no other option. Follow Johnn's post above for information regarding this fix.

For future reference, don't lock your computer while rewriting data. The lock screen uses data that, if overwritten or deleted by something, will  hang and, more importantly, break your current platform.


Shut Down Ubuntu 14.04 I am trying to use Ubuntu 14.04 on Acer (I have recently installed it on Windows 8.1), but  have the problem with shutdown. It is not possible to shutdown Ubuntu by clicking on (Shut Down). I have tested (sudo reboot) on terminal, which is working correctly; but (sudo shutdown -P now) and (sudo poweroff) are not shutting down the laptop through terminal. It seems that laptop is going to hibernate condition. I have to use the power button to shutdown the laptop. Any suggestion?

I am not sure but you could give this a try:

Boot into Windows 8.1 and disable the fast boot feature which puts Windows into hibernate. This 'may' fix it.

Also make sure if your installation is a separate partition (eg: has GRUB bootloader?)  If you installed the software based version of Ubuntu (eg: installed in Windows) then it is just running Windows and emulating it. Hope this helps!

you can create a .desktop file, that shut down the computer when started. start text editor and write
[Desktop Entry]
Name=ShutDown
Exec=sudo reboot -p
Terminal=true
Type=Application

*note: you can add icon by write Icon:directory/to/the/icon
*note: you can have terminal=false, but i recommend to have it at true, because if something goes wrong, you can see whats happening

and save it as Shutdown.desktop

its dont solve the bug, but its give you a program on your desktop that you can use :D.

Note: When  called  with  --force or when in runlevel 0 or 6, this tool invokes the reboot(2) system call
       itself (with REBOOTCOMMAND argument passed) and directly reboots the system.  Otherwise this simply
       invokes the shutdown(8) tool with the appropriate arguments without passing REBOOTCOMMAND argument.


Enter SSH passphrase once Before upgrade
When I was running git clone git@... (using ssh) once per computer restart a window dialog appeared containing a textbox for inserting my SSH passphrase and confirmed with OK. Then the passphrase was no longer required until the next start of my system.
After upgrading to 13.10
After upgrading to Ubuntu 13.10 that window doesn't appear anymore but a message in terminal appears:
Enter passphrase for key '/home/username/.ssh/id_rsa':

...every time when cloning a git repository this appears.
How can I fix this? I want to enter my passphrase only once.

Update: seems to be a bug from 13.10:

  https://bugs.launchpad.net/ubuntu/+source/libpam-ssh/+bug/1247169

Anyway running the following commands the problem was fixed for me:

How to fix

I fixed this by entering the following commands:

$ ssh-agent bash

This creates a new bash process that allows you to add private keys. When adding a new private key you will be prompted for the passphrase once and only once.

And then:

$ ssh-add /home/username/.ssh/id_rsa
Enter passphrase for /home/username/.ssh/id_rsa:
Identity added: /home/username/.ssh/id_rsa (/home/username/.ssh/id_rsa)

...where username is your username. You can do the same using $USER variable:

$ ssh-add /home/$USER/.ssh/id_rsa

Alternatively, just use ~ for your home directory.

$ ssh-add ~/.ssh/id_rsa

And the problem was fixed.

I use this:

vim ~/.profile

eval `/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh,gpg`
export SSH_AUTH_SOCK
export GPG_AGENT_INFO


How to paste a code to terminal and execute it line by line? (it has sudo) As an example:

When I paste to terminal the following code:

wclean;
sudo bash;
wmake;

It asks for password for sudo bash, then I have to type it (no problem). But it doesn't keep going. It stops before wmake.

Then

How to paste an entire custom code to terminal and execute it line by line?
I want a simple solution because these codes I paste are from internet, books, tutorials, ...

Pasting multiple commands at once may lead to problems if one of them waits for terminal input. In this case the rest of the paste will be taken as input for that command and not as separate command to be run afterwards. The most common example is probably the sudo password prompt.

However, Bash is capable of opening a text editor to enter commands, by default it is nano. You start the command editor by pressing Ctrl+X followed by Ctrl+E. The editor launches and everything you typed into the current command line so far will also appear there and can be edited. If the command line was empty though, the editor will be empty as well.

In the editor you can now easily paste or type multiple commands, simply put one command per line and Bash will execute them one by one. You can also put a whole script in there, it does not matter. The content you write gets internally saved as temporary file and executed almost like a Bash script. The only difference here is that if you have multiple commands, Bash will first print the command itself before executing it.

If you're done with editing and want to submit your list of commands, simply exit the editor (Ctrl+X for nano). It will ask you whether to save the changes and you answer "Yes" and hit Enter to accept the proposed temporary file name. Bash will then start to execute all the commands one after the other.

You could change the semicolons(;) with '&&' without the quotes, in your case for example:

wclean &&
sudo bash &&
wmake

BTW no '&&' at the end.

Have a nice day


Installing Gtk+ >= 3.12 on Ubuntu 14.04 I'm just trying to install Corebird. It has some dependencies and one of them is Gtk+ >= 3.12. I would say I have search a lot and finally frustrated from a lot of other dependencies. I'm afraid if Corebird worth it finally or not!

Is there a straight-forward way to install GTK+ 3.12 on my Ubuntu PC? I mean step-by-step tutorial!

This question has already been answered here. Corebird packages are now available.

If you're on Ubuntu 14.04, open terminal and type:

sudo add-apt-repository ppa:gnome3-team/gnome3

sudo add-apt-repository ppa:gnome3-team/gnome3-staging

Then, for both 14.04 and 14.10 flavours, type:

sudo add-apt-repository ppa:ubuntuhandbook1/corebird

sudo apt-get update

sudo apt-get install corebird

Finally, remove gnome 3 staging ppa:

sudo add-apt-repository -r ppa:gnome3-team/gnome3-staging

source: http://ubuntuhandbook.org/index.php/2014/07/install-corebird-ubuntu-ppa/

You can download libgtk3-0-3.12 .deb file ftom Launchpad.net.

Then install that file with the command :

sudo dpkg -i {.DEB FILE NAME HERE]


How to Install Windows 7 with Ubuntu 12.04 (Ubuntu Pre-Installed) How can I install Windows 7 with my Ubuntu 12.04 x64 side by side a.k.a. dual-boot? I don't want to format and lose my Ubuntu data. I tried to install windows 7 (Ubuntu pre-installed) in a virtual machine (with VirtualBox). It gave me an error:

  Setup was unable to create a new system partition or locate an existing system partition. See the Setup log files for more information.

Either installation process of windows 7 over pre-installed Ubuntu with dual boot or how to backup and restore whole Ubuntu system will solve my problem.

My system has one 128 GB SSD (sda) which have Ubuntu installed on it and one 1.0 TB hard disc (sdb).

sda has:

sda1 (linux, bootable, Ext4, /)
sda2 (extended)
sda5 (linux swap)

sdb has:

sdb1 (Microsoft Reserved Partition)
sdb2 (Linux Basic Data Partition,-,NTFS,/media/New Volume)
sdb3 (EFI System Partition,-,FAT32,Not mounted)
sdb4 (EFI System Partition,-,FAT32,Not mounted)
sdb5 (Linux Basic Data Partition,-)
sdb6 (Linux Basic Data Partition,-,NTFS,/media/New Volume 2)
sdb7 (Swap Space, Linux Swap Partition)

Install Windows in the partition that you have set aside. Windows will install it's own bootloader and that's ok. Two ways to fix the bootloader include:

Easy BCD: This is a great tool for editing the boot menu. You don't have to pay for it (I would recommend donating though...) and it works well. This is a preferable option if you need to get a dual boot working with the Windows bootloader. I haven't tried to edit GRUB with it, but I think there's that option.

Boot-Repair: Boot up your system with an installation disk and choose the Try Ubuntu option. Add the repository, install boot-repair and it will give you some powerful options for modifying GRUB. boot-repair instructions can be found here: boot-repair

I would recomend the Easy BCD route. I've had the most success with it and it's pretty simple to figure out. That's all I got, so good luck and have fun :D


how to set MAAS for "power type" on VM created with VMware Fusion home lab:

1 VM with Ubuntu 16.04Lts for MAAS Region Controller
2 VM with Ubuntu 16.04Lts for MAAS Rack Controller (DNS & DHCP), each one with 2 virtual network adapter
1 vNode with Ubuntu 16.04Lts for each Rack Controller

on VMware Fusion

on MAAS Region Controller

the vnodes are added

but I don't know how to set the power type to be able to start the commissiong of vnodes via MAAS. Anyone can help me please? I think that solution is wrong

someone knows how to resolve that?

If you using MAAS version 2.1, The power type for VMs are created in VMware is VMware.

You can choose Virsh which your VMs are created in KVM Hypervisor.

You can look at this documentation.

Hopely can help you.


Ubuntu 11.04 unity / classic load fails - remains at background without toolbars / windows IMPORTANT: Ubuntu Classic (without effects) works. I am trying to get unity to work.

Have the following problem with Ubuntu 11.04 (had it with 10.10 too, but disabling KMS or using the fglrx driver fixed it - cant remember exactly which). But now since the radeon driver is better than it used to i want to use it + fglrx performance kinda sucks.

So, ubuntu boots normaly until the login screen. After login it shows the background, the mouse is shown and it just remains there, it does not load the anything else. It does not freeze. I can move the mouse and can go into text console(ctrl+alt+f1).

It does not work on Ubuntu profile (Unity) or on the Ubuntu Classic (gnome + effects) profile. I even tried installing Gnome3 from their ppa, but it does not finish loading either (just like the other two).

Now my hardware : notebook Toshiba Satellite M40, Ati Radeon x600 (128mb) video card.

I haven't been able to find any errors in dmesg or other logs.

Update1:

Alt+F2 does not work. Nothing pops up.
There is a gnome panel loaded (I see the process in the text console) when trying Ubuntu classic (with effects). Even the unity panel service loads when I use the Ubuntu profile. I get the impression that something doesn't finish loading (in both Ubuntu and classic with effects) because if I move the mouse over to where the toolbar would be I get the working mouse.

The thing is with fglrx I get an error when trying to load unity, saying to use classic because of lack of hardware. But with the radeon driver I don't get that error, they seem to start loading but never end. They just hang.

It would be nice if radeon driver would allow me to use effects/unity/gnome3 since unity seems to run ok on an intel 945m Express integrated video card notebook. Hope updates to the driver/unity will fix my problem.

$ /usr/lib/nux/unity_support_test -p

OpenGL vendor string: X.Org R300 Project
OpenGL renderer string: Gallium 0.4 on ATI RV380
OpenGL version string: 2.1 Mesa 7.10.2
Not software rendered: yes
Not blacklisted: yes
GLX fbconfig: yes
GLX texture from pixmap: yes
GL npot or rect textures: yes
GL vertex program: yes
GL fragment program: yes
GL vertex buffer object: yes
GL framebuffer object: yes
GL version is 1.4+: yes
Unity supported: yes

Since the unity script says that I should be running unity I am leaving this question open.

Found lots of bugs related to this (i think) like ubuntu bug 777341 and ubuntu bug 758482 and lots of questions relating to it on this very site / other sites. So I will assume that this is a problem that will be resolved in ulterior Ubuntu updates.

Update 2 :

Fiddling with compiz plugins (Gnome Plugin or Unity Plugin) in CCSM does not do the trick either.

The same goes for unistalling compiz/unity and reinstalling it.

Am starting to get the feeling that this is not a thing easy to fix, and only a driver (radeon/r300g/Gallium) / compiz / unity Ubuntu update will fix this.
Will probably close question soon .

Feel free to leave your opionions / fixes here and i will try them and answer.

Any ideeas? I am willing to try everything to get it to work.

Change the GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub in:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash radeon.modeset=1 pci=nomsi"

Run update-grub and reboot

The pci=nomsi did the trick for me.

the same thing happened to me and i think i have your solution
(or at least this is what work for me)

boot up in Ubuntu classi**c and go to **system - administration - synaptic package manager
remove anything that has to do with compiz (or anything that has compiz in the name)

now restart your computer and boot up in Ubuntu and press ctrl alt t and your terminal should come up type in this line sudo apt-get install compiz then press enter after that type in this line sudo apt-get install unity press enter then sudo apt-get upgrade unity

after its done restart your computer and boot in to ubuntu and bam everything is back


How to list what installed and rollback apt-get BY DATE AND TIME? I have installed two packages (xrdp and ubuntu-desktop) on my server release and it cause isntallation of numerous packages by dependencies, including even sphinx speech recognition. If I would know these two packages are so heavy, I would not install them.

What can I do now?

How to revert all installations done last hour? Is it possible?

Assuming neither xrdp nor ubuntu-desktop was actually installed before, you can remove them and all the packages that were automatically installed to satisfy their dependencies:

sudo apt-get purge xrdp ubuntu-desktop
sudo apt-get --purge autoremove

Or in one step:

sudo apt-get --purge autoremove xrdp ubuntu-desktop

Here's an example of what that looks like.

This does not select by date and time, but I suspect that's not really necessary (or helpful) toward solving this particular problem. The packages you don't want were installed because they were needed for  xrdp and ubuntu-desktop. (Probably mostly for ubuntu-desktop, which is a metapackage whose purpose is to cause lots of stuff to be installed.)

So removing them and autoremoving their automatically installed dependencies is probably the most correct and elegant solution.

(Just running sudo apt-get purge on the two manually installed packages would not automatically cause the dependencies to be removed. The only difference between the remove and purge actions is that purge deletes systemwide configuration files of the packages it removes.)

You can use

sudo apt-get purge xrdp ubuntu-desktop

Which will remove those packages and all the dependencies that they installed, though be careful with purging ubuntu-desktop, not sure why you would want to do that...


Ubuntu 16.04 LTS on MacBook Pro 7.1 (Early 2011) Wifi Issue I am having a hell of a time setting up my Wifi after a fresh install of Ubuntu 16.04 LTS on my MacBook Pro 8.1. Using the following command in terminal sudo lshw -C network I get the following returned to me:

*-network
   description: Wireless interface
   product: BCM4322 802.11a/b/g/n Wireless LAN Controller
   vendor: Broadcom Corporation
   physical id: 0
   bus info: pci@0000:02:00.0
   logical name: wlp2s0
   version: 01
   serial: 78:ca:39:b2:8e:4f
   width: 64 bits
   clock: 33MHz
   capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
   configuration: broadcast=yes driver=wl0 driverversion=6.30.223.271 (r587334) latency=0 multicast=yes wireless=IEEE 802.11
   resources: irq:17 memory:d3200000-d3203fff

Initially I went to my "Additional Drivers" and enabled the default Broadcom 802.11 driver which enabled my wifi but does not list all of the available networks. I tried to trouble shoot this error through the web and followed some answers on other askUbuntu posts but nothing works. Yes, I have tried installing the drivers manually for BCM4322 via bcmwl-kernel-source... documentation I used here. Any help would me much appreciated!!! I have no clue where to go from here.

in ubuntu terminal as root

rmmod b43 bss bcma

insmod wl.ko

wl.ko is of course your Broadcom driver compiled with dkms


Gnome How do I Run a Command as root? I'm new to Linux and just installed the Gnome on Ubuntu 15.04 Vivid Vervet (or something similar). Once inside the Gnome GUI, there is a terminal prompt but typing commands does not do anything. I've searched for hours and cannot figure out how I can start running commands as root again, so I can begin installing programs.

I've tried the following: Alt+F2 (does not work)

sudo -i

gnome-terminal

gksu gnome-terminal

sudo -H gnome-terminal

the above commands do not print out any text, just do not run.

In GUI you you should use:

gksu command

or

gksudo command

But note, this is only for graphical applications to run them from superuser.
For CLI applications just:

sudo command


How to set default Java version? I followed all the instructions stated at this question, but am encountering some problems with the last part of it.

I actually have version 6.22 of java and would like to update to version 6.30.

So after moving the extracted directory java-6-oracle into /usr/lib/jvm I do not know what to do, since the script that is pointed out in the answer above updates from java 5 to java 6.

For sake of clearness here is output if I do an ls in dir /usr/lib/jvm:

$ ls -l /usr/lib/jvm
total 8
lrwxrwxrwx  1 root root   14 2011-07-12 15:18 default-java -> java-6-openjdk
lrwxrwxrwx  1 root root   14 2011-07-12 12:19 java-1.6.0-openjdk -> java-6-openjdk
drwxr-xr-x 10 root root 4096 2012-04-12 12:06 java-6.31-oracle
drwxr-xr-x  7 root root 4096 2012-02-24 14:43 java-6-openjdk

What should I do now?

ADDED PART

Under the suggestion of @fossfreedom I ran the script anyway and actually it updated the java version.

In fact if I run command java -version output will be the following:

$ java -version
java version "1.6.0_31"
Java(TM) SE Runtime Environment (build 1.6.0_31-b04)
Java HotSpot(TM) Server VM (build 20.6-b01, mixed mode)

There is still a problem, if Irun javac -version it gives me the old version installed:

$ javac -version
javac 1.6.0_22

And if I use the tester at this link it will tell me that version is

Java Version 1.6.0_22 from Sun Microsystems Inc.

What's going wrong?

It seems that Java Runtime Environment has updated, but Java Compiler and Java plugin for browser have not.

How can I update them?

OTHER ADDED PART

sudo update-alternatives --config java will return following output

$ sudo update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                      Priority   Status
------------------------------------------------------------
* 0            /usr/lib/jvm/java-6.31-oracle/bin/java     1062      auto mode
  1            /usr/lib/jvm/java-6-openjdk/jre/bin/java   1061      manual mode
  2            /usr/lib/jvm/java-6.31-oracle/bin/java     1062      manual mode

Press enter to keep the current choice[*], or type selection number:

these makes sense with the fact that JRE is correctly updated to version 6.31, issues are on Java Compiler and Java browser plugin.

Any ideas?

Re your first question:

possibly you may be confusing that the webupd8 script is 0.5b. That is the version of the script - it doesnt refer to the java version.

Further to the setting of the javac version.

I suspect you need to explicitly give the path of the javac compiler

i.e.

sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/java-6.31-oracle/bin/javac" 1

followed by:

sudo update-alternatives --config javac

With regards to setting up the java chrome plugin.

The master question:

How do I install Oracle JDK 6?

includes this information - since your folder structure is slightly different your link command should be:

ln -s /usr/lib/jvm/java-6.31-oracle/jre/lib/i386/libnpjp2.so ~/.mozilla/plugins/

Open /etc/environment in any your text editor and add the following line:

JAVA_HOME="usr/lib/jvm/open-jdk

- Java path could be diffrent.
Use source to load the variables, by running this command:

source /etc/environment

Then check the variable, by running this command:

echo $JAVA_HOME

With this path set, run this command:

sudo  update-java-alternatives --list

Choose your default Java Version.


Why can't I find skypeforlinux in some apt-cache search? I have seen that in some countries Skype for Linux is not available. They get redirected to old Skype or they get a message that they don't have access.

When I try to search it using:

apt-cache search skype

It doesn't return skypeforlinux, but it returns skype (the older version). When I search on my pc, it shows skypeforlinux and not skype. These two versions are not compatible for calling each other. So, I want to know how can I install Skype for Linux on my friend's computer who is in another country?

I sent the deb file for new skype but when he launches the skypeforlinux, it doesn't work.

Download skype for 64-bit Ubuntu 14.04+ from below link
https://www.skype.com/en/download-skype/skype-for-computer/

And install .deb file using

dpkg -i package name


How to execute an .sh file? I thought a sudo will work, but it says command not found:

sudo: ./eTax_ticinoPG13_inst_Linux.sh: command not found
nuc@nuc:~/Downloads$ ./eTax_ticinoPG13_inst_Linux.sh
bash: ./eTax_ticinoPG13_inst_Linux.sh: Keine Berechtigung
nuc@nuc:~/Downloads$ sudo ./eTax_ticinoPG13_inst_Linux.sh
sudo: ./eTax_ticinoPG13_inst_Linux.sh: command not found

Can anyone help me?

Before you can execute your script, you must give it execution permissions. You can do it by executing:

  chmod +x eTax_ticinoPG13_inst_Linux.sh

You can also do it from nautilus by right clicking the file, going to Properties > Permissions, and then selecting Allow executing file as program.
Afterwards just start it with ./eTax_ticinoPG13_inst_Linux.sh and it will start.

Make the .sh file executable with

chmod +x eTax_ticinoPG13_inst_Linux.sh

Then launch the script:

./eTax_ticinoPG13_inst_Linux.sh


How can I see Ubuntu file system, installed on SDcard, FROM Android I installed Ubuntu 12.04 32bit bootable on my SD card (16GB) giving 6GB for Ubuntu (4 for documents), 10 to Android (FAT32 - boot flags).

How can I open Ubuntu files from Android device?

Ubuntu folder to access : /home/desktop/download

I have rooted HTC sensation.

i have a nexus 4  and i'm not sure if this works for sensation but give it a try. open ES file explorer(or any file explorer that can gain root), give it root permissions. for nexus 4 user data is located at:  /data/user-data/phablet/


How to run Conky from terminal? In this Unixmen tutorial there are 11 steps to setup Conky; I did all of them but the terminal show this message:

The program 'conky' can be found in the following packages:
         * conky-cli
         * conky-std
Try: sudo apt-get install <selected package>

I then try this but saw this message:

ismail@ismail-ASUS:~$ sudo apt-get install conky
[sudo] password for ismail:
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?

Can you help me?

Probably Ubuntu Software Center or Synaptic is already open. If so, close those programs, and retry.

If nothing changes, close the session (log out) or reboot and retry.

The error means dpkg is running. If you run sudo killall dpkg (or sudo killall -9 dpkg when the first command complains about not being able to kill dpkg) then it will be fixed.

BUT: This is not the 'clean' method of stopping dpkg down !

Some background first:
dpkg is the 'real' package manager of ubuntu. Apt, apt-get, synaptic, ... are all frontends. If you close all this frontends then the error will also be gone (in a clean way)


Resolution issue causing login screen loop My ubuntu (version 10.10 I think) is stuck in loop at the login screen. Looks like it could be a resolution issue. - I have an nvidia graphics card (gs 8400). I previously had it connected to a 19" monitor however disconnected mid session and since then the issue has persisted. I tried uninstalling the gdm package and reinstalling and running an apt-get update however the login loop still there.

Is there another way I can reset the resolution settings to fix this looping issue?

I can get into the desktop by going through the rescue mode and using startx but its not a solution.

You can edit /etc/X11/xorg.conf by hand

Or you can use nvidia xconfig if you have the proprietary driver sudo nvidia-xconfig

Or sudo dpkg-reconfigure -phigh xserver-xorg

ref: http://doc.ubuntu-fr.org/xorg

Check if you have your files in your /home/username directory. If you just have two files, one named  blah-blah.desktop and a README, open the readme file (using nano, or simply read it using cat) and follow the instructions. Of course, do that in a terminal (pressing Ctrl-Alt-F1 in the login screen)


Ubuntu stuck at "Loading initial ramdisk" during first boot My Ubuntu 14.04.1 (3.13.0-32-generic) seems to not boot right after a fresh install from a Live DVD (tried it multiple times and also from a bootable USB stick as well).

Boot repair info: http://paste.ubuntu.com/8328560/

Graphics card info:

ubuntu@ubuntu:~$ lspci -nnk | grep -iA3 vga
00:01.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Richland [Radeon HD 8650G] [1002:990b]
    Subsystem: Lenovo Device [17aa:397c]
    Kernel driver in use: radeon
00:01.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Trinity HDMI Audio Controller [1002:9902]

My laptop is a Lenovo G505s.

I tried following the information on My computer boots to a black screen, what options do I have to fix it?, but that didn't help. To be more specific I tried the following recommendations: 1) Replaced "quiet splash" with "no splash" 2) Replaced "quite splash" with "nomodeset" 3) Replaced "quite splash" with "radeon.modeset=0". The first two options doesn't get to the loading initial ramdisk message (it is stuck post the loading linux message). The last option gets stuck after the loading initial ramdisk message (the same issue I face without editing the boot command list).

Let me know how to proceed with fixing this problem.

Btw, I tried installing Ubuntu in the UEFI mode and that installed and booted with no issues. Unfortunately I need to have Ubuntu work in the Legacy mode (non-UEFI) since I have to dual boot this with another OS that doesn't work in UEFI mode. Anyways, I am stuck right now even in trying to get a normal Ubuntu only installation in the Legacy mode, though the LiveDVD mode works fine.

I think this may help (if you can translate from Russian): http://strnor.ru/?p=934

Summary:
You should start the installation without changing partitions (without option "something else") and it will run with no problems.
Or you must create a special 512Mb partition for EFI (look through pictures on the linked site).


moving the file from one folder to another folder I have got 2 folder in the same directory ie

directory exp

folders name data ,log.

I wold like to write the bash script so that when I click on move .sh file then content of data folder should move to log folder and name of the file in data folder should go to another file i.e filenames.txt which is also present in exp directory

Provided there are no duplicate file names, the following is a simple script that will do what you want:

#!/bin/bash
ls <path-to-data-folder> >> <path-to-filenames.txt>
mv <path-to-data-folder>/* <path-to-log-folder>

Plug-in the actual path to your folders/files.
Save it as move.sh, make it executable by chmod +x <path-to-move.sh> and run it.

To run it on clicking, first right click on move.sh click properties and then go to permission tab and click on "Allow executing file as program" as shown below:

Close it and then go to Edit -> Preferences->Behaviour in nautilus and click on "Run executable text files when they are opened" as shown below:

Close it.

Now if you can run the script by just double-clicking on move.sh.

first thing you need to do is make nautilus (your file explorer) to run executable files on double clicking (NOTE: you must be careful when you are running executable file downloaded from internet)

Open Nautilus (by clicking icon on the launcher)
In menu bar click on Edit
then look for a tab called Behaviour
under Executable Text Files select Ask each time. (NOTE: you can select Run executable text files when they are opened, but its recommended not to choose this option because you might run a executable file by mistake)

then make move.sh file in directory exp, its content will be:

#!/bin/bash
ls -1 data >> filenames.txt
mv -t log ./data/*

(you can use gedit to copy paste these above lines and save the file in exp directory)
then open terminal and run:

cd exp
chmod u+x move.sh

Done!


Google notification error "Unusual traffic from your computer network" While browsing I have received notification on Google "Unusual traffic from your computer network"

We're sorry..."your computer or network may be sending automated queries. To protect our users, we can't process your request right now."
See Google Help for more information.

Right now I am using the "Ubuntu 12.04" 32 bit version.

Any suggestion, why this is happens & How it resolve?

Thank you for your worthy suggestion.

As the notification say, "your computer or network may be sending automated queries".

The error page most likely displays a CAPTCHA (a squiggly word with a box below it). To continue using Google, type the squiggly word into the box - it's how the site know you're a human, not a robot.

If you don't see a CAPTCHA image or if you continue to encounter the CAPTCHA over and over, try these steps in order:

Check for malware on your computer. See this video in this sense.
Contact your network administrator

More info: https://support.google.com/websearch/answer/86640?hl=en&ref_topic=3087987

For future help, you can send a request at Google using this form.

A quick fix > go to preference and remove google search engine. (work in wmvare fusion and Ubuntu 18.04 64 bit Firefox version is 65.0) 27 feb 2019.
Good luck.


Empathy logs into chat networks, without beeing started? I have Empathy installed on my Ubuntu 12.04 with Gnome 3. I appear to be online in the chat networks when my computer is connected to the internet. However, I did not even start Empathy, at least not manually.

How can I change this behaviour?

This is the default behavior of gnome shell and allows (at least in theory) for better integration with the new GUI.  You can log out of chat by using the selection box under your name in the top-right menu (change setting to unavailable).

Under 'preferences' in Empathy is a box marked 'Automatically connect at startup'.  If you uncheck this, Empathy should not sign you in to your chat accounts at log in.

If you just only want to make Empathy start but not login in your account, check their preferences.

Good luck.


Enabling java in firefox I have java installed.  When I run the "java -version" in terminal I get a expected response indicating that I have Jre1.8.0_66 installed but when I try to see if I have java by asking the oracle website it says it is unable to verify.  I'm certain that the solution in simple but every simple solution for me has been quite a task. Thanks.

Don't you forget to enable it effectively in Firefox, because after 52 version, you need to create a value at about:config

Type about:configat address bar and accept risks :);
Create a new  Boolean Preference value, by right-clicking on name title.
Type plugin.load_flash_onlyand set it false

Open the terminal(press ctrl + T).
Become the root user:

sudo -s

Create a directory called plugins if you do not have one:

mkdir -p /usr/lib/mozilla/plugins

Go to Mozilla plugins directory before you make the symbolic link:

cd /usr/lib/mozilla/plugins

Create a symbolic link:

ln -s /usr/local/java/jre1.7.0/lib/amd64/libnpjp2.so

Restart your browser and you are good to go. Found it here

You may also want to look at the following: How to install the Java plugin for Firefox


nload Broken on Ubuntu 18 nload displays network activity with ascii graphics but on ubuntu 18.04 these graphics are all scrambled while on ubuntu 16 it's OK.
Is there any way to fix it?

What worked for me is changing term

export TERM=xterm-color

Source: https://github.com/hishamhm/htop/issues/813

However this isn't permanent. I have to constantly run this command, even though i never reboot the server. A permanent solution is welcomed.


Unable to install Simon I'm trying to install Simon using these commands:

sudo add-apt-repository ppa:grasch-simon-listens/simon
sudo apt-get update
sudo apt-get install simon

but I'm getting this error:

The following packages have unmet dependencies:
 simon : Depends: libattica0 but it is not installable

How can I install required dependencies.

In the builds present in the ppa:grasch-simon-listens/simon there is a build for  Ubuntu version 12.04 LTS.

More recent Ubuntu version (>= 14.04 LTS) will have simon  available from the universe repository.

Alternatively we can always install software from the source available for download from the Simon KDE Project or from it's Launchpad branch.

in ubuntu package currently being released. I simply typed.

sudo apt-get install simon


How to add app links to the right click menu I am running Ubuntu 14.04.
When I right click the desktop and select "New Document" the only option is "Empty Document". I want to add to that list other apps but do not remember where that folder is located.
Example: I want to right click the desktop and be able to open a gnumeric file.

If more info is need, please let me know.
Trolls, do not bother responding.
Thanks for all of your help.

The default name for that folder is $HOME/Templates in your user's home folder (e.g. /home/ray/Templates/).

If you are using a non-English environment the folder name may be translated. See the file $HOME/.config/user-dirs.dirs, there should be a line like

XDG_TEMPLATES_DIR="$HOME/Vorlagen"

telling you the folder name. In this case it's $HOME/Vorlagen.

Create that folder if it doesn't exist and put a Gnumeric file in.


Tomcat 8 doen´t start on ubuntu 15.04 -- status=127 I always get this message that I can't follow:

sudo systemctl status -l tomcat8.service
● tomcat8.service - LSB: Start Tomcat.
   Loaded: loaded (/etc/init.d/tomcat8)
   Active: failed (Result: exit-code) since sáb 2015-05-09 00:48:07 CEST; 2h 31min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 1295 ExecStart=/etc/init.d/tomcat8 start (code=exited, status=127)

may 09 00:48:07 vaio systemd[1]: Starting LSB: Start Tomcat....
may 09 00:48:07 vaio tomcat8[1295]: [58B blob data]
may 09 00:48:07 vaio systemd[1]: tomcat8.service: control process exited, code=exited status=127
may 09 00:48:07 vaio systemd[1]: Failed to start LSB: Start Tomcat..
may 09 00:48:07 vaio systemd[1]: Unit tomcat8.service entered failed state.
may 09 00:48:07 vaio systemd[1]: tomcat8.service failed.

Any idea?

Thank you in advance!!

I had the same error when I upgraded Ubuntu and also Java (8->11). The problem was a wrong JAVA_HOME path inside the systemd module. The JAVA_HOME path had "jre/" at the end which is wrong for newer Java versions. Solution:

Edit /etc/systemd/system/tomcat.service and remove the trailing "jre/" of the JAVA_HOME path.
systemctl daemon-reload
systemctl restart tomcat

i also got this error while starting tomcat service.in tomcat.service file when i checked [Service] section then i find that jre was not created so i remove the jre word.First it was like this "Environment=JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64/jre"
i removed jre and it became like this "Environment=JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64" after that i started service.it worked.


Install Android emulator to play mobile game who from you can tell me what the best way and tools to install an android mobile app game ( freefire for example ) on my ubuntu 18.04 ? any android emulator to recommend ?

Games like free fire and PUBG are supported in emulators only on windows. There is no android emulator available for Ubuntu.

But if you want to feel like playing on Desktop(Ubuntu). you can follow these steps :

Install screen share over USB like scrcpy (freeware)

In terminal run cmd sudo snap install scrcpy
Allow USB debugging in developer option
Then connect your android phone with laptop or desktop using USB
In terminal run cmd scrcpy

Install octopus from the app store for mapping keyboard on the screen.

If you want to feel the best gaming experience on ubuntu.

PHOENIX OS, Phoenix OS gives the better gaming experience than other
ubuntu emulators.(free fire,pubg)
Downloading of Phoenix OS is little bit risky and harder.
But you follow the instructions on youtube makes the installation easier.
(Phoenix OS gives better experience in windows than ubuntu,But you have no way to install windows on your laptop/computer then you continue with ubuntu)
Minimum systemspecs for downloading Phoenix OS
-2GB RAM.
-upto 16GB ROM.(internal space)
Youtube tutorial link:- https://youtu.be/vGn1ISy0KpI
click on the above link and see the tutorial vedio of downloading Phoenix OS.
watch the tutorial carefully and install phoenix os.
After install reboot your pc. and select phoenix in grub menu .your pc will
open the phoenix os in second boot.
After opening Phoenix OS open playstore and download you game.
Having any doubts about installation and playing games.search more in youtube


How to install certificates for command line So in school we need to install a certificate to access https sites. In firefox, I can import the certificate. However, I can't do so with the command line. For example, running git push I get:

fatal: unable to access 'https://github.com/user/repo': server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

How do I import a certificate to remove this? The import must be able to authenticate for me. Also, it is a .cer file, so the answer for .crt will not work. Also, I do not want steps on how to setup git, as I already have. I want to know if it is possible to do that. Or can I just disable authentication with the git command totally and make it ignore certificates like what the answer here says? Also, I do not want the webpage to load, I have set firefox to do that. I want the git push command to give the standard output like:

[master 630d087] message
 1 file changed, 93 insertions(+), 80 deletions(-)
 rewrite somefile (84%)
Counting objects: 9, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (5/5), 978 bytes | 0 bytes/s, done.
Total 5 (delta 2), reused 0 (delta 0)
To https://github.com/User/Repo.git
   851ae39..630d087  master -> master

Note: I found out its git config --global http.sslverify false. But I would like to see an answer for everything, not just a git hack

TL;DR

For everything to work and not only your browser, you need to add that CA certificate to the system's trusted CA repository.

In ubuntu:

Go to /usr/local/share/ca-certificates/
Create a new folder, i.e. "sudo mkdir school"
Copy the .crt file into the school folder
Make sure the permissions are OK (755 for the folder, 644 for the file)
Run "sudo update-ca-certificates"

Why

Let me explain what is going on also, so the other posters see why they don't need any certificate to use Github over HTTPS.

What is going on there is that your school is intercepting all the SSL communications, probably in order to monitor them.

To do that, what they do is in essence a "man in the middle" attack, and because of that, your browser complains rightfully that he is not being able to verify github's certificate. Your school proxy is taking out github's cert and instead providing its own cert.

When your browser tries to verify the school's provided cert against the CA that signed github's cert, it rightfully fails.

So, for the SSL connection to work in the school, you need to consciously accept that "MITM" attack. And you do that by adding the school's CA certificate as a trusted one.

When you trust that school CA, your verification of the fake github cert will work, since the fake github cert will be verified by the school CA.

Be aware that SSL connection is not safe anymore since your school administrator will be able to intercept all your encrypted connections.

To access a website with https, whether you are using a CLI or GUI browser, you don't need your shool certificate.

To use git via http(s) you need to register your public key in your profile settings on GitHub.

More infos here. Change your GitHub profile here.

Try this:

sudo apt-get install w3m
w3m https://github.com/

… works without an additionally certificate.


How can I update Gnome system monitor? I noticed there's a new version of Gnome system monitor while my version is 3.18.2. I tried to remove and reinstall it but I still have the same version. Opening Software Updater doesn't recommend me an update.

On my Xenial system gnome-system-monitor is fairly straightforward to build from source. First allow access to source code:

Dash > Software & Updates > Ubuntu Software >  Source Code

Then allow the system to reload the repositories. Pick up the build dependencies for gnome-system-monitor by running the following from within a Terminal window:

sudo apt-get build-dep gnome-system-monitor

Then download, compile and install gnome-system-monitor with the following single command which can be copied and then pasted into a Terminal window:

sudo apt-get install build-essential checkinstall && \
mkdir -v $HOME/Desktop/gnome-system-monitor_build && \
cd $HOME/Desktop/gnome-system-monitor_build && \
wget https://download.gnome.org/sources/gnome-system-monitor/3.20/gnome-system-monitor-3.20.1.tar.xz && \
tar xvf gnome-system-monitor-3.20.1.tar.xz && cd gnome-system-monitor-3.20.1 && \
./configure && make && \
sudo checkinstall --pakdir "$HOME/Desktop/gnome-system-monitor_build" \
     --backup=no --deldoc=yes --pkgname gnome-system-monitor --pkgversion 3.20.1 \
     --fstrans=no --deldesc=yes --delspec=yes --default

Log out and then back in (or simply open Dash, close it and then reopen it) and you should then see the following, (a screenshot taken from my own installation on Xenial Xerus):

Runs nicely on my system and when a new version is released this method can easily be tweaked to install the very latest version :)

Have you tried sudo apt-get install, followed by its package name? In this case it's sudo apt-get install gnome-system-monitor.

Should you have no idea what this is: Open Terminal, copy and paste the following command, press Enter, input your password (which you might not see the asterisks as you type -- just keep typing), press Enter, and answer any prompts that may be on screen.

For Ubuntu, the latest version of System Monitor is 3.20.1-1.


Customizing tray/taskbar date display in Ubuntu with GNOME 3 On previous versions I had the date displayed. Now it just shows the current day but not the day's number or the month.

Is there a way to customize the clock or tray/taskbar more in GNOME shell on Ubuntu 17.10 and later?

You can get the date displayed in the top bar by using gnome-tweak-tool. First open up a terminal with ctrl+alt+t and install the tweak tool with

sudo apt install gnome-tweak-tool
gnome-tweaks  #  now launch it

After that you can start it from the application selector (there the name is just tweaks) and navigate inside the tweak tool to the tab for 'Top Bar' and activate Date and Seconds (see screen-shot).

Although this might be the easiest approach for the casual user there's another method which works. By issuing the following terminal command you can set the same:

# makes the date appear
gsettings set org.gnome.desktop.interface clock-show-date true
# switches the seconds display on
gsettings set org.gnome.desktop.interface clock-show-seconds true

By replacing set with get you can ask the system to give you the actual settings. Example:

gsettings get org.gnome.desktop.interface clock-show-seconds

For a more granular control, you may use the Clock override GNOME shell extension (reference: How do I install and manage GNOME Shell extensions?). With it, you can

  Customize the date and time format displayed in clock in the top bar in GNOME Shell. Add as much or as little time information you want with extensive formatting options including an emoji clock face and Internet Time (.beat).

It supports Python's strftime format.

Extension homepage: https://github.com/stuartlangridge/gnome-shell-clock-override


Error when trying to run apps installed as snap packages - Ubuntu 16.04 After installing a snap package I have an error when I try to run the app.

For example:

sudo snap install ubuntu-clock-app
/snap/bin/ubuntu-clock-app
failed to create user data directory. errmsg: Permission denied

The same occur with other apps.

I have my HOME directory encrypted. I suspect this is related to the problem.

I also have an encrypted home, and it works just fine. The user data directory is defined as $HOME/snap/<snapname>/<snapversion>. It's created when the application is run. However, if one runs an application as sudo one can end up with $HOME/snap owned by root, in which case a subsequent run without sudo will result in a permission denied trying to create a directory within a directory owned by root.

Make sure $HOME/snap isn't owned by root (chown if necessary).


Cronjob - Script not running on reboot I need to execute a script, myscript.sh, at every reboot.
After crontab -e I wrote:

@reboot /home/techy/Documents/myscript.sh

The file is executable after chmod 777 myscript.sh, but I'm not able to get output from shell script.

My shell script is supposed to change the desktop background, and is working if executed from terminal.

You cannot do this with @reboot, (or even cron). When your @reboot script runs, you haven't logged in (myscript.sh is run as root), the X Server hasn't been started, and the background you want to change doesn't even exist.

I suggest using ~/.config/autostart/. The files there are .desktop files, see man desktop-file-validate, man desktop-file-edit, man desktop-file-install, ... . Since the files in my ~/.config/autostart/ put icons on the top of my screen, I think it's the right context/time to "change the desktop background".

I would try this instead.

@reboot sleep 45 && sh /home/techy/Documents/myscript.sh

That gives some time to your boot up, and the sh actually calls the shell script.
You might need to run chmod -x /home/techy/Documents/myscript.sh this takes restrictions off of the script and path.


Ubuntu 14.04 doesn't recognize my Bq Ubuntu Edition smartphone When I connect my BQ Ubuntu via USB  to Ubuntu Desktop 14.04 nothing happens but I checked it with a Windows Xp computer and it runs ok.

Please some help!

*Ubuntu just released an update and now it works for me.

I just tried and had the same issue on Ubuntu 14.04.
Then I unplugged it and unlocked the phone (I have a PIN lock). I tried again after having unlocked the phone and it worked.

I followed the instructions of write-mem in http://ubuntuforums.org/showthread.php?t=2226702. Previously, I have also installed mtpfs, but do not know if it was necessary.


Google locking on Ubuntu Problem I'm facing is that Google doesn't respond well timed to connection requests send from any browsers known to Linux.

As far as I can tell, this was existent in Mint, which is Ubuntu based.

I have no debug or guess about cause but I'm sure there are people with the same problem.

ping of terminal is untouched but any other browser keeps unloaded, for example; google loads fine, I search for something. Then I decide to search for something else and ta daa: You gotta wait for 30 seconds for Google server to respond.

I tried using google's public DNS without success.

Flare the suggestions & ideas!?

OK, I think I "fixed" it.

going to:

   about:config

and deleting everything contains "google" fixed the load issue!

But of course it screwed almost whole of google. The theme turned back to 90's and the fun started, images or any other search results cannot be opened.

Any suggestions?

Edit: Restarting the Firefox reverted everything that changed with my delete tweak and problem yet persists and all of the configs I screwed are disappeared.

Edit2: Safe mode didn't make any difference. I've filled a bug report on chromium about it, yet didn't seemed to be popular yet. http://code.google.com/p/chromium/issues/detail?id=255434

I encountered the same kind of issue and I've fixed it by checking my /etc/hosts.

My computer was entered twice :

127.0.0.1   localhost

127.0.1.1   the_host_name <- I commented this line

Since I commented this line internet broswing is faster than ever.


Best way to add replay gain to m4a files? I use (and love) QuodLibet as a my music player and it has a plugin that calculates replay gain values (album and track) and stores them in the files.

However, it doesn't work for my m4a files...just my mp3 and flac.

Any suggestions for a tool that will do this on Ubuntu 12.04+

I realise this question was asked some time ago, but I was also looking for an answer.  gmusicbrowser has an option in its settings to add replaygain tags to your collection, and it seems to work with M4a files too.  I'm using Debian Jessie, but I see no reason why it wouldn't work on Ubuntu.

Without any other answers, I am choosing to convert my m4a files to mp3 files and then go from there.


How to easily resize images via command-line? I would like to know how to resize images in Ubuntu. What is the easiest tool to do so?

First install ImageMagick via:
sudo apt-get install imagemagick

Open a terminal and run this command:
convert  -resize 20% source.png dest.jpg

It will reduce the size to 20%.
Note that the reduction is not by 20%.
The resulting image will be much smaller, 20% of the former size,
not 20% smaller than before, not much smaller.
You can also specify the size:
convert -resize 1024X768  source.png dest.jpg

You can also use: mogrify command-line tool from the same package.

open the image in ImageMagick.

click on the image command box will be open.
view->resize enter the pixel you want. click on resize button.
File-> save, enter the name. click on Format button choose the format you want and click select button.
click on save button.

another option is
select view -> original image and Drag the corners of the image to resize it. select File -> save.


No such file or directory? But the file exists! I've downloaded a game (Shank) but the bin file doesn't run. The error that is shown when I try to launch the executable is:

bash: ./shank-linux-120720110-1-bin: No such file or directory

You're probably trying to run a 32-bit binary on a 64-bit system that doesn't have 32-bit support installed.

There are three cases where you can get the message “No such file or directory”:

The file doesn't exist. I presume you've checked that the file does exist (perhaps because the shell completes it).
There is a file by that name, but it's a dangling symbolic link.
The file exists, and you can even read it (for example, the command file shank-linux-120720110-1-bin displays something like “ELF 32-bit LSB executable …”), and yet when you try to execute it you're told that the file doesn't exist.

The error message in this last case is admittedly confusing. What it's telling you is that a key component of the runtime environment necessary to run the program is missing. Unfortunately, the channel through which the error is reported only has room for the error code and not for this extra information that it's really the runtime environment that's to blame. If you want the technical version of this explanation, read Getting “Not found” message when running a 32-bit binary on a 64-bit system.

The file command will tell you just what this binary is. With a few exceptions, you can only run a binary for the processor architecture that your release of Ubuntu is for. The main exception is that you can run 32-bit (x86, a.k.a. IA32) binaries on 64-bit (amd64, a.k.a. x86_64) systems.

In Ubuntu up to 11.04, to run a 32-bit binary on a 64-bit installation, you need to install the ia32-libs package . You may need to install additional libraries (you'll get an explicit error message if you do).

Since 11.10 (oneiric) introduced multiarch support, you can still install ia32-libs, but you can choose a finer-grained approach, it's enough to get libc6-i386  (plus any other necessary library).

This error happens when working on Windows (which introduces extra characters because of different line separator than Linux system) and trying to run this script (with extra characters inserted) in Linux. The error message is misleading.

In Windows, the line separator is CRLF (\r\n) whereas in linux it is LF (\n). In my case, this happened due to working on Windows and uploading to Unix server for execution.


How to load Xmir on my tablet/phone with Ubuntu Touch Saucy On my tablet/phone do not run X11 applications with the default Ubuntu Touch Saucy configuration (all my favourite desktop applications like okular, kate, x11vnc, etc...).  As I found [here][How to load Xmir on Ubuntu 13.10 the XMir is required. Unfortunately Ubuntu Touch on phone/tablet do behaves differently and the reply above do not solve this issue.

I am testing the Xmir on Nexus 7 tablet. There is intalled/running unity8 + lightdm + mir and unity-system-compositor + Xorg.

I am still getting message above after system reboot in the /var/log/Xorg.0.log :

[    81.542] (II) "glx" will be loaded by default.
[    81.542] (WW) "xmir" is not to be loaded by default. Skipping.
[    81.542] (II) LoadModule: "dri2"

to run X sessions under Mir, with Mir acting as the system compositor, create the file /etc/lightdm/lightdm.conf.d/10-unity-system-compositor.conf to look to look like this:

[SeatDefaults]
type=unity

then restart ligthdm.
see http://unity.ubuntu.com/mir/using_mir_on_pc.html for more details.


How to add menu items in System menu I want to insert an item to System menu:

Help and Support
About Gnome
About Ubuntu

More specifically, I want to insert a new item under "About Ubuntu".

Trying with alacarte doesn't work. Cloning "ubuntu-about.desktop" file and changing his attributes doesn't work too (I even rebooted the computer after that). Searching for categories in "/usr/share/desktop-directories" haven't worked too, and searching for "core" and "about" entries in /etc/xdc/menus neither. It isn't as easy as I thought it would be.

Anyone have any suggestions?

You can add items to the first section of the System menu using Alacarte (System -> Preferences -> Main Menu).

The menu items below that are  hard-coded  in the gnome-panel source code, so other than editing the source code, there is no way to add more menu items to the second section of the System menu.

However, you can "replace" any of the three menu items by creating a .desktop file in ~/.local/share/applications with a specific filename.

Help and Support = yelp.desktop
About GNOME  =  gnome-about.desktop
About Ubuntu = ubuntu-about.desktop

For example, lets say that instead of an About Ubuntu item in the System menu you want an Ubuntu Tweak item, simply copy the ubuntu-tweak.desktop file to ~/.local/share/applications/, renaming it to ubuntu-about.desktop:

cp /usr/share/applications/ubuntu-tweak.desktop ~/.local/share/applications/ubuntu-about.desktop

If you want to have the About Ubuntu menu item again, simply delete ubuntu-about.desktop:

rm ~/.local/share/applications/ubuntu-about.desktop

Have you tried navigating to System - Preferences - Main Menu - System - + New Item?  I can add a new menu item this way in Ubuntu 8.04.  However, the problem may be that it doesn't seem to be possible to access the About Ubuntu sub-menu this way.


How to find the reason of the alert sound? I am getting alert sounds at random times and even when I am not using the computer. I wanted to ask here before disabling the alert sound. Are there any logs so that I can see what causes those alert sounds?

I am on Ubuntu Gnome 17.04.
Thanks.

There is a tool called "Recent Notifications" that may help

sudo add-apt-repository ppa:jconti/recent-notifications
sudo apt update && sudo apt install indicator-notifications

Log out/log back in and in your top right of the screen you should have a mailbox icon. You can customize the settings as well, but as that is outside of the scope of your question you could simply google how to make changes, blacklist apps, etc.

Hope it helps!


Missing Operating System (ubuntu installation error) I am a novice user of Ubuntu. I had Ubuntu 12.04 LTS and Windows 8 dual operating system side-by-side before in two separate Hard drive (one SSD and other HDD). But My Windows crashed and I decided to install Windows 8.1
.So when I installed Windows 8.1, the boot menu I used to choose operating system did not appear and it directly logged into Windows 8.1. Then I tried to install Ubuntu 12.04 LTS again with USB stick with the procedure given here:

http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-windows

But It didn't work. It gave me error "missing operating system" when I tried to boot my USB from UEFI boot menu and then it directed to a boot menu where I could choose my old Ubuntu (but not my new Windows 8.1). To fix this error I decided to install a fresh copy of Ubuntu and so I formatted that drive using Windows. Now, when I try to boot my USB drive, it gives me the same error "missing operating system" with some bonus errors "unknows file system" and the a command prompt with "grum rescue >" appear.

I am really stuck with this problem. Need help

Regards
Omar

UEFI is the BIOS. You are obviously booting from the USB if it is telling you that the operating system is missing. So it sounds like the problem is the USB. Try reformatting the USB and follow that guide again.


Acer Aspire E15 will not dual boot I installed Ubuntu 14.04 onto my Acer Aspire E15. The PC has a 500 Gigabyte HDD.

During the installation it divided the HDD into separate partitions. However every time I turn on the PC it goes directly into Windows 8.1. It doesn't allow you the opportunity to select which OS you want to use.

Question 1: How do I set the PC so it will allow me to select the OS?

Question 2: And if #1 isn't possible. How to I remove Ubuntu from the PC and recover the partition for Windows

Recently, I bought an Acer Aspire ES1-512 for a college course. As it happens this course requires the students to use Ubuntu. After several unsuccessful attempts to install Ubuntu alongside Windows. I believe I have an answer that allows you to install Ubuntu 14.04.2 alongside Windows 8.1 on an Acer Aspire ES1-512.

Some of the steps are from memory, so if something doesn't work please let me know.

Steps for Installing Ubuntu:

Turn on the laptop and press F2 as soon as you see the "Acer Explore
Beyond Limits" screen. This will take you into the UEFI/BIOS screen.
If this is the first time you have entered the UEFI/BIOS section there are some adjustments that need to be made.
Using the cursor keys highlight the menu item "Main."
Network Boot:       [Disabled]
F12 Boot Menu:  [Enabled]
D2D Recovery:   [Enabled]
Wake on LAN:    [Disabled]
SATA Mode:      [AHCI Mode]
Touchpad:       [Advanced]
xHCI Support:  [Enabled]
Cursor over to the "Security" menu item.
Set Supervisor Password to one of your choosing.
Disable "Password on Boot."
Cursor over to the "Boot" menu item and arrange these items.
Boot Mode: [UEFI]
Secure Boot:   [Enabled]
Arrange the boot devices as follows
ATPI CDROM:
HDD:
USB HDD:
USB FDD:
Network Boot - IPV4
USB CDROM:
Network Boot IPV6
Windows Boot Manager
Press F10 to Save your modifications and Exit BIOS.
Open the DVD tray and insert your LiveDVD of Ubuntu. Close the DVD tray and restart your laptop.
When you restart, if the boot order is set correctly you should boot up in Ubuntu. If not go back into the "Boot" item in the BIOS menu and make sure the laptop's DVD is at the top of the boot devices.
Select the option "Install Ubuntu alongside Windows." The installation program will divide the Windows partition. My Acer Aspire has a 500 Gigabyte HDD. The installation program divided it like so:
Files (27.2 GB) /dev/sda4(ntfs) 253 GB
Ubuntu /dev/sda5(ext4) 231 GB
Wait for Ubuntu to install. This will take awhile.
After Ubuntu is installed you will be instructed to reboot your laptop. After you select reboot you will be instructed to remove the Ubuntu DVD from the DVD ROM drive.
Warning: If you think the laptop will now boot up and let you choose which OS you want to run. I am afraid you will be disappointed. The only OS recognized by the UEFI firmware at this time is Windows.
Restart the laptop as we did back in Step 1.
Use the right cursor key to highlight "Security"  and use the down cursor key to highlight "Select an UEFI file as trusted for executing" and press Enter.
The "Security" window will show HDD0 in white letters. Press the Enter key.
On my laptop two items; they look like folders show up: "EFI and Temp." Highlight EFI and press Enter.
These folders are displayed: ., .., ubuntu, Microsoft, Boot, and OEM. Highlight ubuntu and press Enter.
Another set of folders are listed: ., .., shimx64.efi, grubx64.efi, and  MokManager.efi. Highlight "grubx64.efi" and press Enter.
The "Add an new file" window will appear in the middle of the screen with the question: "Do you wish to add this file to allowable database?"  In the "Boot Description" type in grubx64.efi and press the Enter key twice.
Press F10 to Save and Exit BIOS.
Now restart the laptop and return to the BIOS menu. Cursor over to the "Boot" item and you will see a ninth boot file added: "EFI File Boot 0: grubx64efi." If you choose to leave the boot order alone. Whenever you turn on your laptop it will boot up in Windows.
Or you can move the ""EFI File Boot 0: grubx64efi" to the eight position and boot up in Ubuntu.

For stealth reasons you can let your laptop default boot into Windows, but if you need Ubuntu  when you power on the Laptop press the F12 key repeatedly until the "Boot Manager's" window opens. There should be two options.

Windows Boot Manager
grubx64efi

To boot Ubuntu highlight the grubx64efi and press Enter. For Windows highlight Windows Boot Manager and press Enter.

Did you install windows after installing Ubuntu. If so then you need to reinstall the GRUB by booting through live disk.

And if that's not the case then:

Did you make a "swap" partition?

The process is like: (lets assume you have one drive with windows on it of 400 GB, other on with Linux with space of 100 GB)

Now divide this 100 GB partition in two parts. Make one of almost 2-3 GB and make it's partition type as "SWAP"
The remaining space, format it as ext4 partition.
Go ahead with installation you won't face any problems.

Note: You can do all these step by booting through live disk of ubuntu and deleting the partition with linux installed on it already and then do as said. Choose Custom partitioning when you're asked for installation destination.


Skype 4.3.0.37 stopped working after installation of Nvidia 340.32 drivers I did a fresh install of Ubuntu 14.04 and tried skype, it worked.

Now I decided to install the video driver from NVIDIA website, install went successful but now Skype is not starting anymore, no error, nothing.

Any help to diagnose this problem, please?

Thank you.

I think this wrapper script is one way to make it work:

Create the folder bin in your home directory, if it's not there already, and put a file named skype there with this contents:

#!/bin/sh
export LD_PRELOAD="/usr/lib/i386-linux-gnu/mesa/libGL.so.1 $LD_PRELOAD"
exec /usr/bin/skype "$@"

Make the file executable with:

chmod +x ~/bin/skype

If you needed to create the ~/bin folder, you need to log out and log in again for this to make a difference.

This should work however you choose to start skype.

This solution worked for me on Debian 8

sudo ln -s /usr/lib/mesa-diverted/i386-linux-gnu/libGL.so.1 /usr/lib/i386-linux-gnu/


Set a password, yet it logs in without one My account is an administrator; I'm using Ubuntu 14.04LTS.

I've set a password and set automatic login to OFF, yet when I wake up from suspension or reboot if I just press Enter or type in anything then it logs me in.

How should I proceed?

Easy:

Click the gear icon in the top-right corner of your screen:

Click System Settings, then Brightness & Lock:

Click the Lock switch until it goes into the On position and ensure the Require my password when waking from suspend is ticked.

Done! ;-)

If that doesn't work:
Create a new user on your system and see whether that user does work.  If that's the case (in the below example we'll use steam-gamer and steam-gamer2), just do the following:

Open the file manager

Browse to the /home/steam-gamer directory

Copy (don't move!) all the files from Downloads to /home/steam-gamer2/Downloads

Check you did a good job.

Now delete /home/steam-gamer/Downloads

Go back to step 3 and repeat for Documents, Videos, ...

After a couple of days to allow you to ensure you didn't forget to copy anything, just delete steam-gamer together with it's home directory by issuing the following command:
sudo deluser steam-gamer --remove-home

The brute force approach is to hand edit /etc/lightdm/lightdm.conf, adding a # character to the beginning of every line starting with autologin.


no permissions fastboot - fastboot and adb not working I'm trying to unlock my Moto phone using ADB but I when I do a fastboot devices I keep getting

no permissions   fastboot

Even sudo fastboot devices is not helping

with sudo I get this sudo: fastboot: command not found

HELP!!

Try using sudo $(which fastboot)

for instance sudo $(which fastboot) devices

also sudo $(which fastboot) oem unlock

First install fastboot from apt:

sudo apt install android-tools-fastboot

Next execute fastboot with sudo:

sudo fastboot

It works for me.