This is certainly possible. See the interfaces(5) manpage for full details, but I'll include a fragment of the man page here:

   Lines beginning with "source" are used to include stanzas from other  files,  so
   configuration can be split into many files. The word "source" is followed by the
   path of file to be sourced. Shell wildcards can be used.   (See  wordexp(3)  for
   details.)

This feature appears in Precise.

Example:

/etc/network/interfaces:

   auto lo
   iface lo inet loopback

   source /etc/network/interfaces.d/*.cfg

/etc/network/interfaces.d/eth0.cfg:

    auto eth0
    iface eth0 inet static
        address x.x.x.x
        [...]

I'd be cautious whether some tools are yet aware of this feature. Some scripts may only check /etc/network/interfaces.


Running apt update more than once makes impossible to upgrade

The most likely reason is that you are occasionally running your script at the same time that Unattended Upgrades is also running.

It's easy to check by looking at your Unattended Upgrades log.

Here's an example of my Unattended Upgrades log for earlier today:

$ grep 2019-06-21 /var/log/unattended-upgrades/unattended-upgrades.log

2019-06-21 06:35:25,971 INFO Initial blacklist :
2019-06-21 06:35:25,986 INFO Initial whitelist:
2019-06-21 06:35:25,986 INFO Starting unattended upgrades script
2019-06-21 06:35:25,986 INFO Allowed origins are: o=Ubuntu,a=disco, o=Ubuntu,a=disco-security, o=UbuntuESM,a=disco,
2019-06-21 06:36:00,248 INFO Packages that will be upgraded: bind9-host intel-microcode libbind9-161 libdns-export1104 libdns1104 libirs161 libisc-export1100 libisc1100 libisccc161 libisccfg163 liblwres161 libpq5
2019-06-21 06:36:00,248 INFO Writing dpkg log to /var/log/unattended-upgrades/unattended-upgrades-dpkg.log
2019-06-21 06:37:18,374 INFO All upgrades installed

Take a look at line 5 of the log (Packages that will be upgraded:...): This list is pulled directly from apt. It's almost the same list you get from sudo apt update. The default setting for Unattended Upgrades is to use the -security pocket only. Not -updates, not -backports, not PPAs, not third-party repositories. So a few non-security packages may not be installed. You can change this setting.

Now take a look at line 7 of the log (All upgrades installed): This is your positive confirmation that all those packages listed on line 5 were successfully upgraded, and the Unattended Upgrades has released the apt lock and terminated for the day. If there was a problem or a failure, or if U-U is still working, then you won't see this line.

You can see that if I had run a manual sudo apt update at 06:35, there would have been lots of packages to upgrade. But if I had run sudo apt upgrade at 06:38, no packages would have been upgraded...because Unattended Upgrades had already done so.


How can I import microsoft edge bookmarks on firefox?

By default, MS Edge should throw all it's crap here. From there you'd copy the links it saves and then import them into firefox. (I'm not sure if you can do pop them all into a text file or you have to do them one by one.)

C:\Users\[USERNAME]\AppData\Local\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\AC\MicrosoftEdge\User\Default\Favorites

Hope this helps.


During my tenure maintaining the PC audio stack in Ubuntu, I made several presentations on debugging the desktop aspect, and you may find this one the most gentle or informative.  The gist of the matter is that combinations of ego (aka "technical pride"), politics, and ownership collisions (aka "no maintainer") have caused a morass of APIs to crop up over the past decade (and few years), and many incorrect assumptions have been made all over the place.  We're continuing to eliminate many of the inconsistencies and poor assumptions.  For Ubuntu specifically, we have a developer Launchpad group.  I can't speak for the other members, because they're all Canonical employees and may have additional restrictions, but certainly feel free to contact me through Launchpad; I'm happy to walk you through the debugging process individually as our schedules mesh.

It's absolutely vital to note that PulseAudio has more stringent requirements of one's audio hardware in a fundamentally different manner to traditional applications.  These requirements continue to expose poor assumptions in the kernel, the sound drivers, and underlying libraries.  For a long time, people's "solution" for "fixing broken sound" has consisted of removing PulseAudio, which effectively skips the broken aspects of the kernel, the sound drivers, and underlying libraries themselves.  So, while you "get sound back," the problem remains.  In the end, it's much better to fix the problems completely.

To summarize, there are two general approaches for methodical audio debugging.  Either one starts at the application level, say, Banshee, or one starts at the hardware level.  For the sake of consistency I'll refer to the former as "high level," i.e., higher in the stack, and the latter as "low level," or lower in the stack closest to the hardware.  I'm most comfortable troubleshooting from the lowest level upward, since my involvement in audio over the past decade (from creating and maintaining device drivers up through application integration) has seen OEMs repeating mistakes that Linux, i.e., the kernel, has to work around (or "hack around" as we developers sometimes call it).  Yet hardware people are no more guilty than software people.  These problems have many bases: it doesn't matter whether they lie in the BIOS, the power supply, the motherboard bridges, sound controllers and codecs, the kernel, or the userspace portions (libraries, APIs, PulseAudio, applications, and so on).  In the end the issue is quite straightforward: we all insufficiently handle out-of-bounds conditions from every level below and across.

At the PC hardware level, we begin debugging by identifying precisely which components are used.  Most modern desktop audio hardware has two significant pieces of information: the PCI subsystem identifier and the audio codec subsystem identifier.  You can find the former via lspci -nv; look for the audio subsystem codes 0401 (AC'97) or 0403 (High Definition Audio).  Depending on hardware, the latter can be identified through information exposed by the ALSA driver itself in /proc/asound (the developers' debugging script I just linked automates much of that information-gathering).  It's absolutely vital that one realize and remember that similar, even identical, symptoms often have varying hardware and software causes.  For that reason it's easiest on people fixing the bugs to have a clear bug report, and that's why in Ubuntu we have ubuntu-bug alsa-base for driver problems and ubuntu-bug pulseaudio for application problems.  If you aren't sure what's at fault, just choose one, or use ubuntu-bug's audio symptom.  Regardless, we'll request additional information as necessary.

The PCI SSID is important, because it is a record of which computer manufacturer integrates which set of audio components onto a motherboard.  For example, you'll often find Dell, HP/Compaq, Acer, Samsung, Lenovo, and so on using different combinations of IDT/Sigmatel, Realtek, Cirrus, Analog, and Conexant audio components.  A Dell that has a Realtek 269 does not necessarily have the same behavior as an HP with a Realtek 269.

The codec SSID can be considered the analog of the PCI one from the perspective of the audio equipment manufacturer.  Information associated with the codec SSID can be used to find which revision has been integrated onto the silicon.

Unfortunately, here's where the problems begin.  Assuming that the BIOS is ok (which is a rather blind assumption, since there are a lot of broken BIOSes that wreak havoc with Linux audio), sometimes the PCI SSID is reused incorrectly.  In those situations, our recourse is to apply specific quirks in the driver based on codec SSID.  Unfortunately still, sometimes the codec SSID is reused incorrectly.  In those situations, we have to look at specific revisions of the codec in addition to more blindly brute-forcing attempts to reinitialize the driver.

For most of the newest equipment, we tend to trust the BIOS instead of using our historical "just use this hard-coded definition" approach.  In some situations, we have to use tools to emulate the codec to find which pin definitions perform what functions. Missing functions in the driver to handle jack sense, i.e., (un)muting internal speakers when headphones are (removed)inserted, can be easily corrected in this fashion.

Once we've determined that your underlying hardware isn't broken and that the sound driver doesn't need to be patched, we look at the userspace layer, namely alsa-lib, alsa-plugins, and pulseaudio.  The vast majority of issues lie in the driver or in (some interface to) PulseAudio.

alsa-lib is responsible for handling all native ALSA operations (thus, PulseAudio uses it, too).  Problems here will manifest themselves regardless whether PulseAudio is used.  On the other hand, problems arising only when the 'default' ALSA virtual device is used can point to either the PulseAudio alsa-lib plugin (in alsa-plugins) or to PulseAudio itself.  In standard Ubuntu 8.10 and Kubuntu 10.10 installations, 'default' routes through PulseAudio, so switching between the 'default' and native PulseAudio outputs (or inputs as the use case may be) should help narrow down which layer to further investigate.


Broadcom Wi-Fi Adapter not working on Ubuntu 20.04.2

The links you posted in your question suggest that you have tried several different packages and that, evidently, none of them are properly working. Let’s do some housekeeping and start fresh. With a temporary working internet connection by ethernet, tethering or whatever means possible, please run the terminal commands:
sudo apt purge broadcom-sta-dkms
sudo apt purge broadcom-sta-source
sudo apt purge broadcom-sta-common
sudo apt purge bcmwl-kernel-source

If some are the packages are not installed and therefore not removed, that’s fine; just proceed to the next step.
sudo apt update && sudo apt -y upgrade
sudo apt install -y bcmwl-kernel-source

Reboot.
Is there any improvement?
Edit: In our chat, we found that there were two additional wireless drivers installed. This is a possible explanation for the cfg80211 errors upon attempting to load the Broadcom driver wl.
We removed them both and rebooted. Your wireless was then working as expected.


I had this problem too. At the first I installed gromacs from an instruction that I  found in one of the YouTube clips. Apparently I had a successful installation but when I wanted to run the program l had an error like you had:

bash:source: /usr/bin/gmx cannot execute binary

After a lot  search l understood that source of gromacs should be:

source /usr/local/gromacs/bin/GMXRC

NOT

source/usr/bin/gmx

Finally l could solve my problem by using instruction of installation from gromacs site but before I  removed my Ubuntu and installed a new one.

This is an instruction that I used from this link.

Quick and dirty installation

Get the latest version of your C and C++ compilers.
Check that you have CMake version 2.8.8 or later.
Get and unpack the latest version of the GROMACS tarball.
Make a separate build directory and change to it.
Run cmake with the path to the source as an argument
Run make, make check, and make install

Or, as a sequence of commands to execute:

tar xfz gromacs-5.0.7.tar.gz
cd gromacs-5.0.7
mkdir build
cd build
cmake .. -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON
make
make check
sudo make install
source /usr/local/gromacs/bin/GMXRC

This will download and build first the prerequisite FFT library followed by GROMACS. If you already have FFTW installed, you can remove that argument to cmake. Overall, this build of GROMACS will be correct and reasonably fast on the machine upon which cmake ran. If you want to get the maximum value for your hardware with GROMACS, you will have to read further. Sadly, the interactions of hardware, libraries, and compilers are only going to continue to get more complex.


If your Dell XPS 9560 is behaving like a curmudgeon, have you tried letting Ubuntu select the nvidia driver automatically? Uninstall the existing nvidia driver, reboot, and run this command:

sudo ubuntu-drivers autoinstall && sudo reboot

The autoinstall command of ubuntu-drivers installs drivers that are appropriate for automatic installation including their dependencies.


How to find out root password for installing software

As default Ubuntu has no password set for the root user, i.e., the account named root. To gain root privileges as another user you have to type in your own password. This is the password you set for the first user account while installing Ubuntu.

To set a password for the root, run the following command in a Terminal shell:

sudo passwd root

After this you are asked to type in the new password twice. After this the root account has its own password, so you can actually log in with the user name root.


In case anyone else has that problem, I've found the answer.

You need to rightclick right under the title bar. A narow, empty toolbar is still there even it it cannot be seen. A context menu will show up, where the toolbar can be toggled back on.


Update: I've posted a short solution as a separate answer. Following in this answer is what I suggested before I came to it.

The problem is with Wi-Fi definitely!

After a day of testing every possible way (64 and 32 bit, standard and alternative versions of 10.04, 10.10, 11.04) to install Ubuntu on my Aspire One 522 (same chipset and same C-50 Fusion processor) I finally found a solution on how to install and run it, thanks to your assumptions on the wi-fi adapter.

The problems I had with all versions of Ubuntu were that they all hung in some starting phase of installation when the wi-fi led began to blink. So assuming that was the problem I started looking for a way to turn this damn thing off, but there was no physical switch for that on this model and the Fn+F3 seemed to work only when the driver was up and running on Windows. The solution I found was to simply plug the laptop to LAN with a cable. Thus I successfully installed 11.04 32 bit and was able to boot into 11.04 64 bit setup but just didn't have time to install it.

So now I'm able to run Ubuntu okay but only with the LAN cable plugged in - as soon as I detach it after a couple of seconds when Ubuntu starts to scan wi-fi networks it hangs. So now I'm looking for a solution on the Wi-Fi driver.

P.S. Also I'd like to inform you guys that I was able to install Fedora 15 32-bit edition with absolutely no problems: both bluetooth and wi-fi worked with no problems. The 64-bit Fedora I could not, though I didn't try as hard as with Ubuntu ). So if nothing works out we can always swithc to Fedora. Guess we can also find out which driver Fedora uses for this piece of ...wi-fi.

Update. Now that I've tried reinstalling the 32 bit Fedora, which previously worked just fine, the same thing happened in it. I've also been able to install Fedora 64bit and Ubuntu 64 bit with a described method. I tried upgrading to latest 3.0 kernel, but every single distribution I've installed suffers from exactly the same problem with the wireless module. Btw, in my case it wasn't a Broadcom, but Atheros AR9285. If you have the same one this could probably be a solution for you: System freeze caused by ath9k driver

As for me I say fork this sheet I go back to Window monster! At least I can watch videos there. Btw wtf is wrong with AMD and their ATI drivers support?! Are they lazy or just stupid? Man, I'm really disappointed with all this story.


Ubuntu 18.04 loop at login, and Ctl-Alt-F1 cannot stop it!

You can get to the root command prompt by using Ubuntu advance boot option on booting up. Tap the down arrow key during booting if the boot menu doesn't stay up long enough. From the boot menu, select advance boot option, then select the recovery boot option, usually the second one from the top.

In recovery mode you are presented with a few menu choices, select the root shell prompt and from the console you could try to repair your setup by reinstalling gdm3.

apt-get install gdm3

And if it is already installed, try

dpkg-reconfigure gdm3


Prolems in installation Sigma Photo Pro with Wine

I can prove that wine does the job nicely. Both SPP 5.3 and 4.0 with wine are successfully installed on Ubuntu 15.10, though SPP 5.3 runs a little slowly but it works. I then picked an older version (SPP 4.0) to install and runs like a charm. Cheers!


I have the same laptop, and i had the same problem the first launch.
Near the acpi=off kernel option you need to add these options :

i8042.reset i8042.nomux i8042.nopnp i8042.noloop

Once your computer booted up, your trackpad will be supposed to work, and you will need to add these option to the grub file. Open a terminal and type :

sudo gedit /etc/default/grub

Find the line "GRUB_CMDLINE_LINUX_DEFAULT" and add i8042.reset i8042.nomux i8042.nopnp i8042.noloop between the quotes. Save and exit gedit.
Go back to your terminal and type :

sudo update-grub

(Ignore update-grub2)

Now, the trackpad boot options will be executed automatically.

If you contact Acer, they will answer you : "You are not supposed to run Ubuntu on this Laptop". And because you did it, you don't have your warranty anymore :/

And because of the acpi=off option, you need to know that your laptop will not be 100% stable. On mine, as an example, i dont have any information about the battery status ... Your wifi may not work as well, but you only have to reboot the computer, as many times as you need,  to fix this issue (once, it needed 5 reboots ...).
Of course, i didnt find any fix for those issues

I hope i was helpful,
Cordialy

PS : sorry for the English, i'm French :)


In case someone else is looking for a way that actually works. Though @HorsePunchKid is right in his suggestion, I've found this walkthrough that fills in the missing steps:

http://www.debuntu.org/how-to-redirecting-network-traffic-to-a-new-ip-using-iptables/

In essence:

Enable IP Forwarding:

sysctl net.ipv4.ip_forward=1

Add your forwarding rule (use n.n.n.n:port):

iptables -t nat -A PREROUTING -p tcp -d 10.0.0.132 --dport 29418 -j DNAT --to-destination 10.0.0.133:29418

Ask IPtables to Masquerade:

iptables -t nat -A POSTROUTING -j MASQUERADE

And that's it! It worked for me in any case :)


Support for mode 7 NTP packets used by ntpdc is no longer enabled by default; from the official ntpdc documentation:

  ntpdc is deprecated - please use ntpq now, as it uses a more sane interface and can provide all of the information that ntpdc used to provide.

If you must use ntpdc you have to enable mode 7 packets in your ntp.conf. See the Command Index:

enable mode7

Be aware that the official documentation says that the flag mode7

  Enables processing of NTP mode 7 implementation-specific requests which are used by the deprecated ntpdc program. The default for this flag is disable. This flag is excluded from runtime configuration using ntpq. The ntpq program provides the same capabilities as ntpdc using standard mode 6 requests.

All the NTP documentation can be accessed through the NTP Public Services Project web page.


Are there any shortcuts are available in Ubuntu like open a window or some built-in applications?

Hold the Super key (the windows/mac logo) to get a list (provided you are in a recent enough version of Ubuntu)

Or in System Settings -> Keyboard you can set your own/edit current shortcuts.


Using a package manager is easiest.

Looks like the apt package for GnuPG on xenial maxes out at 1.4.20. As of this writing, you can get 2.2.4 on bionic, or 2.2.19 on focal, which is the current LTS release.

Can you upgrade your Ubuntu to a more recent version? I know that xenial is arguably still supported, but if you can, it is then as simple as sudo apt-get install gnupg afterwards to get the newest version.

Otherwise it looks like you're stuck building from source (avaliable on gnupg.org here, you'd run ./configure, then make, then make install from within the source directory).


System profiler gives incorrect cpu speed?

The CPU is clocked down if it is not used to save power. So there is nothing wrong with the tool It just shows the actual CPU frequency.
You could try to run:
openssl speed

Then you would see the first core to show 3900 Mhz in the System profiler and Benchmark application.
The reason for this is that openssl is only using one core.

You would need a benchmark which uses multiple cores so that all cores show 3900 Mhz.

If you want more infos on your CPU, run:
cat /proc/cpuinfo


How to install compatible debug symbols for systemsettings?

Thanks to the comment by @user535733, I found what the problem is. I just had to remove (or comment out) the line with -proposed from the ddebs.list generated when following the Wiki.Ubuntu page on debug symbol packages.

After removing this line and doing apt update, I've successfully installed systemsettings-dbgsym.


Can I install in UEFI mode with the alternate installer?

I figured it out, so for those who are interested, here's how to do it:

After the installation, reboot the computer into a live CD or any Linux CD that can mount the hard drive partitions. Then, do the following: (replace # with appropriate partition numbers)

### Mounting ###

sudo mount /dev/sda# /mnt            #Mount root (/) partition
sudo mount /dev/sda# /mnt/boot       #Mount boot (/boot) partition
                                      (if separate from root partition)
sudo mkdir -p /mnt/boot/efi          #Create EFI partition mount point
sudo mount /dev/sda1 /mnt/boot/efi   #Mount EFI partition

sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys

sudo chroot /mnt                     #Chroot to your installation

### Installing ###

apt-get install grub-efi-amd64  #Install grub EFI bootloader

grub-install --recheck --no-floppy --force
                                     #Install grub bootloader in EFI partition

echo "configfile (hd0,gpt#)/boot/grub.cfg" > /boot/efi/ubuntu/grub.cfg
                                     #Tell grub to load grub.cfg from /boot

update-grub                          #Create grub menu list

exit                                 #Exit chroot

### Unmounting ###

sudo umount /mnt/dev
sudo umount /mnt/proc
sudo umount /mnt/sys
sudo umount /mnt/boot/efi
sudo umount /mnt/boot
sudo umount /mnt


Upgrading to Natty with /home on a separate partition

You can boot with the live cd or live-usb and when you reach the screen where it asks you where to install, the last option will allow you to set the partitions manually.

There, you select each partition and tell the installer where to mount each one.
For me is this:

/dev/sda1 format ext4 mount point: /

/dev/sda6 NO FORMAT ext4 mount point: /home

/dev/sda5 swapp

The important thing is to identify correctly the partitions. If you want to be sure you can do:

sudo fdisk -l

and

cat /etc/fstab

in maverick to know what partitions you have and where are they mounted.

If the partitions are allready in ext4, the installer wont try to format it. Be sure you check the "format" option in the partition than you choose to be the root, and most important, DO NOT CHECK the format option in the partition that's gonna be your home. This way the installation will be completely clean but your home will remain.

Also, when it asks you for name and password be sure to use exactly the same you're using in the previous installation.

One last thing. Since you make a clean install (not an upgrade) when you log in you'll probably see errors like "can't load applet..." because probably you have applets and programs set on the startup than the clean install CD doesn't include. Don't worry, install them in synaptic and the next time you log in they'll be there.

Good luck!


It appears that pi-rho's PPA has a broken build of Vim. Until this is fixed, it might be best to use another PPA, or no PPA at all. As an alternative, try the Vim Daily builds PPA, which apparently hasn't been updated in the last couple of weeks, but is still pretty current.


Dual boot with Windows 8.1 and Ubuntu 13.10

I tried doing that one week earlier and that was a total crap (got grub rescue screen)! I finally simply boot on a live cd of Ubuntu 13.10, delete all the partition and reinstall Windows 7 and then alongside Ubuntu 13.10.

Be carefull saving your data before trying that!


I know it's stupid, but check to see if your keyboard has an F-Lock key. I just wasted several minutes trying to debug the "problem", and it turned out that I had hit the F-Lock key. It replaces all the function keys with alternative operations.


USB Mouse and Keyboard not working after booting (worked until today)

This is going to sound silly, but try just pulling the power cord out and waiting for 30 seconds and putting it back in and restarting. If you google the error code, you'll find tons of threads on it. This solution worked for me and apparently it has worked for other people as well. http://ubuntuforums.org/showthread.php?t=1610142&p=10054218#post10054218


This feature requires a supported color calibration device that looks similar to a webcamera and attaches to the screen to detect the colors

This comment on How do I reset an ICC profile in Ubuntu? states:

  sensor device - Example devices - Note though that you MUST check
  which ones are supported by ArgyllCMS, the software behind "Color"
  above.


Error when getting information for file - Input/output error

Input/output error is bad news in general. It means that the drive is faulty and is unable to read and/or write data from/to the spinning plates.

If this is a new drive I and is still under warranty I suggest you return it and get a new one.

You may try command dmesg immediately after you get that I/O error and you will see a lot of kernel mumbo-jumbo about how it is unable to use the device. Not very helpful to the regular user but I am sure some kernel developer is in a position to understand it.


Second monitor not detected, brightness not working... with Nvidia (GTX 1660ti) and Ubuntu 20.04 (kernel 5.4.0)

I could finally make the second monitor work by updating to 5.6 kernel:

wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.6/linux-headers-5.6.0-050600_5.6.0-050600.202003292333_all.deb
wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.6/linux-image-unsigned-5.6.0-050600-generic_5.6.0-050600.202003292333_amd64.deb
wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.6/linux-modules-5.6.0-050600-generic_5.6.0-050600.202003292333_amd64.deb

sudo dpkg -i *.deb

About the screen brightness, this just works partially; the difference between the min and mix brightness is minimal.


Show battery percentage in Lubuntu's LXPanel

The indicator Battery Status should be what you are looking for:

1. Add the repository

ppa:iaz/battery-status

2. Install the package

sudo apt-get update

sudo apt-get install battery-status

3. And last, run Battery Status as an indicator applet

/usr/lib/battery-status/battery-status --indicator


How to use alternative encoding in specific gnome applications?

Run locale -a to see the available locale definitions on your system. zh_CN.GB2312 is probably missing.

sudo localedef -f GB2312 -i zh_CN zh_CN.GB2312

should add that locale definition.


Create a new repository/branch using bzrlib

There's a nice convenience function hidden in there somewhere:

from bzrlib import bzrdir
bzrdir.BzrDir.create_branch_convenience('./foo')

  Create a new ControlDir, Branch and Repository at the url 'base'.

  This is a convenience function - it will use an existing repository if
  possible, can be told explicitly whether to create a working tree or
  not.

  This will use the current default ControlDirFormat unless one is

I honestly don't remember how I found it. Probably by reading the code of a plugin.


I cannot get Google + video conferencing to work on ubuntu 12.04 LTS

It looks like you might have a conflict between an existing 32-bit version vs an attempted 64-bit version, or vice-versa. Make sure you all versions of the Google talk uninstalled before trying again.


Perhaps you can look at the cmdline or exe associated with the PID:

# stat /proc/2529/{exe,cmdline}
  File: ‘/proc/2529/exe’ -> ‘/bin/bash’
  Size: 0           Blocks: 0          IO Block: 1024   symbolic link
Device: 3h/3d   Inode: 16136       Links: 1
Access: (0777/lrwxrwxrwx)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2014-09-26 07:46:05.435479000 +0530
Modify: 2014-09-26 07:41:05.447479000 +0530
Change: 2014-09-26 07:41:05.447479000 +0530
 Birth: -
  File: ‘/proc/2529/cmdline’
  Size: 0           Blocks: 0          IO Block: 1024   regular empty file
Device: 3h/3d   Inode: 16117       Links: 1
Access: (0444/-r--r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2014-09-26 07:41:05.447479000 +0530
Modify: 2014-09-26 07:41:05.447479000 +0530
Change: 2014-09-26 07:41:05.447479000 +0530
 Birth: -

I have used the stat command, but I don't think the stat function would respond differently when applied to these files.

An example:

Save this as test.c:

#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>

int main(int argc, char *argv[])
{
    struct stat stats;
    char exe_path[32] = "/proc/";
    char cmdline_path[32] = "/proc/";
    char *exe = "/exe", *cmdline = "/cmdline";

    if (argc < 2)
        return -1;
    if (lstat (strcat (strcat (exe_path, argv[1]), exe), &stats) != -1)
    {
        printf("exe: %s\n%s%s%s", exe_path, ctime (&stats.st_atime), ctime (&stats.st_mtime), ctime (&stats.st_ctime));
    }
    else perror ("stat error: ");
    if (lstat (strcat (strcat (cmdline_path, argv[1]), cmdline), &stats) != -1)
    {
        printf("cmdline: %s\n%s%s%s\n", cmdline_path, ctime (&stats.st_atime), ctime (&stats.st_mtime), ctime (&stats.st_ctime));
    }
    else perror ("stat error: ");

    return 0;
}

Testing it out:

$ gcc -o test test.c
$ ./test $$
exe: /proc/1811/exe
Fri Sep 26 09:02:59 2014
Fri Sep 26 09:02:59 2014
Fri Sep 26 09:02:59 2014
cmdline: /proc/1811/cmdline
Fri Sep 26 09:02:59 2014
Fri Sep 26 09:02:59 2014
Fri Sep 26 09:02:59 2014

$ date
Fri Sep 26 09:34:03 IST 2014

The cmd stats maybe more reliable.


USB data transfer rates lower than expected

Do not rely on the "theorical speeds". They will never be accomplished by somebody unless they are in the perfect conditions. The perfect conditions include:

Correct altitude (How high or low you are influences)
Position (If you are in a city next to a power generator is not the same as in a farm)
Correct motherboard... scratch that... PERFECT motherboard to usb configuration (including the minerals used to create the part of the motherboard to connect to the usb and give those speeds)
And last... you have to be in the moon for it to work perfect ;)

What am saying here is that none of the said speeds have been accomplished. None. they have only be accomplished on the labs where they made it under very strict conditions. This is why I get a little angry when they say for example:

USB 1.0 Full - 1.5MB/Sec <-- Not true. I always get between 100KB to 350KB. You might get a little more but not 1.5MB FTW!!

USB 2.0 - 60MB/Sec <--- Really? Ya Really? If you have a good motherboard and when I say good motherboard I mean one that has proven at least for a year to give good results and not some cheap one, then you might get to 40MB/Sec. I can give an example of the following which applies to many other motherboards. I have an Intel DP35DP. The front usb panel says that it supports 2.0 but somehow they do not run as fast as the back usb connections. This is true for most motherboards. In this example you can see that you have both USB supporting 2.0 but not both have the same speed because it depends on 2 things: You motherboard connection to that specific usb connector and your usb pen drive. I have 2 USB 2.0 pen drive. Both are 32GB but see here. One is Kingston Data Traveler and the other one is Sandisk. I for one are one of those that when somebody says Crucial, Kingston or Corsair and know they are good. when I tested both, in all tests Sandisk had 2x to 3x times faster speed than Kingston.

This made me know that, even on the same motherboard, different pen drives can have different speeds. And this changes on other motherboards. So there is no "only speed" for a pen drive when testing it out on several mother boards. I have to say that the max speed Sandisk gave me was 32MB/Sec to 38MB/Sec while the max Kingston gave me was 11MB/Sec to 13MB/Sec.

Now lets go to the motherboard configuration before going to the OS. My motherboard and many, MANY others have an option in the BIOS (When you cold boot the PC press like crazy F2, DEL, F10 or ESC) until you enter: THE BIOS!

In the BIOS look for an option that says High Speed or Full Speed. I find it dumb that one says HIGH and the other FULL because is misleading but whatever. Select High Speed to get the 480Mb speed (Or 60MB/Sec). Full speed is just about 12Mb (Or about 1.5MB/Sec). But remember even if you save it to High Speed you will not get some crazy 60MB/Sec on your pen drive, not even external usb hard drive.

Now after doing the BIOS part enter Ubuntu and do some tests and run some commands like 'sudo lsusb -v' to get some info on the USB ports. also you can try 'lshw' for more info on the motherboard.

Before I end this I wish this helps in understanding the problem that hunts us all about USB 2.0 and the "speed" it should have. This should solve the doubts we all have with USB ports, where to look for the problem and some knowledge about how the USB makers "make up" some weird speeds in TheoryLand but do not apply on RealWorldLand. Good luck.


You need to enable the bind9 service with the command.

sudo systemctl enable bind9


How do I remove home folder from the desktop?

This has changed under Ubuntu 19.04 "Disco Dingo":

gsettings set org.gnome.shell.extensions.desktop-icons show-home false

Similarly for the Trash icon:

gsettings set org.gnome.shell.extensions.desktop-icons show-trash false

Should you wish the icons back again, repeat the command with false changed to true.


Sound keeps breaking, when it does it doesn't change volume, headphones not detected

Turns out that in my case, the squeezelite package was causing the issues.

I disabled it with:

sudo systemctl stop squeezelite.service
sudo systemctl disable squeezelite.service

Now I am not seeing the problem anymore. There is an existing bug report for this, here: https://bugs.launchpad.net/ubuntu/+source/squeezelite/+bug/1636253

This was my original answer, not really relevant anymore but I'll leave it here for context

  I was also experiencing this problem, on the same Dell laptop model.
  For me, I was able to fix it by re-installing pulseaudio.

  I note that your command above has some apt installs in it, but these packages aren't the same as in those in the command in the question.

sudo apt install --reinstall pulseaudio pulseaudio-utils pulseaudio-module-bluetooth pulseaudio-module-x11 libpulse-mainloop-glib0 libpulse0 libpulsedsp

  Then do a reboot.

  UPDATE 1: Turns out that this only works for the first 30 seconds or so after the reboot. Then it crashes again, and I get no sound at
  all. :(

  UPDATE 2: Actually, now it's been running for a while now and sound is still working. Over a few reboots. I've run the reinstall
  command several times now - I was hoping to reproduce this so I could
  file a bug, but now it won't break again.

  UPDATE 3: OK it crashed again. I've filed a bug report. https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1643870


Compute the size of managed and unmanaged files on Ubuntu

There is no reliable way to do so, since packages may download files while installing that dpkg wouldn't be aware of. The package would clean up if uninstalled, so they're, in a sense, managed, but dpkg doesn't track them. And while dpkg knows the sizes from the package, the files could, of course, have changed after installation.

Packages can have files in /opt (Google Chrome, for example), /var/ (way too many examples to list, just do dpkg -S /var), /usr/local (SSL certificates are to be installed using a directory in /usr/local, for one example).

Reliably, the only directories that you can exclude are /home, /cdrom, /mnt, /media (and /lost+found, but that's an artefact of the filesystem, not standard).

For me, the command you tried, and the following one are in reasonable agreement, and differ significantly with the actual filesystem usage (the list of files from a package is in /var/lib/dpkg/info/<package>.list):

$ (cat /var/lib/dpkg/info/*.list | sudo xargs -d '\n' stat -c '%s' | awk '{c+=$1}END{print int(c/1024)}') 2>/dev/null
5572166

Compare:

$ dpkg-query -W --showformat='${Installed-Size}\n' | awk '{c+=$1}END{print c}'
5462957
$ df /
Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/sda1       18446076 6744528  10741500  39% /

Personally, I just check the sizes of /var/cache and /home.


I would use:

sed -e 's@\(https\?://[^,]*\),@"\1",@g' FILE

This looks for a expression starting with http and an optional s followed by ://. Then it takes everything up to the first ,. This expression will be enclosed by ".


This came from a Mozilla support group.

Clip Grab

Download it from here.

https://clipgrab.org/faqs/howto-download-youtube-video

Just double click it to run the program.


Windows 8 partition deleted after install ubuntu 14.04.1!

I can't get anything with testdisk.

but with photorec, I get much of unorganized files, and i think not all of data


why is there a copy of user home dir showing up in root?

I think I must have created this directory by accident when setting up minidlna. I realised that the contents of this directory were in fact not the same as the home directory. When I was comparing them I was actually entering the home directory not the one at root level. I realised when I used the pwd command to see where I was.

In the end I was able to specify the directory at root level by prepending a / - so rm -R /~amir deleted the copy at root level rather than the one in home.

Sorry to have wasted your time.


How can I install the Huawei E1550 dongle

Mode-switching – method one
Thanks to OdyX (who maintains usb-modeswitch) this is the simplest method.
Open a terminal (Applications->Accessories->Terminal) and type:

sudo apt-get install usb-modeswitch usb-modeswitch-data

Mode-switching – method two
On inserting the device, if you open a terminal (Applications->Accessories->Terminal) and type dmesg
you’ll see something like this:

[IMG]

The device has a small amount of storage space and identifies itself (on Windows) as a mass storage
device, installs the driver and away you go. The problem is Ubuntu does what it is told to, it thinks its a
mass storage device. The switch is never made in software because the software isn’t for Linux. We
need to manually switch it using a little program that has been installed by default for a while now –
“modem-modeswitch”. You need to pass it some parameters but we want the system to do this
automatically when we insert the device – so we will configure a udev rule instead.
Open a new file to store the rule by typing gksu gedit /etc/udev/rules.d/15-huawei-e1550.rules and paste in the following code:

SUBSYSTEM=="usb",SYSFS{idProduct}=="1446",SYSFS{idVendor}=="12d1",RUN+="/lib
/udev/modem-modeswitch --vendor 0x12d1 --product 0x1446 --type option-zerocd"

Save the file and close the editor. Remove and re-insert the device. You should notice that service
providers icon has popped up on the desktop – don’t worry about it as it is just the storage part of the
device being recognized.
Configuring the connection
If you now click on the network-manager icon in the notification area, you’ll see a new option, “New
Mobile Broadband (GSM) connection”


18.04: How to draw on an application on the desktop

Applications can set their window properties. One of the properties would be "below", ensuring the window (eventually without decorations) remains below any other window, another one, "sticky" would ensure the window shows up on any desktop.

See man wmctl for information about a bash tool that allows to change such settings for existing windows from the terminal. In principle, it is of course the application itself that needs to interact with the window manager.

How you do this, depends on the programing language you use. Window managers tend to adhere to the common freedesktop.org specifications. Specifications on how to interact with windows can be found here.

For specific answers connected to the programming language you use, you will have a higher chance of getting good specific help on stackoverflow.com.


No WiFi on Mac Mini 7,1 for kubuntu 19.04

As per the known issues section of the ubuntu 19.04 release notes (https://wiki.ubuntu.com/DiscoDingo/ReleaseNotes) it suggests that you reinstall the broadcom drivers using the command "sudo apt-get install --reinstall bcmwl-kernel-source". I would suggest you purge the previous driver installs and use reccomended method from ubuntu. It worked for me on my mid 2012 macbook pro.


Ubuntu 14.04 Bumblebee/Optimus error with steam

Instead of adding the primusrun command in Launch Options (primusrun %command%) you can add primusrun in a shell script in the game directory in the .steam-directory.
Each game seems to have its own shell script. CS:GO for instance has:
".steam/steam/SteamApps/common/Counter-Strike Global Offensive/csgo.sh"

Find the script for dota2 and change the line:

${DEBUGGER} "${GAMEROOT}"/${GAMEEXE} "$@"

to:

primusrun ${DEBUGGER} "${GAMEROOT}"/${GAMEEXE} "$@"

and you should be able to launch the game as usual, but primusrun will be used.


You need to install AMD proprietary drivers.

sudo apt-get install fglrx

Then you will be able to switch adapters in Catalyst Control Center or in terminal by:

sudo aticonfig --px-dgpu

to AMD, or

sudo aticonfig --px-igpu

to Intel.


How to make evince "Send To..." work with Thunderbird in Xubuntu LTS?

Hitting File > Send To ... evince is looking for a nautilus-sendto executable. If not available the 'send to' command fails.

If you don't have or want or can install nautilus-sendto you can setup an alternative script to send documents to Thunderbird. Run this command:

sudo nano /opt/evince-send-to-thunderbird

In the nano text editor that appears in your terminal, add this text:

#!/bin/bash
thunderbird -compose "attachment='$1'"

Save the file and quit nano. (If you press Ctrl+X you will have the opportunity to do both.) Then run these commands:

sudo chmod 775 /opt/evince-send-to-thunderbird
sudo ln -s /opt/evince-send-to-thunderbird /usr/bin/nautilus-sendto

After a restart of evince, the fake nautilus-sendto script is found on the path and the 'send-to' command opens a Thunderbird Compose window with the current document as an attachment.


can't complete login to ubuntu after editing pulseaudio scripts

I may present you two workarounds. Please tell me and all the readers in the comments how it worked.

Reset pulseaudio

You can reset prrograms to default settings, by purging them and then reinstall:

sudo apt purge pulseaudio
sudo apt install pulseaudio

Second user

If you create a new user, all the settings from your old user are not loaded.

sudo adduser user2

If you want to be admin, just enter

sudo adduser user2 sudo

You then can copy them. For example the Firefox settings: (please change the user1 and unser2)

ls /home/user1/.mozilla/firefox/

There you can find your profile folder let say it's called abcdefgh.default. Then you can copy them by (you may cange

sudo cp /home/user1/.mozilla/firefox/abcdefgh.default /home/user2/.mozilla/firefox/myprofile

After you login as user2 you can start firefox by

firefox -P

to "create" a new profile based on the copied folder.

Other programms you have to try how to copy the setting. Please check the hidden files on your homefolder. Expexially the .config folder.

Hope it helps you.


The default vim package installed for Ubuntu is vim-tiny , I believe, which can be limited in its functionality. You should install the full package: vim

If I remember correctly, this will also install vim-runtime  as well.


How to set the Configuration up for "Text Editor"?

Open Text Editor (gedit).

Open Preferences.

Select Editor tab.

Set Tab width...

Go to Tools menu to set language.


Wallpapers other than default are not appearing as background after restart

It might be because the system cannot find/access the selected wallpaper after restart (due to folder/file permissions or unmounted partition, etc.?), maybe you can try copying/moving it to user-specific or system-wide folder for wallpapers (e.g. /home/you/.wallpapers, /usr/share/wallpapers, or "backgrounds" or something like this)?
Alternatively, if you cannot get more or better answers, you may perhaps consider upgrading to the current Ubuntu version unless you have a good reason not to do so.


In a terminal window, please run the following:

sudo apt-get install -f

That should fix the broken packages.

You can open the Terminal with the ctrl+alt+t key combination.


Dell Precision 7530 HDMI output not working

I fixed this by buying another USB C to DVI adapter and using that instead of the HDMI output on the back of the computer.


Try following.

Create Backup

duplicity _data_to_be_backed_up_ file://_path_to_backup_ --no-encryption

Restore Backup

duplicity restore file://_path_to_backup_ _restore_path_ --no-encryption


How to make use of Homestead/Laravel dev environment on Ubuntu?

what vagrant version do you have?

I've also faced this problem before and I solved it by upgrading Vagrant from version 1.0.1 to 1.6.5. After that vagrant box add laravel/homestead was running well.


Install Ubuntu 13.04 while having win-7 and linuxmint installed

You can do a normal dual boot with Windows and Ubuntu. It won't know about or care about the Mint4Win install that you have.

You cannot use Wubi as it shares some key files with Mint4Win e.g. C:\wubildr.mbr and more importantly C:\wubildr, which is the boot file that directs you to either \ubuntu\disks\root.disk or the Mint4Win equivalent. It can only boot one or the other, so you'd have to manually swap it out, or alternatively add manual Grub entries in one of the Wubi or Mint4Win installs to boot the other (more pain than it's worth).


Can I minimize a window into a box on Unity?

To my own surprise, it works quite nicely, As long as you do not have too many other things on your desktop.

I worked with it for a while, and it seems a weird, but strangely enough nice alternative to frequent workspace switches. Refreshing for its simplicity.

In practice

The solution is actually pretty much what you describe:

Pressing a key combination will "box" the window on your desktop, from a window:

into an icon, with the application's appearance:

Double click the icon, and the window will re- appear and the icon will vanish.

How it works

The short story (explanation):

When pressing the shortcut key, the script is called with the argument box:

windowbox box

The script then:

reads the window id of the frontmost window
checks if it is a "normal" window (you wouldn't want to unmap your desktop for example)
Looks up the process name of the application, owning the window.
Looks up the corresponding icon in the corresponding application's .desktop file in /usr/share/applications
creates a uniquely named .desktop file, with an Exec= line which calls the script (when double-clicked) with the argument show:

windowbox show

The .desktop file will add a number of additional arguments arguments, such as the window id, the (file-) name of the .desktop file.

Subsequently:

The .desktop file is then made executable, to make it a double- clickable object.
When the .desktop file is double clicked, the window is (re-) mapped, the .desktop file is removed from your desktop.

How to set up

Like practically always, when you want to play around with windows, the script needs both wmctrl and xdotool:

sudo apt-get install xdotool wmctrl

Create the directory ~/bin (~ stands for your home directory)
Copy the script below into an empty file, save it as windowbox (no extension) in ~/bin.

#!/usr/bin/env python3
import subprocess
import sys
import os

# --- On Unity, there is a (y-wise) deviation in window placement
# set to zero for other window managers
deviation = 28
# ---

args = sys.argv[1:]

get = lambda cmd: subprocess.check_output(cmd).decode("utf-8").strip()

def find_dtop():
    # get the localized path to the Desktop folder
    home = os.environ["HOME"]
    dr_file = home+"/.config/user-dirs.dirs"
    return [home+"/"+ l.split("/")[-1].strip() \
            for l in open(dr_file).readlines() \
            if l.startswith("XDG_DESKTOP_DIR=")][0].replace('"', "")

def check_windowtype(w_id):
    # check the type of window; only unmap "NORMAL" windows
    return "_NET_WM_WINDOW_TYPE_NORMAL" in get(["xprop", "-id", w_id])

def get_process(w_id):
    # get the name of the process, owning the window and window x/y position
    w_list = get(["wmctrl", "-lpG"]).splitlines()
    pid = [l for l in w_list if w_id in l][0].split()
    proc = get(["ps", "-p", pid[2], "-o", "comm="])
    xy = (" ").join(pid[3:5])
    return (proc, xy)

def read_f(f, string, proc):
    # search for a possible match in a targeted .desktop file
    try:
        with open(f) as read:
            for l in read:
                if all([l.startswith(string), proc in l]):
                    in_f = True
                    break
                else:
                    in_f = False
    except:
        in_f = False
    return in_f

def get_icon(proc, w_name):
    # search appropriate icon in /usr/share/applications
    exceptions = [item for item in [
        ["soffice", "libreoffice-main"],
        ["gnome-terminal", "utilities-terminal"],
        ["nautilus", "folder"],
        ] if item[0] in proc]
    if exceptions:
        if exceptions == [["soffice", "libreoffice-main"]]:
            loffice = [
                ["Calc", "libreoffice-calc"],
                ["Writer", "libreoffice-writer"],
                ["Base", "libreoffice-base"],
                ["Draw", "libreoffice-draw"],
                ["Impress", "libreoffice-impress"],
                ]
            match = [m[1] for m in loffice if m[0] in w_name]
            if match:
                return match[0]
            else:
                return exceptions[0][1]
        else:
            return exceptions[0][1]
    else:
        default = "/usr/share/applications"
        dtfiles = [default+"/"+f for f in os.listdir(default)]
        for f in dtfiles:
            if read_f(f, "Exec=", proc) == True:
                for l in open(f).readlines():
                    if l.startswith("Icon="):
                        icon = l.replace("Icon=", "").strip()
                        print(f)
                        break
                break
        return icon

def create_name():
    # create unique (file-) name for boxed window
    n = 1
    while True:
        name = dtop+"/"+"boxed_"+str(n)+".desktop"
        if os.path.exists(name):
            n += 1
        else:
            break
    return name

def convert_wid(w_id):
    # convert window- id, xdotool format, into wmctrl format
    w_id = hex(int(w_id))
    return w_id[:2]+(10-len(w_id))*"0"+w_id[2:]

def create_icon(w_id, w_name, icon, pos):
    # create the launcher, representing the boxed window
    boxedwindow = create_name()
    f_content =[
            "[Desktop Entry]",
            "Name=[WINDOW] "+w_name,
            "Exec=windowbox show "+w_id+" '"+boxedwindow+"' "+pos,
            "Icon="+icon,
            "Type=Application",
            ]
    if icon == "generic":
        f_content.pop(3)
    with open(boxedwindow, "wt") as boxed:
        for l in f_content:
            boxed.write(l+"\n")
    command = "chmod +x "+"'"+boxedwindow+"'"
    subprocess.call(["/bin/bash", "-c", command])

if args[0] == "box":
    dtop = find_dtop()
    w_id = convert_wid(get(["xdotool", "getactivewindow"]))
    w_name = get(["xdotool", "getwindowname", w_id])
    if check_windowtype(w_id) == True:
        procdata = get_process(w_id)
        procname = procdata[0]
        icon = get_icon(procname, w_name); icon = icon if icon != None else "generic"
        create_icon(w_id, w_name, icon, procdata[1])
        subprocess.call(["xdotool", "windowunmap", w_id])

elif args[0] == "show":
    w_id = args[1]
    subprocess.call(["xdotool", "windowmap", w_id])
    subprocess.call(["xdotool", "windowmove", "--sync", w_id, args[3], str(int(args[4])-deviation)])
    os.remove(args[2])

Make the script executable
To make the newly created directory "pop up" in $PATH, either log out/in, or run source ~/.profile (from a terminal window)
Test- run the script from a terminal window by the command:

windowbox box

The window should disappear, the "boxed" window should appear on your desktop.
If all works fine, add the following command to a shortcut key: choose the gear icon on the top right of your screen:

Go to System Settings → Keyboard → Shortcuts → Custom Shortcuts. Click the + and add the command:

windowbox box

That should do it.

Important note

The script uses xdotool's windowunmap to make the window invisible. The created "box" (icon) on your desktop is the only "gate" to the hidden window. In other words: don't remove the desktop file(s) manually. The window will be lost for good if you do.

Work to do [edit 20-12: done]

The script still could use some refinement:

The window geometry is not restored by definition. Can be fixed very well, but I thought I'd show you the first result.
In most cases, the boxed window has its correct icon. The function get_process(w_id) could use some improvement however. If the process is not found as a command in /usr/share/applications, the file has a generic icon.

Giving the boxed-window icons a different size than the other icons

The script names the created .desktop files always boxed_1.desktop, boxed_2.desktop etc, depending on the "available" name at the moment of creation (filenames, not the displayed name).

You can resize the files (in general), by right- click > icon size. The good news is that if you remove the file and recreate it, the size is remembered. Even if you create the file again after a restart. That means that if you ever resized the boxed windows (e.g.) 1-5, they will always have the same size when you (the script) create them again!


Roguelike platformers available on ubuntu?

The LGDB (Linux Game Database) is a very comprehensive site for Native linux games:

  This is a Linux Game Database, primarily for native Linux games that
  are beyond the planing stage and have released more than tech demos,
  ether as source code or binary files. The information about a game is
  usually taken from the game site. The games are carefully categorized
  and presented with screenshots and videos. The submission guidelines
  explain what kind of Linux games are in the database.

  You can browse the database whilst applying a lot of filters to tweak
  the output. This site uses two methods to rank games:

  user votes and
  popularity

  the popularity is the sum of visits for the past three days.

And there is a section on  Roguelike games: . Other alternatives may be listed here.

You may also be able to run Rogue Legacy in Wine. See also, the AppDB entry.


Looks like your jdk installation was proper and JAVA_HOME is not set as Environment variable. To set JAVA_HOME variable follow the below steps

Open terminal (Ctrl + Alt +  T )
Edit the environment file using the command

$ sudo gedit /etc/environment

or you can use nano editor as your wish.
At the end of the file paste the following lines

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

Note: The JAVA_HOME path depends on installtion path of jdk.
Save the file and exit from gedit.
Use the following command to reload Environment variable changes,

$ source /etc/environment

Now check the jdk path using the command

$ echo $JAVA_HOME

or use

    $ java -version

The above command will give you the installed jdk version if it's installed properly.

If it's not working reboot your system once.

For more info see this How to set JAVA_HOME for Java?


Install Ubuntu and erase Windows Vista for good

erase,

that's simple...

Boot using live-CD and use entire disk( or use custom layout for advanced setup, with multiple partitions).

P.S. remember to format the partition containing Win Vista.


How to make LAMP server accessible from the internet?

Your ubuntu works perfectly fine. You have to set up your router, so first of all read about Port Forwarding. Then you have to give your computer a static ip inside your home network. You can define it from your router. When you do this steps , the user will enter your public ip of your router and can see your site. The problem is that your public ip is not static , it may change everytime your home internet is rebooted. Also it is not secure because if someone had access to your laptop outside your hoek network they can have access to all your devices through security holes.

To learn how to set up your route, you should ask the routers site of stackexchange as proposed in the comment.

P.s. you can use something like Heroku, if you only want to show your site for free to someone. But for production in Heroku you have to pay.


A third party repo against of a main one?! I want to install tor from its repository?

I think it's because both repos have the same tor version, 0.2.3.25-1 for Ubuntu 13.04 (raring), so there's no reason to prefer one over other.

If you correctly set up the torproject repository, the output of apt-cache policy tor will tell you the available versions, from which repository they come and the candidate for installation.


Ubuntu 15.10 startup loops on cryptswap pass phrase request

Appears to be a bug, as I have had a similar situation, "fixed" though by purposely mistyping the passphrase (password of main account). Also how long did you have it installed before prompt appeared? EDIT: Oh looks like you already said you encrypted home, oops. :P

EDIT2: Happened after a while using my PC after recovering my partitions with testdisk, after deleting my partition table on accident, lol. Did you also check though that your checksums for your copy of Ubuntu matches the website's?

EDIT3: It. Came. Back. :( For once that is, but still strange.


Found my own answer and answered this other question

It's very very simple.

Run sudo apt-get install ldmtool then make sure your drive is actually there by checking with sudo fdisk -l and once you have ldmtool downloaded, try to see if the harddrive is recognized by running sudo ldmtool scan. The print out should be a json like string with the device id. Finish by writing sudo ldmtool create all. DONE. You can now go to your /media folder and see all your mounted drives along with the newly mounted SFS partition!


Mythbuntu 16.04 database fail in backend Mythtv 0.28 to 0.29 upgrade

"Client speaks protocol version 88 but we speak 91" means your backend and frontend (client) do not run the same version. Specifically it means your backend is newer than your frontend.

Version 88 is for MythTV 0.28, version 91 is for MythTV 29.

See MYTH_PROTO_VERSION in 0.28 and 29:

https://github.com/MythTV/mythtv/blob/fixes/0.28/mythtv/libs/libmythbase/mythversion.h#L47
https://github.com/MythTV/mythtv/blob/fixes/29/mythtv/libs/libmythbase/mythversion.h#L47

You will need to update (all) your clients to MythTV 29. By default Xenial ships with MythTV 0.28, Ubuntu 17.10 includes MythTV 29. But there is a MythTV 29 PPA provided by the old Mythbuntu Team for Ubuntu 14.04 trusty and upwards.

Tip: Github is used to store a lot of open source projects. It could be wise to learn how to navigate the searchbox and 'branch'-pulldown-menu there.


You may be in the need to install Restricted Extras on your system. You can do it by dropping sudo apt-get install ubuntu-restricted-extras in a terminal

Additionally, information provided in this page can be useful, specially this which refers to Real Media, posted here for your convenience.

  Introduction

  RealPlayer is a media player originally developed by RealNetworks in
  1995. It supports a number of audio and video codecs such as
  realaudio, realvideo, mp3, ogg vorbis and theora, h263, and AAC.
  RealPlayer for Linux is based on the open-source Helix Player which
  can be found at the Helix Community Website.

  Please Note: RealPlayer is proprietary software, is not supported by
  the Ubuntu community, and is not available from the official Ubuntu
  repositories. It is located in the non-free section of third-party
  repositories which the user must specifically enable.

Which lead us to the possibility of the installation (alternatively, of course), of the Real Media Player for Linux, which seems to be discontinued but you can find older versions in the "Helix and RealPlayer Archive"

However, the installation of the sole codec should do the trick. I suggest you  to try the restricted extras in first instance and to try again the .rm playback using your favorite media player.

Good luck!


Can I use rest of the USB with persistent Live USB

The first partition on a Persistent flash drive is FAT32, it is the only partition visible to Windows.

You can access data on this partition while the drive is plugged into a Windows computer.

If you need to access data stored on this partition while booted from the flash drive, you can find it at filesystem/cdrom.

Edit

If a Full install is what you want:

Start by formatting your flash drive as NTFS if it is large, otherwise leave as FAT32.

When you get to partitioning select "Something else".

Leave the space desired for the first partition as FAT32 or NTFS, this is your Windows/Linux data partition.

Make the remaining space ext4 and use for "/" (with a little space for swap if you want to allow hibernation).

Make sure the boot loader is installed to the root of the USB drive.

Continue with install.

Finished drive will have a partition accessible to Windows and Linux (and OSX if FAT32).

Edit:

Windows 10 can see FAT and NTFS partitions regardless of partition order.


How can I install Pandoc version 1.8.1.1?

I am guessing, your have to extend your PATH environment variable to include

~/.cabal/bin

and then relogin afterwards.

This can be done in different ways. e.g.

editor ~/.bashrc

and add at the end

export PATH=~/.cabal/bin:$PATH


Sorting files and folders with underscore at the beginning

You can sort files with leading underscores to the end with --sort=version or -v which is equivalent to sort -V (natural version sort) (which is most useful for sorting files with numbers).

$ ls -v1
2
A
G
K
S
x4
_F

Details on version sorting are in info ls... note that:

‘LC_COLLATE’ is ignored, which means ‘ls -v’ and ‘sort -V’ will
 sort non-numeric prefixes as if the ‘LC_COLLATE’ locale category
 was set to ‘C’.

Perhaps this is adequate for your purpose.


Is there a way to turn off individual screens?

If you are using stock Ubuntu Desktop you should be able to use System > Preferences > Monitors.  This should show all of your monitors, click on the one you wish to disable, and then use the 'on/off' radio buttons to disable that specific monitor.

If you want to do this from the command line you should be able to use xrandr --output <name> --off to disable the output which should trigger the monitor to power down.


Is it safe to upgrade my web server from Ubuntu 11.04 to 11.10?

It is more than safe but not really recommended.

Ubuntu 11.10 support will end in April 2013, this means that you will be then forced to upgrade again to some other version.

I think the best advice here will be wait for 12.04, then wait a couple of days more after the release, upgrade.

This way you guarantee that you will be running a version with support for 5 years after the release date. That is the most important fact you need to focus on when talking about servers.


"ImportError: cannot import name PathCompleter" when running PtPython

You don't need ptipython which is causing the error message, only ptpython. Open the terminal and type:
sudo pip uninstall ptipython ipython
sudo apt install ipython
python -m pip install --user ptpython

Alternatively you could do this with Python 3 instead of Python 2.7 by installing python3-ipython instead of python-ipython or you could install both ipython packages alongside each other with sudo apt install python-ipython python3-ipython


Twinview nvidia browser spring to left monitor

Ok, I solved the problem by going to display and disable the sticky edges>apply then enable again sticky edges>apply and after that the problem was solved.


VirtualBox options to resize window now showing

Host+C seemed to get it back to normal. Was in Scale mode without knowing it.


After recovering from suspend, artifacts appear in text

Try re-installing the font. That might fix it.

System installed fonts are found here → /usr/share/fonts/

It looks like your using "Nimbus Sans L" font so just try re-installing them...

How to install fonts in Ubuntu →

"EDIT" ↓

I am running Firefox in the image below, but check to see if you have the "Allow pages to choose their own fonts, instead of my selections above" checked. Here in Firefox → go to, edit, prefrences, content, click the Avanced tab under Fonts & Colors . see the pointer in image... If checked, un-check it and then check it back. This may reset it, and solve the problem.

Hope this helps...

Edit #2↓

Try downloading and installing: → ATI binary X.Org driver


proprietory drives for ubuntu 12.04 intel 3000 hd graphics

I really recommend you stick with the default driver that comes with the kernel.

If you feel adventurous, you can install the latest drivers from the edgers ppa.

This is really experimental and you should only use it if you know how to recover from a broken graphics driver.

first install ppa-purge in case something goes wrong

sudo apt-get install ppa-purge

add the xorg-edgers ppa

sudo add-apt-repository ppa:xorg-edgers/ppa

refresh package list and switch to new driver

sudo apt-get update
sudo apt-get upgrade

reboot

If this messes up your system and you want to revert back to the offical driver run:

sudo ppa-purge ppa:xorg-edgers/ppa

If you are greeted with a completely unusable display press Ctrl-Alt-F1 or F2 I always forget which one, to open a console and run the ppa-purge command.

"This is an environment of welcoming... so you should just... get the hell out of here" --Michael Scott


Chrome fonts too narrow and line spacing too big

My solution is simple but mostly credited to @Jos.

Make sure ttf-mscorefonts-installer is installed correctly in the system. If not, uninstall and reinstall it with the following commands.

sudo dpkg -P ttf-mscorefonts-installer
sudo apt-get install ttf-mscorefonts-installer
Use TAB and Enter keys to navigate the installing process.
sudo fc-cache

And it should work properly now. But It may not apply to everybody else's situation though.


I think you are talking about the last line of your /etc/fstab file , I mean

/dev/mapper/cryptswap1 none swap sw 0 0

So If you observe it one more time , the keyword is cryptswap1 nothing but at the time of installing Ubuntu you may have selected Encrypt your home directory option that's why only it came up into the action else it won't. That partition will mount everytime at the booting and that will help you in the Home directory encryption . No problem with that.

If you are not using encryption now then you can remove it by deleting that specific partition .

If you want to find out status of the partition then you do it with

 sudo cryptsetup status cryptswap1

Hope that helps.


Unable to create bootable usb in Ubuntu 16.04

If I am not mistaken you should use a program that allows you to boot iso of windows, surely the program that you use only allows to do it with iso gnu / linux, if this is not the problem should be iso problem.

I leave you a link that can help you.

How can I create a Windows bootable USB stick using Ubuntu?


Wubi with 14.10 doesn't work - failed to partition the selected disk

This is a bug with the wubi.exe released with 14.10. Or to be precise it's a bug in one of the programs used byubiquity (the Ubuntu installer). Normally bugs can be fixed, but typically Wubi is never patched mid-release so this bug will remain for the full life-cycle of Ubuntu 14.10.

So, if you have tried to install Ubuntu with Wubi 14.10, it doesn't work and cannot be fixed with any known manual workaround.

Go to the Add/Remove programs in the Control Panel in Windows, and double click on the Ubuntu entry to completely uninstall Wubi.

Update

There is now a manual workaround from hakuna_matata that is of medium to high difficulty. You have to apply it in Windows, prior to the Ubuntu install phase. See ubuntuforums for more information.


The answer was found in the case:
“Solution” to Intel Graphics Screen Tearing/Flickering Causes Excessive Fan Use in Ubuntu 16.10/17.04/17.10

The correct solution would be to create the following folder and file:

sudo mkdir /etc/X11/xorg.conf.d

gedit /etc/X11/xorg.conf.d/20-intel-graphics.conf

  you can use any text editor you prefer

copy then paste the following content:

Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
   Option      "TripleBuffer" "true"
   Option      "TearFree"     "true"
   Option      "DRI"          "true"
EndSection

remember to save the file

  Do not create these files in /usr/share/X11/xorg.conf.d. That is the
  location for example configuration files for X, not the ones that are
  actually loaded.

source:
Question 945895


I want to play AisleRiot Solitaire but don't know how to start it

Simply click on Ubuntu dash icon in the top left,
and start typing the name of the game, i.e. solitaire.

The icon for the game should appear, just click on it and the game
should start.


The only similiar topic i found is  this

Did you already try to configure your screensetup direcly via terminal using xrandr?


KVM remote-viewer: Force certain keys to stay in host OS

I don't have enough reputation to comment to have to put as an answer, I am looking for a similar solution, I need to send commands to host with keyboard shortcuts, from my research I found there is no way to do it with virt-viewer unless you write a custom app that wraps spice-gtk widget.
Its a shame, I really need this.

Edit.
I Just found that it has been filed as a bug/feature request recently https://bugs.freedesktop.org/show_bug.cgi?id=93249

Edit 2.
According to this commit http://cgit.freedesktop.org/spice/spice-gtk/commit/?id=767e5522f64c115f66f6419abd378ad568e5564e this is possible from spice-gtk v0.27 unfortunately its not in 14.04 repo, but 15.10 ships with v0.28 i am considering upgrading to 15.10

Edit 3.
I just tested it in 15.10 and it works, left ctrl+alt releases focus then just do whatever keyboard short-cut you need.
For me this has solved the issue.


IDE for Developing windows phone 8 applications in Ubuntu

Intel XDK NEW is your answer.Its free too.


You should be able to select the partition you want if you manually configure partition in your setup

Keep in mind that you'll have to basically partition the partition for /home, /, /boot, etc. Make sure you have the room on your disk, and partition it carefully or you'll lose everything

Easier solution is to use an USB drive for recovery, but since you didn't present that as an option for you, I'll assume it isn't


Updating files takes very long? Is there any way to short it?

If you are not using rsync over the network. You should not use the -z option for compression. The compression is useful when you use rsync over the network and have a limited bandwidth. If you are using it locally, it will just require more CPU usage. So removing this option should improve the performance.


Can't run add-apt-repository due to gi error on Ubuntu 18.04 and Python 3.8.5

Here is what helped me to fix the issue:
https://stackoverflow.com/questions/59838238/importerror-cannot-import-name-gi-from-partially-initialized-module-gi-mo
And the solution was to force install:
sudo python3.8 -m pip install --ignore-installed PyGObject


The 'grub-efi-amd64-signed' package failed to install into / target/. Without the GRUB boot loader, the installed system will not boot

Thanks to oldfred for helping me. In the end, my problem was that I have installed Windows in Legacy mode and it was impossible (for me) to install Ubuntu in Legacy mode too. I converted Windows from Legacy to UEFI following this guide from intel. Basically open on windows a prompt command with administrator privileges and run

mbr2gpt.exe /convert /allowfullOS

Note that all the partition in the disk should have a MBR otherwise mbr2gpt fails. After that, all the partition have now a GPT. Restart and set in the BIOS and disable CSM. Then restart again and boot from the USB the Ubuntu Live version and proceed as usual. Note that the bootable USB should have a GPT. Note also that in some occasions you need to disable secure boot.


If you cd to a different user's home and run an apt install command does that do anything special?

Your instinct is correct. It can be skipped for the apt-get command. The current working directory has no influence on the installation.

But be aware, that the following command

ln -s /usr/games/steamcmd steamcmd

creates a symlink in the current working directory. So if you want it to be in the steam users home, then it needs to change to

ln -s /usr/games/steamcmd /home/steam/steamcmd

That is maybe, why they added this step.


You didn't install the X2go server, just the bindings

  X2Go bindings for LXDE (package name: x2golxdebindings) will add
  additional X2Go-related functionality to your LXDE Desktop.

You need to run sudo apt-get install x2goserver x2goserver-xsession for the server.  See the install guide for details.

On a side note, X2go depends on openssh-server which is not installed by default.  It should pull that as a dependency while installing the server, though.


Installing ubuntu 12.04 on macbook pro9,2

I am doing pretty much the exact same thing: 64-bit 12.04 on a 9,2 MBP.

In my case, the boot problem was fixed by adding noapic to the Kernel boot options. You will have to do this in order to boot the CD and again once you have 12.04 installed to the HD.

If you get past this point, you might experience additional problems that I see: the laptop gets extraordinarily warm and freezes every few hours.

Prior to installing 64-bit 12.04 I installed the 32-bit version, which seems to work better. I may go back to that or skip the whole project until support catches up with the bleeding edge hardware.


Apache - Redirect all taffic from port 80 to 443 failing

Try this:

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

I suspect the != is necessary.

Also, ensure you allowed .htaccess with:

AllowOverride all

in httpd.conf

Alternatively, you can also try this rewriterule that doesn't use http_host:

RewriteRule ^(.*) https://your_server.com/$1


If you have your Windows 8 installation disk, insert this and reboot the computer, when asked what you want to do click repair and follow the instructions.

I hold my hands up now and say that I have never run Windows 8, so I don't necesarily know what I'm talking about!

On windows 7 I deleted my Boot manager by mistake, and was unable to load anything but Ubuntu however after reinstalling the Boot manager, I restarted and all now runs as it should.


How to paste text from Vim editor to browser?

Either

Select the text without pressing a shortcut key and middle-click in the browser window, or
Select the text, press shift-ctrl-c and then use ctrl-v to paste, or
I'm not entirely sure what vim has to do with sql files and what these sql files are (sqlite?), but maybe you have to use vim because the environment variable EDITOR is set to vim; maybe you could do whatever you do by setting

export EDITOR=gedit

before starting whatever program you start to edit the sql files.


Why doesn't my system use hardware rendering?

Try booting the stick from another usb port and/or another computer to test if the usb port or stick is bad.

Load the boot image on another usb stick and see if that works.


I assume you mean dr.dk. I experimented and got the radio working, but then it froze up and nothing happened, and then I noticed the pop-up blocking symbol in firefox. You need to allow pop-ups for the site and save it to the firefox preferences by going to edit > preferences > and clicking on 'exceptions' next to block pop up windows and add dr.dk in there. Then you need to reload dr.dk/radio in a new tab (or restart firefox but make sure you don't clear the settings on exit) and then click on one of the radio stations and a pop up player will appear. It was fine after that for me- see the second screenshot.


You could use crontab to run the scripts at scheduled times. If computer is not running all the time, you may need to combine it with anacron and/or /etc/rc.local.

The commands to enable/disable network connections are:

nmcli c up id "<connection id>"
nmcli c down id "<connection id>"

You can look for connections and there ids in the /etc/NetworkManager/system-connections/.


how to remove automatic shutdown in ubuntu

last -x | head | tac

will show information on shutdowns. It will show the user it was done with. If root you do not need to check for scripts that are user related. If the user you need to find a user script.
Also check /var/log/auth.log It will have a registration of shutdowns.
Files to check:

more /etc/crontab  for the all users cron
crontab -l for the cron used by user
sudo -i -> password and then crontab -l for the cron used by root.
cd /etc/cron.daily/
systemd.timer and systemd.halt

Check them all for a shutdown or halt command or a script that is started.

So my question is there a way to disable the shutdown without having to reinstall linux.

There is never a need to re-install. Rebooting into rescue mode (either from grub or a live session) open ups the machine to all who has access.


If the directory Documents has seven hard links, this means that:

One hard link is from the name Documents in its parent directory.
One hard link is from the entry . in Documents itself.
Five hard links are from the entries .. in five subdirectories.


As said by the posters above, check first you've burned the ISO to the disc, not copied it. Otherwise on HP laptops you may have to choose the boot order (on mine I did it by pressing Escape right at startup) and select your CD/DVD Rom Drive so that it boots from the CD rather than your already existing Hard Drive.

Alternatively as pointed out by msPeachy:

I've been installing different versions for the past week and I've found running the installation off a USB worked fine for me, if you want to give it a try just get the ISO which you've already got from what I've read and use:

http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/

Make sure your USB is free to be reformatted and has enough space (anything on it will be deleted) and leave it plugged in, once you restart your computer you should have an option at some point to access the boot menu (on my HP pavillion it was "Esc" and there you choose to Boot from your USB instead of your hard drive)

Also I'd suggest you change the Boot Order in the Boot Menu and not the Bios Setup so that once you've restarted your Laptop with Ubuntu, you don't have to change it back (otherwise your laptop will try restart from a USB everytime). This is just my experience on my HP pavillion, suppose it'd be similar for you.


What is default `mail` program used by cron?

The description reads:

Being able to send emails from command-line from a server is quite
useful  when you need to generate emails programatically from shell
scripts or web  applications for example.

How the mail command works

For those who are curious about how exactly the mail command delivers the mails to the recipients, here is a little quick explanation.

The mail command invokes the standard sendmail binary (/usr/sbin/sendmail) which in turns connects to the local MTA to send the mail to its destination. The local MTA is a locally running smtp server that accepts mails on port 25.

mail command -> /usr/sbin/sendmail -> local MTA (smtp server) -> recipient MTA (and Inbox)

This means that an smtp server like Postfix should be running on the machine where you intend to use the mail command. If none is running you get the error message "send-mail: Cannot open mail:25".

Install Sendmail

Open terminal & type following command in terminal.
sudo apt-get install mailutils
sudo apt-get install sendmail

Configure Sendmail
After installing sendmail , you should configure sendmail. Its little hard. But dont worry after that we can spoof email to anyone.
Type following command on terminal
sudo gedit /etc/mail/sendmail.mc

It will open sendmail.mc file.

For example your last two lines are as follows:

MAILER(`local')dnl
MAILER(`smtp')dnl

Put this code before those two lines.

MAILER_DEFINITIONS
define('SMART_HOST',`smtp.gmail.com')

Now close that file

Now we will generate configure file from .mc file so type following command in terminal.

sudo bash -c 'cd/etc/mail/ && m4 sendmail.mc >sendmai.cf'

Now everything is complete, try to send mail using terminal

Some examples from the link that I provided:

Use the mail command

Run the command below, to send an email to someone@example.com. The
s option specifies the subject of the mail followed by the recipient
email address.

$ mail -s "Hello World" someone@example.com

Send mail to a local system user

To send mail to a local system user just use the username in place of the recipient address

$ mail -s "Hello World" username

Specify the FROM name and address

The "-a" option allows to specify additional header information to attach with the message. It can be used to provide the "FROM" name and address. Here is a quick example

# echo "This is the message body" | mail -s "This is the subject"  mail@example.com -aFrom:sender@example.com

The a option basically adds additional headers. To specify the from name, use the following syntax.

$ echo "This is the body" | mail -s "Subject" -aFrom:Harry\<harry@gmail.com\> someone@example.com

Note that we have to escape the less/great arrows since they have special meaning for the shell prompt. When you are issuing the command from within some script, you would omit that.

Sources:

What is mail?

mail command examples

Install and Configure mail


Insert subtitles permanently and convert video

Arista can do both of these things, and it provides a very nice, easy GUI. It's available in the repos.


Sublime Text 3 authentication question when saving document

You don't have permission to write to /var/www/Rest_Of_Path_Here. ST3 is trying to elevate its UID to write as the correct user (hence the sudo prompt). I didn't know it could do this but I've tested it and it works so there you go.

There are a few ways you can fix this:

Allow your user to write the files directly. So many options here:

chown the files so you own them. This may upset things running as other users that might also need to write, eg a webserver running as www-user. You may need to change what they run as too.
Add your user to the www-data group  and change the file mask to 774 so members of the group can write/execute.
Change the file mask so other users can write (eg 777)... But this is pretty risky if there's something malicious on the server already.
Use ACLs to allow your user to write without disturbing the standard permissions framework.

Change your workflow to write into a version control system (eg git) as your users, and then have a script running as the other user check it out. This carries other benefits.
Run ST3 as a user who can write there:

sudo -u www-data subl /var/www/Rest_Of_Path_Here

This is quite a lot uglier than just fixing the files.


Unknown keyword in installer: Ubuntu 11.04 boot from USB

Maybe you are experiencing the same bug as in can't install with usb pen drive, SYSLINUX problem.


Chances are nothing will go wrong but I would suggest you use separate profiles to avoid problems, especially if you have other software on either installation.

The GNOME configuration for the most part shouldn't cause too much trouble, though you might encounter a few gconf related issues.


Why does my wifi Internet intermittently disappear?

I was having a similar problem with mine, that turned out to be a two-part problem with interference from eth0 (the wired ethernet port) and a slight incompatibility between Linux and my wireless router's implementation of 802.11n.

If you are running the Intel wireless driver (iwlwifi), try typing the following commands at a terminal.  These will turn off your ethernet port and disable the wireless N in the wifi driver.  It is not permanent and will revert the next time you reboot:

sudo ifconfig eth0 down
sudo modprobe -r iwlwifi
sudo modprobe iwlwifi 11n_disable=1

If that works for you, there's a bash script on my Github that you can download and run each time you reboot: https://github.com/FreedomBen/handy-bash-scripts/blob/master/fixTheInternet.bash

I have this script on my desktop and I just run it each time I reboot.  I haven't had any issues since.

Note: You will have to make the script executable.  At a terminal, type:

cd path/to/script
chmod +x fixTheInternet.bash


To tell if your graphics card is in use you must run the following command: glxinfo | grep OpenGL. If it says Gallium 0.4 on llvmpipe, then it's using your CPU instead of your GPU. If it's says it's using the Intel GPU, then you'll want to disable that in the BIOS and make sure your video cable is connected to your GPU.

Radeon HD 8570M is a GCN/RadeonSI graphics card so you will want to go to AMD's website and download/install Catalyst 13.11.


Had win7 and Ubuntu 16.01 on separate drives - downgraded to ubuntu 14.01 and now win7 isnt appearing in Grub

You have an UEFI motherboard with Ubuntu installed in UEFI mode. This is good.

You have Windows installed in Legacy mode. This is bad.

You can only boot one or the other, and it appears GRUB is installed to be used in UEFI mode. So you cannot boot a Legacy mode operating system from UEFI-mode GRUB IIRC.

to get truly seamless dual-boot you'll need to either:

Reinstall Windows in UEFI mode (or convert it to UEFI mode, but that's a bit more involved).

Or reinstall Ubuntu in legacy mode.

I recommend having everything running in UEFI mode and disabled the "Legacy Boot Option ROM" setting in the UEFI setup. This will make your computer boot much much faster, and initializes your graphics card and sometimes even networking much sooner (and faster). (ASUS motherboards are my only experience in this regard, non-asus YMMV)

In the mean time, to boot Windows, reboot into your UEFI firmware setup, and boot manually by selecting the WD5000AAKX disk on your system.

PS your encypted LUKS partition is not strong enough. Consider using stronger encryption options. See: here


Can I use dial up modem to connect to internet while installing ubuntu 14.04?

Yes, create a live USB/CD and select ' try ubuntu without install ' i use UNetbootin to create a live usb(you can use any other & you will still get the option).

After that you will get a screen like this

At the top right corner you can set the network dial-up connection.

After setting up dial-up connection run the "Install ubuntu icon " on desktop.


How to sync files with Windows Samba share from within Ubuntu?

I've successfully connected my Linux machine to a number of different Operating Systems using samba. I don't remember the exact software I used, but with some quick searching, I found a samba client in the Ubuntu Software browser called Smb4k. There are also command-line utilities you could use.

In my opinion, however, the better options both in terms of scalability, ease of use, and cross-platform compatibility is a program called Syncthing. There is a Windows exe, it's in the Ubuntu Software store, or can be downloaded via apt-get, and there's even a mobile app version for your smartphone. It functions much like Dropbox, except you maintain control of your own data. You can set it up to work only over your home network, or over the internet using Syncthing's relay servers.


How can I gracefully close all instances of gnome-terminal

Even the "friendliest" kill- command will close the terminal without asking. Also man gnome-terminal does not give any solution to close the window like in the GUI.
You can however make a script raise (all) gnome-terminal windows and simulate Ctrl+Shift+Q.
A complexity is that this will not work when the windows are spread over different workspaces. The script below therefore looks up the gnome-terminal windows on the current workspace and takes care of them as explained above.
The script
#!/usr/bin/env python3
import subprocess
import time

def get_res():
    # get resolution
    xr = subprocess.check_output(["xrandr"]).decode("utf-8").split()
    pos = xr.index("current")
    return [int(xr[pos+1]), int(xr[pos+3].replace(",", "") )]

try:
    pid = subprocess.check_output(["pidof", "gnome-terminal"]).decode("utf-8").strip()
except:
    pass
else:
    res = get_res()
    ws = subprocess.check_output(["wmctrl", "-lpG"]).decode("utf-8").splitlines()
    for t in [w for w in ws if pid in w]:
        window = t.split()
        if all([0 < int(window[3]) < res[0], 0 < int(window[4]) < res[1]]) :
            w_id = window[0]
            subprocess.Popen(["wmctrl", "-ia", w_id])
            subprocess.call(["xdotool", "key", "Ctrl+Shift+Q"])
            time.sleep(0.2)

How to use

The script needs both wmctrl and xdotool
sudo apt-get install xdotool
sudo apt-get install wmctrl

Copy the script into an empty file, save it as close_allterminals.py.

Test-run it by the command:
python3 /path/to/close_allterminals.py

Example: four gnome-terminal windows opened, in the top-left one is a process running:

After running the command, three are closed automatically, the one with the running process gets a prompt:

If all works as you like, add it to a shortcut key combination:
choose System Settings > Keyboard > Shortcuts > Custom Shortcuts. Click the "+" and add the command:
 python3 /path/to/close_allterminals.py

Edit
The version below also takes care of gnome-terminal windows on other workspace: all windows are moved to the current workspace before they are closed in a safe way.
An example:
I have in total six gnome-terminal windows open on four different workspaces, many of them have processes running in it:

If I run the script, all gnome-terminal windows are orderly moved to the current workspace and raised. Idle windows are closed automatically, the ones with a running process are prompted:

The script
Set it up like the first version.
#!/usr/bin/env python3
import subprocess
import time

def get_res():
    # get resolution
    xr = subprocess.check_output(["xrandr"]).decode("utf-8").split()
    pos = xr.index("current")
    return [int(xr[pos+1]), int(xr[pos+3].replace(",", "") )]

try:
    pid = subprocess.check_output(["pidof", "gnome-terminal"]).decode("utf-8").strip()
except:
    pass
else:
    res = get_res()
    ws = subprocess.check_output(["wmctrl", "-lpG"]).decode("utf-8").splitlines()
    matches = [t.split() for t in [w for w in ws if pid in w]]
    pos = 100
    for match in matches:
        w_id = match[0]
        subprocess.call(["xdotool", "windowmove", "--sync", match[0], str(pos), str(pos/2) ])
        subprocess.call(["wmctrl", "-ia", w_id])
        subprocess.call(["xdotool", "key", "Ctrl+Shift+Q"])
        pos = pos+100


How to install ruby 1.8.7 back on Ubuntu 14.04 after upgrade?

I did this by adding the saucy (13.10) repositories back to my sources.list file.

sudo -H gedit /etc/apt/sources.list
Add deb http://gb.archive.ubuntu.com/ubuntu/ saucy main restricted after the first set.
Save the file and exit the editor.
sudo apt-get update
sudo apt-get install ruby1.8
sudo apt-get install rubygems

Probably isn't the best way, but it seemed to work for me. I had an older project with compass/sass that was failing on ruby 1.9 but now works as before.

I noticed that installing ruby 1.8 also installed a package called ruby-switch. Might be able to switch between 1.8 and 1.9 with this utility, although I haven't played with it and RVM is probably a better solution for switching ruby versions.


installed Ubuntu server in hp proliant ml350 g6 not booting up

it seems like your problem like this post

you have BIOS related issue where by default HP system show only  HP Smart Array Controller and will not show HDD . so , you have to set SATA settings in BIOS . for more info you can use given link .


Touchpad not detected in Ubuntu 13.10 (Samsung Series 3 NP350V5C)

Seems to be fixed. I downloaded the synaptiks package from the Software Center and rebooted. Did the trick, no idea what the problem was.


Switched from Unity to Cinnamon, now FireFox opens wrong app from Downloads menu

After some extensive digging on Google, I discovered that, as root I can edit /usr/share/applications/defaults.list and /usr/share/applications/mimeinfo.cache and change all references to nautilus in both those files to nemo instead and the change takes effect as soon as I save. Since I am no longer using Unity, and don't even have Nautilus installed, this solution is both safe and effective.


Copying files from directories having spaces in its name

Easily you can do the trick, enclose by double quotes:

cp "$inputFile" /destination/

Enclosing characters in double quotes (‘"’) preserves the literal value of all characters within the quotes, with the exception of ‘$’, ‘`’, ‘\’, Read more: http://www.gnu.org/software/bash/manual/html_node/Double-Quotes.html


Asus Eee PC doesn't have "OS Installation" or Boot to in BIOS Menu?

First and foremost, you will need to create a bootable USB-drive with a Live installation of Ubuntu (or some other Linux).

HOWTO: Create a bootable USB-drive in Ubuntu

Just download the image you want from ubuntu.com, launch 'Startup Disk Creator' (already installed by default) and choose to install the image you just downloaded onto a drive of your choice. This drive can be a CD, a DVD, a USB or an SD card. Be aware that any data stored on the drive you choose will be erased.

You will have to provide your root password during the installation, in order to give the installer the necessary permissions required to write a boot-loader onto the drive.

You can also choose to create a persistence file, which will allow you to save settings between sessions.

HOWTO: Create a bootable USB-drive in Windows

There are a number of tools available in Windows to create bootable media, but my personal favorite is UNetbootin. It's pretty straightforward, and it can even download the appropriate Live CD image for you.

Once you have successfully created a bootable USB-drive, plug it into the computer you wish to install Ubuntu on and (re-)start it. On the Asus EeePC line of computers, you can enter the boot-menu by pressing the Esc-key when you start the computer. Which exact key is used for this differs between brands.

That should be all you need to do to create and boot into a Live USB session on a computer without an optical drive.


Why isn't the date visible on the top bar?

Assuming you are referring to Ubuntu 18.04...
... the format of the "top bar" is controlled by "Gnome Tweaks".

Install it, Start it, then you will find "top bar" configurations for enabling

Battery Percentage
Date
Seconds
Calendar weeks


Are you sure the file is not broken?
Try checking the MD5:
md5sum qt-linux-opensource-5.1.1-x86_64-offline.run

According to: http://download.qt-project.org/official_releases/qt/5.1/5.1.1/qt-linux-opensource-5.1.1-x86_64-offline.run.mirrorlist the MD5 should be: f2caba7912b42d0d07fed6436252acdb

If the MD5 isn't correct try downloading the file again.


How is the guest account prevented from using su and sudo?

From doing a quick search, I think the answer is that Ubuntu does not actually have a guest account, it uses a "guest session".  Guest sessions cannot make any real changes to a system, so if you log on and try to save a file to the sessions home directory, when you log out, those files are removed.

You can almost think of a guest session as a live USB/CD session.

Most of my searches on guest session only give me options to remove it, I did find one that talked about creating a guest user, and that is different from the guest session.


It seems the problem is using Numix theme, Terminus Font and Gimp together,
as described here.

Changing the font fix the problem (as you tested already).


How to integrate jFrame Menu Bar into Unity Panel?

In order to integrate Java applications with the Unity bar you will need an external library.  There is one called Java Ayatana that you can get from a PPA.  Instructions are on that page but I'll put them here

 sudo add-apt-repository ppa:danjaredg/jayatana
 sudo apt-get update
 sudo apt-get install jayatana

You will need to log out and back in after installing.  The instructions here will install the latest version and will keep up to date, the link I put in my comment above is outdated and must be manually installed so I recommend you use this instead.

From the page I linked above there is a tab labeled "wiki" which has a file "configuration".  This file explains how to set up a Java program to utilize the Unity top bar.  You will need to create a Java desktop application (.desktop file).


Uninstall clamav and clamtk repository version:

sudo apt-get purge clamav clamtk

First you will need some dependencies and build tools:

sudo apt-get install openssl build-essential libssl-dev checkinstall

Download this file, it will go to your /home:

wget https://www.clamav.net/downloads/production/clamav-0.99.1.tar.gz

Extract that file and change to the folder it created:

tar -xvzf ~/clamav-0.99.1.tar.gz
cd ~/clamav-0.99.1

Now run the following commands to build clamav 0.99.1:

./configure
make

Now build a package with

sudo checkinstall

checkinstall will guide you through the building of a .deb package and when it is done run

sudo dpkg -i ~/clamav-0.99.1/clamav_0.99.1-1_amd64.deb

Now it is installed but you may face errors about a config file, if you do run these commands (Thanks to user Terrance on this question for this, if you use it give him a vote)

sudo dpkg-reconfigure clamav-freshclam

Just keep pressing Enter to use default settings, then run

sudo rm -f /usr/local/etc/freshclam.conf
sudo ln -s /etc/clamav/freshclam.conf /usr/local/etc/freshclam.conf

Now you can run a

sudo clamscan -r /

To do a scan.

Tested on 15.10.