bash shell output history file location Where does the bash shell store the actual terminal session? I want to read the output of commands I used before. All I can find googling is how to store the output of a command.

Since output is displayed on the screen, it has to be stored somewhere anyway. So my question is: where?

Bash only stores history of the commands you ran (which you can retrieve by typing history). Unless you already have set the scroll-back to a very high number, there is no way to see the outputs that are older than the set value of scroll-back. Also setting this value to a very high number will make your scrolling sluggish since the lines are stored in the memory.

To store your future commands and their outputs, there are few options:

Using screen

Start a screen session by entering screen. Once you are inside screen, press Ctrl-a, then :, then enter log. All the I/O will be captured in screenlog files in the directory where you started the screen command.

Using script

You can start by typing script. A script session will start that will capture all the I/O to a file named typescript. You can exit the script session by Ctrl-d  and view the logs in the typescript file.

Using tee

tee is a handy tool. You can do something like this:

$ bash | tee log.txt

This will open a new bash shell inside the one you are already running. When you exit out of this, you can see the outputs in the file called log.txt

Other ways

As Dustin Kirkland suggested in this post, you can also use byobu. Although, I have never used, terminal screencasting tools such as Shelr also sounds like an option.

Terminal session is stored in .bash_history file. Enter this in your terminal echo $HISTFILE, this would give you the path of .bash_history file.


I am not able to install eclipse after uninstalling it To remove Eclipse I used:

sudo apt-get autoremove eclipse
rm -r ~/.eclipse/

Now when installing i get this:

anjali@anjali-ThinkPad-Edge-E430:~$ sudo apt-get install eclipse
[sudo] password for anjali:
Reading package lists... Done
Building dependency tree
Reading state information... Done
eclipse is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 608 not upgraded.
anjali@anjali-ThinkPad-Edge-E430:~$ eclipse
The program 'eclipse' is currently not installed.  You can install it by typing:
sudo apt-get install eclipse-platform

The program 'eclipse' is currently not installed.  You can install it by typing:
sudo apt-get install eclipse-platform

And one more thing, to uninstall a package use:

sudo apt-get remove package_name

or

sudo apt-get purge package_name

See man apt-get for more info:

autoremove is used to remove packages that were automatically
installed to satisfy dependencies for other packages and are now no
longer needed.

Is not more easy install directly from Eclipse sources? you dont need install everything more,just download the zip and unzip it and Eclipse works fine, I do that all the time with no problems. Only Java is a requirement but I guess you already got it.


Rsync creates error message unexplained error (code 255) at io.c(837) When I try to rsync -qaPH source/ 192.168.1.21:/var/backups I get

rsync: [sender] write error: Broken pipe (32)
rsync error: unexplained error (code 255) at io.c(837) [sender=3.1.0]

Whats wrong with my command?

To investigate, add one or more -v options to the rsync command.
Also, try to use plain ssh:

ssh -v 192.168.1.21 /bin/true

to find out whether it is rsync or the underlying ssh connection that is causing the trouble.

I know this issue is old, but maybe someone (like me) still have the error.

a) Check if the ssh service is running:

sudo service ssh status

b) Check the connection with triple verbose command:

ssh -vvv <hostname>

c) Maybe you use the wrong ssh-key or the key is broken in some way.

Vine


How to use gnome on top of Ubuntu without having to switch to Ubuntu Gnome Quick question:

I have so many things configured in my Ubuntu 16.10 machine. IDEs, emacs,configuration files, zh, keybindings, touchpad configuration, etc etc etc.

I want to try Gnome 3, but I don't want to install a new OS (Ubuntu Gnome), is there anyway to just install gnome de, in a stable way?

Or, a way to pack and unpack all my OS configuration and programs into a new distribution? (If I really had to change from Ubuntu to Ubuntu Gnome?)

Yes go to the command line and type sudo apt install gnome this will install the gnome GUI at some point you will be given a choice of display manager either lightDM or GDM personally I would recommend lightDM once the install is complete logout and choose which desktop to use.

Edit 1
If you just want the gnome shell with none of the 'bundled' packages then type sudo apt install gnome-shell

You could install the Gnome 3.20 Desktop environment on your Ubuntu 16.10 OS. After installing that, you could switch desktop environments before logging in.

For installing Gnome 3.20 DE, open up your terminal and type these commands.

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

Read this for more reference.


GEGL version too old error? I am getting GEGL version too old error whlie opening GIMP after updating to Ubuntu 20.04. The complete error is
GEGL version too old!

GIMP requires GEGL version 0.4.22 or later.
Installed GEGL version is 0.4.18.

Somehow you or your software packager managed
to install GIMP with an older GEGL version.

Please upgrade to GEGL version 0.4.22 or later.

But I checked my installed gegl version which is 0.4.22-3.

I have done described here but it does not work
Please help !!!  I am not able to use GIMP.
Here is /etc/apt/sources.list file
# deb cdrom:[Ubuntu 19.10 _Eoan Ermine_ - Release amd64 (20191017)]/ eoan main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://in.archive.ubuntu.com/ubuntu/ focal main restricted universe
# deb-src http://in.archive.ubuntu.com/ubuntu/ eoan main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://in.archive.ubuntu.com/ubuntu/ focal-updates main restricted universe
# deb-src http://in.archive.ubuntu.com/ubuntu/ eoan-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
# deb-src http://in.archive.ubuntu.com/ubuntu/ eoan universe
# deb-src http://in.archive.ubuntu.com/ubuntu/ eoan-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
# deb-src http://in.archive.ubuntu.com/ubuntu/ eoan multiverse
# deb-src http://in.archive.ubuntu.com/ubuntu/ eoan-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://in.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe
# deb-src http://in.archive.ubuntu.com/ubuntu/ eoan-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu eoan partner
# deb-src http://archive.canonical.com/ubuntu eoan partner

deb http://security.ubuntu.com/ubuntu focal-security main restricted universe
# deb-src http://security.ubuntu.com/ubuntu eoan-security main restricted
# deb-src http://security.ubuntu.com/ubuntu eoan-security universe
# deb-src http://security.ubuntu.com/ubuntu eoan-security multiverse

# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.

I had the same problem on Ubuntu Mate 20.04.
Resolved it as follows.  The otto-kesselgulasch repository is depreciated and is no longer maintained. It needs to be replaced.
sudo apt install ppa-purge
sudo ppa-purge ppa:otto-kesselgulasch/gimp
sudo add-apt-repository ppa:ubuntuhandbook1/gimp
sudo apt update && sudo apt upgrade

If that doesn't work you may need to re-install GIMP
sudo apt install gimp gimp-gmic

This worked for me.
You may also need to do
sudo apt autoremove

and
sudo apt update && sudo apt upgrade

for a number of cycles until all the dependencies are satisfied and unused dependencies removed.
Trying to install GEGL didn't help for me.  I removed / purged GIMP (and GEGL 0.4.22 - it was installed correctly!) as above a number of times without result.  However, doing this routine from the start worked first-time on my second machine!
Thanks to Ubuntu Handbook for hosting the repository.

You can just try:
sudo apt-get install gegl


Create deb repository with several versions of the same package I want to create my own deb repository to store some packages. I've tried
reprepro and it works fine, except for one fundamental feature. Reprepro can't
store several versions of the same package in the repository.

The ability to store several versions of the same package is essential to
me, so I'm asking what software can can do this.

Here is a piece of reprepro FAQ that shows that it can't do it:

3.1) Can I have two versions of a package in the same distribution?
-------------------------------------------------------------------
Sorry, this is not possible right now, as reprepro heavily optimizes
at only having one version of a package in a suite-type-component-architecture
quadruple.
You can have different versions in different architectures and/or components
within the same suite. (Even different versions of a architecture all package
in different architectures of the same suite). But within the same
architecture and the same component of a distribution it is not possible.

As far as I understand, mini-dinstall requires debian .changes files when adding packages. As I only had .deb files available I found that aptly supports multiple versions as well.

Another more light-weight option is freight which is a set of shell scripts for maintaining a debian repository. I have now (2017) been using freight for three years to maintain a small but actively updated repository, with good results. One key feature was the ability to keep multiple versions of a package.

Edit: Updated link to new freight repo as the previous had not been updated since 2014.

As the software tells you, the older ones are purged when a new one comes in. Usually, this is done with multiple repos. Just like Ubuntu and Debian have multiple repos for stable and unstable or Natty, Oneiric, …, you will need to have multiple repos.

Usually package managers select the newest version of a package, so it would be hard for the users to choose as well.


My Bluetooth mouse freezes while being actively used My BT freezes up while I'm using it. It actually comes back to life if I put the laptop to sleep and wake it up, but to be fair I have a connect script in /etc/pm/sleep.d from when 16.04 was not waking my network up. If I leave the "About" dialog box open in blueman-manager, it does not lock up. I have disabled the BT script in /usr/lib/pm-utils/power.d to see if that helped, it did not.

My current work around is to open up blueman-manager, open the about dialog and then just move them both to another workspace where they are out of the way.

Possible pertinent hardware info:

Processor     : 8x Intel(R) Core(TM) i7-4710MQ CPU @ 2.50GHz
Memory            : 12233MB
Operating System  : Ubuntu 16.10
Network controller    : Intel Corporation Wireless 3160 (rev 83)
HP Bluetooth Laser Mobile Mouse

My connect script:

#!/bin/sh

case "${1}" in
        resume|thaw)
        nmcli nm sleep false
         systemctl restart networking
         bluetoothctl connect 00:0F:F6:6D:46:38
 ;;
esac

I had this problem on Mint 19.3 with a Microsoft Arc Mouse. It kept freezing at random intervals. The only way to get it working again was to shut the mouse down (in the case of Arc mouse this means un-arcing and re-arcing (is this even English?) it). Somehow I solved this by booting Mint with an older kernel (in GRUB, I jumped back some 4 versions). Using that kernel I removed the mouse (in Bluetooth), paired and connected it. And it worked flawlessly. After booting again in the latest (default) kernel. The mouse kept working as it should. No idea why but this worked for me. Goo luck!


Is there an alternative to DVD-Shrink, that can compress a DVD image to a smaller size to fit on a writeable DVD? Is there a linux alternative to the Windows application DVD-Shrink, that can compress a DVD image to a smaller size to fit on a writeable DVD?

In backing up some DVD's the ripped ISO file size is over 7000MB is there an alternative linux software, similar to Windows "DVD Shrink" that can compress this to fit on a writeable DVD which is about 4000MB

The 2 best tools I know of that work are dvd95 and k9copy.
sudo apt-get install dvd95 or sudo apt-get install k9copy
installing k9copy on a non-kde system will pull down a lot of dependencies, which may or may not be an issue with you.

It is unfortunate that DVDShrink can't be found playable for Linux/Ubuntu. One alternative that I've done is to copy the DVD as an ISO file in my computer and then burn it as it is (without compressing it) onto another (blank) DVD. There are double density blank DVD's out there that you can get. They are more expensive, but for now and until you find another solution, that might work. Back when I had to copy a hard-to-find movie and didn't have DVDShrink, I was using a software called "InfraRecorder" that I found on Download.cnet but I don't know where to find it now.
After installing Linux Mint, I discovered that it comes with a software that works exactly as InfraRecorder called "Brasero". Give it a try, hope it will give you the utility that you need.
Good luck on your search.


I installed jockey-gtk but how do I run it? zuber@zuber-pc:~$ sudo apt-get install jockey-gtk
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  nvidia-common python-xkit
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
  jockey-gtk
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/3,158 B of archives.
After this operation, 53.2 kB of additional disk space will be used.
Selecting previously unselected package jockey-gtk.
(Reading database ... 156414 files and directories currently installed.)
Unpacking jockey-gtk (from .../jockey-gtk_0.9.7-0ubuntu11_all.deb) ...
Setting up jockey-gtk (0.9.7-0ubuntu11) ...
zuber@zuber-pc:~$ jockey-gtk
The program 'jockey-gtk' is currently not installed. You can install it by typing:
sudo apt-get install jockey-gtk

And this not only occur with jockey-gtk. I have same problem with synergy(I did not tried with other software). Is it known problem or am I only one? How do I fix it?

jockey-gtk has been moved to 'Software Sources' in 12.10 Quetzal.

To access it, open the software center.  Open 'Edit' --> 'Software Sources'

Then switch to the 'Additional Drivers' tab.

Yes, looks like it is not installed, but doesnt tell us why.

Try updating your Sources list:

sudo apt-get autoremove && sudo apt-get update && sudo apt-get upgrade && sudo apt-get install jockey-gtk

Update/Install Device Drivers

In Ubuntu 12.10, jockey-gtk has been superseded by software-properties for managing third-party driver configuration. So, to access this feature, open the terminal and run this command:

sudo software-properties-gtk

Open now the "Additional Drivers" tab, then install any detected driver for your keyboard, wireless cards, graphics cards, etc.

For Nvidia graphics cards, it is recommended that you use Nvidia proprietary drivers instead of Nouveau to be able to get better graphics performance in games, HD videos and so on. You can install the latest Nvida driver using the x-swat PPA (stable) with the following commands:

sudo apt-add-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get install nvidia-current nvidia-settings

Using the same PPA, you can also install AMD Catalyst driver with these commands:

sudo apt-get install fglrx-installer
sudo aticonfig --initial -f

For NVIDIA Optimus laptops, you can install the graphics driver with these commands:

sudo add-apt-repository ppa:bumblebee/stable
sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get install bumblebee bumblebee-nvidia

Installation Instructions, courtesy of: http://www.linuxrelease.com/2012/10/to-do-list-after-new-installation-of.html


Failure to install ubuntu-13.10-desktop-amd64 below error is the one am getting on installation failure

12-07 01:25 ERROR  TaskList: [Errno 4] IOError: <urlopen error (2, 'getaddrinfo failed')>
Traceback (most recent call last):
  File "\lib\wubi\backends\common\tasklist.py", line 197, in __call__
  File "\lib\wubi\backends\common\downloader.py", line 77, in download
  File "\lib\urlgrabber\grabber.py", line 927, in urlgrab
  File "\lib\urlgrabber\grabber.py", line 845, in _retry
  File "\lib\urlgrabber\grabber.py", line 913, in retryfunc
  File "\lib\urlgrabber\grabber.py", line 1001, in __init__
  File "\lib\urlgrabber\grabber.py", line 1072, in _do_open
  File "\lib\urlgrabber\grabber.py", line 1188, in _make_request
URLGrabError: [Errno 4] IOError: <urlopen error (2, 'getaddrinfo failed')>
12-07 01:25 DEBUG  TaskList: # Cancelling tasklist
12-07 01:25 ERROR  root: [Errno 4] IOError: <urlopen error (2, 'getaddrinfo failed')>
Traceback (most recent call last):
  File "\lib\wubi\application.py", line 58, in run
  File "\lib\wubi\application.py", line 132, in select_task
  File "\lib\wubi\application.py", line 158, in run_installer
  File "\lib\wubi\backends\common\tasklist.py", line 197, in __call__
  File "\lib\wubi\backends\common\downloader.py", line 77, in download
  File "\lib\urlgrabber\grabber.py", line 927, in urlgrab
  File "\lib\urlgrabber\grabber.py", line 845, in _retry
  File "\lib\urlgrabber\grabber.py", line 913, in retryfunc
  File "\lib\urlgrabber\grabber.py", line 1001, in __init__
  File "\lib\urlgrabber\grabber.py", line 1072, in _do_open
  File "\lib\urlgrabber\grabber.py", line 1188, in _make_request
URLGrabError: [Errno 4] IOError: <urlopen error (2, 'getaddrinfo failed')>
12-07 01:25 ERROR  root: Could not remove: C:\ubuntu\install\ubuntu-13.10-desktop-amd64.iso
Traceback (most recent call last):
  File "\lib\wubi\backends\common\backend.py", line 426, in download_iso
OSError: [Errno 13] Permission denied: u'C:\\ubuntu\\install\\ubuntu-13.10-desktop-amd64.iso'
12-07 01:25 DEBUG  TaskList: New task download
12-07 01:25 ERROR  root: Could not remove: C:\ubuntu\install\ubuntu-13.10-desktop-amd64.iso
Traceback (most recent call last):
  File "\lib\wubi\backends\common\backend.py", line 426, in download_iso
OSError: [Errno 13] Permission denied: u'C:\\ubuntu\\install\\ubuntu-13.10-desktop-amd64.iso'
12-07 01:25 DEBUG  TaskList: New task download
12-07 01:25 ERROR  root: Could not remove: C:\ubuntu\install\ubuntu-13.10-desktop-amd64.iso
Traceback (most recent call last):
  File "\lib\wubi\backends\common\backend.py", line 426, in download_iso
OSError: [Errno 13] Permission denied: u'C:\\ubuntu\\install\\ubuntu-13.10-desktop-amd64.iso'
12-07 01:25 DEBUG  TaskList: New task download
12-07 01:25 ERROR  TaskList: Could not retrieve the required installation files
Traceback (most recent call last):
  File "\lib\wubi\backends\common\tasklist.py", line 197, in __call__
  File "\lib\wubi\backends\common\backend.py", line 600, in get_iso
Exception: Could not retrieve the required installation files
12-07 01:25 DEBUG  TaskList: # Cancelling tasklist
12-07 01:25 DEBUG  TaskList: # Finished tasklist

If you are installing 13.10 using Wubi then that is likely your issue. Wubi is not supported in 13.10 you will need to follow the official install instructions which can be found here: http://www.ubuntu.com/download/desktop/install-desktop-latest


list enabled service instances I'd like to list all enabled service instances.

The following lists enabled services, but only shows the service, and not individual instance:

systemctl list-unit-files --state=enabled

The following lists all running instances:

systemctl list-units --state=running

I would expect something like the following to show enabled instances:

systemctl list-units --state=enabled

But that does not work.

So, if I start two service instances with:

systemctl start foo-service@primary
systemctl start foo-service@secondary

...but then I only enable one:

systemctl enable foo-service@secondary

The only way I've been able to find out which instances are enabled is with:

ls /etc/systemd/system/multi-user.target.wants/

But that seems very kludge-y.  Is there a systemd way of doing this?  Version is 232 if it matters.

One solution I found was to list all of the units (which will include all instances of a templated service), and use xargs to run a command for each unit (checking whether each one is enabled):

$ systemctl list-units --no-legend | awk '{print $1}' | xargs -I % sh -c 'echo "%: $(systemctl is-enabled %)"'
auditd.service: enabled
chronyd.service: enabled
crond.service: enabled
...

To explain what is going on here:

systemctl list-units --no-legend : List all systemd units, without showing the headers at the top of the ouput
awk '{print $1}' : Print the first part of each line, which is the name of the unit
xargs -I % sh -c 'echo "%: $(systemctl is-enabled %)"' : Runs a command for line of the piped input. This will echo the unit name, followed by the output of systemctl is-enabled <service>.

You can use 'grep' to search for and list the enabled services

systemctl list-unit-files | grep enabled


Upgraded PHP on Ubuntu but old version still in use I just upgraded PHP to V5.4 on my laptop, using the technique described in this answer, How do I install different (upgrade or downgrade) PHP version in still supported Ubuntu release?.

I did the same for my desktop a while back and it all worked fine.  On my laptop however the old version (5.3.10) is still showing at the CLI (php -v) and the SAPI (phpinfo()).  why is it so?

Presumably there is a config file (or two) that needs updating?

I am using Ubuntu 12.04.

EDIT: output of dpkg -l '*php5*' as requested: (sorry about the formatting)

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
ii  libapache2-mod 5.3.10-1ubuntu server-side, HTML-embedded scripting languag
un  libapache2-mod <none>         (no description available)
ii  php5           5.3.10-1ubuntu server-side, HTML-embedded scripting languag
un  php5-cgi       <none>         (no description available)
ii  php5-cli       5.3.10-1ubuntu command-line interpreter for the php5 script
ii  php5-common    5.3.10-1ubuntu Common files for packages built from the php
ii  php5-curl      5.3.10-1ubuntu CURL module for php5
ii  php5-dev       5.3.10-1ubuntu Files for PHP5 module development
un  php5-fpm       <none>         (no description available)
ii  php5-gd        5.3.10-1ubuntu GD module for php5
ii  php5-gmp       5.3.10-1ubuntu GMP module for php5
un  php5-idn       <none>         (no description available)
un  php5-imap      <none>         (no description available)
ii  php5-intl      5.3.10-1ubuntu internationalisation module for php5
un  php5-json      <none>         (no description available)
un  php5-ldap      <none>         (no description available)
ii  php5-mcrypt    5.3.5-0ubuntu1 MCrypt module for php5
un  php5-mhash     <none>         (no description available)
ii  php5-mysql     5.3.10-1ubuntu MySQL module for php5
un  php5-mysqli    <none>         (no description available)
un  php5-mysqlnd   <none>         (no description available)
un  php5-pgsql     <none>         (no description available)
un  php5-sqlite    <none>         (no description available)
un  php5-sqlite3   <none>         (no description available)
un  php5-suhosin   <none>         (no description available)
ii  php5-xdebug    2.1.0-1        Xdebug Module for PHP 5
ii  php5-xmlrpc    5.3.10-1ubuntu XML-RPC module for php5
ii  php5-xsl       5.3.10-1ubuntu XSL module for php5

ANOTHER EDIT: Problem solved

Hi, Ubuntu suddenly decided it had numerous other updates to apply, including a kernel upgrade, so I let that happen and we now have v 5.4!  (The CLI is saying it can't load xdebug, but I've seen this before and should be able to sort it out.  If I can't I'll raise another question).

See last edit above.  Basically, Ubuntu needed to install some updates, and once this had happened, php 5.4 was in use.

Since you were using ubuntu, you could've just done an update using aptitude or apt-get. Eitherway, you need to update httpd.conf and make sure that  php5_module points to the place where your new php is.

LoadModule php5_module modules/libphp5.so

The reason why it still points to an older version of php might be due to your computer having multiple copies of php.


12.04 backlight issue for Acer Aspire 5734z-4725 running on usb flash drive I have followed the fix found here: Backlight can't be turn on in Acer Aspire 4736

However I can't use the sudo update-grub2 command as it errors with

/usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?)

As this laptop's hard drive is shot, I can't install the OS. So I'm using a live usb & I have been able to get it to temporarily work in Terminal with

sudo setpci -s 00:02.0 F4.B=00

I'm new to Ubuntu, so if you know how to fix this please provide as much detail to what I would need to do.

fist off buy a hard drive............

secondly i have the same issue with my emachines e525 ( acer )

heres what google magic found for me. i dont know if it works... it makes no sense to me but i thought id drop it here b4 i go try.

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

I wont be back so good luck lol


How to install gcc-4.8 I checked the gcc version on my system.

It is currently at 4.6.3.
I read that gcc-4.8 is out.

I tried the following commands without success:

sudo apt-get install gcc (gcc is already the newest version)
sudo apt-get install gcc-4.8 (unable to locate package)

Does anyone know how to install this package on 12.04?

Is GCC-4.8 available for 12.04 Precise now?

Update: As of 6/05/2013, there is currently a release of gcc 4.8.1 for 12.04(precise) available at https://launchpad.net/~ubuntu-toolchain-r/+archive/test.

The short answer is: gcc-4.8 is currently available for 12.04(Precise) via the toolchain PPA or by compiling the source(see below for details).

Release Announcement

The announcement for the release of gcc-4.8 was made on March 22nd, so you probably won't be seeing this in an official repository just yet.

However, it appears that Launchpad does have a PPA available for the toolchain test builds that does include gcc-4.8, here: https://launchpad.net/~ubuntu-toolchain-r/+archive/test

According to the changelog and package list, there are debs for i386, amd64, arm, and powerpc and were built against raring 13.04.

The latest available version of gcc, for 12.04, is 4.8.1 and is available in the toolchain PPA.

Adding the toolchain/test PPA:

To add the PPA to your system, open a terminal(Ctrl+Alt+t) and run the following commands:

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.8
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50

You will also be prompted to install a number of suggested packages.
These packages are recommended, but optional, for the installation of gcc-4.8.

What are PPAs and how do I use them?
Are PPA's safe to add to my system and what are some "red flags" to watch out for?

What C++ features are available in gcc-4.8 that are not available in gcc-4.7.2?

According to GNU.ORG, gcc-4.7, supports a number of C++11 features.
As of the gcc-4.8 release, gcc-4.7 does not support 8 out of 64 features  (See C++0x/C++11 Support in GCC)
These features are:

Language Features
- Rvalue references for *this
- Generalized attributes
- Alignment support
- Inheriting constructors
Concurreny
- Bidirectional Fences
- Memory model
- Abandoning a process and at_quick_exit
- Thread-local storage

For a full list of changes in gcc-4.8, see the Changelist

I need these gcc features on 12.04 Precise, now. How can I get them?

Building GCC-4.8 from source:

If you need gcc-4.8 on 12.04 now, your only option is to build it from source.

Please read the GCC installation FAQ prior to installation.

You can download gcc-4.8 from one of gnu.org's mirror sites or directly from their SVN server.

Here is an example of steps to compile from source (see here for additional details.) Note that these may vary depending on your system and preferences.

Download the source code

Make a build directory ( mkdir gcc-build && cd gcc-build)
Download the source file: wget http://www.netgull.com/gcc/releases/gcc-4.8.0/gcc-4.8.0.tar.bz2 (adjust this command to use an appropriate mirror site.
Unzip the file (tar -xvjf <file name>)

Install some additional libraries (sudo apt-get install libgmp-dev libmpfr-dev libmpc-dev libc6-dev)
Compile the source: ./gcc-4.8.0/configure --prefix=/app/gcc/4.8.0
Run make (This will take some time to complete. Go make some coffee, or bake some cookies. ;-))
Install the code: sudo make install

Once this process has completed, run the command gcc --version to verify that the installation has completed successfully. You should see something similar to the following output:

maggotbrain@foucault:~$ gcc --version
gcc (Linaro 4.8.0) 4.8.0
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

The bottom line: Thank all those folks who provide easy to install Ubuntu backports for you. Give them some of the cookies that you baked while running make. ;-)

So answer above works, at least for manual install. Though even after sudo make install, running gcc still just runs the stock version 4.6.3. Even trying gcc-4.8 or gcc-4.8.0 doesn't work. Running /app/gcc/4.8.0/bin/gcc appears to be the only thing that works for me. I mean it is kind of lame but at least it works.


Deleted entire harddisk. Now my laptop won't boot anything and stuck at grub rescue! My laptop is Dell Inspiron N4030. I used to use Ubuntu 12.04 and it was on the entire hard drive. I tried to install windows 7 but my laptop couldn't install it. So, I decided to delete the entire hard drive and do a fresh install of Windows 7. But after deletion I immediately removed the gparted live usb which I was using to delete the partitions of my hard drive. And then tried booting from windows 7 cd, didn't work, tried ubuntu live cd, didn't work, tried hiren's boot cd, didn't work, tried super grub disk, didn't work. Probably I'm not doing it right. Help needed badly.

If you are getting an error when trying to boot from the Ubuntu Live CD, it might be corrupted. You should create an Ubuntu Live USB, or another Live CD, and boot from that.

You can try installing fresh copy of the Ubuntu through network. Try configuring one system as server and then override your system to install a fresh copy. This can do the trick.


How do I erase all data on ubuntu 14.04? I have had countless problems since I let one of my friends borrow my PC and I had forgotten to create a backup. Now I want to start a new but I'm missing an USB key to make a bootable one and it is kind of a pressing matter.

So how could i make my Ubuntu look like one that has never been touched before?

Your options are really discussed here:
https://help.ubuntu.com/community/Installation

You could do network, you could repartition your disk and install to the new disk from your current installation, the mininal install is only 40Mb if you have something which could hold that much.


Write a shell script which will move all files in the current directory containing the word "hello" into a separate folder called "hello-world" Write a shell script which will move all files in the current directory containing the word hello into a separate folder called hello-world.

The current directory contains files a b c d e and f out of which files a, c and f contain the word hello.

How can I search for the word hello in files of the current directory and move the files satisfying the condition into another directory hello-world?

Let's break this down into smaller tasks. We need to

create a directory hello-world, if it doesn't exist
reliably identify files that contain the text hello
reliably move the files to the new directory.

Making a directory is done with mkdir. It will always refuse to create a directory that exists (thereby refusing to overwrite such directories) but it also has a flag -p which, as mentioned in man mkdir

-p, --parents
       no error if existing, make parent directories as needed

doesn't bother to tell you if the directory you are trying to create already exists.

So the first command of our script could be (check you are in the right directory first).

mkdir -p hello-world

The second step is identifying the files we want. The most obvious command to search for text in files is grep. If we wanted only the filenames of the files that contain hello, we can use the -l flag, which, according to man grep

-l, --files-with-matches
       Suppress  normal output; instead print the name of each input file
       from which output would normally have been printed.  The scanning
       will stop on the first match.

suppresses the normal output. But, although we can get away with it for your example, we really don't want the filenames as output, because the output of a command is just text, and filenames might contain all sorts of characters (from the humble space to the exotic newline) that will cause the shell to see something different from the actual name of the file you want to do something to, and behave in a way you didn't want. For example, having set up a test directory for your script, if I add a file that has a space in its name, see what happens:

$ echo hello > with\ space
$ ls
a  b  c  d  e  f  with space
$ for i in $(grep -l hello *); do echo "$i"; done
a
c
f
with
space

The file with space is treated as two separate files.

To identify files in order to have the shell do something with them, we should avoid parsing filenames. We could test each file, see whether it contains the text, and if it does, move it. To loop over files, as shown above, we can use for which has syntax like this:

for var in things; do stuff $var; done

Inside a for loop (and anywhere else too) we can use the test command, which sometimes looks like [ and is also like [[ to make conditional statements, and if you only wanted to check whether the file was empty or not, or was of a particular type, I would advise you to use the test command.

But you want to find some particular text, so we ought to call grep, but we only really want to know if looking for hello in the file succeeded, so we know that we then have to do something with the file.

To make a conditional statement based on the success of a command, we can use if. if is often used with test/[/[[, but you don't need those, because grep has another useful flag:

-q, --quiet, --silent
       Quiet; do not write anything to standard output. Exit immediately
       with zero status if any match is found, even if an error  was detected.

Zero in Bash means success. So to do what we want, we could write something like

if grep -q hello file; then mv file hello-world; fi

(the fi is part of the if command's syntax. It tells the shell you've finished your if)

I usually write shell scripts in an interactive shell and only scriptify them into a file later if at all, because I'm lazy and I mostly only write very trivial scripts. Anyway, you can write a short script as a one-line command by separating commands with ;. If something goes wrong, hit the up arrow key to edit the last command...

We don't want to run that command once for each file. That would defeat the object of writing a script to do the job and save us typing, so to loop over the files we can use for. To avoid getting an error from grep about the hello-world directory, we can add another flag to exclude it.

Here's my test command to do this job and the output I get from it in my test environment:

$ mkdir -p hello-world; for file in *; do if grep -q --exclude-dir=hello-world -- hello "$file"; then echo mv -v -- "$file" hello-world; fi; done
mv -v -- a hello-world
mv -v -- c hello-world
mv -v -- f hello-world
mv -v -- with space hello-world

This script doesn't move any files, because of echo before mv which shows what command will be run with each iteration of the loop. Remove echo after testing if the commands look right (note that you can't always reliably use echo for testing, and you might have to introduce some temporary quoting to do so, but it works fine here).

* is all non-hidden files in the current directory. It is safer to use ./* which means the same thing, but ensures all paths start with ./ (which is the address of the current working directory .), preventing filenames starting with - being interpreted as options. We have dealt with that possibility by adding -- to grep and to the mv command to indicate the end of options. -v is mv's verbose flag.

We should quote variables to suppress shell expansions. If I remove the quotes around "$file", my output is

mv -v -- a hello-world
mv -v -- c hello-world
mv -v -- f hello-world
grep: with: No such file or directory
grep: space: No such file or directory

Here's the script as a script:

#!/bin/bash

mkdir -p hello-world
for file in *; do
    if grep -q --exclude-dir=hello-world -- hello "$file"; then
        echo mv -v -- "$file" hello-world
    fi
done

Don't forget to remove echo when you're ready to move the files for real.

PS, there might well be more efficient ways to do this. My way is just an example.

From a bash script named test.sh

#!/bin/sh
IFS=$'\n'
for i in $( grep -l hello --exclude=*.sh --exclude-dir=hello-world * ); do mv $i hello-world/; done;

From command line:

IFS=$'\n' && for i in $( grep -l hello --exclude-dir=hello-world * ); do mv $i hello-world/; done;

Hopes it helps you...

Please consider to create first directory hello-world.


OS X Keyboard Layout in Unity or Ubuntu I want to use ALL of the mac keyboard shortcuts for everything in Unity.

Example: Copy (CMD+C), Paste (CMD+P), etc.

I have not found a way to do this where CMD is the modifier key instead of CTRL, whilst CTRL still acts "normal" in terminal (say quitting a process with CTRL+C).

Any ideas?

Macintosh keyboard layouts are available on Ubuntu. Go to System Settings > Keyboard Layouts.

In this window, you can manage your keyboard layouts, i.e. you can add Macintosh layouts and set them by default. ;-)


Unable to install Ubuntu on MSI GT60 So I recently bought a MSI GT60  laptop with W8 preinstalled and I want to dual boot with Ubuntu.

I've been trying to make a live USB for 13.04 and I have not yet been able to boot into live or install.

I've used different methods to create the bootable USB:

Tried with UNetbootin (from W7)
Tried with YUMI (from W7)
Tried with Startup Disk Creator (from Ubuntu)

All three methods were able to boot on my work laptop (Dell precision m4600) but none worked on the MSI.

The MSI laptop boots from USB and shows the EFI boot menu it doesn't matter which option I choose, the screen will go black and nothing will happen after that.

If I boot with the same USB on my work laptop, after booting from USB it goes right to a Ubuntu-like environment and shows me two options, to install or to try Ubuntu and works as it should.

Has anyone been on the same situation? Any advice?

As far as I can tell I think of some bios/configuration (EFI?) incompatibility.

Sata configuration is set as AHCI. I have W8 installed, a second HDD and no other partitions.

I had the same issue on my GT 60 20C and was able to get it to work after a little bit of work.

First, I created a bootable USB disk with the 13.1 installation. I was experiencing the black screen issue after the first purple screen from the bootable USB disk. To avoid that issue, press CTRL right when the screen first shows up. You should see the language selection screen and right after, mode options. Before installing, press F6 and select

nomodeset

This step is very important, the installation will not continue unless that step is executed. After the installation is complete, boot up again with with the USB disk. Select the "nomodeset" option again but this time boot up the live installation (Try Ubuntu...)

Download boot-repair utility. I was not able to follow the steps from the Ubuntu webpage (something broken about apt). I installed all the debian packages manually from the sourceforge website.

There, make sure that GRUB is on your Ubuntu partition and as an advanced option set as a kernel parameter "nomodeset"

Reboot your computer and now you should be good to go.

I had the same problem (black screen, MSI GT60) , but for me the solution was easy.
I had to turn ON SecureBoot, and it worked directly (i tried everything else without success before that). Can't explain why ...


Force update from unsigned repository I'm using an unsigned repo in Ubuntu 16.04 from Debian multimedia:

deb http://www.deb-multimedia.org jessie main

To install deb-multimedia-keyring, I'm running:

apt-get update && apt-get install deb-multimedia-keyring -y

This gives an error:

W: GPG error: http://www.deb-multimedia.org jessie InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5C808C2B65558117
E: The repository 'http://www.deb-multimedia.org jessie InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

You can set options in your sources.list (located at /etc/apt/sources.list):

deb [trusted=yes] http://www.deb-multimedia.org jessie main

The trusted option is what turns off the GPG check. See man 5 sources.list for details.

You can either edit the file within the terminal with vim ( or whatever you prefer) or any non-terminal editor like gedit.

This is kind of late to the table, but I only ran into this yesterday. Upon installing from the .iso for 18.04 LTS, obtained from ubuntu.com, I encountered this issue and also, ifconfig and other network tools were not installed. Wifi did not work.

This was on a Lenovo X140e laptop, the kind that is preloaded with Windows and given to someone who completes a computer course.

I reinstalled a few times without better results, perhaps because the definition of insanity applies. I then put 16.04 LTS on a stick and installed that. I had to fool around with BIOS settings to install. Interestingly, network apps were installed and wifi found connections. I got the same message (repository is unsigned, etc.) at first from Software Updater, but then it told me there was a new release and asked me, did I want it.

I gave it a try and now everything works in 18.04. Make of that what you will. I would like to add that none of the other answers on this page worked. That is why I contribute this "solution."


Is there any good software for Linux for FM radio listening? I have a Asus tv card containing of Philips chip set. I'm using this card with Cyberlink Power Cinema in windows OS.

Is there any good soft ware for Linux similar to the Cyberlink Power Cinema? I'm only using this card for listen to the FM radio.So any good radio card handling software ?

Rhythmbox has an FM Radio plugin that lets you configure radio stations and tune in to them the same way you'd pick other media.  You can enable it from Edit -> Plugins, and then add new presets with Music -> New FM Radio Station.

It depends on proper video4linux drivers for the tuner hardware, and expects that the card will handle getting audio to the speakers.  I've used it successfully with a tuner that connected through to the line in jack of the sound card.  It was necessary to turn on unmute that input with alsamixer -c0 so that the audio passed through to the speakers, but other than that it worked fine.

If your tuner card handles audio in some other way (e.g. it doesn't have a direct connection to the sound card, and instead shows up as a separate sound device), it might not work out of the box though.

# fmradio.sh
# para no confundir con el paquete radio, y modificar estaciones.

: ${DIALOG=dialog}
: ${DIALOG_SINTONIZAR=0}
: ${DIALOG_APAGAR=1}
: ${DIALOG_HELP=2}
: ${DIALOG_EXTRA=3}
: ${DIALOG_ITEM_HELP=4}
: ${DIALOG_ESC=255}

tempfile=`tempfile 2>/dev/null` || tempfile=/tmp/test$$
trap "rm -f $tempfile" 0 1 2 5 15

$DIALOG --clear --title "SINTONIZADOR DE RADIO FM PERONISTA" "$@" \
        --menu "Elija una emisora:" 20 50 17 \
        "1" "87.9 Radio UBA" \
        "2" "88.3 FM Latinos" \
        "3" "88.5" \
        "4" "89.1 FM Malena" \
        "5"  "89.3 Radio Gráfica" \
        "6"  "89.6" \
        "7"  "89.9 Radio con Vos" \
        "8"  "90.3 FM Delta" \
        "9"  "91.1 Radio Si" \
        "10"  "91.5 Radio Sol" \
        "11"  "92.1 Radio Red" \
        "12"  "92.6" \
        "13"  "92.9" \
        "14" "93.3 FM BitBox" \
        "15" "93.7" \
        "16" "93.9 Radio Palermo" \
        "17" "94.3 Radio Disney" \
        "18" "95.1 Metro" \
        "19" "95.5 FM Concepto" \
        "20" "95.9 FM Rock & Pop" \
        "21" "96.3 Radio Ciudades" \
        "22" "96.7 Nacional Clásica" \
        "23" "97.1 Radio Provincia" \
        "24" "97.5 Vale FM" \
        "25" "97.8 Retro FM" \
        "26" "98.3 Mega FM" \
        "27" "98.7 Nacional Folklórica" \
        "28" "99.1 Cadena 3" \
        "29" "99.9 La Cien" \
        "30" "100.3 La Colifata" \
        "31" "100.7 Radio Blue" \
        "32" "101.1 Radio Latina FM" \
        "33" "101.5 Radio POP" \
        "34" "102.3 FM Aspen" \
        "35" "103.6" \
        "36" "103.7" \
        "37" "103.8 FM OndaSur" \
        "38" "104.3 RQP LRL322" \
        "39" "105.5 FM Hit" \
    "40" "106.2" \
        "41" "106.7 FM Millenium" \
    "42" "107.5" 2> $tempfile

retval=$?

case $retval in
$DIALOG_SINTONIZAR)
clear

echo Sintonizando la emisora elegida...
echo De no reproducir active el canal Loopback en Alsamixer
echo y elija otra emisora o seleccione Cancel para detener la radio.

case `cat $tempfile` in
1) station='87.90';;
2) station='88.30';;
3) station='88.50';;
4) station='89.10';;
5) station='89.30';;
6) station='89.60';;
7) station='89.90';;
8) station='90.30';;
9) station='91.10';;
10) station='91.50';;
11) station='92.10';;
12) station='92.60';;
13) station='92.90';;
14) station='93.30';;
15) station='93.70';;
16) station='93.90';;
17) station='94.30';;
18) station='95.10';;
19) station='95.50';;
20) station='95.90';;
21) station='96.30';;
22) station='96.70';;
23) station='97.10';;
24) station='97.50';;
25) station='97.80';;
26) station='98.30';;
27) station='98.70';;
28) station='99.10';;
29) station='99.90';;
30) station='100.30';;
31) station='100.70';;
32) station='101.10';;
33) station='101.50';;
34) station='102.30';;
35) station='103.60';;
36) station='103.70';;
37) station='103.80';;
38) station='104.30';;
39) station='105.50';;
40) station='106.20';;
41) station='106.70';;
42) station='107.20'
esac
;;

$DIALOG_APAGAR)
     fm off
amixer set 'Loopback Mixing' Disabled
     clear
echo Cerrando Perón Radio y reproducción detenida.
     exit 0;;

esac

fm on
amixer set 'Loopback Mixing' Enabled >/dev/null
exec >/dev/null 2>&1
fm $station &!
exec >/dev/tty

exec pradio.sh
clear


How to restart the networking service? I tried to use

sudo service networking restart

and

sudo /etc/init.d/network restart

but they both crash the window manager and I can no longer use my keyboard for input into X.

when I use the /etc/init.d/ method it complains saying that I should use the service utility

e.g. service networking restart

but it crashes just the same.

Is there a GUI method of restarting networking?

For Desktops

Try

sudo service network-manager restart

instead.

Ubuntu uses network-manager instead of the traditional Linux networking model. so you should restart the network-manager service instead of the network service. Or use ifup/down.

For Servers

Check this answer.

An alternative approach for the server (as of Ubuntu 18.04):

Install ifupdown2 package :
apt install ifupdown2
Use service networking restart command


How does Ubuntu One perform when renaming folders? I have a (somewhat) large collection of media files on Ubuntu One which I need to reorganise (locally) by changing folder names, etc.

In this situation (say a folder "photos A B" renamed to "photos_a_b"), how does Ubuntu One behave?

Does it re-upload all the files?

Thanks!

Renaming just renames the folder. No re-upload. Otherwise, it'd be really crappy and it isn't. :)

It is not possible to rename folders on the Ubuntu One site. I have just tried it. So, my answer is that Ubuntu One will see the renamed folders as new folders and upload the folder and its contents on to the Ubuntu One server.

Regards.


How to remove .local suffix from Ubuntu hostname? When I try to connect to my Ubuntu device with the ssh terminal command, I have to add .local suffix to Ubuntu hostname. For example, if I want to ssh to my device with its hostname, my ssh command must have the .local suffix and command has the following format:

ssh username@device_hostname.local

I'm aware that the .local suffix was appended by avahi (zeroconf) Linux service, but is there any quick (easy) way to bypass it? I want to be able to "ssh" my device only by its hostname without .local suffix at the end of the command, like this:

ssh username@device_hostname

What exactly I want to achieve is to completely remove the .local suffix from host name. I've read about running my private DNS server, but I would like to know if there is a less complex solution.

Your clients will need at least one way to resolve the hostname to an IP address. The mechanism you already discovered works through automatic configuration and happens within the .local domain name.

You could define the mapping from hostname to IP addresses on every client, but this is not recommended practice.

You will have to go through some kind of automatic name resolution mechanism, all of which require use of some kind of domain name in the background.

However, you can easily get rid of having to type the domain name each time by doing one of:

ssh hostname canonicalisation

If you put the following into /etc/ssh_config or ~/.ssh/config:

Host *
  CanonicalDomains local
  CanonicalizeHostname yes

ssh will automatically append local to any hostname. So when you type ssh host it will actually do ssh host.local.

search domains

While the above will work only for ssh, you can also configure a similar thing for all network connections by configuring the dns resolver on your client accordingly. It is the "classical" way of having hostname shortcuts.

Depending on which setup you have, you would add local to the list of search domains. This is what I do. There should be plenty description for this available, like this.

hardcoding to /etc/hosts

This is not recommended at all, because although it seems simple in the beginning, it will become hard to maintain soon. But it is the only way known to me that allows to completely get rid of domain names.

Edit the file /etc/hosts and add lines like this:

192.168.1.3 host3
192.168.1.4 host4

While the first word in each line is the IP address of the corresponding host. You have to do that on every client. After that you can use ssh host3, and not even in the background a domain name will be used.

In /etc/hostname is the name you want to update. For example mydomiain.com and I'm assuming you have root access.  The command hostname can also be used.  So you'll need to update the file with vi.  Whatever is in line 1 needs to be updated with your domain name. Pretty simple.


How can I upgrade to Firefox 34.0.5 on Ubuntu 14.04? I have Firefox 34.0 installed on a system running Ubuntu 14.04 (Trusty).  Many websites want to inform me that my browser is outdated, as apparently 34.0.5 has some significant security updates.  Other major websites inform me that 34.0.5 should be available in the Ubuntu repositories as of about 4-Dec, but as of this date (21-Dec) even packages.ubuntu.com shows only 34.0, not 34.0.5.

I'm reluctant to download an offline installer for 34.0.5 because I don't want to screw up my system by having two separate versions installed in two separate directories.

I guess my question is: is there any good reason why 34.0.5 wouldn't be available from the standard Ubuntu repositories despite having been out for several weeks now?

Apparently, Firefox 34.0.5 is the version that switched US users from Google to Yahoo search. (source here)

Firefox in Ubuntu and derivatives is unaffected, but if you wish to switch the default search engine to something else, just change it in the search bar.

PS: I can also confirm that Firefox 34 is not "upgradeable" to 34.0.5 on Windows, ...probably because I am not in the US.

Currently, the best method seems to be downloading manually. On a 64-bit system:

wget ftp.mozilla.org/pub/mozilla.org/firefox/releases/34.0.5/linux-x86_64/en-US/firefox-34.0.5.tar.bz2
tar -xjvf firefox-34.0.5.tar.bz2
sudo mv firefox /opt/firefox34.0.5
sudo ln -sf /opt/firefox34.0.5/firefox /usr/bin/firefox

This will only overwrite the symbolic link in /usr/bin, so there should be no conflict between the two installations. You can restore the link and use the old version with the following command:

sudo ln -sf /usr/lib/firefox/firefox /usr/bin/firefox

Or just run 34.0.5 without linking:

/opt/firefox34.0.5/firefox


Set up of 'sendmail' headers for cron jobs (crontab-user@mydomain.xyz) I use Ubuntu 14 on AWS EC2.
I have a non-root user crontab. Upon cron job completion, an email is to MAILTO address, as set in crontab. The email sender looks like this:
root@ip-111-11-0-11.us-east-1.compute.internal

How can I change the "from" email to either:

crontab-username@my-domain.com or
do-not-reply@my-domain.com ?

EDIT-1:
Following contributed comments, I executed telnet localhost 25 in terminal and got back:

220 ip-111-11-0-11.us-east-1.compute.internal ESMTP Sendmail 8.14.4/8.14.4/Debian-4.1ubuntu1
Tue, 5 Jul 2016 13:38:31 GMT
(No UCE/UBE) logging access from: localhost(OK)-localhost [127.0.0.1]

So my MTA is sendmail, and my question becomes:

How do I configure sendmail so my cron jobs' email headers are as above ?

man 5 crontab will solve your problem. It says, in part:

An  active line in a crontab will be either an environment setting or a
   cron command.  An environment setting is of the form,

       name = value

   where the spaces around  the  equal-sign  (=)  are  optional,  and  any
   subsequent  non-leading  spaces  in  value  will  be  part of the value
   assigned to name.  The value string may be placed in quotes (single  or
   double, but matching) to preserve leading or trailing blanks.

   Several   environment   variables  are  set  up  automatically  by  the
   bcron-exec(8) program.  SHELL is set to /bin/sh, and LOGNAME, USER, and
   HOME are set from the /etc/passwd line of the crontab's owner.

   In  addition to LOGNAME, USER, HOME, and SHELL, bcron-exec(8) will look
   at MAILTO if it has any reason to send mail  as  a  result  of  running
   commands  in  ``this''  crontab.  If MAILTO is defined (and non-empty),
   mail is sent to the user so named.  If  MAILTO  is  defined  but  empty
   (MAILTO=""), no mail will be sent.  Otherwise mail is sent to the owner
   of the crontab.  This option is  useful  if  you  decide  on  /bin/mail
   instead  of  /usr/lib/sendmail  as your mailer when you install cron --
   /bin/mail doesn't do aliasing, and UUCP usually doesn't read its mail.


How to run a cron job using the sudo command Is it possible to run a cron job which needs the sudo command?

Like:

 sudo rm somefile

I won't get into how much this is a bad idea; simply put, running sudoin crontab requires your password to be stored somewhere in plaintext.

It's a bad idea.

The following is the preferred method of running administrative tasks through cron. Since you don't really need to write sudo in the crontab, if you are modifying root's crontab.

Use root's crontab

Run the following command:

sudo crontab -e

This opens up root's crontab. sudo is not necessary to run your command in this context, since it'll be invoked as root anyway.

Therefore, you would simply append the following to root's crontab.

@hourly rm somefile

Now, if you absolutely want to be unsafe and take risks with your password, the following will run your command from your own crontab, and enter your password automatically when prompted by sudo.

Again, this is not recommended.

In your own crontab, write your command like so:

@hourly echo "password" | sudo -S rm somefile

The obvious disadvantage here is that, should anyone ever access your crontab, your password will be readable in plaintext.

You shouldn't do this.

Run following command in terminal

sudo visudo

Added the following line to the end of the file:

vidyadhar  ALL= NOPASSWD: /bin/rm

In the above example vidyadhar is the username and it will not ask for password if you are running rm command through vidyadhar.


How do i move past a stuck PAM configuration on Ubuntu-pushed update? i am on Ubuntu 13.10 (probably have been upgrading since Ubuntu 10).  On a routine suggested update of a bunch of things including libkleo4, libkpgp4, libmessagecore4, girl.2-gudev1.0, kde-config-primactivity, konsolekalendar, etc. it sets up libsystemd-daemon0:amd64, systemd-services, and then starts on libpam-systemd:amd64 (204-0ubuntu19.1)— and that's where we get stuck.

The Debconf window opens for PAM configuration and says:

  No PAM profiles have been selected for use on this system. This would grant all users access without authenticating, and is not allowed. Please select at least one PAM profile from the available list.

The problem is, no matter what i check (or don't check) from the list below and press forward, it doesn't move forward.

The options to check are "Unix authentication", "Winbind NT/Active Directory authentication", "Register user sessions in the systemd control group hierarchy", "GNOME Keyring Daemon - Login keyring management", "ConsoleKit Session Management", and "Inheritable Capabilities Management".

I don't know if i use or need PAM anything, but i would like to be able to complete recommended updates!

This is the second time an update has frozen here.  Advice?

I used

sudo dpkg --configure -a

then  a terminal option screen (similar to the pam-auth-update screen) opens and you can (un-) select  with the Space key and move with the Tab key.


How can I copy/paste files in the terminal window (SSH)? I am new to ubuntu and my friend told me to SSH into my IPod so i can put/remove songs on it.
I've been succesfully ssh'ing into it but i do not know how to copy and paste my songs from my Home Directory into my iPod. Any help would be greatly appreciated. I do know basic commands like ls, cd, pwd, etc. I do know the cp command but cannot utilize it.

Time to learn a new command!  :)

To learn more about it:

man scp

Secure Copy allows you to copy the contents of your friends directories to your local system.

So you mention you are comfortable with using SSH. Let say that your friends IP address is 192.168.1.100. and your username is joe.  The files on your friends computer are located in /share/music/.

  Open a terminal window using "Ctrl-Alt-T" or use the Dash Search Bar

Now to copy individual files issue the following:

scp joe@192.168.1.100:/share/music/filename1.mp3 .

What this says is, ssh into your friend's computer at 192.168.1.100 with the username joe and copy the mp3 file /share/music/filename1.mp3  to your local present working directory (note the period)

You can actually specify a location to save the mp3 other than your present working directory

scp joe@192.168.1.100:/share/music/filename1.mp3 /var/tmp

So in the example above, I'm saving the mp3 to /var/tmp

Just make sure that you have proper permissions to the directory your saving too.

Now, to save whole directories, you need to use the recursive flag -r

scp -r joe@192.168.1.100:/share/music/album1 /var/tmp/

So now all the mp3's in /share/music/album1 will save to /var/tmp/

Its easy. Suppose You need to move a file to secure directory. Use the following command after opening terminal (from the directory in which the file to moved is situated)--

my whole path was ziad@Cornelious:~/Work$ sudo mv master /var/www/html

In this case "master" folder was in "Work" directory/folder.
Use the following command--

sudo mv master /var/www/html

here i moved master folder to html folder which is a secure folder.


Why does installing gnome shell extensions from extensions.gnome.org fail silently? On a fresh Ubuntu install (12.04, 64-bit), after installing gnome-shell, I've tried to install some extensions from extensions.gnome.org but got no result. I've tried with Firefox and Chromium and got the same issue.

Open any extension page on extensions.gnome.org.
Switch extension to "ON". Agree with confirmation about installation.
Nothing happens and nothing has been installed (.local/share/gnome-shell/extensions is empty).

I've checked .xsession-errors, Firefox's javascript console, gnome-shell console errors (Alt-F2 + looking glass). There isn't any trace of any error.

I had a similar problem myself and I tried resetting GNOME settings and it worked for me. After resetting GNOME settings, try logging out and back in (and to be safe, try rebooting as well) and now, you should hopefully be able to install the GNOME extensions.

How do I reset GNOME to the defaults?

Try the browsers Firefox and Epiphany. Don't close the tab immediately after accepting the extension installation, especially when you have a slow internet connection.


Weird partial screen flickering after upgrade to 14.04 I have been bothered by this issue for few weeks already. The problem started when I upgraded to 14.04. Parts of my screen are sometimes flickering like shown on 2 videos that links I attach below:

https://www.youtube.com/watch?v=FAg2uGABXQo

https://www.youtube.com/watch?v=ANgAl28P-YE

I was trying to record it with VLC but suddenly when I start recording then ... it stops flickering :)

I have no idea where can I file a bug for this and which package it may be connected with. Please comment with what it may be connected with and how can I resolve this.

I will post any relevant information regarding the packages if need be.

I use nvidia-334 from xorg edgers package ( 334.21-0ubuntu1~xedgers14.04.1 ) but I have also tried others and it's the same issue.

This worked for me: http://ubuntuforums.org/showthread.php?t=2243912

Enable Force full screen redraws on repaint option in Workarounds

I had random flickering similar to this (eg. part of webpage flickered in Firefox (hardware acceleration = on), or desktop icon flickered when deselecting it) and this seemed to fixed this issue.

I'm using Nvidia drivers 340.58, Lenovo Y500 GT 750m (single, no optimus, IntelHD disabled).

I had a very similar issue with 2 GTX 680s in SLI and latest NVIDIA drivers on a fresh ubuntu install in RAID-0. I remembered before Nvidia drivers the screen was very solid and stable with nouveau drivers.

But after Nvidia drivers things happen to mess up.. and screen started to flicker. I remembered selecting a step in Nvidia installer to let the installer generate xorgs.conf file.

I renamed the xorg.conf to xorg.conf.bad-nvidia now things are up and beautiful. Just you dont need that xorgs.conf created by screwed up nvidia installers.


Cannot play avi or mp4 file in both Movie Player and VLC I downloaded some videos (both mp4 and avi) and I am unable to play them both in Movie Player and VLC.

In Movie Player, it displays error message saying "Could not determine type of stream".

When I see the properties of those video files, there is no information on 'Audio/Video' tab. There should be information about audio and video codec, bitrate, etc.

Are these videos corrupt? Or, am I missing some codecs?

My solution was to go to Tools > Preferences in VLC and, in the Video tab:

Check the box for Enable video (if it's unchecked).
Check the box for Window decorations (if it's unchecked).
Set the Output drop-down menu to X11 video output (XCB).

Then Save your changes. That may fix the problem.

uninstalling VLC with softwaremanager and then reinstall it from getdeb.net. It works fine now on .mov and .mp4 and the .avi etc. files


WiFi Hotspot not working with mobile devices on Ubuntu WiFi hotspot not working with windows phone 8 and of course its not working with a any other phones as well.
I have tried both Android and Windows phone 8. Either of these devices doesn't even detect Ubuntu's hotspot as I have tried many possible ways..

Link I referred to: How to Turn Your Ubuntu Laptop into a Wireless Access Point

From ap-hotspot on github:

  While it may still work, AP-Hotspot is abandoned. and so on

Solution that worked for me:

http://ubuntuhandbook.org/index.php/2014/09/3-ways-create-wifi-hotspot-ubuntu/

i am using ap-hotspot on ubuntu 13.10, it works like charm on my lumia 620. you could give it a try.


how to avoid manually updating grub I have dual boot system with Ubuntu 11.10 (installed first) and Fedora 16. I have actually two problems.

how to avoid manually running update-grub after a Fedora kernel update?
after running update-grub, the kernel parameters passed by fedora are missing the grub conf file in ubuntu.

Please let me know if there is a solution.

Thanks.

On the topic of adding the Fedora entry to the generated
Ubuntu menu list, 40_custom should look something like this.

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

# Boot Fedora's grub from partition
menuentry 'Fedora OS'
    recordfail
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos2)'
    kernel /boot/grub/core.img

Then run update-grub, if that doesn't end up working for you change the line
that says kernel and change it to linux.

It sounds like your dual-boot config is "sub-optimal", that you may be sharing
/boot between Fedora and Ubuntu and are using one grub (Ubuntu's) to maintain
two lists of installed kernels. They will never be in sync.

If you want your dual boot to be more manageable, I would recommend re-installing
grub on Fedora to install to a "partition" (e.g. separate /boot partitions) and not the MBR, then from Ubuntu who is the primary bootloader (in MBR) will "just boot Fedora" and it's kernel config/grub will take care of itself.

If you're trying to use a Fedora kernel on Ubuntu, which is
no different than installing a custom kernel from scratch, is highly discouraged.

Now I haven't done this in a while so you might have some tinkering to do.
To accomplish grub move, from Fedora you have to run 'grub-install /dev/sdX' where X is the partition that contains /boot for the Fedora kernel. If this is co-resident with the Ubuntu /boot then you'll have to move it and create a new one.

Then from Ubuntu, edit /etc/grub.d/40_custom and add something like this.

# Boot Fedora's grub from partition
title Fedora OS
root (hd0,2)
kernel /boot/grub/core.img

That (hd0,2) assumes your Fedora /boot is on sda2, adjust that according to your installation.

Run update-grub and it should "just work". Now that Ubuntu's grub simply has a pointer to Fedora's grub, whenever Fedora upgrades the kernel, it can do so without being thwarted by the Ubuntu, which maintains the grub menu list. Each OS will maintain it's own grub and they'll live happily ever after. You should never have to run update-grub again from Ubuntu to reflect kernel updates in Fedora.


Command to open new tab in the current terminal Is it possible to open a new tab in the current terminal with some commands?

If you just want to open a new tab

To open a new tab in the current opened terminal you can press SHIFT+CTRL+T.
Alternatively, use the top level menu, which shows the keyboard shortcut (see screenshot below)

If you want to do it from the command line

Install xdotool - a program that lets you simulate keyboard input (among other things).

sudo apt-get install xdotool

then type in the terminal:

xdotool key ctrl+shift+t

That will simulate pressing the key combination, and open the new tab in the terminal.

Open the terminal
maximize it (or just click the terminal window)
at top bar, click Terminal-->Preferences
under General option, switch Window to Tab
after that, whenever you want to open new terminal, RightClick in the terminal --> Open Terminal


How do I turn on workspaces? (Why do I only have one workspace?) It appears that Unity on Raring only comes with a single virtual desktop (aka workspaces) by default, and CCSM's Wall plugin has no way to add more. Is this configurable at all?

for 13.04 and later..

Workspaces are disabled by default in Ubuntu since 13.04. To enable them, open Appearance from the dash:

Switch to the behaviour tab and check "Enable Workspaces".

If you want to hide the workspace switcher see this question.

Certainly,

first, open ccsm. If it's not installed, run: sudo apt-get install compizconfig-settings-manager

Next, you will find the setting in the General Options section, under the Desktop Size tab.

Here you will see options for your Horizontal Virtual Size and Vertical Virtual Size.

Increase the Horizontal Virtual Size to a value >1.

Use CTRL + ALT + right arrow to move one virtual desktop to the right and CTRL + ALT + left arrow to move one desktop to the left.


Ubuntu 15.04 - 15.10 Pepper Flash CPU overload (8 core maxed out !) Since 15.04 - 15.10 (both has the same issue) using Pepper Flash with Chrome or Firefox leads to CPU overload. Firefox is more problematic as it does not thread things, thus leading to very laggy computer.
Chrome handles it "better" by threading and I can at least watch a youtube video without it being too slow.
But in both cases this is not a good solution.

I wonder though if it is not H264 that is the problem. Indeed, when watching a Youtube video at 360p, the issue does not appear, only when looking at 720p or 1080p videos does this leads to a problem.

I could not find anything online about it.

My first guess would be:
1) PepperFlash issue
2) H264 library issue
3) Graphic card not taking up the stream to decode and Ubuntu sending it all to the CPUs (but a raspberry pi can decode 1080p vids ! I have an i7 O.o !)

Help !

This was linked to a problem I had with my RAM.

Solved here:
High CPU load, low core usage, (ECC) memory error in kernel


Neither Gimp not Inkscape see my printer; working fine from other applications I just reinstalled this Ubuntu 19.10 from scratch. All is well, including the Brother MFC-J895DW multifunction printer. But when I start either Gimp or Inkscape, they don't see that any printer is installed!

Other applications have no problem using that device; both printing and scanning works fine.

What can I do to fix this? Do some programs require additional stuff to be installed?

update:

The commend by @mook765 was spot on. Why on earth is printing disabled by default??! Not available for Inkscape though, so that's still broken. I guess I will have to remove that and install it manually ... I don't know anything about snaps but it doesn't look to be all that great?

Following the ideas in the linked question, I tried snap connect inkscape:cups-control but it responded error: snap "inkscape" has no plug named "cups-control" so that's also not how to get Inkscape to print.
lpstat -t gives me the following (which doesn't tell me anything useful):

  scheduler is running
  system default destination: Brother_MFC_J895DW
  device for Brother_MFC_J895DW: implicitclass://Brother_MFC_J895DW/
  Brother_MFC_J895DW accepting requests since lør 11 apr 2020 00:00:04 CEST
  printer Brother_MFC_J895DW is idle.  enabled since lør 11 apr 2020 00:00:04 CEST

Same problem. I opened software ( in Xubuntu should be similar in ubuntu)Clicked on Installed. Found Gimp, clicked to open. Clicked on permissions and moved tag to print. Same for inkscape.


How do I delete multiple lines in nano without affecting the clipboard? I can select all file by going to the 1st line Alt+\, start marking the text by Alt+A, go to the last line by Alt+/

But there, I don't know which key to remove the selected text. Hit delete doesn't work for me but Ctrl+K to cut the text will destroy my clipboard.

So, what is the hotkey to delete selected text?

nano of course can delete blocks, see this article

use CTRL+Shift+6 to mark the beginning of your block
move cursor with arrow keys to end of your block, the text will be highlighted.
use CTRL+K to cut/delete block.

To paste the block to another place, move cursor to the position and the use CTRL+U. You can paste the block as often as you want to.

As pointed out by @saagarjha around version 3.2 of nano they introduced a zap command which allows you to delete text without affecting the cutbuffer.

M-Del           Throw away the current line (or marked region)

To delete a line by itself use Alt+Delete with the cursor on the line you want to delete.
To delete a block of text, first set the starting mark with Alt+a and select the text to be deleted and finally press Alt+Delete.


Can't make cron open a Java program with a GUI I made a simple "journal" program that will open a GUI, prompt for an entry and a few factors, and print this information to a file under the current date. I've written a short bit of java code that does this when run, and I want to use cron to schedule it to run every day.

I also wrote a small script ("javashell.sh") to change to the directory where I have the java code, compile it, and run the java program. Its contents are this:

#!/bin/bash

cd /home/otolithic/Desktop/projects;
javac Journal.java;
java Journal;

(Its so short as to feel pointless but I thought it would be necessary to easily run the program from cron; I'm totally new to Linux so let me know if this is weird or not)

I put it in usr/local/bin so I can just type "javashell.sh" in the terminal and the journal app runs no problem. But when I try to make a cronjob out of this command, I can see in the logs that it's run but no GUI ever pops up to ask for a journal entry like it does when I just run javashell.sh outside of cron.

I've tried (after the minute/hour/etc.):

export DISPLAY=:0 && javashell.sh
DISPLAY=:0 javashell.sh
env DISPLAY=:0 javashell.sh
$DISPLAY=:0 && javashell.sh
cd ~/path/to/file && javac Journal.java && java Journal
env DISPLAY=:0 && cd ~/path/to/file && javac Journal.java && java Journal

to no effect.

I checked that my display is in fact :0 so the problem isn't that. So why isn't this working?

Edit: also tried env DISPLAY=:0 && cd /home/otolithic/Desktop/projects && javac Journal.java && java Journal

You cannot open a program on your display from cron. Any job you wish to run via cron must not require any services of a logged in user session, including a valid display to place GUI apps on.

The crontab may use a different user than you. When you say

 cd ~/path/to/file

you are directing the file from your own user directory by using ~. You should use the absolute path which is in your case:

cd /home/yourusername/path/to/file


Apache: access denied because search permissions are missing I know this question is asked a lot, but the solutions I saw didn't work for me.

I only have one virtual host enabled, and I'm trying to enable access to a folder that's not under the document root

ServerAdmin webmaster@localhost
DocumentRoot /var/www/html

Alias /movies /home/username/Videos/Movies

<Directory /home/username/Videos/Movies/>
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
</Directory>

I set /etc/apache2/envvars as follows

export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=public

I made sure that /home/username/Videos/ and its sub folders are owned by username:public, set the permissions to 777 (after 775 didn't work) and made sure that user www-data belongs to group public.

Now, when I browse to http://localhost/movies I get

[Mon Apr 21 11:28:14.971844 2014] [core:error] [pid 1385:tid 140067725104896] (13)Permission denied: [client 127.0.0.1:46603] AH00035: access to /movies/ denied (filesystem path '/home/username/Videos') because search permissions are missing on a component of the path

But when I set /etc/apache2/envvars to run Apache under username (my own username) everything works fine. The problem is permission related, but I don't see how in my case; especially when I set the permissions to 777. Any ideas?

P.S. Ubuntu version is 14.04, Apache is 2.4.7 and I didn't edit other configuration files.

Do a chmod +x on your user dir, and restart apache. 755 permissions should work. I've had problems with 644.

I was experiencing this issue when I was trying to run apache in a docker container on an Ubuntu 16.04 host that was using the 4.4 kernel instead of 4.10.

Once I ran this command on the host and re-deployed, I was fine:

sudo apt-get install --install-recommends linux-generic-hwe-16.04


How can I create a bootable USB stick for windows 8 on Ubuntu 14.10? How can I create a bootable USB Stick for windows 8 on Ubuntu 14.10?

I have tried using startup disk creator but it doesn't show windows os.

You can create a bootable usb stick of windows 8 using Winusb. It offers a simple GUI for creating the bootable usb stick.

sudo add-apt-repository ppa:colingille/freshlight
sudo sh -c "sed -i 's/utopic/saucy/g' /etc/apt/sources.list.d/colingille-freshlight-utopic.list"
sudo apt-get update
sudo apt-get install winusb


Installing Ubuntu 13.04 Desktop amd64 using bootable USB-stick failed I created a bootable USB-Stick using the Pendrive Universal USB Installer as suggested on the Ubuntu website, because I want to install Ubuntu 13.04 Desktob amd64. When I turned on my PC with the USB-stick inserted, it found it, but told me this:

SYSLINUX 4.06 EDD 2012-10-23 Copyright (C) 1994-2012 H: Peter Anvin et al
ERROR: No configuration file found
No DEFAULT or UI configuration directive found
boot:

My PC is an Acer Travelmate with 4 GB RAM and currently a 64bit System.

Does anyone have an idea what the problem is and what I can do to make it work? (I'm a total newcomer to Ubuntu)

Thanks!

I finally resolved the problem like this (but couldn't get my internet working rightaway, hence the late answer):

I formatted my USB-Stick to FAT32, then used unetbootin to create a bootable USB-Stick.
My computer detected it, there appeared a list with several options (Try Ubuntu; Install Ubuntu now; etc.) but the automatic boot failed, with the same error appearing as before:

Invalid or corrupt kernel image

boot:

I did it another time and instead of allowing it to boot automatically, I selected "Install Ubuntu now". This worked out fine and there was no complaint about an invalid or corrupt kernel image. (I don't understand totally what the kernel image is, but a friend, who has Ubuntu himself, told me, as long as Ubuntu works now, the error-message from before doesn't matter.)

Thanks for all the help!


Not able to execute a .sh file: /bin/bash^M: bad interpreter I wanted to execute a shell script:

-rwxr-x--x 1 root root   17234 Jun  6 18:31 create_mgw_3shelf_6xIPNI1P.sh

I tried to do a standard procedure, but I got this error:

./create_mgw_3shelf_6xIPNI1P.sh
localhost 389 -l /opt/fews/sessions/AMGWM19/log/2013-06-06-143637_CLA-0
DEBUG   cd/etc/opt/ldapfiles/ldif_in ;
./create_mgw_3shelf_6xIPNI1P.sh
localhost 389 -l /opt/fews/sessions/AMGWM19/log/2013-06-06-143637_CLA-0
**ERROR  sh: ./create_mgw_3shelf_6xIPNI1P.sh: /bin/bash^M: bad interpreter: No such file or directory**

What does it mean? I was doing this as the root user under the root group.

Does it mean that the file does not have the correct permission for the root user?

This isn't a permission issue, you aren't getting a message about permissions

/bin/bash^M: bad interpreter: No such file or directory

The script indicates that it must be executed by a shell located at /bin/bash^M. There is no such file: it's called /bin/bash.

The ^M is a carriage return character. Linux uses the line feed character to mark the end of a line, whereas Windows uses the two-character sequence CR LF. Your file has Windows line endings, which is confusing Linux.

Remove the spurious CR characters. You can do it with the following command:

sed -i -e 's/\r$//' create_mgw_3shelf_6xIPNI1P.sh

You can also use gedit to remove the unwanted characters.
Under the File menu select Save As and set the line end type unix/Linux.


unable to install anything via the terminal window on ubuntu 16.04 xenial xerus I installed Ubuntu 16.04 just a couple of weeks back. Recently I started seeing a red error button on my notification shade on the top right saying

  An error occurred, please run package manager from the right click menu or apt-get in a terminal to see what is wrong.

The error message was:

Error opening the cache (E: type sudo is not known on line 55 source
list/etc.apt/sources.list,E: The list of sources could not be read).
This usually means your installed packages have unmet dependencies

How can I solve this?

I tried the suggested commands "ls -l /usr/bin/sudo" ,"sudo apt-get install -f"
and "sudo dpkg --confiure -a" as suggested .So here is my terminal output to the commands in form of this terminal screenshot. Please check the attached screenshot and help me further.
terminal 1

I tried the following steps you have mentioned above but have found no luck with success on that.Still returns with the same line 55 error in the source.list .Here is an attached screenshot of the terminal window.Have a look at it -

error while installation via command window

Here is my sources.list attached please check it out

sources.list

Okay follow these steps to fix it:

On keyboard type Ctrl+Alt+t
In the terminal that opens type:

sudo apt-get update

Enter your password when asked, please note as you enter you won't see it in the terminal (that's the Linux way).
Now let it run till, after that type again in the terminal:

sudo apt-get upgrade

Repeat step 3

ALTERNATIVELY:

Click on dash or Super key (on your keyboard) and type terminal

Click on ther terminal application
In the terminal that opens type:

sudo apt-get update

Enter your password when asked, please note as you enter you won't see it in the terminal (that's the Linux way).
Now let it run till, after that type again in the terminal:

sudo apt-get upgrade

Repeat step 4

If the red icon remains just ignore till reboot or reboot.


How to uninstall ubuntu 12.10 and install 12.04? Possible Duplicate:
  How to roll back Ubuntu to a previous version?

I have a macbook pro and i have successfully installed windows 7 via bootcamp and then installed ubuntu 12.10 along side windows 7. It works fine... but for my school project i need to use ubuntu 12.04 - i know i should have known this from the start, would have made things easier :-/

Now my question is how to uninstall 12.10 and then reinstall 12.04? i think it wouldnt be a problem to install 12.04 but the question is more how to uninstall 12.10?

thank you.

Boot into windows 7 then go to control panel add/remove program and then check for ubuntu in the list if it is listed then do remove from it.
The simplest procedure would be to boot with the Live CD for 12.04LTS.

Install it on the current / partition by formatting it during installation. Select other partitions like home, swap etc. if applicable but do not format them.

When you reboot, Grub menu should indicate Ubuntu 12.04 LTS.


ubuntu server refused public-key signature despite accepting key - from putty I am a newbie in Ubuntu. I am securing server and did two things:

Setup ssh (public / private key using putty)
Allow Root Login to no

Now, I can't login with root password and I'm also getting error with private key. I am locked out. I read in some forums/answers, it could be issue related to permission.

My VPS is hosted on ovh.com and I can only do restart in recovery mode. Please help.

Setting PermitRootLogin no means that root user is not allowed to login regardless authentication method (this is a good practice).

You can weaken this hardening by setting prohibit-password, which will block only password authentications and you can still login with private key.

But still the best option is to log in with the non-root user and for privileged actions use sudo.

Regardless the options, you need physical access or console access to fix the things up (if you don't have other user to log in with).

You need to change ssh configuration  AllowRootLogin Parameter from No

to Yes.


how do I put Ubuntu onto my galaxy S5 Rooted? I'm looking for how you boot, or dual boot Ubuntu onto my galaxy s5. Or if I can? If so how?

Unity 8 as default GUI only in april/2016.

http://mhall119.com/2014/10/unity-8-desktop/

With that Canonical able to finally achieve your goal of having a converged operating system, ie, the same system interface (and code) will be used in both smartphones and tablets as on PCs.

You can try now for your own risk.


Assessment is "failing" under id 5, Reallocated Sector Count, whose value comes out to be 561 sectors I repeatedly receive a message from Disk Utility on screen, which says "A Hard Disk is reporting health problems."

On clicking the Examine button, I am taken towards a window,which says Disk failure is imminent

On viewing SMART Data and running self tests I was taken to new window which shows "564 bad sectors on top right hand corner, and also says that "back up all data and replace the disk"

I tried to various commands to run disk repairing wizard, but unfortunately every time, a pop up window with warning regarding bad health of drive appears and nothing happens.

System is core i3 with 2GB RAM and 320GB hard disk with following description,

on writing sudo fdisk -lu it prints

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000e4a21

Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048   104859647    52428800    7  HPFS/NTFS/exFAT
/dev/sda2       104859648   314574847   104857600    7  HPFS/NTFS/exFAT
/dev/sda3       314574848   551428095   118426624    7  HPFS/NTFS/exFAT
/dev/sda4       551430142   625141759    36855809    5  Extended
/dev/sda5       551430144   621228031    34898944   83  Linux
/dev/sda6       621230080   625141759     1955840   82  Linux swap / Solaris

on writing, root@ubuntu:~# sudo fsck -y /dev/sda5 I got:

fsck from util-linux 2.19.1
e2fsck 1.41.14 (22-Dec-2010)
/dev/sda5: clean, 137141/2182992 files, 708304/8724736 blocks

on writing, root@ubuntu:~# sudo fsck -pcfv /dev/sda5 I got:

fsck from util-linux 2.19.1
/dev/sda5: Updating bad block inode.

137141 inodes used (6.28%)
  18 non-contiguous files (0.0%)
 106 non-contiguous directories (0.1%)
     # of inodes with ind/dind/tind blocks: 0/0/0
     Extent depth histogram: 109527/3
708304 blocks used (8.12%)
   0 bad blocks
   1 large file

84575 regular files
13613 directories
  57 character device files
  25 block device files
   0 fifos
   0 links
38862 symbolic links (27519 fast symbolic links)
   0 sockets

137132 files

Thank you.

The head on the drive is probably going bad. Replace the drive.


Can I install software from debian package without internet This is a silly question but can you install software from debian packages without having an internet connection ?

Yes, it is possible. One of the methods is to use the command:
sudo dpkg -i filename.deb

You can also try to install the file via Ubuntu Software/Snap Store application by double clicking on it in file manager (although this usually didn't work for me - but in theory it's supposed to work).
One more method is to use GDebi, it's a GUI installer for .deb files. It is my preferred tool to install non-repository packages. But it's not installed by default, so you have to install it first while you do have an Internet connection.
However, if the package to be installed has any dependencies, you must resolve them manually and install all dependencies first.

Yes, you can do it by using Gdebi.
Suppose, you have already downloaded a Deb package software-package-example.deb.
To install it, open terminal in the same directory where the package is downloaded and type
sudo gdebi software-package-example.deb

Done.
If Gdebi is not installed, you can run
sudo apt-get install gdebi


Is Ubuntu 14.04 slower on low-end graphics cards than 12.04 LTS? I started upgrading to Ubuntu 14.04 (from 12.04) when it said that if I installed it, it might make me have a "slow environment" because of my graphics card. I cancelled the upgrade because of my computer, that could be a very distinct possibility. I am using an Acer C720 Chromebook dual booted with Ubuntu 12.04 unity. I have very little programming and Ubuntu experience, I have only been using it for 2 months.

Should I Upgrade from 12.04 LTS to 14.04?

Yes, you must.

Open a terminal and copy paste the following:

sudo apt-get update

sudo apt-get dist-upgrade

Using the latest features is always more secure, reliable and you will allways be up to date.

Do a system clean with bleachbit after the upgrade:

sudo apt-get install bleachbit

and then

sudo bleachbit

and perform the clean up.


Unable to install Ubuntu 16.04 on windows 10 via virtualbox I'm trying to set up ubuntu on my windows machine using virtualbox but I keep getting the following error after a few seconds of running the installation:

end kernel panic - not syncing: vfs: unable to mount root fs on unknown block(0,0)

I have ensured that Hyper V is disabled and virtualization is enabled in BIOS (those are the suggestions I found online)
This is my first time trying to use Linux. I got the iso file from the ubuntu website

How do I fix this

If grub is accessible:

Remove old linux kernels, your /boot drive is out of space.

Boot to grub and click on “Advanced options”
Select a previous kernel (should boot fine)

login and enter command

$ df

See if your /boot directory is 100% used
Remove old linux kernels

$ sudo apt-get autoremove

from here: Geekdecoder


How to fix "ssh_exchange_identification: read: Connection reset by peer" error? I cannot connect to my server via ssh using my computer, but I can connect to this server via my cell phone using termius app. I have checked /etc/hosts.allow and /etc/hosts.deny and my iptables, and I have alse searched google, it seems no answer fits this problem. I don't know how to solve it , here is ssh -v  183.17.228.80 output

debug1: Connecting to 183.17.228.80 [183.17.228.80] port 22.
debug1: Connection established.=======================
debug1: permanently_set_uid: 0/0
debug1: SELinux support disabled
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.2
ssh_exchange_identification: read: Connection reset by peer

I can ping this server, here is telnet

telnet 183.17.228.29 22
Trying 183.17.228.29...
Connected to 183.17.228.29.
Escape character is '^]'.
Connection closed by foreign host.

Just reboot your server which you want to ssh. It worked for me, previously I was facing the same issue.

Check that sshd in installed and running of the server.
Make sure that the daemon is installed and started.You must be able to 'man sshd'. I think that package  it is in is open-ssl, and you will need to start the daemon ( and stop it when you don't need it.).


How can I efficiently format my Ubuntu Live USB to a FAT32 partition? Consider the following situation:
$ sudo fdisk -l
[sudo] password for user:

Disk /dev/sda: 320.1 GB, 320072933376 bytes
------------%<-----------------------------
Disk /dev/sdb: 160.0 GB, 160041885696 bytes
------------%<-----------------------------
WARNING: GPT (GUID Partition Table) detected on '/dev/sdc'! The util fdisk doesn't support GPT. Use GNU Parted.

Disk /dev/sdc: 4008 MB, 4008706048 bytes
255 heads, 63 sectors/track, 487 cylinders, total 7829504 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x429817b4

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           0     2301535     1150768    0  Empty
/dev/sdc2         2279532     2284075        2272   ef  EFI (FAT-12/16/32)

WARNING: GPT (GUID Partition Table) detected on '/dev/sdc1'! The util fdisk doesn't support GPT. Use GNU Parted.

Disk /dev/sdc1: 1178 MB, 1178386432 bytes
255 heads, 63 sectors/track, 143 cylinders, total 2301536 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x429817b4

     Device Boot      Start         End      Blocks   Id  System
/dev/sdc1p1   *           0     2301535     1150768    0  Empty
/dev/sdc1p2         2279532     2284075        2272   ef  EFI (FAT-12/16/32)

What you're seeing here is a Ubuntu Live USB, created by writing
sudo dd if=ubuntu-15.10-desktop-amd64.iso of=/dev/sdc

if I remember correctly.
I wonder what's the easiest way to format this Live USB to a normal FAT32 partition. I don't want to use it as a Live USB anymore - I just want to use it for storing files in a way that works for both Windows and Ubuntu. If I open GParted, this message appears:

fdisk said it was in fact a GPT, so I just click 'yes'...
I then navigate to my partition and try to write a new MBR partition table. When I try to do this, the following message appears:

which roughly translates to:
Encountered libparted bug!

Partition(s) 1 on /dev/sdc is/are written but we couldn't notify the
kernel about the changes, probably because the partitions are still in
use. So, the old partitions will remain active. You should now restart
your computer before making any other changes.
                               Abort / Ignore

I have no clue on what button to press here. Furthermore, it's a hassle to restart my computer just because I want to format a Live USB.
So, is there an easier, more efficient way to format my Live USB to a FAT32 partition?

I encountered this a few times myself.

You can fix this like you were doing:

Open GParted
Click past the warning, I think you need to click "Nee" (no) or if you click Yes, click "Negeren"
Disk (Schijf) -> Create partition table (Partitietabel aanmaken)
Select MS-DOS
Click create / OK

If you don't want to reboot, you can try closing GParted and then unmounting the partition:

sudo umount /dev/sdc

If you remount it, it should be fine (if not, you still need to reboot):

sudo mount /dev/sdc

You should remove GPT partition table from /dev/sdc first! To do this run :

sudo parted /dev/sdc

mklabel msdos

quit

Then run : sudo dd if=ubuntu-15.10-desktop-amd64.iso of=/dev/sdcagain and your problem should be fixed.

That's it!


Dual Boot won't show I have been trying for days now to get Ubuntu to dual boot with Windows 10, I have it installed but won't show at all looks like it's invisible.

Depends a lot how your windows is set up to boot, and whether you are using windows' boot loader or GRUB bootloader in MBR.

Here's one way to do dualboot, (even) if Windows is running on a bitlocker-encrypted drive:
https://confluence.csc.fi/display/ATUKI/2016/08/05/Dual-booting+Bitlocker+Windows+7+and+Ubuntu+16.04+with+NeoGRUB+and+EasyBCD

Steps to create the dualboot:

Shrink the existing NTFS partition to make room for the Ubuntu
installation. Rightclick Computer - Manage - Disk Management -
rightclick partition - Shrink Volume. About 20-30GB should do.
Pause bitlocker while the configuration is being updated. Control panel - Bitlocker Drive Encryption - Suspend Protection
Create a Live-USB of the Ubuntu or whatever Linux you're about to install. Used LiLi myself.
Boot the computer with the Live USB stick, Install Ubuntu with advanced settings.
Add two logical partitions to the empty space: a swap partition the same size as the machines RAM, and an ext4 partition with mountpoint / (root)
        Make sure to set the bootloader to the logical partition, not MBR. Example: /dev/sda6 instead of /dev/sda
After Ubuntu has finished installing, boot to windows and download EasyBCD
Reveal the unencrypted windows partition from Computer - Manage - Disk Management - rightclick system partition - Change drive letter and paths. I assigned the letter Q: for the system drive.
Using EasyBCD, Add a new entry to the bootmenu from the NeoGRUB tab (install)
Click configure on the NeoGRUB tab and write this entry, referencing /dev/sda6:

title Ubuntu
root (hd0,5)
chainloader (hd0,5)+1

Save changes from the Edit boot menu -tab
Boot, verify that both Windows and Ubuntu start, resume bitlocker protection