As you have quite new GPU hardware it might possibly be some kind of driver issue.

While intel chips are very well supported, there is actually nothing to do right now.

We may come to this later, but to sort things out - let us start with laptop 2 first.

Install the latest stable NVIDIA driver and Optimus support :

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-355 nvidia-prime
sudo reboot

Update :

Sorted out a lot of possibilities, it looks like it might be a kernel  related compatibility problem.

Download the daily (test) build of the coming Ubuntu edition 15.10 with the newer kernel 4.2 :

http://cdimage.ubuntu.com/daily-live/current/wily-desktop-amd64.iso

Create an install media - boot from it to check.

Conclusion :

The problem does not occur on ubuntu 15.10.

Install it immediately or wait for final release.

Ubuntu 15.10 will be released on October, 22.


Packages are broken with unmet dependencies - cannot install fglrx

Your output indicates the below packages have unmet dependencies:

fglrx-amdcccle
xvba-va-driver

Which means APT tried to install the above packages but failed half way, because some other required packages are not available in your system.
Therefore we need to remove the above packages before doing anything else. Run in Terminal:

sudo dpkg --purge --force-all fglrx-amdcccle xvba-va-driver

Then we can remove all the fglrx related packages:

sudo apt-get remove --purge fglrx*

You can install the new fglrx:

sudo apt-get install fglrx-updates


19.04 on Surface Studio Nvidia drivers not running

The solution was remarkably simple.

I downloaded the LATEST drivers from nvidia.com, and installed them.

I was having an installation error with the ones I downloaded previously as they were for an old kernel.


My best suggestion, based on the information you give, would just be to:

-format the flash drive (FAT32)

-re-download the iso file

-recreate the liveusb on the flash drive

-try booting and installing again

If that doesn't work, try using a different flash drive if you can. I honestly have no idea what would cause this and I am a complete noob to technology in general compared to some on this site, but sometimes just starting over clean helps.


You should setup a server (NAS, Android Box, or even a Virtual Machine on your desktop) where you install a web based plattform to store your information. It depends on what kind of information you want to store but in any case i would recommend kind of networked appliance (VM) or Server if you want to access the information from different hosts / OS


Resize root partition to unallocated space before

A partition can only be resized by modifying its end. Therefore first, you have to  move the / partition to the beginning of the drive, gaining some free space after the moved / partition. Then you can grow the / partition which will be done by changing its end block number to a bigger number.

These actions can both be made through GParted, called from a live system on an USB or a DVD, but not from the current system where the partition is currently mounted.


Video card not working properly? (Greenish screen)

You don't have to install new drivers. Proprietary drivers from AMD (fglrx) are not available for your X1270 any more (unless you go back to Ubuntu 8.04).

This is a known bug of Ubuntu 13.04 with RS690 graphic cards. However, there is a workaround. This askubuntu post contains an answer. You have to disable Dash Blur with compiz-config-settings-manager or a similar application.
The Bug-report can be found here on launchpad.


Screen Dimmer in Ubuntu than in Windows - Haswell NEC Lavie

Try this, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo apt-get install xbacklight

Then you can set the backlights brightness percentage from terminal

xbacklight -set 10

Also you may want to take a look at dconf-editor.  If its not installed, just do:

sudo apt-get install dconf-tools

Once installed, from the left pane, navigate to org --> gnome --> settings-daemon --> plugins --> power.  See image below:


Plasma5: Access Denied, Cannot Write On /home/

Owner of files and folders in ~/.config should be user, not root.

To fix, run this:

sudo chown -R $USER: ~/.config


Open LibreOffice Writer then go to Tools>Options>Application Colors.
Make sure everything is set to automatic.

If this doesn't work then try reinstalling it.

sudo apt-get purge libreoffice
sudo apt-get install libreoffice


Mirror subset of repository for amd64 Xenial 16.04 only *without* Ubuntu host

I realized it might make more sense to go with an additive approach rather than a subtractive one; that is, get a list of all the files/packages I need and then download only those ones (instead of trying to filter all of the ones I don't want).

The package listings are stored in Packages.gz, so I wrote a script to download all of the compressed package listings I want, extract the package names from the listings, compose this list into an lftp script, and then launch lftp.

I think that would be enough at a bare minimum, but I also sync up a few other folders with some metadata which seems important.

#!/bin/sh
remote="http://mirror.math.princeton.edu"
dists=( xenial xenial-security xenial-updates)
repos=( main restricted universe multiverse)
package_lists=()

printf "open %s \ncd /pub/ubuntu/\n" "$remote" > sync-mirror.lftp

echo "mirror -n -v -O ubuntu/indices -f indices/md5sums.gz" >> sync-mirror.lftp

for dist in "${dists[@]}"; do
    for repo in "${repos[@]}"; do
        pkg_lists+=("$remote/pub/ubuntu/dists/$dist/$repo")
        echo "mirror -n -v --parallel=10 -O ubuntu/indices -f indices/override.$dist.$repo" >> sync-mirror.lftp
        echo "mirror -n -v --parallel=10 -O ubuntu/dists/$dist/$repo -F dists/$dist/$repo/binary-amd64" >> sync-mirror.lftp
        echo "mirror -n -v --parallel=10 -O ubuntu/dists/$dist/$repo -F dists/$dist/$repo/dep11" >> sync-mirror.lftp
        echo "mirror -n -v --parallel=10 -O ubuntu/dists/$dist/$repo -F dists/$dist/$repo/i18n" >> sync-mirror.lftp
    done
done

for pkg_list in "${pkg_lists[@]}"; do
    curl "$pkg_list/binary-amd64/Packages.gz" | \
        gunzip | \
        grep Filename | \
        sed 's|Filename: \(.*\)|mirror -n -v --parallel=10 -O ubuntu/\1 -f \1 |g' >> sync-mirror.lftp

done

printf "\n exit\n" >> sync-mirror.lftp

 lftp -f sync-mirror.lftp

I would like to just feed mirror a list of files and tell it to download in parallel, but I have not found a way to do that. I think the current method is taking longer than it should because of all of the individual calls to mirror. Also, I'm not sure the --parallel flag is doing anything in conjunction with -f since it is only getting a single file.

Running the script over the weekend and will test when I get back. Will update answer with results.


If you don't like it you can just uninstall it from the Windows Control Panel like so: https://wiki.ubuntu.com/WubiGuide#Uninstallation

If you do like it, you can migrate it to its own partition or remove Windows entirely by following this guide: https://help.ubuntu.com/community/MigrateWubi


I'm new to Linux, Ubuntu, how do add family members to login?

Welcome to Ask Ubuntu! Typically, we ask that you refrain from asking multiple questions within one. I would suggest that in the future you keep your questions to a single question per post. Thanks!

As for adding other user accounts, it's fairly simple. Go up to the Unity Dash and search for User Accounts:

then click the Unlock button (with the little padlock in the upper-right-hand-corner) and then the + button:

and fill in the details:

You've just created a new user! You can repeat this as many times as you want, just so long as the usernames are different.

As for creating the folder, you can do this two ways.

First Method - GUI Method:

Open up Nautilus (the file manager, first icon underneath the main Unity button)
Navigate to the folder you want, then right click and select the first option New Folder:

Second Method: Terminal:

Open a Terminal (Press Ctrl+Alt+T)
Navigate to the directory (folder) where you want to create the new directory. You can do this cd.
Type in mkdir NEWFOLDERNAMEHERE, obviously switching out the NEWFOLDERNAMEHERE with the folder name you want.


What are the possible ways to access my account from guest session?

You can not fix your user account from the guest account for a variety of reasons.

The guest account does not have sufficient privileges (no root access).
Even if you gave the account root access it is confined by apparmor.

You need to boot to recovery mode and identify the problem.

From https://help.ubuntu.com/stable/ubuntu-help/shell-guest-session.html

  The Ubuntu Guest Session feature provides a convenient way, with a
  high level of security, to lend your computer to someone else.

  ...

  A guest cannot view the home folders of other users, and by default
  any saved data or changed settings will be removed/reset at logout. It
  means that each session starts with a fresh environment, unaffected by
  what previous guests did.

I can not find the details of the guest apparmor profile on the Ubuntu wiki at the moment, but the guest session is too limited to help resolve your problem, whatever it may be.

I suggest you start a new question describing the problem.


You can download Wubi from here.
Also have a look at installation instructions.


Overheats to 99 C and shuts down during the update

I REALLY suggest you do a very thorough clean of the inside of the laptop and add a cooling system to it. It might as well be that lm-sensors is detecting that and Ubuntu just to make sure the whole place does not get on fire it shuts the laptop off. Would be good if you could add if the laptops air ventilations are clean, how old is the laptop, what other OS systems you have tested there and what video card you have (model of laptop also). But in general a temperature that high just means the laptop is calling for help to get clean.


If you'd rather not use the built-in PDF Viewer, you can use another PDF viewer like Evince or another default viewer on Ubuntu.

To switch from the built-in PDF viewer to another PDF viewer:

At the top of the Firefox window, click on the Edit menu and select Preferences
Select the Applications panel.
Find Portable Document Format (PDF) in the list and click on it to select it.
Click on the drop-down arrow in the Action column for the above entry and select the PDF viewer you wish to use.
Click Close to close the Preferences window

(Source https://support.mozilla.org/en-US/kb/disable-built-pdf-viewer-and-use-another-viewer)


Setting up a bluetooth audio-microphone headset on ubuntu 12.04

Download "Bluetooth manager" from software center.

Open it.

Search for devices.

Right click on the device and choose "Audio sink" option. You are all done.  :D


Unable to Add or Remove applications in Ubuntu Software Center

Try rebooting and then

sudo dpkg --configure -a

There might be another process in the background preventing Ubuntu Software Center from installing what you want.


How I can acess GRUB menu of ubuntu 10.04?

Boot to an Ubuntu live cd and use boot-repair to unhide the GRUB menu.

In a terminal, type:

sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update && sudo apt-get install boot-repair && gksudo boot-repair

Once boot-repair opens, click Advanced Options. Make sure that "Unhide Boot Menu" is checked and run the repairs, following any instructions you are given.

You have to do this from a live USB because you lost your password.


How to detect the number of opened terminals by the user

If you really need to get the number of terminal you have open, go for counting the files owned by you under /dev/pts (although this might include ones opened by background processes, not by graphical terminal emulators). Alternatively, count the number of child processes of your terminal emulator(s), as shown by Jacob in the first line of his response.

Avoid relying on who's output, and looking for gnome-pty-helper processes, since these don't work in newer gnome-terminal versions.

Note that nowadays pretty much all graphical terminal emulators (including putty) and multiplexers (screen, tmux) support 256 colors. You can get really nice colored prompts if you use this palette.

My recommendation for a very simple solution is to base the color on the current tty line's number. E.g. process the output of the tty command to take the number only and derive the color from that. A certain tty line number is only given to one terminal at a time, you'd have to close that terminal first before the same line number is reissued by the kernel. This, combined with 256 colors, automatically guarantees that you won't see the same color twice at a given time (and even with 16 colors it'd give a quite even distribution). No need for maintaining a global counter, and no need for counting terminals or processes.


Wifi displays but won't connect on Lubuntu 16.04 i686/i386

The Additional Drivers tool will happily offer to install the wrong driver! Please get a temporary internet connection by ethernet, tethered or whatever means possible. Let's remove the incorrect driver:

sudo apt-get purge bcmwl-kernel-source

And next, let's install the firmware required to get the correct drivers b43 and bcma, working:

sudo apt-get install firmware-b43-installer

Reboot and your wireless should be working correctly.

PS- @Pilot6 is too fast!!!

First, check the settings in the router. WPA2-AES is preferred; not any WPA and WPA2 mixed mode and certainly not TKIP. Second, if your router is capable of N speeds, you may have better connectivity with a channel width of 20 MHz in the 2.4 GHz band instead of automatic 20/40 MHz, although it is likely to affect N speeds. I also have better luck with a fixed channel, either 1, 6 or 11, rather than automatic channel selection. Also, be certain the router is not set to use N speeds only; auto B, G and N is preferred. After making these changes, reboot the router.

Next, I recommend that your regulatory domain be set explicitly. Check yours:

sudo iw reg get

If you get 00, that is a one-size-maybe-fits-all setting. Find yours here: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 Then set it temporarily:

sudo iw reg set IS

Of course, substitute your country code if not Iceland. Set it permanently:

gksudo gedit /etc/default/crda

Use nano or kate or leafpad if you don't have the text editor gedit.

Change the last line to read:

REGDOMAIN=IS

Proofread carefully, save and close the text editor.

Next, I'd set IPv6 to Ignore in Network Manager: http://docs.fedoraproject.org/en-US/Fedora/18/html/Installation_Guide/images/netconfig/network-connections-ipv6-ignore.png  This example is for ethernet, but you want wireless.


drm/i915 GPU Hang in Artful Advark 17.10

I got similar trouble for 3 months ! (I need to use my win***z to check HW failure. No problem with my M$  spare wheel

But after many, many search on the web

I find it's two accel mode (at least) for this graphic card
sna or uxa
So, first of all, I need to (re)install the intel  driver

sudo apt install xserver-xorg-video-intel

and create/modify the

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

with these options

Section "Device"
    Identifier  "Intel Graphics"
    Driver      "intel"
    Option      "AccelMethod"  "uxa"
    #Option      "AccelMethod"  "sna"
  EndSection

You can find more info about intel graphics card options at
wiki gentoo

You need to reboot and try

Mike_X


How to remap key in Ubuntu 17.10 Wayland? (Up key to Shift)

After around 2 days of googling an answer to the question
"how to remap keys on wayland" I have managed to find a very, very simple
way. I dont know if its the right way but it actually works.

The only thing that I had to do is open the file

/usr/share/X11/xkb/keycodes/evdev

That file lists all the keycodes for all the keys in the form < code > = number

You can simply swap the keycodes around. What I actually swapped around is the numbers NOT the code. I changed backslash which on dvorak is next to Enter with Ctrl for Emacs.

edit: to find out which "code" represents each key as in < code > = number you can run the xev command from the terminal to get the keycode printed in the terminal after pressing the button (search for that keycode in the evdev file to get the evdev scancode for the key), or you can visit

/usr/share/X11/xkb/symbols/

This is a directory which has one file for each language installed on the computer and modifier keys. Select the language your pc runs on.

In that file there will be all variants supported listed, such as dvorak, programmers dvorak, colemans etc etc.

There you can see the < code > names


PPA installed driver 396.24 is causing CUDA 9.2 installation error

I ran into the same problem, and fixed it by doing this:

Fix the broken package

sudo dpkg -i --force-overwrite /var/cuda-repo-9-2-local/./nvidia-396_396.26-0ubuntu1_amd64.deb

Reinstall the whole thing while passing the --force-overwrite option to the underlying Dpkg when running the install command (based on this answer)

sudo apt-get -o Dpkg::Options::="--force-overwrite" install cuda


Downgrading from ubuntu 11.10 to 10.10, keeping installed programs

I share your difficulty and i'm thinking of this too.

Downgrade is not officially supported but this guy on youtube shows a successful downgrade.

http://www.youtube.com/watch?v=QGnsYuWS0xY

You might want to try this.


How do I install Guest Additions in a VirtualBox VM?

If you have trouble installing Ubuntu in a VirtualBox VM, because the installer window does not fit the low resolution screen size, you can move the window with Alt+F7.

Installing Guest additions from the repositories

In case we have installed the OSE edition of Virtual Box from the repositories we can add the guest additions from the repositories in the guest. This will install guest additions matching the Virtual Box version as obtained from the repositories. It is not recommended to install these in newer releases of Virtual Box as obtained from the Oracle repository (see below).

Alternatively we can install the package virtualbox-guest-additions-iso in the host Ubuntu.

sudo apt-get install virtualbox-guest-additions-iso

The .iso file with an image of the OSE edition of the guest additions CD will install in the host directory /usr/share/virtualbox/VBoxGuestAdditions.iso. Mount this .iso file as a CD in your virtual machine's settings. In the guest you will then have access to a CD-ROM with the installer.

Installing Guest Additions from Virtual Box Manager

In case the Guest Additions fail to build we may have to install the Linux kernel headers (see How do I install kernel header files?) or build-essential  tools in addition. It is also recommended to have dkms  installed (see below - Note 4). You can run this command in a terminal to install both:

sudo apt install build-essential dkms

Selecting Devices -> Install Guest Additions (or press Host+D from the Virtual Box Manager) the Guest Additions CD .iso will be loaded but not installed in your guest OS. To install we need to run the installer script VBoxLinuxAdditions.run as root or from the Autorun Prompt (see below).

GNOME Shell

To install the Guest Additions we will have a CD icon on our desktop as soon as the virtual drive is mounted:

Next step is to run the autorun.sh script (as root) on this mounted CD by opening the drive and clicking on the "Run Software" button. This will build and install the vbox kernel modules needed.

Unity

The guest additions is mounted as a virtual CD visible on the launcher:

In case the system is set up to autorun a CD it should just open the following autorun dialogue (if not select the CD symbol, choose open, then choose Open Autorun Prompt)

After having entered your credentials for root access the guest additions will build as seen from the terminal output:

Press Return to close the terminal.

  Note 1
  Guest Additions need a reboot of your guest OS to take effect.

  Note 2
  In some systems the Virtual Box Guest Additions CD icon may not be shown on the desktop, but will be accessible from the Places menu. If the CD still was not there you may have to manually add the VBoxGuestAdditions.iso as a CD-ROM in the Virtual Box Manager Storage menu.  In an Ubuntu host the disk image is in /usr/share/virtualbox/VBoxGuestAdditions.iso.

  Note 3
  In some systems (e.g. when running Xubuntu guests) we may not have an Autorun Prompt for the mounted CD. Then we can install the guest additions by opening a terminal on the mounted guest additions .iso to run sudo ./VBoxLinuxAdditions.run. In Lubuntu or Ubuntu Server guests we additionally need to install the GNU C compiler (gcc ) and the make  utility in the guest system to be able to compile the guest additions.

  Note 4
  Running DKMS in the guest OS will keep Guest Additions installed after a guest kernel update. It is not a prerequisite for Guest Additions but if used it should be installed before we install the Guest Additions.

Installing Guest Additions from a Terminal

In case Guest Additions are not installed properly we may not be able to boot to the GUI. In this case we need to boot holding the Shift key to access the Grub menu where we access a root shell as depicted in the following question (we do need to mount the filesystem read/write to proceed):

How do I boot into a root shell?

The Guest Additions .iso file needs to be installed on /dev/cdrom from the Virtual Box Manager (see above). We then may install Guest Additions by typing the following commands:

mount /dev/cdrom /mnt              # or any other mountpoint
cd /mnt
./VBoxLinuxAdditions.run
reboot

Remove Guest Additions

In case something went wrong with installing the guest additions, or the guest OS can not boot after installing we may have to remove the additions. This can also be done from a root shell by running an uninstallation script located in the guest /opt directory.

cd /opt/<VirtualBoxAdditions-x.x.xx>/
sudo ./uninstall.sh

Replace x.x.xx with your current version of guest additions.


I seem to have resolved the issue, but tried a bunch of things and not 100% on what it was, but:

I uninstalled default-jdk, then installed OpenJDK10 as per:
openjdk-10-and-openjfx-installation-guide

That did not fix right away, but then I ran

sudo update-alternatives --config java (Select #3, which is "/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java")

I must have installed OpenJDK 8 at some stage, but don't remember this.

Anyway, it is launching now which is excellent :)

Cheers

Adam


No WiFi on a system76 laptop after upgrade to 15.04

Found an answer:

sudo mv /lib/firmware/iwlwifi-3160-12.ucode /lib/firmware/backup-iwlwifi-3160-12.ucode
sudo mv /lib/firmware/iwlwifi-3160-10.ucode /lib/firmware/backup-iwlwifi-3160-10.ucode

Reboot. Seems to be an issue with the firmware. After reboot I was able to connect again, so for me it is working.


I would use cut in combination of tr:

last -1 -R -s yesterday -t today | grep -vi reboot |  tr -s ' ' | cut -f 3-6 -d ' ' -s

Sat Jun 29 15:59
Fri Jun 29 06:45:15
...

tr -s ' ' to squeeze repeats, so we can easily cut by space as a separator.
grep to exclude any reboot line.
cut well to cut things :)


Trying to mount WD Passport, problems with permissions

I'm a bit late to the show, but I recently managed to convince Steam to install games on an SD card on crouton ubuntu 16.04, and it was a tricky process. Steam, by default, doesn't allow itself to be run as root (you can't just punch in sudo steam in the command line, or it will tell you the same thing I just did), so you need to give each drive you use with steam permission to be run by it. How you do that is relatively simple in practice but hard to figure out for a novice. The goal of this will be to explain the process in a way that a novice like myself would understand.

Firstly, run gparted (sudo apt-get install gparted) if you don't have it already) and format whatever drive you want to use to ext4. This will make it unable to be used by windows/mac computers, sadly, but I tried it with fat32 and it didn't work. You're welcome to try others, but in my case ext4 is fine since the SD card is for use with my chromebook alone.

Then, run sudo gnome-disks in the command line. It's the standard disk utility, but you HAVE to run it as su for this next step. Once open, select the device you want to install to and unmount it. then click additional partition options (the button showing gears) and edit the mounting options like so: uncheck auto-mount, check mount at startup, check show in user interface. The fourth line beneath these are a shortcut to editing your fstab file; it's handy because it shows you the proper format right there instead of having to hunt for it online. Add ",exec" between some of the options that are already listed (nosuid,nodev,nofail,exec). Save your work, make a note of the mount point, re-mount the drive and close out of gnome disks.

Now your drive is mounting with exec permissions whenever you start up your device, but you're not done yet. Now you need to assign the folders with the correct permissions. A lot of guides online will tell you to run chmod 777 -R path/to/folder, but in my experience this doesn't work. Instead, we'll do it the GUI way. run gksu nautilus which will open the default file explorer with superuser permissions. Navigate to the drive's mount point (which was listed in gnome-disks under edit mounting) and right click the folder for your drive's ext4 partition. Click properties -> permissions. From here you can set things to what they specifically need to be, or you can just set permissions to open by giving everyone everywhere read, write and execute permissions. Close out of nautilus, and now it's finally time to open up Steam.

Now you should be able to tell Steam to create a folder in your drive by navigating to the mount point in Steam's file browser. It's embarassing how long it took me to figure this out and I'm sure there's a cleaner way to go about it, but this is the method that finally worked for me so I'm not going to try and clean it up.

Edit: if you're using crouton, you'll need to manually mount the disk each time prior to starting Steam. Alternatively, start steam, then mount it, then manually select the library folder.


For Ubuntu 17.10 and above:

python3-opencv package is available in Official Ubuntu Repositories.

So you can install this package with this command easily (without any need to pip or any other ways):

sudo apt install python3-opencv

Additional information :

As this package is available in universe repositories of Ubuntu, so this repositories should be active on your machine (That's active by default) :

sudo add-apt-repository universe
sudo apt update


Login loop with Nvidia drivers (another one)

Have you tried this (I'm assuming you can get a terminal on the broken PC):

Go to the NVIDIA website and download the latest driver for your card. The Linux driver should be a ".run" file.

Put the driver on a USB stick and pop it in the broken PC.

Use this command to force it to boot into text mode:

sudo systemctl set-default mutli-user.target

And this one to reboot:

sudo shutdown -r 0

Next time the terminal comes up, log in, copy the Nvidia driver to the PC using:

cp <source> <destination>

Make sure the Nvidia file is executable by doing:

sudo chmod +x <driver name>

Run the installer by adding "./" to the start of it:

./<driver name>

When it's finished you want to tell the PC to boot back into graphical mode by doing:

sudo systemctl set-default graphical.target

And reboot to the desktop:

sudo shutdown -r 0

Hope this helps.


Is it possible to install Ubuntu directly from and to the HDD?

You can install from a hard drive, as long as it's not the hard drive you're installing Ubuntu in (you need a spare/external one).

The answers to this questions explain how.

You can also use a flashdrive.


Way to measure computer usage via screensaver active/not active time?

I would like to thanks and contribute back a simple, raw script (can be improved), put it on startup applications with:

xterm -e logSessionLock.sh

it is system crash/blackout prepared too.
It is not heavly tested... but is working great til now.
it will create 2 files, one at $HOME (the log) another at /tmp (the sys crash workaround)

logSessionLock.sh

#!/bin/bash

logFile="."`basename $0`".log"

function FUNClog {
  strTime=`gnome-screensaver-command --time`
  strDate=`date +"%Y%m%d-%H%M%S"`
  strLog="$strDate ($1) $strTime"
}

function FUNCwriteLog {
  echo $strLog >>$HOME/$logFile
  echo $strLog
}

active=false
firstTime=true

# restores last log entry in case of a system crash
strLog=`cat "/tmp/$logFile.tmp"`
FUNCwriteLog
echo "" >"/tmp/$logFile.tmp"
if [[ -n "$strLog" ]]; then #if has something, it was active when the system crashed
  active=true
fi

while true; do
  if gnome-screensaver-command --query |grep -q "The screensaver is active"; then
    if ! $active; then
      # restore the saved tmp log
      strLog=`cat "/tmp/$logFile.tmp"`
      FUNCwriteLog

      # update log (can be off when this line is reached? once it seem to happen...)
      FUNClog BEGIN
      FUNCwriteLog #logs the begin time

      active=true
    else
      FUNClog ON #stores the ammount of time the screensaver has been ON
      echo $strLog >"/tmp/$logFile.tmp"
    fi
  else
    if $active; then
      FUNCwriteLog #saves the ammount of time the screensaver has been ON

      FUNClog OFF
      FUNCwriteLog
      echo "" >"/tmp/$logFile.tmp"

      active=false
    fi
  fi

  sleep 1
done

the log is like this:

 20120214-191528 (BEGIN) The screensaver has been active for 0 seconds.
 20120214-193602 (ON) The screensaver has been active for 1234 seconds.
 20120214-193603 (OFF) The screensaver is not currently active.


Samba - On share is accessible, the other with same settings is not

I found the issue. I had no SMB User created for the user Veronika.
So had to do following:

sudo smbpasswd -a veronika

sudo systemctl restart smbd.service

Hope helps somebody else.


Is it possible to pin programs to specific workspaces, without CCSM?

Yes you can use Devilspie to do that. There is a GUI for this app too. Follow these steps:

1) Install: sudo apt-get install devilspie gdevilspie

2) Open gdevilspie.

3) Start the daemon:

4) Select the matching window:

5) Choose the workspace:

Enjoy ;-)


How to change my default terminal to GNOME Terminal rather than Terminator?

There are two ways to achieve this.

Updating the alternatives: For this run

sudo update-alternatives --config x-terminal-emulator

and select the number corresponding to /usr/bin/gnome-terminal.wrapper. This will set GNOME terminal as the default entry under x-terminal-emulator. But this might change if some other new terminal is installed in future since that installation may edit default value for x-terminal-emulator.

Setting GNOME terminal as default: For this you can run

gsettings set org.gnome.desktop.default-applications.terminal exec 'gnome-terminal'


black screen & restarts after upgrade to 14.10

I finally did it.
The magical key that was necessary to boot from a usb stick was the right arrow key. I don't know why, but only by pressing that key the usb stick finally booted.

Somehow my partition table was changed to uefi mode. My laptop tried booting in uefi mode but I don't have that so that's why it restarted over and over.

I changed my partition table back to "msdos" and reinstalled Ubuntu (actually Mint). Now it works again. In grub I still have some efi.signed entries and when I choose these I get a kernel panic and nothing happens. I have to navigate to "previous linux installs" in grub and choose the not efi signed entry and then everything starts up.


No a direct solution but you can smooth things a little by adding options to your resolv.conf for instance :

nameserver DNS1
nameserver DNS2

options rotate
options timeout:2
options attempts:1

the default for timeout is 5 seconds, and default value for attempts is 2.


Dual booting would not make your computer slower theoritically.

A computer gets slow if too many processes run at the same time. It has mostly nothing to do with hard disk data.


How Do I Export Pages from Browser with Embedded Hyperlinks?

The tool to use is called wkhtmltopdf, this tool is in the repositories but all compiled repository versions don't have the embeded link functionality due to the hackish changes to some qt libraries.

So install wkhtmltopdf from the repositories to get all the dependencies:

sudo apt-get install wkhtmltopdf

Then download the static version from here. Unpack the file to your desktop and then move to bin:

sudo mv Desktop/wkhtmltopdf-i386 /usr/bin/wkhtmltopdf-static

Now you can use the tool to generate pdf files with links:

wkhtmltopdf-static http://google.com google.pdf

For your websites with the login requirement, you need to log in via firefox and then export the cookie file using the Export Cookies firefox plugin. With a cookies.txt you can then run:

wkhtmltopdf-static --cookie-jar cookies.txt http://google.com google.pdf

I know a lot of these needs to be done on the command line, but it's the best way to do it and you get a lot more control. wkhtmltopdf is quite a powerful tool.


Why does my Ubuntu 20.04's top bar's icon becomes small every time when I boot the PC?

There is a bug in mutter that might be your problem.
https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/1892440
https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/1892521
I seen two work arounds in these threads that you can try. Or wait for bug fix.
Downgrade libmutter:
https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/1892440/comments/17
Create script and run each starup:
For this one, please notice you rather like scale up and not down.
https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/1892521/comments/27


How can I fix this error: E: Failed to fetch?

404 indicates the page or resource is not available. You are probably pointing to a wrong ppa or the ppa has been removed. It is best that you remove the ppa from the sources.

Then run "sudo apt-get update".


How do i upgrade ubuntu from 12.04 to 13.10 ?

While backing up your files may not be necessary to upgrade your operating system, it is always recommended, as things can and do go wrong during upgrades. Instructions for upgrading your installation can be found on the official Ubuntu help site here https://help.ubuntu.com/community/UpgradeNotes
You should not skip upgrades (i.e. going directly from 12.04 to 13.10) unless you plan on simply backing up your data and doing a fresh install of Ubuntu 13.10. To avoid having to do a fresh install, you should upgrade to each "in between" version of Ubuntu (i.e. 12.04 to 12.10 to 13.04 to 13.10) but still, it is strongly recommended that you back up your data before proceeding with any upgrades.


One way I usually test this is by using the liveCD iso image. I often take the .iso image and write it to a USB stick using the USB creator that Ubuntu has.

Unfortunately, that does mean you have to download more things, as you end up downloading each version twice:once as a liveCD and once as Packages.

Even if the Live(USB or CD) does work, there could be a small chance the upgrade doesn't do as well as you had hoped. It never hurts to have a backup. I usually use rsync like this (after plugging in an external drive, but in this case even another partition would work):

rsync -avx --exclude '.gvfs' / /media/<drive>/<folder_you_want_backup_in>/


Startup Application to increase mouse speed does not work (18.04.1)

I was able to solve the problem by creating a 50-mouse-speed.conf file in /usr/share/X11/xorg.conf.d with the following content:

Section "InputClass"
    Identifier  "Increase Logitech speed"
    MatchProduct    "Logitech USB-PS/2 Optical Mouse"
    Option      "TransformationMatrix"  "2.00 0.00 0.00 0.00 2.00 0.00 0.00 0.00 2.00"
    Option      "AccelerationProfile"   "-1"
    Option      "AccelerationScheme"    "none"
EndSection


It seems this is related to Mendeley won't start Ubuntu 16.04.2. For me, on Debian Stretch, this works:

sudo apt-get install libssl1.0-dev


HDD pooling/partitioning suggestions for media server

If you have 8GB mem and run a 64-bit system, have a look at zfs: zfs on linux FAQ, nice presentation.


How do you find out when a specific kernel version was last booted?

Use the stat command:

   %x     time of last access, human-readable
   %X     time of last access, seconds since Epoch

So:

stat -c %X /some/file

Or with find:

find /some/path -printf "%A@ %p\n"

Since for find's -printf:

  %a     File's  last  access time in the format returned by the C
         `ctime' function.

  %Ak    File's last access time in the  format  specified  by  k,
         which  is  either `@' or a directive for the C `strftime'
         function.  The possible values for k  are  listed  below;
         some  of  them might not be available on all systems, due
         to differences in `strftime' between systems.

         @      seconds  since  Jan.  1,  1970,  00:00  GMT,  with
                fractional part.


Is it possible to add apps to the notification bar?

The answer is -- you can't, at least not just any application and not easily. There are specific applications designed to run on the notification bar that are not installed by default, like "indicator-cpufreq"; usually, their name starts with "indicator-something", so you can search for them.


How do I display an image in SSH terminal?

If you're running X windows on your local system, the -X or -Y options to ssh will let the remote system display images on your local X display. See man ssh or https://manpages.ubuntu.com/manpages/bionic/en/man1/ssh.1.html


HELP! I'm locked out of all Ubuntu accounts

If you hold [shift] during boot you will get a textmode menu.
Choose  (recovery mode)

After boot you will be greeted by a colorful texmode screen
choose root

Make the system read/write

mount -o rw,remount /

add a new user to your system:

adduser emergency

give this sudo permission:

addgroup emergency sudo

just reboot with reboot and login with your freshly made account.
If this all works out OK you can start repairing the things that went wrong.

Good Luck :-)


Unable to re install mysql on Ubuntu 14.04: Dependency problems

I have faced a very similar issue. The way I solved it is to purge the MySQL packages in APT, then install anew.

sudo apt-get purge mysql-server-5.5 mysql-common
sudo apt-get install mysql-server

Packages like mysql-common and mysql-client get installed as dependencies.

The purge seems to work in my case, as I was testing several install configurations (threaded, pre-fork, etc), and some configuration files were just stale, lingering around. The purge cleans up everything and resets the configuration.

Note that I found the list of packages to purge using dpkg -l | grep mysql, where rc and ii packages probably have to get purged (it worked for my case).


Python broke somehow "Could not find platform independent libraries "

Ok, so the problem is resolved (for the most part).

I checked my $PATH, and found that I had appended the path /home/d3ath/Enthought/Canopy_64bit/User/bin to the start. Naturally it execute the python found in there first rather than the one in /usr/bin/ as it should. If anything the moral of the story is be careful what you do to your path.

I say "for the most part" because I don't know if whatever caused the python to fail the first time will be an import package I need to execute some of my py-code. I will have to find out and correct as I go.


Unable to install wine on Ubuntu 16.04 lts

Your local package list is obviously outdated because there are issues with the package sources configuration: Canonical's repositories and their mirrors don't provide armhf packages. Since you don't need to enable the armhf architecture on your system on top of amd64 and i386 you can disable it:

sudo dpkg --remove-architecture armhf

Now update the package list and resume the installation:

sudo apt update
sudo apt install -f


Use the acpi_backlight kernel parameter;

 sudo perl -pi -e 's/(GRUB_CMDLINE_LINUX_DEFAULT="[^"]*)(")/$1 acpi_backlight=vendor$2/g' /etc/default/grub


How to delete Apps and Files & Folder (lenses) icons from Launcher?

Run the command gksu gedit /usr/share/unity/places/applications.place and add ShowEntry=false line below Shortcut=a and below ShowGlobal=false for removing the application lens.

Run the command gksu gedit /usr/share/unity/places/files.place and add ShowEntry=false line below Shortcut=f for removing the fie lens.

Source.


How can I disable ATI discrete graphic GPU at startup in Ubuntu 14.04 without BIOS?

In this version of Ubuntu, Dynamic Radeon Drivers are included and activated so that the old solution that you mention does not work.

To operate the old solution you can edit the file /etc/default/grub.

In this file you can add the option radeon.runpm=0 in the call to the current kernel (usually after ro quiet splash).

Alternatively, you can also add radeon.runpm=0 to the value of the variable GRUB_CMDLINE_LINUX_DEFAULT, then save and run sudo update-grub.


KDE application launcher shortcuts

The KDE shortcuts can be added from the KDE menu editor - online: https://docs.kde.org/trunk5/en/kde-workspace/kmenuedit/index.html

  KMenuEdit allows editing the menu of KDE application launchers.

  KMenuEdit can be started either by right mouse button clicking the
  application launcher button on the panel and choosing Edit
  Applications..., or by typing kmenuedit in the KRunner line.

To add Dolphin launch shortcut key: KDE Menueditor > System > Dolphin > Advanced tab > Current shortcut key


I remember I had this problem a long time ago, but now I forgot solution :) Steam for Ubuntu is 32-bit, maybe you need lib32.

Try this:

sudo apt-get update
sudo apt-get install lib32stdc++6

and install Steam from the terminal, not from the Ubuntu Software Center maybe.


Ubuntu Phone to be instal on a samsung device

The list of currently supported devices along with links to the install procedure can be found here...
https://wiki.ubuntu.com/Touch/Devices

Unfortunately the Samasung Galaxy S Advance isn't supported at the moment although this may change in the future.


How to uninstall Intel Linux Graphics Installer and revert to default drivers

sudo apt-get autoremove --purge intel-linux-graphics-installer

A solution from http://www.liberiangeek.net/2013/04/how-to-add-intel-linux-graphics-driver-repository-in-ubuntu/


How do install graphics drivers for radeon HD 6380g on a HP pavilion g6?

You can install the graphics drivers for AMD graphics card by using the command (sudo) apt-get install fglrx. After the installation process completes, to be safe run (sudo) aticonfig --initial. Then reboot and it should work.


Altough I installed GSL library, g++ cannot compile my code

There are a number of libgsl packages, as shown by an apt-cache search:

$ apt-cache search libgsl
libgsl0-dbg - GNU Scientific Library (GSL) -- debug symbols package
libgsl0-dev - GNU Scientific Library (GSL) -- development package
libgsl0ldbl - GNU Scientific Library (GSL) -- library package
libocamlgsl-ocaml - GNU scientific library for OCaml
libocamlgsl-ocaml-dev - GNU scientific library for OCaml

In more detail, apt-cache show libgsl0ldbl includes the description

 This package provides the shared libraries required to run programs
 compiled with GNU GSL. To compile your own programs you also need to
 install libgsl0-dev.

whereas apt-cache show libgsl0-dev has

 This package contains the header files, static libraries and symbolic
 links that developers using GNU GSL will need.

so in this case you need to install libgsl0-dev

sudo apt-get install libgsl0-dev

This is quite a common distinction in the Ubuntu/Debian packaging system: there is usually a "runtime" package, and a "development" package that is indicated by a -dev suffix. The -dev package is the one to look for when building software from source - it will install the runtime package as a dependency if it is required.


How to add support for touchpad elan 0628 in current 19.04 ubuntu

what you're looking for is ukuu

install :

sudo add-apt-repository ppa:teejee2008/ppa
sudo apt update && sudo apt install ukuu -y && sudo ukuu

usage :

as per : How to update kernel to the latest mainline version without any Distro-upgrade?


How to enable hardware video acceleration with an Intel graphics chipset on Ubuntu 17.10?

This issue had nothing to do with hardware video acceleration, but with a simple bug in the System Monitor Gnome Extension. Deactivating it makes everything smooth again.


sudo update-manager -d non-gui only alternative

do-release-upgrade is the command recommended for server updating, I expect it to work for you.


Installing Tomcat 5.5 from source for PHP Java Bridge

I have tried installing as well. It worked on Tomcat7. You can try that...


Merely pressing Super alone and releasing it will show all your Windows now. In addition, also the keyboard shortcuts Super+s and Alt+F1 will show the window overview.

Changing the shortcut combinations to show the window spread

If you wish, you can set it to Super+w by changing the assignment of "Show the overview" in Settings - Keyboard. That, however, will replace the second shortcut Alt+F1 and leave the Super+s shortcut in place. If you want full control on what key combination or combinations are assigned to that function, you can change the dconf setting org.gnome.desktop.wm.keybindings. For example, to set both Super+w and Alt+F1, you could change the key using dconf-config-editor or with a terminal command:

gsettings set org.gnome.desktop.wm.keybindings panel-main-menu ['<Super>w','<Alt>F1']

To reset to default:

gsettings reset org.gnome.desktop.wm.keybindings

As to why the change?
Ubuntu used to have its own in-house developed desktop, Unity. With version 17.10, they moved to the Gnome Shell desktop, where Super alone, Super+s and Alt+F1. So with respect to these hotkeys, they decided to adhere to the conventions used in Gnome Shell rather than trying to continue their previous choices in the Unity desktop.


Is it possible to delete the main device from Firefox Sync after reinstalling the OS?

I don't see exactly what is your plroblem but may be you can find a solution here : https://account.services.mozilla.com/


Dual booting windows/ubuntu not showing windows

It looks like you did, indeed, format your hard drive and install Ubuntu over everything. You're going to have to reinstall Windows, but it's going to be tricky. Use Gparted in Ubuntu to make a new NTFS partition. Install Windows to this partition. Once that's done, Ubuntu won't be able to boot, so you'll need to use the boot-repair program to fix that. Once you get back into Ubuntu, run sudo update-grub and Windows should appear in GRUB.


You can download the newest versions of the kernel ready form Ubuntu at https://kernel.ubuntu.com/~kernel-ppa/mainline/

And then use

  sudo dpkg --install *.deb

to install it


I know this may sound strange, but is the live cd still in the computer? It could be possible your still booting into the demo of ubuntu.


How to make files and folder that belong to www-data, readable and writable by my user using sFTP

The best method (in my opinion) would be to use /etc/crontab to start a script or a service with a directorywatcher. The latter is very easy to make with the watchdog module in python.

In that script you would then first make a timestamped backup before moving files to the webservers directories. Both /etc/crontab  and a service would allow you to copy the files as the user www-data.

A directorywatcher would watch over the FTP directory you use to put files on the server (and that would be a dedicated directory not related to the webservers directories). That makes it a bit more secure too.


Icons not showing on sudo dolphin on 15.10

The root cause of the ops issue is a known bug in KDE affecting any application running under sudo.

The recommended work around is to

Open Konsole and enter the following commands to edit the sudoers file:

sudo visudo -f /etc/sudoers.d/workaround_kde5

In the appearing editor add the line:

Defaults env_keep += "KDE_SESSION_VERSION KDE_FULL_SESSION"

Save and exit the editor.

For reasons unknown to the commenter these variables are required for proper icon loading. sudo/su strips them by default this line tells it not to.


GRUB_DISTRIBUTOR parameter on /etc/default/grub

The relevant lines are in /boot/grub/grub.cfg between

### BEGIN /etc/grub.d/05_debian_theme ###

and

### END /etc/grub.d/05_debian_theme ###

Since /boot/grub/grub.cfg is generated by using the files in /etc/grub.d/ you should take a look at /etc/grub.d/05_debian_theme. The variable GRUB_DISTRIBUTOR is used in this file several times to determine Grub's appearance. It also depends on the existence of several files in your system (background images, themes).


How to command “hping3” display time and date of hping3

I've made it work.

hping3 is buffering the output. So in order to fix it I installed expect (sudo apt-get install expect) on Ubuntu 16.04 and then ran the following command:

$ unbuffer hping3 -S -p 80 google.com | while read pong; do echo "$(date): $pong"; done

Wed Nov  2 12:48:29 UTC 2016: HPING google.com (ens160 172.217.23.14):
S set, 40 headers + 0 data bytes

Wed Nov  2 12:48:29 UTC 2016: len=46 ip=172.217.23.14 ttl=58 id=35798
sport=80 flags=SA seq=0 win=42900 rtt=7.9 ms

Wed Nov  2 12:48:30 UTC 2016: len=46 ip=172.217.23.14 ttl=58 id=44519
sport=80 flags=SA seq=1 win=42900 rtt=7.9 ms

Wed Nov  2 12:48:31 UTC 2016: len=46 ip=172.217.23.14 ttl=58 id=43418
sport=80 flags=SA seq=2 win=42900 rtt=3.8 ms

Wed Nov  2 12:48:32 UTC 2016: len=46 ip=172.217.23.14 ttl=58 id=9116
sport=80 flags=SA seq=3 win=42900 rtt=7.7 ms


Prevent Ubuntu from opening a new Firefox window on every click

From what I know there must be something wrong going on because all applications by default in XFCE should actually be behaving like firefox. But anyhow you can change firefox's behaviour using dockbarx. Install it with the following:

sudo add-apt-repository ppa:xuzhen666/dockbarx
sudo apt-get update
sudo apt-get install dockbarx
sudo apt-get install xfce4-dockbarx-plugin

Now add the plugin to the panel and add firefox to it, it should now behave in the way you described.

Dockbarx is basically a way to turn the panel (or part of it) into a standard dock. There's also the standalone variant (which will also be installed via this procedure) but I recommend using the panel plugin to make it more seemless.


How to avoid shutdown on critical battery?

Please install dconf-editor (sudo apt-get install dconf-editor) and go to

org gnome settings-daemon plugins power

Click the shutdown that is highlighted and choose "nothing" from the options as seen in this screenshot:

Please do be careful. If the 2nd battery runs out of juice be sure to shutdown yourself.


In CLion v2016.1.1, when you ctrl+mouse-click on a function it will open a new tab in which you can find the function declaration (this works if function usage and declaration/definition are in differents file).

To come back you only have to close the tab.

Instead, if you want to come back to a previous view in the same file you can select from menu Navigate > Back.
There is also a shortcut ctrl+alt+← (left), but there is problem with it: it won't work because it is  caught by Unity when you want to change a workspace. If you want to use a shortcut you can change the keybinding in CLion preferences. To do so follow these steps:

Open keymap preference: from menu select Edit > Settings... > Keymap
Look for back in the search bar.
Watch at results and on Navigate entry right-click and choose Add Keyboard Shortcut
Fill the new window with your preferred shortcut and select OK

Now you should be able to use the shortcut to come back to a previous view.

I hope this could help you.


after update ubuntu 13.04 my pc doesn't show the dock bar won't show

Try this :

dconf reset -f /org/compiz/

then enter:

unity --reset-icons &disown


gparted does not recognise windows 10 partition

/dev/sda is your installation media. Your hard drive is something else, probably /dev/sdb


Using grep to show k10temp-pci-00c3 CPU temp

The following code prints the temp1 line only if it follows a line containing k10temp-pci-00c3:
$ sensors -f | awk '/k10temp-pci-00c3/{f=1} f && /temp1/{print; f=0}'
temp1:        +82.4°F  (high = +158.0°F)

If you also want the heading:
$ cat sensors-f | awk 'BEGIN{print"CPU Temperature"} /k10temp-pci-00c3/{f=1} f && /temp1/{print; f=0}'
CPU Temperature
temp1:        +82.4°F  (high = +158.0°F)

How it works

BEGIN{print"CPU Temperature"} prints the heading.

/k10temp-pci-00c3/{f=1} sets the awk variable f to 1 (true) when a line containing k10temp-pci-00c3 is found.

f && /temp1/{print; f=0} will print a line if f is true and the line contains temp1.  This also sets f back to zero (false).

Alternative: using sed
$ sensors -f | sed -n '/k10temp-pci-00c3/,/temp1/{/temp1/p}'
temp1:        +82.4°F  (high = +158.0°F)


unable to change password at next logon in ubuntu joined on Active directory using PBIS

I found a workaround.
(it works on Mint, so I suppose it works on Ubuntu too)

You have the issue with GUI, but if you switch to a console tty (example: ctrl-alt-F5) you don't.
at login you'll be asked to change password (and it works)
after that, you need to switch back to GUI (default should be ctrl-alt-f7)

On Mint, I found that with some themes of login manager it works with GUI too (i.e. the "ugly" simple/clean GTK)


First things first, I assume you are not using a MacBook but if you are, just use the correspondence of any key I will mention in the answer.

For your terminal, use the key combination Ctrl+Shift+T and for the files when you want to open a new folder on your current file window right-click on the folder and then select "Open in New Tab". Hope this solves your problem.


You may be able to get connectivity by running sudo dhclient eth0 with your network cable plugged in.


Problems with Xubuntu 16.04 and Intel/Nvidia graphic card

Does this happen at all when you disable the option to save your session upon Shutdown? Maybe play around with the hibernation/sleep options a little. It sounds like it might be linked to this particular problem.


Is remmina an startup application in 16.04

Neither Remmina, nor the Slack desktop, nor the System load indicator are startup applications by default. As far as I know, the Slack desktop is not even installed by default.


Problems after changing from PCManFM to Nautilus

I have fixed my problem, I just had to purge and reinstall LXDE and lubuntu-desktop.

Actual commands:

sudo apt-get purge lxde
sudo apt-get purge lubuntu-desktop
sudo apt-get install lubuntu-desktop
sudo apt-get install lxde* (I know what the * option means, I wanted that)

Thanks for the edits and comments @vasa1


Torrentflux stopped working after upgrade to 13.10

I managed to solve this with command in terminal:

sudo ln -s /usr/share/torrentflux/www/ /var/www/torrentflux

This links torrentflux php files to root folder of apache.


press  Alt   F2  open Remmina Remote DeskTop and click on +

fill entries here

Server = server:port

all options are easy to understand


How to install software raid 0 on ubuntu 12.04 server with mdadm?

You can setup RAID 0 array from this tutorial
how ever the chunk size while telling mdadm is not provided in the tutorial and will use from the default setting from your config file but you can do it yourself just by adding --chunk=128 on the command


GPG error: http://www.geekconnection.org karmic/ InRelease: Clearsigned file isn't valid, got 'NODATA' (does the network require authentication?)

If you visit their site here you will see that the site is no longer functioning - it's a dead site. Remove the PPA associated with this site and this error will also go away.


```sudo iw dev``` shows mysterious virtual p2p interface on WLAN alongside normal interface

Hi there pal, almost every network interface today got few similar macs that represent other connections from the same device.
"MAC" Acronyms is "Message Authentication Code" well its "In the name" you have macs for every component that needs to talk with another one and if to be more specific, on "layer 2" the data link layer.
There are bluetooth macs wifi macs lan macs and so on, every component that needs to talk on layer 2 got a mac address.
The change of the last digits on the mac address is pointing that this is the same device.
As a rule the first six digits on mac address (x) xx:xx:xx:yy:yy:yy representing the company of the device, and the last six digits (y) representing the specific model of the device.
There are alot of reasons to for two macs from the same device like:

router with 2.4G and 5G networks.
router cable connection could have another mac.
the same could happen with more devices like old computer, game consoles and more.
there are alot more examples.

You can check the specific device company by running the mac address on https://macvendors.com/.
On your specific case its really look like one mac is for wifi connection and the other one is to peer to peer connection.
Remarks:

a mac address a uniq address and only used by one device.
today you have the option to use a "Random" mac address for privacy reasons for more information you can look at: https://source.android.com/devices/tech/connect/wifi-mac-randomization.
you can find more information about the "5 layers" network model at: https://microchipdeveloper.com/tcpip:tcp-ip-five-layer-model.
example for printers peer to peer use https://www.extremetech.com/computing/51460-peertopeer-network-print-sharing

hope that was what you are looking for pal, there are alot more information out there.


I tried installing windows on my Ubuntu machine and couldn't, now I can't even run Ubuntu

For installing Windows by removing Ubuntu follow this steps:

Take a backup of your data to external drive.
Reboot the PC.
Insert Windows CD/Pendrive and select boot device as same.
When you see the "Windows Setup window". Press Shift + F10 keys together on the keyboard, which will take you to command prompt. Enter DISKPART command
Enter list disk command to list the available disks along with your CD/Pendrive.
Enter select DiskX command- here X is your disk number(Mostly which has large size).
Enter clean command (If it doesn't work enter diskclean), which erases all the data then exit the terminal.
Install OS by doing partitions (follow the steps in https://www.partitionwizard.com/partitionmanager/install-windows-10.html).


How to get Ubuntu installed and running for development (I.e. ruby on rails)

1) You'll have to provide more info as to what exactly is the problem. Are you even running zsh ? ie what is the output of ps -p $$ ? How did you install it ?

2) To manage my ruby versions and my gems I use rvm. See for instance here how to set it up and use it. Once it's installed getting rails is as easy as gem install rails. Git is in the repositories, you say you know how to use apt-get so you should know that you just need to sudo apt-get install git. Sublime text is not in the repos, you can download and install it from here.

3) How did you install Gnome shell ? This tutorial will show you how to install Gnome 3.10.


Ubuntu dual boot - only one has internet connection

I have fix the issue installing the following driver the LINUX driver for kernel 3.x and 2.6.x and 2.4.x.


Why can't I change system time to less than 1970?

UNIX and POSIX-compliant systems encode system time ("Unix time") as the number of seconds elapsed since the start of the Unix epoch at 1 January 1970 00:00:00 UTC, excepting leap seconds which are not counted. The limitation was inherited from UNIX. 32-bit values meant, to get a reasonable degree of precision, Day Zero had to be pretty close, so that precluded going back to 0 A.D., or, more reasonably, 5780 years and change, since the date of this answer is 10 Adar 5780 {g}.


Belkin F7D1101 v1 works under Ubuntu 16.10 but not under Lubuntu 17.04

This was Originally posted by Mike_IronFist over here
All you need to do is Open a terminal by pressing Ctrl + Alt + T and run:
sudo nano /etc/NetworkManager/NetworkManager.conf

At the bottom of this file, copy and paste the following:
[device]
wifi.scan-rand-mac-address=no

after pasting it press Ctrl+ X and then type Y to Save it and press Enter
You can double check if the changes got saved by running the first command again and check if the edited line is there
Now you need to start your network manager for changes to take effect
sudo service network-manager restart

And WiFi should work again, Try to connect it


I removed alsa-hda-dkms (alsa-hda-dkms 0.201205021650~precise1) and rebooted. Sound is back.


"psycopg2.OperationalError: could not connect to server: Connection refused" error when bootstrapping

If the server is running and you still get the error, you must configure Postgres to accept connections from other IPs. In order to do so, locate the postgresql.conf file.

Look for listen_addresses property and replace localhost with the choice of your IPs separated by comma OR * to accept connections from any IP.

Restart the postgresql server. You should be good. :)


Problem with installing Ubuntu on ASUS N552VX

I have solved the problem:):)

Update the bios.
Download the latest BIOS, I uses the BIOS 300.
https://www.asus.com/Notebooks/VivoBook-Pro-N552VX/HelpDesk_Manual/
https://www.asus.com/se/support/Download/3/837/0/1/BiXix0ldv4rQc6sc/45/
To update the BIOS:

Verify the Notebook PC’s exact model then download the latest
BIOS file for your model from the ASUS website.
Save a copy of the downloaded BIOS file to a flash disk drive.
Connect your flash disk drive to your Notebook PC.
Restart your Notebook PC then press during POST.
From the BIOS menu, select Advanced > Start Easy Flash, then
press enter
Locate your downloaded BIOS file in the flash disk drive then
press enter
After the BIOS update process, select Exit > Restore Defaults to
restore the system to its default settings.

Enter the bios and disable fast boot, save and exit bios
Install the Ubuntu 16.10
Set acpi_osi=! in GRUB_CMDLINE_LINUX_DEFAULT

Open a terminal
Open up /etc/default/grub, you'll need root privs to edit.
Goto the line:
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
and add the parameters
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_osi=!"
Save.
sudo grub-mkconfig -o /boot/grub/grub.cfg
Reboot
And now to works!!
/XMEN01


The issue is essentially the same as for Chromium explained in WhatsApp Web is asking to update Chrome while using Chromium. Vivaldi isn’t supported by WhatsApp Web officially, so it used spoofing in the past, but a recent update broke that and the feature is not implemented again yet. There are three ways to work around the issue:

Temporarily change the tab’s User Agent

Pro: fast and simple, Con: needs to be done again after every reload of the tab

In the WhatsApp Web tab:

right-click and select “Inspect”
click the vertical dots button on the top right
click “More tools” → “Network conditions”
on the bottom at “User Agent”, uncheck “Select automatically”
from the dropdown list directly below choose “Chrome — Windows”
reload the tab by clicking the ↻ button, pressing Ctrl+R or right-clicking inside it and selecting “Reload”

If that doesn’t work, clear the site’s locally stored data: Right-click and select “Inspect” if you don’t have the window still open, go to the “Application” tab on the top, select “Clear storage” on the left and click the “Clear site data” button, then reload the tab again.

Persistently change the tab’s User Agent with an extension

Pro: persistent, Con: needs an extension

You can use an extension like User-Agent Switcher for Chrome to set a persistent User Agent for individual tabs, this is explained in detail in this answer.

Persistently change the whole browser’s User Agent by altering its start command

Pro: persistent, Con: changes the User Agent for every other tab as well

Vivaldi has a --user-agent command-line option which you can use to  easily set the browser’s User Agent. For WhatsApp Web it’s enough to cut “Vivaldi/x.x.xxxx.xx” from the current User Agent line:

Visit vivaldi://about and copy your current User Agent without the “Vivaldi/x.x.xxxx.xx” at the end
Close the browser and start it again using this shortened User Agent line, e.g.:

vivaldi-stable --user-agent='Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.134 Safari/537.36'

If you want to tweak a .desktop file, just replace its

Exec=/usr/bin/vivaldi-stable %U

line with e.g.:

Exec=/usr/bin/vivaldi-stable --user-agent='Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.134 Safari/537.36' %U

Sources and Further reading

WhatsApp Web is asking to update Chrome while using Chromium
Blog article “WhatsApp Web doesn’t support Vivaldi browser, here is how you can make it work in Vivaldi again”


setting up dual boot for Lenovo ideapad500 with Windows10 and ubuntu 16.04

It's perfectly safe to dual-boot Windows and Ubuntu. Ubuntu won't break your hardware. At worst, some hardware components may not work, such as Bluetooth or the touchpad. Even then hardware incompatibility is rare. Ubuntu works on most all computers from most all manufacturers. The Ideapad 500 is a fairly bog-standard laptop, and all components should work.

Actually, the biggest issue that might occur would be if you have a Intel Skylake-based Ideapad 500 (core i-6xxx). Skylake support under linux is currently very sketchy in terms of sleep state and power management support. This means that you will have far worse battery life, and in a worst case scenario your processor may be affected by the continuous current (and therefore, heat).

I managed to fix the sleep state issue on my Pavilion x360 by disabling my Ethernet port and upgrading to Kernel 4.7.2, but its a hit or miss with other manufacturers.

Haswell>= based PC's should be perfectly fine.

Warning: Be somewhat careful when installing Ubuntu, as you can very easily break your Windows partition if you overwrite it. However, the latest Ubuntu installer is quite user friendly and shouldn't be terribly hard to use.

--upvote if this helped! :)--


Fifteen seconds?  15secs?  That is really impressive!

And you actually want to optimise that??? :-O

I would say: take a system back-up now (You're definitely user type 4!) and don't touch anything!!!  (except maybe remove bootchart as that takes time as well)

Your boot is faster then 99.75% of all users on this site and faster then 99.999% of all user on this planet!

Congratulations!


is there something with my apt sources list?

Ubuntu does not use the newest versions of software but the stable ones on the date of release of that specific version of Ubuntu.

You are using 12.04.
If you want newer version upgrade to 14.04.


Grub rescue problem after deleting windows partition

The somehow easiest way would be to use Boot Repair Live CD /pen-drive  which you can find:
and follow these steps described here
Boot-Repair
If you need more detailed help let me know.


apt-get update doesn't work gives an error

Try the following commands:

sudo apt-get check
sudo apt-get clean

The first one (check) might do nothing,
but the second one (clean) should delete all downloaded and cached packages including the two faulty packages above.

No worries, this does not affect the installed programs but does just empty the cache of apt-get. You will not notice it except that the next time you install something, apt-get might have to download a little bit more...


You might want to try:

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

I had to add gtk2-engines-murrine:i386 because a theme I was using required it and skype looked ugly without it. Using Ubuntu 13.10.


If you dual boot with Windows 8, see this answer.

If headphones work, and the speaker doesn't work or works intermittently, please click "Does this bug affect you?" in the upper left of this bug. In this case, it is a bug that, in its nature, intermittently exists. I'm pretty sure it is a start-up bug of some sort, and have already noted it as such in the report.


How to remove a path from system path(`$PATH`) using terminal commands?

In your current shell (your current session of gnome-terminal) you can do this using:

export PATH=${PATH%:/home/avinash/Desktop/raj}

In general:

${string%substring}

deletes shortest match of $substring from back of $string.

Check out String manipulation for more info.


1) The mysql dump for backup itself is the usual approach, I don't see any benefit from using svn to store the backups

2) Better move this to it's own question (svn related)

3) By doing the commands in sequence in a script you are already enforcing that, the svn commit is only executed after the mysqldump | gzip finishes .


Gnome Shell extension window list doesn't utilize space in top panel

my problem is solved after using this extension... https://extensions.gnome.org/extension/51/extend-left-box/


HDMI + DisplayPort, both monitors detected, DP has no signal

Just got fixed. The DisplayPort -> HDMI adapter was a Dell DA300 combo (HDMI + displayPort + ethernet + USB3 + C pass-through) I had from my laptop.
Replacing it by a simple/cheap passive C type DisplayPort -> HDMI adapter fixed it.


Upgrading to gcc 4.9 with Ubuntu 10.04 LTS

Try looking it up with aptitude: aptitude search gcc-4.9

This version may very well not exist since release 10.04 is obsolete.


Ubuntu 20.04 infinite loop on reboot, with three services of systemctl

Your install media can be used to boot into a live environment. You can than chroot into the installed enviroment and attempt a manual repair.

The install media can be used to re-install.

Ubuntu generally requires a DVD though to fit the installer. I'd recommend Knoppix if you have to try to rescue from a CD.


How to disable Nautilus popup on Ubuntu 20.04?

Checked in /usr/share/themes/;
Found Yaru-dark (theme currently in use, double checked on GNOME Tweaks);
Opened in folder in Terminal (right click on the folder);
Ran

sudo gedit gtk.css

added the line

.app-notification { padding: 0; margin: -80px 0 0 0; opacity: 0;}

at the end
Saved file, closed, refreshed the theme by using GNOME Tweaks;

Now all pop-ups are off.


Installed Ubuntu 18.04.01 LTS and my screen is flickering/cutting/glitching

You are on the right track, trying to use different drivers often fixes such issues, especially with more obscure GPUs. I recommend you first try installing the drivers from the Ubuntu repository, which should do everything for you, allowing you to bypass your current issue with installing. You can find instructions here: https://linuxconfig.org/how-to-install-the-nvidia-drivers-on-ubuntu-18-04-bionic-beaver-linux

Basically run sudo ubuntu-drivers autoinstall and you are good.


In the installation after you mame the partitions there will be a popup asking you if you want a UEFI installation. it will only show if Ubuntu detects that the tablet has UEFI.


Dual boot and Installing Ubuntu On F drive

Ok so I found a solution to it

I created a partition on my F disk by clicking on shrink disk and allocated around 100GB by going to Disk Management On Windows
Then I proceeded by Booting through My USB and went to linux installation.
Proceeded with Normal installation of Linux.
When it came to installation type, I choose 'Something else'.
I choose my 100GB of free space. I allocated some space for swap area, root and home.
For installation boot I choose /dev/sda
Installation proceeded  as Normal.


sudo apt install libmysqlclient-dev
then

for python 2.x:

pip install mysql-python
for python 3.x:

pip install mysqlclient or pip3 install mysqlclient


Computer boots, but mouse freezes and keyboard unresponsive

Try reinstalling ubuntu, but an older version, like 12.04 or 13.10. And see if it runs smoothly. Or check if your pc is 32 or 64 bit
http://www.ubuntu.com/download/alternative-downloads


Install Ubuntu server using alternate iso from offline Linux system

Follow the procedure described in Ubuntu installation guide here, until the step before Configure Apt. In this step you have to add the ISO as the repository source. To do this, follow the following steps:

First mount the iso file in /media/apt directory. If that is not already exists, create that directory with sudo mkdir /media/apt command.

sudo mount /path-to-iso-file /media/apt

Then add this as repository source

sudo apt-cdrom add

Then do sudo apt-get update, most probably it is not required.

Then follow the steps in the main documentation, until Install the Ubuntu Desktop step. In that step, the last command should be

    $ sudo tasksel install ubuntu-server

instead of sudo tasksel install ubuntu-desktop

Hope this will answer your question.


The utility to manage gm-notify is called gm-notify-config.

To start it from the Dash, simple type gm... as shown below:

Alternatively, you can also press Alt+F2, type gm-notify-config and press Enter.


Online account does not show all Google calendars

Assuming you are using the gnome3 default for Calendars: Evolution.

Click on "open calendars" in the bottom right corner.
Now Evolution should start.
If your calendar is listed on the left, just check the box in front of it.
If not, click the small arrow next to "new" in the upper left corner and choose "calendar".
Select "Google" as type, enter you email address and click "retrieve list".
Now you should be able to select your calendars from the drop down menu.


I faced the same problem. I expect you have your Live CD/USB with you. Just follow the simple steps and you'll solve it in less than 5 minutes.
How to Repair, Restore, or Reinstall Grub 2 with a Ubuntu Live CD or USB
Note: Remember to replace the blue parts with the relevant partitions.


My computer, compaq CQ45-118A, intel sound card.

Since ubuntu 10.04 to 11.04, I have added to /etc/modprobe.d/alsa-base.conf the following lines and worked for me:

options snd-pcsp index=-2

alias snd-card-0 snd-hda-intel

alias sound-slot-0 snd-hda-intel

options snd-hda-intel model=dell-m4-1

options snd-hda-intel enable_msi=1

options snd-hda-intel position_fix=1 enable=yes


Specific display view to avoid broken screen part

You may use NVidia underscan setup. For example, I have 1280x800 monitor and I want top-right side with size of 900x700.

gksu nvidia-settings
X server display configuration tab → Select your monitor
Set (x-x1)/2=(1280-900)/2=190 value for underscan which gives me 900x562, just fine. Apply, by default it will cut from all sides.
Click Advanced, I find:

ViewPortIn:  900x562
ViewPortOut: 900x562+190+118
Panning:     900x562

Change ViewPortOut to right and up to leave space only at left and bottom

ViewPortIn:  900x562
ViewPortOut: 900x562+380+0
Panning:     900x562

Apply
Some driver/adapter combination have weird behavior, like mine.

I got 900x562 on top-right corner OK, left & bottom are black OK, mouse can only move inside that 900x562 box OK, but desktop didn't change its size correctly, it is cut from right and bottom edges FAIL.

I use 1px panning trick to correct it. Even if the desktop scrolling by 1px horizontally or vertically, it is an acceptable solution.

Change by +1px: Panning: 901x562 or Panning: 900x563.

Done, Here is what you should get:


Set Bookmarks Page to open in a New Tab in Opera Browser

Use an extension for Opera to set bookmark page in a new tab. There doesn't seem to be other ways to achieve that easily without using an extension.

Custom New Tab Page, by sanishmistry (deprecated) allows user to set a custom new tab page. This extension is no longer found at Opera add-ons website.
Homepage in New Tab, by shucream0808 enables user to set homepage and open in new or current tab. A simple extension that adds a "Home" button on toolbar.

Use either one of the listed extensions at above.

Install extension

Latest version of Opera is preferred, although older versions may be able to install the extension.

Use Opera web browser to visit Opera add-ons website (link above). Check the extension name and its author name, to be sure.
In the right column of page, look for a green button + Add to Opera.
Click the button once, then wait for the button to change from "Installing" to "✓ Installed".

If installation was successful, the extension will be listed by "Extensions" tab in Opera.

Using extension

Go to Menu > Extensions > Manage Extensions (or press Ctrl+Shift+E).
In "Search extensions" field, type a keyword like "tab" to filter name of extension, or scroll and search manually. Then, click Options for the extension.
Enter the URL of your choice. For bookmark page, type either: opera://bookmarks (native) or chrome://bookmarks (since Opera 15).
Click OK to finish.

The end result depends on how the extension work (read the description for each at link above). Ideally, user will just open a new tab as usual. Otherwise, user may have to click on a toolbar button, or such to achieve the result.

Bookmarks tab discrepancy

When "Bookmarks" tab is opened, "Unsorted bookmarks" is shown by default (Opera 42.0). Newer Opera will show "My bookmarks" (Opera 43.0) or "All bookmarks" (Opera 45.0). This behaviour seems to be non-customizable.

Tested using extensions for Opera, Custom New Tab Page 1.6.1 with Opera 42.0, 43.0, and 45.0; Homepage in New Tab 1.0.7 with Opera 45.0 and 57.0.


Yes, the tabs are numbered 1-10.

Keyboard shortcut Ctrl+Fn gets you to the nth tab.

So, Ctrl+F1 gets you to the first tab, Ctrl+F2 gets you to the second tab, Ctrl+F3 gets you to the third tab, and so on.


logical swap shown as 2 separate partitions. Extended and Swap

What you see is completely normal.

An extended partition is a partition that contains another partition-table and acts as the "physical" drive to store data on.

A logical partition is simply a partition which resides on an extended partition.

The above described behavior is because a partition table is only capable of using 4 partitions. And if you want to have 5 partitions you have to make a partition extended and have 2 more partitions on it as logical (resulting in 6 partitions).

They use only 12GB of physical space and not 24GB.


Installing Scanner Driver for Brother MFC295CN

This article answers the question:
http://ubuntuforums.org/showthread.php?t=1340908


Why won't apt-get install anything after I deleted its cached lists?

You deleted apt-get's list of available packages, so it thinks that no packages exist and it is alone in this world :)

Just run sudo apt-get update to repopulate the lists, and then sudo apt-get install ... will work again.


Updating matlab version to 2013b on Ubuntu 12.04

There is no uninstaller for MATLAB on UNIX or Linux. To remove MATLAB you simply need to delete the MATLAB installation following the instructions below:

If you are running a license manager for MATLAB, shut down the license manager using the 'lmdown' script located in MATLAB's etc directory. If this folder does not exist, you are not running the FlexNet license manager. For example:

sudo /usr/local/MATLAB/R2010b/etc/lmdown

You should also remove any license manager files in the /var/tmp directory. These files should begin with 'lm_TMW', ex:

sudo rm /var/tmp/lm_TMW*

Remove the entire root MATLAB directory using the 'rm -rf' command, ex:

sudo rm -rf /usr/local/MATLAB/R2010b

Remove any symlinks to MATLAB binaries on the path, ex:

sudo rm /usr/local/bin/matlab /usr/local/bin/mcc /usr/local/bin/mex /usr/local/bin/mbuild

adjust values for your version.


HD Pro Webcam C920 microphone not being recognized by Google Hangouts, or Zoom on Ubuntu 18.04

Try restarting the Google Hangouts Video call with the Logitech Capture app closed. I was running into the same issue and noticed that I had left the app running in the background. The app was set to record because I forgot to stop recording and close the app. Once I did that, Google hangouts had no problems recognizing my C920.


Encrypting swap on 16.04 LTS with ecryptfs-setup-swap

This is due to a bug in ecryptfs-utils.

Step 1

Open /etc/crypttab and replace:

cryptswap1 UID=XXXXXXXX /dev/urandom swap,offset=1024,cipher=aes-xts-plain64

with:

cryptswap1 /swapfile /dev/urandom swap,offset=1024,cipher=aes-xts-plain64

Step 2

Open /etc/fstab and ensure that it ends with the following:

#/swapfile none swap sw 0 0
/dev/mapper/cryptswap1 none swap sw 0 0

Step 3

Restart computer. After restart, verify that the swap file is encrypted:

sudo cryptsetup status cryptswap1

It should show:

/dev/mapper/cryptswap1 is active and is in use.

References:

https://bugs.launchpad.net/ecryptfs/+bug/1670336
http://www.askmeaboutlinux.com/?p=1949


How can I build and install gcc-5.4.0 on Ubuntu 18.04?

... which was running for almost half an hour and made a directory as big as 1 GB. So I doubted the source file and interrupted it.

It's possible that you're on the right track, and rushed into stopping the build prematurely. Depending on the strength of your machine, 30 minutes doesn't sound unreasonable time for building GCC. Most importantly, you're building using make, which means that source files are compiled serially, one at a time, which is make's default. For speeding up the build significantly, run make -j, which will build parallely using all CPU cores, or make -j4 for running 4 parallel compile jobs, for example.

As for build size, I suspect that by default, GCC builds in Debug mode, which would explain the bloated build folder (for comparison, LLVM debug build could easily stack up to > 4GB).

However, if you don't have to build your own copy of GCC from source, you could use pre-built 5.4 packages available on Launchpad.

For GCC (C only), grab the .deb files and install them in order:

mkdir ~/Downloads/gcc-5.4-deb && cd ~/Downloads/gcc-5.4-deb

wget http://launchpadlibrarian.net/375474546/gcc-5-base_5.4.0-6ubuntu1~16.04.10_amd64.deb
wget http://launchpadlibrarian.net/375474798/libasan2_5.4.0-6ubuntu1~16.04.10_amd64.deb
wget http://launchpadlibrarian.net/375474828/libmpx0_5.4.0-6ubuntu1~16.04.10_amd64.deb
wget http://launchpadlibrarian.net/375474805/libgcc-5-dev_5.4.0-6ubuntu1~16.04.10_amd64.deb
wget http://launchpadlibrarian.net/375474748/cpp-5_5.4.0-6ubuntu1~16.04.10_amd64.deb
wget http://launchpadlibrarian.net/375474755/gcc-5_5.4.0-6ubuntu1~16.04.10_amd64.deb

sudo dpkg -i gcc-5-base_5.4.0-6ubuntu1~16.04.10_amd64.deb
sudo dpkg -i libasan2_5.4.0-6ubuntu1~16.04.10_amd64.deb
sudo dpkg -i libmpx0_5.4.0-6ubuntu1~16.04.10_amd64.deb
sudo dpkg -i libgcc-5-dev_5.4.0-6ubuntu1~16.04.10_amd64.deb
sudo dpkg -i cpp-5_5.4.0-6ubuntu1~16.04.10_amd64.deb
sudo dpkg -i gcc-5_5.4.0-6ubuntu1~16.04.10_amd64.deb

For C++ support, add the following:

wget http://launchpadlibrarian.net/375474836/libstdc++6_5.4.0-6ubuntu1~16.04.10_amd64.deb
wget http://launchpadlibrarian.net/375474834/libstdc++-5-dev_5.4.0-6ubuntu1~16.04.10_amd64.deb
wget http://launchpadlibrarian.net/375474751/g++-5_5.4.0-6ubuntu1~16.04.10_amd64.deb

sudo dpkg -i libstdc++6_5.4.0-6ubuntu1~16.04.10_amd64.deb
sudo dpkg -i libstdc++-5-dev_5.4.0-6ubuntu1~16.04.10_amd64.deb
sudo dpkg -i g++-5_5.4.0-6ubuntu1~16.04.10_amd64.deb

Do note that, downgrading libstdc++6 may cause breakage of some packages (for example, cmake and firefox on my Ubuntu 18.10). Keeping multiple libstdc++'s is technically possible, but difficult to accomplish and surely not ideal.


How to compare two package version numbers

take a look to the dpkg --compare-versions option, it will allow you to ask dpkg to do the comparison :)

dpkg --compare-versions 0.9.8g-16ubuntu3.1 lt 0.9.8o-1ubuntu4.4

will return 0, that means 0.9.8g-16ubuntu3.1 is lt (lesser than, < ) to 0.9.8o-1ubuntu4.4


I had contact with one of the developers. Apparently that's a bug in the current version of cordova-ubuntu. It will be fixed in the next version. Until then there is a work around. It's described there:

https://lists.launchpad.net/ubuntu-phone/msg17519.html


Get a windows 7 DVD or USB-drive.
Boot from it and select Repair.Select Use Recovery tools
And from last click on command prompt
And type these commands

Bootrec/FixMBR
Bootrec/RebuildBCD

This will restore your Windows boot-loader and replace grub..


Open config.wtf and add this line:

SET gxapi "OpenGL"


How to Transmit Internet within 2 LAN Card installed on one PC using Ubuntu 16.04?

You will have to set up your PC for ip forwarding and NAT. You can find an easy HOWTO here:

Quick-Tip: Linux NAT in Four Steps using iptables - by Frank Wiles

Make sure to configure gateway 10.1.1.1 for your static side.


Cannot change brightness in ubuntu 20.04, battery drains too fast

It is a problem to use an AMD graphics card on linux. AMD doesn't provide any infos about their drivers, so the driver in use is reversed engineered. There are similar (but fixable) problems with Nvdia, but you will not succeed with an AMD graphics card.
There is a project called "bumblebee", which allows you to switch from intel to nvidia - but no equivalent for AMD. I hate to say it, but your GPU is only basically supported in Linux.
If you have a chance to switch the GPU in bios to "intel", the results would be good.


How can I create a loop for arithmetic array operation?

You can do:

while read num; do echo "scale=3; $num / 1000" | bc; done <file.txt

bash does not support floating point arithmetic so we need to use bc.

Change scale to fit the digits after decimal points according to your need.

To save it in the same file:

while read num; do echo "scale=3; $num / 1000" | bc; done <file.txt | tee file.txt


COMODO Antivirus Considers a Python File a Threat

Has anyone else seen this before?

1 hit on google for Exploit.JS.Pdfka. Nobody even bothered answering that bug report except for an update your virus database file.

Upload the file to virustotal for an online scan. Those are a lot better than off line virus scanners.

What causes it?

Comodo is a stupid piece of software that relies on malware and anti-virus that appear on a Windows machine to behave the same on Linux? io.py is probably used in a malware and now it believes all io.py's are malware?

Is it safe to ignore?

99.99999999% of all notices from anti-virus software are false positives.

If you want to use an anti-virus install a 2nd anti-virus and compare results. Only when both alarm about the same file I would investigate it.


Can I remove the OS X partition from a dual-boot MacBook Pro?

I have a MacBook which is solely installed as Ubuntu. It works fine. I did this from scratch, but I don't think just removing the single main OS X partition will stop your system working. Single boot Ubuntu on a Mac is described here.


Issue with nodogsplash saying it needed updateed libmicrohttpd-dev, but I seems no new update have been updated?

A quick dirty fix would be to go to /nodogsplash/src/main.c and replace the MIN_MHD_PATCH value with your version (in your case, 62) and make and install again.


If im right you have a list of proxies and you want to connect to them in terminal.

Im using Cow Project you can set list of proxies in all kind (HTTP,Socks5 ,Shadowsocks and ...) and connect to them in 3 strategies:

1- backup:  default policy, use the first prarent proxy in config,the others are just backup

2-hash:    hash to a specific parent proxy according to host name

3-latency: use the parent proxy with lowest connection latency

Install and configure Cow then you have one http proxy at front with so many at backend


Which one do you like to use?

Try using your Intel Soundcard directly through ALSA:

aplay -L
....
plughw:CARD=Intel,DEV=1
HDA Intel, AD198x Digital
Hardware device with all software conversions
...

Lookup your device name and use it as -D argument in speaker-test.

speaker-test -Dplughw:CARD=Intel,DEV=1 -c 2

The Radeon HDMI Audio support is still experimental. You can try using it by editing /etc/default/grub and add radeon.audio=1 to GRUB_CMDLINE_LINUX_DEFAULT. Execute update-grup afterwards and reboot.


Connections icon not visible in status bar

Run:

$ sudo apt install indicator-applet-complete


Fonts not visible in Far Cry 1 with Wine

What you probably need to do is just is try a newer wine version - there is a database of apps that have been tested under wine, and FarCry is rated Gold/Platinum there with most recent versions and OSs.

Using PlayOnLinux etc with a particular wine version will often work - but often newer wine versions will work, perhaps better - the info that says 'this is latest version of wine that will work for this' can become out of date with newer releases.

To install the latest wine version (currently):

sudo add-apt-repository ppa:ubuntu-wine/ppa
sudo apt-get update
sudo apt-get install wine1.7

This is also heavily detailed here.

N.B. As far as I know, Wine has even and odd releases, even (e.g. 1.4, 1.6) are 'stable', odd (e.g. 1.7) are 'staging'. Staging releases genrally work fine, and may work better with some apps as they are more up to date, unless they suffer from regressions. The wiki says:

  You should avoid using them [development versions of wine] unless the current stable version of Wine does not support or is incompatible with the application you wish to use.

but that may be out of date anyway... It is recommended by Wine though to test the app in newer versions before reporting any bugs.


Ubuntu 10.10 running slow, going grey and shaking

If you log off and back on (not reboot) then it is very likely that your browser or some other program is eating resources.  I leave my browser open for weeks on end and some sites start sucking resources.  I close and re-open the browser and all is good again.


grub error, cannot boot win 7 after trying to install win 8

There's a wiki page that briefly explains how to solve the problem:

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

Please, leave a comment if you need more help.


Ubuntu 14.04 boot hangs at "EXT4-fs: mounted filesystem without journal"

Had the same problem. What I found was the server was actually coming up. I could ssh to it and found the issue is caused by the graphic Nvidia card.

I did:

sudo apt-get install nvidia-current-updates-dev

And this did it. You might give it a try.


Touchpad not working in HP Pavilion 14 Notebook with Ubuntu 14.04

You can install "gpointing-device-settings", a graphical utility to set  touchpad parameters:
Run this command to install:
sudo apt-get install gsynaptics

Then launch the program with this command in a terminal: (possibly the installer made an icon in Unity system settings)
gpointing-device-settings
You will see interesting settings in "tapping" tab .


can't get GUI to start from command prompt

Reinstalling your drivers will solve your problem:

sudo apt-get purge nvidia*
sudo apt-get install nvidia-current
sudo reboot


Thunderbird does not preserve profile's language packs enabled status

How do I get German language back in Thunderbird?

I hacked it. Not elegant, but it worked for ensuring UK English works.


The message "cryptdisks stop/waiting" is issued when the /etc/init.d/cryptdisks
demon is stopped, and the demon then hangs when there's an attempt to restart the service.

I had the same problem (after a fresh install of Ubuntu 14.10, and running ecryptfs-setup-swap), except that for me, I did have a new entry
added to /etc/crypttab, and I did have a new entry added to /etc/fstab.

The problem seems to be due to the "Known Bug" related to UUIDs described in
Swap not working on clean 14.04 install using encrypted home

I suggest you try the following: (Warning: these instructions assume your swap partition
is /dev/sda5 - adjust if necessary. You could loose data if you enter it wrongly.)

Uncomment the line in /etc/fstab for /dev/mapper/cryptswap1. It should read:

/dev/mapper/cryptswap1 none swap sw 0 0

Add the following line to /etc/crypttab:

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

Then make the swap space

$ sudo mkswap /dev/sda5

Restart the cryptdisks daemon:

$ sudo /etc/init.d/cryptdisks stop
cryptdisks stop/waiting # or you may get: Job is not running: cryptdisks
$ sudo /etc/init.d/cryptdisks force-start
 * Starting remaining crypto disks...
 * cryptswap1 (running)...

Check that crypt is running:

$ sudo cryptsetup status cryptswap1
/dev/mapper/cryptswap1 is active and is in use.

Check that you have some swap space:

$ swapon -s

I found that the swap filename was /dev/dm-0 at this stage.

Now the full test. Reboot, and check again that cryptswap1 is still active, and check the swap space.
This time, you should find that the swap space filename is /dev/mapper/cryptswap1. Good luck!

Note that gparted will show the partition as "unknown".


I wound up killing the Distribution Upgrade process with xkill, switching to intel graphics, following the instructions here to remove locks, then running:

sudo dpkg --configure -a
sudo apt update
sudo apt upgrade

And it looks like everything is working after a restart.


Netgear A6200 USB Modem does not work on Ubuntu 12.10

Netgear A6200 wireless adapter Drivers for linux

Use ndiswrapper to install .inf file in above zip file worked for me in ubuntu 11.04


How to change icon size in Ubuntu 14.04?

Go to System Settings > Appearance > and move the Launcher icon size as required.


Ubuntu 12.04 Libreoffice update breaks software updating

This bug has been reported here.
In short there is syntax error in /var/lib/dpkg/info/libreoffice-base.postrm script that breaks it.

This what I did to fix the issue on my machine - was also suggested by nadrach here.
Open that broken script for editing:

sudo gedit /var/lib/dpkg/info/libreoffice-base.postrm

Edit the file:

#!/bin/sh

set -e

if [ "$1" = remove -o "$1" = abort-install -o "$1" = disappear ]; then
dpkg-divert --package $DPKG_MAINTSCRIPT_PACKAGE --remove --rename \
--divert /usr/lib/libreoffice/share/basic/dialog.xlc.noaccess \
/usr/lib/libreoffice/share/basic/dialog.xlc
dpkg-divert --package $DPKG_MAINTSCRIPT_PACKAGE --remove --rename \
--divert /usr/lib/libreoffice/share/basic/script.xlc.noaccess \
/usr/lib/libreoffice/share/basic/script.xlc
fi
if [ "$1" = abort-upgrade ] && dpkg --compare-versions "$2" lt dpkg --compare-versions "$2" lt 1:4.3.0~beta1-1; then
dpkg-divert --package $DPKG_MAINTSCRIPT_PACKAGE --remove --rename \
--divert /usr/lib/libreoffice/share/basic/dialog.xlc.noaccess \
/usr/lib/libreoffice/share/basic/dialog.xlc
dpkg-divert --package $DPKG_MAINTSCRIPT_PACKAGE --remove --rename \
--divert /usr/lib/libreoffice/share/basic/script.xlc.noaccess \

PLACE THIS LINE HERE:
    /usr/lib/libreoffice/share/basic/script.xlc

fi

    # Automatically added by dh_installmenu

if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus ; fi
# End automatically added section

exit 0

Save the file and run your updates. The fix hasn't caused any problems for me yet.

As David pointed out might need to fix broken packages after applying this before everything gets back to normal:

sudo apt-get -f install


Command you are looking for is history

To delete your current session it would be

history -c

To delete your current session and previous ones you would use both commands

history -c && history -w


Your password for using sudo is your account password.  There is no separate sudo password.  Your account needs to have sudo privileges.  The account you set up for yourself when you installed Ubuntu will have been given sudo privileges.

If you don't remember your account password you will need to reset it which will require you to boot from a Live CD or into a special recovery mode, depending on which instructions you follow.

Some instructions for this are at: How do I reset a lost administrative password?


Apt-get update with an @ in password error

You need to escape special characters. So place a \ in front of the @ like so:

export http_proxy=http://deepak:Deepak\@123@12.1.1.1:3128

Alernatively you can also use %40.


The issue with using a straight sudo nautilus is that it will sometimes try to use configuration files from your user's home directory.  This can cause root (superpriviledged user) to change permissions on files within your home directory.  This is not usually harmful long-term; it can cause annoying problems like refusing to login to your desktop, but you can usually restore previous configurations by typing:

sudo chown -R user:user ~/

So what gksudo and sudo -i do is simply to tell the program to run with either copies of .Xauthority and other configuration files or with ones that actually belong to root.  I personally prefer sudo -i so I don't have to type in my password every time, but it's totally preference.  The two commands are doing the same thing.


Upstart logs your service execution in a log file by the same name in /var/log/upstart/your-service-name.log. It should be helpful.


How do I retrieve only the needed line from terminal output?

This will output the 3rd line, regardless of content.

df -h | sed -n 3p


Configuring automatic Bluetooth audio output via ALSA & command-line

alsa is really not suited to hotplugging , pulseaudio is far better suited to this mode of operation.

My TV supports sending to bluetooth audio so i use that , with my old tv i used a dedicated bluetooth sender that i got with some Plantronic backbeat 903+ headphones.

Bluetooth generally has a noticable latency so you will need to delay the video slightly to keep it in sync, i believe kodi supports this.