Access forbidden 403 error in xampp I am very new to xampp. I have made a fresh xampp install with the following commands.

sudo su
cd /tmp
wget bit.ly/1cmyrUo -O xampp-32bit.run
chmod 777 ./xampp-32bit.run
sudo ./xampp-32bit.run

Then I made a perl file to check whether my xampp works. The following is my sample.pl file content.

#!usr/bin/perl
print "content-type:text/html\n";
print(header());
use CGI qw(:standard);
print(start_html());
print "Hello. I am ram";
print(end_html());

After copying my perl file from /home/vicky/desktop to /opt/lampp/cgi-bin.

I started my xampp with the following command.

/opt/lampp/lampp start

Then I ran my sample.pl in the localhost with the help of the http://localhost/cgi-bin/sample.pl in my mozilla browser. I just got the following window.

I found only answers relating to the 'new security concept error' and 'accessing virtual host issue'.

I did came across an askubuntu query, a bid similar to that of mine. It had no answers but some comments. One comment suggested to change the file permissions. It directed to get help from here.

It said to change the directory permission as 755 and file permission as 644 to resolve this kind of issue. When I tried to do that, I came to know that my cgi-bin directory already had 755 permission and my sample.pl had 644 permission. I have no solutions now.

PostScript: I have attached the content of my /opt/lampp/apache2/conf/httpd.conf file. Hope this will help the answer-providers to understand my problem completely.

Alias /bitnami/ "/opt/lampp/apache2/htdocs/"
Alias /bitnami "/opt/lampp/apache2/htdocs"

<Directory "/opt/lampp/apache2/htdocs">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

As I can see in your question, you are using Apache 2.4.7, but your httpd.conf use Apache 2.2 directive.

According to Apache 2.4 manual:

  Access control

  In 2.2, access control based on client hostname, IP address, and other
  characteristics of client requests was done using the directives
  Order, Allow, Deny, and Satisfy.

  In 2.4, such access control is done in the same way as other
  authorization checks, using the new module mod_authz_host. The old
  access control idioms should be replaced by the new authentication
  mechanisms, although for compatibility with old configurations, the
  new module mod_access_compat is provided.

Try this changes:

<Directory "/opt/lampp/apache2/htdocs">
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>

Allow and deny directive controls which hosts can or can't access an area of the server, Require tests whether an authenticated user is authorized according to a particular authorization provider and the specified restrictions. Require all granted means access is allowed unconditionally, let see Beyond just authorization

Update after reading configuration file:

Your default configuration file is right. The problem is wrong shebang in perl script.

Try this:

  #!/usr/bin/perl

Also:

  chmod +x /opt/lampp/cgi-bin/yourScript.pl

Here is a useful link about file permission problem

Second update

Change http content header:

  print "Content-type:text/html\n";

This header is read by apache.

You apache is running as daemon user, check if each directory in script path are readable.

$ cd /opt/lampp
$ sudo chmod 777 -R htdocs

And edit httpd.conf (with something like sudoedit /opt/lampp/etc/httpd.conf) and change:

<Directory />
    AllowOverride none
    Require all denied
</Directory>

To:

<Directory "/opt/lampp/apache2/htdocs">
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>


How to configure HTTP proxy with authentication on Ubuntu WSL on windows 10? I am using Ubuntu WSL on Windows 10. How to configure HTTP proxy with authentication on it?

cntlm proxy for NTLM authentication

I am assuming your proxy requires a NTLM based user authentication, which will not work with the credentials specified in $HTTP_PROXY. A NTLM capable proxy this required for that: e.g. cntlm.

Install cntlm proxy

The default way of installing the proxy would be to use sudo apt-get install cntlm, but without any proxy this will obviously fail. You need to manually download the package cntlm_0.92.3-1ubuntu1_amd64.deb and copy it into your WSL instance.

Install the package with

$ sudo dpkg -i cntlm_0.92.3-1ubuntu1_amd64.deb

Configure cntlm proxy

The cntlm proxy requires proper NTLM-Proxy configuration in /etc/cntlm.conf:

# /etc/cntlm.con
Domain      Domain
Username    username
Proxy       1.2.3.4:5678
NoProxy     localhost, 127.0.0.*, 10.*, 192.168.*
Listen      3128

This is the minimal required configuration for cntlm. Test and verify cntlm with the following command:

$ cntlm -M http://www.google.com
cntlm: Starting cntlm version 0.92.3 for LITTLE endian

cntlm: Proxy listening on 127.0.0.1:3128

cntlm: Workstation name used: hostname

Password:

If the authentication is successful, generate hashes for the authentication by using the -H switch:

$ cntlm -H
cntlm: Starting cntlm version 0.92.3 for LITTLE endian

cntlm: Proxy listening on 127.0.0.1:3128

cntlm: Workstation name used: somehost

cntlm: Using following NTLM hashes: NTLMv2(1) NT(0) LM(0)

Password:
PassLM          123456789ABCDEF123456789ABCDEF12
PassNT          123456789ABCDEF123456789ABCDEF12
PassNTLMv2      123456789ABCDEF123456789ABCDEF12    # Only for user 'username', domain 'Domain'
cntlm: Terminating with 0 active threads

Add the three hashes PassLM, PassNT and PassNTLMv2 to the cntlm configuration file /etc/cntlm.conf. Then activate the proxy via systemd:

$ sudo systemctl restart cntlm

Now the proxy should listen on your localhost at port 3128.

Configure proxy

Now you can configure the proxy as described in this post but use:

$ export http_proxy=http://localhost:3128/
$ export https_proxy=http://localhost:3128/

From your bash shell:

export http_proxy=http://[username]:[password]@[proxy-webaddress]:[port]

and possibly

export https_proxy=https://[username]:[password]@[proxy-webaddress]:[port]

Username and password are often Windows domain credentials.  If the password contains any special characters, you may need to escape the special characters with a backslash to protect them from the shell. For example, if your Windows account is "gomer" with a password of "Pea$1rzz", and your proxy server is bluecoat.acme.com on port 8080, then you would say

export http_proxy=http://gomer:Pea\$1rzz@bluecoat.acme.com:8080
export https_proxy=https://gomer:Pea\$1rzz@bluecoat.acme.com:8080

echo $http_proxy
echo $https_proxy

should show the correct credentials.  You'll need to do this for each shell.  So, if you're wanting to do some work with apt, it may be more convenient to open a root shell

sudo bash

before setting your proxies.


How to move GNOME's Application Launcher from bottom to top in Ubuntu 17.10? I've just upgraded from Ubuntu 16.04 LTS to Ubuntu 17.10. I was a fan of Unity desktop environment but after upgrading, I saw that GNOME is also a nice one ('cause it is also very similar to Unity). But there is one thing that makes me uneasy is that Application Launcher is in the bottom. Can't I move it to top-left corner (as it was in Unity)?

Open Terminal and run

gsettings set org.gnome.shell.extensions.dash-to-dock show-apps-at-top true

To move it back to the bottom run

gsettings set org.gnome.shell.extensions.dash-to-dock show-apps-at-top false

It may be a difficult task to move the application launcher to top. Instead, you can install Unity to your system. Here is how:

Install Unity by executing this in terminal:

sudo apt install unity

Reboot your system.
Select "Unity" as desktop environment (by clicking the little cog-wheel beside the sign-in button).
Log in by typing in your password.

Done. You can now see that Unity is installed and you also got the application launcher in the top-left of the screen.


How to install libjawt.so in ubuntu 14.10 I am trying to use webex in Ubuntu 14.10.

I followed another question on this topic. How to I make Cisco WebEx work with 13.10 64bit?.

I need to install libjawt.so dependency in my system.

I tried apt-file search libjawt.so which shows many possible libraries with libjawt.so.

gcc-snapshot: /usr/lib/gcc-snapshot/lib/gcj-5.0.0-15/libjawt.so
gcc-snapshot: /usr/lib/jvm/java-1.5.0-gcj-5.0-snap-amd64/jre/lib/amd64/libjawt.so
gcj-4.8-jre: /usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre/lib/amd64/libjawt.so
gcj-4.9-jre: /usr/lib/jvm/java-1.5.0-gcj-4.9-amd64/jre/lib/amd64/libjawt.so
libgcj14-awt: /usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/lib/libjawt.so
libgcj14-awt: /usr/lib/x86_64-linux-gnu/gcj-4.8-14/libjawt.so
libgcj14-dbg: /usr/lib/debug/usr/lib/x86_64-linux-gnu/gcj-4.8-14/libjawt.so
libgcj15-awt: /usr/lib/jvm/java-1.5.0-gcj-4.9-amd64/lib/libjawt.so
libgcj15-awt: /usr/lib/x86_64-linux-gnu/gcj-4.9-15/libjawt.so
libgcj15-dbg: /usr/lib/debug/usr/lib/x86_64-linux-gnu/gcj-4.9-15/libjawt.so
openjdk-6-dbg: /usr/lib/debug/usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64/libjawt.so
openjdk-6-jre-headless: /usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64/libjawt.so
openjdk-7-dbg: /usr/lib/debug/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/libjawt.so
openjdk-7-jre-headless: /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/libjawt.so
openjdk-8-jdk: /usr/lib/jvm/java-8-openjdk-amd64/lib/amd64/libjawt.so
openjdk-8-jre-headless: /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/libjawt.so

I tried installing gcc-snapshot:i386 causing dependency broken in my system.

I have also tried installing other dependencies but still not working.

http://pedroalves-bi.blogspot.com/2014/05/setting-up-webex-on-ubuntu-1404-64-bits.html says that libjawt.so really is not required for webex to be running successfully and I can confirm that as for my Debian 8 host.

I was not able to discover a package which would install the file on place where it would be discovered by dynamic linker.

I've tried to create a symlink, but that's a hack and as we can see is not really required.


How do I set Xmodmap on login? As my keyboard layout doesn't suit me, I run xmodmap on login. The script is named .profile and it runs OK, but it breaks the Unity interface.

I want to know where to put the xmodmap line so that it executes on my login and doesn't break anything.

I have already tried putting it in the .bash_login and .bash_profile files, without success (xmodmap doesn't set my keyboard).

What are my options?

The correct place to put xmodmap ~/.Xmodmap (so that your changes are read at startup) is in ~/.xinitrc (see explanation below), although you could alternately place the xmodmap command as a startup item (/usr/bin/xmodmap /home/user/.Xmodmap). I can say that for 12.04 (and presumably 12.10) that these two alternatives definitely do work, as either way they are read after you log in with lightdm. (I changed Return to Right Shift, and the change only took effect after entering my password and logging in).

Please note: if you are on Xfce, it is noted on the official Xfce FAQ that you may have to create a startup item instead of using ~/.xinitrc, and that you might have to delay the execution so the xmodmap changes are not overwritten by setxkbmap. You can use a delay to achieve this in your startup entry:

/bin/bash -c "sleep 20; /usr/bin/xmodmap /home/$USER/.Xmodmap"

(For the startup entry it is necessary to specify absolute paths)

Each time setxkbmap is run to change keyboard layout, you will have to run xmodmap ~/.Xmodmap again in the terminal.

Creating ~/.xinitrc

Create a file in your home folder called .xinitrc with

touch .xinitrc

and place in it:

xmodmap ~/.Xmodmap

Your Xmodmap file should not have entries in the xmodmap -e " " style as that is used in the terminal for temporarily setting the values. It must have entries in this format:

keycode 65 = Tab
keycode 23 = Space

It is often confusing which of the various X files (such as .xprofile, .xinitrc, etc) are read at startup, but .xinitrc does seem to be still read under 12.04, whereas .Xmodmap or .xinputrc are not read by themselves.

Putting xmodmap changes in ~/.bashrc or /etc/bash.bashrc doesn't break anything.

Only downside is that one has to open a terminal after each boot to get it activated.


Enabling SSL in MySQL I'm running Ubuntu Server 12.04, and I want to enable SSL connections to MySQL.

I've generated the following keys/certs files with OpenSSL:

ca-cert.pem
server-cert.pem
server-key.pem

I stored these at /etc/mysql, then added added the following lines to /etc/mysql/my.cnf:

ssl-ca=/etc/mysql/ca-cert.pem
ssl-cert=/etc/mysql/server-cert.pem
ssl-key=/etc/mysql/server-key.pem

Next, I restarted the server with sudo service restart mysql.

However, this doesn't seem to enable SSL. Within a mysql session:

mysql> show variables like '%ssl%';
+---------------+----------------------------+
| Variable_name | Value                      |
+---------------+----------------------------+
| have_openssl  | DISABLED                   |
| have_ssl      | DISABLED                   |
| ssl_ca        | /etc/mysql/ca-cert.pem     |
| ssl_capath    |                            |
| ssl_cert      | /etc/mysql/server-cert.pem |
| ssl_cipher    |                            |
| ssl_key       | /etc/mysql/server-key.pem  |
+---------------+----------------------------+

Any ideas what I'm missing? Thanks

Ubuntu 12.04 comes with a OpenSSL 1.0.1, which has somewhat different defaults than the older OpenSSL 0.9.8 version.

Among other things, if you're using openssl req -newkey rsa:2048 to generate an RSA key, you'll end up with a key in a format called PKCS #8.  Represented in the PEM format, these keys have the more generic -----BEGIN PRIVATE KEY----- header, which doesn't tell you what kind (RSA, DSA, EC) key it is.

Previously, with OpenSSL 0.9.8, keys were always in a format called PKCS #1, which represented as PEM, had the header -----BEGIN RSA PRIVATE KEY-----.

Because of this you cannot simply change the header and footer from:

-----BEGIN PRIVATE KEY-----

to

-----BEGIN RSA PRIVATE KEY-----`

It's not the same thing and it won't work.  Instead you need to convert the key to the old format using openssl rsa.  Like this:

openssl rsa -in key_in_pkcs1_or_pkcs8.pem -out key_in_pkcs1.pem

MySQL (v5.5.35) on Ubuntu 12.04 is using an SSL implementation called yaSSL (v2.2.2).  It expect keys to be in the PKCS #1 format and doesn't support the PKCS #8 format used by OpenSSL 1.0 and newer.  If you simply change the header and footer, as suggested by other posts in this thread, MySQL/yaSSL won't complain, but you'll be unable to connect and instead end up with an error like this:

ERROR 2026 (HY000): SSL connection error: protocol version mismatch

Ubuntu 14.04 comes with OpenSSL 1.0.1f and new settings.  Among other things, it will generate certificates with SHA256 digests instead of SHA1, which was used in earlier versions.  Incidentially, the yaSSL version bundled with MySQL doesn't support this either.

If you're generating certificates for use with MySQL, remember to make sure the RSA keys are converted to the traditional PKCS #1 PEM format and that certificates are using SHA1 digests.

Here's an example of how to generate your own CA, a server certificate and a client certificate.

# Generate a CA key and certificate with SHA1 digest
openssl genrsa 2048 > ca-key.pem
openssl req -sha1 -new -x509 -nodes -days 3650 -key ca-key.pem > ca-cert.pem

# Create server key and certficate with SHA1 digest, sign it and convert
# the RSA key from PKCS #8 (OpenSSL 1.0 and newer) to the old PKCS #1 format
openssl req -sha1 -newkey rsa:2048 -days 730 -nodes -keyout server-key.pem > server-req.pem
openssl x509 -sha1 -req -in server-req.pem -days 730  -CA ca-cert.pem -CAkey ca-key.pem -set_serial 01 > server-cert.pem
openssl rsa -in server-key.pem -out server-key.pem

# Create client key and certificate with SHA digest, sign it and convert
# the RSA key from PKCS #8 (OpenSSL 1.0 and newer) to the old PKCS #1 format
openssl req -sha1 -newkey rsa:2048 -days 730 -nodes -keyout client-key.pem > client-req.pem
openssl x509 -sha1 -req -in client-req.pem -days 730 -CA ca-cert.pem -CAkey ca-key.pem -set_serial 01 > client-cert.pem
openssl rsa -in client-key.pem -out client-key.pem

The SSL startup options should be near the top of your my.cnf file or they might be ignored. I had problems running mysql 5.6 on RHEL 6.4 where the SSL variables were being ignored, I had them at the end of the my.cnf file. I moved them at the top of the file (just below [mysqld]) then I restarted the server and everything was fine.


How do I delay USB startup on boot? I am using Zoneminder with a USB web-cam and also analogue inputs from a PCI capture card. Sometimes when the server boots, USB is detected first (and assigned /dev/video0) and at other times the capture card is detected first (and assigned /dev/video0 - /dev/video3 as its a 4 channel card) and USB is assigned /dev/video4.
I am after some way to force the system to only detect USB and the Capture Card in a certain order so the assignments don't change between boots.

Try looking into using udev rules.  You can create symlinks to the underlying device so no matter which order they are detected you use the alias name that never changes.  See "Writing udev rules" by Daniel Drake (dsd).


dual boot with ubuntu 16.04 in primary and windows 7 in extended partition I followed these steps to install win7 on my ubuntu system-

Created a logical ntfs partition. (dev/sda6)
Installed win7 into that partition using a windows bootable usb.  Now I lost the option to boot into ubuntu.
Then I used an ubuntu live usb to run boot-repair. Now I can boot into ubuntu (on dev/sda3) but lost the option to boot into windows.

Can someone please help so that I can boot into either OS?

Here is the boot-info-
https://paste2.org/LINU6Uyf

Windows needs a primary partition to boot from, not a logical partition like sda6.  You might be able to use sda2 (converted to ntfs) as a Windows boot partition,and leave the bulk of the Windows on sda6, but instructions for that are inappropriate for this site.  Backup, Wipe the disk partitions, install Windows first, shrink Windows partition, and install Ubuntu, which does not care if it is in a logical partition.

basically you boot into linux from hdd and inside of a root terminal execute

update-grub

or you do a fast google search and from already answered posts you edit /boot/grub/grub.cfg and after the last menuentry you add

menuentry "Windows 7 (loader) (on /dev/sda1)" {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
chainloader +1
}

taking care to specify the partition your windows is;
found solution here

`How do I manually add windows 7 to grub list?

Add Windows 7 to boot menu

grub2 add entry for Windows 7

How to boot into Windows 7 when grub is installed in the Windows partition?
`


How do I install a different Python version using apt-get? How can I install a different version of Python using apt-get?

Obviously I realise I can install using the source tar ball, however I would prefer not to install from source and instead use the package manager, as that's what it's there for. Surely somewhere reputable builds .deb files for the latest Python releases (why python.org don't is beyond me) that I can reference.

What do I need to do to reference them and what issues might it create when upgrading to the next version?

If there is no way except for building from source, is there a (pseudo) package that I can can install that will provide all of the dependencies needed without having to find and install each individually? So that I don't get:

The necessary bits to build these optional modules were not found:
_bz2                  _curses               _curses_panel
_dbm                  _gdbm                 _lzma
_sqlite3              _ssl                  _tkinter
readline              zlib

Felix Krull runs a PPA offering basically any version of Python (seriously, there is 2.3.7 build for vivid...) for many Ubuntu releases at https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa.

Do the usual:

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.5

It will not overwrite your existing python3.4 which is still symlinked as python3.

DON'T change the symlink! There are apparently many system functions that don't work properly with python3.5.

I tried this and afterwards couldn't open a terminal, software updater,...

cd /usr/bin
sudo rm python3

The upgrade to Wily will adapt the meta-package python3 to point to python3.5. I don't expect any breakage, but at this point the foreign repository is not needed anymore. So to be really safe, you can purge the PPA before doing the upgrade.

I would consider using virtual environments instead of installing python versions via apt-get.

Using virtual environments, see here,  are a good practice for developing with python. They let you isolate your python environment from the system installed python versions.

In addition you don't have to get sudo access while installing any library (via pip etc.).


2 finger scrolling not working on ASUS UX305UA I've just bought this new laptop and installed ubuntu 14.04 on it, everything is working great except the two finger scrolling... I tried to run this commands:

sudo apt-get install linux-generic-lts-wily

And this one:
sudo apt-get install linux-generic-lts-vivid
But it didn't work. Here is the output of xinput; dmesg | grep pnp:

⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ ELAN0100:00 04F3:0401                     id=10   [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
↳ Power Button                              id=6    [slave  keyboard (3)]
↳ Video Bus                                 id=7    [slave  keyboard (3)]
↳ Sleep Button                              id=8    [slave  keyboard (3)]
↳ USB2.0 HD UVC WebCam                      id=9    [slave  keyboard (3)]
↳ Asus WMI hotkeys                          id=11   [slave  keyboard (3)]
↳ AT Translated Set 2 keyboard              id=12   [slave  keyboard (3)]
[    0.227630] pnp: PnP ACPI init
[    0.227918] pnp 00:01: Plug and Play ACPI device, IDs PNP0b00 (active)
[    0.228078] pnp 00:04: Plug and Play ACPI device, IDs ATK3001 PNP030b (active)
[    0.229806] pnp: PnP ACPI: found 9 devices
[    0.523222] i8042: PNP: PS/2 appears to have AUX port disabled, if this is incorrect please boot with i8042.nopnp

Thanks!

If you are on 15.10 you can upgrade to the 4.5.1 kernel to fix the touchpad, it worked for me.
You can get it here:
http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.5.1-wily/

You will need the following files:

linux-headers-4.5.1-040501-generic_4.5.1-040501.201604121331_amd64.deb
linux-headers-4.5.1-040501_4.5.1-040501.201604121331_all.deb
linux-image-4.5.1-040501-generic_4.5.1-040501.201604121331_amd64.deb

Then install them with sudo dpkg -i linux-*-4.5.1-*.deb

1) Go to System Settings>Software & Updates;
2) On Ubuntu Software;
3) Make sure you have everything checked from Downloadable from the Internet except source code;
4) On the Other Software tab check Canonical Partners and Independent;
5) On Updates tab check Important security updates,Recommended updates and Unsupported updates and uncheck Pre-released updates;
6) Run sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade
7) Reboot and tell us if something changed.


How to install wireless drivers Ubuntu 16.04.1 LTS I have just installed Ubuntu 16.04.1 LTS on my Desktop PC that has a built in wireless adapter in the motherboard (Broadcom 802.11ac 14e4:43b1).

Right now I do not have the installation disk nor access to ethernet so the below post did not work for me.
Installing Broadcom Wireless Drivers

I found this drivers https://launchpad.net/ubuntu/+source/bcmwl/6.30.223.248+bdcom-0ubuntu7

and i am wondering how do i install this offline.

Please help, I am a complete beginner and would be really helpful if you can elaborate.

Thanks
Avinash

Here are some commands that may help. There is also a link for the video!

~$ lspci -vvnn | grep 14e4

Driver - Card/Model

*STA - BCM4311, BCM4312, BCM4313, BCM4321, BCM4322, BCM43224, BCM43225, BCM43227, **BCM43228
  sudo apt-get update
  sudo apt-get install bcmwl-kernel-source

b43 - BCM4306/3, BCM4311, BCM4312, BCM4318, BCM4320
sudo apt-get install b43-fwcutter
sudo apt-get install firmware-b43legacy-installer
sudo modprobe -r b43 ssb wl
sudo modprobe b43

b43legacy - BCM4301, BCM4306, BCM4306/2

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

Good luck with it.


Removing Ubuntu from dual boot I was given a laptop in 2008 that had both XP Professional and Ubuntu. I only ever used XP, so I left Linux alone. Now, I'd like to remove it. I tried going to Disk Management to delete the partition, but it doesn't seem like there is one. I have the C: drive and a volume with no name that's 7.5 GB. At first I thought this might be it, but turns out it's my Active partition. Maybe my friend installed XP and Ubuntu on the same partition?

I also don't see wubi installed, so I don't think that's how he got Ubuntu on there. For what it's worth, it's Ubuntu 7.10, kernel 2.6.22-14-generic.

Any help would be appreciated.

PART 1:
i know you probably dont like ubuntu but for this to work you must definitely get you hands dirty with some ubuntu.
since u definitely hate i most definitely wont bother u with command line until its absolutely neccesary.

first things first boot into ubuntu and go the files directory
2:from the side scroll part click on the part that says computer
3:right click and go to properties and then notice that exact size of the computer space directory coz later in windows that would be the partition you will need to delete.

hit crtl + alt + T acess to terminal or command prompt if you must say

PART 2:

Make Windows (ANY variant) the default Grub2 menu option.

Description: This sets Windows as the default boot option, and (with NO user action) the PC will auto-launch Windows on startup.

STEPS:
type in terminal the following

**  for Listing your current menu items**

sudo update-grub

B. Edit setup file

sudo gedit /etc/default/grub

Set the boot default to your Windows boot partition (eg.)

GRUB_DEFAULT=”Windows 7 (loader) on /dev/sda1″

WARNING: Just setting 'GRUB_DEFAULT=n', will NOT work after kernel updates, etc.

(Save the file and close.)

C. Update grub settings

sudo update-grub

Now, on boot, you will AUTOMATICALLY default to MS Windows.

PART 3: (Optional Extra)

Hide the Grub2 menu, and use the default menu option.

Description: This both hides the startup menu, and shortens the (usually 10 second) timeout. The PC will auto-launch whatever the default option is on startup.

NOTE: The user just needs to hold down the Shift key (on startup), to again see the Grub2 menu.

STEPS:

D. Edit setup file

sudo gedit /etc/default/grub

Uncomment the line '#GRUB_HIDDEN_TIMEOUT=0', to look like:

GRUB_HIDDEN_TIMEOUT=0

(Save the file and close.)

E. Update grub settings

sudo update-grub

Now, on boot, you will AUTOMATICALLY boot to the default menu option, UNLESS you hold down the Shift-key at boot time. Then the grub2 menu will re-appear.
load into windows and delete the partition of the size i told you to notice earlier and poof ubuntu is gone


How can I tell if my laptop has Bluetooth? How can I tell if my laptop has a Bluetooth adapter?

Your kernel would have picked it up and loaded a module for it when you started Ubuntu.
From the command line, gnome-terminal type this command:

dmesg | grep -i blue

If you get output simliar to the below then your laptop has bluetooth capability.

[    2.933062] usb 1-1.4: Product: Broadcom Bluetooth Device

There is an easier solution.

Press the Super (Windows) key.
Search "Bluetooth".
This should tell you if you have a Bluetooth adapter. I don't so mine said "No Bluetooth adapters found". I'm not sure what it would say if you have one but it should be obvious.


What software should I install for opening .stl files? I use Ubuntu 12.10. What software can I install that can open Physible .stl files? And what are the differences between these softwares?

Meshlab reads all kind of 3D meshes, also STL

sudo apt-get install meshlab
meshlab file.stl

Example with this file:

I use ChiTuBox on Ubuntu 18.04 (I know you were asking about 12.04 but that was 6 years ago!).

https://www.chitubox.com/download.html


Random freezes, Radeon mentioned in the console I try to run Ubuntu 11.10. I tried :

64 bits release
32 bits release
live CD

Ubuntu is freezing randomly... I don't know why. Mouse is freezing, screen go black then appear again, mouse is moving but I can't do anything.

Note : freeze can append if I run Firefox during install.

11.04 was perfect. I've never had such troubles...

I'm not a power user, just a fan... So I can't bring you informations.
I just have:

a classic SATA

disk 1 primary partition with Windows,
1 logical with Ubuntu,
1 primary with personal data.

USB mouse.
Ethernet cable.
ATI RadeonHD card

When I use CTRL+ALT+F1 command, I have a lot of messages with errors. Radeon is repeated a lot of times.

I also faced a single instance after the upgrade where the freeze happened, but could not reproduce it. You may like to read this link https://wiki.ubuntu.com/X/Troubleshooting/Freeze. You can file a bug by providing more information about it to the developers.

I had same problem on diferent machines. I fixed it with new driver from ppa:ubuntu-x-swat/x-updates I think everyone of you have a nvidia graphic card too.
I saw that xorg process runs on 99 % cpu usage and blocked everything.

So that is my solution.


Acronis Extended Capacity Disk I have a Western Digital Black 4 TB Hard Drive in my PC running Windows 8.1. To get past my PC's 2 TB limit I have used Acronis Extended Capacity Manager to gain access to hard drive space beyond the 2 TB limit. I have ran live versions of Ubuntu and I would like to dual boot, or triple boot my PC, Windows 8.1 & Ubuntu & other. When I run the live version of Ubuntu, or any other Linux distro, my extended disk space is not seen by Linux. How can I get Ubuntu to see my extended disk space?

I'm not intimately familiar with the software, but based on the description on its Web site, it sounds like this is a non-standard Windows driver that makes a disk look like two or more physical disks to Windows. If I'm right, the only way to access such a disk in Linux would be to write an equivalent driver for Linux, and AFAIK no such driver exists.

That said, the question is why you used this software in the first place. You say you're running Windows 8.1. If the computer shipped with this software, it almost certainly booted in EFI mode and used the GUID Partition Table (GPT) for partitioning. GPT supports over-2TiB disks, so there'd be no reason to use any third-party stuff. Even if you installed Windows yourself in BIOS/CSM/legacy mode, you could use GPT on a 4TiB data disk; only the boot disk is limited to using MBR in BIOS/CSM/legacy mode. If the computer is newer than about 2011, it probably supports EFI-mode booting. Thus, you might want to re-consider your system configuration at a fundamental level:

If your computer is BIOS-only (as are most pre-mid-2011 machines), you may be somewhat stuck -- but even then, using a sub-2TiB boot disk and your 4TB disk as a GPT data disk should work. Note that you can install Linux to a GPT disk even in BIOS mode; tying GPT to EFI is a Windows limitation, not a BIOS issue, and Linux does not share Windows' limitation on this score.
If your computer has an EFI, you can re-install Windows in EFI mode. This will use GPT, which supports your full disk capacity.

The problem with either approach, though, is that you'll need to back up your personal data and restore it after you're done re-installing.

You can get and run the Seagate Extended Capacity manager directly from Seagate, and it does not require any Acronis Software. Also, remove the Intel Rapid store Drivers, I had to in order to make the Seagate product work. Since the Seagate product is ONLY for Windows, make sure all of the data you place into the new Extended Partition, is not of great importance. I would put ONLY windows software originals and other media photos videos etc stuff. Why?
Well as you can see if you put valuable data in there, did a backup of the 3 or plus you corrupt the 3 TB or larger drive, you will have no direct means of recovering it in a disaster situation. So you could store non-valuable data, knowing that you would be forced to reinstall the extended capacity and then use Acronis or Macrium to restore the partitions folder back, in the event of Full recovery, because Acronis or Macrium rescue will backup the Seagate extended partition, but you will not be able to restore it using the bootable recovery media. You can restore it later on after formatting the second partition later on. Potentially however and not yet having had to, it may allow by doing partition recovery, from the Windows-created recovery media, by doing it from within windows. So you could recover the windows drive partition and then recover the extended capacity partition later by installing the extended capacity manager onto your system and windows folders and then restoring the folders back to the extended partition later from within windows itself and whatever backup software you used, even the one from the recovery DVD or Windows Install DVD. (Which I do not trust, and is horribly slow.) But is free.


How to change the permission on a single file? I need to change the permission on a couple of files in the /usr/share/backgrounds/. I've been lurking around forums but no one will give me a straight answer. Rather, they just keep warning me against it.
The files in question are two images, lets say, img1.jpg and img2.jpg. All I want to do is set their "Other" permission from "None" to "Read-only".

as owner or user with write permissions on the file:

chmod o+r filename

sudo chmod 444 /usr/share/backgrounds/img1.jpg

444 Allow read permission to owner, group and world.


How to enable Lubuntu lightdm dinamic autologin (sorry for my english) Hi I freshly installed Lubuntu 14.04

I disabled lightdm autostarting by editing /etc/default/grub

Well.. I got some problems

"sudo service lightdm start" is working but startx command always freezes at "Loading extensions GLX
When I turn on computer I have to login console
and when I type "sudo service lightdm start" I have to input password again
and finally when Lightdm is started I have to login again
that's very bothering me

What I want to do is when I login into console it should be possible to login into Xwindows directly with currentuser who logined console
linuxubuntu gonny95 is online now       Report This Post

I found the solution. Typing rm -rf .*authority in my home folder worked.


How to create a permanent "alias"? If you create an alias for example:

alias cls="clear"

It exists untill you kill terminall session. When you start a new terminal window the alias doesn't exist any more. How to create "permanent" alias, one that exists in every terminal session?

You can put such aliases in the ~/.bash_aliases file.

That file is loaded by ~/.bashrc. On Ubuntu 10.04, the following lines need to be uncommented to enable the use of ~/.bash_aliases. On Ubuntu 11.04 and later, it's already enabled:

if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

The aliased command will be available on any new terminal. To have the aliased command on any existing terminal one need to source ~/.bashrc from that terminal as,

source ~/.bashrc

Stick that command in the last line of your ~/.bash_profile


How to stop Ubuntu from talking to me? The title may sound silly, but on Ubuntu 13.10, I'm getting frequent audible notifications using text to speech.

Is this the "speech dispatcher" and how can I disable it?

Pressing AltSuperS will disable or enable speech dispatcher.

The last thing you should hear is "screen reader off" :-

ps. The Super key is the "windows" key...

Maybe "orca" has bean launched. Kill the "orca" (Screen Reader) process, then you should hear "screen reader off".


Drag and Drop across (fullscreen) applications, switching via Alt-Tab Example

Drag media file onto Totem's playlist to enqueue

Bug in Compiz

Especially for Unity (formerly Netbook Edition, being intended for small screens) this is quite a vital feature, as applications most often are run fullscreen, and dragging with the touchpad can be cumbersome.

https://bugs.launchpad.net/ubuntu/+source/compiz/+bug/624810

Any hint on where to start fixing the bug? Which file/line in compiz source code?

Usability background

According to Fitts, Accot, and Zhai, the time required to rapidly move to a target area is a function of the distance to and the size of the target
(cf. Fitts's law and Steering law).

Drag'n'Drop without Alt-Tab across fullscreen windows requires

start to drag object
move to launcher/taskbar
steer to target app icon -- small and distant target!
wait for app to become focused
steer onto window -- (huge target)
  optionally: steer onto intended area of window, e.g. playlist (fairly large target)
drop object

Drag'n'Drop with Alt-Tab on the other hand only requires

start to drag object
Alt-Tab to other app
  optionally: steer onto intended area of window, e.g. playlist (fairly large target)
drop object

Thus, no small and distant target required for Drag'n'Drop whilst Alt-tabbing

Workarounds

Interesting and probably for many users useful alternative approaches are presented in the answers below. Great many thanks to the community!

Correct answer

... seems to be available only when the bug is fixed, though.

Some more recent action, maybe relevant as related bug: https://bugs.launchpad.net/ayatana-design/+bug/727903

The way I found it working:

Start dragging,
Keeping your mouse button pressed, press Super + (0-9) to switch the application,
Continue dragging and drop.

Note: In step 2 you can hold the Super key for a moment, the launcher will appear and will display you which number (0-9) is assigned to which application.

It works under Unity 2D because Unity 2D does not rely on Compiz but on Metacity/Mutter:

How do I install and switch to the Unity 2D desktop?


Ubuntu stuck at wallpaper after login Hi guys I got problem when I login on my main user, it gets stucked at wallpaper. But when I login on guest user or make new user It works fine. Is there anyway to fix this.
I use ubuntu 14.04 and Toshiba Satellite c660.

I removed:  .ICEAuthority and  .Xauthority and it worked.


No Dropbox icon in the indicator panel? I have recently installed Ubuntu  on my machine and everything has been working fine, except I don't see the Dropbox indicator. I have installed and re-installed Dropbox multiple times and can confirm that it's running in the background (with ps -e | grep dropbox).

Does anyone know how to get it back?

Found a solution at the comment #7 from the Ubuntu bug:

Install package
sudo apt-get install libappindicator1
Log out, and then log back in (or issue dropbox stop && dropbox start at the command line)

I'm on 14.04 with Gnome 3. None of the above solutions did work for me.

A solution that worked finally was to install a gnome extension 'topicons'
https://extensions.gnome.org/extension/495/topicons/


How to log in using the TTY? I'm getting the following error and I read a solution in another post but I'm having trouble with the first step which is logging into my credentials:

Your screen, graphics cards, and input device settings could not be detected correctly. You will need to configure these yourself.

It's embarrassing but it reads myusername login:

So like when I boot up normally I enter in my password but then it asks for a password. So if my normal password goes in the latter what do I enter in the first part?

I hope I'm not making myself look like an idiot here. I also apologize in advance if I'm not following the correct posting rules but I'm on a new cell phone with no access to another comp.

No, it doesn't read "myusername login:". It reads "mycomputername login:"

You've simply used your username as your computer name. In the "login" field, you're supposed to enter a username and then enter the password for that user in the "password" field.

So on my desktop, it would read

Ubuntu 14.04 LTS HomeDesktop tty1

HomeDesktop login: jes
Password: ********************

For those who have access to the graphical environment and just want to know their login in a simple way, that worked for me:
I opened my terminal and I typed sudo su to enter on root mode. The option to enter my password appears, and there it is! My prompt shows [sudo] password for thiago:, so "thiago" is my log in!
Hope this helps.


How to remove Postgres from my installation? I have ubuntu 9.10(karmic), and when I attempted to install a new program, the postgres was installed as a dependency of that program, no problem at all if the installation occurs with success, but there was an error, and the Postgres was not installed and the application is not working. I had tryed to update the Postgres and nothing, only the message "there was an error and your postgres can not be installed"

Now I want to remove completely the Postgres from my machine, how can I do that, I do not want to kill the process every boot. I just want to remove Postgres.

What is the command line?

Thanks people.

The simplest way to do this is to open a terminal and type:

sudo apt-get --purge remove postgresql

This will also prompt you to remove that software that depends on Postgres, which in this case it appears you would like to do.
I do not personally run 9.10 or Postgres, so it is possible that Postgres installs itself in several parts. In that case, a simple:

dpkg -l | grep postgres

Will get you the list of those packages that Postgres installed.
Then, just use the same "apt-get --purge remove ...." command but instead of just postgresql, type each package name, separated by spaces, like:

sudo apt-get --purge remove postgresql postgresql-doc postgresql-common

This is dependent on the list of packages installed, of course.

Thanks to Code Friendly, & I want to share how I solved my problem.

When I updated postgresql from the Synaptic application, it is the postgresql 10 version that was installed. So I had two versions of postgresql (10 & 9.6) installed in my debian machine. Postgresql 9.6 listening on port 5432. Postgresql 10 listening on port 5433 instead of 5432.

When I run the comand msfconsole in a terminal, although metasploit connects to the msf database on port 5432, the following error message appears:

root@kali:~# msfconsole
[-] Failed to connect to the database: could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432?

I unistall the 9.6 postgresql version from the Synaptic application, but the problem persists (postgresql 9.6 no longer appears in synaptic's installed software list);

But by executing the command that follows we see that the version postgresql 9.6 was not completely unistalled:

root@kali:~# dpkg -l | grep postgresql
ii  postgresql                     10+187             all          object-relational SQL database (supported version)
ii  postgresql-9.6                 **                 all          object-relational SQL database, version 9.6 server
ii  postgresql-10                  10.0-1+b1          amd64        object-relational SQL database, version 10 server
ii  postgresql-client-10           10.0-1+b1          amd64        front-end programs for PostgreSQL 10
ii  postgresql-client-common       187                all          manager for multiple PostgreSQL client versions
ii  postgresql-common              187                all          PostgreSQL database cluster manager
ii  postgresql-contrib             10+187             all          additional facilities for PostgreSQL (supported version)

With the following command, postgresql-9.6 uninstalled completely:
    root@kali:~# sudo apt-get --purge remove postgresql-9.6

Then I edited the file /etc/postgresql/10/main/postgresql.conf, changed the port number to 5432 and the problem is solved.

Another error message appears:

Creating initial database schema /usr/local/bin/bundle:22:in ``load': cannot load such file -- /usr/lib/ruby/exe/bundle (LoadError)     from /usr/local/bin/bundle:22:in `<main>

I found that the cause was that two (2) versions of Ruby are installed in my debian machine, versions (2.2 & 2.3).

Same thing, I uninstall the ruby 2.2 version from the synaptic application and the problem is solved, metasploit starts without problems.


Can't remove GNU Grub after deleting partition (Not GrubRescue!) Can't remove GNU Grub after deleting partition (Not GrubRescue!)
This is really urgent as I need Ubuntu for work.
I installed Ubuntu last year as a partition to dual boot with Windows 10. Then I realized that I didn't designate enough storage space to the Ubuntu partition (only 12gb!); How stupid! Anyway, I then decided to reinstall Ubuntu on my device.
So I deleted my current 12GB Ubuntu partition using Windows diskmgnt.
Then I went through the same process as before, I installed Ubuntu desktop as an ISO file, then used Rufus to flash it onto my USB, then I booted from my USB, when I was greeted with an odd message.
initramfs: Unable to find a medium containing a live file system
I looked into this and quickly realized that I still had a boot option called 'Ubuntu' even though I deleted the partition. This wasn't normal Ubuntu Desktop, it was a minimal GNU Grub.
GNU Grub
I'm not entirely sure that the fact I can not install Ubuntu is to do with this, but it would be nice to remove it once and for all.
Can anyone please help me? I need Ubuntu for work and I'm not in a position to go out and buy a new PC.
Thank you so much for understanding, and sorry if I sound a bit uptight as this is my first post.

To fix this, I simply used a different USB, then the installation process was successful and Grub terminal was gone.

This bootloader is in the /boot folder of whatever your drive is. You need to remove this somehow. You can do this in some BIOS versions on certain machines, not all allow this (mine doesn't). If you can somehow get the drive into a second working machine, you can sudo rm -r the folder that contains the wrong bootloader (for the Ubuntu entry) and you can use efibootmgr to remove the entry. More on that here: How do I completely destroy grub/ ubuntu bios entry? Conventional methods not working
Another option is to go into your BIOS, change the boot order and move Ubuntu right to the very bottom. This works better in case you accidentally delete the wrong boot entry or remove the wrong bootloader.


Installation error from terminal and ubuntu software center I am trying to install sublime using terminal but it pop out error:

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package sublime

And when I try to install vlc from Ubuntu Software Center then also I can't install since there is no install icon.

Upon execution of sudo apt-get update terminal pops out following output

E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/

Assuming you are trying to install Sublime Text, it is not in the official Ubuntu repositories. Install Sublime Text 3 using the package from their site.

The output :

E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/

Points to the file /var/lib/apt/lists/lock which is created when you use sudo apt-get install and sudo apt-get update command. This file prevents multiple apt-get calls and is automatically removed after the command execution has completed. But sometimes it doesn't get removed, and to do that manually,

This set of code needs to be executed.

sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo apt-get update

Then try again.

Source : "Unable to locate package" while trying to install packages with APT |
Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?


How to install NVIDIA.run? I have a Nvidia Ge force Ge6150 SE graphics card. I am running ubuntu 12.04.  When I try to install the .run file it fails.  It shows the message like this:

I tried to install it after uninstalling the old driver.still same message. Here is the log file:

nvidia-installer log file '/var/log/nvidia-installer.log'
creation time: Mon Jun 11 05:46:17 2012
installer version: 295.53

PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

nvidia-installer command line:
    ./nvidia-installer

Using: nvidia-installer ncurses user interface
-> The file '/tmp/.X0-lock' exists and appears to contain the process ID '1062' of a >runnning X server.
ERROR: You appear to be running an X server; please exit X before installing.  For >further details, please see the section INSTALLING THE NVIDIA DRIVER in the README >available on the Linux driver download page at www.nvidia.com.
ERROR: Installation has failed.  Please see the file '/var/log/nvidia-installer.log' >for details.  You may find suggestions on fixing installation problems in the README >available on the Linux driver download page at www.nvidia.com.

but no such file is shown in the process manager.

As the error states, you are still running an X server. This error occurs when you try to install the Nvidia .run files while logged in.

Make sure you are logged out.

Hit Ctrl+Alt+F1 and login using your credentials.
kill your current X server session by typing sudo service lightdm stop or sudo lightdm stop
Enter runlevel 3 by typing sudo init 3
Install your *.run file.

you change to the directory where you have downloaded the file by typing for instance cd Downloads. If it is in another directory, go there. Check if you see the file when you type ls NVIDIA*
Make the file executable with chmod +x ./your-nvidia-file.run
Execute the file with sudo ./your-nvidia-file.run

You might be required to reboot when the installation finishes. If not, run sudo service lightdm start or sudo start lightdm to start your X server again.
It's worth mentioning, that when installed this way, you'd have to redo the steps after each kernel update.

I had a hangup installing the 3.19 driver today because I did not remove the existing 3.13 driver. I used:

apt-get remove nvidia*

to get rid of all existing files, then

telinit 3
sh NVI*.run

Success. I already had DKMS installed, and the driver program asked if it should use DKMS, so no worries about kernel upgrades.


Ubuntu terminal copy line number N from one file to another I would like to know is it possible to copy line number 7,8,9 and 17,18 of one text file to another one?

Thanks much in advance!!!

You can use sed (stream editor) to selectively print lines by number e.g.

sed -n '7,9p;17,18p' oldfile > newfile

If you know how many lines are there in your source file (wc -l) you can do this .. assume 12000 lines and you want lines 2000 - 7000 in your new file (total of 5000 lines).

cat myfile | tail -10000 | head -5000 > newfile

Read the last 10k lines, then read the 1st 5k lines from that.


How do I find my internal ip address? I have Ubuntu server 12.04 installed, so I have no GUI. When I do the command ifconfig, I cannot find my internal IP address. It says inet addr: 127.0.0.1.
Here is the output of ifconfig -a:
eth0   link encap:Ethernet  HWaddr 00:06:4f:4a:66:f0
    BROADCAST MULTICAST  MTU:1500  Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth1   link encap:Ethernet  HWaddr 00:16:ec:05:c8:9c
    BROADCAST MULTICAST  MTU:1500  Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo     Link encap:Local Loopback
    inet addr 127.0.0.1  Mask:255.0.0.0
    inet6 addr:  ::1/128 Scope:Host
    UP LOOPBACK RUNNING MTU:65536  Metric:1
    RX packets:1800 errors:0 dropped:0 overruns:0 frame:0
    Tx packets:1800 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:143896 (143.b KB)  TX bytes:143896 (143.8 KB)

here are the contents of etc/network/interfaces:
# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp

If someone could edit this for me, the contents of etc/network/interfaces should be on separate lines.
The output of host askubuntu.com was:
;; connection timed out; no servers could be reached.

I set up owncloud and webmin a few months ago and was using them for a month with no problems. I think the power went off one day 2 months ago and I never turned the server back on until yesterday. I haven't done anything that would have affected the internet setup So i'm not sure why it doesn't work anymore. As far as my network topology goes, I have a pci-e network card for the pc. The ethernet line goes from the network card to a switch, and then to a modem/router from there.

hostname -I

This will give you just ip address without any extra information.

There is lots of good info above.  I keep it simple like so:

# what your computer thinks its ip address is
function iplocal() {
  ip route get 8.8.8.8 | awk '{print $NF; exit}'    # 8.8.8.8 is google dns
}
# what the outside world thinks your ip address is
function ipexternal() {
  curl --silent http://checkip.amazonaws.com        # or:  http://ipinfo.io/ip
}
function ipinfo() {
  echo "local    IP  =>  $(iplocal)"
  echo "external IP  =>  $(ipexternal)"
}

Sample usage:

> ipinfo
local    IP  =>  192.168.1.139
external IP  =>  76.88.85.95


Can't play 1080p/Blueray films without lag Most of the films I watch on my PC are in HD, those of 20GB or more, even between 50-72GB. On Windows I can play all those films without problem.

Some of them are .mkv and others are bdmv.

I did not install any driver from catalyst or from Additional Drivers. Nevertheless I have direct rendering:

mortuus@alliancecore:~$ glxinfo | grep direct
direct rendering: Yes

I've tested it with VLC 1.1.9 (with and without GPU acceleration), smplayer, totem and moovida center. None was successful.

My specs:

AMD Phenom II X4 905e 2'5GHz
RAM 4GB
ATI Radeon HD4890
My resolution is 1920x1080

Thanks in advance

Well, i already had that problem in my pc. what i did was to install SmPlayer and configuring it. Going menu, preferences,general, and in the video tab, select (gl- fast- Ati cards). then when you want to see a movie open it with smplayer and i think it will be fixed.
If not, tell-me something.

Hi i have a simular setup and also got lag with my screen resulotion at 1920 x 1080 because i only could pick 25 Hz and 30 Hz maximum. The TV got the 1080i singal

I have changed my 1280 x 768 at 60 Hz and no lag anymore... also widescreen option in totem player made my TV work at 1080i (hd ready TV) at this resolution.

i chose to go for an image without lag instead of full pixels at 30 Hz with a little lag. My screen is 108 cm in with.


HDMI is not displayed in the "Sound" settings on Ubuntu 14.04 LTS I need some assistance, I have 2 laptops, a Toshiba and a DELL XPS M1330, the problem is using my DELL laptop, when I use the HDMI cable to use the TV as monitor the display works fine however the sound only work in the laptop speakers I can't use the TV speakers.

When I go to "Sound" settings to select the HDMI in the "Play sound through", I can't select the HDMI because it never show up. I can only see, "headphones and speakers".

So as a summary the, display works but the sound it doesn't in the TV. Any ideas?

I follow the below workaround whenever I connect laptop to a TV:

Connect HDMI cable to TV and switch on the TV.
Run the below command on a console (It worked without sudo)

pulseaudio -k

Open Sound settings, you should see "HDMI/Display Port" entry under Output tab.

I had the same problem. Pulseaudio was not running at startup because my home directory was owned by root. I changed the owner and the sound came back.


Ubuntu 16.04 - How to start xampp control panel How can I start xampp? After the installation there was no shortcut created on the desctop, now I am unable to find it. I am using the latest XAMPP for Linux 5.6.30, 7.0.15 & 7.1.1

The panel started right after the installation, but I am unable to find out how to start the panel after I closed it.

I read in some other topic to execute this command:

sudo /opt/lampp/share/xampp-control-panel/xampp-control-panel

But this fails with:

 sudo /opt/lampp/share/xampp-control-panel/xampp-control-panel
Traceback (most recent call last):
  File "xampp-control-panel.py", line 18, in <module>
    import gtk
ImportError: No module named gtk

I also tried to search for xampp, but nothing relevant found:

UPDATE:

/opt/lampp

UPDATE:

I also tried to start xampp from the terminal like this:

root@ubuntu:/opt/lampp$ ./xampp panel

But then the xampp help page shows in the terminal and no GUI is starting:

You can use one of the commands below.

If you use a 32-bit system:

sudo /opt/lampp/manager-linux.run

If you use a 64-bit system:

sudo /opt/lampp/manager-linux-x64.run

You can make a shell script also.

Open vim editor

vim Xampp.sh

Then go to insert mode by pressing i and enter the following code

#Shell Script For Launching Xampp Control Panel
cd /opt/lampp
sudo ./manager-linux-x64.run
cd

If you are running a 32-bit version then copy the following code:

#Shell Script For Launching Xampp Control Panel
cd /opt/lampp
sudo ./manager-linux.run
cd

Save the code by pressing ESC and writing:

:wq

This will save the code and exit the vim editor.

Change permissions of the shell script by issuing the following command:

chmod 775 Xammp.sh

Now you're done.

Simply run the shell script by using the following command:

./Xampp.sh


How can I check disk space used in a partition using the terminal in Ubuntu 12.04 LTS? I am using Ubuntu 12.04 LTS and I was wondering if there is a command that can tell the space used in a partition using the terminal. Like I want to use the su command to change to a user called admin (it is named admin). So I typed :

su admin

Entered the password

Now I want to see the disk space used in this partition. So.... Is there is a command fot that?

The su command is completely irrelevant. The disk usage is the same for all users. Anyway, some relevant commands and their output on my system are:

terdon@oregano ~ $ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda7              68G   23G   43G  35% /
udev                   10M     0   10M   0% /dev
tmpfs                 800M  1.6M  798M   1% /run
tmpfs                 5.0M     0  5.0M   0% /run/lock
tmpfs                 3.2G   12M  3.2G   1% /run/shm
/dev/sda6             290G  256G   20G  94% /home
tmpfs                 3.2G  992K  3.2G   1% /tmp
none                  4.0K     0  4.0K   0% /sys/fs/cgroup
/dev/sdc1             466G  379G   88G  82% /media/terdon/Iomega_HDD

For a specific partition:

terdon@oregano ~ $ df -h /dev/sda7
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda7              68G   23G   43G  35% /

Alternatively, though this only lists the size, not the %used:

terdon@oregano ~ $ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 465.8G  0 disk
├─sda1   8:1    0  39.2M  0 part
├─sda2   8:2    0  14.7G  0 part
├─sda3   8:3    0  78.1G  0 part
├─sda4   8:4    0     1K  0 part
├─sda5   8:5    0     2G  0 part
├─sda6   8:6    0 294.4G  0 part /home
├─sda7   8:7    0  68.7G  0 part /
└─sda8   8:8    0   7.8G  0 part [SWAP]
sdc      8:32   0 465.8G  0 disk
└─sdc1   8:33   0 465.8G  0 part /media/terdon/Iomega_HDD
sr0     11:0    1  1024M  0 rom

Conversely, you can use the du command to print directory size which will give you the disk usage of a partition if you run it on a partition's mountpoint: du -xsch /home for example. The -x option will "skip directories on different file systems," which is helpful if you have other mount points nested below the partition's mount point (typically /).

You can easily check disk space status with df -h.

Sometimes you might end up accidentally filling your hard disk via some automated processes you've set up. When that happened to me I needed to find where most of my disk space went. The following command was helpful for that task:

$ cd /
$ sudo du -sh ./*

This gives a list of files and folders in the current directory as well as the size of each one. If a directory is larger than it should be, cd to that directory and run sudo du -sh ./* again. Repeat until you've found what is using up most of your disk space.


K5006-Z Mobile Broadband I have a K5006-Z Mobile Broadband USB stick from Vodafone that doesn't seem to connect when I'm using Ubuntu. I don't have access to any Windows / Macs but I did lend it to  a friend with a Mac and it worked without issue so I am confident the USB stick is working.

I have set up a Mobile Broadband connection using the Ubuntu wizard. When I plug it the stick into the laptop Network Manager allows me to select this connection. The network icon animates for a while and message appears saying "GSM Network: You are now registered on the home network". However the network icon still continues to animate and does not become stable.

During this time the lights on the stick flashes from red to green but continues to flash. After a while the connection drops with a message "Modem: Network disconnected". If I try to connect again I do not get the "GSM Network" message again unless I remove and replug the USB stick.

Any help to get this working?

in terminal (Ctrl+Alt+t) use "lsusb" look for your stick listing,,at end of line in brackets you should see the installed module if not google for linux firmware to support your stick and instructions on installing  ie modprobe use,,  there is a well written trouble-shoot how-to on Ubuntu Forums also

goodluck


lpstat is not showing all printers? I currently have about 6 printers installed on Ubuntu 13.10, but lpstat is only showing 3 of them.

What is the best way to debug this, so that I can print to all printers from the command line, just like I could from a GUI application?

As a partial workaround, I used lpstat -a, although that lists more printers than I want.

To debug more, open a terminal window (Ctrl+Shift+T) and paste in this command:

sudo cat /etc/cups/printers.conf

cat, short for concatenate, shows files and print on the standard output.

Now you should see all printers listed, that are locally installed. If it shows only three, the remaining (and missing) are network printers discovered automatically.

Thats the first step.

The next is the log entries made by cups in /var/log/cups/ folder.


How to retrive data on a internal harddisk that is partially broken I recently experienced problems with my ubuntu 18.04 and no one couldn't actually help me out there

The Root filesystem on dev/sda1 requires a manual fsck[This one needs a different approach,others are not working]

So I want to reinstall it but I want to copy my data on the hard disk to some other drive. The problem is that after successful login, I can only work on the system for almost 1 minute before which it will end up in a black screen full of errors  https://drive.google.com/open?id=11r3gaAlU9Xlcjd10ir0Z_7n9cFq2dY1f

Please help me out in this

To check the file system on your Ubuntu partition...

boot to the GRUB menu
choose Advanced Options
choose Recovery mode
choose Root access
at the # prompt, type sudo fsck -f /
repeat the fsck command if there were errors
type reboot

If for some reason you can't do the above...

boot to a Ubuntu Live DVD/USB
open a terminal window
type sudo fdisk -l
identify the /dev/XXXX device name for your "Linux Filesystem"
type sudo fsck -f /dev/XXXX # replacing XXXX with the number you found earlier
repeat the fsck command if there were errors
type reboot

Update #1:

To retrieve any data you'll need:

Ubuntu Live DVD/USB
some external destination to store your data

Then...

boot to the Ubuntu Live DVD/USB
open a Files window
open a second new Files window showing your external storage
single-click on your hard disk in the left window pane to mount it
find your Home folder in the right window pane
drag any important files from your Home folder to the second Files window

Use a usb stick run a live os off it, transfer files, and make sure if ur gonna chekdisk it’s not an integrity checking read write heavy sort of check disk use something delicate to literally prod at the blocks of data


Windows 10 in UEFI mode and Ubuntu in Legacy mode My laptop have already installed Windows 10 in UEFI but I mistakenly dual boot Ubuntu OS In legacy mode.
So everytime I have to change BIOS SETUP settings to UEFI for Windows and legacy and legacy first for Ubuntu. So what I do to when I start my pc it ask me which OS to use(it also ask currently but don't run the other one according to BIOS setting)

The switch from legacy boot to UEFI boot in Ubuntu should be fairly easy, only a few steps are needed.

First of all make sure that Windows is fully shut down, Windows Fast-startup-feature should be disabled. Boot your current Ubuntu installation.

You need to know which partition is your EFI-System-Partition (ESP). You can use the command lsblk -f to get the device name and UUID of the ESP. The ESP is formatted in FAT and normally has a size of a few hundred MB, mostly the partition will be labeled and you can find it easily.

Create a directory as mount-point for the ESP with

sudo mkdir /boot/efi

Now add a line to /etc/fstab with the following content:

UUID=XXXXXXXXX   /boot/efi  vfat   umask=0077    0    1

Use the UUID you found before.

Mount the ESP with sudo mount-a

Now install the grub-efi-amd64-package:

sudo apt install grub-efi-amd64

This will automatically remove grub-pc (the legacy boot-mode version of Grub).

Other commands like grub-install or update-grub are not needed, installing grub-efi-amd64 will install the boot-loader to the ESP during installation of the package.You are ready to reboot.

Enter the UEFI-settings and check your boot-order. I'd also recommend to disable CSM in UEFI-settings to speed up the boot process.

I suggest you to reinstall Ubuntu in UEFI mode cause moving from legacy to UEFI not so simple. You should:

Boot from Live-USB;
Create FAT32 partition (minimum 33MB of size) and mark it with boot flag;
Enter chroot mode by:

sudo mount -o /dev/sdxX /mnt where xX is you drive and partition number where a root partition is;
sudo mount /dev/sdxX /mnt/boot/efi
for i in /dev /dev/pts /proc /run /sys; do sudo mount -B $i /mnt$i; done
sudo chroot /mnt
for i in /dev /dev/pts /proc /run /sys; do sudo mount -B $i /mnt$i; done
sudo chroot /mnt

Now install grub:

apt-get install --reinstall grub-efi-amd64
grub-install --recheck /dev/sdX

or just:

dpkg-reconfigure grub-efi-amd64

It should create 'ubuntu' menu item in UEFI.

Now edit your fstab by sudo nano /etc/fstab and add the following to it:

UUID=bla-bla  /boot/efi  vfat  umask=0077 0  1

You should run blkid to identify which UUID your efi partition has.

Check which packages are installed by dpkg --get-selections | grep grub

grub-common                                     install
grub-efi                                        install
grub-efi-amd64                                  install
grub-efi-amd64-bin                              install
grub2-common                                    install

Those are packages should be installed for UEFI boot. All other you should remove.

Also check that /EFI/ubuntu/grubx64.efi file is exist.

Exit from chroot by Ctrl+D.
Unmount all in /mnt and try to reboot.


Installing Ubuntu on an Asus Vivotab Smart Windows 8 32-bit processor tablet Good day,

I just got an Asus Vivotab Smart with Windows 8 but the processor is actually a 32-bit type. I am kinda confused with the Ubuntu version to install (32-bit or 64-bit). I have read all the tips and guidelines on installing Ubuntu on a Windows 8 machine.

I have disabled fast boot, quiet boot, secure boot, and still cannot boot from the usb. I tried this with Ubuntu 12.04.2, 12.10, and 13.04 (the 64-bit versions only). I am yet to try a 32-bit version but I'm reluctant since Canonical says only the 64-bit version was developed to handle the Windows 8 UEFI issues.

Also, I have a boot-override field in my UEFI options which I think force-boots from the boot option one selects. I selected to force-boot from my pendrive containing Ubuntu, but the screen just blinks momentarily and nothing happens.

Please help me to figure out how to load ubuntu on my machine. I don't really want the Windows 8......just Ubuntu on my tablet.

Thank you.

I haven't checked the latest Ubuntu release, but the last one I did check did not include EFI support in the 32-bit installation medium. You can add it yourself, though. The medium will need a FAT partition (it may already use FAT; I don't recall offhand) with the boot loader stored at EFI/BOOT/bootia32.efi on the FAT filesystem. Ubuntu uses GRUB 2 by default, but that will be very difficult to get working on an Ubuntu install medium. Instead, I suggest using ELILO or rEFInd. I describe both in my Managing EFI Boot Loaders for Linux page. Whatever you use, you'll need to figure out the appropriate options to pass to the kernel. You can find these in the boot/grub/grub.cfg file on the Ubuntu install medium (at least, that's where it is on the 64-bit version that I've just checked).

I don't know offhand if the 32-bit version will install an EFI version of GRUB. If not, you'll have to manually install an EFI boot loader on your hard disk (or SSD or whatever your computer has) using an emergency system.

You got everything right, but you need to use the 32-bit version of Ubuntu, because this tablet comes with a 32-bit Intel Atom processor.

http://ark.intel.com/products/70105/Intel-Atom-Processor-Z2760-1MB-Cache-1_80-GHz

However I never heard of 32-bit UEFI BIOS, I guess it must be compatibility mode (CSM).


Why is my system not waking up from suspend? I freshly installed Ubuntu 15.04 sharing a preexisting home partition (Mint 17.1).
However, in neither Mint or Ubuntu the computer is waking up from suspend mode. The status LED keeps blinking and the screen stays off, no matter how much keyboard or mouse input i give to wake it up. The hardware is a lenovo ThinkPad E540. What can I do to further narrow down the problem or even resolve it?

lspci -vnn | grep -A12 VGA
00:02.0 VGA compatible controller [0300]: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller [8086:0416] (rev 06) (prog-if 00 [VGA controller])
    Subsystem: Lenovo Device [17aa:502a]
    Flags: bus master, fast devsel, latency 0, IRQ 30
    Memory at f1000000 (64-bit, non-prefetchable) [size=4M]
    Memory at e0000000 (64-bit, prefetchable) [size=256M]
    I/O ports at 6000 [size=64]
    Expansion ROM at <unassigned> [disabled]
    Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-
    Capabilities: [d0] Power Management version 2
    Capabilities: [a4] PCI Advanced Features
    Kernel driver in use: i915

I know this may sounds goofy, but I believe I have encountered the same issue. What I have always done to resolve this is pressing either the "home" key or the "delete" key it will take you to the screen where you can enter your password, then it manages to login and you're good from there.

Have you tried restarting computer? There is another question about a similar issue, where the commands used to resolve the issue are:
    sudo apt-get remove unity-lens-shopping
then
    sudo apt-get autoremove

https://askubuntu.com/a/620864/407406


Ubuntu 10.04.4 is asking for username and password during the instalation. Why? Possible Duplicate:
  What is default password?

I´m a beginner on ubuntu and I tried to install the program on my computer in the same disk with WinXP already installed. The program were downloaded from the ubuntu site and the image recorded in a CD. Please, tell me what username and password I need to use to install it.

This would be your username and password - whatever you want them to be.  One of the things that make Linux/Ubuntu more secure is the requirement to have a username and password by default so that not just any rogue trojan or user on the other side of the world can install programs on your computer.

It's a feature, not a bug.

Try username:

    ubuntu

with no password.


How can I rename a file in a different path without changing the current directory or writing the path twice? For example, I want to rename tif/fat/tul/codes/MyCode.pl to TheCode.pl in the same directory. Currently I know I can use this:

mv tif/fat/tul/codes/MyCode.pl tif/fat/tul/codes/TheCode.pl

but that requires me to repeat typing the full path (can be annoying if the path is quite long)

or I can use

cd mv tif/fat/tul/codes/
mv MyCode.pl TheCode.pl

The drawback being I have to type 2 commands, and have to change the current directory is undesirable in many cases.

Is there a more efficient way to do this?

Another thing you can do is open another shell (like bash) in your current one, cd to the directory of the file, and then mv.
Then you just close the shell with Ctrl+D (which moves back to your previous directory).

find /path/to/dir/ -iname MyCode.pl -execdir mv MyCode.pl TheCode.pl

/path/to/dir is path of directory in which you want to rename files.

Note: This will rename all files in directory /path/to/dir/ and its subdirectory.


How to install .bundle packages in Ubuntu? I've recently downloaded a package with .bundle extension. it's VMware-Player-6.0.3-1895310.x86_64.bundle. I want to install vmware-player, but when I open that, it opens with text editor.

First be warned, installing files from outside of Ubuntu repository may compromise the system. VMware is probably safe, but it still should be mentioned.

You need to change permission of the file to make it executable:

chmod a+x VMware-Player-6.0.3-1895310.x86_64.bundle

Start the file. You will most probably need root privileges to install VMWare, but that is not always the case. So in this case:

sudo ./VMware-Player-6.0.3-1895310.x86_64.bundle

How to find out what kind of file it is?

The .bundle files for VMware Player, Workstation, and other products are actually shell scripts, with embedded binary data. You can discover or verify this with the file utility, which is handy for finding out what kind of file something (probably) is:

ek@Ilex:~$ file VMware-Player-6.0.3-1895310.x86_64.bundle
VMware-Player-6.0.3-1895310.x86_64.bundle: a /usr/bin/env bash script executable (binary data)

How to use the file, based on this information?

You can make it executable with chmod, then run it:

chmod +x VMware-Player-6.0.3-1895310.x86_64.bundle
sudo ./VMware-Player-6.0.3-1895310.x86_64.bundle

(If it's the only .bundle file in your current directory, you can just use chmod +x *.bundle and ./*.bundle. Or type the first few characters of the filename and press Tab, and the shell will type the rest out for you.)

Why sudo?

Virtualization software, such as VMware products, must be installed as root. This is why I put sudo at the start of the second line. (In contrast to virtualization, emulators not employing any virtualization may generally be installed and used by a limited user, without any action by root.)

Why is plain sudo okay here, when the installer is graphical?

VMware product installers are graphical (at least for part of the installation). Although it's generally recommended to avoid running a graphical program with sudo program (preferring gksudo program or sudo -H program), in this case it should be fine:

The VMware Player installer, and executable installers in general, are unlikely to attempt to write configuration files to the home directory of the user running them.
And even if they did, the configuration files would pertain to the installer itself--they wouldn't prevent programs from being run normally by the limited user because you're unlikely to want to run such an installer as a non-root user.


Unable to login to super user from normal user I have installed ubuntu 11.10 with no problem. But after login as a normal user, I am unable to switch to super user(using "su" command). Its showing "Authentication failure"
plz help me..

Open the terminal and type the following command:

sudo su

sudo su

in a terminal, after you type your login password, will turn you root. After this, you can give the command

passwd

which will allow you to give a new password for root (this will not alter your login password). This is the password that you will type every time you use the

su

command, because it will be taken as it is the super user's password.


How To Install D-Link DWM-156 3G Modem Ubuntu 13.04 I bought a new D-Link 3G modem and it said it supports Linux. But after I installed it, I still can’t make the device work on Ubuntu 13.04.

I used the .deb file from the D-link modem 3g_modem_connect_D300_i386.deb (from the modem itself) but I was unable to configure it. I searched the Internet, they use dlinkusbmodem.deb file, which is a file from 1 year ago. Even after I dpkg it, I still don’t know how to proceed.
I viewed this youtube  and it doesn't work with this file version.

Type ctrl+alt+t
Then a terminal will appear.

Type

sudo mkdir /media/dlink

Then type

sudo mount /dev/sr1 or /dev/sr2 /media/dlink

There you will see a file called dlinkusbmodem.deb

After installing the package the thing you have to do is to type

usbdeviceswitchdlink

After doing that you will notice that the modem in unmounted.

Now type

3g_connect.sh ttyUSB0

Then wait for 120 seconds.

You'll see that before or after 120 seconds the internet is connected.

To check type

ping www.google.com

put the .deb file on Downloads
and do this on terminal:

sudo -s
cd Downloads
sudo dpkg -i 3g_modem_connect_D300_i386.deb

I think thats the only way. Hope it works.


LibreOffice Writer is very laggy in 13.10 I had to do a project in which involved using tables in Writer. It became extremely laggy to the point where I could no longer use it i.e stop responding. I'm running Ubuntu 13.10 and would appreciate any help on fixing this issue.

I have experienced LibreOffice Writer freezing or jumping around in both Ubuntu 12.04 and Windows XP. This answer addresses Ubuntu 12.04 as I am abandoning Windows for security reasons (CryptoLocker). I have resolved this problem in Ubuntu. I have no reason to suspect it is related to Java or any particular version of the powerful LibreOffice or OpenOffice. I am currently using this version of LibreOffice: 3.5.7.2 / Build ID: 350m1 (Build:2). But the problem lies with the universal Linux kernel setting for swappiness and is easy to fix. Configure swappiness by editing /etc/sysctl.conf
Log into Terminal as administrator.
Type: sudo gedit /etc/sysctl.conf
Add or reconfigure: vm.swappiness=100

Save.
You are done. Reboot. Your work now loads from the HDD, not memory.  There are no more conflicts resulting from file size or memory conflicts. This is a fix for serious work (such as my in-progress 1000+ page, profusely illustrated reference book).  For faster speed, use a lower number or a faster computer.  I am using an old Asus dual-core server reconfigured as a workstation. Hey, LibreOffice rocks!

I don't have any problems in using LibreOffice Writer in Ubuntu 13.10.

However, you could also try WPS from Kingsoft.

It's a very cool office suite.


Getting "System program problem detected" pops up regularly after upgrade This started to happen immediately after I had rebooted the first time after doing a system upgrade. It first starts with a dialogue that says "System program problem detected". Then when I try to hit 'report problem' not much happens. I am led through a dialogue that always ends up the problem cannot be solved.

I am aware this is not a lot of information, however I'm not sure which information I need to publish and how should I obtain it to debug this problem.

Here's a screenshot!

Open a terminal (Ctrl+Alt+T) and type:

sudo rm /var/crash/*

Then hit Enter.

This will remove any old crashes, that might still be reported (in error). After a reboot/re-starting, any further pop-ups still need to be investigated.

If you would like to turn off the config setting without using a GUI:

sudo crudini --set /etc/default/apport '' enabled 0


Package 'tomcat7' has no installation candidate on ubuntu 12.04 I'm trying to install tomcat 7 on Ubuntu Server 12.04 with:

sudo apt-get install tomcat7

I tried to do this according this install tutorial, but immediately I receive this answer:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Package tomcat7 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'tomcat7' has no installation candidate

Update:

I tried to download & install tomcat7 step by step as this tutorial.
But when I try to run program

`$ ./catalina.sh run`

I catch few warnings + SEVERE: Cannot start server. Server instance is not configured:

nazar_art@nazar-desctop:/usr/local/tomcat/apache-tomcat-7.0.42/bin$ ./catalina.sh run
Using CATALINA_BASE: /usr/local/tomcat/apache-tomcat-7.0.42
Using CATALINA_HOME: /usr/local/tomcat/apache-tomcat-7.0.42
Using CATALINA_TMPDIR: /usr/local/tomcat/apache-tomcat-7.0.42/temp
Using JRE_HOME: /usr/lib/jvm/java-7-oracle
Using CLASSPATH: /usr/local/tomcat/apache-tomcat-7.0.42/bin/bootstrap.jar:/usr/local/tomcat/apache-tomcat-7.0.42/bin/tomcat-juli.jar
Jul 25, 2013 8:49:54 PM org.apache.catalina.startup.Catalina load
WARNING: Unable to load server configuration from [/usr/local/tomcat/apache-tomcat-7.0.42/conf/server.xml]
Jul 25, 2013 8:49:54 PM org.apache.catalina.startup.Catalina load
WARNING: Permissions incorrect, read permission is not allowed on the file.
Jul 25, 2013 8:49:54 PM org.apache.catalina.startup.Catalina load
WARNING: Unable to load server configuration from [/usr/local/tomcat/apache-tomcat-7.0.42/conf/server.xml]
Jul 25, 2013 8:49:54 PM org.apache.catalina.startup.Catalina load
WARNING: Permissions incorrect, read permission is not allowed on the file.
Jul 25, 2013 8:49:54 PM org.apache.catalina.startup.Catalina start
SEVERE: Cannot start server. Server instance is not configured.

How to solve this trouble and install tomcat7?

tomcat7 package is only available on security repositories, universe section for precise, saucy to wily is available in the main repository, and newer in the universe repository. So, make sure you have in your /etc/apt/sources.list the following line:
 deb http://security.ubuntu.com/ubuntu precise-security main universe

The line don't have to be exact, it could include multiverse and restricted, but it should include all the elements above. If the line was not present in the source.list file, add it and run apt-get update. Now you should have tomcat7 available.
Tomcat7 download page
If you don't find the source.list file

Execute:
sudo nano /etc/apt/source.list

then paste into the file:
deb http://security.ubuntu.com/ubuntu precise-security main universe

Hit: Ctrl+O to save the file, then Ctrl+X to exit.

Update the package list with sudo apt-get update.

I have installed tomcat6
Then you must delete tomcat6 of your system, before trying to install tomcat7
sudo apt-get remove tomcat*
sudo apt-get install tomcat7

This will remove all tomcat related packages the install tomcat7 without problems.

@nazar_art

You must have tomcat6-common installed (likely do to also having something like Squid HTTP proxy).

apt-get autoremove tomcat6-common


How to find the frequency and type of my current RAM? How shall I find out the frequency and type of my current RAM? My OS is Ubuntu 12.04.

This should do:

sudo lshw -short -C memory

Above answers are correct; I just wanted to add further by piping the output of command to grep for Type and speed.
sudo dmidecode --type memory | grep -m2 Type

FYI: T in Type must be capital.
This might give either Type: DDR4 OR Type: DDR3
for speed use
sudo dmidecode --type memory | grep -m1 Speed

FYI: -m option of grep is used to limit the number of lines; for example -m2 means 2 lines.


How to find the number of CPU cores including virtual? How do I find out the number of cores my CPU has, including virtual cores (hyper threading cores) using the command line?

You can count no of CPUs

cat /proc/cpuinfo | grep processor | wc -l

Output :

2

To check the number of cores !

cat /proc/cpuinfo | grep 'core id'
core id         : 0
core id         : 1

Or

 $ nproc
 2

Or lscpu will show you all output:

lscpu

Architecture:          i686
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                2
On-line CPU(s) list:   0,1
Thread(s) per core:    1
Core(s) per socket:    2
Socket(s):             1
Vendor ID:             GenuineIntel
CPU family:            15
Model:                 4
Stepping:              7
CPU MHz:               2792.992
BogoMIPS:              5585.98
L1d cache:             16K
L2 cache:              1024K

Type:

 lscpu |grep 'CPU(s)'

You will get among other few lines, this one:

CPU(s)                  4

You can get 1, 2 ... in place of 4, depending on your CPU, and that is the number of cores your CPU has.


phpmyadmin is not working after I installed it I am using ubuntu-11.04.
I followed these steps on this site:

Installing Apache2 With PHP5 And MySQL Support On Ubuntu | HowtoForge

So far my apache2, php, and mysql are working fine except phpmyadmin... Whenever I run this:
http://localhost/phpmyadmin/

I get this error on my browser:

Not Found
The requested URL /phpmyadmin/ was not found on this server.

Apache/2.2.17 (Ubuntu) Server at localhost Port 80

Please read this section in Ubuntu wiki. You will need to configure your apache2.conf to make phpMyAdmin works.

gksu gedit /etc/apache2/apache2.conf

Then add the following line to the end of the file.

Include /etc/phpmyadmin/apache.conf

Then restart apache

/etc/init.d/apache2 restart

I was facing the same problem.

Firstly check if the directory called /usr/share/phpmyadmin/ exists. If it does, just move it to /var/www/phpmyadmin by executing this command:

mv /usr/share/phpmyadmin /var/www/phpmyadmin

Open your browser and open http://localhost/phpmyadmin. Now it should work.


Grub has two time the same kernels in menu After update (yesterday) from Ubuntu 12.04, GRUB has two of the same kernels in the boot menu for Ubuntu 12.04 (I have triple boot). I have already reinstalled GRUB, but with the same result. It seems to me that something is going wrong in update-grub:

Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.2.0-24-generic-pae
Found initrd image: /boot/initrd.img-3.2.0-24-generic-pae
Found linux image: /boot/vmlinuz-3.2.0-24-generic-pae
Found initrd image: /boot/initrd.img-3.2.0-24-generic-pae
Found Windows Vista (loader) on /dev/sda2
Found Ubuntu 11.04 (11.04) on /dev/sda7
done

There is no problem for boot but this is not nice. Solution?

Finally I found the reason why. Sometime ago I made some changes to the file /etc/grubd.d/10_linux .  For security reasons I made a copy of this file (.bak).   This file was still executable.  It has never caused problems till the last update of the system.  The only thing I had to do was a chmod so this file  (.bak) so he was no longer executable.  By doing sudo update-grub all the files that are present in the /etc/grub.d and are executable are taken in the grub.cfg  file, what caused the problem.

Sorry, I think you're suppose to use: update-grub2

Try to see if this is the fix. It's working for me just fine on old Maverick.


Can't delete Facebook and Google in Online Accounts! Where is the config file for Ubuntu Online Accounts located? since today I have an issue with my Ubuntu Online Account Settings. I started Empathy to log into my messengers, but I got an error that Facebook, Google and MSN need an authentication. I tried to delete all of them, but only MSN I was able to delete. Facebook and Google account do nothing. Doesnt matter account is ON/OFF.
Is there a way by delete a config file and reset Ubuntu Online Accounts in this way?

I had this problem too . It seemed to occur after an upgrade, I could add new accounts, and disable old ones, but unable to remove old accounts using the proper windows. I eventually found that account information appeared to be stored in the directory

/home/$USER/.config/libaccounts-glib/  (replace $USER with your username.)

There where 3 files in there accounts.* ; I removed them all and rebooted the computer, and found all the online accounts where gone, I then re-created the new accounts manually as needed.

This is a bit of a heavy handed approach, so if you use it, I recommend you take a copy of the files before you remove them from that directory.

I think you can very easily delete your Facebook and Google account. All you need to do is to just log in to the account and go the privacy settings and delete your account.


Ubuntu Software Center not recognising my network connection I have installed Oneiric Beta on my laptop. As my Mobile Broadband refused to connect to Internet through network manager I'm now using wvdial to connect. Hence the network manager shows I'm not connected to any networks. When I try to install software from Ubuntu Software Center the 'Install' option remains disabled and under reviews section it says no network connection! As a workaround I kept installing applications from terminal which works fine.

Therefore, my question is how to make Software Center recognize that I am connected to Internet?

You can't ... yet.

Please file a bug for both these issues: it's definitely an issue to not be able to override what NetworkManager tells Software Center, and it's also an issue that NetworkManager can't handle your Mobile Broadband connection.

As a workaround, if you're not using one of your connections, you could add dummy entries to /etc/network/interfaces to trick NetworkManager into thinking you're online. The way to do this:

auto eth0
iface eth0 manual

If you don't need to use your wired connection. Then reboot or restart NetworkManager. Of course this will break it for when you really need to use it :(

i have same problem  Install Boutton can be used and i have message  No network connection / ALL THIS PROBLEM  juste after using file for network connection beacause i have fixe my ip with on etc/Network/Interfaces ,  and after my software center can not detect any network ..

Solution, if you don't need use Network-Manager , Remove It, and your software Center by default switch automatically to use  etc/Network/Interfaces   to connect to internet .


Problem with Instalation I have two OSes (Windows 10 and Ubuntu 14.04).

Yesterday I had an error:

Boot menu Sata CD :tsstcorp cddvdw sn-208bb

So I can no longer boot.

I decided to install Ubuntu from scratch again. I have it in a bootable USB.

When I was configuring the installation I had a new error:

  Please ensure that your computer has at least 6 GB free space for ubuntu

I tried to use GParted to make space - but all it found was the USB.

How can I use GParted to make space?

Are you sure you clicked the drop down?

By default GParted will show the current drive - which would have been USB in your case. I expect that your HDD will be in that dropdown.

If it isn't, open "Disks" and check that the disk is there, and is mounted.

Click it and ensure the icon is a Square (not a triangle)

If it is a triangle, click it and go back to GParted.

you can use fdisk command manually for partition editing...
may be its a boot loader problem
to find partition name,use: cat /proc/partitions OR cat /etc/fstab
install GRUB again using live cd

grub-install /dev/sdx  (what ever ur drive is)
grub-install --recheck /dev/sdX
update-grub


How do I permanently add an identity for SSH? I need to run ssh-add <key> everytime I need to ssh into a webserver. Is there a way to add the ID permanently, so I dont have to keep adding the identities on each login?

EDIT: The key is a pem file, that I have downloaded from a cloud service.

Generate your key like normal: ssh-keygen, then place that key to the remote server with ssh-copy-id, which will sync it to the remote server's accepted keys.

ssh-keygen
ssh-copy-id user@host

It will prompt for your password then perform all the steps necessary to link your .pub key with the remote SSH server.

By default it will copy all your .pub keys to the remote server. If you just created your key with ssh-keygen then this isn't a problem (because you only have one!). However, if you have multiple keys you can copy just a specific key with the -i flag.

ssh-copy-id -i ~.ssh/key_name.pub user@host

Replacing key_name.pub with the name of the key.

Are you talking about Amazon Cloud? In your ~/.bashrc, create environment variables:

# Amazon
export EC2_PRIVATE_KEY=$HOME/Keys/pk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.pem
export EC2_CERT=$HOME/Keys/cert-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.pem
export JAVA_HOME=/usr/lib/jvm/java-6-openjdk/


Share folders between PC and Android I want to know how to share any folders between android and ubuntu. I've got it with WindowsXP. On my Android phone I've installed the app ES File Explorer. I've created a folder in the PC and it is shared. With the app from cellphone I can find the shared folder but when I try open it, the app says 'The account has no permissions' I don't know how to give these permissions.

Ohk.. I was trying the same thing, below is what worked:

In nautilus, right click on the folder you want to share and select 'sharing options', where you enable sharing the folder. In the same window, there are 2 other options: 'Allow others to create and delete files in this folder' and 'Guest Access'.
Check both the options.. Exit Nautilus (on computer) and ES file explorer (on android phone). Reopen ES file explorer and connect to the shared folder again...
That should fix the issue...

I save files on my Ubuntu machine.  Then I connect to it using sftp from within the ES File Explorer application for Android.  I made a bookmark to the Ubuntu directory on my Android desktop and can access it very conveniently.


How to fix the sound issue in 18.04 I  have sound issue in 18.04. I was installed 18.04 four months before, at that time no issue with sound, but yesterday i was connect to HDMI projector, after that the system speaker or external speaker having no sound when the player is working. Solution please

I had this issue after not installing third party software and update in the first installation step in Ubuntu 20.04 LTS.
You should just shift from gdm3 to lightdm to resolve this issue by opening the terminal and typing:
sudo apt-get install lightdm
sudo dpkg-reconfigure lightdm

After entering these commands if you are asked that only one of gdm3 or lightdm ubuntu can use then simply select lightdm when asked.
This worked for me.

The problem could be that the sound driver is not installed. You'll need to check with your manufacturer about what sound card is in your device to find the correct driver, but you can try with the Intel Sound Driver (which is a common one) by running

sudo apt install firmware-intel-sound

You could also try enabling the Pulseaudio sound service if it is disabled by running

pulseaudio --start --log-target=syslog

(If it is disabled by default, you'll have to re-enter it every time the system reboots (or add it to the startup services with the "Startup Applications" program)).
The Pulseaudio volume control program lets you manage the sound with a graphical frontend.

Install it with

sudo apt install pavucontrol

You can try re-installing the core sound packages with

sudo apt install --reinstall alsa-base alsa-utils pulseaudio linux-sound-base libasound2

If all of that fails, try killing the service with

killall pulseaudio; rm -r ~/.config/pulse/*, followed by a reboot.


How to verify that the ISO I downloaded is bootable before I burn it? How can I check that the ISO image I've downloaded is bootable, before I burn it?

isoinfo can probably tell you if it has the right files to boot if you want quick and dirty.
isoinfo -l -i is_it_bootable.iso will list the directory structure so you can check for files a live cd / bootable cd should have.

isoinfo -d -i is_it_bootable.iso will tell you if the CD has an El Torito section.  Ubuntu's live CD iso reports:

Eltorito validation header:
Hid 1
Arch 0 (x86)
ID ''
Key 55 AA
Eltorito defaultboot header:
    Bootid 88 (bootable)
    Boot media 0 (No Emulation Boot)
    Load segment 0
    Sys type 0
    Nsect 4
    Bootoff 8F 143

It's very simple. We will go step by step...

By using PowerISO.
First download and install PowerISO.
Open PowerISO.
Then click on FILE and then on OPEN and browse and open the ISO file.
When you have opened that ISO file if that file is bootable then in the lower left end, it shows "Bootable image". If not a bootable image, then it shows "Nonbootable image".