How to fix update problems (Ubuntu 20.04) I had finished the update to Ubuntu 20.04 and was trying to update the packages as well but I encountered an error with one of my packages being held. This is the output after running "sudo apt upgrade":

Reading package lists...
Done Building dependency tree
Reading state information...
Done Calculating upgrade...
Done The following packages have been kept back:
gdb gir1.2-peas-1.0 libpeas-1.0-0 libsmbclient libwbclient0 samba-libs
0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.

I have tried running multiple commands to clear broken packages/dependencies, including:

sudo apt clean
sudo apt autoclean
sudo apt autoremove

Nothing seems to work (not even dist-upgrade does anything) and when I tried manually updating the packages I got the following message:

sudo apt-get install gdb

The following packages have unmet dependencies:
 gdb : Depends: libpython3.8 (>= 3.8.0~a1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I have tried many more things without any results so I was wondering what my options are.

Running apt cache policy gbd libpython3.8 produces the output:

gdb:
  Installed: 8.1-0ubuntu3.2
  Candidate: 9.1-0ubuntu1
  Version table:
     9.1-0ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
 *** 8.1-0ubuntu3.2 100
        100 /var/lib/dpkg/status
libpython3.8:
  Installed: (none)
  Candidate: 3.8.2-1ubuntu1
  Version table:
     3.8.2-1ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages

I had this problem too and this is how i fixed it

Befor all don't forget this two points :

-- 1 -- Do not reboot your PC until you finish all the steps

-- 2 -- Do not forget to update your grub befor rebooting by executing :
    sudo update-grub2

The problem here is that when you upgrade ubuntu from 18.04 to 20.04 the system did not replace every instance of bionic with focal : it did not replace libpython3.8-stdlib (3.8.2-1+bionic1) by libpython3.8-stdlib (= 3.8.2-1ubuntu1.1)
So the solution is to replace it manually :)
The steps to do this are :

1 - save the names of the packages that depend on the library in a text file to reinstall them later
run : sudo apt-get autoremove libpython3.8-stdlib
a message will show you all this packages :

(( apg apparmor apport apport-gtk ...xserver-xorg-video-vmware xwayland yelp yelp-xsl ))

copy them in a text file, then tap " yes " to uninstall the bionic version of libpython3.8-stdlib

2- install the focal version by :

sudo apt-get install libpython3.8-stdlib

3- now install the packages saved in the text file one by one : you can create a screipt file like this :
(( ....

sudo apt-get install gir1.2-gck-1
sudo apt-get install gir1.2-gcr-3
sudo apt-get install gir1.2-gdm-1.0
sudo apt-get install gir1.2-geoclue-2.0
sudo apt-get install gir1.2-gnomebluetooth-1.0

... ))

Do not forget to install the ubuntu-desktop if it is not in the package text file
    sudo apt-get install ubuntu-desktop

4- update your grub , run : sudo update-grub2

5- finally reboot your pc

That's all :)

I was able to upgrade one system today and I noticed something in the process that I will share ...

The one system that I upgraded from 18.04 to 20.04 required several (about 5) sets of update && upgrade. During the final two, I received notice that there was much more to update and indications of file uploads in addition to what I had already done. During the last "sudo apt upgrade" command in Terminal, I received a notice of a large number of upgrades. It didn't indicate that they were the upgrade to 20.04, but it turned out that they were. To get this to happen, Updates needed to be set "For any version." This machine is working!

The second computer I simply wiped. Did a backup of data only to another disk and inserted a live USB and followed the instructions. I did this after getting repeated error messages that there were broken packages and missing files. I needed to end the frustration.

The third machine is an old one. This laptop has been upgraded from 14.04 to 16.04, to 18.04 (all LTS's). There's lots of legacy stuff, including some i386 files and programs. This one will not upgrade! Random error messages include one file not upgraded; 7 files not upgraded; 12 files not upgraded; Upgrades to the development release are only available from the latest supported release; going to Software Updater (GUI) I will receive notice of additional files to be loaded, sometimes 3, sometimes 6, and every number in between; and I receive notice that there is something wrong with my internet connection or the server; etc. Much of this is the same process that I went through with the first computer.

And, this is my guess ...
The 20.04 release is so new and so many people are downloading it that the server cannot handle the traffic (I've tried other servers with the same results). The updates and upgrades are being fed to my computer piecemeal. Here's what I've done:
- In Terminal - sudo update && upgrade, then sudo do-release-upgrade -d
- In Updater (GUI) - Click settings and then Updates, alternately setting Updates to "... any new version" and then to "... long term support version"; also try a different server.

It's exasperating, but I think the only thing we can do is continue to work with the computer, putting in the same commands; alternate using the Terminal and the Updater (GUI) until eventually we get to the holy grail ... and UPGRADE!


Virtualbox - Failed to open a session for the virtual machine I installed VirtualBox via Software Center. When I try to load a VM, getting an error exactly like this:

After I googled this error, found many different solutions, none of them were helped my situation. Also I removed all packages associated with VirtualBox, then downloaded and installed the latest package which I downloaded from Oracle repositories. Nothing is changed.

Additional Information:

OS   : Ubuntu 12.04 64-bit
VM   : Linux Mint 14 Cinnamon/MATE 64-bit

I created new vdi disk and tried to start it from .iso image.

Virtualbox Settings:

Num of processors : 4
Memory : 512 MB
Video Memory : 128 MB
3D Acceleration: Enabled

The error message is pretty self explanatory. The VM you are trying to start needs hardware virtualization enabled. See the follwing Q&A on how to do so (provided your CPU is capable of this):

How do I enable hardware virtualization technology (VT-x) for use in Virtualbox?

If this does not resolve the issue, the following steps may help:

Reboot the host OS
Try with fewer virtual CPUs starting from 1 only
disable VT-x settings in VBoxManager (reported to worked but I doubt this)
on a Hewlett Packard machine hardware VT-x could only be achieved with a BIOS update (source superuser.com)

It's that you need to run Virtualbox as an administrator.


automatic system updates , how to configure APT::Periodic::AutocleanInterval to clean obsoleted cache only? I've been using auto update for a while, but recently I discovered the downloaded package cache missing in /var/cache/apt/archives, some deb packages, like Skype, are removed, and I don't know why.

So I'm thinking about this option: APT::Periodic::AutocleanInterval, currently set to 0.

This page didn't provide much information:
https://help.ubuntu.com/community/AutomaticSecurityUpdates

If you don't know what you are doing don't use commandline. Use GUIs like synaptic. There are a lot of options to configure how Ubuntu should treat available update. To start it just press Alt+F2 and when dialog appears type command

gksudo synaptic

fill in password and when synaptic opens go to
settings->repository
see the updates tab and select options as per your flavor

The command just cleans up the local cache.

See https://help.ubuntu.com/12.04/serverguide/automatic-updates.html


Ctrl-Alt-T stopped working - Ubuntu 14.04 This happens now and then and after a restart it works. No clue as to what causes this. When this happened earlier I would search for Terminal in Dash and launch. But today, even that does not work.

I have tried the solutions posted in the following posts without any luck.

CTRL+ALT+T not working
Ctrl Alt T doesn't work

I am going to restart lightdm first to see if that helps and if not I will restart my laptop.

I look forward to your suggestions on what else I could try for this is sure to recur.

I have also faced that type of problem earlier and initially used to restart.

But now any type of such problem, then by using following command:

kill -9 -1

This will kill processes and return to login screen, then after login all works well & successfully.


How to install H.265 / HEVC codec on Ubuntu Linux? I have seen that the new DivX Player 10 shows off H.265/HEVC playback, the successor of H.264. I wonder how I may get this support in Linux. Is there a need to install a codec specific for this format? How?

There is also a PPA for libde265 GStreamer integration. With that installed one can playback H.265 with all GStreamer applications (Browsers, Totem, etc.).

sudo apt-add-repository ppa:strukturag/libde265
sudo apt-get update

Now try playing back a .mkv containing HEVC/H.265 content using any GStreamer-aware player (e.g. "totem"). This should detect the missing codec and prompt to install the libde265 GS plugin (make sure to select the 64bit or 32bit version depending on your architecture).

You can also install the corresponding GStreamer plugin directly:

sudo apt-get install gstreamer0.10-libde265

Or for GStreamer 1.0 applications:

sudo apt-get install gstreamer1.0-libde265

There is also a VLC plugin available:

sudo apt-get install vlc-plugin-libde265

Details here: GStreamer plugin for 4K H.265/HEVC video streaming

Yet another alternative - if you have Google Chrome installed - is to add/install H.265 / HEVC player (in)to your Chrome browser.

After that, you can head straight to "Google Chrome Applications" (at your Ubuntu distro menu) and run the player. Or you can just start Google Chrome, type in the URL chrome://apps and hit Enter. This will cause Google Chrome to show you its installed apps, so you can run H.265 / HEVC player straight from there.

By using this alternative method, there's no need to install any library, codec, player plugin or whatever, because everything you need for H.265/HEVC playback support is already embedded in the H.265 / HEVC player.

I've already used H.265 / HEVC player to watch a couple of two-hour-long H.265/HEVC encoded movies, and I didn't experience any playback issue.


Ubuntu 14.04 LTS: FN-Brightness Key Stopped Working Hello dear Ubuntu Community,

After i installed some Ubuntu Updates on my PC,my FN-Key stopped working. (But i can still change it in the System settings.
I tried many ways to fix it trough the /etc/default/grub file.

My actual entry is:

  GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=
  acpi_backlight=vendor" GRUB_CMDLINE_LINUX=""

I have a Acer Aspire E1-510 with Intel Inside PENTIUM

Please Help me :/

[PS: Sorry for my bad English i'm German]

Please try:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linux"

It works at least for me on my acer asus 1005P, contrary to what it's written here. (maybe the kernels are different).

I fixed it with this entry in /etc/default/grub:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linux"
GRUB_CMDLINE_LINUX=""

Thanks to Rmano


Prevent sleep/suspend when not logged in to a specific account We have a shared office desktop running Ubuntu 18.04 where several jobs (via ssh and screen) often run for weeks on multiple accounts. When logged into an account, sleep/suspend is deactivated through:

Power settings in main System Setting
Using gnome-tweak-tool, setting "Suspend when laptop lid is closed" to off.

This works fine as long as a user with these power settings is always directly logged into the machine (i.e., physically, not via ssh).

The problem is when no user is currently logged in directly i.e., when the machine is at the main login screen (like on boot up). There does not appear to be a way to set sleep/suspend settings when not logged into a specific account. So, if the machine remains on this screen, it eventually sleeps, suspending all the running jobs.

As I mentioned, things work fine as long as some user is logged in. However, this has been viewed as a security risk. So we'd like to find a better system-wide solution.

I should mention that we have another office desktop running Ubuntu 16.04 which does not have this problem.

When no user is signed on
When no user is signed on the power settings come from psuedo-user ID gdm. The following controls for GDM auto-suspend come from: ArchLinux GDM
GDM auto-suspend (GNOME 3.28)
GDM uses a separate dconf database to control power management. You can make GDM behave the same way as user sessions by copying the user settings to GDM's dconf database.
$ IFS=$'\n'; for x in $(sudo -u username gsettings list-recursively org.gnome.settings-daemon.plugins.power); do eval "sudo -u gdm dbus-launch gsettings set $x"; done; unset IFS

where username is your user's name.
Or to simply disable auto-suspend (also run the command with ac replaced with battery to also disable it while running on battery):
$ sudo -u gdm dbus-launch gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'nothing'

If you are using UBUNTU 18.04
you can use an indicator named

  Caffeine Indicator

you can get it from software store and install it.

Activate it so that it can Manually control the desktop’s idle state

Hope so it will help..


How to update Vorbis codec? After ripping audio CDs to Ogg-Vorbis files with Asunder, I noticed that it uses the libVorbis 1.3.4 (Turpakäräjiin) codec from 2014 (program installed via apt-get). Is there any way to update the system's libvorbis to the newest version so that it will be used instead?

If you want the newest version from xiph.org/vorbis you can install the git version, although, it is not recommended.

sudo apt update
sudo apt install git automake m4 libtool buildessential

You may need to install:

sudo apt install libvorbis-dev

and

sudo apt build-dep libvorbis

You may need to install more packages but you will have to pay attention to the output when you run the following commands. Any error should tell you what you need to install if you do need to install something else.

Run the following commands to clone and compile vorbis from source:

cd ~/
git clone https://git.xiph.org/vorbis.git
cd vorbis
./autogen.sh
./configure
make
sudo make install

You may see a couple of "warnings" but you can ignore warnings. Pay attention to any errors.

If you have problems, you can uninstall by running the following commands:

cd ~/vorbis
sudo make uninstall

If you want to update in the future, you can run the following commands:

cd ~/vorbis
git pull https://git.xiph.org/vorbis.git master
make clean
./autogen.sh
./configure
make
sudo make install

Run the following command for more info:

cat ~/vorbis/README.md

Next, to run asunder using the new libs, run the following command:

LD_LIBRARY_PATH=/usr/local/lib asunder

Alternatively, you can permanently set the new libvorbis system wide by running the following command:

echo '/usr/local/lib' | sudo tee /etc/ld.so.conf.d/libvorbis.conf

If you run into problems running the new libvorbis with other applications, you can run the following command to remove the system wide link.

sudo rm /etc/ld.so.conf.d/libvorbis.conf

I have verified that both of these methods work.

Click here for more information about linked libraries.

Click here for more information about vorbis.


Dual boot with Windows 10, but with the wrong Windows 10 I have 1 HDD and 1 SSD: Windows 10 is installed on the SSD, and Ubuntu and Windows 10 are installed on the HDD.

I used to boot into Windows 10 (HDD) without grub menu, grub wasn't the main EFI I guess.
After the Windows 10 updates I couldn't boot the Windows 10 that is installed on the HDD.

It initialized disk diagnosis and failed to repair.
I used boot-repair.iso through USB using Rufus. That failed to repair it.
I tried to make the grub the main bootloader, so I could choose Windows 10 (HDD) and boot normally with grub, but there was Windows 10 (SSD) in the grub menu, I couldn't boot into Windows 10 (HDD) via grub.

My opinion is Windows 10 (HDD) boot files have been corrupted and grub can not make any sense of Windows 10 (HDD) boot files. In other words grub can't see Windows 10 (HDD), but it can see the Windows 10 that is installed on the SSD.

http://paste.ubuntu.com/24873778

Note: I use 2 instances of Windows 10 so I can use the other one if one of them fails.

You've got a complex setup:

/dev/sda is partitioned using the old Master Boot Record (MBR) method, has a BIOS-mode Windows boot loader installed in its MBR, and appears to hold both Windows and Ubuntu installations. Based on its size, I'm guessing this is the HDD to which you referred.
/dev/sdb is partitioned using the new GUID Partition Table (GPT) system, has a BIOS-mode Windows boot loader in its MBR, has an EFI-mode Windows boot loader on its /dev/sdb2, has an EFI-mode GRUB (Ubuntu boot loader) on its /dev/sdb2, and seems to hold a Windows installation. Based on its size, I'm guessing this is your SSD.
/dev/sde looks like a bootable USB drive with an Ubuntu (or other Linux) installer on it. I'm therefore ignoring it.
/dev/sdf is partitioned using GPT and has what looks like an NTFS data partition with no OS installed on it. As it doesn't seem to be a boot disk, I'm ignoring it.

This is complex and complicated because Windows ties its boot mode to its partition table type: On MBR disks, Windows boots only in BIOS/CSM/legacy mode; and on GPT disks, Windows boots only in EFI/UEFI mode. You've also got both BIOS-mode and EFI-mode Windows boot loaders on your disks. This suggests a BIOS-mode Windows installation on /dev/sda and an EFI-mode Windows installation on /dev/sdb. (I'm guessing that the BIOS-mode Windows boot loader on your GPT /dev/sdb is either left over from a previous installation or was accidentally installed to the wrong disk.) There's no sign of a BIOS-mode GRUB, but there is an EFI-mode GRUB on /dev/sdb2; but the bulk of Ubuntu seems to be installed on /dev/sda. Ubuntu is much less rigid in its linkage of partition table types and boot-mode styles, so the Ubuntu configuration, although unconventional, is not puzzling.

Note that switching between OSes installed in the two boot modes (BIOS and EFI) is tricky. You must normally use the firmware's built-in boot manager, which is usually awkward. My suspicion is that this is what you were doing; but the update broke something; perhaps it got confused because of the mixture of MBR and GPT disks and the multi-boot configuration. Note that the EFI-mode GRUB cannot redirect the boot process to boot your BIOS-mode Windows installation, but it can redirect to boot your EFI-mode Windows installation.

One caveat to the preceding analysis is that I don't know if an EFI-mode Windows boot loader, installed to the ESP on a GPT disk, could boot a Windows installation on an MBR disk. If it can, then my analysis may be a bit off; you might have been booting both Windows installations through the EFI-mode Windows boot loader. If you're certain that you could once boot both Windows versions through GRUB, then this was probably happening, but the Windows boot loader update probably changed the Windows configuration in some way that broke the ability of the EFI-mode boot loader to boot the OS.

I have two suggestions for how to proceed with a repair. Neither is guaranteed to work; in fact, they're both long shots. Thus, I STRONGLY recommend you back up your important data and be prepared to do a full re-install of the non-working Windows installation. My two ideas are:

Use rEFInd to redirect to a BIOS-mode boot -- My rEFInd boot manager can redirect from an EFI-mode to a BIOS-mode boot. You could obtain the USB flash drive version from the rEFInd downloads page, prepare a medium with it, and edit EFI/BOOT/refind.conf on the USB drive: Uncomment the scanfor line and ensure that hdbios is among the options. This should enable rEFInd to boot Ubuntu, the Windows on the GPT disk (via the Windows icon), or the BIOS-mode Windows on the hard disk (via the gray diamond-shaped icon). If this works, you could install rEFInd to the hard disk by installing the Debian package or PPA, make the same change to /boot/efi/EFI/refind/refind.conf (in Ubuntu), and use rEFInd as your default boot program. This method is most likely to be helpful if you had been booting both Windows versions through a single Windows boot loader. In this scenario, the update changed the HDD Windows to expect to boot in BIOS mode, and rEFInd will do this.
Convert your HDD Windows install to GPT and EFI-mode booting -- This blog post describes how to convert Windows to boot in EFI mode from a GPT disk rather than in BIOS mode from an MBR disk. (The new Windows MBR2GPT program will do the same thing in an automated way, but I'm not at all sure how well it would work on your complex triple-boot setup.) If you apply this method to your existing setup, it might get Windows on the first disk booting again. Note, however, that the system will probably boot straight to that Windows. You'll need to use EasyUEFI to adjust the boot order to make GRUB (ubuntu) the default boot loader again; and after that, you may need to type sudo update-grub in Ubuntu to ensure that GRUB's menu has been suitably updated. This method is most likely to be helpful if you had been picking your Windows version through the firmware's built-in boot manager before you hit GRUB. In this scenario, you probably need to bring more consistency to the configuration, and that means converting everything to boot in EFI mode from GPT disks.

As I said, neither of these approaches is guaranteed to work, and either could make matters worse. Trying rEFInd on a USB flash drive is quite low in risk; and if it works, installing it to the hard disk is also unlikely to create new problems, although there are ways in which the rEFInd installation might fail. Converting Windows from BIOS-mode to EFI-mode booting is much riskier.

look in the /efi/boot dir of the HHD for the windows boot manager (bootx64.efi usually)

if it is't there, copy the one from the SSD to the HDD.

update grub


Windows-manger not working? I can't see the maximize, minimize and close buttons I did something that I don't know and for some reason now I can't click the maximize, minimize and close buttons even resize the window, the title bar just fixes at the top without these buttons and I can't move the window too.

What should I do to be able to see the title bar with the buttons again?

EDIT: what i want the window is look like this not the above one.

It happens when the windows-manager is not working. The windows-manager should automatically restart if its process is terminated, but sometimes it don't happen. I first would recommend the system reboot, so the windows-manager would be started automatically by the own system. If it did not happened you could try to run it manually from the Terminal, with the following command:

$ compiz

Or

$ compiz --replace

If I've got you correctly, you're trying to move that windows hidden by the statusbar, right?

To do so, press and keep the ALT key pressed and then left click and drag the window. You will then be able to click its close and minimize and maximize buttons.

EDIT : If none of these solutions work, file a bug in Launchpad by typing ubuntu-bug ubuntu in a terminal. To bring a terminal up, type CTRL-ALT-T. Then, follow the instructions.


Are there any LVM gotchas? I have been playing around with LVM on a virtual machine. Until now I have found only advantages on it and I'm thinking about using it on my real machine the next time I do a fresh install.

I have never used it on a "real life" scenario, so are there any shortcomings that I must be aware of, like performance penalties or harder management (e.g.: backup and recovery)?

There is quite a bit of literature out there:

https://serverfault.com/questions/256896/advantages-and-disadvantages-of-logical-volume-manager-lvm-and-lvm-vs-encrypt

https://unix.stackexchange.com/questions/7122/does-lvm-impact-performance

The upshot is this:
In almost all scenarios LVM will offer you more flexibility and easy of maintenance. Even in the case of recovery the oft-cited problem of oh-my-god-when-one-disk-goes-all-is-lost problem is mostly easier to deal with than many RAID setups. Provided you leave some slack in your disk space you can swap a broken disk for a new one with the system running. Quite nice.

The second worry cited: performance hits due to an additional virtual layer is also not a problem for most scenarios: The throughput is as good as good-old direct partitions.

However, all of these are rather vague statements given the unclear specifics of your setup. So to find out you need to provide a  lot more information on usage scenarios etc. And even then, your best bet is some benchmarking (e.g. bonnie++). Btw, doing those with your virtual machine will not be helpful. It is however a good way to practice the setup which initially seems a little cumbersome.

Edit: How to deal with backups:
If you are used to backing up your system hard disks using dd, you can continue this with logical volumes (LV). Keep in mind that LVs are also block devices to which dd can be applied. The underlaying organization for a block device is hidden from the recipient of a dd (one reason you can dump a partition into a file: dd if=/dev/hda1 of=/tmp/part_a1

However, using dd on a running system is dicey due to the potential changes in your disk while you are doing the backup (one protection would be to mount read-only). With LVM, however, none of that is necessary since you now have access to the fantastic new feature: snapshots!

Previously, you would have backed up the 'partition' directly and that is still valid:

dd if=/dev/mapper/VolGroup00-LogVol00 of=...

Now you can make a snapshot of a running system (provided there is some space, you might have to add disks and extend volume groups. All very easy ...)

lvcreate -s -L 64M -n mysnapshot /dev/VolGroup00/LogVol00

You can dd this to image it safe in the knowledge that it won't change.

So in summary, with a bit more work (in needing to understand the tools) you have more flexibility to get done what you are trying to achieve under many scenarios (including the backup issue)

On virtual machine, everything is stored into files on your system, so there is no real performance reason to divide virtual disk to parts (swap etc).

It can have sense if you can place swap disk to different drive (ssd) via symlink, but then you rather use separate virtual disk.


Ubuntu 17.10 freezes after login it freezes completely without possibility of use ctrl + alt + F{n} keys.

in some answer on this website i read people talk about the kernel, the cstate=1 on grub config, the proprietary driver problem and that problems on ubuntu are related to Ubuntu-[Lenovo notebook] combination that doesn't works.

Noone talks about DE.

if someone has the solution please told me, because using LXDE or I3 or MATE or anything equals to GNOME or UBUNTU(also in xorg) works without problem.

at this time i am using i3 but i prefer use the default DE.

thanks in advance

the reason is that 17.10 is unstable instead they told don't. it has problem w/lenovo laptops.
Problem solved in the 18.04 Ubuntu version


What is the difference between dpkg and aptitude/apt-get? When installing a software via dpkg -i packageA.deb, will the dependencies required by packageA be downloaded and installed automatically? How is this different from using apt-get or aptitude?

No, dpkg only installs a package, so doing dpkg -i packageName.deb will only install this Deb package, and will notify you of any dependencies that need to be installed, but it will not install them, and it will not configure the packageName.deb because well...the dependencies are not there.
apt-get is a Package Management System that handles the installation of Deb packages on Debian-based Linux distributions. A Package Management System is a set of tools that will help you install, remove, and change packages easily. So apt-get is like a clever dpkg.
I like to think of the timeline this way (the following is just me speaking from experience. It is meant to only give you an idea of this whole thing):

They came up with a way to "store" the files of an application in a "package" so that it can be easily installed. So, the Deb package (.deb extension file) was born.

A .deb file contains the files needed by an application to run, as well as (I like to call it) "meta-data" that holds other information, such as the names of the dependencies the application needs. If you want to see the contents of a .deb file, you can use the command dpkg -c packageName.deb, and if you want to see this "meta-data" information, use the command dpkg -I pacakgeName.deb (and if you want to only see the dependencies, do dpkg -I packageName.deb | grep Depends).

They needed a tool to install these .deb files, so they came up with the dpkg tool. This tool, however, will just install the .deb file, but will not install its dependencies because it doesn't have those files and it does not have access to "repositories" to go pull the dependencies from.

Then, they came up with apt-get, which automates the problems in the previous point. Underneath the hood, apt-get is basically dpkg (I like to think of it as apt-get being a front-end for dpkg), but a clever one that will look for the dependencies and install them. It even looks at the currently installed dependencies and determines ones that are not being used by any other packages, and will inform you that you can remove them.

aptitude then came along. It uses the libraries apt-get uses and actually has an interactive UI (user interface). If you want to see this UI, simply type aptitude in the terminal. That's aptitude. It leverages the libraries to provide more options and perks than apt-get. For example, aptitude will automatically remove eligible packages, while apt-get needs a separate command to do so. But, in the end, doing sudo aptitude install packageName.deb should at least be the same as sudo apt-get install packageName.deb. There might be subtle differences here and there that I do not know about, but they will both look for the dependencies and do all that stuff. You can read the answer here for more information on the differences between aptitude and apt-get.
Also, aptitude does not have Super Cow Powers.

EDIT: Apparently, it does. aptitude -v[v[v[v[v]]]] moo.

aptitude might not be installed by default. To install it, do sudo apt-get install aptitude or click this: aptitude .

Extra

The following information doesn't really directly answer "What is the difference between dpkg and aptitude/apt-get?" but it contributes to the big picture.

From Carlos Campderrós' comment below:
gdebi is another tool that is kind of a mixture between apt-get and aptitude. When you use it to install a .deb package (gdebi packageName.deb), it will identify the missing dependencies, install them using apt-get, and then finally install and configure the package using dpkg. It even has a simple and neat GUI that gives you information about the .deb package, the files included in the package, and what dependencies need to be installed. To see this GUI, you would do gdebi-gtk packageName.deb. You can give gdebi a try by installing it with sudo apt-get install gdebi or click this: gdebi .

I don't want to confuse anyone, but just to give you another part of the picture, there is another popular Linux package format called RPM, and its files have the .rpm extension. This package format is used on RPM-based Linux distributions (such as Red Hat, CentOS, and Fedora). They use the command rpm to install a package, and yum is the front-end for it, it's the clever one. So their .rpm files are our .deb files, their rpm tool is our dpkg tool, and their yum is our apt-get.
From Paddy Landau's comment below:
alien is a tool that converts between .rpm and .deb packages. So if you ever fall into the situation where you have an .rpm package, and you want to install in on your Ubuntu (or any other Debian-based distro), you can use the command alien rpm_packageName.rpm to convert it to .deb, and then install it using dpkg. You can do the reverse (convert .deb to .rpm) using alien -r packageName.deb.

I think the most important thing and also a difference is to note is that you should use apt-get tool to install packages. (apt or aptitude is fine as well).

This is because dpkg is meant to install packages without installing dependent packages.
Because of that just installing a package with dpkg, may lead to a later problem where dependency resolution may end up with a broken system.

You should use the command line apt-get or apt (since 14.04) tool to install packages. These tools are using dpkg for you and at the same time do have the dependency resolution mechanism inside.


Nautilus multicolumn list view I'm trying to get Nautilus to display files in a list view across multiple columns, like is seen in the image below, and I just can't find how to do it.

Source: https://blogs.gnome.org/cneumair/files/2008/02/screenshot-compact-icons.png

Here are the versions of Ubuntu and Nautilus I'm using:

Distributor ID: Ubuntu
Description:    Ubuntu 18.04.2 LTS
Release:        18.04
Codename:       bionic

GNOME nautilus 3.26.4

You did not overlook anything. Unfortunately, such view is not anymore supported in Files, a.k.a. nautilus. The two available views are the icon view, where files are ordered from left to right, and column view, where files are ordered in a single column.

This is an unacceptable regression in Nautilus. Can't even find a parameter for compact list view buried somewhere in dconf editor. Thankfully I am a Xubuntu user; Xubuntu comes with the Thunar file manager.
My recommendation is to install Thunar and be happy! It has icon, detailed list, and yes, compact list views. Also take a look at Thunar's Configure custom actions, another feature Nautilus cannot compete with. Makes it super easy to add right-click menu items.


setup PPPoE over ethernet card How to setup PPPoE connection over wired DSL connection (Ethernet)?

I'm using Ubuntu 12 dual-booting with windows. It runs OK. on windows

If you have a decent router, the PPPoE connection is (or should be) handled in the router and is stored in it, unaffected by power down resets. The connection to your computer becomes a VPN to the router (LAN). Very few routers (only very old ones) need the PPPoE to be reset for every computer or operating system. If they do, you have very little firewall protection between you and the web, in which case I'd recommend a new one, SMC, Netgear etc. ....
You can boot in windows and check the connection settings there, make a note of them including any passwords, then boot back into Ubuntu and make sure the connection is the same. Ubuntu nearly always finds the correct settings for a LAN entirely on its own, unlike some others!


How to remove icons/shortcuts from Unity menu? I have installed Chromium and Tweet Deck on it (trough Chrome Store), now I uninstalled Tweet Deck and after that Chromium, the problem is, when I installed Tweet Deck it asked me if I want to create a shortcut to it and I chose YES. Now that both are uninstalled the Tweet Deck icon still appears on Unity Menu over Internet.

I tried to remove the icon from the menu but I can't figure out how to do this. It should be a simple thing to do, but is giving me headaches :P

What I have to do to remove the shortcut and possible junk files from Chromium?

Also my Ubuntu version is 11.10 x64.

(Sorry if I write something wrong)

It seems that you can't remove apps from the Dash, however you can manage your launchers (*.desktop files) in one of the following directories:

/usr/share/applications
/usr/local/share/applications
~/.local/share/applications

If your launcher file is in any of the first two directories, you will require root permissions to remove it.

Right click the app's icon.
On the next screen that appears, select the "Uninstall" button.
The app should now be uninstalled.


Ubuntu noisier than Windows 7 System:

DELL 1558 Laptop (64-bit)
4 GB RAM
320 GB HDD

Have installed Ubuntu (11.04?) alongside Windows 7 (Dual boot). Both OS's working fine.
My concern is that when I am in Ubuntu the fan seems to be running all the time, making the system noisier. Is there any solution to this? Windows 7 is much quieter. I know that this contradicts the common perception.

There are different possible causes: Either your system is effectively using more power (more cpu activity) and it needs more cooling. A second option is that you miss a driver which disables the fan if it is not needed.

In the first case you will also drain your battery much faster so it is certainly worth looking at these tips:

1) some driver is not installed, often the graphics driver. In this case your cpu will take over. Since it is less efficient, than the graphics card it will use more power.  You can check for binary drivers here:

  In Ubuntu 10.04 and 9:10 this is found under System->Administration->Hardware Drivers.

  Note:In Ubuntu 10:10 Hardware Drivers is now named Additional Drivers
  (from https://help.ubuntu.com/community/BinaryDriverHowto)

2) There are program which wake your system up all the time disabling your cpu to go into power save mode. The best thing you can do is to try installing powertop.

sudo aptitude install powertop

If you run it as root it will give you different tips to save power. Try enabling them and see if your system runs cooler.

sudo powertop

Some more related tips are here: https://help.ubuntu.com/community/PowerManagement/ReducedPower

3) Some programs cause a high cpu usage. Especially with flash I've noticed this. Does your fan still work loud if you have no programs running? Also try disabling/uninstalling programs which you don't need and which start automatically at boot. One notable program is tracker which indexes your harddrive to make search faster. However if you don't use it, you should remove it (note that it is no longer installed by default, so it may not be a problem for you).

It seems that you've installed motherboard drivers in Windows but not in Ubuntu. I not sure is there a chance to get motherboard drivers for Ubuntu.


How to install drivers for ATI Mobility Radeon HD 4200? I followed a guide to install drivers for my graphic card, However when I restart, Ubuntu merely shows a blank screen. I can get a terminal through CTRL+ALT+F1, but that's about it. Where exactly am I going wrong, and what exactly can I do to fix my current situation?

I use a laptop with an external monitor and a Ubuntu 12.04 64bit.

Go to the terminal with Ctrl Alt F1 like you said.

The command dpkg -l '*nv*' wil list all the the installed packages containing "nv".
With me the offending package was "nvidia-current".

Type sudo apt-get remove nvidia-current. Type your password if asked for.

Reboot your machine and viola. Well it worked for me. Hopefully you will be successful too.


Java Oracle Installation /usr/bin/java: cannot execute binary file Hi I've been trying for 1 day to get Oracle Java running on Ubuntu.

I have a powermac g5 with Ubuntu 12.04 ppc64.

uname -a :

Linux LK37 3.2.0-53-powerpc64-smp #81-Ubuntu SMP Thu Aug 22 21:17:14 UTC 2013 ppc64 ppc64 ppc64 GNU/Linux

lspci:

david@LK37:~$ sudo lspc [sudo] password for david:  sudo: lspc:
command not found david@LK37:~$ sudo lspci 0000:00:0b.0 PCI bridge:
Apple Inc. CPC945 PCIe Bridge 0000:0a:00.0 VGA compatible controller:
NVIDIA Corporation NV43 [GeForce 6600 LE] (rev a2) 0001:00:00.0 Host
bridge: Apple Inc. U4 HT Bridge 0001:00:01.0 PCI bridge: Broadcom
BCM5780 [HT2000] PCI-X bridge (rev a3) 0001:00:02.0 PCI bridge:
Broadcom BCM5780 [HT2000] PCI-X bridge (rev a3) 0001:00:03.0 PCI
bridge: Broadcom BCM5780 [HT2000] PCI-Express Bridge (rev a3)
0001:00:04.0 PCI bridge: Broadcom BCM5780 [HT2000] PCI-Express Bridge
(rev a3) 0001:00:05.0 PCI bridge: Broadcom BCM5780 [HT2000]
PCI-Express Bridge (rev a3) 0001:00:06.0 PCI bridge: Broadcom BCM5780
[HT2000] PCI-Express Bridge (rev a3) 0001:00:07.0 PCI bridge: Apple
Inc. Shasta PCI Bridge 0001:00:08.0 PCI bridge: Apple Inc. Shasta PCI
Bridge 0001:00:09.0 PCI bridge: Apple Inc. Shasta PCI Bridge
0001:01:07.0 Unassigned class [ff00]: Apple Inc. Shasta Mac I/O
0001:01:0b.0 USB controller: NEC Corporation OHCI USB Controller (rev
43) 0001:01:0b.1 USB controller: NEC Corporation OHCI USB Controller
(rev 43) 0001:01:0b.2 USB controller: NEC Corporation uPD72010x USB
2.0 Controller (rev 04) 0001:03:0c.0 IDE interface: Broadcom K2 SATA 0001:03:0d.0 Unassigned class [ff00]: Apple Inc. Shasta IDE
0001:03:0e.0 FireWire (IEEE 1394): Apple Inc. Shasta Firewire
0001:05:04.0 Ethernet controller: Broadcom Corporation NetXtreme
BCM5780 Gigabit Ethernet (rev 03) 0001:05:04.1 Ethernet controller:
Broadcom Corporation NetXtreme BCM5780 Gigabit Ethernet (rev 03)
david@LK37:~$

I tried various ways to install Oracle Java but I always end up with:

bash: /usr/bin/java: cannot execute binary file

At the moment I have Installed jdk-7u25-linux-x64.tar.gz in /usr/lib/jvm/jdk1.7.0/bin/ as said in this post

I already tried the web install but I get a 404 error.
I hope you can help me. I started using Ubuntu yesterday so please give me the complete terminal code, it will be a lot easier for me. For those who care I want to play Minecraft and with the OpenJDK I got a java.lang error. That's why I want to install Oracle Java.

Minecraft is awesome! But you do not need a jdk unless you plan on developing java.

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

You have some locale setting errors. Here, follow the instructions here and see if that resolves your issue, and let me know if it does: How do I fix my locale issue?
https://help.ubuntu.com/community/Locale

As to you are getting a binary execution error, I'm not to sure. It could be that you have an integrated chip environment using intel / nvidia with optimus. Some more details would help to determine what that is. Run
    lspci
and post those results in your question area please. If it says intel integrated graphics, and somewhere says that you have nvidia, then that is your problem and you will need to install bumblebee and use optirun minecraft so you can use opengl.

Hi There I Just Wanted To Share This Page With You it Might answer your question

https://help.ubuntu.com/community/Java


How to install aircrack Can I get help installing aircrack-ng-1.2-beta3/aircrackng-1.1 in a detailed form? Im using Ubuntu 14.04.

Aircrack-ng 1.1 is in the official Ubuntu Repository

Open a terminal by pressing Ctrl+Alt+ T

Then copy and paste the following command in the terminal.

Then press Enter.

sudo apt-get install aircrack-ng

Edit :

To resolve your problem, run a update before installation.

sudo apt-get update

To install Aircrack-ng 1.2 rc3-4 from the official Ubuntu Repository,

you have to install the source of  wily, xenial, or yakkety

to check the current source list:

cat /etc/apt/sources.list

to add xenial source list:

cat >> /etc/apt/sources.list

in the new line copy and past the following line

deb http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse

then press on ctrl+J and ctrl+D, for new line and to finish editting

then update the repository

sudo apt-get update

then install aircreack-ng 1.2 rc3-4

apt-get install aircrack-ng


ICC color profile only loads after switching graphics mode? Some time ago I installed Ubuntu 16.04 on my Dell XPS15 laptop. I've loaded an .icm profile, but it only works 50% percent of the time...

I've also noticed now that switching it within the color manager does not seem to be working. (It did before) However, when plugging in an external display, the color profile is loaded. I can also get it to load myself by switching from the Nvidia to the Intel GPU with the prime indicator.

Obviously, I'd like my color profile to load 100% of the time when logging into my laptop. How is this achieved?

What I've done so far:

Installed nvidia drivers, xsettings and prime-indicator
Applied an .icm profile through the built in color manager
Aquired an external monitor and plugged it in/out every day
Noticed my color profile wasn't loading
Added the .icm file to ~/.color/icc, ~/.local/share/color/icc and ~/.local/share/icc
Downloaded software to try to apply the profile (Argyll CMS)

But still, I can only get the profile to load when switching to the Intel GPU. (And even that doesn't work 100% of the time...)

Just in case anyone using bumblebee and intel-virtual-output where the HDMI port is wired to the Nvidia chip, DisplayCal and Color can only set the color profile for internal screen only.

With xcalib, you can specify the display to apply the color profile to. In the default settings, :8 is the virtual display that the Nvidia runs on:

xcalib -d :8.0 path_to_profile.icc


Change default wifi sort order By default, Ubuntu lists nearby wireless networks sorted alphabetically, regardless of the signal strength.

How can I set the list to be displayed in order of wi-fi signal power?

This behaviour of network-manager-applet is by design and can't be changed.

From the bugtracker:

  We do understand that at the very first time you setup your computer
  (or when you're travelling somewhere), there is a need to select
  networks from a list (potentially fairly long) which is alphabetically
  listed; however;

  this is only for the first time you go to a specific location. After that, your "favorite" networks float to the top, followed by a
  number of other networks (up to five in the "main" menu), then all
  others to a submenu, all of which alphabetically listed.
  alphabetical listing makes sense following the concept that it's the natural way to look for a known network name -- which is the most
  common use cases: you know the name of your home network, if you go to
  someone's house, they would tell you the SSID to use, etc.
  your "home" network will not always be at the highest strength (which is especially true where there are lots of wifi networks in
  range, due to factors such as interference)

  As such, I'll mark this bug as "Won't Fix". Thanks!

(source)

I have 2 home routers set to different dns's.

On the router that I don't want to use, I turned the setting to "automatically connect to this network when it is available" off in the corresponding profile.

This way when I start my computer, it connects to the router that I want, perhaps this may work for you as well.


How to back up my entire system? If I want to make a backup of my entire OS (including but not just my home directory), how do I go about this?

Is it as simple as backing up everything in / and then when if I suffer a crash, just copying the files back over?
Will this cover grub, and how do I actually do this when the system is inoperable?

FILES

Refer to this howto: http://ubuntuforums.org/showthread.php?t=35087

In simple terms, the backup command is: sudo tar czf /backup.tar.gz --exclude=/backup.tar.gz --exclude=/dev --exclude=/mnt --exclude=/proc --exclude=/sys --exclude=/tmp --exclude=/lost+found /. Add more --exclude= parameters if you need to.

It will create an archive of all your files at /backup.tar.gz, which you can then copy over to another computer/drive and restore your files if the install goes pear-shaped. You can do it from a LiveCD, by mounting the "bad" system under /media or /mnt and running tar xf /path/to/drive/with/backup.tar.gz -C /mnt (substitute for the actual path to the "bad" system).

GRUB

This will not cover GRUB, however you can easily reinstall it by following this guide here. You only need to do steps Three and Four.

I use a program called Back In Time that's similar to Apple's Time Machine.

It's easy to tell it where you want your backups to go and how often to do the backup.

Back In Time is in the Ubuntu repos.


Paper theme on Ubuntu Unity I can't install the paper theme on Ubuntu Unity. The strange thing is that it seems to work well when using root user but is not working as I would expect in a simple user.

As you can see in screen captures Paper gtk theme is intented to be used with Gnome Shell and it's "tittlebars".

Other desktops like Unity won't provide an ideal experience.


ssh: connect to host 127.0.0.1 port 2222: Connection refused Hello I've created a user in Ubuntu and I want to connect to it using ssh using this command

ssh user@127.0.0.1 -p 2222

and I got this error

ssh: connect to host 127.0.0.1 port 2222: Connection refused

I tried

ssh -vvv user@127.0.0.1 -p 2222

and got

OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 127.0.0.1 [127.0.0.1] port 2222.
debug1: connect to address 127.0.0.1 port 2222: Connection refused
sssh: connect to host 127.0.0.1 port 2222: Connection refused

any help ?

Note : I am using virtualbox

I didn't install ssh, how to install it and configure it ?

Note, that 127.0.0.1 aka localhost is your local machine. Usually at this point you use the IP address or hostname of the remote host.

First install the ssh server and client on your target host and your local host

sudo apt-get install ssh

A configuration isn't necessary.
Per default SSH is listening on port 22, therefore use

ssh user@127.0.0.1 -p 22

or

ssh user@127.0.0.1

Or reconfigure the port for the ssh server (target host)

sudo nano /etc/ssh/sshd_config

and change

Port 22

to

Port 2222

reload the configuration

sudo service ssh force-reload

and connect via

ssh user@127.0.0.1 -p 2222

You should be sshing to the loopback address (127.0.1.1) for ubuntu not 127.0.0.1 IMO: https://unix.stackexchange.com/a/146028


Unable to write anything into NTFS drives I have migrated from Windows to Ubuntu very recently. In Windows I had 3 drives and I am using the same here. I have installed my OS in one. I can't read/write or remove files/directories from either of the other two drives.

root@vishnu-desktop:~# sudo fdisk -l
Disk /dev/sda: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xa3e0317f
Device     Boot      Start        End    Sectors   Size Id Type
/dev/sda1  *          2048     206847     204800   100M  7 HPFS/NTFS/exFAT
/dev/sda2           206848  314572799  314365952 149.9G 83 Linux
/dev/sda3        314572800 1363148799 1048576000   500G  7 HPFS/NTFS/exFAT
/dev/sda4       1363148800 3907026943 2543878144   1.2T  7 HPFS/NTFS/exFAT

In the above /dev/sda2 is where I have installed Ubuntu.

In /dev/sda3 and /dev/sda4 I am unable to do anything.

It seems you have mounted the partition read-only. Please unmount it and mount it read-write (should be possible with the ntfs-3g driver, that you have installed).

Unmount

sudo umount /dev/sda3 /dev/sda4

Create mountpoints (only once)

sudo mkdir -p /mnt/sda3
sudo mkdir -p /mnt/sda4

Mount the partitions

sudo mount -o rw,users,umask=022 /dev/sda3 /mnt/sda3
sudo mount -o rw,users,umask=022 /dev/sda4 /mnt/sda4

Now you should have read and write access. Change directory to /mnt/sda3 and /mnt/sda4 and try to write something to the partition(s).
See also this link,

askubuntu.com/questions/886701/how-do-i-get-permission-to-edit-in-my-usb/886735#886735


Mount disks at startup I want to mount my drive just after I login. I followed an answer on stackoverflow. It asks to create a script in /etc/profile.d directory. I am pasting content of the file here

#!/bin/bash
/usr/bin/udisks --mount /dev/sda3

These commands mount my drive at /media/<name of the drive>. When I do cd /media/Media, I get permission denied. I want to mount the drive at /media/<username>/<name of the drive> just as when I mount drives manually using GUI.

Create the script (like in your $HOME directory under the directory bin);

mkdir $HOME/bin
touch $HOME/bin/mountSDA6.sh
chmod +x $HOME/bin/mountSDA6.sh
nano $HOME/bin/mountSDA6.sh

and add the script contents, say:

#!/bin/bash
/usr/bin/udisks --mount /dev/sda6
/usr/bin/udisks --mount /dev/sda3

or other partitions which you need to, and save it and close.
Start Startup Applications (search in Dash or select from the gear-menu on top unity panel), click Add and in the Add Startup Program window fill the required fields. (In the Command field specify the full path of the script, but here simply using mountSDA6.sh should work as it's created in your $HOME/bin directory. Or you instead of creating script, just use the command to mount here in the Command field.) Click on Add and you're done. On next log-on the partitions should be mounted.

Alternatively, you can edit /etc/fstab file where you can have more control over your mounts by specifying various different mount options.

Use

sudo mkdir -p /media/<username>/<name of drive>

to create the path. Then open the /etc/fstab with

sudo <text editor(nano, leafpad...)> /etc/fstab

and add

/dev/sda3 /media/<username>/<name of drive> <file system type (ext4, ntfs...)> defaults 0 0

to the end. Type then

sudo mount -a

to validate /etc/fstab immediately.

For more information read this (Creating the /etc/fstab File)


Install PHP 5 on a fresh installation I have a fresh installation of Ubuntu 10.10 (Maverick Meerkat) and I'd like to get PHP to work. I've tried

sudo apt-get install apache2
sudo apt-get install php5
sudo apt-get install libapache2-mod-php5
sudo /etc/init.d/apache2 restart

but when I navigate to http://localhost/ all I see is the the Firefox error page stating "Unable to connect".

Moreover, when I try http://localhost/test.php, instead of the PHP file being executed, the browser asks if I'd like to download the file.

Here is the error.log file contents:

[Thu May 19 12:04:49 2011] [notice] Apache/2.2.16 (Ubuntu) configured -- resuming normal operations
[Thu May 19 12:05:01 2011] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
[Thu May 19 12:05:04 2011] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
[Thu May 19 12:12:42 2011] [error] [client 127.0.0.1] File does not exist: /var/www/asd
[Thu May 19 12:13:32 2011] [notice] Graceful restart requested, doing restart
[Thu May 19 12:13:32 2011] [notice] Apache/2.2.16 (Ubuntu) configured -- resuming normal operations
[Thu May 19 12:14:11 2011] [notice] SIGHUP received.  Attempting to restart
PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/apache2/conf.d/interbase.ini on line 1 in Unknown on line 0
PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/apache2/conf.d/lasso.ini on line 1 in Unknown on line 0
PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/apache2/conf.d/ming.ini on line 1 in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - idn_to_ascii in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - idn_to_utf8 in Unknown on line 0
PHP Warning:  intl: Unable to register functions, unable to load in Unknown on line 0
[Thu May 19 12:14:11 2011] [notice] seg fault or similar nasty error detected in the parent process

You can install LAMP running one command:

Install tasksel

Select LAMP Server,

Follow the installation process.

After the installation is completed, you can test your localhost the way you did.

To check PHP is working

sudo   gedit  /var/www/info.php

And paste in this PHP information code:

<?php
    phpinfo();
?>

Save it and exit.

Restart Apache 2:

sudo /etc/init.d/apache2  restart

You can test PHP runing the info.php file:

http://localhost/info.php

Check if your PHP 5 mod is enabled in Apache 2 (/etc/apache2/mods-enabled). If you can't find @php5* symlinks there, you can try:

sudo a2enmod php5
sudo /etc/init.d/apache2 restart

And be sure Apache 2 listens on the port 80.


Vidalia was unable to start Tor. permission problem The exact message is:

  Vidalia was unable to start Tor. Check your settings to ensure the
  correct name and  location of your Tor executable is specified.

Tor exists but vidalia couldn't see or read it. I click "Browse" & it says:

  Unable to save bookmarks in
  /home/me/.kde/share/apps/kfileplaces/bookmarks.xml.

Reported error was:

  Unable to open temporary file.. This error message will only be
  shown once. The cause of the error needs to be fixed as quickly as
  possible, which is  most likely a full hard drive.

I added rwx permissions but problem doesn't resolve. I tried to run it as su, but there is problem with fontconfig & vidalia couldn't connect to x-server.

Of course I can use tor with tor-browser.

I use Kubuntu 12.10, vidalia 0.2.2. (I have seen this problem recently in Ubuntu 12.04 as well).

How did you go about "installing" tor / vidalia? I'd recommend these steps:

Download the Tor Browser Bundle
learn How to verify signatures for packages
and thoroughly study Want Tor to really work?
Further, note that Torbutton is deprecated/dead.

1- open terminal

2- run: # sudo -sH

3- copy the vidalia icon to your Desktop

4- run: # cd Desktop

5- run: # sudo open vidalia

thats it!


How do I  prevent .xsession-errors from eating disk space? Is there any way to completely disable the .xsession-errors file?  I have it as a symlink to /tmp so that my laptop hard disk can (hopefully) go to sleep for once, but at least 95% of the stuff in the file (it fills up at about 500k an hour) is...

(nautilus:1618): GLib-GObject-CRITICAL **: g_value_get_object: assertion `G_VALUE_HOLDS_OBJECT (value)' failed

which is total garbage to me.  I have tried doing a symlink to /dev/null but that does not work (the resulting link is overwritten), and I also do not want the activity so that hopefully my laptop can go to sleep for once.

I am using Ubuntu 11.04, with no special add-ons to Nautilus.

I found an interim solution.

I put a small script in /etc/X11/Xsession.d called 91redirect-xsession-errors that does the job for now, but if you want to have your own custom symlink for .xession-errors it does not work for that (I tried and it did not output any data).

#!/bin/sh

# Redirect $HOME/.xsession-errors to /dev/null.
# BJEM 11 January 2012

XSESSION_ERRFILE=$HOME/.xsession-errors

# This does not seem to work for a regular file,
# i.e. if you want to symlink $HOME/.xsession-errors
# to another file.  I do not know why.
XSESSION_ERRFILE_FINAL=/dev/null

# Creates target file if it does not exist.
touch "$XSESSION_ERRFILE_FINAL"

# Link .xsession-errors file to the desired target
# no matter what.
ln -sf "$XSESSION_ERRFILE_FINAL" "$XSESSION_ERRFILE"

# Test case.
#gedit &

##### END OF FILE #####

It's a bit 'rough and ready' but it does the job for me.  Note that this is the only file that has been altered.

I faced same problem in redhat linux 6.4 server but i can find which folder or user takes more space by using this command "find / -xdev -type f -size +100000000c -exec ls -lh {} \;" then i deleted manually x session errors by using rm -rf command


Ubuntu 12.04 Internet Connection not working (anymore) I have a dual boot setup with Windows 7 and Ubuntu 12.04. In Windows my connection is perfect but when booting into Ubuntu I cannot connect at all.

The network manager states that I'm connected but I cannot access any websites or ping any external addresses.

I've only been using Ubuntu for a few weeks so don't know too much about it yet. I'm also not well versed in networking.

The strange thing is that it has worked perfectly for a while after the initial install and sometime afterwards it was not working for about 2 days and then it worked again for a day and now it's completely non-functioning.

I'm investigating the possibility of it being an issue with recently install software but am hoping you guys can spot something suspicious with the results posted below.

Below is some commands and their output that I've run that I've seen asked for on other threads:

ifconfig

eth0      Link encap:Ethernet  HWaddr f4:6d:04:90:d3:fe
          inet addr:10.0.0.102  Bcast:10.0.0.255  Mask:255.255.255.0
          inet6 addr: fe80::f66d:4ff:fe90:d3fe/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:281 errors:0 dropped:64 overruns:0 frame:0
          TX packets:581 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:21637 (21.6 KB)  TX bytes:56926 (56.9 KB)

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:16436  Metric:1
          RX packets:1429 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1429 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:93375 (93.3 KB)  TX bytes:93375 (93.3 KB)

ping 192.168.1.254

This is the address for the router's web interface which I cannot even connect to.

PING 192.168.1.254 (192.168.1.254) 56(84) bytes of data.
From 10.0.0.2 icmp_seq=1 Destination Net Unreachable
From 10.0.0.2 icmp_seq=2 Destination Net Unreachable
From 10.0.0.2 icmp_seq=3 Destination Net Unreachable
From 10.0.0.2 icmp_seq=4 Destination Net Unreachable
From 10.0.0.2 icmp_seq=5 Destination Net Unreachable

nm-tool

NetworkManager Tool

State: connected (global)

- Device: eth0  [Wired connection 1] -------------------------------------------
  Type:              Wired
  Driver:            r8169
  State:             connected
  Default:           yes
  HW Address:        F4:6D:04:90:D3:FE

route -n

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.0.2        0.0.0.0         UG    0      0        0 eth0
10.0.0.0        0.0.0.0         255.255.255.0   U     1      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth0

  Capabilities:
    Carrier Detect:  yes
    Speed:           100 Mb/s

  Wired Properties
    Carrier:         on

  IPv4 Settings:
    Address:         10.0.0.102
    Prefix:          24 (255.255.255.0)
    Gateway:         10.0.0.2

    DNS:             10.0.0.2

ping -c4 4.2.2.2

PING 4.2.2.2 (4.2.2.2) 56(84) bytes of data.
From 10.0.0.2 icmp_seq=1 Destination Net Unreachable
From 10.0.0.2 icmp_seq=2 Destination Net Unreachable
From 10.0.0.2 icmp_seq=3 Destination Net Unreachable
From 10.0.0.2 icmp_seq=4 Destination Net Unreachable

--- 4.2.2.2 ping statistics ---
4 packets transmitted, 0 received, +4 errors, 100% packet loss, time 2997ms

If there are any other commands to run or things to confirm please ask.

Thank you in advance :)

Your PC and your router are on diferent networks. TCP/IP can comunicate machines on the same network.

Change the address in the Ubuntu computer to some address like 192.168.1.x (where x < 254 and x > 0), netmask 255.255.255.0 (or /24) and gateway 192.168.1.254

If the router has a dhcp server activated you can define network address as DHCP in network manager

Ubuntu is an open source software free to download. But there is internet not working. So use some tips and tricks to solve this issue. So follow the simple steps and solve this issue.

Solution: http://www.wiknix.com/solved-ubuntu-internet-not-working/


Can't login after installing LXQt on 14.04 I am using Lubuntu 14.04. I read about LXQt, the next generation lightweight desktop environment, so I decided to try it. I added this PPA and then did apt-get update/upgrade and installed the lxqt-metapackage package.

Now when I try to login to LXQt desktop it just logs out instantly. I can login to the default Lubuntu desktop as usual.

How can I get this to work?

sudo add-apt-repository ppa:lubuntu-dev/lubuntu-daily
sudo add-apt-repository ppa:gilir/q-project
sudo apt-get update
sudo apt-get install lxqt-metapackage lxqt-panel openbox

Or you can read tutorial here: http://ubuntuportal.com/2014/05/how-to-install-lxqt-0-7-0-in-ubuntu-14-04-lts-trusty-tahr.html (include video)


How to set keyboard repeat delay and speed in Ubuntu Gnome 16.10? In previous versions I could tweak the keyboard repeat delay and speed by going to Settings > Keyboard > Typing. Now in Ubuntu Gnome 16.10 (with Gnome 3.20.2) that panel seems to be missing.

How can I configure those settings in this version?

These settings are under Settings → Universal Access → Typing → Repeat Keys. You have to click the Repeat Keys row item, which brings up a pop-up dialog with two settings: Delay and Speed.

This works in Ubuntu 17.04 and above.
In older versions of Ubuntu, the Speed setting worked in reverse: the lower the speed, the faster the repeat rate. This is no longer the case.

I'm a Ubuntu 18.04.3 User.... and not a techie. I tried changing the kdrate in terminal. I was told it had changed, but it didn't change the slow keyboard input.
This low tech method worked for me.
Go to "Show Applications", where there's a "InputMethod" utility, which has a keyboard as the icon. Open this.... ignore the warnings. Select "Yes" then you are presented with a list of options. The one which worked for me is "auto activate IM with @mark for most locales". You need to reboot your PC/laptop.
Then you can go to "Settings" "Typing" and then click on "repeat keys" and "cursor blinking". Both these options have sliders which you can use to speed up and slow the keyboard and key strokes.
I tried looking at the Keyboard Documentation..... I didn't understand it, so I hope this answer works for Ubuntu users like me.


Can I disable title bar on Unity dual screen (second monitor) Possible Duplicate:
    How do I remove top panel on dual screen on secondary monitor?

  When I run some applications that use dual screen the top menu bar is
  still there. Is there any way to remove top menu bar on second screen?

Looking for same solution (problem). I just make the top bar transparent with Unity-Tweak-Tool.

But the notification area, indicators, power (etc...) still duplicated on both screens.

Sad for presentations.

No, I don't think you can. Unity has lots of weaknesses in multi-monitor setups. That can be considered one of them. The main focus is to make Unity work perfectly for the majority of users first, but many of us have multiple monitors, so these issues are certainly being noticed and worked on.

Keep in mind that dual monitors is completely essential in the business world, when you have to connect a projector or other large screen for presentatios, group conferencing and so on.

And people with laptops who connect it to a nice display when possible, their TV, etc.

Monitor issues are the single biggest source of aggrivation in my Ubuntu-related life today. :)  Note that the problems are much worse with NVidia hardware, and their $*(#awful control panel.  It's like playing Russian Monitor Roulette when you hit that 'apply' button.  It might work, or it might completely mess up both displays, crash Lightdm, still have displays but no titlebars on windows and applications not being responsive, etc. The list is endless and it's a huge mess right now.   It basically requires a reboot right now, IF you managed to get the xorg.conf file configured properly so the second monitor starts up on reboot.


Fortinet SSL VPN Client and Ubuntu 12.04 I want to install the Forticlient SSL VPN Client on Ubuntu 12.04.

I've downloaded the latest version from the Fortinent support site but when I try to run the installer (vía command line or GUI) it simply does nothing.

I have tried to install both with and without sudo but nothing happens.

I remember some time ago that I successfully installed the same client in CentOS and the client worked fine.

Can anyone help me to install this?

You probably have the Ubuntu 64 bit version (at least it was my case). If so, just install the following package:

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

only CLI works under Ubuntu 13.10 because packages like libgtk2 or ia32-libs are not available anymore.


How to install lsb-core package on ubuntu 16.04 In order to activate Maple16, I need to install the lsb-core package. However, I cannot find the package in Syanptic Package Manager. I've tried to install it by downloading the .deb file, but when I run sudo dpkg -i /home/foo/Downloads/lsb-core_4.1+Debian11ubuntu6_amd64.deb, the output of the terminal is

(Reading database ... 178439 files and directories currently installed.)
Preparing to unpack .../lsb-core_4.1+Debian11ubuntu6_amd64.deb ...
Unpacking lsb-core (4.1+Debian11ubuntu6) over (4.1+Debian11ubuntu6) ...
dpkg: dependency problems prevent configuration of lsb-core:
 lsb-core depends on lsb-security (>= 4.1+Debian11ubuntu6); however:
  Package lsb-security is not installed.

dpkg: error processing package lsb-core (--install):
 dependency problems - leaving unconfigured
Processing triggers for man-db (2.7.5-1) ...
Errors were encountered while processing:
 lsb-core

How can I install this package?

lsb-core seems to have been re-added to Ubuntu 16.04 (Xenial Xerus) just now.

FYI, for anyone looking for this with Hamachi (or others): Found this:

sudo add-apt-repository "deb http://cz.archive.ubuntu.com/ubuntu trusty main"
sudo apt-get update
sudo apt-get install lsb-core


Trying to replace Ubuntu with Kubuntu but "Replace" option does not show up? I have Ubuntu dual booting with Windows. I would like to replace it with Kubuntu but when going to install from USB that option is not there (if I do this with a Ubuntu USB disk it does give the option to replace just Ubuntu or wipe the whole disk.

Might there be an option I am missing? Does Ubuntu "see itself" but Kubuntu does not?

Thanks all :)

I'm pretty sure that Ubuntu and Kubuntu are incompatible, seeing as they are different operating systems with different installers, slightly different core files, extremely different default software, etc.

I would recommend doing either:

backing up all your important files in a separate partition, then installing Kubuntu over the Ubuntu partition.
Just install Plasma and the KDE software that you want. You can change the desktop environment you want to login to from the login screen.


WiFi connection error: deauthenticating by local choice (Reason: 3=DEAUTH_LEAVING) I'm encountering a connection issue to my university WiFi network that I cannot solve: when attempting to connect, I get the following message with dmesg -T :

[ven. oct. 11 12:32:04 2019] wlan0: deauthenticating from X by local choice (Reason: 3=DEAUTH_LEAVING)

This problem has already been pointed out in the forum, but none of the solutions I tried worked:

Disabling the powersave for WiFi (in /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf set wifi.powersave = 2 ).
Changing from NetworkManager to WICD.
Adding the following lines to /etc/sysctl.conf:

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

None of these worked.

I just met this problem this morning and fixed it.

Here is my suggestion.

Set your WiFi to no password mode to simplify the operation to connect.

Turn off net services:

systemctl list-units | grep -iE '(net|dhcp|wpa|conn|wicd)'

and you can see some services is running

systemctl stop [your running services]

Open your wlan0:

ifconfig wlan0 up

Connect wifi:

iwconfig wlan0 essid [your wifi name]

DHCP IP:

dhclient wlan0


Diagnosing frozen screen in Ubuntu 11.10 I am a new user. I recently installed Ubuntu 11.10 as a dual boot on a fairly standard Dell Dimension, 768 RAM, Intel 2 GHz chip. The first few times I ran it it was a bit slow, with a lot of flickering of the mouse cursor, but then it seemed to settle down. Today, the screen has frozen. I was running Firefox, gedit, and Terminal. Neither the mouse nor the keyboard seem to work, although I am not familiar with the control sequences I might use in Ubuntu, such as Ctrl Alt Del (is there something like task manager on Windows?).
Could anyone please advise me on such control sequences, and if they fail, how I can find out what is causing the problem?

Many users are disappointed of Ubuntu 11 with Unity desktop. It's still buggy and slow. If you feel everything is slow, downgrade to Ubuntu 10 which is the most usable version. I believe things will work fine in Ubuntu 12 which will be released in April. You can tryout Luninux 11.10, which uses Gnome 3 instead of Unity. Luninux is a MacOS like and developped from Ubuntu, but a better working OS(See below). Download --> http://luninuxos.com/?page_id=18


How to set PcManFm as the default file manager? I think Nautilus is so slow, and I'd like to move to PCmanFM, but didn't find any good tips how to do this in Ubuntu 12.10.

I have PCmanFM installed already, and I even changed:

$ sudo gedit /usr/share/applications/nautilus-folder-handler.desktop

[Desktop Entry]
Name=Files
Comment=Access and organize files
Exec=pcmanfm %U
Icon=system-file-manager
Terminal=false
NoDisplay=true
Type=Application
StartupNotify=true
OnlyShowIn=GNOME;Unity;
Categories=GNOME;GTK;Utility;Core;
MimeType=inode/directory;application/x-gnome-saved-search;
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=nautilus
X-GNOME-Bugzilla-Component=general
X-GNOME-Bugzilla-Version=3.2.1
X-Ubuntu-Gettext-Domain=nautilus

Still slow Nautilus is default one.

After struggling with this Nautilus' slowness for a while, I decided to change my default as well. All of the "proper" solutions I tried doing didn't work very well. For instance, choosing the default in exo-preferred-applications didn't update the dash (or much else for that matter), changing .desktop files only worked sometimes (Dropbox still used nautilus), etc.

The simple solution that works for me in all cases without mucking with changing desktop files was to do the following two commands:

sudo mv /usr/bin/nautilus /usr/bin/nautilus.bak
sudo ln -s /usr/bin/pcmanfm /usr/bin/nautilus

You can of course replace /usr/bin/pcmanfm with /usr/bin/thunar, or whatever.

Edit: If you also want to have a desktop, open /etc/xdg/autostart/nautilus-autostart.desktop and make the Exec line

Exec=nautilus --desktop

uninstalling nautilus should do the trick

sudo apt-get remove nautilus


How to show failed ping? When we are using windows ping , it will show the failed pings. Does Ubuntu have similar function?

The failed ping is quite useful when debugging the network. How you guys solve this? Well, I only want simple solution, I don't want to get a long script.

The right answer is: there is no such thing as "failed lost ping". (Failure replies like "Destination unreachable" are always printed, it is different from no reply at all.)

Ping utility prints every received reply, even if it eatlier decided that this specific ping was lost. It is entirely possible to receive replies out of order.

Even on my Android phone, stock ping utility supports these 2 options:
-D prints a timestamp before every message
-O prints a message when reply is not received in time, and it is more or less what was asked.
However, these options do not seem to be supported everywhere (e.g. Debian Wheezy lacks them as far as I know, while Jessie has them. busybox ping does not support them).

Here is an example output I managed to get (unimportant ping replies skipped):

u0_a93@NX505J:/ $ ping -D -O 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
[1440545014.805478] 64 bytes from 8.8.8.8: icmp_seq=1 ttl=244 time=116 ms
~~~~~~~~~~
[1440545142.995443] 64 bytes from 8.8.8.8: icmp_seq=129 ttl=244 time=110 ms
[1440545144.885601] no answer yet for icmp_seq=130
[1440545145.455485] 64 bytes from 8.8.8.8: icmp_seq=131 ttl=244 time=568 ms
[1440545145.455780] 64 bytes from 8.8.8.8: icmp_seq=130 ttl=244 time=1569 ms
[1440545146.005850] 64 bytes from 8.8.8.8: icmp_seq=132 ttl=244 time=119 ms
~~~~~~~~~~
[1440545254.055962] 64 bytes from 8.8.8.8: icmp_seq=240 ttl=244 time=115 ms
^C
--- 8.8.8.8 ping statistics ---
240 packets transmitted, 240 received, 0% packet loss, time 239250ms
rtt min/avg/max/mdev = 109.062/138.757/1569.620/101.608 ms, pipe 2

Note how #130 is first reported missing, then received after #131, and finally packet loss is reported to be zero.

Extra note about Windows:

On Windows, ping seems to wait for reply longer and then declare it missing and ignore it if it comes later.

By default, interval is 1 second and timeout is 4 seconds, so:
On low RTT, pings will be sent with 1-second intervals.
On RTT>4, pings will be sent with 4-second intervals (or 5, not sure) and will all be reported as failed, same as if server did not respond.

Thanks for all the answers. It seems like the latest ubuntu ping can show the ping failed.

Thanks again.


How to configure Software Center to work with HTTP proxy? I installed Ubuntu 12.04 LTS using the Windows installer (Wubi) yesterday. And then I tried to install Chrome, Flash player, etc., but nothing worked. Then I tried installing some random package using the Software Center (to see if it would work), and that didn't work either. Most of the times it shows updating cache but nothing happens thereafter. Sometimes I get a message saying that it failed to download repository (I don't know what this means) and telling me to check my Internet connection.

I am using my institutional LAN network with a proxy requiring authentication with a username and password. Firefox is working fine...!

I browsed the Internet for solutions and I tried many commands in the Terminal but nothing worked. Today I uninstalled and then freshly installed it again, and then the first thing I did is to ask this question here. So plz help me... give me a step by step procedure to conquer Ubuntu.

I set the proxy details in System > Network and applied them system wide but I was unable to use the Software Center (Firefox was fine). I read in another question here somewhere that a user did sudo -H gedit /etc/apt/apt.conf and put in Acquire::http::proxy "http://user:pass@proxy:port" even though he didn't use a username and a password for the proxy and it worked for him.

I DO need to enter a username and a password, and my actual username and password entered in that string wouldn't work, BUT when I just put in the actual words user:pass the Software Center started working!

I also had the same problem... my proxy was 10.x.xxx.xxx and port xxxx and no userid and pass was required..i just turned off Airplane mode > dash>network and now everything is working fine


How do I automatically set my touchpad to turn off when an external mouse is used? I need a way to automaticallay turn the touchpad off when an external pointing device is in use.  I tried setting "turn off touchpad while typing" in System Settings, but that didn't work.

A slight caveat is that I use both bluetooth and USB pointing devices, so perferably a solution would be able to detect both of these.

I really don't want to have to use commands or a script to accomplish this.

I have tried the two touchpad apps in the software center, but neither of these had a setting for this.

Thanks in advance.

Well... I had mentioned in my original post that I tried the app called "synaptiks" which I found on the Ubuntu Software Center, but apparently someone re-wrote my whole original post and left out that (and other) important details...
I installed the "synaptiks" app, and it did work, but I discovered that a bunch of other apps had been installed without my knowledge or consent when I installed synaptiks.  I felt that this was wrong and seemed like a potential security breech on my machine so I tried to remove these other apps individually and found that trying to remove one ended up removing them all, including the touch pad app... seems really suspicious to me so I made sure all of it was removed... at least I hope... no telling what else it could have installed on my laptop without my knowledge.  And to the asshat who deleted half of my original post... thanks for making me have to waste my time to retype all of this to explain it all over again... and for wasting the time of the person who replied telling me to use the synaptiks app... if you had not edited my original post it would have saved us all the trouble.

Yes, don't worry, these are safe packages, they are part of the KDE desktop and required by KDE apps, you might as well install them because in the future if you need to use another KDE app (there are many good ones like KDEnlive, Okular, Digicam, etc) you'll have them already there and won't have to install them again. Waste a bit of HD space but no security risk.

correct name of this application is synaptiks and you ca find it in Ubuntu Software Center, there is option automatically switched off tuchpad if mouse is plugged, hope it will help


Ubuntu partition has slower network speeds than Windows one We have Verizon FiOS, and are slated to get 75/75, according to our plan. I understand that we may not always get these numbers, but between Windows and Xubuntu there is a huge discrepancy.

Also, FWIW, when I log into Xubuntu, the Wifi connects, but does not work initially. I need to disconnect the Wifi then reconnect for it to actually work. And when I do this, I get error popups saying there was a system issue, and whether I'd like to report. (Presumably about the network manager stalling.)

UPDATED Snapshot of my wireless-info

Speedtest.net results

Windows 10 home (first try)

2.4 GHz: 55.78 / 66.80
5.0 GHz: 79.45 / 89.18

Xubuntu 15.10 (first)

2.4 GHz: 11.71 / 0.84
5.0 GHz: Could not connect

Windows (second)

2.4 GHz: 60.46 / 69.70
5.0 GHz: 83.55 / 75.49

Xubuntu (second)

2.4 GHz: 13.45 / 0.82
5.0 GHz: Could not connect

Output from sudo lspci

03:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8821AE 802.11ac PCIe Wireless Network Adapter
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c)

More updates

Another FWIW, I've ran apt-get update a few times throughout today. Each time, only 1000+ kb were downloaded in 1.5 minutes.
tx power set to max (20), no power save, kernel 4.2
At this point, my workflow is being affected. I tried to upload a 2.1 MB PNG file to a Github issue comment, but it failed after 3 minutes of waiting. During this time, I could not visit other webpages -- they stalled.

After a couple weeks of research, I've found that my wireless card is simply not supported. There are plenty of other questions on AskUbuntu about the RTL8821AE card, or even just RealTek.

Here is what I found did not help:

No difference: Disabling BlueTooth or IPv6
No difference: Using the unofficial drivers from Github
Unavailable: official drivers from RealTek for RTL88xx series

Since this was disrupting my workflow far too much, I decided to purchase the following item. I like this option, because I can utilize dual-band wifi (see stats in question).

NETGEAR Universal N600 Dual Band Wi-Fi to Ethernet Adapter

While I did not try them, other options include:

Use a USB Wifi Adapter (best for laptops or micro PCs)
Install a new wireless card (best for the regular desktop)

As mentioned in the question, I was getting poor speeds on Ubuntu, compared to Windows. Now, on the 5.0 GHz network (through adapter), I get 80/80 on both Windows, Ubuntu 15.10, and Ubuntu 16.04.

Debian supports your driver but the firmware is non-free. (I know this is Ubuntu, but it's built on Debian and can use its packages.)

Execute the following:

sudo nano /etc/apt/sources.list

Add the following line to the file:

deb http://httpredir.debian.org/debian/ jessie main contrib non-free

Install the Debain package firmware:

sudo apt-get update && apt-get install firmware-realtek

UPDATE: Let me know if this works.

Make a temp directory (TARGET_DIR) for now-uncompiled package:

dpkg-deb -x linux-firmware_1.149.3_all.deb TARGET_DIR

Edit the Debian/control file. The most important part of any source package, it holds the dependencies.

dpkg-deb --control linux-firmware_1.149.3_all.deb TARGET_DIR/DEBIAN

Edit the depends field, and add firmware-realtek_0.43_all.deb. Then save your changes and repack

nano TEMP_DIR/DEBIAN/control

Install package:

dpkg -b TEMP_DIR newdriver.deb
sudo dpkg -i newdriver.deb

Install firmware-realtek

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


How can I set up Evolution to access a local mail box? Often, when I start up a new terminal, I get the message:
No mail for pwnguin, or You have 5 unread messages. I'm not terribly great with mail, but I do have a running instance of Evolution connecting to a Zimbra account. How can I set up Evolution to also monitor this local inbox?

This answer follows the premise that you're using a mail spool, if its mbox format your mileage may vary:

Start Evolution, then go to Tools -> Settings.
Click Mail Accounts -> Add -> Forward.
Type in a name in the Full Name field.
For the Email Address field, type in your login ID followed by @localhost. For example: lazypower@localhost Click Forward.
Click on the drop down list box and select Local delivery. If the Path field in the Configuration section isn't already filled in, you'll need to type in the location of your local mailbox. Using the login ID from above as an example, here's what would be entered: /var/spool/mail/lazypower Click Forward.
If you like, you can setup Evolution to automatically check this
mail account. Click Forward.
You're not going to be sending mail with this account, so you could just leave everything alone in the Sending Email window. However, I change the Server Type to Sendmail. Click Forward.
Finally, enter a name for the mail account. The name "Local Messages" is a good choice. Click Forward and Apply.

Thanks go to this post I've verified the instructions locally. Works without a hitch.

Try using localhost for all server names (incoming/outgoing mail server,etc) in evolution and then the usual usernames and passwords. The email address will probably also follow the username@localhost format.


How can I get the command log of a particular user on Ubuntu Server? Is there a way to find a log of all the commands that have been run by a user on Ubuntu 11.10 Server?
I need to find out what my friend ran to install a program.

If you use something like bash as a command interpreter, you could check the history.

more /home/user/.bash_history

Follow these instructions (revised from this answer).

Modify the /etc/bash.bashrc
Append the below line the end of that file

 export PROMPT_COMMAND='RETRN_VAL=$?;logger -p local6.debug "$(whoami) [$$]: $(history 1 | sed "s/[ ][0-9]+[ ]//" ) [$RETRN_VAL]"'

Create a new file

/etc/rsyslog.d/bash.conf

Add the line to the file

local6.*    /var/log/commands.log

Add line to the file  /etc/logrotate.d/rsyslog .

Nearby:

/var/log/mail.warn
/var/log/mail.err
[...]
/var/log/message

Add this

/var/log/commands.log

Restart the rsyslog.

sudo service rsyslog restart


Switch to a different workspace while using a VM I'm using Vmware Workstation 8 on an Ubuntu 11.10 host.

Is there a way I can exclude certain inputs from going to the virtual machine and instead direct those inputs to the host?

Ideally what I'd like to do is be able to use the control+alt+arrow key shortcut to move to a different workspace even if I am focused in a virtual machine.

Does anyone know a way I can accomplish this?

Thanks!!

(I'm using Unity, but I'd switch to gnome-shell or kde or whatever for this feature if necessary!)

One way of achieving this is by changing the shortcut that VMware Workstation uses to escape from the VM (Ctrl+Alt by default). In VMware Workstation go to Edit → Preferences → Hot keys and pick a different combination. This will allow you to use Ctrl+Alt+arrow key to switch workspaces.

If anyone is using Ubuntu 20.04, you can use Ctrl+Alt+→  or Ctrl+Alt+←.


How to install Windows 7 after Ubuntu and dual boot? I just installed Ubuntu, a full install removing the prior OS. I was forced to remove Windows 7 from my HP dv6 because of the max four partitions already being there. I didn't lose anything, all backed up. However, now I am looking to create another partition and install Windows 7 on it.

Do I also need some sort of boot loader that lets me choose which to boot?

NOTE: Have a Linux distribution (Ubuntu) on a live CD handy before following the steps below.

Create partitions for Windows 7 using GParted in Ubuntu.
Boot the Windows 7 disk and install it on the partition created in the previous step. (Windows will not provide you with the option of choosing Ubuntu). So Ubuntu would seem unusable.
Recover Ubuntu by using a live CD (or live USB) and following the steps mentioned in Ask Ubuntu question Recovering GRUB after installing Windows 7 (at the end, you should have the option of choosing the operating system from the GRUB menu.)

Alternatively you could install virtual box and then loadup windows 7 as a VM:

sudo apt-get install virtualbox


How to create an animated GIF from MP4 video via command line? I want make an animated .gif from an .mp4 video. I would prefer to do it from the command line, so please only list command line tools.

ffmpeg 3.4.4 can do it directly on Ubuntu 18.04
You likely want to use something like:
sudo apt install ffmpeg
wget -O opengl-rotating-triangle.mp4 https://github.com/cirosantilli/media/blob/master/opengl-rotating-triangle.mp4?raw=true
ffmpeg \
  -i opengl-rotating-triangle.mp4 \
  -r 15 \
  -vf scale=512:-1 \
  -ss 00:00:03 -to 00:00:06 \
  opengl-rotating-triangle.gif

opengl-rotating-triangle.gif

Image info: 426kB, 45 frames, 512x512 apparent size, coalesced, conversion time on a Lenovo P51: 0.5s.
The above conversion also worked after a ulimit -Sv 1000000 (DRAM usage limited to 1GB), so it does "not consume huge amounts of memory" like previous attempts I  did with Imagemagick which almost killed my machine. 500MB however failed because ffmpeg failed to load its shared libraries... time to upgrade your RAM ;-)?
Test data generation procedure described on this post.
The output has a visible dotting pattern, which is not as visible in "ffmpeg + convert" method below. We can try to improve the image quality with methods described at:

https://superuser.com/questions/556029/how-do-i-convert-a-video-to-gif-using-ffmpeg-with-reasonable-quality
https://stackoverflow.com/questions/42980663/ffmpeg-high-quality-animated-gif

E.g. using the palettegen filter:
ffmpeg \
  -i opengl-rotating-triangle.mp4 \
  -r 15 \
  -vf "scale=512:-1,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" \
  -ss 00:00:03 -to 00:00:06 \
  opengl-rotating-triangle-palettegen.gif

opengl-rotating-triangle-palettegen.gif

Image info: 979K, 45 frames, 512x512 apparent size, coalesced, conversion time on a Lenovo P51: 3.5s.
So we see that:

the dotting pattern is much less visible now
GIF size roughly doubled. TODO: why does simply choosing a palette increase the image size? Is it because now more colors so we need more bits per color? How to observe each palette?
generation time was 7x slower, presumably because ffmpeg is first scanning through the entire video to determine an optimal palette

We could also play with documented palettegen parameters like palettegen=max_colors=16 to achieve different size quality trade-off points.
Argument breakdown

-ss 00:00:03 -to 00:00:06: start and end time to cut the video from.
No, GIFs are not the best way to pirate distribute videos online.
See also: https://stackoverflow.com/questions/18444194/cutting-the-videos-based-on-start-and-end-time-using-ffmpeg

-vf scale=512:-1: make the output 512 pixels in height, and adjust width to maintain the aspect ratio.
This is a common use case for images for the web, which tend to have much smaller resolution than video.
If you remove this option, the output GIF has the same height as the input video.
The original video height can be found for example with ffprobe: https://superuser.com/questions/595177/how-to-retrieve-video-file-information-from-command-line-under-linux/1035178#1035178 and is 1024 x 1024 in our case.

-r 15: sampling FPS.
For example, the original video was 30 FPS, so -r 15 means that ffmpeg will pick one frame in every 2 (= 30 / 15).
The perceived output FPS is adjusted to match the input however, so you won't notice a speedup, only greater granularity.
The input FPS can be found with ffprobe, and the total number of input frames can be found with mediainfo as explained at: https://superuser.com/questions/84631/how-do-i-get-the-number-of-frames-in-a-video-on-the-linux-command-line/1044894#1044894
I recommend this option because video formats usually have a higher framerate due to the larger resolution. With smaller GIFs, the lower framerate is less noticeable, and so we can skip some frames and make smaller GIFs.

Video camera footage example
If you want to see the result quality of a video camera video from Wikimedia Commons with a similar command:
wget https://upload.wikimedia.org/wikipedia/commons/f/f9/STS-132_Liftoff_Space_Shuttle_Atlantis.ogv
ffmpeg -i STS-132_Liftoff_Space_Shuttle_Atlantis.ogv -r 15 -vf scale=512:-1 \
  -ss 00:00:17 -to 00:00:22 STS-132_Liftoff_Space_Shuttle_Atlantis.gif

STS-132_Liftoff_Space_Shuttle_Atlantis.gif

Image info: 1.3MB, 75 frames, 512x288 apparent size, coalesced (has minimal effect however, because footage pans slightly from the start), conversion time on a Lenovo P51: 2.3s.
Here is a version with palettegen but only 2 seconds to fit the 2MiB upload limit:

Image info: 1.5MB, 30 frames, 512x288 apparent size, conversion time on a Lenovo P51: 43s.
A more direct:
sudo apt-get install ffmpeg
ffmpeg -i in.mp4 out.gif

also works, but the output GIF would be way larger than the input video, because video formats can compress more efficiently across frames with advanced algorithms, while GIF can only does a simple rectangular frame diff.
Before pre 18.04: ffmpeg + convert one-liner without intermediate files
ffmpeg could not handle GIF previously. The best I had was something along:
sudo apt-get install ffmpeg imagemagick
ffmpeg -i opengl-rotating-triangle.mp4 -r 15 -vf scale=512:-1 \
  -ss 00:00:03 -to 00:00:06 -f image2pipe -vcodec ppm - |
  convert -deconstruct -delay 5 -loop 0 - opengl-rotating-triangle-image-magick.gif

opengl-rotating-triangle-image-magick.gif

Image info: 995kB, 45 frames, 512x512 apparent size, coalesced.
For the Atlantis shuttle footage, and analogous:
ffmpeg -i STS-132_Liftoff_Space_Shuttle_Atlantis.ogv -r 15 -vf scale=512:-1 \
  -ss 00:00:17 -to 00:00:22 -f image2pipe -vcodec ppm - |
  convert -deconstruct -delay 5 -loop 0 - STS-132_Liftoff_Space_Shuttle_Atlantis_512x.gif

produced better looking output, but the final GIF was considerably larger at 6.2MB, so I can't upload it.
Explanation of some of the arguments:

-loop 0: add the Netscape Gif extension Loop count field to the output. 0 means infinite loop as described at: http://www.vurdalakov.net/misc/gif/netscape-looping-application-extension eog, firefox and chromium all loop infinitely by default even without it, so I'm not sure how necessary it is anymore.

-delay 5: time waited before showing the next frame, in hundreths of second, as described at: https://en.wikipedia.org/wiki/GIF#Animated_GIF byte 324. So 100 means 1 FPS, 5 means 1 / 0.5 == 20FPS.

-deconstruct: compress across frames with rectangular diffs, see also: how can I resize an animated GIF file using ImageMagick?

Even if you reduce the height and framerate, the output GIF may still be larger than the video, since "real" non-GIF video formats compress across frames, while GIF only compresses individual frames.
A direct:
convert input.mp4 rpi2-bare-metal-blink.gif

worked, but almost killed my computer because of memory overflow, and produced an ouptput 100x larger for my 2s 1Mb input file. Maybe one day ImageMagick will catch up.
See also: https://superuser.com/questions/556029/how-do-i-convert-a-video-to-gif-using-ffmpeg-with-reasonable-quality
Tested on Ubuntu 17.10.
Gifski
https://gif.ski/
This is another option that was brought to my attention and which claims intelligent algorithms, so let's try it out.
First we need to convert the video to a sequence of images, and then feed that into gifsky, e.g.:
sudo snap install gifski
mkdir -p frames
ffmpeg \
  -i opengl-rotating-triangle.mp4 \
  -r 15 \
  -vf scale=512:-1 \
  -ss 00:00:03 -to 00:00:06 \
  frames/%04d.png
gifski -o opengl-rotating-triangle-gifski.gif frames/*.png

opengl-rotating-triangle-gifski.gif

Image info: 954K, 45 frames, 512x512 apparent size, not coalesced, conversion time on a Lenovo P51: 4.8s.
And the 2s STS:

Image info: 1.6M, 30 frames, 512x288 apparent size, not coalesced, conversion time on a Lenovo P51: 2.8s.
So for me, subjectively, this did not appear to offer significant benefit over ffmpeg's palettegen.

I have started to put together a tool to provide a simplified interface to common actions.
You can convert an MP4 to GIF like this:
$ npm install @mountbuild/mouse -g
$ mouse convert input.mp4 -o output.gif -s 00:00:00 -e 00:00:03

You can change the start and end time, and the --fps and --width as well.
It requires ffmpeg be installed.
If nothing else check out the source and see how to write your own script to do this in JavaScript.


How to submit a file to paste.ubuntu.com without graphical interface? My GUI does not work. I can only see a text terminal. I would like to send my logs to paste.ubuntu.com but I don't know how. Without a graphical interface, I am lost.

Is there any way to submit a file to pastebin without needing any GUI?

There are many ways, of course, but I start with one which is simple to explain: it just requires some command line magic. I assume that there is internet connection (check it for example with ping -c 5 google.com. Also, I assume that /my/file is the location of file you would like to submit, and JohnDoe is your askubuntu nickname.

The simplest of it all, but you need to install pastebinit first:

sudo apt-get install pastebinit
pastebinit -i /my/file

Submit using curl. For that, curl must be installed.

sudo apt-get install curl
curl -v --data-urlencode "content@/my/filename" -d "poster=JohnDoe" -d "syntax=text" http://paste.ubuntu.com

You will see some output, with one of the lines looking more or less like that:

< Location: http://paste.ubuntu.com/123456789/

This is the link you need to share.
There is a number of text-only web browsers, for example w3m. Run these commands:

sudo apt-get install w3m
w3m http://paste.ubuntu.com

You move around with a cursor. When you come to the text area and press "Enter", w3m will ask you which editor to use; choose nano. Use CtrlR to read in the file.
Your USB sticks still work. Insert an USB stick and type mount to see at what location it has been mounted. Say, you see that it is /media/MyStick. You can copy the file using command line

cp /my/file /media/MyStick

pastebinit by default uses pastebin.com

instead you can use gist. you need to install Ruby first then install gist gem

gem install gist

https://github.com/defunkt/gist