run virtualenv in new terminal tab automatically

Targeting specific terminal emulators

Automatically running a command on creation of a new terminal tab would be a feature of the specific terminal you are using, and not related to python or virtualenv.

To have a broader range or answers the question would probably have to be How to autorun a shell command for terminal emulator xyz. For example, for gnome-terminal you can use custom profiles as described in https://unix.stackexchange.com/a/3856/15312, but this is an unportable solution if you decide to switch to another terminal or platform.

On the other hand, nobody wants to get locked to a specific terminal app, therefore the next option would be a more portable approach.

Targeting shell init scripts

If you control the shell that is running in the tab, then you can do it in your shell init script.

For example, for bash you can add the following lines in your ~/.bashrc script:

if [[ -f .venv/bin/activate ]] ; then
    source .venv/bin/activate
fi

  For zsh add the snippet to ~/.zshrc.

Whenever you create a new shell or open a new tab this snippet will check if you have a .venv folder in the current path and activate that venv automatically. If you create your virtualenvs in a folder which is not named .venv then adjust the script accordingly.

You might also want to override cd so that whenever you cd into a venv it will be automatically activated:

Below is an example for zsh:

function cd() {
  builtin cd $1

  if [[ -f .venv/bin/activate ]] ; then
    source .venv/bin/activate
  fi
}

Reduce typing with virtualenvwrapper

Specifically regarding virtualenv: you might want to try virtualenvwrapper which can help reduce the amount of typing, and make managing environments easier by providing autocompletion for virtualenv folders.

Backgrounding processes

And finally, as a quick workaround, instead of creating new tabs with the same env, you can suspend a currently running process (such as manage.py runserver) with Ctr+z, optionally run bg to resume it in background if you want to keep it running, then edit and save a file, and bring the original process back to foreground with fg. See this for more details.


Why is my battery's "Energy when full" so much lower than "Energy (design)"

The battery is dead. Get a new battery.

Often Linux will exhibit higher power use than Windows in my expirience, but not hours vs. minutes. 10-15-20%? Sure. But not this.

In addition the battery is 7 years old. Thats basically ancient for a battery.

So either keep it plugged in, or grab a new battery on eBay.


how to use modulo function to determine if the given year is a leap yaer or not in vi editor of linux

In order to run a Program from vi editor, you need to type following command in vi editor after saving your file.

type: :!gcc -o anyname % && ./anyname

Here % refer to current file. It will use gcc to compile your program and execute it.


phpMyAdmin "More Settings" Option Generates Blank Page

Ok, this is a bug which has fix but not available in raring, at least not yet. Why on earth is phpmyadmin using eval?

  This bug was fixed in the package phpmyadmin - 4:4.0.1-2

  --------------- phpmyadmin (4:4.0.1-2) unstable; urgency=low

  Add /usr/share/javascript to open_basedir config (closes: #708611).
  Wrap check_file_access() function in config.inc.php in a
  function_exists block, because this file sometimes gets included
  twice (LP: #1175142).

The Fixes

1. Function already defined fix

Open problematic config file: sudo vi /etc/phpmyadmin/config.inc.php and change the following:

function check_file_access($path)
{
    if (is_readable($path)) {
        return true;
    } else {
        error_log(
            'phpmyadmin: Failed to load ' . $path
            . ' Check group www-data has read access and open_basedir restrictions.'
        );
        return false;
    }
}

to

if (!function_exists('check_file_access')) {
    function check_file_access($path)
    {
        if (is_readable($path)) {
            return true;
        } else {
            error_log(
                'phpmyadmin: Failed to load ' . $path
                . ' Check group www-data has read access and open_basedir restrictions.'
            );
            return false;
        }
    }
}

Note: All you're doing here is adding the function exists check if (!function_exists('check_file_access')) { }.

Saucy proposed source with the fix

2. If that doesn't solve the problem, you may also need to add /usr/share/javascript to open_basedir config

Open the apache config file: sudo vi /etc/phpmyadmin/apache.conf and change:

php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext/

to

php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext/:/usr/share/javascript/

Saucy proposed source with the fix


The Kernel is the same, the underlying system is the same, the tools are the same, the desktop is different. it's the same Operating System it's just using  different Desktop Environment.


How do I produce a É character in the tty login prompt?

Alt+[unicode in decimal using numpad digits] works at the console, providing your environment is properly configured to expect UTF-8 (via LOCALE or LANG environment variables). In your case, you should enter Alt + 201.


None. Nvidia wants to create the /dev/video0 or /dev/nvidia0 for whatever reasons they have (I say that is unhelpful since you have to add yourself to the video group to use it). Intel and AMD do not and uses the Linux established methods.

You should ask instead why Nvidia use such separated file instead, which is a mystery.


If you can afford a delay of one second, this will print CPU usage as a simple percentage:

echo $[100-$(vmstat 1 2|tail -1|awk '{print $15}')]

(Without the one-second delay, vmstat can only print average values since boot.)


I would trash that package and start over. I'm not sure where you obtained it, but it sounds like the deb package is corrupt as it's failing to unpack.  You could try downloading the deb package manually from here and installing it manually with gdebi using the command gdebi nvidia-352_361.45.11-0ubuntu4_amd64.deb or with aptitude using the command aptitude install nvidia-352_361.45.11-0ubuntu4_amd64.deb

gdebi

   lets you install local deb packages resolving and installing its
   dependencies. apt does the  same,  but  only  for  remote  (http,  ftp)
   located packages.

Provided you manage to obtain an uncorrupted package either of these should do the trick.

EDIT: There doesn't seem to be much in this package other than a Copyright notice containing a discussion regarding redistributing the NVIDIA graphics driver. That being the case you might wish to install this package for your version and architecture instead.

Sources:

man gdebi

https://linux.die.net/man/8/aptitude

http://packages.ubuntu.com/search?suite=yakkety&arch=amd64&searchon=names&keywords=nvidia


The maas chat was helpful and this is the solution they came up with:

maas admin dnsresources create fqdn=hostname.maas ip_addresses=<ip>

Alternatively they suggested putting the maas service inside a container and only expose the interfaces you need.


Flash plug-in crashes about 50% of the time

I do not know the solution, but will attempt to offer suggestions:

I would mention that I am using Ubuntu 12.04 LTS with various Firefox installs and they are not Crashing, so there is a good possibility that your problem is more specific to your own setup,rather than being a generalized problem.

You may find some of the suggestions in a Firefox Knowledge Base article are useful:
https://support.mozilla.org/en-US/kb/keep-flash-up-to-date-and-troubleshoot-problems#w_the-adobe-flash-plugin-has-crashed

Is it a crash ?

Note that if it is a crash, (then unless you are on Aurora/Nightly) Firefox will offer to send crash reports, and allow you to obtain Crash IDs. Those are useful for tracking specific reasons for Crashes.

This part of the answer is even more general, but may still help.

It has already been mentioned by "Daniel" that Adobe is not supporting Flash properly on Ubuntu. One effect of this is that Ubuntu users do not have the Latest FlashPlayer release as is used by and causing problems on Firefox Windows systems

So one thing you need NOT worry about are the Firefox issues with Flash 11.3
There will be; what is to Ubuntu users; a lot of noise on the internet relating to these issues and I am aware developers from Flash, Firefox & RealPlayer are involved. (RealPlayer have made a new release which Firefox promptly blocklisted again - soft black I presume - confirmation will be here )

Sorry for posting links but your question is at present rather general, so a general troubleshooting link seems best (There should be no link rot problem, mozilla normally archives rather than deletes Firefox KB articles, or if they are renamed or puts in suitable redirects).

Post back when you have more details and have tried read the linked articles and maybe someone will be able to offer a more specific answer.


The webiste spy.no-ip.biz has nothing to do with your local system/host. spy.no-ip.biz is configured globally to be resolved from localhost. You can check/confirm it by other system or network. The result would be same.


Your problem is... driver for Graphics GPU: Mullins [Radeon R4/R5 Graphics], not yet available... you may try this work around:
sudo nano /etc/default/grub

Edit the GRUB_CMDLINE_LINUX_DEFAULT line as shown below:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset resume=UUID=fe4994e1-975c-47eb-97d9-e779340a84be"

nomodeset is important, as long as mullins driver not yet available
UUID=fe4994e1-975c-47eb-97d9-e779340a84be is your swap partition, must add also at /etc/fstab

After doing so, update your grub:
sudo update-grub

Continue with editing /etc/initramfs-tools/conf.d/resume:
sudo nano /etc/initramfs-tools/conf.d/resume

Edit the RESUME=UUID line:
RESUME=UUID=fe4994e1-975c-47eb-97d9-e779340a84be

UUID=fe4994e1-975c-47eb-97d9-e779340a84be is your swap partition, must add also at /etc/fstab

Update your initramfs:
sudo update-initramfs -c -k all

You may also want to doing hibernate without asking password. it still require sudo, but you may skip entering sudo password (only for hibernate).
sudo nano /etc/sudoers

Add:
User_That_You_Allowed_To_Do_Hibernate ALL= NOPASSWD: /usr/bin/systemctl hibernate

login to created user

sudo systemctl hibernate


According to:

http://www.cnet.com/products/hp-compaq-tc4400/specs/

The CPU is T2500. And according to Intel:

http://ark.intel.com/products/27236/Intel-Core-Duo-Processor-T2500-2M-Cache-2_00-GHz-667-MHz-FSB

The CPU supports a 32 bit instruction set. So you'll want the 32 bit version. Installing the 32 bit version should sort you out.

To download the 32 bit version go here:

http://www.kubuntu.org/getkubuntu/

Click on the version you want and it should expand. Then you can click to download the 32 bit ISO.


How to install Haskell Platform for Ubuntu 13.04?

Raring is caught in a valley between having a GHC too new for Haskell Platform 2012.4.0.0 and too old for 2013.2.0.0.  This valley can be bridged with some pain and duct tape.

You can install the Haskell Platform 2013.2.0.0 from source if you have GHC already installed.  It's a bit of a process, but it does work.

First, install GHC 7.6.2:

sudo apt-get install ghc

Now you need GHC 7.6.3 as it is a pre-req for Haskell Platform 2013.2.0.0.

  CAUTION:

  You might think installing from the unknown-linux archives of
  GHC will work.  It won't.  The GHC in those archives is dynamically
  linked against /usr/lib/libgmp.so.3 which is unavailable on Raring
  which has libgmp.so.10.  Do NOT be tempted to symlink this library
  to it's earlier version's name and location to fake out the linker.  I
  went there and it is a path to very confusing failures and is a very
  bad practice so I mended my ways and built GHC from source.

Next, you need to get and build GHC 7.6.3 from source (GHC is a self-hosted compiler so it needs GHC to build it):

wget http://www.haskell.org/ghc/dist/7.6.3/ghc-7.6.3-src.tar.bz2
tar xjvf ghc-7.6.3-src.tar.bz2
cd ghc-7.6.3
./configure
make
sudo make install

Compiling GHC took quite a while (several hours, > halflife of Cesium isotope Cs-134m) for me so this is likely a very good time for a break or sleep.  It goes through three stages (0, 1, and 2) of building the compiler and then building the compiler's next stage with the compiler that was built.

To speed the compile process up, you can use

make -j 8

in the above step to leverage multi-core CPU.

Then, get and build the Haskell Platform from source (I'll use 2013.2.0.0 as an example):

wget http://lambda.haskell.org/platform/download/2013.2.0.0/haskell-platform-2013.2.0.0.tar.gz
tar xzvf haskell-platform-2013.2.0.0.tar.gz
cd haskell-platform-2013.2.0.0
./configure
make
sudo make install

Compiling the Haskell Platform took quite >30 minutes for me so this is another good time for a break.

You should now have a working Haskell Platform 2013.2.0.0 with GHC 7.6.3 correctly linked against libgmp.so.10.


Internal error in Ubuntu 13.10 / ProblemType: KernelOops / Package: linux-image-3.11.0-19-generic 3.11.0-19.33

It appears that kernel 3.11.0-19.33 has some very strange issues (I am having power issues with it, other face wrong screen resolution, etc.). Try booting with the older kernel (advanced options in grub bootloader).


http://sourceforge.net/projects/ext2read/ can read LVM2'd EXT2/3/4 partitions.


Convert several .FLAC albums to .MP3 from gmusicbrowser

Maybe it is not exactly what you are asking for, but I use the following script for this task:

#!/bin/bash
#
# convert FLAC-files to MP3
# (similar folder structure, max quality)
#

export path=<flacpath>
export out=<mp3path>

echo "" > doit.sh
find $path -name \*.flac | (

    while read i; do
    echo
    echo "$i"

    newfile=`echo $i | sed s,$path,, | sed s,.flac,.mp3, | sed s,\",,g`
    echo $out/$newfile
    targetdir=`dirname "$newfile"`
    echo $targetdir

    echo "mkdir -pv \"$out/$targetdir\"" >> doit.sh

    echo "ffmpeg -y -i \"$i\" -aq 2 \"$out/$newfile\""  >> doit.sh

    done

)

This is just sort of a template, change 'flacpath' and 'mp3path' as you need. The file 'doit.sh' which is generated may be edited and then executed as sh doit.sh

FLAC tags will be included in MP3 as far as they are supported.

I think there are much better solutions, but this works for me.

To give an example:

I have a record digitized to FLAC at

/data/music_out/FLAC/Jimi_Hendrix/Smash_Hits/...

and I want to convert this to

/tmp/out/MP3/Jimi_Hendrix/Smash_Hits/...

Assuming ffmpeg is installed (otherwise sudo install ffmpeg), I set

export path=/data/music_out/FLAC/Jimi_Hendrix/Smash_Hits
export out=/tmp/out/MP3/Jimi_Hendrix/Smash_Hits

in the above script. When run, the script creates another script file called doit.shwith the contents

mkdir -pv "/tmp/out/MP3/Jimi_Hendrix/Smash_Hits//"
ffmpeg -y -i "/data/music-out/FLAC/Jimi_Hendrix/Smash_Hits/01-Purple Haze.flac" -aq 2 "/tmp/out/MP3/Jimi_Hendrix/Smash_Hits//01-Purple Haze.mp3"
mkdir -pv "/tmp/out/MP3/Jimi_Hendrix/Smash_Hits//"
ffmpeg -y -i "/data/music-out/FLAC/Jimi_Hendrix/Smash_Hits/02-Fire.flac" -aq 2 "/tmp/out/MP3/Jimi_Hendrix/Smash_Hits//02-Fire.mp3"
mkdir -pv "/tmp/out/MP3/Jimi_Hendrix/Smash_Hits//"
ffmpeg -y -i "/data/music-out/FLAC/Jimi_Hendrix/Smash_Hits/03-The Wind Cries Mary.flac" -aq 2 "/tmp/out/MP3/Jimi_Hendrix/Smash_Hits//03-The Wind Cries Mary.mp3"
mkdir -pv "/tmp/out/MP3/Jimi_Hendrix/Smash_Hits//"
ffmpeg -y -i "/data/music-out/FLAC/Jimi_Hendrix/Smash_Hits/04-Can You See Me.flac" -aq 2 "/tmp/out/MP3/Jimi_Hendrix/Smash_Hits//04-Can You See Me.mp3"
mkdir -pv "/tmp/out/MP3/Jimi_Hendrix/Smash_Hits//"
ffmpeg -y -i "/data/music-out/FLAC/Jimi_Hendrix/Smash_Hits/05-51st Anniversary.flac" -aq 2 "/tmp/out/MP3/Jimi_Hendrix/Smash_Hits//05-51st Anniversary.mp3"
mkdir -pv "/tmp/out/MP3/Jimi_Hendrix/Smash_Hits//"
ffmpeg -y -i "/data/music-out/FLAC/Jimi_Hendrix/Smash_Hits/06-Hey Joe.flac" -aq 2 "/tmp/out/MP3/Jimi_Hendrix/Smash_Hits//06-Hey Joe.mp3"
...

just to clarify the idea. Calling sh doit.shthe action will be done.

If there are special charcters (even like ' ') in your path, you have to change some parts of the script. And yes, the mkdir -pv is redundant in this example. But it does not hurt, and the script is kept simple this way.


gi.repository
The fact that you got the message that gi.repository is missing makes me believe that the application is written in python (either python2 or python3 and that you are missing python-gi or python3-gi. Both should be on your system though.
Fix it
You can probably fix it by running:
sudo apt install python-gi python3-gi

(since we don't know which version is used), but to make sure all dependencies are installed correctly, you might as well completely re-install duplicity


How to reactivate personal X.509 and PGP (GPG) keys after upgrading Ubuntu?

Thank you oerdnj. I found some info in: bugs.launchpad.net/ubuntu/+source/gnupg2/+bug/1565963

So I did two things:

chmod u+x .gnupg/private-keys-v1.d
gpg2 --import < ./.gnupg/secring.gpg

Before changing the permissions I wasn't able to reimport the certificates one by one or the secret ring. After I changed them, I was. You have to remember the passphrases for each certificate, though.

The X.509 certificates had to be imported from a backup,the secret ring didn't contain them.

Thanks a lot, solved!


Is Ubuntu Battery Management Better Than Windows?

In my experience power management in Linux is generally not as good on Linux as it is in Windows, because

the hardware is designed to operate under Windows first
it takes a lot of Linux developer effort to support all the different manufacturers
manufacturers usually spend less time writing Linux drivers.

HOWEVER this being said there is an exception to every rule, and it might just be the case that you are getting better battery life. However, I do not regard it as likely.

The only way to be sure - for your particular make and model of laptop (they are all different) is to test it. Computer designs are so complex that no two will behave in the same manner in situations like this.


Repository issue with the installation of QGIS

Same issue from my side.

I solved removing all configured repos (e.g. UbunguGIS) and install the one in the official ubuntu repo (v. 2.18).


I eventually found my solution I eventually came to, before that typing im-config without any options into gnome-terminal would produce these errors errors;
head: error reading ‘adt-bundle-linux-x86_64-20140702’: Is a directory
tail: error reading ‘adt-bundle-linux-x86_64-20140702’: Is a directory
E: Configuration in adt-bundle-linux-x86_64-20140702 is manually managed. Doing nothing.

in the home directory if there's no .xinputrc file it then looks at trying to write to a directory after you've made your selections with zenity GUI interface instead of creating a new file and writing to .xinputrc
Solution:
In terminal instead of just typing im-config alone do;
$ im-config -c

and you will instead be configuring through terminal screen to complete the setup properly and will properly create and write .xinputrc file into your home directory without doing the error of trying to write to a directory.


No sound through apps with Bluetooth headset

If you go to the System Settings and choose the Sound page, you can configure the output devices in that page.  There's also an Applications tab on that page.  I would experiment there first and report back with your findings.


How to switch user on Ubuntu server 12.4

Boot from live CD.

Mount the / partition.

Chroot to the mounted partition

Create another administrator user or just assign a password to your account to activate it.

Details:

You’ll want to boot from your Ubuntu Live CD, choosing “Try Ubuntu without any change to your computer” from the boot menu.

Once the system boots, open up a new Terminal window from Applications \ Accessories and then type in the following command:

sudo fdisk -l

This command is used to tell what device name the hard drive is using, which in most cases should be /dev/sda1, but could be different on your system.

Now you’ll need to create a directory to mount the hard drive on. Since we’re actually booting off the live cd, the directory doesn’t really get created anywhere.

sudo mkdir /media/sda1

The next command will mount the hard drive in the /media/sda1 folder.

sudo mount /dev/sda1 /media/sda1

Now it’s time for the command that actually does the magic: chroot.

sudo chroot /media/sda1

Now you should be able to use the passwd command to change your user account’s password, and it will be applied to the hard drive since we are using chroot.

passwd ADMINUSER

Note that you’ll have to type your username after the passwd command in order to change the right password.

Now you should be able to reboot your system and log yourself in with your new password.


Alternatives:

There are other ways however, you can also issue

gnome-terminal --title="SOME TITLE HERE"

This might not give the desired effect since there is a big chance that your .bashrc overwrites that behaviour.
Bringing us to the last method, which I shamelessly ripped out of my .bashrc.

PROMPT_COMMAND='echo -ne "\033]0;SOME TITLE HERE\007"'

As an extra reference, this is the particular line in my .bashrc

PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"'

You may also need to comment this code out in your ~/.bashrc

case "$TERM" in
xterm*|rxvt*)
    # JEFFYEE REMOVED because it makes commands to title() not work
    #PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
    ;;
*)
    ;;
esac


I have no idea, how you have installed pecl_http-2.5.1 but to use pecl-http you need php5-pecl-http. Therefore

sudo apt-get install php5-pecl-http

Be in mind, that the package is provided by the Universe repositories.


There is no need to know when the 20 minutes have passed. The command "at" can be used to just tell the system to do something 20 minutes from a certain moment (and that moment can be a (re)boot).

In /etc/crontab put @reboot {user} /usr/local/bin/script.sh and make /usr/local/bin/script.sh executable. Change {user} to a user name or "root.

Create /usr/local/bin/script.sh and when you put this in it...

 at -f /usr/local/bin/script2.sh now + 20 minutes

/usr/local/bin/script2.sh will be executed 20 minutes after (re)booting. The actual time frame might vary a bit (since the booting process will probably already by on-going before "crontab" gets executed. Just an example but this is a general method in creating such an event.

/usr/local/bin/script2.sh can used to add in more lines with similar starting points (40 minutes from reboot etc.)

This will survive a reboot! So 5 reboots within 20 minutes = 5 times executing it.
Hmmm... leaving it in here though.

Another approach:

If you need to do this from a script itself you can also create a variable to be included into the script. 1st a simple example:

$uptime
 16:11:31 up 1 day,  7:35,  2 users,  load average: 0,10, 0,07, 0,06
~/tmp$ more test
uptime
~/tmp$ more test2
minutes=20;
at -f test now + $minutes minutes

And executing ./test2 will show

warning: commands will be executed using /bin/sh
job 7 at Tue Oct 20 16:29:00 2015

Now all you need to do is change "minutes" to a variable based on for instance "uptime".

This is an example on getting the uptime in minutes in the variable "minutes":

 minutes=`awk '{print $0/60;}' /proc/uptime`;

And this is a method to making it conditional:

#!/bin/bash
minutes=`awk '{print $0/60;}' /proc/uptime`;
if [ $(echo "$minutes > 20" | bc) -ne 0  ]
then
  at -f test now + 20 minutes
fi

If minutes greater than 20 execute script in 20 minutes from now.

Using pure bash:

#!/bin/bash
read -d. seconds < /proc/uptime
if (( $seconds > 20*60 ))
then
  at -f test now + 20 minutes
fi

This should get you started.


Edubuntu 14.04 Edubuntu menu editor not opening

The gmenu package may not be installed. To install it, run:

sudo apt-get install gmenu


do-release-upgrade fails with "could not calculate the upgrade"

Upgrade release interrupted or broken :

When you do an release upgrade, many problems can occur : the computer brutally stops, internet access stops, ... It is then possible to have an incomplete upgrade or some problem with dependencies.

In case you have dependencies errors, try theses commands :

sudo dpkg --configure -a

and then :

sudo apt-get install -f

If your upgrade was interrupted or a major issue occured, you can try this command :

sudo dpkg-reconfigure -phigh -a

This will reinstall and reconfigure every package needed for the release-upgrade. Please note that this can be very long, up to 1 hour.

Source : ubuntu-fr.org


I have resolved this issue after several days of torment. Here is what to do:

Get the requirements
To build and install the driver, we need the kernel headers and the build tools like gcc.
If you have any sort of connection, download them from terminal by using:

sudo apt-get install build-essential

Otherwise, download them from some other place and use some media to get them on computer.
Get the driver
Now, go to the official download page from Realtek for the Linux/UNIX Driver for the RTL8111/RTL8168 ethernet card and download the latest driver version from the Realtek Download Page
Untar the archive
The driver is compressed to an archive. So uncompress it with the following command:

tar xfvj r8168-8.025.00.tar.bz2

NOTE: Please do not forget to replace the r8168-8.025.00.tar.bz2 with the driver version you have downloaded!
Blacklist old driver
We have to blacklist the old driver (r8169) to prevent the system to load it. To do this, easily set a new entry in /etc/modprobe.d/blacklist.conf which will say:

blacklist r8169

or just enter in the terminal

echo "blacklist r8169″ | sudo tee -a /etc/modprobe.d/blacklist.conf

Build and install the new driver
Now, the whole requirements to install the new driver are done. Let us now change in the driver directory, which we have uncompressed in a few steps before:

cd r8168-8.025.00

NOTE: Again, please do not forget, to change r8168-8.025.00 to the version you downloaded.

The only thing we have to do now is, to build the driver and install it. To build it, just type:

make clean modules

after a few seconds (depending on your CPU), the driver is built and you can install it with:

sudo make install

Welcome r8168
We need to let the system know about the r8168 driver. With the command

depmod -a

you rebuild the kernel module dependencies and with an

sudo modprobe ./src/r8168.ko

you insert the new kernel module (the driver) into the kernel.
Make it available for boot
To always use the new module, you have to make a new initrd boot file. Just do

sudo update-initramfs -u -k $(uname -r)

in a terminal. Here we make the initrd file with the help of the uname -r command, which allows us to get the version of the actually running kernel.

Otherwise, you could add the module to /etc/modules: simply add a line r8168 to get the driver automatically loaded after boot. You can do this with only one command:

echo "r8168″ | sudo tee -a /etc/modules

After the reboot you can check if the right driver is loaded with this command:

lspci -v

with this command you should find your RTL8111/RTL8168 network card in a list and the additional line Kernel driver in use: r8168.

Guide has been taken from this page.


Can't boot freshly installed Ubuntu 18.04

The problem was in BIOS. It wasn't configured correctly. A new boot profile had to be made in BIOS so that it could boot Ubuntu.


Strange file browser - How to configure?

Edit:  This is apparently not going to solve this problem, according to @ ElefantPhace.  I am not familiar with that app (or the language), so I answered blindly. /EndEdit

You can find out what the default file manager is by issuing the following command at a bash command prompt:

xdg-mime query default inode/directory

If nautilus is the default, it should say:

nautilus*.desktop

If it is not nautilus, then make note of what the name is, and issue these commands:

xdg-mime default nautilus*.desktop inode/directory application/x-gnome-saved-search
gsettings set org.XXXXX.desktop show-desktop-icons false
gsettings set org.gnome.desktoxdg-mime default nautilus*.desktop inode/directory application/x-gnome-saved-searchp.background show-desktop-icons true

Substitute the name of the file manager for XXXXX

If it is nautilus, then you should be able to configure it to show places, and whatever other changes you want either graphically, or if not available in the GUI, in dconf-editor under org.gnome.nautilus.


Short answer: This is happening because your /home partition is between other two non-empty ones.

Explanation

Think of the hard drive as a line of people (each person is a partition).

| 1 | 2 | 3 | 4 | 5 | 6 |

If number 3 leaves the line, a free space appears. That would be your unassigned space:

| 1 | 2 |   | 4 | 5 | 6 |

If number 5 wants to have 2 spaces instead of one, it can't, because it's trapped between 4 and 6!
So, it has to kindly ask number 4 to move next to 2, so the line looks like this:

| 1 | 2 | 4 | 5 ¦ 5 | 6 |

How to solve it

  WARNING: This procedure goes wrong more often than you think, so if you want to avoid losing all your data, make a backup. Seriously. Do it.

So, in your case, you should follow these steps if you want to enlarge your /home partition:

Move /sda3 to the left, by right-clicking on it and choosing "Resize/move". This will probably take long.
Enlarge /sda4 with the empty space on its left.
Move /sda6 to the left with the same procedure as before. This will take even longer.
Finally, enlarge /home as much as you want.


Blacklisting a package (grub-pc) and leave recommendations unresolved

If you are booting using PXE, do you even need the kernel installed locally?  You might be able to simply remove the kernel packages.
For ignoring the apt dependency, there are a couple of options.  Although none are particularly great.  I'd probably create and install a dummy grub-pc package using equivs.
https://wiki.debian.org/Packaging/HackingDependencies
Here is another question where more options are discussed for manipulating dependencies - https://serverfault.com/questions/250224/how-do-i-get-apt-get-to-ignore-some-dependencies


Have you tried the standard USB installation instructions mentioned on the Ubuntu website?
If that doesn't work on your laptop. Try it on any other machine you have access to. That could help determine whether the problem is with your laptop or the installation media.


Can't see or connect to TP Link AC1750 Wireless Router

Are you sure you have a 5GHz card?
if Mermoy serves, You should have 802.11ac for 5GHz, as I seem to remember wireless=IEEE 802.11bgn is for 2.4GHz and the other NIC is wireless=IEEE 802.11abgn that has the 'a' for 5GHz

802.11a - 54 Mbps standard, 5 GHz signaling (ratified 1999), but elsewhere it is stated the 54 Mbps standard is for 2.4GHz

802.11g - 54 Mbps standard, 2.4 GHz signaling (2003)

802.11ac is the specification for 5GHz
The newest generation of Wi-Fi signaling in popular use, 802.11ac utilizes dual-band wireless technology, supporting simultaneous connections on both the 2.4 GHz and 5 GHz Wi-Fi bands. 802.11ac offers backward compatibility to 802.11b/g/n and bandwidth rated up to 1300 Mbps on the 5 GHz band plus up to 450 Mbps on 2.4 GHz
RE: https://www.lifewire.com/wireless-standards-802-11a-802-11b-g-n-and-802-11ac-816553
James Niland


Issue installing a bluetooth dongle with Ubuntu 20.04

The only way I know of to get the Fitbit Bluetooth dongle to work is via Galileo, which is a tool that synchronises a Fitbit with the web service. Galileo can be installed on recent versions of Ubuntu by:

remove the Bluetooth dongle from the USB port (if present)
add a third-party repository
install via apt (or pip)

This is how you do steps 2 & 3:
sudo add-apt-repository ppa:cwayne18/fitbit
sudo apt update && sudo apt install galileo
start galileo

Alternatively, if you prefer to use pip, you can do this:
pip install galileo
galileo

Once the software is installed, insert the Bluetooth dongle into a USB port and the system should recognise it.


How do I factory reset a BQ Aquaris E4.5 Ubuntu Edition, from the handset

The factory reset procedure is several steps:

With the handset powered on in any state, hold down VolUp + Power. After holding them for around 10 seconds, the handset starts to reboot, and the screen blanks. At this point, release the Power button.
A menu will be displayed with three options. Release the Volup key.

Boot menu:

[Recovery    Mode]
[Fastboot    Mode]
[Normal      Boot]

Use the VolUp Key to select Recovery, and use VolDown to boot to that mode.
When the Ubuntu Logo appears, you are in recovery, and you can press VolUp to reveal the recovery menu. Use the on-screen prompts to select the wipe data/factory reset option.


Just looks like you have your commands a little out of order. You seem to have a partition already so, to make a LUKS container you should use: cryptsetup {options} luksFormat /dev/'device'

Then: cryptsetup {options} luksOpen /dev/'device' 'label'

ArchLinux has an extremely detailed HowTo to help get you started: https://wiki.archlinux.org/index.php/Dm-crypt_with_LUKS

Most distro's will have a howto somewhere as well.


Is there any way I can fix my corrupted Hard Drive?

You should also check the SMART attributes of the drive either with the Disks utility, or with smartctl on the command line.  Since badblocks has identified the bad blocks it found, you can now attempt to repair them by writing zeros to them:

sudo dd if=/dev/sda of=/dev/null bs=1024 count=1 skip=190698244

If that returns an error, then you got the numbers right, and confirmed the sector can not be read.  Now try to write zeros to it and the drive will try to repair it:

sudo dd if=/dev/zero of=/dev/sda bs=1024 count=1 seek=190698244

Notice the difference between the two commands, especially seek instead of skip.  Make sure you type it correctly or bad things will happen.  After doing this, repeat the first command to read-test the sector again and this time it should not fail.  Also check the SMART stats on the drive.  The important numbers to look at are the counts of pending, reallocated, and offline sectors.  If there was nothing physically wrong with the disk, the count of pending sectors should go down, and there should still be zero reallocated or offline sectors.  If the count of reallocated sectors goes up, then the drive switched to using a spare sector for that block instead of the damaged area.  If there are more than a handful of these, or any offline sectors, you should replace the drive.


I screwed up massively when I accidentally moved a file over /usr/bin/python3. Apt and DPKG do not help with any flags

I think you should be able to recreate the missing sim-link.
Since the file exists, use the -f force flag.
sudo ln -s -f /usr/bin/python3.8 /usr/bin/python3


CUPS test page successfully print out result in Blank page

I had a similar problem. I resolved it by deleting line "*ESCPRCompression: 3, 16" in file "Epson-L4160_Series-epson-escpr2-en.ppd".


Bluetooth mouse lags and eventually disconnects

Sounds like an USB problem to me. Here is what you might try : A) Install a different kernel or B) Build you own kernel.

.

A) Install a different kernel, not build FOR Ubuntu. Cannonical may have done some mistakes on their kernels. Current Ubuntu 13.10's kernel is 3.11 but you can download recent version (today it's 13.12 the latest stable version) on http://kernel.ubuntu.com/~kernel-ppa/mainline/ .

Choose the 2 packages for your architecture (64 bits = amd64, 32 bits = i386) and install them in this order : linux-image-XXX first, then linux-header-XXX second.
You can install the .deb packages with gdebi (sudo apt-get install gdebi) with visual interface by double-click on the .deb file, or you can use these commandline :

cd path/to/file

(replace path/to/file by the directory containing the .deb packages, default is ~/Downloads)

sudo dpkg -i package_to_install

(replace package_to_install by the name of the .deb file you want to install, here it should be something like linux-image-XXX-amd64.deb)

.

B) Build you own kernel with a modified hid.h value (usb2.0 driver), to allow the USB 2.0 to be more permissive. I used to do that until kernel 3.11 was out for my Perixx gaming mouse (wired mouse). This custom kernel is based on your system's current kernel, so it's guaranteed to be fully compatible with your Ubuntu. The steps are just below this paragraph.

See What is HID_MAX_USAGES for knowing a little more about HID.H and why recompiling kernel can be a solution for your bluetooth mouse.

Building a new kernel with modifier hid.h value :

1) Open a terminal (ctrl-alt-T)

2) Launch the command :

sudo apt-get install fakeroot kernel-wedge build-essential makedumpfile kernel-package libncurses5 libncurses5-dev

It installs the requiered packages for the kernel building. You can apt-get remove <packages> afterwards to uninstall them if you wish.

3) Enter the following commands to create a directory for the kernel sources :

mkdir ~/source
cd ~/source
apt-get source linux-image-$(uname -r)

4) Type :

cd linux

Press Tab to auto-fill the name, then press Enter.

5) Launch :

gedit include/linux/hid.h

Find (Ctrl + F) the line #define HID_MAX_USAGES and change it's value to '64000'.

6) Launch :

cp -vi /boot/config-`uname -r` .config

To copy the configuration file of your current system.

7) (Optionnal) To speed up the building process, you can adjust the concurrency level. Launch :

export CONCURRENCY_LEVEL=#

Replace # by the number of your CPU's cores + 1 (Dual-core will be "3", Quad-core "5", …)

8) Launch :

make-kpkg clean

To prepare the directory needed by the building process.

9) Launch :

fakeroot make-kpkg --initrd --append-to-version=-sk kernel-image kernel-headers

This will start the kernel building process. It can take a while (between 1h and 8h following your hardware). If the process is interrupted for some reason, you should launch the command rm ~/source and start over from step 3. The kernel binaries .deb will be placed in ~/source.

To install the new kernel :

1) Open nautilus (file explorer) and go to /lib/modules.

2) Open a Terminal and launch :

cd ~/source

3) Type the following commands and press **Tab to auto-fill the version of kernel, named here (KERNEL_VERSION) :**

sudo dpkg -i linux-image-
sudo dpkg -i linux-headers-

Both commands (once filled by Tab) must end by .deb

4) Launch :

sudo update-initramfs -c -k KERNEL_NAME

You have to replace KERNEL_NAME by the name used by the directory containing the modifier kernel (should end with "-sk" in nautilus).

5) Launch :

sudo update-grub

(and also sudo update-burg if you use BURG).

6) Restart the computer.

You now run a custom kernel ! Congrats'

If that doesn't work, the problem is NOT caused by HID (usb2.0 driver) and I have no idea how to help you :)


from GUI:
Open the Software & Updates application window. Select TAB Additional Drivers and choose any proprietary NVIDIA driver. The higher the driver number the latest the version.

from terminal:
 $ sudo apt install nvidia-driver-450

Once the installation is concluded, reboot your system and you are done.
NOTE: as you can see I have also the same your message at command nvidia-smi but nvidia driver it is installed. I'have had an issue installing NVIDIA drivers, but was related to wrong grub configuration. I've tested Kernel 5.8.2 and also 5.8.14 and nvidia driver works.


Bash cut and grep commands through python

Suppose there is a file /home/eday/test.txt with the contents bellow:

this is a test

another line

CHECKOUT_REVISION this must be stored

some other things
CHECKOUT_REVISION another line to store

The following Python script will read the file stored in my_file variable looking for what is stored in look_for variable and if it finds a match, it will store it in temp variable which is a list variable.

Finally it will print to the output the contents of temp
You can comment out or delete the printing line.

#!/usr/bin/env python

# path to the file to read from
my_file = "/home/eday/test.txt"
# what to look in each line
look_for = "CHECKOUT_REVISION"
# variable to store lines containing CHECKOUT_REVISION
temp = []

with open(my_file, "r") as file_to_read:
    for line in file_to_read:
        if look_for in line:
            temp.append(line)

# print the contents of temp variable
print (temp)

the above script will have the following output in terminal:

$ ['CHECKOUT_REVISION this must be stored', 'CHECKOUT_REVISION another line to store']


Customize Chromium with user.css like in Firefox

I think for chromium (not sure about chrome) you can edit that ~/.config/chromium/Default/User StyleSheets/Custom.css

At least I have and found it works.

For blocking the sponsored ads on startpage.com for example, edit/create the file and add:

div#sponsored {display:none; }

Save it.

Run a search on startpage and see if the sponsored ads are displayed at the top.

Seems to work for me anyway.


The streaming service relies on metadata scanned from songs found in your personal storage (so you can pick songs based on e.g. artist rather than what folder you put them in).  This metadata scan is only performed for people who have subscribed to the streaming service, so it may just be the case that your songs haven't been scanned yet.

If the problem doesn't correct itself in a few hours, I would suggest using the contact form so the problem can be investigated and you can make use of the service you've paid for:

https://one.ubuntu.com/help/contact/


How start ubuntu from a bootable USB stick

It looks like something not set correctly in BIOS. So first go to the BIOS (look which Fxx key is the "BIOS-entry" key on your model of computer) and look around. There may be Allow USB boot option somewhere. If there is -> enable it. Than search for Boot order menu. You should set the "boot from USB" before "boot from HD". Make sure that you have the bootable USB pluged in before entering to BIOS. My machine for example, didn't give me "boot from USB" option if there was no bootable USB plugged in. If you see somewhere Fast boot option (or similar) -> disable it. You can also set the BIOS to Legacy mode.

Hope you get it working!


How to disable the shortcut for New Profile in command line (Terminal)

Double click on that Q and then press Backspace.


Does it make sense to use a linux-generic-hwe kernel on a non LTS version of Ubuntu?

You can't use linux-generic-hwe-20.04 package on Ubuntu 20.10, because there should not be such package in the 20.10 repos. But it appears that someone has added it I guess erroneously, unless it has been added for compatibility during 20.04 -> 20.10 upgrade.
The HWE concept is applicable only to LTS releases. The idea is to bring the kernel from 20.10 to 20.04.
Ubuntu 20.10 has the same kernel 5.8 as the HWE kernel for 20.04. Ubuntu 20.10 will reach it's End of Life in July '21 and won't get any new major kernel.
So you either use non-LTS releases and upgrade them every 6-9 months, or use an LTS release with HWE kernels. That will give almost same results in terms of kernel versions.


Will it be possible to create apps/games in Java SE or Java ME on new Ubuntu phones?

Yes, For example, the JogAmp JOGL Jake2 port is known to run on Ubuntu Nexus 7 touch tablet using IcedTea and OpenJDK.

You have access to all Ubuntu java packages that you normally find on desktop.

OpenJDK implements a JavaSE like environment.

You can access OpenGL ES 1 or 2 directly from Java using the JogAmp library for most flexibility, especially suited if you write your own engine.
The JogAmp JOGL implementation is provided by the libjogl2-java package.

You may also use existing java game engine library’s such as libgdx, playn and jmonkeyengine that will get you up to speed if you want to create a game from scratch.


I want to associate a file type to an installed program (Deluge), but it doesn't appear in the "Open with" menu.

You'll have to search this program "manually" with the "More Programs" menú. You'll find the executable deluge under:

/usr/bin/deluge

I tried to make an screen-shot but couldn't find a non associated file to show you how to do it.


I was looking for the answer to why Nautilus won't let me share folders via the gui for a long time. Turns out, you can only share folders which are children of your home directory. You can surely share other folders on the system, but you will find it much easier to simply create your share folders inside the home directory and right-click > sharing options. This assumes you are trying to do a simple samba share.

If you really need to share a folder outside your home directory, I suppose you could mount the folder to a folder within your home directory. This would require a line like the following in /etc/fstab:

/media/Shared/Video/Movies /export/Movies nobootwait bind 0 0


Did you uninstall the 3.5.0.21 kernel? If you did not, uninstall the 3.7 and 3.5.4 kernels and you're done. To be sure you do have a working kernel in a terminal type dpkg --list | grep linux-image.

If you did uninstall the 3.5 kernel, you can:

Disable the ppa which installed
the 3.7 kernel by opening Software Sources. This has the
    consequence that the Nvidia packages won't get updated from the PPA.
In a terminal type: sudo apt-get update followed by sudo apt-get install linux-image. Kernel 3.5 should be installed.
Reboot with the newly installed kernel.
Uninstall the 3.7 and 3.5.4 kernels and reboot.


how to give full permissions to a specific user for a folder?

You have several options:

You can set the group of the folder ITSM Lab1 to be ceo and give full access to the group for this folder and its subfolders.

Recursively change group for the folder and its subfolders:

chgrp -R ceo ITSM Lab1

Recursively change permission for a group:

chmod g+rwx ceo ITSM Lab1

You can set the owner of the folder ITSM Lab1 to be chief and give full access to that user for this folder and its subfolders.

Recursively change owner for the folder and its subfolders:

chown -R chief ITSM Lab1

Recursively change permission for a group:

chmod u+rwx chief ITSM Lab1

The below links to the man page will provide more info about the command used above:

chmod
chown
chgrp


I had a similar problem recently. When the kernel gets update the headers for the driver also gets update. So we need the map the correct headers. I got a script similar to yours which worked for my driver.  You can try to change the driver (from rtl8188eu to rtl8723au) and check whether thats helps you. Run the code below in terminal and reboot.

Here is script what worked for my driver

sudo apt-get update
sudo apt-get install linux-headers-$(uname -r)
sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install git
sudo git clone https://github.com/lwfinger/rtl8188eu
cd rtl8188eu
sudo make all
sudo make install
sudo insmod 8188eu.ko


"Normal" Ubuntu does not work after update to 11.10

Ubuntu2D is the default desktop in 11.10 if you dont want to use Ubuntu3D. If you dont want to use Ubuntu3D you will need to set Ubuntu2D as your default from now on.


WiFi connection error: deauthenticating by local choice (Reason: 3=DEAUTH_LEAVING)

I just met this problem this morning and fixed it.

Here is my suggestion.

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

Turn off net services:

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

and you can see some services is running

systemctl stop [your running services]

Open your wlan0:

ifconfig wlan0 up

Connect wifi:

iwconfig wlan0 essid [your wifi name]

DHCP IP:

dhclient wlan0


Brightness keys not working and volume keys responds very slow

This issue appears to be specific to Unity. It happened to me after upgrading to Ubuntu 17.10, and it even occurs with brand new accounts, meaning it's not some leftover configuration cruft. Gnome and KDE are unaffected. A workaround would be to switch to a different desktop environment.


Why is `service x11-common stop` timing out?

Still not sure why this happened, but rebooting the machine seems to have fixed it - though sudo reboot wouldn't work, had to use DigitalOcean's power cycle feature. Is it possible that the init system changed as a dependency on my package?


Ubuntu 15.04 USB devices powered off at encrypted root password prompt

Using a Logitech wireless? The 3.19 kernel used in 15.04 doesn't have built in support anymore.

Find a wired keyboard and log in. Edit /etc/initramfs-tools/modules and add

hid-logitech-hidpp

on a new line. Save and exit.

From the console run

sudo update-initramfs -u

reboot.


Use X forwarding for SSH server inside Docker container

If the container is on your local machine it's easier to give the programs insider your container direct access to your X11 socket. For this you only need to mount /tmp/.X11-unix and ~/.Xauthority into your container and set $DISPLAY.

Assuming you use some_user with home dir /home/some_user/ to run your_program  in container some_image use

docker run  -v /tmp/.X11-unix:/tmp/.X11-unix \
            -v ~/.Xauthority:/home/some_user/.Xauthority \
            --env DISPLAY=:0 --user some_user some_image your_program


How to use Sublime Text editor over SSH?

One simple way is to mount your remote SSH server with your File Manager, which is Nautilus by default in Ubuntu.

To do so, open any directory (go to Home for example), and enter your remote server in Address Bar (press Ctrl+L to edit current location). Type-in desired address with this format:

sftp://username@server.example.com:22/home/username

After login, your remote server should be mounted like local media - check left Side Bar for it (F9 to hide/show SideBar). You can Bookmark in Nautilus your remote location with Ctrl+D.

You can open files and Sublime Text's projects this way.


Disconnecting Netextender VPN: No internet

I had the same problem.

Open /etc/resolv.conf - where netExtender puts your office DNS entries. Delete them and put your prior DNS entry in.

I really would like to know how to force netExtenderGui to clean resolv.conf.


Ubuntu server 14.04 internet connection problem

I just answered something similar to this on another question. I had same issues sharing the internet connection from the Host to the Guest. I tried NAT, Bridging and nothing worked until I clicked on "Auto Ethernet" under the wifi icon in upper right taskbar area. One click and the internet connected right away. Of course, networking was already enabled.


Package dependencies can not be resolved

You can get that resolve by this:

sudo apt-get -f install -y

This fixes the dependency issues among rest of your installations.


How to make Unity Launcher backlight use one colour?

You will need the Gimp to do that.

First, we need to backup some launcher icons.

Open a terminal:

cd && mkdir launchericons
cd /usr/share/unity/4/
sudo cp launcher_icon_back_54.png launcher_icon_back_54.png.old
sudo cp launcher_icon_glow_62.png launcher_icon_glow_62.png.old
sudo cp launcher_icon_edge_54.png launcher_icon_edge_54.png.old
sudo cp launcher_icon_shine_54.png launcher_icon_shine_54.png.old

Now, we copy these 4 files to our newly created folder launchericons:

sudo cp launcher_icon_back_54.png launcher_icon_glow_62.png launcher_icon_edge_54.png  launcher_icon_shine_54.png ~/launchericons/

Ok. Files are backed up and copied to our home folder.
   If you haven't already done so, install the Gimp:

sudo apt-get install gimp

Start Gimp:

Alt+F2gimp

Go to "File" -> "Open" . Open your folder "launchericons" and select the first png: launcher_icon_back_54.png .

Now, we have to choose the colour we want to use:

click on "Foreground & Background colors" (screenshot)

Select the color you want (see the arrows, you can also use the eyedropper (circled) to select a blue anywhere on your desktop).

Make sure you write down somewhere the HTML notation of your selected color.

Now select in the Toolbox the "Bucket Fill Tool" and click in your launcher png in Gimp's main window (the little one):

Save the changed png, and repeat the same process with the other 3 png's.

Then, copy all 4 files back to /usr/share/unity/4/:

sudo cp launcher_icon_back_54.png launcher_icon_glow_62.png launcher_icon_edge_54.png  launcher_icon_shine_54.png /usr/share/unity/4/

Logout and login back to unity and your backlights are now blue.


Internal display freezing on startup with NVIDIA drivers

I found a solution by asking the question on the NVIDIA forums. For one reason or another, all I had to do was

remove /etc/X11/xorg.conf
uninstall egpu-switcher or run egpu-switcher cleanup (if this was already installed/running)
create /etc/X11/xorg.conf.d/10-nvidia-egpu.conf with the following only:

Section "OutputClass"
    Identifier "nvidia-egpu"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "AllowExternalGpus" "True"
EndSection

then remove the nomodeset parameter from the boot options


db_conf['NAME'] is not meant to change to db_conf['campfin']. The key is NAME, the value of it will be campfin !

In the command-line, run

export DATABASE_URL=postgres://111:111@localhost/campfin

Then run python3 pgsql_big_dedupe_example_init_db.py with the original code ...

con = psycopg2.connect(database=db_conf['NAME'],
                   user=db_conf['USER'],
                   password=db_conf['PASSWORD'],
                   host=db_conf['HOST'],
                   cursor_factory=psycopg2.extras.RealDictCursor)


You've a weird issue, try clearing you cache, update your repository information and install it again:

sudo apt-get clean
sudo apt-get update
sudo apt-get install --reinstall vsftpd

If this did not work, purge vsftpd (remove it including its configuration files) and reinstall it:

sudo apt-get purge vsftpd
sudo apt-get install vsftpd


You need a desktop file:

Create a desktop file

nano ~/.local/share/applications/processing.desktop

Add the following entries

Replace the attribute for Path with a valid icon path and note the %f. That's necessary to open a file in your file manager with this desktop file.

[Desktop Entry]
Version=1.0
Type=Application
Name=Processing
Icon=/opt/processing-3.06b/processing.png
Exec=/opt/processing-3.06b/processing %f
Comment=Processing is a flexible software sketchbook
Categories=Development;
Terminal=false
StartupWMClass=Processing
MimeType=text/plain;
Open your file manager and navigate to a PDE file. Open the Properties dialog and the tab Open With. Search the entry Processing in the list and use the button Set as default


How to connect to Wireless Wifi with 13.04?

Click on network icon (on top bar of Ubuntu ) than select network settings .

Now you can choose wireless option from your network manager.

And if there is problem in enabling your WiFi use following command.

$ sudo rfkill unblock all


How Do I configure LightDM to run seamlessly?

Change the wallpaper to match your "dynamic" backgoroud or, change it to - something like a black, or dark purple background so you don't notice the switch, How do I change the wallpaper of the login screen?  , otherwise you will notice when it changes from the default to your dynamic.

Maybe its a bug, who knows? If you turn off the dynamic wallpaper it will still show a transition from a purple background to a custom wallpaper.

Note to benefit others:
Answer accepted as it improved LightDM transition, however it did not fully resolve the issue.  Complete resolution would be nice, its a "paper over the cracks" solution (the black background).


Grub Rescue after upgrading from 12.04 to 14.04

I had the same situation. It appears that the grub that is booted is obsolete and can't load the required modules. I tried many things, none of them worked. In my case, I saw

(hd0) (hd0,msdos2) (hd0,msdos1)

The msdos2 had grub directory in it and modules in /grub/i386-pc, but I could not insmod anything really. It was giving me all sorts of errors, including error: symbol not found: 'grub_realidt'..

In the end, I attached an Ubuntu 14.04 CD to it, booted from CD, entered Rescue mode (I believe it says something like 'Repair a broken system') and chose the option to reinstall GRUB. That worked the first time.


In Virtualbox you can have a number of network configurations.  If you want two virtual machines to be part of a private network you set the network properties of both virtual machines to internal.  Only these machines will be able to talk to each other.  I've done this when I needed to setup a prototype, and I wanted to make very certain it wouldn't introduce unpredictable issues onto the actual network.

If you want the host and guest to appear on the same network, you will need to setup the VM in bridged mode.  The VM will pull an IP from the network's DHCP server and not the local DHCP server.  Hope that helps.


It may be that the script is running once in /etc/init.d and then again for the link to /etc/rc3.d.  What happens if you remove the link to /etc/rc3.d?

Another method that might meet your needs is to use a cron job.

Run crontab -e and add the following line to the crontab (if you are running cron).

@reboot /path/to/script.sh

If your log file is in user root's directory you may need to add the cron job to root's crontab.  If you have sudoer rights then sudo -i.


Workaround to re-install guest additions after every kernel update

Quoting the VirtualBox User Manual:

  Be sure to install DKMS before installing the Linux Guest Additions.
  If DKMS is not available or not installed, the guest kernel modules
  will need to be recreated manually whenever the guest kernel is
  updated using the command

  /etc/init.d/vboxadd setup as root.

[...]

  If it is not installed, use this command for Ubuntu/Debian systems:

  sudo apt-get install dkms


Writing drivers is a whole different ball game.
Even though they do not support it NI does have some well working cards. Good to see :)
From their help:

Some NI audio interfaces can also be used under Linux operating systems. This includes AUDIO 4 DJ/AUDIO 8 DJ, AUDIO KONTROL 1, GUITAR RIG MOBILE I/O, the KORE 1 controller, the second and third generations of the RIG KONTROL, and the SESSION I/O interface. Both the audio and MIDI functions of these devices are supported.
The necessary ALSA drivers are included in kernel versions 2.6.22 and above. Native Instruments does not provide any kind of support or guarantee for these drivers or for using its products under Linux.
For more information on ALSA drivers, please see here.
All Native Instruments ALSA drivers are listed here.

There is no Z1 amongst it and there are drivers for ALSA so you could track down someone who is in charge of these and ask if they are willing to help with a Z1. But that might be seen as inappropriate.
The part in bold sounds promising though; sometimes you can use another cards setup (as in the previous version) to get a newer one working since internally lots of cards are identical.
How about start debugging the information as asked here. This will gather all the information needed to get it supported. Maybe it is fairly easy to get working based on the current working cards.
Besides that I would start a conversation on the ALSA mailing lists to get this card on their radar. Sometimes all it needs is a little attention to get things rolling.
Good luck.


How to get the temperature using hddtemp for a Samsung SSD/NVMe in Thinkpad T480

From:

How do I check system health?

NVMe PCIe M.2 Gen 3.0 x 4 (or 2) SSD
If you have an SSD they're life span is measured in trillions of writes. Your SMART utility already measures SSD life but not for NVMe SSDs. For that you need nvme-cli. To install it use:
sudo apt install nvme-cli

Next gather information available from SSD:
$ sudo nvme smart-log /dev/nvme0
Smart Log for NVME device:nvme0 namespace-id:ffffffff
critical_warning                    : 0
temperature                         : 40 C
available_spare                     : 100%
available_spare_threshold           : 10%
percentage_used                     : 0%
data_units_read                     : 12,539,332
data_units_written                  : 10,623,582
host_read_commands                  : 281,194,884
host_write_commands                 : 96,528,713
controller_busy_time                : 672
power_cycles                        : 1,677
power_on_hours                      : 687
unsafe_shutdowns                    : 105
media_errors                        : 0
num_err_log_entries                 : 279
Warning Temperature Time            : 0
Critical Composite Temperature Time : 0
Temperature Sensor 1                : 40 C
Temperature Sensor 2                : 51 C
Temperature Sensor 3                : 0 C
Temperature Sensor 4                : 0 C
Temperature Sensor 5                : 0 C
Temperature Sensor 6                : 0 C
Temperature Sensor 7                : 0 C
Temperature Sensor 8                : 0 C

The most important field is Percentage used which shows as 0%. This isn't disk usage percent but life used percent. I've had this drive since October 2017 and now it's December 2018. As soon as Percentage used hits 1% I can multiply the number of months I've owned it by 100 to find out when it will die. At the current rate I can say the drive will live 100+ years. Of course it will be obsolete in ten years anyway.
Notice the temperature report.


Error occurred while mounting an NTFS partition

This is because of the fast boot option enabled in your windows OS. In one of my article, I explained little bit about the Reason and Solution for this problem. Please take a look and I hope this will be helpful.

Click on  How to mount Ntfs Volume

Good Luck!


Formatting an external hard drive nearly impossible

I would use gnome-disk-utility
formating the drive, not the partition.

Next, (if it is the case) in Windows format in NTFS using Disk Managment.

For the (so many) folder/files copying, grsync is a better choice than simple copy-paste. Pay attention at the Source and Destination "?" pop-up!
Do a sync simulation first


Installing 14.04 from ubuntu-14.04-desktop-amd64.iso with pxe

I consider that you should first create a customized live-dvd of Ubuntu-14.04.

Procedure:

a- Download an official Desktop CD from http://releases.ubuntu.com/ (You already did)

b- Move it into an empty directory.

mkdir ~/livecdtmp
mv ubuntu-14.04-desktop-amd64.iso ~/livecdtmp
cd ~/livecdtmp

c- Mount and extract the Desktop .iso, and extract the SquashFS filesystem

mkdir mnt
mkdir extract-cd
sudo su
mount -o loop ubuntu-10.04-desktop-amd64.iso mnt
rsync --exclude=/casper/filesystem.squashfs -a mnt/ extract-cd
unsquashfs mnt/casper/filesystem.squashfs
mv squashfs-root edit
cp /etc/resolv.conf edit/etc/
cp /etc/hosts edit/etc/

d- Prepare and chroot

sudo su
mount --bind /dev/ edit/dev
chroot edit
mount -t proc none /proc
mount -t sysfs none /sys
mount -t devpts none /dev/pts
export HOME=/root
export LC_ALL=C
dbus-uuidgen > /var/lib/dbus/machine-id
dpkg-divert --local --rename --add /sbin/initctl
ln -s /bin/true /sbin/initctl

e- Customize, remove any temporary files and delete temporary files  using commands:

sudo su
apt-get install package
apt-get remove --purge package
apt-get clean
apt-get autoremove
rm /etc/hosts
rm /var/lib/dbus/machine-id
rm /sbin/initctl
dpkg-divert --rename --remove /sbin/initctl

f- umount special filesystems and exit chroot

sudo su
umount /proc || umount -lf /proc
umount /sys
umount /dev/pts
exit

g- Producing the CD image

sudo su
chmod +w extract-cd/casper/filesystem.manifest
chroot edit dpkg-query -W --showformat='${Package} ${Version}\n' > extract-cd/casper/filesystem.manifest
cp extract-cd/casper/filesystem.manifest extract-cd/casper/filesystem.manifest-desktop
sed -i '/ubiquity/d' extract-cd/casper/filesystem.manifest-desktop
sed -i '/casper/d' extract-cd/casper/filesystem.manifest-desktop
umount edit/dev
rm extract-cd/casper/filesystem.squashfs
mksquashfs edit extract-cd/casper/filesystem.squashfs -comp xz -e edit/boot
printf $(sudo du -sx --block-size=1 edit | cut -f1) > extract-cd/casper/filesystem.size
nano extract-cd/README.diskdefines
cd extract-cd
rm md5sum.txt
find -type f -print0 | xargs -0 md5sum | grep -v isolinux/boot.cat | tee md5sum.txt
mkisofs -D -r -V "$IMAGE_NAME" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o ../ubuntu-14.04-desktop-amad64-custom.iso

Source: https://help.ubuntu.com/community/LiveCDCustomization


Open source app for mounting, extracting, creating ISOs

You can use AcetoneISO, it has all those features.

You can easily install it from Ubuntu Software Center.

.


This is Tipp10 software package bug - it seems they forgot to include libsm6 package in depends :(
You should install libsm6 package with Ubuntu Software center.
See packages.ubuntu.com/search?searchon=contents&keywords=libSM.so.6&mode=exactfilename&suite=precise


How can I ensure my system is ready for a full upgrade from 16.04 to 16.10?

This command should resolve the issue for the proposed partial upgrade.

sudo dpkg --configure -a

Then go ahead and try the upgrade and see proposed updates for the system.

See what sudo apt-get update && sudo apt-get dist-upgrade has to say. After you run dist-upgrade say NO to upgrade, and see what the output says.

If its agreeable do that again this time answering yes.


I have found a solution I installed Nvidia-settings and it let me have the driver but now I'm unsure of which one to use


Ubuntu MATE 17.10 does not have Malayalam in Text Entry

Malayalam (and a bunch of other Indic scripts) were added after the beta 2 release, so probably running these commands will fix it:

sudo apt update
sudo apt upgrade


The import function always sucked rather hard on Ubuntu. I know that's annoying, but when I did manage to import the configuration files, the imported file usually didn't manage to get the location of the crt and key files right.  So, you can bet you  have to do that manually any way unless you put them on specific places and refer to them by full path.

Anyway, I tested your file and it indeed does not work.  There is, however, one thing that immediately jumps to the eye: you added comments after certain configuration lines.  That is not supported everywhere.  I removed both the # A ne pas diffuser and, there you go: Imports just fine.


How can I set up multiple local wordpress sites using wordpress from the repo?

It seems that using the /srv/www directory caused problems for some reason.  The following procedure eventually did the trick (on Ubuntu 14.04):

Install packages

sudo apt-get install wordpress mysql-server

(mysql-server is not automatically installed as a dependency of wordpress, so it has to be installed explicitly.)

Set up virtual host

Say I want to access one local wordpress site via http://xyz/. I create the file
/etc/apache2/sites-available/xyz.conf
with the following content:

<VirtualHost *:80>
        ServerName xyz
        UseCanonicalName Off
        VirtualDocumentRoot /usr/share/wordpress
        Options All

        # wp-content in /var/www/wp-content/$0
        RewriteEngine On
        RewriteRule ^/wp-content/(.*)$ /var/www/wp-content/%{HTTP_HOST}/$1
</VirtualHost>

(This is almost identical with what the Debian Wiki suggests, but with an added ServerName and /srv/www replaced by /var/www.)

Now I add an entry in /etc/hosts

127.0.1.2   xyz

(the last 2 could be replaced with a different number).

Now I enable the virtual host and some required modules:

sudo a2enmod rewrite
sudo a2enmod vhost_alias
sudo a2ensite xyz
sudo service apache2 restart

Set up Wordpress

The wordpress package comes with a script to set up a Wordpress instance and a dedicated database.  However, it does so at /srv/www, which did not work for me.  So I unpacked the script...

gzip -dc < /usr/share/doc/wordpress/examples/setup-mysql.gz > setup-mysql

and replaced /srv/www with /var/www:

sed -i 's/\/srv\/www/\/var\/www/g' setup-mysql

Now, I can run the modified script to set up the Wordpress instance:

sudo bash setup-mysql -n xyz_db xyz

where the first xyz_db will become the database name and xyz the URL and directory name. The latter should match the URL that was set up above, the database could be named anything else, but it's sensible to give it a name that makes clear it's associated with the URL.

Now the URL can be opened in the browser to start working with the Wordpress instance.


You could try the live CD and check if it works or not? It will not install anything to your harddrive, all you have to do is run it from a disk or USB drive.

This Ubuntu wiki article is a good place to start with if you are unsure about booting from the live CD. The live CD is essentially a full Ubuntu install, except it runs on CD/DVD/USB, doesn't modify your harddrive in anyway (unless instructed to explicitly) and it does not save any changes you make.  This way you can check if everything you need works or not.


How do I install ubuntu on a laptop without cd-rom and only usb 3 (windows 10)

Step 1 : To be safe, download Ubuntu 14.04.3 ISO again.

Step 2 : Create a proper Ubuntu USB installation media :

Open command prompt as administrator and execute :

diskpart
list disk
select disk *
clean
create partition primary
active
format fs=fat32 (quick)
assign letter=**
exit

Note : * = number of USB drive | ** = select a free drive letter

Mount the Ubuntu ISO and copy the content to the USB drive.

Step 3 : Disable hibernation mode and fast startup - execute :

powercfg /h off

Open the legacy version of the Windows Control Panel - not the modern one.
Select Power Settings - enable show hidden settings - uncheck fast startup.
After having done this - shutdown the computer completely - do NOT reboot.

Step 4 : Boot from the Ubuntu USB installation media you have created and ...

Update addressing your response that the install media still doesn't work

In case you have access to a an Ubuntu system, you can create the media by :
Open Disks and select Restore Disk Image from the menu on the top right.
Choose the Ubuntu installation ISO file and the USB drive ... start restoring.


Wifi, Bluetooth neither wired ethernet aren't working on my Dell Inspiron-7420

This may work as a temporary fix (I also have an Inspiron and this fix works for my bluetooth, which seems to randomly go off sometimes):

Open a terminal with Ctrl+Alt+T
Enter sudo hciconfig hci0 reset

About the wifi, make sure "enable wireless" is checked (have missed that myself in the past; my old computer had a hard switch, and once i sat around for 20 min. trying to figure out why my wifi wasn't working).


you could try play on linux https://www.playonlinux.com/en/
very easy install and works out of the box most of the times


Where to find my d drive files in Ubuntu?

Your "d" drive will now be something like /dev/sda4 or so, depending on your partition layout. You can do "sudo mount /dev/sda4 /mnt", where 4 can be changed to the partition number, to mount the partition on /mnt so you can see the contents with "ls /mnt". When done with that partition, or if that one is the wrong one, type "umount /dev/sda4" to  unmount it.


Error '' could not update ICEauthority file'' and '' problem in configuration server''

I know it's been quite long when this question was submitted, but I had this problem today. I finally completely replaced my Win7 with Ubuntu 12.10 and this made me think about my decision.

But, after unsuccessfully trying many things I found on the internet, I found out with ls -l /home that the owner of my /home/username wasn't username:username but something else.

So, I changed it with sudo chown username:username /home/username, hit ctrl+alt+F7 to go back to the ordinary login screen and logged in successfully.

I hope this can help you too, or anyone else who faces similar problems.


Can't boot into any OS on my computer, what should I do? [Ubuntu 12.10]

Try to boot something like http://www.ultimatebootcd.com/ from external device such as CD or usb stick. There is GSmartControl which you can use to check for the hard disk health and tools to clone the hard disk


To make the drive usable again simply format it by going to gparted (you'll have to put in your root password)

select the drive (upper right hand corner)

right click on the partion and unmount it

right click on it again to format it to fat32 (or any format macs will take)

click the checkmark and you're done.


mv error in shell script "are the same file"

It turns out, the issue revolved around how the CIFS share was mounted. It appears that the inode was possibly being cached, thereby rendering most files duplicates as the script tried to write the new file name. To resolve this, I added 'cache=none' to fstab and remounted the share. I've since run through the script several times with no issues.

While I know WHAT the issue was, I'm still not entirely sure WHY it was in issue. If anyone has insight to how this affects the CIFS mount, I'm all ears.


Short answer: You are at no risk.

Long answer: Most malware is written for Windows and cannot run on Linux.  It's the same reason why, for example, Adobe Photoshop won't run on Linux: the executable formats are totally different and you'd need a translation layer to run them (this is called "wine" and, honestly, if you can avoid it, avoid it).

One of the first habits you need to shake from your Windows background is to download software from the Internet.  You say, you don't do this, but I'm pretty sure you went to Mozilla to download Firefox when you were using Windows.  In Linux, we don't do this.  We use so called "repositories", basically, something like "software stores", except you don't have to pay and most if not all software is open source.  You access those with the commands dpkg, apt, apt-get, aptitude (really, depends on who is explaining you stuff) or the GUI version "Ubuntu Software".

Stick to what is in those repositories and you will be on the safest side of the Internet.  No need for resource hogging, closed source, anti-this and anti-that.  Even on Windows, those often are snake-oil, or even worse, malware themselves, not to mention they cost money.

Welcome to freedom, welcome to Ubuntu.


GIMP 2.8 themes aren't applying after I select them

Usually you place the theme folder within ~/.themes so you can pick them as a general theme as well. When using the theme only for a single application, it does not matter where you place them, but you might as well place them in the usual place.

If you open a terminal window and run the following command, you can see that it will open the application with the specified theme:

GTK2_RC_FILES=/path/to/your/theme/gtkrc gimp

Of course, you need to replace /path/to/your/theme/gtkrc with the path to the gtkrc file, which is located in the gtk-2.0 folder of the theme.

Now, you don't want to have to run a terminal command every time you want to start the Gimp. Luckily, we can edit the command executed when we start the Gimp, as follows.

This command is defined in the .desktop file. Since we want to run Gimp in this theme for the current user, we first have to copy the first system-wide .desktop file to our user directory. This can be done with the following terminal command:

cp /usr/share/applications/gimp.desktop ~/.local/share/applications/

(Note that you might have to create the folder /home/vincent/.local/share/applications first if it does not exist yet.)

Next, we edit the new file:

 gedit ~/.local/share/applications/gimp.desktop

Here, you can see a line that starts with Exec= followed by the command to run the Gimp. Simply prefix that command by GTK2_RC_FILES=/path/to/your/theme/gtkrc and save the file. Next time you run the Gimp, it will be in your dark theme!


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

sudo fsck -a /dev/disk1

Depending on the exit code, you can try reformatting the card, and see it helps.  For more info look at fsck man page.


Ubuntu stuck in fallback after attempting to install cinnamon

I cannot reply as comment because I don't have enough reputation so I'm going ahead and answer, just giving you some options to try, that I hope will be useful.

First, you will need some way to download from the net. Since you are asking here I assume you have that.

From your problem PC press Ctrl-Alt-F1, login and type:

apt-get install --reinstall --print-uris -qq unity ubuntu-desktop

Hopefully, you will get the URIS of the packages you need, that you can download elsewhere and transfer via USB to your problem PC. I'll post the ones that I got:

http://archive.ubuntu.com/ubuntu/pool/main/u/ubuntu-meta/ubuntu-desktop_1.325_i386.deb
http://archive.ubuntu.com/ubuntu/pool/main/u/unity/unity_7.2.6+14.04.20151021-0ubuntu1_i386.deb

Let's say you copied them to your home folder, then (as before) from the terminal:

sudo dpkg -i ubuntu-desktop*.deb unity*.deb

EDITED: I added you need to change runlevel.


Currently what is the best Firewall & Internet security for Ubuntu?

Firewall
Ubuntu has an inbuilt firewall caled ufw
The graphical version for it is gufw. Search in the Ubuntu Software Center you will find it
Ufw is installed by default and is one of the strongest firewalls ever
See this Ubuntu Documentation for Firewalls

Firewall

Antivirus
Regarding an Antivirus software, you dont need one because linux rarely catches a virus.
There are hardly any linux viruses
If you insist on having one for windows files on linux,
Then install Clamav found in the Ubuntu Software Center and the gui frontend for it is clamtk also found in the Ubuntu Software Center.
Check these Ubuntu documentations for more info

Antivirus
Do I need anti-virus software?

Also see this

Top 5 Anti virus for ubuntu


Aliases are not available to the GUI shortcut tools. They don't read .bashrc, for one thing and the don't run the normal bash shell anyway. Aliases only work on the command line.

So, instead of using the alias, just make a shortcut that launches a shell and runs the command itself:

bash -c "~/ums.rb > note.txt && gedit note.txt && rm note.txt"

If your ruby script relies on variables set in your ~/.bashrc, source it:

bash -c ". ~/.bashrc && ~/ums.rb > note.txt && gedit note.txt && rm note.txt"


Dependency error installing build-essential

I solved adding bionic-updates and bionic-security lines to my /etc/apt/sources.list
So, my /etc/apt/sources.list looks like:
deb http://de.archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse
deb http://de.archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu bionic-security main restricted universe multiverse


What is the best way to check (and repair) hard drive for bad sectors?

There is no way to repair bad sectors. They are automatically marked as unusable, without user intervention.

To find out what various programs do, see the man pages, for example:

man badblocks

man fsck

man smartctl

You don't have to read everything, just the description.


Why can’t I print to my printer using Canon TS6000 series – CUPS+Gutenprint v5.2.13-2 driver?

I have been informed from the maintainer of the Canon gutenprint project that this is not the correct driver for my printer and that he expects "to be able to find time to work on support for some of the newer TS series by April."


Use it everyday! That's the most effective way :)


Simply do the following in Terminal to install Apt-fast.

sudo add-apt-repository ppa:apt-fast/stable
sudo apt-get update
sudo apt-get install apt-fast

Afterwards, a prompt will open up asking you to choose between apt-get and aptitude. Again, another prompt pops up asking to to choose between Axel and Aria2c (download managers). Choose the ones you like and you're done.

Now, simply replace apt-get in commands with apt-fast. Examples below:

sudo apt-fast install chromium-browser
sudo apt-fast upgrade

Done. Enjoy your increased apt-get download speeds.

This should work because its the stable version, can you please post what you typed into the terminal?


Found an easier solution than reseting BIOS!

sudo hciconfig hci0 reset

bluetooth was enabled on ubuntu 12.04.

I could do file transfer between Nexus7 and my laptop. but nexus7 stopped playing music and laptop started playing music!


Force network-manager to use wireless for an Internet connection

Create a new wired connection that is the same as the one you have already. Then edit the connection and go to IPv4 Settings -> Routes -> Use this connection only for resources on its network and tick the box.

The connection will use another connection for general Internet traffic.


How do I select in which OS my computer boots?

I had windows 7 and had the same issue.First try gently hitting F2 key RAPIDLY and REPEATEDLY as you turn on the system.Do not stop until the black bios info page shows.This will take you into your Bios setup

WARNING:  Do not change any setting you are not familiar with,look for the device boot up configuration page.Please be sure to read the settings explanation on the right side of the screen.This may or may not help depending on your setup.
The three other keys used on windows 7 for accessing screens before the full boot are F8, F9 or Delete. Always start from a turned off computer,not when restarting.Also you need to hit your key gently,yet very fast and repeatedly until it brings up a screen.

Usually F8 or Delete are assigned to bring your computer into safe mode.But they sometimes bring up boot screens,depends on the manufacturer.In short try each one individually until you find the key that corresponds to your needs.F2,F8,F9 then Delete.


How can I allow a user sudo/root on SFTP?

You don't - such a  mechanism for elevated privilege browsing as a non-root user doesn't exist in SFTP.

You would have to enable the root account and give whomever needs the elevated access direct access to that account instead, which for obvious security reasons (risk of bruteforcing the root account and risking someone gaining power over your system, for starters) is dangerous.


Fixed it for now I hope it wont happened again.

I ended up running: metacity --replace in the terminal to replace the window decorations.


Multi screen external monitor unrecognized

I have experienced the same trouble with my notebook and its ATi CCC. With a tool found on this site my external monitor is recognized immediately after plugging in. You will find a PPA to add so you can install it easily without fuzzing around in the Xorg.conf.

`sudo add-apt-repository ppa:hughescih/ppa && sudo apt-get update && sudo apt-get install autoswitcher

`
Keep in mind that adding PPA's might be causing trouble to your system.


Can someone explain why there exist two org.gnome.Software.desktop files? Which one (how) is loaded?

from this link https://developer.gnome.org/desktop-entry-spec/

If multiple files have the same desktop file ID, the first one in the
$XDG_DATA_DIRS precedence order is used.

if you run the command
echo $XDG_DATA_DIRS

you will notice, /usr/share/ubuntu/ before /usr/share/
Example:
$ echo $XDG_DATA_DIRS
/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop
$


You have a VFAT check on your boot that is taking 10s before file systems can be mounted.  To get rid of these 10 seconds use one of the following two solutions:

If the VFAT partition is a removable disk, attach it to a Windows machine and run a chkdsk  /f on that drive under Windows
If you don't have a Windows machine, download FreeDOS, install it on a USB stick and boot with that and then run the chkdsk /f from the DOS command line.

Only if those solutions do not work should you:

copy all data to another disk and reformat and copy back.

Your network resolving seems to be slow: check your network and/or DNS server as well.


Okay, solved using the following:

sudo apt-get install aptitude
sudo aptitude install winehq-stable

(After adding the correct winehq PPA.)

This removed wine-stable and installed both wine-stable-i386, wine-stable:amd64, and winehq-stable.

Thanks for reading, hope this case would be helpful.


R9 270x with AMDGPU driver under Ubuntu 16.04 with new 4.9 kernel

Be sure to have the latest kernel with amdgpu module and the latest AMD firmware (amdgpu-pro) in place, then try to set it for example in:

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

like this:

Section "Device"
  Identifier "AMD"
  Driver "amdgpu"
EndSection

KMS must be enabled and amdgpu not being blacklisted. This should already do the trick. You could as well blacklist radeon module.

Not sure if your card is a "Southern Islands" or "Sea Islands" if this is the case you might need to compile a kernel on your own if:

CONFIG_DRM_AMDGPU_CIK=Y

or

CONFIG_DRM_AMDGPU_SI=Y

are not set in the kernel config. Which option to choose depends on your gfx card.

When changing gfx settings you're always in near danger that X doesn't start any more. It's a good idea having a 2nd computer for surfing documentation.

Folks I'm sorry I can't verify my answer because I've got no amd card. So please be kind.

This is a summary from:

https://wiki.archlinux.org/index.php/AMDGPU
The top of my head
https://wiki.gentoo.org/wiki/AMDGPU


Remotely access Linux from Windows computers

You could store the windows version of Google Chrome (and it's subdirectories) on the server and just mount it using Samba, and run from there.  That way all clients would be running the same copy of Chrome, and they would all share data.

You would have to install it on Windows and copy the folder to the server, then share that server folder with samba, and mount it on the Windows machines as a samba share on bootup.  You should then be able to run it just fine.


How to use parted in a script, and get a blank PARTLABEL?

I found the way, and boy is it odd.  If I want parted to accept a blank string (at least for this purpose) I have to quote it three times.  That's right, three.
It looks like this:
parted -s $destination mkpart "'\ '" ntfs  1874585600s  1876559871s

So it's a backslash-space inside single quotes inside double quotes.  That works, and I've been unable to find anything simpler.  For instance if I just leave it out, parted still accepts the command, but uses 'ntfs' both as a filesystem type and a partition name.
Grrrrr.


Extremely slow internet wired connection in Asus x101h, Ubuntu 11.10

I believe what Igarzo is trying to do is to help you eliminate different problem areas.

To use his method you would either have to buy or make a "Crossover" Cat5 cable or purchase one as you will be connecting two like devices (computer ethernet port to another computer ethernet port).

To use a normal Cat5 patch cable will not work as the wiring is done differently (don't use the same one you connect your computer to the ethernet/broadband port).

In addition you will need to configure both IP addresses manually for both connected machines to something like 192.168.0.1 for the first machine and 192.168.0.2 for the second which defaults to a subnet mask of 255.255.255.0 if I remember right.

Keep in mind that if you are trying to send the files back and forth between a Linux machine and a Windows machine you may have to have Samba or the like installed on the Linux machine.

If the two machines transfer files at descent speeds, then you can rule out the machine(s) themselves as the blame. If the file transfer still resembles the speed of which you were getting having it hooked into the Internet then you may be looking at a driver, software or firewall issue.

If you have a firewall installed on your Linux machine you may want to check it's restrictions to be sure it's not bottle-necking your speed. Another area to check would to be sure that programs such as torrent downloaders are not running in the background sucking up bandwidth on either machine as one can impact the whole network when connected simultaneously.

If you don't wan't to do without the torrent manager, you can go inside most torrent managers settings and turn down the upload and download speeds to allow more bandwidth for other tasks (just remember not to set either to "0" as most torrent managers recognize this as unlimited bandwidth allocated.

Last but not least would be to make sure you are using the right or appropriate drivers for your network interface card or NIC.

Also this address has diagrams of what a crossover cable should look like at it's terminations. If you have a normal cable handy you can look closely at it's ends and see that the ends match in color order as opposed to a crossover cable.

Hope this information helps.


apt-get not updating and almost everything i try to install have issues with dependencies

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/Release

as the warning suggests its unable to fetch that url. Its your network issue. Not a source.list issue. Check if you have a working internet connection. Are you on a network that needs you to set proxy manually ? In such cases sudo apt-get update fails if proxy is not set properly for the sudo environment.


Generate Tree Output from Specific/General XML file in Bash

Adapting one of the examples from the xmlstarlet docs:

xmlstarlet sel -T -t -m '//*' \
    -i '@display' \
        -m 'ancestor-or-self::*' \
            -i '(position()=last())' \
                -o '-> ' -v '@display' -b \
            -o $'\t' -b \
        -n foo.xml

The example is:

  Print structure of XML element using xml sel (advanced XPath
  expressions and xml sel command usage)

xml sel -T -t -m '//*' \
-m 'ancestor-or-self::*' -v 'name()' -i 'not(position()=last())' -o . -b -b -n \
xml/structure.xml

  Result Output:

a1
a1.a11
a1.a11.a111
a1.a11.a111.a1111
a1.a11.a112
a1.a11.a112.a1121
a1.a12
a1.a13
a1.a13.a131

From here, the things we need to modify are:

print the display attribute instead of the name, so @display instead of name()
print it only for the last element. We already have the test for printing . for all but the last element, so it's easy to invert that.
print tabs to indent (we can do it after every element, it will just leave trailing, invisible tab), so just -o $'\t'. $'\t' in bash will get you a tab character.
print only for elements which have the display attribute, so -i '@display'

I have indented the command above to make the flow clearer.

The output I get:

$ xmlstarlet sel -T -t -m '//*' -i '@display' -m 'ancestor-or-self::*' -i '(position()=last())' -o '-> ' -v '@display' -b -o $'\t' -b -n foo.xml
-> English
    -> Main Menu
        -> Broadband
            -> Load and Save Profiles
                -> Load Profile
                -> Save Profile
                -> Delete Profile
            -> Interface
                -> xDSL
                -> SFP
                -> Ethernet
                -> SHDSL
            -> xDSL Interface
                -> xDSL Mode
                    -> Annex A/M
                    -> Annex B/J
                -> MAC Address
                    -> MAC Address
                -> Vectoring Mode
                    -> Disabled
                    -> Enabled
                    -> Friendly
                -> G.FAST
                    -> Disabled
                    -> Enabled

After thinking a bit, the following is simpler:

xmlstarlet sel -T -t -m '//*' \
    -i '@display' \
        -m 'ancestor::*' \
            -o $'\t' -b \
        -o '-> ' -v '@display' -n foo.xml

Using ancestor::* instead of ancestor-or-self::* makes printing the tabs correctly easier, and eliminates the extra test for last element.

Similar output, but without trailing tabs:

-> English
    -> Main Menu
        -> Broadband
            -> Load and Save Profiles
                -> Load Profile
                -> Save Profile
                -> Delete Profile
            -> Interface
                -> xDSL
                -> SFP
                -> Ethernet
                -> SHDSL
            -> xDSL Interface
                -> xDSL Mode
                    -> Annex A/M
                    -> Annex B/J
                -> MAC Address
                    -> MAC Address
                -> Vectoring Mode
                    -> Disabled
                    -> Enabled
                    -> Friendly
                -> G.FAST
                    -> Disabled
                    -> Enabled


"ERROR: invalid VBR checksum 0x0 (expected 0xbca782be)." while mounting a exfat partition

I'm sure your device isn't even FAT, so you don't need to use exfat option. Just let mount determine which filesystem the drive is using:

sudo mount -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,iocharset=utf8,namecase=0,errors=remount-ro,umask=0077" /dev/sdb1

It should be fine, unless your drive doesn't have a filesystem (in which case you need to format it) or the drive is severally damaged.


If you are using KVM you should use spice . spice is a built into KVM, works out of the box, and has better performance.

Use vmvga with ubuntu guests.

To connect, use spicy, a graphical agent.

Advantages include:

Better performance.
Higher resolution.
No need to install and configure anything in the guest.
You can steam audio / video over a LAN.
You can copy - paste (clipboard not files) from host to guest. You will need to install the spice-vdagent in the guest.

You can password protect the connection (enter a password in the password box).

You connect to the host (not guest) IP, starting with port 5900 . this is nice as the guests often use dhcp for ip addresses.

Screen cast (from out LUG) http://www.montanalinux.org/screencast-montanalinux-f16-kvm-virt-manager.html

The screencast is using Fedora, but same technology in Ubuntu


Linux Not Updating or Pinging To Internet (even after disabling ipv6)

If your robot doesn't have access to the internet then it will not be able to update or ping anything on the internet.

You answered your own question when you said "(NB: The WiFi does not provide internet connection, and is solely for SSHing into the robot, which is why I am using an ethernet to access the internet.)"

Your computer having access to the internet over Ethernet doesn't do anything for the robot because they are two separate things. In your case, ssh is only giving you shell access on the robot, it isn't acting as a proxy or a gateway.

I found some documentation from the Kuri site that explains how the advanced features need to be run on a computer connected to the same network as the Kuri (which your computer is)

  The following steps have to be run from a development environment connected to the same network as Kuri. The following has been tested with recent versions of Firefox and Chrome.

  checkout the code:

  git clone https://github.com/KuriRobot/kuri-documentation

  run the local server

  cd kuri-documentation/examples/webrtc
    python3 -m http.server

  open a browser window and point it to http://localhost:8000
      get the UUID of your robot by running the following command on the robot

  roboversion -
  enter the hostname and the robot UUID in the webpage and click the Join button
      you should see what the robot sees, and a text box will appear

  Extra steps: the rosbridge protocol

  The text box that appeared enables you to send commands and receive responses to and from the robot via the rosbridge protocol.

sounds to me like rosbridge should already be on the robot. If not, you should be able to download things to your laptop, then move them to the Kuri over SSH but with scp


This is called command substitution

tail -f /Users/jdoe/Sites/laravel7/storage/logs/laravel-$(date "+%Y-%m-%d").log

An older deprecated syntax uses backticks

tail -f /Users/jdoe/Sites/laravel7/storage/logs/laravel-`date "+%Y-%m-%d"`.log


MinimalCD Network autoconfiguration fails

You can try disabling Ultra DMAUMDA from the BIOS menu.
On the EBM LX800 you can find this under the internal peripherals sub-menu.

Disabling this option allowed me to install the minimalCD 11.10 i386 desktop edition.


How to instruct apt-get and/or synaptic to install from source code?

Apt-get doesn't work like BSD ports or Gentoo portage.  You can apt-get source and debuild all of them individually, but it's not easily automate-able or built-in.

You could theoretically script mirroring a source repo, building a dependency chain, starting at the root, and building each package... but generally for the target user-base of Ubuntu, it's not worth it.


how to remove desktop switching box that appears

Extensions come to the rescue. The extension "Disable Workspace Switcher Popup" unfortunately appears not actively maintained anymore, but still does the job even on recent versions of Gnome Shell.
An actively maintained extension, "Just Perfection", allows to disable a bunch of things, including the Workspace Popup.


How to handle missing package php5-cgi on Ubuntu Xenial?

The new package is php7.0-cgi.  php5 is being replaced with 7.0.  I would strongly installing the newest version.

sudo apt-get install php7.0-cgi

However I would recommend installing php-cgi meta package that depends on php7.0-cli for Ubuntu 16.04 to ensure you will always get latest PHP version on upgrades:

sudo apt-get install php-cgi


First, remove the current version of MySQL you're already using:

$ sudo apt-get purge mysql-client-core-5.5

Now, to install MySQL, run the following command from a terminal prompt:

$ sudo apt-get install mysql-server
$ sudo apt-get install mysql-client

During the installation process you will be prompted to enter a password for the MySQL root user.

Once the installation is complete, the MySQL server should be started automatically. You can run the following command from a terminal prompt to check whether the MySQL server is running:

$sudo netstat -tap | grep mysql

When you run this command, you should see the following line or something similar:

tcp        0      0 localhost.localdomain:mysql           *:* LISTEN -

If the server is not running correctly, you can type the following command to start it:

$ sudo /etc/init.d/mysql restart

You can edit the /etc/mysql/my.cnf file to configure the basic settings: log file, port number, etc.


Unable to suspend with nvidia proprietary drivers

Suspend/Hibernate/Resume is customizable to add special handling for your graphics card through the pm-utils (utilities and scripts for power management) package. Read the man pages for pm-action, pm-powersave, pm-is-supported, pm-suspend-hybrid, pm-hibernate, pm-suspend, and read the files in /usr/share/doc/pm-utils/.