How do I patch/workaround SSLv3 POODLE vulnerability (CVE-2014-3566)? After the BEAST attack and Heartbleed bug, now I've heard about a new vulnerability in SSL/TLS called POODLE. How do I protect myself against being exploited?

Are only servers or also clients affected?
Is this OpenSSL/GnuTLS specific?
What kind of services are affected? Only HTTPS or also IMAPS, SMTPS, OpenVPN, etc.?

Please show me examples on how to avoid this vulnerability.

Background info

SSL is designed to secure the transport level on the internet. For 'the web' aka HTTP you'll know this as HTTPS, but it's also used for other application protocols. SSLv2 was the first widely used transport security protocol but was found insecure not long after. Successors SSLv3 and TLSv1 are widely supported now. TLSv1.1 and TLSv1.2 are newer and gaining a lot of support too. Most if not all web browsers released from 2014 have support for it.

The recent discovery by Google engineers points out that SSLv3 should not be used any longer (like SSLv2 is deprecated a long time ago). The clients that won't be able to connect to your site/service are probably very very limited. CloudFlare announced that less than 0.09% of their visitors still rely on SSLv3.

Simple solution: disable SSLv3.

Does Ubuntu provide any update?

Yes, via usn-2385-1 with the addition of the SCSV feature, but it does not mitigate the issue completely as it does not disable SSLv3 and the patch will only work if both sides of the connection have been patched. You'll receive it through your regular security updates in your package manager.

So, still YOU have to take action yourself to disable SSLv3 (it's configurable). Future versions of clients/browsers will disable SSLv3 most likely. E.g. Firefox 34 will do so.

Disabling SSLv3 completely by default in Ubuntu on implementation level will probably break some stuff out there also for non-HTTPS SSL usage which is not so much vulnerable, so I assume maintainers won't do that and only this SCSV patch will be applied.

Why does the SCSV update in OpenSSL via usn-2385-1 does not mitigate the issue?

Really, stop asking such questions and just skip a few paragraphs and disable SSLv3. But hey, if you're not convinced, here you go:

POODLE shows that SSLv3 with CBC ciphers is broken, implementing SCSV does not change that. SCSV only makes sure you don't downgrade from some TLS protocol to any lower TLS/SSL protocol as needed with the Man-in-the-Middle attack required for the usual cases.

If you have to access some server which does not offer TLS at all, but only SSLv3, then your browser doesn't really have a choice and has to talk to the server using SSLv3, which is then vulnerable without any downgrade attack.

If you have to access some server which offers TLSv1+ and SSLv3 too (which is discouraged) and you want to be sure your connection will not be downgraded to SSLv3 by an attacker, then both the server and the client need this SCSV patch.

For completely mitigating the issue the disablement of SSLv3 your end is enough and you can be sure you won't be downgraded. And you won't be able to talk to to SSLv3-only servers.

Okay, so how do I disable SSLv3?

See below in the application specific sections: Firefox, Chrome, Apache, Nginx and Postfix are covered for now.

Are only servers or also clients affected?

The vulnerability exists if both the server and client accepts SSLv3 (even if both are capable of TLSv1/TLSv1.1/TLS1.2 due to a downgrade attack).

As a server admin you should disable SSLv3 now for the security of your users.

As a user, you should disable SSLv3 in your browser now to secure yourself when visiting websites which still support SSLv3.

Is this OpenSSL/GnuTLS/browser specific?

No. It's a protocol (design) bug, not an implementation bug. This means you can't really patch it (unless you're changing the design of the old SSLv3).

And yes, there's a new OpenSSL security release, but read below (But I really really need SSLv3 support... for reason X,Y,Z!) on why you'd better focus on disabling SSLv3 altogether.

Can I kill SSLv3 on the network (firewall) level?

Well, yes, probably. I put this in a separate blog post for further thoughts and work. We may have some magic iptables rule you can use!

My blog post: How to take down SSLv3 in your network using iptables for POODLE?

Is it relevant for HTTPS only or also for IMAP/SMTP/OpenVPN and other protocols with SSL support?

The current attack vector, as shown by the researchers, works with controlling the plaintext sent to the server using Javascript being run on the victim's machine. This vector does not apply to non-HTTPS scenarios without using a browser.

Also, normally an SSL client doesn't allow the session to be downgraded to SSLv3 (having TLSv1+ seen in the handshake capabilities), but browsers want to be very backward compatible and they do. The combination with controlling plaintext and the specific way a HTTP header is built up makes it exploitable.

Conclusion: disable SSLv3 for HTTPS now, disable SSLv3 for other services in your next service window.

What's the impact? Do I need to revoke and regenerate my server certificate? (As with Heartbleed)

No, you don't need to rotate your certificates for this. The vulnerability exposes plaintext recovery from the session data, it does not provide access to any secrets (neither the session key or certificate key).

An attacker is most likely only capable of stealing the plaintext headers like session cookies in order to perform session hijacking. An additional constraint is the need for a full (active) MitM attack.

Is there anything else I can do to improve my SSL configuration in general?

As a user, besides disabling SSLv3 in your browser, not really. Well, just always install the latest security updates.

For servers, follow Mozilla's TLS server guide. And test with Qualys' SSL Labs test. It's really not that hard to get an A+ rating on your site. Just update your packages and implement the recommendations from the guide of Mozilla.

But I really really need SSLv3 support... for reason X,Y,Z! Now what?

Well, there's a patch that circumvents the downgrade attack of TLSv1 capable clients, called the SSLv3 Fallback Protection. It will improve the security of TLSv1+ too, by the way (downgrade attack is harder/impossible). It's offered as a backport from a more recent OpenSSL version in the Ubuntu Security advisory usn-2385-1.

Big catch: Both clients and servers need this patch in order to work. So, in my opinion while you're updating both clients and servers you should just upgrade to TLSv1+ anyway.

However, please, please, just retire SSLv3 in your network for now. Put effort in upgrading security standards and just ditch SSLv3.

I heard about SCSV support to eliminate the protocol downgrade attack. Do I need it?

Only if you really need SSLv3 for some odd reason, but it improves security in TLSv1+ too, so yes, I'd recommend you to install it. Ubuntu provides an update for this feature in usn-2385-1. You'll receive it through your regular security updates in your package manager.

Testing vulnerability for privately hosted sites (e.g. intranet/offline).

Your servers are vulnerable simply if they support SSLv3. Several options here:

With OpenSSL s_client:

openssl s_client -connect <server>:<port> -ssl3

If the connection succeeds, sslv3 is enabled. If it fails, it is disabled. When it fails you should see something like:

error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure

Using nmap:

nmap --script ssl-enum-ciphers -p 443 myhostname.tld

It should output 'SSLv3: No supported ciphers found'. Adjust for your hostname/port.
Using cipherscan. Clone/download the binary and execute it:

./cipherscan myhostname.tld

It should not list anything with SSLv3 under the 'protocols' column.

Firefox browser

Open about:config, find security.tls.version.min and set the value to 1. Then restart your browser to drop any open SSL connections.

Firefox from version 34 onwards will disable SSLv3 by default and thus require no action (source). However, at the moment of writing, 33 is just released and 34 is set for November 25.

Google Chrome (Linux)

Edit the /usr/share/applications/google-chrome.desktop file, e.g.

sudo nano /usr/share/applications/google-chrome.desktop

Edit all lines starting with Exec= to include --ssl-version-min=tls1.

E.g. a line like

Exec=/usr/bin/google-chrome-stable %U

becomes

Exec=/usr/bin/google-chrome-stable --ssl-version-min=tls1 %U

Then make sure to fully close the browser (Chrome apps may be keeping your browser active in the background!).

Note: You may need to repeat this every google-chrome package update, overwriting this .desktop launcher file. A Google Chrome or Chromium browser with SSLv3 disabled by default is not yet announced at the time of writing.

Apache HTTPD Server

If you are running an Apache web server that currently allows SSLv3, you will need to edit the Apache configuration. On Debian and Ubuntu systems the file is /etc/apache2/mods-available/ssl.conf. On CentOS and Fedora the file is /etc/httpd/conf.d/ssl.conf. You will need to add the following line to your Apache configuration with other SSL directives.

SSLProtocol All -SSLv2 -SSLv3

This will allow all protocols except SSLv2 and SSLv3.

While you're at it, you may want to consider improving the ciphersuite configuration for your webserver as explained on Mozilla's TLS server guide. Add for example:

SSLCipherSuite          ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA
SSLHonorCipherOrder     on
SSLCompression          off
# Read up on HSTS before you enable it (recommended)
# Header add Strict-Transport-Security "max-age=15768000"

Then check if the new configuration is correct (no typos etc.):

sudo apache2ctl configtest

And restart the server, e.g.

sudo service apache2 restart

On CentOS and Fedora:

systemctl restart httpd

More info: Apache documentation

Now test it: If your site is publicly available, test it using Qualys’ SSL Labs tool.

Nginx server

If you're running Nginx, just include the following line in your configuration among the other SSL directives:

ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

While you're at it, you may want to consider improving the ciphersuite configuration for your webserver as explained on Mozilla's TLS server guide. Add for example:

ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';
ssl_prefer_server_ciphers on;
# Read up on HSTS before you enable it (recommended)
# add_header Strict-Transport-Security max-age=15768000;

And restart the server, e.g.

sudo service nginx restart

Reference: Nginx documentation

Now test it: If your site is publicly, available, test it using Qualys' SSL Labs tool.

Lighttpd webserver

Lighttpd versions >1.4.28 support a configuration option to disable SSLv2 and v3.  Lighttpd releases before 1.4.28 allow you to disable SSLv2 ONLY.  Please note that Ubuntu 12.04 LTS and earlier install at best lighttpd v1.4.28 and therefore a simple fix is not available for those distributions.  Therefore this fix should only be used for Ubuntu versions greater than 12.04.

For Ubuntu version 12.04 or Debian 6, an updated lighttpd package is available from the openSUSE repository:
http://download.opensuse.org/repositories/server:/http/Debian_6.0

The package is intended for Debian 6 (squeeze) but works also on 12.04 (precise)

Edit your /etc/lighttpd/lighttpd.conf to add the following lines after the ssl.engine = "enable" directive

ssl.use-sslv2          = "disable"
ssl.use-sslv3          = "disable"

Then you should restart the lighttpd service with a sudo service lighttpd restart and perform an ssl3 handshake test as described in earlier sections to make sure that the change was implemented successfully.

Taken from http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_SSL.

Postfix SMTP

For 'opportunistic SSL' (encryption policy not enforced and plain is acceptable too), you don't need to change anything. Even SSLv2 is better than plain, so if you need to secure your server you should be using 'mandatory SSL' mode anyway.

For 'mandatory SSL' mode being configured already, just add/change the smtpd_tls_mandatory_protocols setting for inbound connections and smtp_tls_mandatory_protocols for outbound connections:

smtpd_tls_mandatory_protocols=!SSLv2,!SSLv3
smtp_tls_mandatory_protocols=!SSLv2,!SSLv3

Optionally, if you want to disable SSLv3 for opportunistic encryption as well (even though it's unnecessary as explained above), do so thusly:

smtpd_tls_protocols=!SSLv2,!SSLv3
smtp_tls_protocols=!SSLv2,!SSLv3

and restart Postfix:

sudo service postfix restart

Sendmail

(Unverified edit by anonymous user, I'm not comfortable with Sendmail, please verify.)

These options are configured in the LOCAL_CONFIG section of your sendmail.mc

LOCAL_CONFIG
O CipherList=HIGH
O ServerSSLOptions=+SSL_OP_NO_SSLv2 +SSL_OP_NO_SSLv3 +SSL_OP_CIPHER_SERVER_PREFERENCE
O ClientSSLOptions=+SSL_OP_NO_SSLv2 +SSL_OP_NO_SSLv3

Dovecot

In Dovecot v2.1+, add the following to your /etc/dovecot/local.conf (or a new file in /etc/dovecot/conf.d):

ssl_protocols = !SSLv2 !SSLv3

and restart Dovecot:

sudo service dovecot restart

For older versions you will have to patch the source code.

Courier-imap (imapd-ssl)

Courier-imap allows SSLv3 by default on Ubuntu 12.04 and others.  You should disable it and use STARTTLS instead to force TLS.  Edit your /etc/courier/imapd-ssl configuration file to reflect the following changes

IMAPDSSLSTART=NO
IMAPDSTARTTLS=YES
IMAP_TLS_REQUIRED=1
TLS_PROTOCOL=TLS1
TLS_STARTTLS_PROTOCOL=TLS1
TLS_CIPHER_LIST="<take those from the Mozilla TLS Server guide!>"

HAProxy Server

SSL is supported in HAProxy >= 1.5.

Edit the /etc/haproxy.cfg file and find your bind line. Append no-sslv3. For example:

bind :443 ssl crt <crt> ciphers <ciphers> no-sslv3

Reference: HAProxy Documentation

OpenVPN

Appears to be unaffected (source).

  OpenVPN uses TLSv1.0, or (with >=2.3.3) optionally TLSv1.2 and is thus not impacted by POODLE.

Puppet

Puppet uses SSL over HTTPS but it isn't used by 'browser' clients, just Puppet agents which aren't vulnerable to the attack vector shown. However, it's best practice to just disable SSLv3.

My recommendation is to use the stephenrjohnson/puppetmodule Puppet module to set up your Puppet master in which I killed SSLv3 some time ago.

Since POODLE Vulnerability is a design flaw in the protocol itself and not an implementation bug, there will be no patches. Only way to mitigate this is to disable SSLv3 in the apache server. Add the below lines into ssl.conf and do a graceful apache restart.

SSLProtocol all -SSLv2 -SSLv3
SSLHonorCipherOrder on
SSLCipherSuite "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS"


Does ssh key need to be named id_rsa? I have come across this problem a couple of times when creating build servers with keyed authentication.

I was wondering if anyone else has experience this. I have a couple of keys for my current user that may connect to different machines. Let say machine1 and machine2. I have pasted my public key into their respective authorized_keys file. The first one I have named the first key id_rsa and the second key bender.

When I try to connect to bender I get the following output with my verbose ssh connection

debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /home/bozo/.ssh/.ssh/identity
debug1: Trying private key: /home/bozo/.ssh/.ssh/id_rsa
debug1: Trying private key: /home/bozo/.ssh/id_dsa
debug1: No more authentication methods to try.
Permission denied (publickey).

It only offers the id_rsa key, as you can see above. Is this correct? If so why? How do I get it to offer more keys? I know it is a problem I see intermittently, because I at home I have multiple keys without much trouble.

I would also appreciate a overview on how the pub and private keys interact with the client and server. I thought I had a pretty decent idea, but apparently I am missing something.

Please and thank you.

By default, ssh searches for id_dsa and id_rsa files. The keys do not have to be named like this, you can name it mykey just as well, or even place it in a different directory. However, if you do either of those, then you need to explicitly reference the key in the ssh command like so:

ssh user@server -i /path/to/mykey

If a command does not accept -i, e.g. sshfs, use the IdentityFile option:

sshfs -o IdentityFile=/path/to/mykey user@host:/path/on/remote /mountpoint

How It Works

When generating a key, you'll get two files: id_rsa (private key) and id_rsa.pub (public key). As their names suggest, the private key should be kept secret and the public key can be published to the public.

Public-key authentication works with a public and a private key. Both the client and the server have their own keys. When installing openssh-server the server public and private keys are generated automatically. For the client, you'll have to do that on your own.

When you (client) connect with a server, public keys are exchanged. You'll receive the servers one, and the server yours. The first time you receive the server public key, you'll be asked to accept it. If this public key changes over a time, you'll be warned because a possible MITM (Man in the middle) attack is going on, intercepting the traffic between the client and the server.

The server checks whether you are allowed to connect (defined in /etc/ssh/sshd_config) and if your public key is listed in the ~/.ssh/authorized_keys file. Possible reasons why the public key is denied:

/etc/ssh/sshd_config:

AllowUsers or AllowGroups is specified, but your server user is not listed in the groups or users list (default not defined, placing no restriction on the users or groups from logging in).
DenyUsers or DenyGroups is specified and you're in the users or groups list.
You're trying to login as root, but PermitRootLogin is set to No (default yes).
PubkeyAuthentication is set to No (default yes).
AuthorizedKeysFile is set to a different location, and the public keys are not added to that file (default .ssh/authorized_keys, relative to home dir)

~/.ssh/authorized_keys: your public key is not added in this file (note that this file is read as root user)

Using multiple keys

It's not uncommon to use multiple keys. Instead of running ssh user@host -i /path/to/identity_file, you can use a configuration file, ~/.ssh/config.

Common settings are the IdentityFile (the keys) and port. The next configuration will check "id_dsa" and "bender" only when connecting with ssh youruser@yourhost:

Host yourhost
   IdentityFile ~/.ssh/id_dsa
   IdentityFile ~/.ssh/bender

If you omit Host yourhost, the settings will apply to all SSH connections. Other options can also be specified for this host match, like User youruser, Port 2222, etc. This would allow you to connect with the shorthand ssh yourhost instead of ssh -p2222 youruser@yourhost -i ~/.ssh/id_dsa -i ~/.ssh/bender.

In consideration of StevenRoose's comment that it takes longer to specify many keys, and I happen to be playing around with a lot of keys, I would like to suggest my personal solution.

I create a symlink to the key that I want to use at the time, and since that only changes infrequently depending on which project I'm working on, I am happy with it.

Here I have linked to my keys for machines running under virtualbox:

$ cd .ssh/
$ ln -s adam_vbox-id_rsa.pub id_rsa.pub
$ ln -s adam_vbox-id_rsa id_rsa

$ ls -l
total 12
-rw------- 1 adam adam 1675 2013-10-04 02:04 adam_vbox-id_rsa
-rw-r--r-- 1 adam adam  396 2013-10-04 02:04 adam_vbox-id_rsa.pub
lrwxrwxrwx 1 adam adam   16 2013-10-04 02:17 id_rsa -> adam_vbox-id_rsa
lrwxrwxrwx 1 adam adam   20 2013-10-04 02:17 id_rsa.pub -> adam_vbox-id_rsa.pub
-rw-r--r-- 1 adam adam 3094 2013-10-04 02:09 known_hosts

One could also add a really quick script to change over to another set without having to manually type the ln command again.

Again, this isn't a solution for two keys only, but for a greater number, it might be workable.


difference between sources.list and sources.list.distUpgrade On ubuntu, in the /etc/apt/, there are two files: sources.list and sources.list.distUpgrade. But I only know they are used to update system. However, what are the the difference between them? by the way, what the GPG keys used for? when I update the sources.list using ubuntu source list generator, should I update GPG keys as well?

Thanks !

When you upgrade between distro versions, .list files in /etc/apt/sources.list.d get commented out. The original versions of those files get backed up with the .distUpgrade extension, and that's what you're seeing. Other than sitting there and being backups, I don't think the .distUpgrade files do anything.

I guess Ubuntu (Debian?) does this out of the presumption that .list files will be incompatible across distro versions, but as a packager, this is pretty inconvenient. Packages like google-chrome install a special cronjob just to work around this issue and un-comment-out their .list file after a dist upgrade.

type man apt-get in terminal

 upgrade
       upgrade is used to install the newest versions of all packages
       currently installed on the system from the sources enumerated in
       /etc/apt/sources.list. Packages currently installed with new
       versions available are retrieved and upgraded; under no
       circumstances are currently installed packages removed, or packages
       not already installed retrieved and installed. New versions of
       currently installed packages that cannot be upgraded without
       changing the install status of another package will be left at
       their current version. An update must be performed first so that
       apt-get knows that new versions of packages are available.

   dist-upgrade
       dist-upgrade in addition to performing the function of upgrade,
       also intelligently handles changing dependencies with new versions
       of packages; apt-get has a "smart" conflict resolution system, and
       it will attempt to upgrade the most important packages at the
       expense of less important ones if necessary. The dist-upgrade
       command may therefore remove some packages. The
       /etc/apt/sources.list file contains a list of locations from which
       to retrieve desired package files. See also apt_preferences(5) for
       a mechanism for overriding the general settings for individual
       packages.


No wireless with Intel Centrino Advanced-N 7260 I have just bought a new laptop. Acer v7-582PG. Everything works great with Ubuntu, exept the wireless module. I have tried Ubuntu 13.04 and 13.10 Beta. Still no luck.

It is kind of a new wireless card, so there is very little information out about it.

lspci: 04:00.0 Network controller: Intel Corporation Wireless 7260 (rev 63)

sudo lshw -c network
ubuntu@ubuntu:~$ sudo lshw -c network
  *-network UNCLAIMED
       description: Network controller
       product: Wireless 7260
       vendor: Intel Corporation
       physical id: 0
       bus info: pci@0000:04:00.0
       version: 63
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list
       configuration: latency=0
       resources: memory:b3500000-b3501fff
  *-network
       description: Ethernet interface
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0.1
       bus info: pci@0000:05:00.1
       logical name: eth0
       version: 14
       serial: 08:9e:01:c3:24:50
       size: 1Gbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full ip=10.0.0.106 latency=0 link=yes multicast=yes port=MII speed=1Gbit/s
       resources: irq:62 ioport:4000(size=256) memory:b3404000-b3404fff memory:b3400000-b3403fff

rfkill list all

ubuntu@ubuntu:~$ rfkill list all
0: acer-wireless: Wireless LAN
    Soft blocked: no
    Hard blocked: no
1: acer-bluetooth: Bluetooth
    Soft blocked: no
    Hard blocked: no
2: hci0: Bluetooth
    Soft blocked: no
    Hard blocked: no

Further research, primarily here, suggests that simply loading the firmware will be ineffective. http://forum.notebookreview.com/networking-wireless/716325-intel-7260-a-6.html

I suggest you download this to your desktop: http://www.kernel.org/pub/linux/kernel/projects/backports/stable/v3.11-rc3/backports-3.11-rc3-1.tar.bz2 Right-click it and select 'Extract Here.' Now open a terminal and do:

cd Desktop/backports-3.11-rc3-1/
make defconfig-iwlwifi
make
sudo make install

Now reboot and tell us if your wireless is working.

I tested in Ubuntu 13.04 and it compiles perfectly and correctly drives my Intel 6200, but I don't have a 7260 so I can't test further. Fingers crossed! You definitely need the firmware.

Ubuntu 13.10, It resolved for me by :

apt-get install linux-firmware


Why does my laptop only show a cursor after closing and then opening the screen? When i close my laptop screen and open it, the screen stays black, but i can see the cursor.  I can switch to the other ttys using ctrl+alt+F1-F6, so computer isn't l0cked out or unresponsive, the gui just doesn't show anythimg other than the cursor.  Does any one know the problem could be?

Edit: log/command output

http://dl.dropbox.com/u/35887513/dmesg.out
http://dl.dropbox.com/u/35887513/var-log-kern-log
http://dl.dropbox.com/u/35887513/var-log-syslog
http://dl.dropbox.com/u/35887513/xorg-0-log

From the symptoms, and having Intel video, it sounds like you're hitting bug 966744:
"[i965] Resume from suspend leaves me with black screen..."

Update: a fix has been found! :-)

It is in Quantal and working for.  For 12.04, it's in precise-proposed, as of now, 2012/10/10.  All reports from there are good, too.

Upstream Intel developers are working with Ubuntu devs and users, there.  You might be able to help by getting an xtrace.  There are instructions in a bug comment here, but full disclosure, I couldn't get them to work.  Others did.

Here's an update, from the ubuntu-devel list (the end of this email).

"For 966744, it seems a non-trivial mesa bug. Timo reported it upstream. Already present in precise, but doesn't seem to trigger as often as in quantal. Will need possibily some help from the unity team on that one to workaround it."

Here are the upstream X bug, and kernel bug reports.  (Thanks to Launchpad's excellent bug linking.)

I have the same issue and when I go to tty1 (Ctrl+Alt+F1), log in, and run startx after logging in I get my full desktop back.

I'm not sure why/how it works but seems like a fairly good workaround.


Ubuntu 16.04 unstable, freezes/booting problems short story: Where can I find which video card driver to use?

Long story:

new Ubuntu 16.04 LTS installation freezes when I press ¨restart now¨ at the end of the installation. After reboot: kept sending me back to the screen where my password was asked whenever I entered my password (correctly). I tried all kings of ¨fixes¨ run from recovery mode: none of which worked. -> Reinstalled Ubuntu (again erased whole disk etc). Again restart now / booting and shutdown freezes (but loggin went fine?! using same USB stick) So I changed grub line to: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset".

I updated the whole system and changed the Graphic driver to the newest nvidia, everything seemed to be fine! Next day I try to boot: after the Bios boot the Ubuntu boot only showed a black screen with in the left top corner a: ¨-¨. So installed Ubuntu again.. same Grub fix, But because the only things I changed yesterday was the video driver I think that is where my problem lies and hence: Where can I find which driver is best for my:

hp g3 zbook
Quadro M1000M Nvidia card
I7 6400 Quadro

Ubuntu even froze when I tried to type this message, 16.04 LTS looks very unstable to me, anyone else having similar problems? Any clue on maybe a hidden problem in my kernels? Thanks in advance for all the help

Kind regards Steven

try this

sudo apt-get install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,')

AND after that

sudo dpkg --add-architecture i386 && sudo apt-get update && sudo apt-get install bumblebee-nvidia primus primus-libs:i386

and let me know if it works

In the BIOS change graphics to 'discrete'


My laptop's mousepad doesn't work after I installed Ubuntu 14.04 I connected USB mouse and it works. But I want to use the mousepad of my laptop.

Can anyone help me to fix this?

In general, a little bit more information is needed in order to have an idea of the computer you are running. Although most hardware is supported in linux nowadays, it does not mean that yours is fully supported. What was the laptop running before you installed ubuntu 14, was it another linux distribution where the touchpad was working?

The fact that it does not work could mean that you may need a more recent distribution for that hardware (What made you think that ubuntu 14 was fully supported?).

About debugging touchpads in general, some useful reading can be found here: https://wiki.ubuntu.com/DebuggingTouchpadDetection.

On my laptop if i run

cat /proc/bus/input/devices | grep -i touch

I get the following device N: Name="AlpsPS/2 ALPS DualPoint TouchPad"

What do you get?

Be aware that in some HP laptops, there is a button (often on the touchpad itself) which will turn off the touchpad -- unlikely for that to be your problem, I thought it worth mentioning.

Cheers.

Try going to "Mouse and touchpad" in your settings and should be a button to enable or disable the touchpad.


Can't get online after installing Lubuntu 15.04 I upgraded to Lubuntu 15.04 yesterday.
I originally installed Lubuntu at school several months back, so it was done using the school's Ethernet connection. At home, I set up my own DSL connection, which worked fine until yesterday. I needed only to click the DSL connection to get online.
Now, Ethernet connects (even though I can't use it at home), but DSL doesn't, even though the Network Connections haven't been altered by the upgrade.
The computer is an IBM R32-Thinkpad.
Does anyone know what might be causing this?

To connect to PPPoE/DSL using NetworkManager on 15.04 requires installing the pppoe package, which was not installed by default on my Lubuntu 15.04.

sudo apt-get install pppoe

I've reported this bug: https://bugs.launchpad.net/ubuntu/+bug/1455219

Open a terminal and type:

sudo pppoeconf

Enter your Ubuntu password.

If you don't know how to answer the questions it asks you, answer with yes. Then it will ask you the DSL username and DSL password.


Focus gvim when opening a new file I'm trying to switch from a mac dev environment to a linux dev environment, but I'm having a few problems. One of them is gvim. I would like to be able to double click a file in nautilus and then have gvim open it in a new tab. I already found how to open a file in a new tab here https://stackoverflow.com/questions/1323790/have-nautilus-open-file-into-new-gvim-buffer but it doesn't focus gvim yet.

Instead when I open a file unity 'wiggles' the gvim icon and I still have to alt-tab to it manually.

Is there a way to open a file in a new gvim tab and focus gvim at the same time? :)

Edit: I forgot to add that I'm using unity 2d on 11.10.

Change the line in your gvim.desktop that says Terminal=false to Terminal=true.

I recommend switching to Gnome Shell. I can confirm there is no problem for me with Nautilus and gvim.

http://www.omgubuntu.co.uk/2011/10/gnome-shell-ubuntu-11-10-guide/


How to reboot into ubuntu from Microsoft Windows without manually selecting the grub entry? This is the reverse question of How to reboot into Windows from Ubuntu?.

I'm using a PC with Windows/Ubuntu dual system. The PC is shared with others, so the default boot system in Grub is set to Windows, and the timeout is 1 second.

In order to switch the running Windows to Ubuntu, I have to reboot the windows and wait at the very short time of grub menu to choose the ubuntu entry. Many times I had missed or forgotten the chance and the system booted to windows again. (so I have to reboot again). Is there a way to directly reboot the windows to Ubuntu? Thanks!

Take a look at: How can I choose which OS grub will reboot me into—before I reboot?

This looks excactly like what you want. Basically it proposes to use grub-reboot.


What is an "AppImage"? How do I install it? I just read Meet Etcher, A Stylish Open-Source USB Image Writer Tool. It talks about downloading an AppImage.

  Yes, Linux; the Linux packages is distributed as an .appimage for 32-bit and 64-bit distributions, and should run across all major Linux distributions without any issues. The team currently have no plan to provide a native .deb (or .rpm) installer.

What are AppImages? How do they differ from snaps?

Basic Information

Regarding installation

I am quoting the appImage project page here:

  AppImages can be downloaded and run without installation or the need
  for root rights.

Making it executable

You can make the appImage executable as follows:

chmod a+x exampleName.AppImage

Executing it

You can execute an appImage as follows:

./exampleName.AppImage

Additional Information

About appImage

You can find some general informations about appImage here.

I am quoting the appImage project page here:

  The key idea of the AppImage format is one app = one file. Every
  AppImage contains an app and all the files the app needs to run. In
  other words, each AppImage has no dependencies other than what is
  included in the targeted base operating system(s).

Wikipedia adds

  AppImage (and the predecessors klik and portablelinuxapps) do not
  install software in the traditional sense (i.e., it do not put files
  all over the place in the system).

  It use one file per application.
  Each one is self-contained: it includes all libraries the application
  depends on and that are not part of the base system. In this regard,
  it is similar to "application virtualization". One can use a AppImage
  file even if they are not a superuser, or they are using a live CD.
  AppImage files are often simpler than compiling and installing an
  application, as no installation actually took place. The AppImage file
  is a compressed image which is temporarily mounted to allow access to
  the program, but not having to extract the program or modify the
  underlying system.

The README.md of the AppImageKit-project offers a lot additional informations like Use cases, the problem space and objectives.

Use Cases

As a user, I want to go to an upstream download page, download an application from the original author, and run it on my Linux desktop system just like I would do with a Windows or Mac application.
As a tester, I want to be able to get the latest bleeding-edge version of an application from a continuous build server and test it on my system, without needing to compile and without having to worry that I might mess up my system.
As an application author or ISV, I want to provide packages for Linux desktop systems just as I do for Windows and OS X, without the need to get it 'into' a distribution and without having to build for gazillions of different distributions.

Objectives

Be Simple.

  AppImage is intended to be a very simple format that is easy to
  understand, create, and manage.

Maintain binary compatibility.

  AppImage is a format for binary software distribution. Software
  packaged as AppImage is intended to be as binary-compatible as
  possible with as many systems as possible. The need for
  (re-)compilation of software should be greatly reduced.

Be distribution-agnostic.

  An AppImage should run on all base operating systems (distributions)
  that it was created for (and later versions). For example, you could
  target Ubuntu 9.10, openSUSE 11.2, and Fedora 13 (and later versions)
  at the same time, without having to create and maintain separate
  packages for each target system.

Remove the need for installation.

  AppImages contain the app in a format that allows it to run directly
  from the archive, without having to be installed first. This is
  comparable to a Live CD. Before Live CDs, operating systems had to be
  installed first before they could be used.

Keep apps compressed all the time.

  Since the application remains packaged all the time, it is never
  uncompressed on the hard disk. The computer uncompresses the
  application on-the-fly while accessing it. Since decompression is
  faster than reading from hard disk on most systems, this has a speed
  advantage in addition to saving space. Also, the time needed for
  installation is entirely removed.

Allow to put apps anywhere.

  AppImages are "relocatable", thus allowing the user to store and
  execute them from any location (including CD-ROMs, DVDs, removable
  disks, USB sticks).

Make applications read-only.

  Since AppImages are read-only by design, the user can be reasonably
  sure that an app does not modify itself during operation.

Do not require recompilation.

  AppImages must be possible to create from already-existing binaries,
  without the need for recompilation. This greatly speeds up the
  AppImage creation process, since no compiler has to be involved. This
  also allows third parties to package closed-source applications as
  AppImages. (Nevertheless, it can be beneficial for upstream
  application developers to build from source specifically for the
  purpose of generating an AppImage.)

Keep base operating system untouched.

  Since AppImages are intended to run on plain systems that have not
  been specially prepared by an administrator, AppImages may not require
  any unusual preparation of the base operating system. Hence, they
  cannot rely on special kernel patches, kernel modules, or any
  applications that do not come with the targeted distributions by
  default.

Do not require root.

  Since AppImages are intended to be run by end users, they should not
  reqiure an administrative account (root) to be installed or used. They
  may, however, be installed by an administrator (e.g., in multi-user
  scenarios) if so desired.

Now AppImageLauncher makes it really easy and convenient to launch/create a desktop file. Try it out


Ubuntu 14.04 - User desktop launcher is missing The same question has been asked before, but the answers that I found did not work for me, so I'm asking a new question.

I'm the main user and only sudoer on this computer, and everything works for me.

The second user account on this machine for no reason that I can think of, no longer displays the launcher sidebar or top bar, neither does CTRL + ALT + T work. Icons are normally displayed on the desktop (in most other related questions like this the desktop is blank).

So I've found and tried so far:

rebooting
sudo service lightdm restart
unity --replace
unity --reset-icons
apt-get install --reinstall ubuntu-desktop
apt-get install --reinstall lightdm
remove files under /home/USER/.config/compiz-1/compizconfig
starting ccsm from tty to enable unity plugin

unity reset commands return "no display variable set" and "compiz core couldn't open display 0".

When I try to launch unity from tty with DISPLAY=:0 unity I get the following:

Invalid MIT-MAGIC-COOKIE-1 keycompiz (core) - Fatal: couldn't open display :0

Which sounds like it could be relevant?

How to restore desktop panels?

the source : Unity doesn't load, no Launcher, no Dash appears

You just need to turn the Unity plugin back on. The problem is this is a pain in the bottom because you've now got no graphical method to do this. So:

Try to open a terminal with Ctrl+Alt+T.
This may not work but you can try right clicking on the desktop and selecting "Open terminal here." Otherwise, you may need to change to a "hard" terminal by pressing
Ctrl+Alt+F1 and log in.
Install compizconfig-settings-manager by running

sudo apt-get install compizconfig-settings-manager

Then run it with this:

DISPLAY=:0 ccsm &

The first part tells the terminal which display you want it to load on (otherwise it won't have a clue).
If you switched to a TTY in step 1, switch back to the graphical server by pressing Ctrl+Alt+F7 (or Ctrl+Alt+F8 sometimes).
There there should be a CompizConfig Settings Manager waiting for you.
Find the Unity plugin. Enable it. You will be asked "Ubuntu Unity Plugin requires the plugin OpenGL. Enable Ubuntu Unity Plugin / Enable OpenGL"
Everything should spring into life but if it doesn't, you might have to restart. You can do that by going back to the terminal and running sudo reboot.


Ubuntu 12.04 not recognising my new wireless "super hub" I'm fairly new to Ubuntu, and this is the first time I've reached out and asked for help.  Please let me know if you need any more information.

I did a clean install of Ubuntu 12.04 (64-bit) replacing Ubuntu 10.10 (32-bit) on my Samsung n150plus netbook last week.

Just before I did the install, we had a new router fitted with a new network and password etc.

My netbook worked fine with this router when it was using 10.10. But immediately after I installed 12.04, the SSID for that network was no longer detected. It does not come up in the list of available wireless networks.

However, if I use a wireless USB adapter/stick, it connects fine. The netbook's internal wifi also works when used with other wireless networks. But not with this one router.

Please let me know if I can give any more information that would help to solve the problem.

Some other details copied from comments

The router is a Virgin Media Super Hub (VMSH) made by Netgear.
My Samsung N150plus connects with no problem to other wifi networks. I appear to only have problems with this router.
I tried using a friend's Mac and it had no problem establishing a wifi connection to this router.

Upgrade kernel and then see the results. Ubuntu 12.04 comes with kernel 3.2. I have upgraded to 3.4 kernel.


How do I optimize the OS for SSDs? What steps should be taken before/during/after installation of Ubuntu on a Solid State Drive to optimize performance and ensure maximum durability of the drive?

I have successfully used several different techniques to improve the way Ubuntu uses the storage device, whether that be solid state or traditional drive.

For SSD's you are looking to minimise the number of times the drive is written too, as reads should not add wear to the drive.

1) Manage the swap file

If you do not hibernate your computer and you have ample RAM memory to run all your applications, then in theory you do not need a swap partition.

If you have a mix of SSD and hard drives, place your swap partition on the hard drives only.

2) No Writes for Read Timestamps (suitable for SSD's and hard drives)

Mounting your partitions with the options noatime and nodiratime will stop timestamp writes when you read files and folders.  These timestamp writes are not generally required unless you use a local mail server client such as mutt. The reason this is generally a bad idea, is because every read will produce a write when updating the timestamps. This decreases the life of the SSD.

Edit your /etc/fstab configuration file (carefully - take a backup to be sure as breaking your fstab configuration can prevent you system from working):

cp /etc/fstab ~/fstab-backup
gksudo gedit /etc/fstab

Edit the mounting options for your partitions by adding the text noatime and nodiratime to the lines defining your root (/) and other partitions if you have them (/home) - Note: if you have a /home partition, start with that just changing that partition if you are concerned about breaking something

# / was on /dev/sda2 during installation
UUID=587e0dc5-2db1-4cd9-9792-a5459a7bcfd2 /               ext4    noatime,nodiratime,errors=remount-ro 0       1

# /home was on /dev/sda3 during installation
UUID=2c919dc4-24de-474f-8da0-14c7e1240ab8 /home           ext4    noatime,nodiratime,defaults        0       2

You will need to reboot your machine before these changes take effect

3) Minimising writes from the OS and applications

Assuming that you are not running a mission critical product server, most people do not look at logs should something go wrong (especially as serious errors are rare for most Ubuntu users).  Therefore you can configure Ubuntu so all logs get written to RAM memory rather than the SSD.

Note: only make the following changes when you have installed all software you are going to use (especially things like Apache web server), otherwise you may experience some issues with missing directories in /var/log

For background to this approach, see prolonging the life of your flash drive on ubuntu-eee.com

Open /etc/fstab with an editor (assuming you have backed up the /etc/fstab file)

gksudo gedit /etc/fstab

Add the following lines at the end of the fstab file and save:

# Uncomment these after all server based applications installed - eg. apache
#tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
#tmpfs /var/tmp tmpfs defaults,noatime,mode=1777 0 0
#tmpfs /var/log tmpfs defaults,noatime,mode=0755 0 0
#tmpfs /var/log/apt tmpfs defaults,noatime 0 0
# none /var/cache unionfs dirs=/tmp:/var/cache=ro 0 0

You will need to reboot your machine before these changes take effect

See also:

How to enable TRIM?

I suggest to place only those things which are read at boot time on the SSD any maybe applications which require much time to load.Data and logs and other uncritical things I would locate on a normal HDD.Also you could setup your ubuntu to only load a big initramfs from SSD at boot time and not write back changes to ssd.This has the benefit, that changes to this partition are not persistent which is sth like a protection for your boot system.Therefor you would need much more RAM of course.

I would e.g. place the partitions
/, /etc, /usr, /boot, /lib 32/64 on SSD while sth like

/opt, /bin, /sbin, /root, /home and even swap (increase RAM!!!) on HDD

Wikipedia says:

  The Linux kernel supports the TRIM function starting with version 2.6.33. The ext4 file system is supported when mounted using the "discard" parameter. The most recent disk utilities (and therefore installation software that make use of them) also apply proper partition alignment.

For backups there are many ways, simplest of which is (r)sync plus cron job.


Lubuntu screen resolution I have something strange going on with my screen resolution:

How can I fix this? Panel has resolution 1366x768, but desktop and all windows has 1024x768.

Need to see your conf file of vncserver. In this file mast be screen resolution. It mast be in /etc/vncserver/
Try to connect by vncx11.
sudo apt-get install x11vnc  (install x11vnc as aoolication)
sudo nano /lib/systemd/system/x11vnc.service  (create demon)

[Unit]
Description=Start x11vnc at startup.
After=multi-user.target
[Service]
Type=simple
ExecStart=/usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /etc/x11vnc.pass -rfbport 5900 -shared
[Install]
WantedBy=multi-user.target

sudo x11vnc -storepasswd 111111 /etc/x11vnc.pass (this line make pass for connect 111111)

sudo systemctl daemon-reload   (make reload all demons )
sudo systemctl enable x11vnc.service (enable service)

Reboot your system and try to connect (host or ip with port 59000 (192.168.1.5:590000) )


Files icon disappears from the unity launcher I'm experiencing this behaviour on 2 separated machines (in a virtualbox vm and physically installed on another laptop):

Sometimes after I start the Files Gnome application - its corresponding button disappears from the Unity Launcher couple seconds after it's started. So if I minimize the application - I have no chance to close the application rather than killing its process with kill.

That's how it looks like:

Has anyone else experienced it? Is it a bug or some tricky configuration option?

If it's a bug - where should I report it?

PS: I've filed a bug for that https://bugs.launchpad.net/ubuntu/+source/ubuntu-meta/+bug/1565194

I had the same issue. I just upgraded from ubuntu 14.04.
Resolved by removing files from the launcher then draging it from the dash to the launcher again

Hello I can recommend you to try out  plank dock
where you can pin your current windows/ programs and few others.

I am personally not using dash at all, just having it hidden, mac style macbuntu


Set folder view - per folder preferences is there a way with Ubuntu 15.04 or less recent versions to set view preferences on a per-folder basis? Something like this folder should be a list, this one should be icons and so on.

Thanks!

Use Nemo

sudo add-apt-repository ppa:webupd8team/nemo
sudo apt-get update
sudo apt-get install nemo nemo-fileroller


Download snap "lxd" (10756) from channel "stable" (invalid credentials) when trying to install Just upgraded from bionic to cosmic. Part of that process migrates from deb lxd to snap lxd. The upgraded succeeded except for the lxd package. I get this error when trying to complete the upgrade or when installing lxd snap using snap command.

snap install lxd
error: cannot perform the following tasks:
- Download snap "lxd" (10756) from channel "stable" (invalid credentials)

Why do I get this? What credentials? Where is the snapd error log?

Update as requested in attempted answers:

grep snap /var/log/syslog :

May 30 00:21:14 delays snapd[30230]: storehelpers.go:441: cannot refresh snap "core": snap has no updates available
May 30 00:21:14 delays snapd[30230]: autorefresh.go:389: auto-refresh: all snaps are up-to-date
May 30 10:21:14 delays snapd[30230]: storehelpers.go:441: cannot refresh snap "core": snap has no updates available
May 30 10:21:14 delays snapd[30230]: autorefresh.go:389: auto-refresh: all snaps are up-to-date
May 30 15:11:14 delays snapd[30230]: storehelpers.go:441: cannot refresh snap "core": snap has no updates available
May 30 15:11:14 delays snapd[30230]: autorefresh.go:389: auto-refresh: all snaps are up-to-date
May 30 15:37:32 delays snapd[30230]: api.go:1079: Installing snap "lxd" revision unset

Could you submit the content of /var/log/syslog once you run sudo snap install lxd?

To do so, open a terminal and type:

$ grep snap /var/log/syslog

Solution #1

Usually, when this error occurs, you can resolve it by removing your credentials from ~/.snap/auth.json and by trying to re-authenticate.

Edit:

Solution #2

First, try to stop snapd

$ sudo systemctl stop snapd.service

Take a back-up and remove the /var/lib/snapd/state.json

$ sudo mv /var/lib/snapd/state.json /var/lib/snapd/state.json.bck

Start again snapd

$ sudo systemctl start snapd.service

Login to Snap

$ snap login

Update all Snap packages

$ snap refresh

Remove broken Snap

$ snap remove lxd

Try to install lxd again

$ snap install lxd

I found the solution accidentally:
1- log out of snap:
#snap logout

2- Go to Settings --> Online Accounts and delete all accounts you have.
3- Now simply:
#snap refresh


How do I check if I have a 32-bit or a 64-bit OS? I downloaded and installed Ubuntu from the official site.
However, I don't know if I installed the 32-bit or 64-bit version.

In Windows 7 I could right click My Computer and it listed which version it was.

Is there an easy way to check in Ubuntu?

I know at least 2 ways. Open a terminal(Ctrl+Alt+T) and type:

uname -a

Result for 32-bit Ubuntu:

Linux discworld 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:50 UTC 2011 i686 i686 i386 GNU/Linux

whereas the 64-bit Ubuntu will show:

Linux discworld 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:50 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

Shorter version:

$ uname -i
x86_64

or
file /sbin/init

Result for 32-bit Ubuntu:

/sbin/init: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped

whereas for the 64-bit version it would look like:

/sbin/init: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped

Same for systems using systemd (16.04):

file /lib/systemd/systemd

Result for 64-bit:

/lib/systemd/systemd: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=54cc7ae53727d3ab67d7ff5d66620c0c589d62f9, stripped

I am not sure what you call an OS being 32 bits.

To be specific, my kernel and desktop distribution is a 64 bits Debian/Sid, but I routinely use schroot to run a deboostrap-ed 32 bits Debian inside a chroot-ed environment (for testing purposes).

Do you feel that my 32 bits environment should be called 32 bits (I believe so) or 64 bits (after all, it does run inside a 64 bits kernel). In that environment uname -m says i686 and all libraries and executables and processes are 32 bits.

For practical purposes uname -m should be enough. The file command can tell you if an ELF executable is a 32 bits or a 64 bits one.

See the Linux specific personality(2) syscall (and also the uname(2) one).

And the hardware information about your processor is visible with e.g.

 cat /proc/cpuinfo

its output is the same in my desktop 64 bits system and in my 32 bits schroot-ed environment.


'multiple active partition" error while booting ubuntu from USB I made my USB ubuntu bootable using " startup disk creator",but when I am trying to boot from this USB an error is coming "multiple active partition". Please help me out to solve this problem.

Steps what I did are as follows:-

Previously I had windows 8 and ubuntu 12.10 on my laptop, But I formatted my C drive to format both the OS, and then created ubuntu 13.04 USB bootable from my friends laptop,now I am trying to boot my laptop but error is coming "multiple active partition"

Open gparted and deleta all partitions the make a new partition FAT/Full space of the usb flash drive, then install ubuntu again on the flash drive


Error :: You must put some 'source' URIs in your sources.list I'm trying to install PIL a python module on ubuntu

I first need to install a package called python-imaging using the following command

sudo apt-get build-dep python-imaging

When I try and do this I get the error

E: You must put some 'source' URIs in your sources.list

I saw this question whihc shows how to fix via the GUI but I'm using the command line. Does anyone know how I can fix this error..?

UPDATE:
Based on the below answers I've updated my package list but I now get this error. Not sure if it is related, if not I'll start a new question as I can't find reference to the error anywhere.

E: Build-Depends dependency for python-imaging cannot be satisfied because candidate version of package python-all-dev can't satisfy version requirements

software-properties-gtk option "Source code"
I recommend this for the desktop:
software-properties-gtk

then under the "Ubuntu Software" tab click "Source code":

This has added some deb-src lines under /etc/apt/sources.list, and now I can do sudo apt-get build-dep <package>.
I've couldn't find a clean CLI method so I create this bug report for it: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1802718
Tested on Ubuntu 16.04 to 18.04.
CLI method
I recommend this for Docker images:
sudo cp /etc/apt/sources.list /etc/apt/sources.list~
sudo sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list
sudo apt-get update

Tested on the Ubuntu 18.04 Docker image. After this change, I can successfully do for example:
sudo apt-get build-dep hello

and before the change it failed with the error:
E: You must put some 'source' URIs in your sources.list

Previously mentioned at: https://askubuntu.com/a/1011675/52975 go and upvote that answer.
Note however that the /etc/apt/sources.list file contains lines such as:
# deb http://archive.canonical.com/ubuntu bionic partner
# deb-src http://archive.canonical.com/ubuntu bionic partner

which means that the above sed would enable sources but not non-sources for some types of repos. I don't think that it  matters much though.

My solution takes the already configured deb lines and adds them as deb-src ones.
Tested using the perl:5.28 docker image which builds upon buildpack-deps:buster which builds upon debian:buster:

grep '^deb ' /etc/apt/sources.list | perl -pe 's/deb /deb-src /' >> /etc/apt/sources.list


Swap vanished after reboot I have installed Kubuntu 14.04 with an encrypted home directory. Although I had swap set up during the install, the swap space was not there after installing. This has happened to many people, there seems to be a bug somewhere. I googled and found a solution to this
here.

I followed the steps there, leaving out the ones that had to do with resume, because that is disabled on my install anyway. So I essentially did:

sudo swapoff -a (turns off swap)
comment existing swap configuration in /etc/crypttab
comment existing swap configuration in /etc/fstab
re-format swap partition with gparted as linux-swap
sudo mkswap /dev/sdXX
sudo swapon /dev/sdXX
sudo ecryptfs-setup-swap

Then I had a working swap and was happy, until I rebooted my laptop and was back to square one.
Looking at the partition with gparted, it says file system unknown for the (former) swap partition, and needless to say I don't have any swap space available.

So, now my question is: Why did the file system formatting (as linux-swap) not survive the reboot? Is there anything I can do about that?

If I do blkid, the swap partition does not show up at all, so my problem seems to be different from this question.

Edit: Still working on it, so I did the above procedure again, after which /etc/crypttab looks like this:

cryptswap1 UUID=xxxx /dev/urandom swap,cipher=aes-cbc-essiv:sha256

plus some lines that are commented out. And /etc/fstab contains this line:

/dev/mapper/cryptswap1 none swap sw 0 0

Both new lines however look exactly the same (apart from the UUID) as what was generated the last two times. So I don't have great hopes that it will stay when I reboot.
Gparted now shows the partition I am using as linux-swap. (Before rebooting)
Also blkid gives this line:

/dev/sda7: UUID="xxxx" TYPE="swap"

I tested the swap and it works, i.e. I started a program that used a lot of memory and checked how much was loaded into swap in the system monitor.

Edit2: Turns out that 3 is not the magic number that fixes this issue. The content of the two files is unchanged, blkid does not show the line with /dev/sda7 anymore and gparted shows the swap partition as "unknown".

Any suggestions the output of what I could look at or what else I could try are really welcome. My workaround at the moment is to just not reboot, but sometimes when there is an update, my laptop really wants to reboot.

Edit3: Is there really nothing else one could try to fix this? Any commands I could try? Any output I could look at?

This is not happening in the reboot. After you finish your setup (running ecryptfs-setup-swap), go back to gparted and reload the table & open a terminal and run: sudo fdisk -l /dev/sda. You gonna find that partition still having Id 83 Linux Swap and became in Unknown format.

Why is that?! It became an encrypted partition already.

In /etc/fstab:

Old swap partition was commented.
New mapped one inserted:

/dev/mapper/cryptswap1 none swap sw 0 0

This is fine.

In /etc/crypttab:

A new line added to map the swap:

cryptswap1 UUID=xxxx /dev/urandom swap,cipher=aes-cbc-essiv:sha256

But there is something wrong here, Does an encrypted partition have a UUID (non-encrypted)?!!!

So set the dev path directly as this example:

cryptswap1 /dev/sdXX /dev/urandom swap,cipher=aes-cbc-essiv:sha256

Reboot then the Swap will be on.

BTW, This should be reported as a bug. ecryptfs-setup-swap should use device path instead of uuid.

Update: I could find same answered question which include the bug report too.

Swap not working on clean 14.04 install using encrypted home
Bug report#953875 Encrypted swap no longer mounted at bootup

It contains the canonical answer by adding an offset= in the crypttab options.

You could try this from the terminal:

 sudo -i
 umount -a
 gedit /etc/fstab

and then type this in at the bottom:

 uuid   name   mount  type
 xxxxx  swap   /       sw   sw   errors=noremount   0

and then type this in the terminal:

 mount -a

and then use gpart, and set the swap drive swap /.
and it might work fine this way.


Is there a way to run a command every time the mouse moves? I'd like to run a script every time I move my mouse.

This is the first step in making a workaround so that I can use 100% of my monitor edges to go between them.

Is this possible?

The question literally

Detecting mouse movement, can be done with several tools. Two examples:

Using xdotool in a script:
[you'd need xdotool to be installed]:

sudo apt-get install xdotool

Compare (in a loop) two mouse positions, with a time interval:
The command to get the mouseposition from xdotool:

$ xdotool getmouselocation
x:1449 y:137 screen:0 window:79691788

If we parse this output in a (python) script, we can let it run a command if the mouse moves (if position1 does not equal position2):

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

def get_mousepos():
    curr = subprocess.check_output(["xdotool", "getmouselocation"]).decode("utf-8")
    return [int(it.split(":")[1]) for it in curr.split()[:2]]

current1 = get_mousepos()
while True:
    time.sleep(0.5)
    current2 = get_mousepos()
    if not current1 == current2:
        # run a command:
        print("action")
    current1 = current2

Using (python's) tkinter
The exact same process can also be done with python's own tkinter:

[you'd need tkinter3 to be installed]:

sudo apt-get install python3-tk

The script, using tkinter:

#!/usr/bin/env python3
from tkinter import*
import time

root = Tk()

def current_position():
    return [root.winfo_pointerx(), root.winfo_pointery()]

pos1 = current_position()
while True:
   time.sleep(0.5)
    pos2 = current_position()
    if not pos1 == pos2:
        # run a command:
        print("action!")
    pos1 = pos2

root.mainloop()

An example related to what you are aiming at

An example of what can be done to control what command to run when the mouse trespasses a certain position (line) below.

#!/usr/bin/env python3
import subprocess

def get_mousepos():
    curr = subprocess.check_output(["xdotool", "getmouselocation"]).decode("utf-8")
    return [int(it.split(":")[1]) for it in curr.split()[:2]]

current1 = get_mousepos()
while True:
    current2 = get_mousepos()
    # make the jump depend on the position and direction:
    jump = 100 if current2[1] < 525 else -100
    if current2[0] < 1000 and current1[0] >= 1000:
        print("gone left") # you can run any other command here, like:
        subprocess.Popen(["xdotool", "mousemove", str(current2[0]), str(current2[1]+jump)])
    elif current2[0] > 1000 and current1[0] <= 1000:
        print("gone right") # you can run any other command here
        subprocess.Popen(["xdotool", "mousemove", str(current2[0]), str(current2[1]-jump)])
    current1 = current2

In this example, the mouse makes a jump when you move it from left to right or vice versa:

In this case, the mouse jumps a fixed jump. However, throwing some mathematics in, and move the jump line to the right side of your screen (+ a separate "arrangement" for the top left of the second screen), you can make the jump proportionally, to create the setup that you where aiming at in your first question: make (in a dual screen setup) both screens seem of the same vertical resolution when moving the mouse from one screen to another.

The "dead corner" where you cannot move the mouse from one screen to another would not exist then. (I have a working situation on my two screens)

It would still have a strange effect with windows if they are are spread over the two screens however, but it can be done.

No, it's not possible without customizing drivers of your X environment.  There should be configuration-change methods to do what you want.


Install Ubuntu with windows 8 I need to install ubuntu alongside with my current version of Windows in my new computer
(I prefer UBUNTU but I still need windows to run some programs in my work place).

The point is that, in windows 8 I can not access BIOS as I did the first time that I installed ubuntu in my older computer.

Can somebody please provide me a detailed information about how to install Ubuntu without corrupting Windows 8

Thanks people.

Luis

Have you considered doing this in a virtual machine? It is a very good way to get familiar with Linux until you are ready to do something like a dual boot. It also eliminates the need for you to reboot your machine to get to the other OS.

Some options you have to do this:

VMware Player download

Virtualbox download

These are both free, and they allow you to install an entire OS inside a virtual machine.

If you look at the screenshot I have attached, you can see on the right half of the screen that I am running VMware Workstation, and I have several VMs installed. I have Windows 8 installed in a VM and it is active. The arrows point to some of the VMs that I have installed on this machine.

I am doing what I am suggesting to you, but in the opposite direction. I am working on a Linux OS for the host, and running Windows (and several other OSes) as a guest.

If you have any questions on how to get this working, let me know.

One thing to note - I've listed the free solutions. The "Workstation" version of VMware that I use, that has a paid license, but you can use it in trial mode for some period of time.


How do I stop skype from auto-launching I have Ubuntu 14.04 with Cinnamon. When I log in, Skype autolaunches and I want to stop that.
I looked in Startup Applications but cannot find it.

Had the same issue on Ubuntu 17.10 and fixed it with the following command:

rm ~/.config/autostart/skypeforlinux.desktop

And as Tim mentions here, disable autostart in the Skype settings because Skype will keep on adding the skypeforlinux.desktop file to the ~/.config/autostart directory.

[*] I know the question is about Ubuntu 14.04 but I came across this page while searching for a solution for Ubuntu 17

create a skypestop.sh file and make it executable. put this in:
sudo chmod 444 /usr/share/skypeforlinux/skypeforlinux
to start skype create a start file like skypestart.sh:
sudo chmod 755 /usr/share/skypeforlinux/skypeforlinux
skypeforlinux
when u finish using it run skypestop.sh and that is it
if your skype software is upgrades run skypestop.sh again as the upgrade overwrites the attributes.


Can adobe reader run from 64-bit Ubuntu? I installed it but when I try to run it nothing shows.

On Adobe's requirements for Ubuntu page it says: "32-bit Intel® Pentium® processor or equivalent"

Can I infer from it that adobe reader doesn't run on 64-bit processors in Ubuntu?

Adobe Reader can run on 64-bit Ubuntu, but it's a 32-bit program, so you need to install the 32-bit version of the libraries it depends on.  Since 12.04 Ubuntu uses the Multi Arch system to install dependencies like this.

First, install the 32-bit version of Adobe Reader's dependencies:

sudo apt-get install libgtk2.0-0:i386

Now we can install the 32-bit Acrobat Reader package downloaded from Adobe's Website:

sudo dpkg -i AdbeRdr9.5.5-1_i386linux_enu.deb

You'll need to run this command to get Adobe Reader to actually work:

sudo apt-get install ia32-libs


What does each governor mean on my device? What does each governor mean on my device?

CPU frequency and voltage scaling code in the Linux(TM) kernel

             L i n u x    C P U F r e q

          C P U F r e q   G o v e r n o r s

       - information for users and developers -

        Dominik Brodowski  <linux@brodo.de>
        some additions and corrections by Nico Golde <nico@ngolde.de>
    Rafael J. Wysocki <rafael.j.wysocki@intel.com>
       Viresh Kumar <viresh.kumar@linaro.org>

Clock scaling allows you to change the clock speed of the CPUs on the
fly. This is a nice method to save battery power, because the lower
the clock speed, the less power the CPU consumes.
Contents:

What is a CPUFreq Governor?

Governors In the Linux Kernel
2.1  Performance
2.2  Powersave
2.3  Userspace
2.4  Ondemand
2.5  Conservative
2.6  Schedutil

The Governor Interface in the CPUfreq Core

References

What Is A CPUFreq Governor?
==============================

Most cpufreq drivers (except the intel_pstate and longrun) or even most
cpu frequency scaling algorithms only allow the CPU frequency to be set
to predefined fixed values.  In order to offer dynamic frequency
scaling, the cpufreq core must be able to tell these drivers of a
"target frequency". So these specific drivers will be transformed to
offer a "->target/target_index/fast_switch()" call instead of the
"->setpolicy()" call. For set_policy drivers, all stays the same,
though.
How to decide what frequency within the CPUfreq policy should be used?
That's done using "cpufreq governors".
Basically, it's the following flow graph:
CPU can be set to switch independently   |     CPU can only be set
within specific "limits"       |       to specific frequencies
                             "CPUfreq policy"
    consists of frequency limits (policy->{min,max})
         and CPUfreq governor to be used
         /            \
        /              \
           /               the cpufreq governor decides
          /                (dynamically or statically)
         /                 what target_freq to set within
        /                  the limits of policy->{min,max}
       /                        \
      /                  \
Using the ->setpolicy call,      Using the ->target/target_index/fast_switch call,
    the limits and the            the frequency closest
     "policy" is set.             to target_freq is set.
                      It is assured that it
                      is within policy->{min,max}

Governors In the Linux Kernel
================================

2.1 Performance
The CPUfreq governor "performance" sets the CPU statically to the
highest frequency within the borders of scaling_min_freq and
scaling_max_freq.
2.2 Powersave
The CPUfreq governor "powersave" sets the CPU statically to the
lowest frequency within the borders of scaling_min_freq and
scaling_max_freq.
2.3 Userspace
The CPUfreq governor "userspace" allows the user, or any userspace
program running with UID "root", to set the CPU to a specific frequency
by making a sysfs file "scaling_setspeed" available in the CPU-device
directory.
2.4 Ondemand
The CPUfreq governor "ondemand" sets the CPU frequency depending on the
current system load. Load estimation is triggered by the scheduler
through the update_util_data->func hook; when triggered, cpufreq checks
the CPU-usage statistics over the last period and the governor sets the
CPU accordingly.  The CPU must have the capability to switch the
frequency very quickly.
Sysfs files:

sampling_rate:
Measured in uS (10^-6 seconds), this is how often you want the kernel
to look at the CPU usage and to make decisions on what to do about the
frequency.  Typically this is set to values of around '10000' or more.
It's default value is (cmp. with users-guide.txt): transition_latency

Be aware that transition latency is in ns and sampling_rate
is in us, so you get the same sysfs value by default.  Sampling rate
should always get adjusted considering the transition latency to set
the sampling rate 750 times as high as the transition latency in the
bash (as said, 1000 is default), do:

$ echo `$(($(cat cpuinfo_transition_latency) * 750 / 1000)) > ondemand/sampling_rate

sampling_rate_min:
The sampling rate is limited by the HW transition latency:
transition_latency * 100
Or by kernel restrictions:

If CONFIG_NO_HZ_COMMON is set, the limit is 10ms fixed.
If CONFIG_NO_HZ_COMMON is not set or nohz=off boot parameter is
used, the limits depend on the CONFIG_HZ option:
HZ=1000: min=20000us  (20ms)
HZ=250:  min=80000us  (80ms)
HZ=100:  min=200000us (200ms)

The highest value of kernel and HW latency restrictions is shown and
used as the minimum sampling rate.

up_threshold:
This defines what the average CPU usage between the samplings of
'sampling_rate' needs to be for the kernel to make a decision on
whether it should increase the frequency.  For example when it is set
to its default value of '95' it means that between the checking
intervals the CPU needs to be on average more than 95% in use to then
decide that the CPU frequency needs to be increased.

ignore_nice_load:
This parameter takes a value of '0' or '1'. When set to '0' (its
default), all processes are counted towards the 'cpu utilisation'
value.  When set to '1', the processes that are run with a 'nice'
value will not count (and thus be ignored) in the overall usage
calculation.  This is useful if you are running a CPU intensive
calculation on your laptop that you do not care how long it takes to
complete as you can 'nice' it and prevent it from taking part in the
deciding process of whether to increase your CPU frequency.

sampling_down_factor:
This parameter controls the rate at which the kernel makes a decision
on when to decrease the frequency while running at top speed. When set
to 1 (the default) decisions to reevaluate load are made at the same
interval regardless of current clock speed. But when set to greater
than 1 (e.g. 100) it acts as a multiplier for the scheduling interval
for reevaluating load when the CPU is at its top speed due to high
load. This improves performance by reducing the overhead of load
evaluation and helping the CPU stay at its top speed when truly busy,
rather than shifting back and forth in speed. This tunable has no
effect on behavior at lower speeds/lower CPU loads.

powersave_bias:
This parameter takes a value between 0 to 1000. It defines the
percentage (times 10) value of the target frequency that will be
shaved off of the target. For example, when set to 100 -- 10%, when
ondemand governor would have targeted 1000 MHz, it will target
1000 MHz - (10% of 1000 MHz) = 900 MHz instead. This is set to 0
(disabled) by default.
When AMD frequency sensitivity powersave bias driver --
drivers/cpufreq/amd_freq_sensitivity.c is loaded, this parameter
defines the workload frequency sensitivity threshold in which a lower
frequency is chosen instead of ondemand governor's original target.
The frequency sensitivity is a hardware reported (on AMD Family 16h
Processors and above) value between 0 to 100% that tells software how
the performance of the workload running on a CPU will change when
frequency changes. A workload with sensitivity of 0% (memory/IO-bound)
will not perform any better on higher core frequency, whereas a
workload with sensitivity of 100% (CPU-bound) will perform better
higher the frequency. When the driver is loaded, this is set to 400 by
default -- for CPUs running workloads with sensitivity value below
40%, a lower frequency is chosen. Unloading the driver or writing 0
will disable this feature.

2.5 Conservative
The CPUfreq governor "conservative", much like the "ondemand"
governor, sets the CPU frequency depending on the current usage.  It
differs in behaviour in that it gracefully increases and decreases the
CPU speed rather than jumping to max speed the moment there is any load
on the CPU. This behaviour is more suitable in a battery powered
environment.  The governor is tweaked in the same manner as the
"ondemand" governor through sysfs with the addition of:

freq_step:
This describes what percentage steps the cpu freq should be increased
and decreased smoothly by.  By default the cpu frequency will increase
in 5% chunks of your maximum cpu frequency.  You can change this value
to anywhere between 0 and 100 where '0' will effectively lock your CPU
at a speed regardless of its load whilst '100' will, in theory, make
it behave identically to the "ondemand" governor.

down_threshold:
Same as the 'up_threshold' found for the "ondemand" governor but for
the opposite direction.  For example when set to its default value of
'20' it means that if the CPU usage needs to be below 20% between
samples to have the frequency decreased.

sampling_down_factor:
Similar functionality as in "ondemand" governor.  But in
"conservative", it controls the rate at which the kernel makes a
decision on when to decrease the frequency while running in any speed.
Load for frequency increase is still evaluated every sampling rate.

2.6 Schedutil
The "schedutil" governor aims at better integration with the Linux
kernel scheduler.  Load estimation is achieved through the scheduler's
Per-Entity Load Tracking (PELT) mechanism, which also provides
information about the recent load [1].  This governor currently does
load based DVFS only for tasks managed by CFS. RT and DL scheduler tasks
are always run at the highest frequency.  Unlike all the other
governors, the code is located under the kernel/sched/ directory.
Sysfs files:

rate_limit_us:
This contains a value in microseconds. The governor waits for
rate_limit_us time before reevaluating the load again, after it has
evaluated the load once.

For an in-depth comparison with the other governors refer to [2].

The Governor Interface in the CPUfreq Core
=============================================

A new governor must register itself with the CPUfreq core using
"cpufreq_register_governor". The struct cpufreq_governor, which has to
be passed to that function, must contain the following values:
governor->name - A unique name for this governor.
governor->owner - .THIS_MODULE for the governor module (if appropriate).
plus a set of hooks to the functions implementing the governor's logic.
The CPUfreq governor may call the CPU processor driver using one of
these two functions:
int cpufreq_driver_target(struct cpufreq_policy *policy,
unsigned int target_freq,
unsigned int relation);
int __cpufreq_driver_target(struct cpufreq_policy *policy,
unsigned int target_freq,
unsigned int relation);
target_freq must be within policy->min and policy->max, of course.
What's the difference between these two functions? When your governor is
in a direct code path of a call to governor callbacks, like
governor->start(), the policy->rwsem is still held in the cpufreq core,
and there's no need to lock it again (in fact, this would cause a
deadlock). So use __cpufreq_driver_target only in these cases. In all
other cases (for example, when there's a "daemonized" function that
wakes up every second), use cpufreq_driver_target to take policy->rwsem
before the command is passed to the cpufreq driver.

References
=============

[1] Per-entity load tracking: https://lwn.net/Articles/531853/
[2] Improvements in CPU frequency management: https://lwn.net/Articles/682391/
source : https://www.kernel.org/doc/Documentation/cpu-freq/governors.txt


Freshly installed system boots slow - unable to understand kernel messages When my Ubuntu 10.04 PC stopped booting from one day to the next, I assumed that it is a boot loader problem. I managed to boot from a 11.10 live cd and installed a fresh 11.10 next to the old installation. That worked out, and I am able to mount the old partition and access its data without restrictions (so far).

All good - till the first reboot.

The PC starts extremely slow (2min plus), with no visible activity during the boot process:

dmesg

[   13.671431] ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[   19.616008] .
[   24.176004] eth1: no IPv6 routers present
[   26.688016] ..............not responding...
[  124.639436] sd 4:0:0:0: [sdc] READ CAPACITY failed
[  124.639439] sd 4:0:0:0: [sdc]  Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[  124.639443] sd 4:0:0:0: [sdc]  Sense Key : Not Ready [current]
[  124.639447] sd 4:0:0:0: [sdc]  Add. Sense: Logical unit is in process of becoming ready
[  126.661923] sd 4:0:0:0: [sdc] Test WP failed, assume Write Enabled
[  128.684411] sd 4:0:0:0: [sdc] Asking for cache data failed
[  128.684451] sd 4:0:0:0: [sdc] Assuming drive cache: write through

(See full output here.)

From googling around I found references to possibly missing udev rules, something I almost completely don't understand.

But as the whole story started with a failing boot loader, I cannot rule out that I have a general problem accessing the hard drive. What irritates me is the fact that the disk seems completely accessible after the boot process completed (SMART dialog / selftest: all good):

I bought the disk about a year ago, did not have any issues with it since then.

Can someone shed light on what is happening and how to resolve it?

Update: Writing this, I recall that booting into the Live-CD took ages too. So I assume that from the very first moment on when the problems occurred, I'm having this (kernel?) issue.

Update2: My pc is a desktop with Intel® Core™2 Quad CPU Q9650 @ 3.00GHz & 8 giga RAM on a Gigabyte EP35C-DS3R main board. Running on Linux since day one of its existence :-)

Update3: (@Githlar) The message actually repeats once. I posted the whole output here.

Update4 Tried to change BIOS to AHCI (RAID / AHCI / disabled, was disabled before) - no change

Update5 Bought a new disk, installed new Ubuntu - same result (same error, different timing). This seems to rule out the disk and bring the mainboard into attention, what do you guys think?

'Fixed' issues with purchase of a new mainboard. Thanks to everyone who helped.
Thanks for the downvote.


Why should users never use normal sudo to start graphical applications? I've read the comunity "RootSudo" documentation and am interested in this line:

  You should never use normal sudo to start graphical applications as Root.

Why? What is the difference? Please provide a simple explanation, as I'm just a normal desktop user.

In Ubuntu 19.10 and later, the admonition in that article (and in this answer) no longer applies. See WinEunuuchs2Unix's answer as well as this question.

Graphical applications often store settings and other user-specific data in configuration files written inside the user's home folder. The main mechanism applications use to determine what they should use as the user's home folder is the HOME environment variable. (You can inspect it yourself with echo $HOME).

Suppose you're running gedit (a graphical text editor) as root. If you run sudo gedit, HOME will continue to point toward your home directory, even though the program is running as root. Consequently, gedit will write configuration files as root into your home directory. This will sometimes result in the configuration files being owned by root and thus inaccessible to you (when you later run the program as yourself and not as root). This mainly happens when the application has to create a new configuration file. Newly created files, by default, are owned by the user who creates them (who in this case is root, not you).

That's the primary reason why you should run graphical applications with a graphical sudo frontend rather than with straight sudo. In Ubuntu and most of its derivatives (including Xubuntu and Lubuntu), the standard graphical frontend is gksu/gksudo. In Kubuntu it is kdesudo. (It depends on the desktop environment being used.)

If you want to use sudo directly to run a graphical application like gedit, you can run:

sudo -H gedit

The -H flag makes sudo set HOME to point to root's home folder (which is /root).

That still won't automatically handle the ownership of .Xauthority by copying it to a temp folder (this is the other thing that graphical sudo frontends take care of for you). But in the infrequent event that .Xauthority is inaccessible, you'll get an error saying it is, and then you can fix the problem by deleting it (sudo rm ~/.Xauthority), as it's automatically regenerated. Thus, protecting .Xauthority's ownership and permissions is less important than protecting the ownership and permissions of configuration files.

In contrast to a root-owned .Xauthority, when configuration files become owned as root, it's not always as obvious what the problem is (because graphical programs will often run, but not work very well, and output any useful errors to the console). And it's sometimes a bigger hassle to fix, especially if you're in a situation where you want one or more files in your home directory to be owned by someone other than you (because then you cannot fix it simply by recursively chowning all your files back to yourself).

Therefore, sudo (at least without -H) should not be used to run a graphical application unless you are highly familiar with the app's inner workings and know for sure that it does not ever attempt to write any configuration files.

Ubuntu 19.10 update
As of Ubuntu 19.10, typing sudo some_command now has the same effect as typing sudo -H some_command. This means the directory for any configuration files touched will be under /root directory and not /home/regular_userID directory (aka $HOME).
This makes this whole Q&A a moot point to a large degree for Ubuntu 19.10 users and greater.
To see whether sudo is working like sudo -H in your distribution try these short tests:
$ sudo printenv | grep HOME
HOME=/home/rick

$ sudo -H printenv | grep HOME
HOME=/root

As you can see, sudo above does not perform like sudo -H so using plain sudo can harm your user configuration files.

An alternative to gksu nautilus, gksu gedit or sudo -H gedit is to use the nautilus-admin add-on. It allows you to browse files and directories with Nautilus and then open them as root (Administrator).
Installation is straight forward:
sudo apt install nautilus-admin

Now when you are in Nautilus you'll have an extra option to Edit as administrator:

gedit as root doesn't allow preferences
When you run gedit as root you can't use the preferences you've set up as a regular user for tab stops, convert tabs to spaces, font name, font size, line wrap, etc.
To solve this I've written the script sgedit to inherit user preferences and apply them to root: How can I sync my root gedit with my user gedit's preferences?

Call using sgedit filename1 filename2 ...
Gets user's gedit settings for tab stops, fonts, line-wrap, etc.
Elevates to sudo -H to preserve file ownership whilst getting root powers.
Requests password if last sudo has timed out.
Gets sudo's gedit settings
Compares differences between user and sudo gedit settings
Runs gsettings set on the differences only (reduces 174 set commands to a dozen or less. Next time it's run perhaps only one or two changes but often times no changes.
Calls gedit as a background task such that terminal prompt reappears immediately.


How to use American English spelling dictionary in Firefox? My Firefox spellchecker was complaining this morning that I spelled 'neighbor' in the American English style, not the British English style ('neighbour').  Same is true for color (colour), analyze (analyse), etc.  I've checked in the edit->preferences->content->language tab, and en-us is selected.  I also found this link here:

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

Suggesting that there's some kind of system panel I can use to ensure that I've got the right language, but I can't see where that is (I guess that's for an older Ubuntu that let people get to system settings).

So either the dictionary for Firefox for en-us is corrupted, just a copy of the British English dictionary, or somehow the setting isn't propagated properly.  How can I get the American dictionary back?

In a text field, open a context menu by pressing the right mousebutton.
Select Check Spelling if needed
In the Languages menu, select English / United States

If this did not work, (re-)install the hunspell-en-us package.

Firefox seems to randomly use any one of the installed dictionaries.   Several English dictionaries get installed by default in Ubuntu.  The solution is to remove all but the US English dictionary using apt-get.

From How can I change Firefox's default dictionary?, Insperatus posted this useful command.

sudo apt-get remove myspell-en-au myspell-en-gb myspell-en-za hunspell-en-ca && sudo apt-get install myspell-en-us

Before:

After:


SD card is not mounted in Lubuntu I have a 2 GB Transcend SD card for my camera, but when I entered it in my laptop's SD slot then it was not mounted automatically by Lubuntu. I did not have the same problem with Ubuntu. I can not see it either in the graphical Storage Device Manager.

I tried the following workarounds on the bugs mentioned in 1 and 2, but the problem still persists.

Kernel Version: 3.5.0-25-generic

OK, I tried dmesg and here are the steps:

dmesg output:

[ 9219.520160] mmc0: Timeout waiting for hardware interrupt.
[ 9229.536177] mmc0: Timeout waiting for hardware interrupt.
[ 9239.552162] mmc0: Timeout waiting for hardware interrupt.
[ 9243.048896] mmc0: Card removed during transfer!
[ 9243.048908] mmc0: Resetting controller

lspci output:

00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03)
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)
00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)
00:1b.0 Audio device: Intel Corporation NM10/ICH7 Family High Definition Audio Controller (rev 02)
00:1c.0 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 1 (rev 02)
00:1c.1 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 2 (rev 02)
00:1c.2 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 3 (rev 02)
00:1d.0 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #1 (rev 02)
00:1d.1 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #2 (rev 02)
00:1d.2 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #3 (rev 02)
00:1d.3 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #4 (rev 02)
00:1d.7 USB controller: Intel Corporation NM10/ICH7 Family USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 02)
00:1f.2 SATA controller: Intel Corporation 82801GBM/GHM (ICH7-M Family) SATA Controller [AHCI mode] (rev 02)
00:1f.3 SMBus: Intel Corporation NM10/ICH7 Family SMBus Controller (rev 02)
05:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection (rev 02)
06:04.0 FireWire (IEEE 1394): O2 Micro, Inc. Firewire (IEEE 1394) (rev 02)
06:04.2 SD Host controller: O2 Micro, Inc. Integrated MMC/SD Controller (rev 01)
06:04.3 Mass storage controller: O2 Micro, Inc. Integrated MS/xD Controller (rev 01)
06:05.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)

How can I resolve this issue?

I also tried it with Linux Mint (Linux version 3.5.0-17-generic) in my laptop, and it still does not work...

MountManager is described as "The program for mounting of storage devices, flash cards, removable disks in Linux". Even if it doesn't solve your problem completely, MountManager will make it easier for you to mount and unmount your SD card manually. MountManager is no longer available from the default Ubuntu repositories for versions of Ubuntu newer than Ubuntu 12.10 and instead you can use the Disks application which is installed by default in Ubuntu.

You can take a look at a screenshot of mountmanager by searching for it in Synaptic Package Manager and clicking on "Get Screenshot", and you can also install it from Synaptic.

First check if really not mounted:

mount  -l

If not, try to mount it manually:
http://manpages.ubuntu.com/manpages/hardy/man8/mount.8.html shows you how to do this. Looks complicated, but is pretty simple after you have done it once.


Downloading Ubuntu 16.04 I was downloading Ubuntu 16.04 but it has downloaded a 4.86MB iso file whereas the 1.4 GB ubuntu download is still going on. Can anyone tell me why 2 files are being downloaded?

Welcome to AskUbuntu!

There is no 4.86 MB Ubuntu ISO file; the absolute smallest one is 54MB.
It's possible that your browser is storing the partial download in a temporary file; you can check to see if that file's size changes as your download progresses. If it is increasing in size, then your download is probably fine, and your browser will automatically merge the two files when the download is complete.

If you're having persistent download issues, you could try using a different browser, a download manager, or use the torrent download option for the Ubuntu ISO: http://www.ubuntu.com/download/alternative-downloads

this maybe due to two reasons of which both are not harmful in any way to your download

1) You must be using firefox because this has happened to me a lot of times (mainly in the case of rar/zip files)

When I download a file,

Firefox does 2 things: changes the file name to gobbledy-gook of letters and numbers, AND, adds a .part extension -- therefore the files won't open. This is a NEW problem.

If I manually remove the .part extension in the download folder, the file will open, but I still have the problem of the name change. I believe that the .part extension is supposed to go away when the download is finished, Also, my downloads always used to come with their original name, not a numbers/letters name.

2)Your Antivirus has some serious permissions which you might have given it while installation

so each and every part of data is reviewed for virus and put in another temporary file until the whole download is complete


Duplicity/Deja-dup - full backup frequency I setup Ubuntu backup functionality to backup my home directory. It takes full backup in a month period. Is there a possibility to change frequency of full backups? I want to setup duplicity to create only seven incremental backup and next it will be full backup. Where I can change it?

Yeay! I found it! :D First install dconf-editor:

sudo apt-get install dconf-editor

Second run dconf-editor. In path /org/gnome/deja-dup/ is a key full-backup-period. Default is 90 days - every 90 days full backup is running. Changing that value is changing full backup frequency.

check the manpage
 http://duplicity.nongnu.org/duplicity.1.html

parameter --full-if-older-than


Detect internet connection On Windows, if there's no internet connectivity for whatever reason and the connection to the network is perfectly fine, a small icon shows on the network icon in the notification area. Is there any way to do the same on Ubuntu?

Even that is not necessary, I just want to know what ways are there to find if the internet connection is lost or not.

No ping to x website please, I've faced a few instances of DNS outage and ping failure can be due to DNS down time, not internet connectivity.

UPDATE

Thanks for all those interesting answers. My actual aim of this question was to know if there was a method to know the status of my connection at the local level (connection between the machine and AP), which is why I said no ping to x website please. The LAN private address that was mentioned by Alain is something that comes close. If I can diagnose that, I can rule out AP/network issues, then move onto diagnosing the actual connection to my ISP.

The command ip link show shows the status of available interfaces. At least one of the interfaces on needs be listed as UP in order for you to have any connectivity at all.

The command ip neigh show shows local link state, like this:

192.168.0.1 dev eth0 lladdr 00:15:e9:ec:cc:80 REACHABLE

You need at least one REACHABLE to have network access.

The command ip addr show shows all interfaces and their IP addresses.

Once you have a local IP address and a neighbor's IP address, you can then use ping or another tool to verify local IP connectivity.

What Ubuntu version are you using? On Meerkat and Lynx there is NetworkManager Applet that shows up at the top panel, right side where the indicators are at. It should be there by default. I have not installed any version as mentioned that didn't include the network applet.

If you can't find it there, you must've removed it by mistake. You can add it again by right clicking on the top panel and selecting Add to Panel where you will find a list of applets to choose from. Select the appropriate one.

Now depending on your icon theme, the indicating icon that there is no connection varies. Try to click on the applet and select disconnect, see what happens. When there is no Internet connection, it will show that icon and will indicate with a message that your connection is lost.


How do I get the compiz snow plugin working? i've got some trouble installing the snow plugin in Ubuntu 11.10.

I found some tutorials to build it from git but it won't work for me. Spent all day long to get it run but it won't. So Is there anybody with an answer how to get unsupported compiz plugins, or just the snow plugin run?

This plugin is probably not supported for Compiz 0.9.x, from the errors you have been getting.

In a nutshell, you cannot install it in 11.10, unless it is ported to Compiz 0.9.x.

Do you have the error message it generated please?

You need to install these packages - using

sudo apt-get install compiz-fusion-bcop compiz-dev compizconfig-settings-manager build-essential libtool libglu1-mesa-dev libxss-dev libcairo2-dev git-core

Then you should probably create a director (mkdir) ~\compiz

Navigate to the directory in terminal and

git clone git://anongit.compiz-fusion.org/fusion/plugins/snow

Download this file to the correct directory: https://sites.google.com/site/oreaus/snow.tar?attredirects=0

Make sure the directory is now ~\compiz\snow

Execute:

make
make clean
make install

Open compizconfig-settings-manager and activate the plugin.