Split 10GB text file 1) with a minimum size of the output files of 40MB and 2) after a specific string ()

The script below slices a (large) file into slices. I didn't use the split command, since the content of your file has to be "rounded" by records. The size of the slices you can set in the head section of the script.

The procedure

Difficulties
Because the script should be able to deal with huge files, either python's read() or readlines() cannot be used; the script would attempt to load the whole file at once into memory, which would certainly choke your system. At the same time, divisions have to be made, "rounding" sections by a whole record. The script should therefore somehow be able to identify or "read" the file's content.

What seems to be the only option is to use:

with open(file) as src:
    for line in src:

which reads the file line by line.

Approach
In the script I chose a two-step approach:

Analyze the file (size, number of slices, number of lines, number of records, records per section), then creating a list of sections or "markers" (by line index).
reading the file again, but now allocating the lines to separate files.

The procedure to append the lines to the separate slices (files) one by one seems inefficient, but from all I tried it turned out to be the most efficient, fastest and least consuming option.

How I tested
I created an xml file of a little over 10GB, filled with records like your example. I set the size of slices to 45mb. On my not-so-recent system (Pentium Dual-Core CPU E6700 @ 3.20GHz × 2), the script's analysis produced the following:

analyzing file...

checking file size...
file size: 10767 mb
calculating number of slices...
239 slices of 45 mb
checking number of lines...
number of lines: 246236399
checking number of records...
number of records: 22386000
calculating number records per section ...
records per section: 93665

Then it started creating slices of 45 mb, taking appr. 25-27 seconds per slice to create.

creating slice 1
creating slice 2
creating slice 3
creating slice 4
creating slice 5

and so on...

The processor was occupied for 45-50 % during the process, using ~850-880mb of my memory (of 4GB). The computer was reasonably usable during the process.

The whole procedure took one hour and a half. On a more recent system, it should take substantially less time.

The script

#!/usr/bin/env python3

import os
import time

#---
file = "/path/to/big/file.xml"
out_dir = "/path/to/save/slices"
size_ofslices = 45 # in mb
identifying_string = "</record>"
#---

line_number = -1
records = [0]

# analyzing file -------------------------------------------

print("analyzing file...\n")
# size in mb
print("checking file size...")
size = int(os.stat(file).st_size/1000000)
print("file size:", size, "mb")
# number of sections
print("calculating number of slices...")
sections = int(size/size_ofslices)
print(sections, "slices of", size_ofslices, "mb")
# misc. data
print("checking number of lines...")
with open(file) as src:
    for line in src:
        line_number = line_number+1
        if identifying_string in line:
            records.append(line_number)
# last index (number of lines -1)
ns_oflines = line_number
print("number of lines:", ns_oflines)
# number of records
print("checking number of records...")
ns_records = len(records)-1
print("number of records:", ns_records)
# records per section
print("calculating number records per section ...")
ns_recpersection = int(ns_records/sections)
print("records per section:", ns_recpersection)

# preparing data -------------------------------------------

rec_markers = [i for i in range(ns_records) if i% ns_recpersection == 0]+[ns_records]   # dividing records (indexes of) in slices
line_markers = [records[i] for i in rec_markers]                                        # dividing lines (indexes of) in slices
line_markers[-1] = ns_oflines; line_markers.pop(-2)                                     # setting lias linesection until last line

# creating sections ----------------------------------------

sl = 1
line_number = 0

curr_marker = line_markers[sl]
outfile = out_dir+"/"+"slice_"+str(sl)+".txt"

def writeline(outfile, line):
    with open(outfile, "a") as out:
        out.write(line)

with open(file) as src:
    print("creating slice", sl)
    for line in src:
        if line_number <= curr_marker:
            writeline(outfile, line)
        else:
            sl = sl+1
            curr_marker = line_markers[sl]
            outfile = out_dir+"/"+"slice_"+str(sl)+".txt"
            print("creating slice", sl)
            writeline(outfile, line)
        line_number = line_number+1

How to use

Copy the script into an empty file, set the path to your "big file", the path to the directory to save the slices and the size of the slices. Save it as slice.py and run it by the command:

/path/to/slice.py

Notes

The big file's size should exceed the slice's size at least a few times. How bigger the difference the more reliable the size of the (output) slices will be.
The assumption was made that the average size of records (seen in the bigger picture) is about the same. Looking at the huge amount of data here one would expect that would be an acceptable assumption, but you'll have to check (by looking if there is a big difference in the size of the slices).


your config file look ok. Did you try to reinstall grub? I think it may be your bios looking for plug n play device which either not exist or faulty. anyway you can always reinstall grub from within your ubuntu.


The error message is quite clear:

  specified path not a directory for JDK

/usr/bin/java it is not a directory to JDK is command for running compiled java programs .class files.

For setup JDK in IntelliJ go to Project Structure in section Platform Settings choose SDKs and add path to JDK usually on Ubuntu it installed in /usr/lib/jvm/. After that in section Project Settings choose Project tab and finally select added JDK:


Ubuntu 12.04.2 Installation Problem: Can't boot or Use WUBI

Ok. Thanks bcbc, and geezanansa for taking time to replying. The problem is solved now.
I think the problem was in CD with which I was booting, i just burned it on an USB and booted from there and it installed. Though don't know, why WUBI wasn't working. I think because my existing OS was 32 bit.

Anyways, I have installed ubuntu and this is my first time, using ubuntu (or any Linux distro), till now its good. Will ask for help in case of difficulty :-)

P.S.: I am the asker (Abhishek) only, but have two accounts here. Can ayone tell, how can I delete my this one and use my above (Abhishek) username id?????????


Both your sed expressions look malformed... here's the first:

sed -n "$awk1,"$awk2"p" run.adf > first

I would suggest you're actually looking for:

sed -n "s/$awk1/$awk2/p" run.adf > first

And alter the second one similarly.

sed -n "s/$awk3/$awk4/p" first > atoms


How to install Wine from already downloaded package?

Assuming you have downloaded the .deb package, then installing it comes down to the following command: sudo dpkg -i your-package.deb. You might run into dependency problems, though. You'll have to find all the missing dependencies, download the packages and install them in the same way. Of course, those packages themselves might lead to missing depencies, and therefore, ...

Alternatively, just use apt: sudo apt-get install wine. It will solve the dependency problem for you.


Error on sudo apt-get update, 404 Not Found

As the error message indicates, there is a problem with this particular repo.

Go to System Settings->Software & Updates->Other Software and unclick (or delete) the offending repo(s).

sudo apt-get update should now work.


Can not install Nvidia drivers in Kubuntu 18.04/18.10

I ran into the same problems when I tried to install die Nvidia drivers in order to install CUDA. The Driver-List provided by Plasma (where you switch between nouveau and proprietary) didn't work either.

What did work for me (Kubuntu 18.04 and Ubuntu 18.04 with additional KDE) was this:

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo ubuntu-drivers autoinstall

(Source)

You may have to remove your manually installed drivers before doing this.


Unable to do administrative tasks/install packages

Thes question was answered by the OP in the comments

  updated to a newer version, that fixed the problem


In my experience, I don't think there is something faster in the command line as dd. Adjusting the bs parameter can increase the speed, for example, I have 2 HDD that I know have a read/write speed greater than 100 MB/s so I do this:

dd if=/dev/sda of=/dev/sdb bs=100M

There is also pv (Needs to be installed first) that checks for the fastest speed on both drives and then proceeds on cloning. This has to be done of course from root:

pv < /dev/sda > /dev/sdb

With PV I got 156 MB/s

The nice thing about pv apart from the speed is that it shows the progress, current speed, time since it began and ETA. In regards to HFS+ I would not know, am just trying to help on the "speed" part. With pv or a very optimized bs parameter, you can do a 4 TB drive in less than 7 Hours (6 Hours 50 Minutes at a current speed of 150 MB/s).

I did a couple of tests with the connection types you were using and others I had available. I was using the Asus Z87 Pro and the Intel DZ68DP. This were my results, but first we need to know that the theoretical speeds for many transfer rates (Raw speeds) are just that, theory. Doing real tests revealed they are between 40% to 80% of that raw speed. This tests can change depending on Device used, connection type, motherboard, type of connecting cable, filesystem type and more.  With that in mind, this is what I got (I only tested Write speed to the Device, read is typically higher):

Connected Device  -  Connection Type  -  Speed (Write Speed)
  USB 2.0                 USB 2.0              25 MB/s
  USB 3.0                 USB 2.0              35 MB/s
  USB 3.0                 USB 3.0              73 MB/s
  eSata                   eSata                80 MB/s
  Sata 2G HDD             Sata 2G              120 MB/s
  Sata 3G HDD             Sata 2G              140 MB/s
  Sata 3G HDD             Sata 3G              190 MB/s
  Sata 2G SDD             Sata 2G              170 MB/s
  Sata 3G SDD             Sata 2G              210 MB/s
  Sata 3G SDD             Sata 3G              550 MB/s


Your jobs are executed. To see it change your cron job the next way:

* * * * * /usr/bin/echo "hello" | logger

| logger will send your echo to syslog so you could see it. But in your case without logger it is actually shown in some virtual terminal you couldn't see.

$ journalctl -f

тра 08 00:47:01 ubuntu CRON[21927]: pam_unix(cron:session): session opened for user user1 by (uid=0)
тра 08 00:47:01 ubuntu CRON[21929]: (user1) CMD (/usr/bin/echo "hello" | logger)
тра 08 00:47:01 ubuntu user1[21931]: hello

From man logger:

DESCRIPTION
       logger makes entries in the system log.

       When  the optional message argument is present, it is written to the log.  If it
       is not present, and the -f option is not given either, then  standard  input  is
       logged.


Sublime text conflict with systems's locale

The problem is that LC_ALL is set to "C" somewhere. LC_ALL should not be set persistently at all on an Ubuntu desktop. If it is, it overrides any GUI for setting locales/language.

I'd start to check out the /etc/default/locale file. If you find the line

LC_ALL=C

there, then open the file for editing, remove that line, and relogin.


Failed to write (No space left on device)

Your problem isn't the 18GB free on /

The problem is:

/dev/sda1                  236M  226M     0 100% /boot

The package installer is working on /boot/vmlinuz-3.13.0-91-generic and there is no space available.

You need to increase the size of this partition.

As Anwar stated in comment a minute ago see: askubuntu.how-do-i-increase-the-size-of-boot

Originally I said to see the Q&A: askubuntu.com ..how-to-increase-size-of-boot-partition-using-gparted which is also helpful.


It was my graphics card who cannot handle OpenGL 2.0 as KDE 5 needs at least OpenGL 2.0. When it freezes, KDE sends impossible demands to the graphics card as it could not create shader because it does not have OpenGL 2.0, and KDE does not give up to go to software renderer, so my graphics card is stuck and so my computer. It did not affect games.

I installed Xubuntu, then I installed KDE 5, then I forced QT to go to software renderer by going to /etc/security, putting an environment variable for QT to use software rendering.

Everything works like usual, but I saw a 100% transparent panel, could click on taskbar buttons, nothing else than them (could not click or hover on app icons on start menu), and clicking OK on error causes KDE to give up, crashing to the lightdm wallpaper, and I have to go to TTY to do kill -9 -1 to restart the DM.


How to sync iPod ratings and play counts to Banshee?

This is a fairly common feature request, but unfortunately, it isn't yet available.  Some progress has been made, but this probably won't happen before Banshee's 2.0 release in April.  To stay up-to-date on the progress of this issue, you can CC yourself to this bug report: https://bugzilla.gnome.org/show_bug.cgi?id=389550


my index.cgi does not run instead it only prints its content

You might want to follow one of the Apache CGI tutorials, e.g.

https://code-maven.com/set-up-cgi-with-apache
http://httpd.apache.org/docs/2.4/howto/cgi.html

(Google for "apache cgi tutorial" for more)


Is there any way of enabling middle click scrolling?

You can enable it during the current session using the xinput command.  First of all, determine the ID of the device you want by running the xinput list command.  The output should look something like the following:

⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Logitech USB Receiver                     id=8    [slave  pointer  (2)]
⎜   ↳ Logitech USB Receiver                     id=9    [slave  pointer  (2)]
⎜   ↳ Lite-On Technology Corp. ThinkPad USB Keyboard with TrackPoint    id=12   [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Power Button                              id=7    [slave  keyboard (3)]
    ↳ Logitech Logitech USB Headset             id=10   [slave  keyboard (3)]
    ↳ Lite-On Technology Corp. ThinkPad USB Keyboard with TrackPoint    id=11   [slave  keyboard (3)]

Note the ID associated with the device you want to enable mouse wheel emulation for, and then run the following two commands:

xinput set-int-prop $ID "Evdev Wheel Emulation" 8 1
xinput set-int-prop $ID "Evdev Wheel Emulation Button" 8 2

The first command enables mouse wheel emulation, while the second sets it to activate when the middle (second) button is held.  You can disable wheel emulation by running:

xinput set-int-prop $ID "Evdev Wheel Emulation" 8 0


How to distribute internet speed equally

Although this is a bit different that what you asked for, this may be one solution. If you take the number of PCs and divide the speed by that you could use wondershaper for the Ubuntu computers.

$ sudo apt-get install wondershaper

To use it, run ifconfig to find the name of your network controller. After that, type the upload speed in Kbps and and finally upload speed.

$ sudo wondershaper eth0 1024 256

For more complete information see this link: http://binwaheed.blogspot.com/2011/01/limit-internet-bandwidth-usage-internet.html


Why doesn't the PrintScreen dialog show up in Gnome?

Assuming that I have read this bug-report correctly...

This is by design. No really!

Comments #37 onwards talk about this.

The current unity patches state:

  on Unity sessions display a confirmation dialog after taking
  screenshots with the keybindings, the auto saving behaviour is
  confusing our users

The thread carries on:

  but your fix doesn’t help when I don’t use Unity. Why did you think
  this only applies to Unity users?

With the reply:

  because we keep being asked by GNOME upstream and GNOME user to let
  their desktop alone and ship it as designed so that's what we try to
  do, we stick to upstream behaviour for GNOME environments and take
  design decision for Unity

So there you have it.  The Gnome-Developers are insistent that their desktop environment should behave this way.  Its an upstream issue.  The Canonical Developers are respecting this decision and hence the "divergence" - Unity users have the Save as dialog whilst gnome-shell users have the by-design no dialog functionality.

Thus if you are using gnome-shell/gnome-classic, all the screenshots are saved in your home pictures folder ~/Pictures

Note: You can override the screenshot location with gsettings (command-line) or dconf-editor (GUI):

set the org.gnome.gnome-screenshot auto-save-directory to file:///home/yourusername/wherever/you/want


Ubuntu 18 WiFi adapater not found in HP laptop

For the rtl8723de follow these instructions https://github.com/smlinux/rtl8723de

The commands given there, for installation, are:

git clone https://github.com/smlinux/rtl8723de.git -b 5.0-up
dkms add ./rtl8723de
dkms install rtl8723de/5.1.1.8_21285.20171026_COEX20170111-1414
depmod -a
reboot

List of all Realtek Wi-Fi supported https://github.com/lwfinger/rtlwifi_new


Can't open desktop folders by double-clicking on Ubuntu 17.10

My system is Ubuntu 17.10.

I just had this problem 5 mins ago. Here is my solution.

Just install gnome-tweak

sudo apt install gnome-tweak-tool

Then turn off and turn on some of the options in the Desktop. Like show icons turn on and turn off. Then it seems like things are refreshed and everything works again!


Where are stored cache, temporary files and all data in Brave Browser?

On my Ubuntu, brave-browser cache is stored in :

$HOME/.cache/BraveSoftware/Brave-Browser/

and the brave-browser data is stored in :

$HOME/.config/BraveSoftware/Brave-Browser/


I finally got it to work. Tumbleweed's post here pointed me to what went wrong. I changed the mirror to Main Server and it all worked fine!

Anwar Shah's post

I suppose even this can be done, but changing the mirror is a better and more permanent solution.


Cannot get to GRUB2 bootloader or Ubuntu

You need to repair your windows bootloader and then make grub2 as default bootloader.To do that follow the below steps,

Boot windows installation disk then select the "windows repair" or "repair your computer" option before you go into the installation process.
After selecting windows repair option,it will take you to the next screen.In that screen select the "command prompt" option
Then run the below commands,on it.

bootrec /fixmbr
bootrec /fixboot
bootrec /rebuildbcd

This will repair your windows bootloader.
Atlast boot boot-repair-disk and click on the recommended repair option.Now it works.


getting setgid:Operation not permitted error while running 'su' command - Ubuntu 12.04

Ubuntu only allows sudo to increase privilege level, not su (unlike other distros). To get a root shell, try this:

sudo su


Unable to start jack server ? Service is available (org.jackaudio.service aka jackdbus).

I am new but I will try to answer your question. It sounds like you may be going through something similar to my own ordeal. Try this in the terminal. Here is the code.

pulseaudio --kill
jack_control  start.

Then when you are done with jack do this. Here is the code.

jack_control exit
pulseaudio --start.

I hope this helps.


Using 'at' command for timed video recording the next day and do it only once

Your syntax is equivalent of:

notify-send "Hello" | at now +1 minute

Where the notify-send command will be executed immediately and nothing will be piped to the standard input of at. By using atq to get the latest job number and at -c <job-number> we can see what actually will be executed. So the analyse of the above job will show nothing:

$ at -c "$(atq | sort | awk 'END{print $1}')" | grep 'Hello'

The proper syntax is to use echo to output your command as a string that will be piped to the standard input of the command at:

echo 'notify-send "Hello"' | at now +1 minute

In this case the output of the analyse of the latest job will be different:

$ at -c "$(atq | sort | awk 'END{print $1}')" | grep 'Hello'
notify-send "Hello"


Try this:

du -sh *

The s option there means "summarize", to display only a total for each argument, and the * means you will get that for each directory (and file) where you stand.


Why is mainstream Ubuntu still i386-compiled?

During the 10.10 development cycle the decision was made to drop support for i386 and i486 entirely.  You can see the original specification here: https://blueprints.launchpad.net/ubuntu/+spec/foundations-m-686-compile.  I believe support may have been dropped for i586 as well, although that was a bit more controversial.

Importantly, this wasn't just kernel optimizations (686-compiled kernels had been available long before), but every package in the archive.

However, the name i386 for the 32-bit version of Ubuntu still lingers around in a few places, such as in package description fields (which are built for arches "i386" and "amd64" rather than "32bit" and "64bit").  These are just cosmetic issues in technical parts of the distro, however, and for a whole host of reasons aren't worth updating.


Change current working directory only by typing the name of the new one

I just find out that by activating autocd shell option, using the following command:

shopt -s autocd

then

  a command name that is the name of a directory is executed as if it
  were the argument to the cd command

(from man bash, somewhere at the line 5131).

So it will actually let me use any directory as a command and will cd to it:

To make the change permanently, add the following line to the end of your ~/.bashrc file:

shopt -s autocd


How to regenerate .desktop files for all applications that are currently installed on system

Since only files extracted from packages are supposed be stored in /usr (but not /usr/local) you can use the package manager to recover all those files:

dpkg-query -S [PATH] lists all currently installed packages that (used to) have files in [PATH].
With a bit of mangling we can pass the package names to apt-get to reinstall them:

xargs -r -d '\n' -a <(
    dpkg-query -S /usr/share/applications/ <&- |
    gawk -F '[,:][ \t]' '{ for (i=1; i<NF; i++) if (!a[$i]++) print $i; }'
  ) -- sudo apt-get install --reinstall --

If there are packages among them that weren't installed from a package repository but manually from a Deb package file, apt-get will complain that it can't find those particular packages and you'll have to install them anew.


Are there any tiling window managers compatible with Unity3D?

It's not exactly what you wanted, but there is support for some tiling-like features in Compiz:

Ctrl+Alt+1 on the number pad will put a window onto the bottom-left corner, and the rest of the numbers will put windows to other corners.
Ctrl+Winkey+Left will put the window on the left side of the screen, and Ctrl+Winkey+Right will put it on the right.

I hope that'll be of some use to you.


Rinzwind has already presented reasons why slashes and other special characters are not desirable in filenames and directory names. My answer presents a simple workaround via Nautilus scripts.
Introduction
The following script relies on existence of .directory_description file in each directory ( note the leading dot ). If the file doesn't exist user will be prompted to create one.
Advantages of this approach are:

Simple to use : .directory_description is just text file, therefore simply editable via text editor. It's just right click action, so even non-technical user can use it.

Description is part of directory, so when properly backing up directory ( with inclusion of all files, including the dot files) , the description will be backed up as well.

Obtaining the script
The script is available as part of  my github repository as well as below. For those who have git installed, use the following steps in terminal.

cd ~/.local/share/nautilus/scripts
git clone https://github.com/SergKolo/nautilus_scripts

Those who do not have git follow these steps:

copy the source code directly from this answer.
Save the code as ~/.local/share/nautius/scripts/read_dir_description.py file.
Ensure it is executable with chmod +x ~/.local/share/nautius/scripts/read_dir_description.py

Now, every time you right click on directory and go to scripts menu, you will be able to run read_dir_description.py on that directory.
Script source code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Author: Serg Kolo
Date: Aug 16,2016
Written for: http://askubuntu.com/q/809925/295286
"""
import subprocess
import sys
import os.path

def display_file(textfile):
    """ Displays file containing
        directory description if
        the file exists
    """
    subprocess.call([
                    'zenity',
                    '--text-info',
                    '--filename=' + textfile
                    ])

def create_file(textfile):
    """ Creates text file containing
        directory description
        if the description doesn't exist
    """
    try:
        err_text = '"This directory doesn\'t have description.' +\
                   'Would you like to create one now?"'
        subprocess.check_call([
                              'zenity',
                              '--error',
                              '--text=' + err_text
                              ])
    except subprocess.CalledProcessError:
        sys.exit()

    # ensure we create the file
    with open(textfile,'w') as text:
        text.write('')

    try:

        output = subprocess.check_output([
                           'zenity',
                           '--text-info',
                           '--editable',
                           '--filename=' + textfile
                           ])
    except subprocess.CalledProcessError:
        sys.exit()

    with open(textfile,'w') as text:
        text.write(output.decode())

def main():

    file_name = '.directory_description'
    directory = os.path.abspath(sys.argv[1])
    file_path = os.path.join(directory, file_name)

    if os.path.isfile(file_path):
        display_file(file_path)
    else:
        create_file(file_path )

if __name__ == '__main__':
    main()

Script in Action
Accessing the script via right click

Dialog notifying that description doesn't exist

Sample directory description


First off, I strongly suggest you attempt to do an entire drive image copy of the damaged drive.  You'll need a hard drive at least as large as the partition you are trying to recover.  Assuming the partition of that drive is listed in /dev as /dev/sda2, you would mount the backup drive to (say) /mnt/restore

From there, you'd use the command: dd bs=4096 if=/dev/sda2 of=/mnt/restore/sda2.img conv=noerror,sync

This creates an image of the hard drive, including it's 'bad' blocks (if any, as it sounds there are.)

Next, disconnect the drive; a damaged drive only gets worse as it's used.

Next, you'll need to install testdisk:

sudo apt-get install testdisk

Accept it's request for untrusted sources (if you're so inclined.)

Finally, run test

From here, you'll need to use testdisk to find and recover files:

testdisk /mnt/restore/sda2.img

The menu is pretty self-explanatory, but using test disk is probably beyond the scope of this 'answer.'  Here's a good place to get started:

http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step

http://www.howtoforge.com/data_recovery_with_testdisk

These should help you recover your files, and won't do any more damage to your hard drive than necessary.  Once you've done as much recovery as you can from the image file, you can safely delete it.  You could then try running test disk on the damaged drive directly, and try recovering only the files that are absolutely missing.

Best of luck to you.


You can speed up or slow down videos in the Totem Video Player using a utility button at the bottom of the player.

Totem video player in Ubuntu 18.04


Spyder can be installed with the following commands:
Spyder
sudo apt install spyder

Spyder3
sudo apt install spyder3

Python IDE for scientists
Spyder is a free open-source Python development environment providing MATLAB-like features in a simple and lightweight application.
If for you want to install the latest version of Sypder 3 instead of the Ubuntu package maintainer's version in Ubuntu 18.04 and earlier, the commands to do so are as follows:
sudo apt install python3-pip python3-pyqt4 python3-pyqt5 python3-pyqt5.qtsvg python3-pyqt5.qtwebkit
sudo python3 -m pip install --upgrade spyder

In Ubuntu 20.04 and later the commands to install the latest version of Sypder 3 are:
sudo apt install python3-pip python3-pyqt5 python3-pyqt5.qtsvg python3-pyqt5.qtwebkit
sudo python3 -m pip install --upgrade spyder

Spyder can do inline plotting. To try out this feature open the terminal and type:
sudo apt install python3 python3-matplotlib spyder3 ipython3

After the ipython3 prompt in the IPython console copy/paste the below code and press the Enter key to run it.
import matplotlib.pyplot as plt
x, y = [-1, 12], [1, 4]
plt.plot(x, y, marker = 'o')


Do pastes made on Ubuntu Pastebin Service get deleted?

It took 8 years for Pastebin.com to surpass 10 million "Active" pastes (not spam or expired pastes).1 Less than a year later the owners of Pastebin.com tweeted that they had already surpassed the 20 million active pastes mark.Tech Crunch

The maximum size a paste can be is 512 kilobytes (0.5 megabytes). This should be enough for almost any script, and it prevents people from jamming our servers. PRO members are allowed to create pastes up to 10 megabytes.

As far as pastebin.ubuntu.com, from what I found out from my pastes that it's probably a six to nine month windows.  Because anything that I pasted that's less that nine months old, I can still find, but anything over a year I'm not able to find.

I hope that answers your question.


Replace or enhance default on-screen Keyboard

From the Ubuntu Documentation:

Press the flag () button to change your settings for Language or Input Sources.

If you are unable to do so, you can change the layout of the keyboard via following this guide.

To qoute from the article:

If you wish to configure the keyboard for the current session only, run

dpkg-reconfigure keyboard-configuration

Then select the layout with the extra keys (like Alt, Ctrl and umlauts).

If you want to replace the On Screen Keyboard, use this guide to install florence keyboard to your system. It is extremely configurable.


Lock folders by password, is there easy way? any program?

There is a couple of ways to do this.

1) using crypt command.  This command can encrypt and decrypt a file for you.  (you might need to install it by 'sudo apt-get install mcrypt').

2) change read permission for the directory.


Blank screen after installing on a Dell Inspiron N4030

Your LiveCD works perfect because it uses vesa for graphics driver, you have as graphics an Intel HD that started to get support around 10.04 so there is a chance that something is going wrong during hardware detection.

More recent versions of Ubuntu fully support your graphics card (11.04 and the new 11.10 that is going to be released in a few days).

I recommend that you try out your laptop with 11.04, its stable, has full support and should support your graphics driver right out of the box.

Has options you can try to install a new graphics driver for your system, a ppa with the newest drivers can be found here.

Add it with sudo apt-add-repository ppa:glasen/intel-driver and after sudo apt-get update and a sudo apt-get upgrade install the xserver-xorg-video-intel using the command sudo apt-get install xserver-xorg-video-intel.


Open a terminal and run:

sudo apt-get remove --purge wesnoth-*

If you want exactly to see packages containing wesnoth that you've installed then run:

dpkg -l | grep -i wesnoth

Then you can purge those packages by one manually with apt-get remove --purge command.

You can also manually search for config(cache) folder of the game in your Home Directory just open your Home Directory and press Ctrl+H and type in search bar wesnoth and delete what's related to game.


Access Officejet Pro L7590 memory card reader

Try to use smbclient and test with different parameters.

For example,

nmblookup -I 192.168.1.254 -S \*

and then

smbclient -L THATNAME


How to get a notification when other users login into "my" system?

For the part of notification when someone loggs in your system, you could try to put a little script in a /etc/profile.d script. Using notify-send (part of the libnotify-bin package) you could try this :

/etc/profile.d/notify_log.sh

notify-send -t 3000 "User logged in" `whoami`

and then, every time someone will log in your system you will be notified.

EDIT:
So, it doesn't work well :(
If you configured a mail server on your machine, you can use the mail command instead of notify-send.

But according to the post here, the better solution would be a pam_exec script.


set screen resolution higher than what's supported

Try this:

sudo xrandr --addmode default 1440x900


Kernel panic after running a Windows 10 virtualbox

The problem was caused by Timeshift he was trying to copy the 50Go virtualDisk file in a location with not enough space. I had to kill it to access its gui and disable daily saves.


Windows broke my md RAID. (Unknown RAID level -1000000)

It's not the partitions that were damaged, it was your metadata. Having the conf file around is nice because it tells you which UUIDs really matter to the original install. So your task is to preserve those UUIDs and delete the other ones, and then cross your fingers and pray that your data wasn't corrupted in addition to the metadata mess up.

Look in man mdadm for metadata manipulation switches.

As a side note, this is where HW RAIDs have value, when using multiple operating systems, the HW RAIDs metadata is never exposed to the host, they get a "new disk", not a disk that has a partition with some metadata on it. So what you just encountered can't happen.

Good luck, if you really get stuck you might want to join the MD mailing list and for help there. http://marc.info/?l=linux-raid&r=1&b=201204&w=2


evolution-calender-factory using too much memory

taking the procedures from the link you posted, I hatched together following solution:

First disable showing events in the indicator-datetime with gsettings set com.canonical.indicator.datetime show-events false - as this is keeping evolution-calendar-factory up running.

Second create a autostart instance of evolution-calendar-factory so the hung process gets flushed, therefor nano ~/.config/autostart/evolution-calendar-factory.desktop  and copy and paste the following into it:

[Desktop Entry]
Type=Application
Exec=bash -c 'sleep 1m; /usr/lib/evolution/evolution-calendar-factory'
Hidden=false
NoDisplay=true
X-GNOME-Autostart-enabled=true
Name=Workaround for evolution-calendar-factory

now we have to make the file executable with chmod a+x ~/.config/autostart/evolution-calendar-factory.desktop and on the next restart it should work.

P.S: the link you posted is for the phone and tablet version here is the link to the desktop bug: https://bugs.launchpad.net/ubuntu/+source/indicator-datetime/+bug/1589605


How can I tell if the Pause/Break key is working?

You can test that any key is working with the xev command.

Press Ctrl + Alt + T to open a terminal window, then type xev. Another popup window opens but you can ignore that (it displays mouse activity). Watch the terminal output while pressing the Pause/Break key and see if there is any output. Here's mine:

Note that the window created by xev will need to be the window in focus, otherwise, the utility won't capture the key press.

For how to use this data, or to remap the key, see this similar question.


How to test if the Couchbase process is running in Ubuntu?

From Couchbase documentation it is apparent that the service starts as part of init scripts in /etc/init.d/. That means you should be able to find your service via service --status-all or if you're on Ubuntu 16.04 and newer via  systemctl list-units --type=service command.


Why do I have updates for Dolphin and Konqueror while I'm using only Unity?

What have you installed on your Ubuntu system that requires KDE libraries ??  Not all programs and games use gtk/gnome and will quickly pull in the relevant kde libraries needed to work...


Ubuntu 18.04 stuck on Loading initial ramdisk

remove the quiet and splash parameters from the kernel command line parameter at boot will solve the problem.

I have the similar issue with dell vostro 3480 for ubuntu 18.04

Edit /etc/default/grub. From the shell:

sudo <your favorite editor> /etc/default/grub

Find the line

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

Change it as

GRUB_CMDLINE_LINUX_DEFAULT=""

and save.
From the shell run

sudo update-grub


sudo apt-get -f install error, how to remove or reinstall corrupted packages

Try to view the last installed packages [here] and determine if  those are the cause of errors, also don't install packages from outside synaptic [except if you carefully log these packages]

If you don't know how to solve problem, post inhere the last installed packages , [whole history is not needed, just last 3 or 4 packages]


Dead Island from Steam not working on my ubuntu 17.10

Found the solution:

use mesa at version 18 at least.

for example from here:

https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers

the game works


Flash is GTK+2 and Epiphany is GTK+3...that's the problem.

install flash sudo apt-get install flashplugin-installer
install nspluginwrapper sudo apt-get install nspluginwrapper
sudo nspluginwrapper -i
/usr/lib/flashplugin-installer/libflashplayer.so
nspluginwrapper -v -a -n -i


Identical content search between files of different names?

Here you can do with awk as:

awk -F'-' 'NR == FNR { hold[$1]= $2; next } $2 != hold[$1] { print $1, hold[$1], $2 }' file1 file2
example3   C  B
example1   A  E

we are reading file1 into an awk associated array called hold with the key as first column and value from second column, where columns delimited by a hyphen we specified with awk's -F'-' option until the Number of Records is equal with File Number of Records - which it always true for first input file only, here file1.

then check column2 of file2 against the key with same first column we have saved in array, if those were different in second column, then we will print that.


In Kmail go to Settings menu, click on Configure Kmail, click on the account you do not want to "run in the background", click the Modify button in the right panel and uncheck Enable interval mail checking.


What is the best value for the bs option of dd command?

While it is true that dd is dangerous, there is also some paranoia about it. It is dangerous because if used wrongly, you can easily overwrite the data on your disk, not because it explodes if you bump it against the wall. You shouldn't be terrified of it, just read through man dd to get an idea of how it works.

Anyway, the bs option simply controls how many bytes dd should read at a time. The "right" value will depend on what you are trying to do but a "wrong" value will simply make the operation slower. This is not where the danger lies. As explained in info dd:

bs=BYTES'
     Set both input and output block sizes to BYTES.  This makes `dd'
    read and write BYTES per block, overriding any `ibs' and `obs'
    settings.  In addition, if no data-transforming `conv' option is
    specified, input is copied to the output as soon as it's read,
    even if it is smaller than the block size.

The common danger with dd is that it is simple to mistake the input file for the output file and end up wiping your drive. That is what you should look out for.

That said, for a new Linux user, it really makes much more sense to use a differfent tool to clone a hard drive. Instead of using a normal Linux distribution CD, use one that is specifically created for this task. For example http://clonezilla.org/. Just download the clonezilla ISO, burn it onto a CD and boot from it. It will present you with an interactive menu allowing you to easily make an image of your hard drive:


Where on earth are my fonts? Firefox has nothing for "sans-serif"?

If you know the name of any of the font packages you typically have installed, you can use the locate command:locate fontName | less or locate fontName | grep -iv java | less to filter out unwanted results.

If you do not know the font name, you will have to get your system back to a working state and then see if you can identify them. Either way, 'locate' will probably be able to show you where they are and if they move after your Clementine, etc. setups. For example, do you have much inside of /etc/fonts? Or /etc/X11/fonts?

UPDATE: Since the problem seems to be with the default sans-serif, do fc-match sans-serif to find out what your system wants to use and make sure that it is available.


How do I know if my Ubuntu system has a virus?

I have been using Linux (Mint right now) for about 3 years. As a typical former Windows user, I worried about viruses at first. While they are not unheard of in Linux, they seem to be rare. So far, I have had no need for antivitus on Linux; I always use a firewall and a router, and that seems to be sufficient.

There is the risk of viruses that target Windows finding their way onto your system, but they can't do anything on your Linux system. They can, however, be passed on to a Windows machine, if you share files with a Windows user. But this can be avoided by scanning the files you transfer with the antivirus on the Windows machine before opening them. I believe the built-in security program in Windows 10 (forget what its called) can easily be set to scan any USB device before opening the files on it.


Cannot see user desktop (Applications, Places, System...) when I log in

Those menus have been phased out ever since the introduction of Unity (circa Ubuntu Netbook 10.10). You should see a launcher bar on the left. If for some reason it's hidden (or set to Autohide), strike the Super key to reveal it. If your Virtual Machine is not configured to capture the Super key, hover your mouse along the left side of the screen.

The top icon (with the Ubuntu logo) will, once clicked, reveal your Applications, Files, Places, etc in a new, [debatably] user-friendly manner.

If you miss the old style menus, you can always switch back to Gnome Classic.


In 15.04, Ubuntu SDK "make" is failing to build and run Ubuntu Core apps for the desktop.

Remove spaces from all parent directory names.


How to install Windows 8 Developer Preview on Ubuntu computer?

You can test to see if the DVD is bootable by attempting to boot from it on your other computer. If it won't boot on either computer, then it's probably a bad burn (or perhaps the .iso image you downloaded is corrupted). If it does boot on your other computer, then the problem is one of booting your Mac from the DVD. Assuming your Intel Mac can read the DVD and has a 64-bit processor, it should be able to boot from it. (A PPC Mac will, of course, not run the Windows 8 Developer Preview, which is only available for 32-bit and 64-bit x86 architectures.) But that's not an Ubuntu question--you may want to post about that at a Mac support forum (like this one) or (since you're trying to boot Windows 8) a Windows support forum (like this one).

If this answer is not sufficient to your needs then you might want a link to the instructions you followed. It sounds from your description that you followed the instructions for burning an Ubuntu CD/DVD; there may be a different procedure that is required for burning a usable Windows 8 Developer Preview disc. You should consult whatever documentation came with Windows 8 Developer Preview.

In general, to install the Windows 8 Developer Preview on a machine that already has Ubuntu is not much different from installing any other version of Windows on a machine that already has Ubuntu. Assuming you want to keep Ubuntu, you should boot from an Ubuntu live CD, select Try Ubuntu rather than Install Ubuntu. Run the GParted Partition Editor. (Up to Ubuntu 11.04 this is in System > Administration; in Ubuntu 11.10 and future versions, press super, i.e. the windows key, type gparted, and click on the search result.) In GParted, shrink down the Ubuntu partition -- it's of type ext4 -- to make room for a Windows partition to be created. Apply your changes, quit GParted, and shut down the computer.

Then boot from the Windows installation CD/DVD or USB flash drive and tell it to create a new partition in the free space you've recently created. Make sure not to tell it to erase the disk or use the whole disk. The specific interface and steps used to tell it what to do will differ from one version of Windows to the next, and may differ between different developer previews and other pre-releases of Windows 8, so you should stay sharp in the installation process. Furthermore, since the Windows 8 Developer Preview is pre-release software, it is especially important to make sure your backups of important files in your Ubuntu system are current (which you should have done anyway, before performing dynamic partition resizing in GParted to make room for the Windows partition).

Some people manually create NTFS partitions for Windows systems to use, when preparing a machine that already has Ubuntu to have Windows installed. So long as the version of GParted creating the NTFS partition is sufficiently current (as are all versions provided in currently supported Ubuntu releases), this is OK for versions of Windows up through Windows 7. However, this is probably not OK for the Windows 8 Developer Preview and subsequent pre-releases and releases of Windows 8, as they may use a version of NTFS different from the latest version supported by GParted (or perhaps the new Protogon file system).

For the same reason, you should not expect that you'll be able to read and write to your Windows 8 Developer Preview partition (or partitions associated with future Windows 8 releases) from within Ubuntu, and you should not expect that mounting it and writing to it can be done without putting the data on it at significant risk.


TL;DR: Making a hard link does not create a relationship between different files that causes new changes in one to be reflected in the other. Instead, it creates another name for the same file. Your link command failed because you told it to create a link called file2.txt, but file2.txt already existed.

Like people and things in world, a file can have more than one name.

Often it is useful to have some way to refer to something. For some things, it is useful to have more than one way. This is not limited to computing.

For example, "acetaminophen" and "paracetamol" refer to the same medication. It is correct to say acetaminophen is paracetamol and equally correct to say paracetamol is acetaminophen. Neither name refers to the other -- instead, they refer to a particular chemical substance, which is not the same thing as any of its names.

Just as a word or phrase may identify a person or thing in natural language, a link -- also called a hard link -- identifies a file, and some files have multiple links. They aren't links to each other, but to the file. (To be precise, what they identify is the file's inode. See below.)

When there are multiple links to a file, it's not that the file has one true name and others are false or lesser names. Instead, all links provide names for the file, and none depends on the others. If someone asks you for the name of a file then, no matter which of its hard links you specify, you are equally correct.

When you ran link, it did not succeed, and no link was created.

When link told you link: file2.txt: File exists, that was actually an error message. Because a file file2.txt already existed, the link command was unable to create a link by that name. Thus file1.txt and file2.txt are still separate files, and that is how they are able to have different contents.

The link command does not create a relationship between separate files. It creates another name for the very same file. That name may be different, or reside in a different directory, or both, but it has the same relationship to the file as its original name. A common though somewhat imprecise shorthand you may have heard for this is that "a hard link is the file."

Links and Inodes

Although it's intuitive to many users that every file exists in a particular directory and nowhere else, and has just one name, those things are not true. Instead:

The contents of a file may be physically spread out throughout the disk.
Metadata about where to find the file's contents, as well as the owner, group owner, permissions, and any extended attributes of the file, are stored in a data structure called an inode. (An inode also contains some other information.)
For each distinct file there is exactly one inode, and each inode is identified with a number. This inode number is the number shown in the left column when you run ls -li (and not at all when you merely run ls -l). Two different files residing on the same device always have different inode numbers.
It is useful to be able to think of a file as having a name, and as residing somewhere in a directory hierarchy. Therefore, a file may have one or more links (also called hard links, since there is something else called a "soft" or "symbolic" link). Each link has exactly one name and location. A file's links are links to the inode.
A file's inode contains a count of how many links to it currently exist. When a new link is created, this count is incremented; when a link is removed, it is decremented. When it is decremented to zero -- that is, when the last link is removed -- then the file has been deleted.
The ln (without -s), cp -l, and link commands create an additional link to an existing file. For example, link file1.txt file2.txt requires that a link file1.txt already exist and that no link file2.txt exist, and it creates a new link file2.txt to the same file that file2.txt links to. Most of the time it is sufficient to say that "file2.txt is a link to file1.txt." It is equally correct to say, "file1.txt is a link to file2.txt." Internally neither points to the other, but instead both point to the same inode.
The rm and unlink commands remove links. When we run rm foo, we tend to think of this as deleting foo, but no data in a file is lost and no disk space corresponding to the file is freed until all links to a file are removed. Often a file has just one link, but not always.

(Remember, however, that a symbolic link is not the same thing as a hard link. A symlink to a file does not prevent data loss when the file is deleted!)

Making Another Link to a File

To successfully experiment with hard links, you can ensure file1.txt does exist and file2.txt does not exist. Then when you run link file1.txt file2.txt, you will have two links, file1.txt and file2.txt. When you run ls -li you will see that they have the same inode number.

Now file1.txt and file2.txt are the same file.

Finally, you may want to use ln instead of link. The ln command is more commonly used, safeguards against some errors, and, on some systems, has nicer error messages. (When you use the ln command without the -s flag, it creates hard links, as does the link command. Passing the -s flag causes to create a symbolic link instead.)

Further Reading

Why do hard links exist?
What happens when you delete a hard link?
Why are hard links to directories not allowed in UNIX/Linux?
How to tell which file is original if hard link is created
What is the difference between a symbolic link and a hard link? (Stack Overflow)
What is the difference between a hard link and a symbolic link? (Ask Ubuntu)
What is a Superblock, Inode, Dentry and a File?


How to change the default timeout of internet connection?

If I understand it correctly this command will make the same thing on linux that this registry tweak in windows:

sudo sysctl net.ipv4.tcp_fin_timeout=100

Where 100 is the timeout in seconds to forcibly close a socket. Note that:

Default value in Ubuntu is 60 seconds, not 30.
This will be enforced by the kernel. So it can have some effect in other apps. I expect them only if you lower it, but who knows.
I can't understand how can this be related to that bug in AIR.

From the tcp man page:

  tcp_fin_timeout (integer; default: 60)
      This specifies how many seconds to wait for a final FIN packet before the
  socket is forcibly closed. This is
  strictly a violation of the TCP
  specification, but required to prevent
  denial-of-service attacks. In Linux
  2.2, the default value was 180.


Setting up the VirtualHost Configuration File-web page not loading

The example.com address you’re pointing to is a real domain owned by someone else, and your computer doesn’t know to look internally for that DNS record rather than externally.
The simplest way to solve this would be to add a line in your /etc/hosts file that looks something like:
127.0.0.1     gci.example.com

This will tell your machine to use 127.0.0.1, your computer, whenever anything asks for gci.example.com. Generally it’s better to use a domain that doesn’t exist when doing development, such as .ubuntu or .mypc. This reduces the chance of an application such as Chrome or FireFox from using an external DNS lookup and sending you somewhere else.


How do I get localized names of application in python?

You'll need to get the value for X-Ubuntu-Gettext-Domain, and get the translation from that domain with something like gettext.dgettext(domain, app_name). Most app names aren't/shouldn't be translated, though.


You could use the script command. Read man script.

script my.log
ssh A
    A stuff
    exit # on A
ssh B
    B stuff
    exit # on B
exit # end of script my.log


How to add a specific application in gnome-pie?

The command you're looking for is gnome-terminal

One remark: It is much easier to configure Gnome-Pie by drag and drop: Simply search for the Terminal in your main menu and drag it to the Pie's preview!

Second remark: Nearly all of your application links (desktop files) are stored in /usr/share/applications! You can navigate with your file browser to this directory (File System -> usr -> share -> applications) and drag your desired applications to the configuration menu!


Can I install Natty alongside Maverick and retain my encrypted /home partition?

I've not done exactly what you're trying to do, and I'm not sure what will happen when you select the 'Encrypt my home folder' option, but I do have some advice when you come to performing the installation.

I keep my entire system on a single partition, and at the time I had an encrypted home directory. I reinstalled my system according to my answer to this question, and when I logged into my fresh system, I found I was unable to access my home directory. I later realised this was because when I was going through the installation process in Ubiquity, I specified either a different username, password or hostname (I can't remember which) and the encryption mechanism built into Ubuntu uses those three parameters as authorisation credentials for partition decryption when you log in, so you'll want to ensure you keep those three the same.


It seems like previously created DATA folder existed when you boot up your machine so the system created a new one. I think you can delete the old one and after reboot - it should be mounted as DATA again.

sudo rmdir /media/DATA

reboot

if it works then I would expect DATA_ empty this time, so lastly you can delete it too:

sudo rmdir /media/DATA_


If you have personal documents in at least one Ubuntu, or if you used a different username in your 2nd Ubuntu, then you can differentiate your 2 Ubuntu systems by looking inside the /home folder of each of them.


Upgraded from 10.10 to 12.04. How can I remove any remnants of settings of Gnome?

Have a look in ~/.config. There's a bunch of gnome related configurations there.


Clean install of ubuntu 14.04.2 LTS on PC. Will not boot & bios shows no HDD only DVD?

Use gparted to reformat the drive to ext4 (YOU WILL LOSE ALL THE DATA SO BACK ANY PERSONAL STUFF UP, although there should be no personal data because it won't boot yet).

Make sure the partition scheme is an MS dos or BIOS type partition scheme (you need an MBR!).

Create one big ext4 partition.

Repeat the installation.


XAMPP dont works correctly in my ubuntu 14.04

Make sure that you don't have any other services utilising the port (80) that the XAMPP Apache server uses. There might even be another Apache server running on your server (run "sudo apt-get remove apache2" to remove it).

If you can't find anything that is using that port, then try changing the port of the server from 80 to something like 8080 by going to "Configure" then restarting the services in that XAMPP control panel.


How to uninstall the experimental HUD PPA?

Use the following commands:

sudo apt-get install ppa-purge
sudo ppa-purge ppa:unity-team/hud

If you've already manually removed the PPA from your sources, re-add it so the purge can be conducted.

You may need to reboot before the uninstallation takes effect.


This was a decision made some time ago by Canonical, the corporate backers for Ubuntu.
See: OMG! Ubuntu > It’s Official: The Ubuntu LiveCD is Dead

The news came from Canonical’s Kate Stewart on the Ubuntu Mailing list, who wrote:

There  is no longer a traditional CD sized image, DVD or alternate image, but >> rather a single 800MB Ubuntu image that can be used from USB or DVD.

I stopped burning a CD (or DVD) for ISO files about 2 years ago.
A cheap 2GB Flash USB drive is 3-4 times faster for installs, and can be repeatedly reused (for later releases).


How do I stop Ubuntu One from telling me its file service will be shutting down two weeks ago?

Following Registered User's advice from the comments, I checked to make sure there were no Ubuntu One related packages left on the system:

dpkg -l | grep ubuntuone

I found a handful (I had originally removed Ubuntu One through the software center but I guess it didn't get everything). In my case:

python-ubuntuone-client
python-ubuntuone-control-panel
python-ubuntuone-storageprotocol
ubuntuone-client
ubuntuone-client-gnome
ubuntuone-control-panel
ubuntuone-couch

I removed these packages, rebooted to test, and the message was finally gone.

It's still weird to me that the message didn't start until after June 1st but, the world may never know.


When I do a Post here Reboot was not performed. After doing a reboot,the problem was solved.


Can't get Google Chrome to X11 forward but Firefox does

Try starting Chrome using its SwiftShader software renderer - which was integrated into Chrome in 2017:

chromium-browser --use-gl=swiftshader


How do I install MS Office 2016 on PlayOnLinux

I will provide directions that worked for me for a manual (non-script) installation of Microsoft Office 2016 Professional Plus on Ubuntu 18.04 using PlayOnLinux (POL) v4.3.4 and Wine x86 v3.4. All the apps except OneNote opens, though I have only really used Word and Excel so I can't speak for the functionality of the other apps.

Firstly, try the default POL script and/or some of the other scripts here to check if they work because that would save you a lot of time and headache.
I tried the default script that comes with POL as well as some of the other scripts provided here but they became stuck (eg Office installation does not finish) or crashed at various points (eg "file not found" error). The below manual process essentially replicates those scripts and the advantage of this manual process is that you can see exactly where your specific setup might be encountering problems.
Parts of these instructions are based on GlasierXplor's POL forum post as well as other answers here.

Preparations

Dependency installation: According to POL's website, wine:i386 needs to be installed. If you try to apt-get install wine:i386, it will fail because it is tied to 2 packages. On top of wine:i386, you will need smbclient and winbind for Office to start.

Note: DO NOT use --no-install-recommends to install wine-stable, as it will cause the Office installation to always crash due to some  missing dependencies (didn't manage to pinpoint which packages).

sudo apt-get update

sudo apt-get install wine-stable:i386 smbclient winbind

smbclient -V    #Confirms that smbclient is installed

winbindd -V     #Confirms that winbind is installed

Optional: Update POL to the latest version. This is because at one point POL gave an error indicating an update is needed and this error disappeared once I upgraded to POL v4.3.4. Here are the Ubuntu 18.04 (Bionic) instructions:

wget -q "http://deb.playonlinux.com/public.gpg" -O- | sudo apt-key add -
sudo wget http://deb.playonlinux.com/playonlinux_bionic.list -O /etc/apt/sources.list.d/playonlinux.list
sudo apt-get update
sudo apt-get install playonlinux

Optional: download the Office 2016 installation file if you don't already have it or have a CD. You can download it from MS using one of the below options. I assume you have downloaded the Office 2016 Pro Plus version in the rest of this answer.

If the license is tied to your MS account, then use your account dashboard.
If you have the product key, use the Download Earlier Versions of Office page.
If you just want to test installation, try downloading using one of these direct links. Office 2016 Pro Plus link is the first one on that page.

Optional: Install winetricks and mono. I received various errors relating to winetricks and mono from the scripts I tried previously so I had already installed these by the time I tried the manual installation. It is uncertain whether installing these made any difference so you could try the manual installation steps below first and then come back to this step if you encounter errors.

sudo apt-get install winetricks
winetricks dotnet45

Optional: Remove previous unsuccessful installation of Office 2016 on POL. If your tried installing using the scripts, there may be POL Virtual Drives with empty or partial installations. You may want to remove these drives before trying the below installation process.

Optional: Restart the computer just to be extra careful.

Note In any situation where you use a multiple displays with your computer, Office will not display correctly if:-

Start Office with an additional display
Close Office
Disconnect any additional displays
Start Office

Office will start with a maximum size restricted to the top left of your primary display, and will refuse to respect the size of your desktop, until you connect the "correct" number of displays again. In which case Office will act normally (subjective) again.
E.g.

Install office with 2 displays
Start office with 3 displays
Close office and disconnect any number of displays (e.g. leave 1 display)
Start office again. Office will start in the top left of your primary display.
Connect 1 display to your computer (so now we have 2 displays).
Start office again. Office will still start in the top left of your primary display.
Office will only act properly if you connect the max number of displays you started Office in at any point of time (in this case 3 displays)

Setup POL
To consider: Wine x86 version 4.15 is more stable than 3.4 (below), or 3.14 (GlasierXplor's post on POL Forum). I.e. it does not crash randomly. The caveat is that there will be some issues with images, but should work fine 97~% of the time. Wine 4.15 requires the POL 4.3.4 update from the official POL repositories to be installed.

Wine x86 version 3.4 was used for this installation so check if it is installed by starting POL and then selecting Tools -> Manage Wine Versions.

If Wine x86 version 3.4 does not appear under "Installed Wine versions", then select it from the "Available Wine versions" window and click on the > in the middle to install it. Once installed, close and exit to the main POL menu.

In POL, select Configure to enter the configuration screen and then click New in the bottom left to start the Virtual drive creator.

Select 32 bits windows installation and press Next.

Select Wine version 3.4 and press Next.

Give the virtual drive a name (eg Office2016pp) and press Next to start the creation. Select to install Mono if POL asks.

Once the virtual drive creation is complete, you should be back in the main POL configuration screen. Ensure the newly created drive (eg Office2016pp) is selected on the left window.

Click on the Install components tab at the top. Then scroll down to select msxml6 and click Install.

Repeat above step to install component riched20.

Select the Wine tab in the POL Configuration screen and then click on Configure Wine.

Once the Wine Configuration screen appears, click on the Libraries tab. Click Edit to change both msxml6 and riched20 to (native, builtin).

In the Wine Configuration screen, click on the Applications tab and ensure that Windows 7 is selected as the Windows version. Exit to the POL configuration screen.

Select the Wine tab in the POL Configuration screen and then click on Registry Editor to open the Registry Editor.

Select to HKEY_CURRENT_USER->Software->Wine and

Click Edit->New->Key and name this key Direct2D.

Select Direct2D and then Edit->New->DWORD Value named max_version_factory with a value of 0.

Close the Registry Editor and return to the POL Configuration screen.

Install Office

Insert installation disk or mount the Office 2016 installation image file (eg ProPlusRetail.img). Double-clicking the image file on Nautilus should automatically mount it.

In the Pol configuration screen, click on the Miscellaneous tab and click on Run a .exe file in this virtual drive to open the Select a file menu.

In the Select a file menu, select Setup32.exe in the Office 2016 drive (eg in the Office folder) to start the Office 2016 installation process. Hopefully it will install properly and exit without any errors.

Once the installation is complete, close the POL configuration screen to exit to the main POL screen.

In the main POL screen, click Tools->Close all PlayOnLinux software.

In the main POL screen, click Configure to go to the POL configuration menu and select Office2016pp (or whatever name you used) drive in the left hand.

In the Pol configuration screen, click on the Miscellaneous tab and click on Open virtual drive's directory to open a new Nautilus ("Files") window.

Using Nautilus go to folder drive_c/Program Files/Common Files/Microsoft Shared/ClickToRun/ and copy AppvIsvSubsystems32.dll and C2R32.dll to drive_c/Program Files/Microsoft Office/root/Office16/.

Close Nautilus and go back to the POL configuration screen.

In the Pol configuration screen, click on the General tab and click on Make a new shortcut from this virtual drive to start the POL Wizard in order to create links to the Office apps.

You will need to select the executable for each office app and name the link. Note that some of these apps (eg OneNote) may not work at all.

Select file WINWORD.EXE and name the link Microsoft Word 2016
Select file EXCEL.EXE and name the link Microsoft Excel 2016
Select file POWERPNT.EXE and name the link Microsoft Powerpoint 2016
Select file MSACCESS.EXE and name the link Microsoft Access 2016
Select file OUTLOOK.EXE and name the link Microsoft Outlook 2016
Select file ONENOTE.EXE and name the link Microsoft OneNote 2016
Select I don't want to make another shortcut to exit the wizard.

Close the POL configuration screen to exit to the main POL screen. You should now see the apps you now linked to in the main POL screen.

Double click on MS Word inside POL to run it and you will be asked to activate Office. When complete, close Word and close POL.

You should also find new .desktop files for each off the office apps on your desktop. You can copy or move these files using Nautilus into ~/.local/share/applications if you want them to appear in the Ubuntu dash and 'select application' menus.

Post-Instalation

Optional: Insert categories into .desktop files. Edit each .desktop file and enter the Categories information to assist with searching. You can edit each file by right-clicking it -> Open with other Application ->  Text Editor.

Microsoft Word 2016.desktop update Categories=Office;WordProcessor;
Microsoft Excel 2016.desktop update Categories=Office;Spreadsheet;
Microsoft Powerpoint 2016.desktop update Categories=Office;Presentation;
Microsoft Access 2016 update Categories=Office;Database;
Microsoft Outlook 2016 update Categories=Network;Email;
Microsoft OneNote 2016 update Categories=Office;WordProcessor;

Optional: Update POL's extension file. Start POL and click Setting under Actions on the left side of the screen. Then associate the extensions and programs as shown below.

Optional: Set Office .desktop files as trusted to avoid the "Untrusted application launcher" warning. You only need to do this if it's causing problems.

Open a shell in ~/.local/share/applications and type:
gio set "Microsoft Word 2016.desktop" "metadata::trusted" yes
gio set "Microsoft Excel 2016.desktop" "metadata::trusted" yes
gio set "Microsoft Powerpoint 2016.desktop" "metadata::trusted" yes
gio set "Microsoft Access 2016.desktop" "metadata::trusted" yes
gio set "Microsoft Outlook 2016.desktop" "metadata::trusted" yes
gio set "Microsoft OneNote 2016.desktop" "metadata::trusted" yes

Optional: Install Office 2016 updates. This is still a work in progress. Watch this post for updates.


How to exclude a folder from a KDevelop project?

You have to add .kdev_ignore file to the folder which you want to exclude.


screen-prints started failing recently in Ubuntu 16.04 in Virtualbox 5.2.18

You have press the host key to make the prtscr is not intercepted by the host system. While the host key is activated (Right CTRL in the following example) your prtscr will be not intercepted by the host, and will be captured by the guest
host key activated

While the host key is not activated, your ptrscr will be intercepted by the host. host key not activated

You can configure the host key in the following menu: host key configuration


Ubuntu not detecting Windows SSD during installation

Check in your BIOS for how the disks are setup. They're probably set to RAID. Ubuntu won't install unless you change this.
You don't need to reinstall Windows...
Some folks have found the 2nd choice that I provide easier to do...
Make sure to have a backup of your important Windows files!
You've got a single SSD set up in RAID mode, and the Ubuntu installer won't recognize your SSD until you switch your disk setting in the BIOS from RAID to AHCI.
Making that switch comes with some problems though, as Windows will no longer boot.
Choice #1: Looking at this article https://samnicholls.net/2016/01/14/how-to-switch-sata-raid-to-ahci-windows-10-xps-13/ will show you how to make the change without having to reinstall Windows.

Boot to Windows with your current SATA controller configuration
Open Device Manager
Expand Storage Controllers and identify the Intel SATA RAID Controller
View properties of the identified controller
On the Driver tab, click the Update driver… button
Browse my computer…, Let me pick…
Uncheck Show compatible hardware
Select Microsoft as manufacturer
Select Microsoft Storage Spaces Controller as model #
Accept that Windows cannot confirm that this driver is compatible
Save changes, reboot to BIOS and change RAID SATA Controller to AHCI
Save changes and reboot normally, hopefully to Windows

Now you should be able to install Ubuntu in a dual-boot configuration.
Choice #2: See http://triplescomputers.com/blog/uncategorized/solution-switch-windows-10-from-raidide-to-ahci-operation/

Right-click the Windows Start Menu. Choose Command Prompt (Admin).
If you don’t see Command Prompt listed, it’s because you have already been updated to a later version of Windows.  If so, use this method instead to get to the Command Prompt:
Click the Start Button and type cmd
Right-click the result and select Run as administrator
Type this command and press ENTER: bcdedit /set {current} safeboot minimal
If this command does not work for you, try bcdedit /set safeboot minimal
Restart the computer and enter BIOS Setup (the key to press varies between systems).
Change the SATA Operation mode to AHCI from either IDE or RAID (again, the language varies).
Save changes and exit Setup and Windows will automatically boot to Safe Mode.
Right-click the Windows Start Menu once more. Choose Command Prompt (Admin).
Type this command and press ENTER: bcdedit /deletevalue {current} safeboot
If you had to try the alternate command above, you will likely need to do so here also: bcdedit /deletevalue safeboot
Reboot once more and Windows will automatically start with AHCI drivers enabled.


This is a bit of an open ended question, so I will link you to the page Canonical has about this.

http://www.ubuntu.com/desktop
http://www.ubuntu.com/netbook
http://www.ubuntu.com/server


wget http://webupd8.googlecode.com/files/script.py not working

I have downloaded the file successfully. If your ISP having some problem with webupd8 server then no problem , I have downloaded the script for you.

frank@FRANK-NATHE:~$ cat script.py
#!/usr/bin/python
#credits: ppd @ Ubuntuforums.org: http://ubuntuforums.org/showthread.php?t=1954637

import shutil
import sys
import os

def getparent (content, line_nr):
    for i in range (line_nr - 1, -1, -1):
        if "{" in content[i].lstrip():
            return content[i].lstrip().split(" ")[0]

def change_line (content, key, value, parent):
    line_nr = 0
    for line in content:
        if line.lstrip().startswith(key + ":"):
            lparent = getparent(content, line_nr)
            if parent == lparent:
                content[line_nr] = key + ": " + value + "\n"
                return content
        line_nr = line_nr + 1

def load_file (filename):
    file = open (filename, "r")
    content = file.readlines()
    file.close()
    return content

def write_file (filename, content):
    shutil.copyfile (filename, filename + ".bak")
    file = open (filename, "w")
    for line in content:
        file.write (line)
    file.close()
    return

shell_qml = "/usr/share/unity-2d/shell/Shell.qml"
icontile_qml = "/usr/share/unity-2d/shell/common/IconTile.qml"
launcherlist_qml = "/usr/share/unity-2d/shell/launcher/LauncherList.qml"
launcheritem_qml = "/usr/share/unity-2d/shell/launcher/LauncherItem.qml"

if (len(sys.argv) > 1):
    icon_size = int(sys.argv[1])
else:
    sys.exit("Please enter your desired icon size as the first argument.")

if not os.geteuid() == 0:
    sys.exit("Script must be run as root.")

content = load_file (shell_qml)
content = change_line (content, "width", str (icon_size + 16), "LauncherLoader")
write_file (shell_qml, content)
content = load_file (icontile_qml)
content = change_line (content, "sourceSize.width", str (icon_size), "Image")
content = change_line (content, "sourceSize.height", str (icon_size), "Image")
write_file (icontile_qml, content)
content = load_file (launcherlist_qml)
content = change_line (content, "property int tileSize", str (icon_size + 6), "AutoScrollingListView")
content = change_line (content, "property int selectionOutlineSize", str (icon_size + 16), "AutoScrollingListView")
write_file (launcherlist_qml, content)
frank@FRANK-NATHE:~$


Install or reinstall (if already installed) the device driver:

Open a terminal by pressing Ctrl+Alt+F2 and copy paste following command and press Enter.

sudo apt-get install xserver-xorg-input-synaptics

Or reinstall:

sudo apt-get --purge autoremove xserver-xorg-input-synaptics && sudo apt-get install xserver-xorg-input-synaptics


You probably have some badly-named file in your folder which expands into -2...vcf or something similar. You can run ls in this form: ls -- *.vcf to get around it.

Explanation:

BASH performs wildcard expansion before running ls so there is probably something like ls -2...vcf blabla01.vcf blabla02.vcf being invoked. By adding two dashes you tell the ls where the parameters end so it treats the -2...vcf as a filename argument.


The problem is that chromium isn't honoring the system's umask.  This issue has been tracking the problem.  This commit is referenced in that issue and claims to have fixed the problem, but as of version 47.0.2526.73 (current stable version at the time of this writing) the problem persists.


Good shell script to move a file to another location?

You need to change the line

mv -f $File /home/jon/temporary (Ln 9)

to

mv -f $FILE /home/jon/temporary

You declared it in capitals.


OpenConnect Juniper VPN Not Working in Ubuntu 18.04

I performed a:

sudo apt install network-manager-openconnect-gnome

Then I setup the VPN details via the GUI. When I connect now via the GUI, it is working and there is communication.

I still need to investigate what is happening differently, but this might help in the meantime.


Look in filesystem/cdrom. To see the files on the root of the USB drive, when booting the USB drive.


How to get back windows loader, or boot from ubuntu

That loader before was not the Windows bootloader; it was the BIOS boot device selection. As soon as the computer turns on, start pressing Esc repeatedly, until the boot menu comes up.


How to get Ubuntu 14.04 to detect and connect to open WiFi on startup from USB stick

The software you need to get the wifi going is included, just go to Software and Updates/Additional Drivers

Then select the Broadcom 802.11 Linux STA and Apply Changes

Do you mean just no operating system, or no internal hard drive?


Get Parent ID of last process executed in terminal

In the same terminal, run the following command:

ps -p $! -o ppid=


I may be preaching to the converted but here goes:

Right click on Cairo, select Cairo Dock > Configure

On the Configuration>Behaviour tab:

Visibility: Keep the dock below
Visibility: Appear on mouseover.
Behaviour of Taskbar: integrated or separated depending on what you prefer.

Click apply and close.

Click the Applications menu, find Startup Applications.


Are 14 GB on my ssd enough space to install Ubuntu or can I install It on my harddrive to dualboot

I tell you, yesterday I installed Xubuntu 18.04 on a laptop with google chrome, firestorm, skype and clipgrab and all this needs 15,2GB, I think it's too little.. I think you must reestructure the partitions to make bigger this 14GB to 30GB or 40GB and I think it's enough if you dont need to save a lot of files, photos, games or software... I hope it could help you!


Strange connections by gvfsd-http --spawner

If the command

sudo watch netstat -tonp

shows a lot of connections caused by gvfs directly after booting, then you can consider to remove zeitgeist, geoclue, and/or ubuntu-one. You can also consider to deactivate the rhythmbox lastfm-plugin. As I don't need these programs I decided to remove them all and after the next boot, all strange gvfs connections disappeared.

The following page shows you how to remove some of these applications.

http://ubuntuforums.org/showthread.php?t=2000108

Be aware, that Zeitgeist is an essential part of Unity! So don't remove it, if you are using Unity.


Switching to Ubuntu while keeping files from Windows

I'll just explain how to keep your files from Windows. All the details about replacing Windows 10 with Ubuntu can be found in other Q&A's, e.g:

How to replace Windows with Ubuntu?
How do I install Ubuntu?
Installing Ubuntu Alongside a Pre-Installed Windows with UEFI

Method 1: external drive (recommended)

Copy your files from Windows onto the external drive

While you're at it, you should make a full backup of Windows

Replace Windows with Ubuntu
Copy your files from the external drive to Ubuntu

Method 2: internal NTFS partition

If you may want to dual-boot Windows later, this might be a better option. Or in the same vein as Ivan's answer, you could use the NTFS partition as temporary storage, and delete it once you've copied the files off of it. (See Ivan's answer for a few warnings about this option.)

Note that NTFS doesn't support all the features of Ubuntu (e.g. it doesn't support the executable bit, which means it is not good for storing Linux programs).

In Windows, create an NTFS partition
Copy your files to the new partition
While installing Ubuntu, choose manual partitioning, and keep the NTFS partition

See How to use manual partitioning during installation? for more details

Once Ubuntu is installed, mount the NTFS partition to access your files

If you want to have the partition auto-mount during boot, you can set this up via config file /etc/fstab (see Adding an entry to fstab) or via GUI Disks (see Is there a program to mount all of my drives automatically?).

P.S. Let me know if you need any more details.


You could manually replace the icons by examining a *.list file, to find out where they are located. I don't know whether panel icons are set in .desktop files or not, however we could basically trick the program by saying "Yup, this custom image is totally the same file, saved under the same name, so go ahead and use that."

For instance, I have a chinese-calendar application installed. By examining the /var/lib/dpkg/info/chinese-calendar.list, I found there s /usr/share/pixmaps/chinesecalendar-64.png image, which is the tray icon used on the Unity panel. The next step is to save your desired icon under the same name as that file, e.g. cp $HOME/my-custom-icon.png /usr/share/pixmaps/chinesecalendar-64.png.

Keep in mind that the file is likely root owned, so you will need to use sudo, as well as back up that original icon just in case


How to save files from GIMP on USB drive if it's a read-only-file?

I get this once in a while, when I forget to eject the drive properly. First, look at the USB drive and see if it has some kind of switch. This usually toggles read-only mode.

If that doesn't do it, the easiest fix (for me) is to just reformat the drive.

Back up anything on the drive that you want to save, before continuing.

Just copy things to your desktop, this only takes a minute and you can put the files right back.

Open the dash, it's at the top left of your screen like this:

Type Disk Utility, like this, and select it to open the program.

Find the drive in the list on the left
Select the partition to be reformatted, in this example there is only one partition.
Unmount the Volume (you can't work on mounted volumes)
Select Format Volume

This opens up a window where you choose the type of volume.

Go to the pull-down menu that says Ext4.
Change it to FAT
Click Format

Then, click Format on the confirmation dialog to continue.

This should solve the problems now. Good luck.


Try to enter from a CD or stick, install this https://help.ubuntu.com/community/Boot-Repair , then run it.

It should work after I think.

Good luck!


How do I stop Rhythmbox from launching when I try opening a folder on my desktop?

Thanks to @nobody for pointing me in the right direction. After his(?) question I figured I might as well try:

$ xdg-mime default Files.desktop inode/directory

and it worked. I can just click on all the things now without Rhythmbox hijacking.


Not finding Nvidia GPU / nvidia settings not starting

OK, I have appeared to solve the problem.
For anyone else interested, I once again added the graphics driver ppa, and installed the nvidia-410 driver:

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-367

After doing this, you get a message asking you about disabling UEFI secure boot. Previously (in my "if it ain't broke don't fix it" mentality) I either avoided doing this, or didn't restart.

Anyway, say "Yes", give the system a password and REMEMBER  IT!
Then, reboot immediately, and you should get a screen asking you for letters of your password (or disabling Secure Boot) - I forget the order. Just continue cautiously, making sure you disable secure boot with the options presented to you, and choose to reboot.

After logging in, you should see that the NVidia graphics card is working as desired (e.g. in system information).

As for secure boot, is it important? See the discussion here.


removed ati proprietary driver, tried to hibernate, destroyed ubuntu installation. help?

Try pressing Ctrl-Alt-F1 to get into console mode, login in using your normal credentials. Then you get a CLI where you can do what you want (Probably sudo apt-get install fglrx).
You can switch back to the graphical desktop with Ctrl-Alt-F7.


No option to install Ubuntu alongside Windows 8

When you see a prompt to install inside Windows 8, that suggests that you opened the installer from within Windows while it was booted.

You cannot install Ubuntu alongside Windows when you are booted into the Windows system.  You need to write the installation ISO to a USB or a DVD, and then boot to the USB or DVD.

Please also refer to this question and its answers if you run into problems, as Windows 8 systems that use UEFI won't work with Ubuntu side-by-side and you may have to make changes to make it work and behave.


sudo unable to resolve host error message

You also need to edit /etc/hosts and look for 127.0.1.1 your_hostname

You can also have a look at:

change the hostname without restart

change the computer name


This was always a linux drive (no Windows here!)
This solution fixed it; I spent hours looking for errors when it was just a case of the drive being owned by root
https://ubuntuforums.org/showthread.php?t=2211159


"[TTM] Buffer eviction failed" on Ubuntu turn off

I am not getting this problem anymore.

Looks like I fixed it updating my Ubuntu kernel. I did this update a couple months ago and this never happened again.

Check out this answer for how to update the kernel:

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

Hope it fix this for who is going by the same problem!


Files associations (MIME) in Ubuntu 18.04

Not sure if your list is extensive. If however your want to look extensively for all possible list try:  sudo grep --include *.list -rnw '/.' -e "extension_looking_for" This is going to take quite some time but will deliver all possible lists


How do I pause apt upgrade before putting the laptop to sleep? How would I resume it when I open it again?

A common method to pause a command is to press Ctrl+z in the terminal, in the window that launched the command. You'll have an indicator Stopped followed by the command you launched.
Once you wish to continue, just type fg (foreground, meaning you want to bring the job to the foreground and continue it).

Caveats: if the command you pause includes network work, it's possible that pausing and starting from another network fails, as https operations are going, and changing your ip/location/... in the middle triggers warning from the network.
Second caveat: be careful when pausing a system update, it's never a good idea to interrupt an upgrade. It may, in certain cases, leave your system in a broken state. Always better to let it finish in one go.


You should read this post:
https://superuser.com/questions/448965/does-full-disk-encryption-on-ssd-drive-reduce-its-lifetime

In resume:

No it's not bad, not really.
In practice, your SSD will just be unable to compress some of the data you send to him (So your encrypted data will take more place and so use the disk "faster")

Also you should verify your encryption program use block cypher (like Truecrypt) and not stream cypher.

So, without this two special cases, yes, you can secure your data without any trouble.


Netplan dhcp not working. 2 minute startup delay Ubuntu 18.04+

Jay, I had this problem I think it started when I switched to 18. One machine even took close to 4 minutes - at first I thought it wasn't booting at all. As you see nobody has come up with a solution that works so I stumbled on Xubuntu!! It is supposed to be a minimal version but in 2 years I haven't discovered what it is missing and it boots in 30 -45 seconds. I uses the same Ubuntu kernel.
I am not an expert user but I have one system I use as a Media Player (smart TV) and another I use just for downloads. Xubuntu supports all my hardware and software for those needs. The only problem I had was the graphics support but that is also a problem with Ubuntu which was never fixed. Xubuntu 20.04.1 does fix that and plays video well.
Hope that helps - Download the 20.04.1 ISO and install new if you can - that works well.


Bumblebee + Intel HD graphics + GeForce GT 555M + Unity / compiz problem

First you need to unninstall your current bumblebee setup:

sudo apt-get install ppa-purge

sudo ppa-purge ppa:bumblebee/stable

If you want to keep some programs from the bumblebee repository, you can also suffice by removing Bumblebee only (including its dependencies):

sudo apt-get purge bumblebee

sudo apt-get --purge autoremove

Now to install it:

sudo add-apt-repository ppa:bumblebee/stable
sudo apt-get update
sudo apt-get install bumblebee virtualgl linux-headers-generic

Optional packages you can install:
Just type sudo apt-get install "package'

bumblebee-nvidia: proprietary nvidia driver support (if installed, become default over nouveau)
virtualgl: VirtualGL as backend
virtualgl-libs-ia32: 32bit support for VirtualGL on 64bit system, necessary to run 32bit app through optirun
primus: primus/primusrun as backend (virtualgl Stays default, you need to run optirun -b primus )
primus-libs-ia32: 32bit support for primus/primurun on 64bit system, necessary to run 32bit app through optirun

Btw: I am on an M11xr2 :)


Edit the file /etc/pulse/default.pa.

Find the following line:

load-module module-udev-detect

Change the line to the following:

load-module module-udev-detect tsched=0

Restart PulseAudio:

pulseaudio -k

Should do the trick.


Why does installing collectd on Ubuntu 16.04 require X11?

You can see the packages here http://packages.ubuntu.com/xenial/collectd.
Keep in mind, that --no-install-recommends applies recursively to all dependencies, so I would try something like:

sudo apt-get install collectd-core #to make sure recommendations will be installed too and then

sudo apt-get install --no-install-recommends collectd

If you follow the dependencies there is for example the chain librrd4-> libcairo2-> libx11-6 which can't be avoided when you install collectd since it's dependency and not recommendation, but it's just libraries so I don't know why you don't want them installed. In order to avoid it, install only the package collectd-core and then with the option --no-install-recommends additional packages that you might need (you need to figure them out yourself).


Installation of GNOME Shell Extensions does not ask for root password

Installing extensions from the website extensions.gnome.org doesn't ask for your password, it installs extensions locally to your ~/.local/share/gnome-shell/extensions/ directory.

If you want to install an extension system-wide, then download the correct package for the extension from extensions.gnome.org and then extract the package to /usr/share/gnome-shell/extensions/ directory with root privilege.

Alternatively, you may install the extension using apt with root privilege if it is available in Ubuntu repos by running

sudo apt install gnome-shell-extension-<EXTENSION-NAME>

e.g.

sudo apt install gnome-shell-extension-move-clock


How can I update the Ubuntu SDK preview from the Qt 5 Beta PPA to the Qt 5 Release PPA

During the migration from the Qt 5 Beta to the Qt 5 Release, the packaging changed significantly. This means upgrading the SDK is not a trivial task such as sudo apt-get upgrade, and a few manual steps are necessary.

Migration: from the Qt 5 Beta 1 to Qt 5.0

Open the ~/.bashrc file

$ gedit ~/.bashrc
Remove the 'export PATH=/opt/qt5/bin:$PATH' line from the ~/.bashrc file
Uninstall Qt Creator temporarily

$ sudo apt-get remove qtcreator qt4-qmlviewer
Purge the Qt 5 Beta 1 PPA

$ sudo apt-get install ppa-purge

$ sudo ppa-purge ppa:canonical-qt5-edgers/qt5-beta1
Install the Ubuntu SDK preview

$ sudo add-apt-repository  ppa:ubuntu-sdk-team/ppa && sudo add-apt-repository  ppa:canonical-qt5-edgers/qt5-proper && sudo apt-get update  && sudo apt-get install ubuntu-sdk notepad-qml
Test that the Component Showcase app can be executed:

$ qmlscene /usr/lib/qt-components-ubuntu/demos/ComponentShowcase.qml


How to connect to another linux machine from Ubuntu in Virtual box

The source of the problem seems to be in the Virtual Host network definition in the VirtualBox configuration.

One simple solution might be to use a Bridge Adapter in virtualbox.

In the HOST (Windows) Virtual box setting choose:

Settings for your machine
Network
Adapter 1
Select Bridged Adapter.

See below Picture:


It's not advised to use sudo against graphical applications, try to run it with gksu:

gksu netbeans

Or if the executable is not systemwide, cd to where it is located and:

gksu ./netbeans


Ubuntu 13.04 ram and CPU maximum support?

As far as maximum CPU support, I don't think it exists, but there might be a limit on the number of CPU's it can handle.

If you have more than 3 GB RAM in your computer, you don't have to pick 64-bit Ubuntu for making full use of your RAM.  The 32-bit Ubuntu automatically installs a PAE kernel. The kernel is the core of the operating system. A PAE kernel can address up to 64 GB of RAM.

A PAE 32-bit kernel therefore isn't bothered by the 32-bit memory hole, which plagues old-fashioned 32-bit kernels.

The kernel used by the 32-bit Ubuntu can recognize up to 4GB of memory, although the amount of usable memory available to the user is slightly less than this. A kernel recompiled with PAE enabled can use up to 64GB of physical memory.

The kernel used by 64-bit Ubuntu can theoretically recognize up to 17.2 billion GB of physical memory, but this is subject in practice to hardware limitations. Current AMD64 implementations allow for up to 256TB of physical memory. Current Intel 64 implementations allow for up to 1TB of physical memory.

Of course, you have to have a 64-bit architecture to use a 64-bit OS. But even if you don't have a 64-bit architecture, Linux can take advantage of your memory if you don't mind compiling your own kernel.

Just to give an idea, I'm running Ubuntu 13.04 32bit on a machine with Core2Duo CPU, and 4GB RAM, and if you just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo dmidecode -t 16

it will show you the maximum amount of RAM that it can handle. (system Specific)


Connect your Arduino hardware.Open Arduino IDE.

Go to "Tool".

Go to "Port".

Select the port to which Arduino is connected.(If no other external drive is connected except Arduino,there will be only one port)
This will tell Arduino IDE the port to which your hardware is connected.
After that,you will be able to upload your sketch successfully


Local website reachable in chrome, not in firefox

I needed to delete the firefox profile, and then create a new one.
Open up terminal and enter: firefox -profilemanager
Then you can just delete default profile and press create new. It will make a new default profile :)


Install Nitro

sudo add-apt-repository ppa:cooperjona/nitrotasks
sudo apt-get update
sudo apt-get install nitrotasks

I have just install Nitro on my Ubuntu 13.04 and its working ....


How well does a ATI Mobility Radeon HD 6370 graphics card work?

According to the Ubuntu Forums, everything should work. While this guy does have some questions about the configuration, he's saying that it works.


Is super slow Ubuntu 14.04 a graphics problem?

Because there is no hardware driver support for running the Unity desktop with GPU-acceleration. That's why it uses llvmpipe to still be able to display Unity. Other desktop environments might run faster, but these machines are over 10 years old, you should replace them if possbile.


I am currently running Ubuntu 11.10 on my IdeaPad V570. (Posting from it, actually) A dual boot with Windows 7 installed as my secondary OS.  The only issues I'm aware of at this time are that I cannot use my fingerprint reader This is not really an issue, since it has been proven time and time again that the use of fingerprint readers actually adds an unnecessary security hole.  Look it up if you don't believe me.

The other problem is that when resuming from sleep the screen remains dark (aka, no backlight).  I can still log in, but until I do, the backlight remains off and the fn(up) combination does nothing.  Once authenticated everything works as it should.

I highly recommend this laptop as an Ubuntu Linux machine.  4.5 stars (-1/2 for backlight/resume issue)

Edit:

I can confirm that the memory card reader works in 11.10.  I have a MicroSD/Adapter combo plugged in right now with pictures from my camera loaded.

Edit #2:

I can't exactly recall, but I may have had to manually install Grub2 from a livecd.  It's not hard to do, just involves a little remounting, chroot, and apt-get.  Again, I cannot confirm that I had to do this for this laptop, but I have had to do it recently.   If you have trouble booting after a fresh install, queue up your LiveCD and look for a Grub2 installation tutorial.

Edit #3:

The wireless did not work properly right off the bat, but none of the fixes I found worked.  I plugged in to my wired connection to make sure my system has been updated to the latest fixes and the WiFi card has been champ ever since.

Final words of wisdom:

If something isn't working, run your update manager.  If there is a new version of the OS, Kernel, Software, whatever, download it, update, and reboot.  If your stuff still doesn't work after updating, post a bug report.

I don't know how many times I've hammered at a problem for hours or even days to find that it's been fixed with a patch or update that had already been released.

Save yourself the headache and update first.

EDIT #4:

Okay, not as final as I thought... I just reinstalled Ubuntu X86_64 userland/kernel over PXE when I realized I was running a 32 bit userland in my last installation.  Wireless does not fix with updates, you need to open /etc/modprobe.d/blacklist.conf and add an entry to block the Acer Wireless module.

Open a terminal and:

    gksudo gedit /etc/modprobe.d/blacklist.conf

Add this line to the bottom:

    blacklist acer_wmi

Step one, Save
Step two, Reboot
Step three...
Step four, World Domination

Nathanael out.


Bash uses single quotes (') to avoid any special characters or the backslash (\) to escape a single character:

MY_VARIABLE='$foo'
echo "$MY_VARIABLE"

This will output $foo as will:

echo '\$foo'


I cannot install Ubuntu on my PC (Asrockp4v88)

First, please check if your ISO image is corrupted. Go to https://help.ubuntu.com/community/HowToMD5SUM to do so. Then make sure you burn the CD at the slowest speed. If it still cannot boot, then maybe it's a hardware problem.