What is the purpose of configuration file?

You're telling various parts of the system how to find the opencv support libraries.

What the code does

The instructions that you cite say to add the following line to /etc/ld.so.conf.d/opencv.conf:

/usr/local/lib

Notice that /usr/local is in the bash config as well. When you build an application from source, the default install location is in the /usr/local subtree. The two configuration pieces you mention are there to make sure that the rest of the operating system knows to look in /usr/local/... in addition to the other usual places, for various libraries, etc. If you were to install into another location, say /usr or /opt, you'd want to change all those paths accordingly.

Why bother?

/etc/ld.so.conf (and /etc/ld.so.conf.d) are there to tell ld.so(8) where to find shared libraries. Since opencv installs in /usr/local/..., we need to have ld.so look in /usr/local/lib to find the support libraries for the app. Similarly for pkgconfig, we need to be sure the pkg-config app can find its support files.

Do you need to do this?

Now, you may not need to make the change suggested by the documentation. If you look at the other files in /etc/ld.so.conf.d, you may find that another file already includes /usr/local/lib:

grep /usr/local/lib /etc/ld.so.conf.d/*

On my system, this returns

/etc/ld.so.conf.d/libc.conf:/usr/local/lib

Because this is here, I wouldn't need a second entry, although it's safe to have it in twice. You may not need the PKG_CONFIG setup either, since the pkg-config(1) man page states:

  On  most  systems, pkg-config looks in /usr/lib/pkgconfig, /usr/share/pkgconfig,           /usr/local/lib/pkgconfig and /usr/local/share/pkgconfig for these files.


Unable to view files copied using Ubuntu to a drive on Windows

You may be experiencing the hibernation issue with Windows 10. If I remember correctly, Windows 10 by default uses a setting called "fast start" which puts the system into a special hibernation state instead of a full shut down to improve boot times (more info here). When restarting from this state, the OS does a kind of check/repair on the filesystem I believe. This could be what is deleting your files. You can disable "fast start" in the system power options:

If turning off "fast start" doesn't fix your problem, then after you copy the files in Ubuntu, unmount the NTFS partitions:

$ sudo umount /mnt/General # or wherever "General" partition is mounted

Then remount them to see if the files are still there. If they are, reboot into Windows. If you can now access the files from Windows, there could be an issue with files being cached for write to the filesystem but never actually get written. I'm not sure how that would be fixed, but usually (as I understand it) if files are cached, they will be written when the filesystem is unmounted. That could mean that the partitions are not being unmounted properly when the system is shut down.

If all else fails, there are some tools for Windows that can give you access to the ext2/3/4 partitions:

ext2fsd
Ext2read (not sure if ext4 is supported)
Linux Reader

You should be able to use one of those to copy files from the Ext4 partition the NTFS ones in Windows.


My network icon is always a question mark and I can't access internet on any network

Based on the content of your chat session you should revert the /etc/network interfaces file that you edited to it's default content:

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

According to the info in your question, there's no issue with the kernel drivers in use and both the wired and wireless connections are properly recognized. Your wireless interface is not blocked so this should resolve your issue. If not, drop me a comment and I'll expand my answer as necessary.


Sounds like your keychain is out of sync with your password.  Go to System/Preferences/Password and Encryption keys, then choose the "login" chain.

The only way that I know works is to set this to a blank password - you will be prompted on whether you are willing to trust this "unsafe storage" method, since your keyring will unlock automatically on login.

I think you can also match the password on the login keychain to match that of your login password.  But a) I haven't tested that and b) you have to remember to change your keychain password whenever you change your login password.

As the only person on my laptop, configured with encrypted home, I'm happy with unsafe storage, but your mileage may vary.


update manager saying error on line 59 in sources list

you will need to edit your sources.list

open a terminal and make a copy of the sources.list

sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup

now edit the file

gksudo gedit /etc/apt/sources.list

move to line 59 and compare that line with the others. SOMETHING IS WRONG HERE
a basic line will appear as this example:
deb-src http://mirrors.cat.pdx.edu/ubuntu/ natty-security main restricted

If you are unsure of the correction that needs to be performed then you may comment that line out using "#" it would then appear as this:

#deb-src http://mirrors.cat.pdx.edu/ubuntu/ natty-security main restricted

once the line is edited you can save and resume the update

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

please post back any errors or use pastebin and report


How to add colored git branch to my bash prompt?

This Github Gist by srguiwiz shows a prompt with colours based on branch status:

# http://henrik.nyh.se/2008/12/git-dirty-prompt
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/
#   username@Machine ~/dev/dir [master]$   # clean working directory green
#   username@Machine ~/dev/dir [master*]$  # dirty working directory red*
#
function git_branch {
  git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'
}
# http://unix.stackexchange.com/questions/88307/escape-sequences-with-echo-e-in-different-shells
function markup_git_branch {
  if [[ "x$1" = "x" ]]; then
    echo -e "[$1]"
  else
    if [[ $(git status 2> /dev/null | tail -n1) = "nothing to commit, working directory clean" ]]; then
      echo -e '\033[1;32m['"$1"']\033[0;0m'
    else
      echo -e '\033[1;31m['"$1"'*]\033[0;0m'
    fi
  fi
}
export PS1='\u@\h \[\033[0;34m\]\w\[\033[0m\] $(markup_git_branch $(git_branch))$ '

You only need to use $(markup_git_branch $(git_branch)) in your prompt, wherever you want show the commit status and branch.

There's a slight change to original code here: the \033[0;30m at the end should be \033[0;0m to reset the prompt colour. The former sets it black, the latter resets formatting on the text.

srguiwiz's code seems to have some problems, jcgoble3 made a better version:

# Adds the current branch to the bash prompt when the working directory is
# part of a Git repository. Includes color-coding and indicators to quickly
# indicate the status of working directory.
#
# To use: Copy into ~/.bashrc and tweak if desired.
#
# Based upon the following gists:
# <https://gist.github.com/henrik/31631>
# <https://gist.github.com/srguiwiz/de87bf6355717f0eede5>
# Modified by me, using ideas from comments on those gists.
#
# License: MIT, unless the authors of those two gists object :)

git_branch() {
    # -- Finds and outputs the current branch name by parsing the list of
    #    all branches
    # -- Current branch is identified by an asterisk at the beginning
    # -- If not in a Git repository, error message goes to /dev/null and
    #    no output is produced
    git branch --no-color 2>/dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'
}

git_status() {
    # Outputs a series of indicators based on the status of the
    # working directory:
    # + changes are staged and ready to commit
    # ! unstaged changes are present
    # ? untracked files are present
    # S changes have been stashed
    # P local commits need to be pushed to the remote
    local status="$(git status --porcelain 2>/dev/null)"
    local output=''
    [[ -n $(egrep '^[MADRC]' <<<"$status") ]] && output="$output+"
    [[ -n $(egrep '^.[MD]' <<<"$status") ]] && output="$output!"
    [[ -n $(egrep '^\?\?' <<<"$status") ]] && output="$output?"
    [[ -n $(git stash list) ]] && output="${output}S"
    [[ -n $(git log --branches --not --remotes) ]] && output="${output}P"
    [[ -n $output ]] && output="|$output"  # separate from branch name
    echo $output
}

git_color() {
    # Receives output of git_status as argument; produces appropriate color
    # code based on status of working directory:
    # - White if everything is clean
    # - Green if all changes are staged
    # - Red if there are uncommitted changes with nothing staged
    # - Yellow if there are both staged and unstaged changes
    local staged=$([[ $1 =~ \+ ]] && echo yes)
    local dirty=$([[ $1 =~ [!\?] ]] && echo yes)
    if [[ -n $staged ]] && [[ -n $dirty ]]; then
        echo -e '\033[1;33m'  # bold yellow
    elif [[ -n $staged ]]; then
        echo -e '\033[1;32m'  # bold green
    elif [[ -n $dirty ]]; then
        echo -e '\033[1;31m'  # bold red
    else
        echo -e '\033[1;37m'  # bold white
    fi
}

git_prompt() {
    # First, get the branch name...
    local branch=$(git_branch)
    # Empty output? Then we're not in a Git repository, so bypass the rest
    # of the function, producing no output
    if [[ -n $branch ]]; then
        local state=$(git_status)
        local color=$(git_color $state)
        # Now output the actual code to insert the branch and status
        echo -e "\x01$color\x02[$branch$state]\x01\033[00m\x02"  # last bit resets color
    fi
}

# Sample prompt declaration based off of the default Ubuntu 14.04.1 color
# prompt. Tweak as you see fit, or just stick "$(git_prompt)" into your
# favorite prompt.
PS1='$debian_chroot\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w$(git_prompt)\[\033[00m\]\$ '


does it matter if the system drive is not /dev/sda?

It does not.

Also for your purposes Linux now prefers the use of UUID's for mounting disks:

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

This way you specify a UUID of what the exact disk is. By default Ubuntu will mount disks it sees during installation via this method. If you have a machine with multiple disks then you should consider doing it this way.

So instead of trying to guess which disk is on which port and all that, you just define the exact disk. For example in the old days if you took disks out of a server and put them back in the wrong order, it wouldn't boot if the disks got reassigned different letters, using UUIDs fixes that.


Virtualbox Ubuntu Installation, general troubleshooting (installation hangs)

VirtualBox creates a file on your Host OS within which VMs are installed. The Guest OS (Ubuntu in this case) thinks it has a hard drive, but in reality it's just accessing that large file.

With VirtualBox, you have a choice of formats for this file, but you'll usually use the VDI file format unless you've a good reason not to. The default setting is for VirtualBox to expand the file as necessary up to its maximum permitted size.

If significant additional space is being used after each installation, I think you may be doing one of two things.

You may be creating new VDI files for each installation without removing the old ones. Please check the Virtual Media Manager and delete any VM images you no longer require.
You may be using the same VDI image for each installation. I don't know how this will play out with the automatic image expansion in terms of reclaiming space. I would advise that you delete the image and create a fresh one.

"Reinstalls" from the same media should work in the same manner as before. If you're having trouble, just start over with a fresh VM container and disk image (i.e., create a new VM rather than overwrite an old one). Make sure any data you need is backed up.

With regard to the paltry 12Mb of VRAM; I also recently installed 12.10 on a Win7 box (I think it took ~ 30 minutes), and chose to "go wild" and increase it to 25Mb. I think the most you can assign is 256Mb. You can happily try increasing it to this level. This setting can always be adjusted later.

Note that you may also want to enable 3D acceleration (which should improve performance), and also install Guest Additions, which besides other things gives you VM window resizing.

Unfortunately, Unity is quite heavy on graphics requirements out-of-the-box. You may choose to install a different desktop environment, such as XFCE, Cinnamon, MATE etc, in order to improve the VM's responsiveness. Note that there are alternative distributions which come with these by default, such as Mint, which uses Cinammon. I'm by no means trying to dissuade you from using Ubuntu, but I merely highlight that there is a large ecosystem of software available for the whole hardware spectrum.

Finally, 1GB is a reasonably conservative amount of RAM for an Ubuntu+Unity installation. You may find that better performance is achieved with 1.5-2GB, although you'll obviously have to determine whether you can spare it from the Host OS.


Error in nvidia-331 causes me unable to install, delete, or do almost anything besides open up a browser

You must try change the graphics drivers through the Ubuntu CLI.

Switch on your computer.

Press and hold the Shift key, which will bring up the Grub menu.

Select the line which starts with Advanced options.

Select the line ending with recovery mode.

Your computer should display a menu with a number of options.

Select the line ending with Drop to root shell prompt. (netroot) or (network) - (root)

Run in the terminal:

mount -o remount,rw /
mount --all

Now run:

apt-get purge nvidia*
apt-get install nvidia-331


GRUB bootloader doesn't show up for new Ubuntu Installation

The first thing you should do is to open a terminal in Ubuntu and run sudo update-grub. GRUB will detect other bootable devices on your computer (in this case, SSD1 with Windows) and should display your Windows installation in the terminal output.

Next, you should change the GRUB configuration file located at /etc/default/grub by running sudo gedit /etc/default/grub (or replace gedit with another editor if you prefer or don't have gedit). Find the line GRUB_TIMEOUT and set the value to the number of seconds you want the GRUB menu to display when you first boot:

GRUB_TIMEOUT=10   # 10 seconds for example

If you don't see a line with GRUB_TIMEOUT, go ahead and add a new line anywhere on this file.


How do I stress test CPU and RAM (at the same time)?

You can install stress with:

sudo apt install stress

Then call it with:

stress --cpu 8 --io 4 --vm 4 --vm-bytes 1024M --timeout 10s

On my conky display notice how:

In the top section CPU utilization spikes from 3% to 100%
In the middle the temperature spikes from 60C to 80C
At the bottom memory spikes from normal 2.75 GiB to 6.25 GiB

Type stress --help for a full list of options.

A commentator requested posting the entire conky script which I did here: conky transparent


The simplest way to check if JAVA is installed and what version of JAVA you're using:

update-java-alternatives -l shows you all the Java versions you have installed.

java -version shows you the Java version you are using.

java -showversion shows you the Java version you are using and help.

However, it seems like you probably don't have JAVA(JDK 12) installed, that's why the .jar file is opening with Archive Manager. Still, try right clicking on the .jar file and select the Java Runtime Enivornment to run the file.


What's a command line way to find large files/directories to remove and free up space?

If you just need to find large files, you can use find with the -size option. The next command will list all files larger than 10MiB (not to be confused with 10MB):

find / -size +10M -ls

If you want to find files between a certain size, you can combine it with a "size lower than" search. The next command find files between 10MiB and 12MiB:

find / -size +10M -size -12M -ls

apt-cache search 'disk usage' lists some programs available for disk usage analysis. One application that looks very promising is gt5.

From the package description:

  Years have passed and disks have become larger and larger, but even on this incredibly huge harddisk era, the space seems to disappear over time. This small and effective programs provides more convenient listing than the default du(1). It displays what has happened since last run and displays dir size and the total percentage. It is possible to navigate and ascend to directories by using cursor-keys with text based browser (links, elinks, lynx etc.)

On the "related packages" section of gt5, I found ncdu. From its package description:

  Ncdu is a ncurses-based du viewer. It provides a fast and easy-to-use interface through famous du utility. It allows to browse through the directories and show percentages of disk usage with ncurses library.


Does running fsck manually (without a -a or -p option) formats the partition?

I have to run fcsk manually on it. Will it format my data?

You can't format a mounted partition.
fsck (filesystem check) is to repair a filesystem; not for formatting.
the commands mkfs (make filesytem), dd or fdisk can be used to format a disk.

So no, fsck does not format a disk.

  Or do i need to keep a backup first?

Why the need to ask this. You need to backup anything worth saving regardless of any reason; and that backup needs to be somewhere stored other than in the same room. It is a computer. Computers can break beyond repair.


Ask for user confirmation before executing a script?

There is a way using zenity

zenity --question --text "Are you sure?"

You can test the exit status of that command with $? variable, something like this: if [ $? -eq 1 ];then exit 1 ; fi . 0 is OK , 1 is cancel.
This construct will work well if you need to test exit status of the popup later, maybe store $? right after the popup exits to a variable. As discussed in the comments, structures like bellow will also work:

if zenity --question --text "Are you sure"
then
     runSumeFunction
else
     exit 1
 fi

or

 zenity --question --text "Are you sure?" || echo "User isn't sure:/"


Will Ubuntu run on an AMD 6 core processor and ATI graphics card?

Short Answer: Yes it will work.

Longer Answer: There might be some extra effort required (but likely not and it will just work)

Your question is too broad. People have got ubuntu to run on lots of hardware including the nexus tablets, washing machines and toasters (ok, I made up the last two examples). So an AMD6 processor is quite likely to be possible as you can see here.`

If you need specific advice you need to give the model of the motherboard and all the peripherals you are interested in. If you buy standard hardware as you do from the sounds of it there won't be any problems.

EDIT after you supplied details of your hardware.

The memory doesn't matter since if it works for one OS on your hardware it will likely work for others. Almost the same is true for your processor. I had a quick look at the user comments on NewEgg for your board. There seems to be nothing remarkable, some claim it's fine. One had problems with the network card but got around it by using a separate NIC.

In summary, you'll likely be fine.


Okay.. so I figured it out myself. It is important to turn on color management for the current document. This is done in File - Document Setup - Color Management. Changing it in File - Preferences - Color Management like described everywhere I found only affects new documents and not already existing ones.


How do I know if apt-get is going to do a partial upgrade?

Typically you should be wary of using "dist-upgrade" during the development release, if the archive is in an inconsistent state it will remove things and this will happen. This always isn't easy as you might have upgraded part of the system and the bits that they depend on might not be build yet.

Normally when this occurs packages to be "held back", but a dist-upgrade overrides that and just installs the newest things in the archive, whether that breaks your computer or not.

The simplest way you can recover is find out what you're missing and reinstall it, I would guess in your case you upgraded either X, nvidia, and/or your kernel and your mirror wasn't caught up or the right things weren't built yet. This is why I always upgrade with "apt-get upgrade" or the update-manager and just let things sit held back for a while.

What I do is do apt-get upgrade, then when certain things are held back I apt-get install them one at a time. So for example kernel packages will be held back and I manually install them. If something wants to remove something that looks important I keep it held back. It's not too time consuming and ensures that something important isn't removed.


How to mimick the 7zip "extract to "."" context menu option from Windows

I edited a script that I found for file name to folder name to extract into the created folder.

Revised:
In your directory create a file with:

#!/bin/bash
find . -type f ! -name "*exto*" | while read file;
do
    f=$(basename "$file")
    f1=${f%.zip}
    mkdir "$f1"
    unzip "$f" -d "$f1"
done

In terminal:

chmod +x exto
./exto


Sometimes installing "mono-complete" will fix some errors. Try doing that if you don't have it installed already.


On Ubuntu I use Evince for PDFs, and I use the normal print dialog for extracting pages. In the printer selection, I have an option "Print to file". Then there is the field where I can enter which pages I want to be "printed". The result is a saved .pdf file.


For the moment, this is not as such possible (i.e., without having to create and install your own custom snap of chromium). See this bug report. A fix is committed, so you should be able to implement that soon.


It happened to me today and got solved. Unfor. I didn't catch the whole process... I issued the first command fossfreedom suggested. It returned 1 package not updated. Then the second - one package got updated, software center wouldn't even start after that. I used sudo apt-get install clipit to install something and see what's going on (without using the USC). Clipit got installed no problem. I restarted my computer and now it's all fine. Sorry for not being any more helpful and thank you fossfreedom for your input!


This green login screen is expected !

After installing the xRDP, you need to perform your remote connection.  You will end up in the xRDP login screen (green screen xrdp screenshot above).

In the first line, select the option Xorg
Then provide your username
finally, provide you password

Press OK and if everything is ok, you will see a Gnome Desktop interface displayed in front of you

! Note !

We assume that you have performed a manual installation of xrdp using the following commands

sudo apt-get install xrdp
sudo apt-get install xorgxrdp-hwe-18.04  (if you are running Ubuntu 18.04.3 or later)

If this is the case, when connecting to Ubuntu remotely, you will see the basic Gnome desktop and not the custom Ubuntu Desktop with the Dock

If you want to automate and fix the small look'n feel discrepancies between your local desktop interface and remote interface,  you can use the following xrdp-installer-v1.x.sh script that help automate and perform post-configuration actions for you

Please use the script at your own risk and please review the howto guide provided before trying to run the script (see http://c-nergy.be/blog/?p=14093

Hope this help

Till next time

See ya


Is there a way to send commands to screened process?

After a bit of experimenting here's the answer I found. This is the command that I will use:

screen -p 0 -S myserver -X eval "stuff stop\015"

Now point by point:

-S says to connect to screen session myserver

-p specifies that message goes to window 0 in seession

-X is argument that allows you to send commands to screen session without entering it yourself

eval tells to print "stop" and a newline to the application's stdin


Installing Ubuntu 16.10 onto a usb flash drive for my lenovo yoga 14(wont boot from flash drive)

Yes you can run grub off the hard drive if you are using Ubuntu.

I added the following menuentry to my hard drive grub.cfg:

menuentry "ubuntu.iso" {
set root=(hd1,1)
loopback loop /ubuntu.iso
linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=/ubuntu.iso noeject noprompt -- persistent
initrd (loop)/casper/initrd.lz

This will boot a 64bit Ubuntu iso named ubuntu.iso located on a flash drive at sdb1, on my computer. adding Persistent to the entry allows saving data, downloads etc from boot to boot on a partition named casper-rw located on the portable or internal drive.

You will need to tweek the menuentry to suit your personal needs.

I think it is normally recommended to put the menuentry in a custom grub file but I prefer just adding it to grub.cfg so if anything goes wrong I just do a sudo update-grub


My default mouse cursor doesn't change, no matter which theme I use

In a terminal enter this:

gksu gedit /usr/share/icons/default/index.theme

Then change DMZ-White with exact name of the theme you want use, in your case DMZ-Black. Then it will show the correct theme.


How to permanently enable compressed ram swap? What version to use?

I was struggling with the same problem.

Today I found an excellent blog post about it.
http://weirdfellow.wordpress.com/2011/05/04/compressed-ram-with-zram/

Although "sudo start zramswap" didn't work, when I restarted my PC it solved my problem perfectly.

Try it.


Install Ubuntu with Win10 on different SSD

You'll want to use Manual partitioning, since the other options will install Ubuntu on the m.2 SSD. Refer to How to use manual partitioning during installation?

(This answer assumes you're using UEFI boot. It might be more complicated if you're using BIOS.)


How to get the right DPI resolution on Ubuntu 13.04 Saucy?

To get current DPI resolution use

xdpyinfo | grep -B2 resolution

To update DPI resolution say to 142 dpi use

xrandr --dpi 142


Run specific scripts/settings on several occassions (connect mouse, connect screen etc)

Use a tiny indicator that automatically adds your scripts to a menu

Instead of creating multiple watch- procedures for each and every possible event that could take place, I'd suggest using a "one for all" solution like below.

The indicator script automatically adds your scripts to the indicator menu, if you place them in the same directory as the indicator. This way your setup scripts will be easily available from the GUI.

The indicator

#!/usr/bin/env python3
import subprocess
import os
import signal
import gi
gi.require_version('Gtk', '3.0')
gi.require_version('AppIndicator3', '0.1')
from gi.repository import Gtk, AppIndicator3

currpath = os.path.dirname(os.path.realpath(__file__))

class Indicator():
    def __init__(self):
        self.app = 'update_setting'
        iconpath = currpath+"/icon.png"
        self.indicator = AppIndicator3.Indicator.new(
            self.app, iconpath,
            AppIndicator3.IndicatorCategory.SYSTEM_SERVICES)
        self.indicator.set_status(AppIndicator3.IndicatorStatus.ACTIVE)
        self.indicator.set_menu(self.create_menu())

    def getscripts(self):
        files = [f for f in os.listdir(currpath) if f.endswith(".sh")]
        for f in files:
            fpath = os.path.join(currpath, f)
            subprocess.Popen(["chmod", "+x", fpath])
            menuitem = Gtk.MenuItem(f.split(".")[0])
            menuitem.connect("activate", self.run_script, fpath)
            self.menu.append(menuitem)

    def create_menu(self):
        self.menu = Gtk.Menu()
        self.getscripts()
        # quit
        item_quit = Gtk.MenuItem('Quit')
        sep = Gtk.SeparatorMenuItem()
        self.menu.append(sep)
        item_quit.connect('activate', self.stop)
        self.menu.append(item_quit)
        self.menu.show_all()
        return self.menu

    def run_script(self, widget, script):
        print(script)
        subprocess.Popen(["/bin/bash", "-c", script])

    def stop(self, source):
        Gtk.main_quit()

Indicator()
signal.signal(signal.SIGINT, signal.SIG_DFL)
Gtk.main()

How to use

Copy the script into an empty file, save it as showscripts.py
Copy the icon below (right- click -> save), save it as (exactly) icon.png in one and the same directory as the script

For each of your settings commands, create a small script:

/bin/bash
command_to_run

Name them (no spaces), but make sure to use the .sh extension. Copy or move the scripts into the same folder as where you keep the indicator script.

Now you can make as many menu items (scripts) as you like,
Test- run the indicator by the command:

python3 /path/to/showscripts.py

If all works fine, add to Startup Applications: Dash > Startup Applications > Add. Add the command:

/bin/bash -c "sleep 10 && python3 /path/to/showscripts.py"

Explanation

When the script is launched, it lists all files in its own directory, looking for files with .sh extension. These files are made executable automatically.
For each of these files, the indicator creates a menu item to run it from the menu.

Other options?

The most advanced: writing udev rules for actions, to be taken on specific events. This is however also the most complicated option. Also not the most flexible option in case you want or need to change anything.
Run a background script to check for changes in connected hardware. As far as it is about screen setup, a ready to use example is in this answer.
Combine your commands into one script and run it by a keyboard shortcut. Add shortut key: Choose: System Settings > "Keyboard" > "Shortcuts" > "Custom Shortcuts". Click the "+" and add the command to run the script.

I would however go for the indicator menu. Once setup, you can easily add, remove or edit functionality by simply moving around small scripts.


If your question is whether this is doable, the answer is yes.

If your question was about how can you do it, you need to understand the concept of "mount point" in Unix/Linux systems.

Compared to Windows file system, where each partition is mapped to a drive named C:, D: or E: etc and organized in a linear array fashion, Unix/Linux system is much more flexible and meaningful. All storage space, no matter it is a drive, a partition, a network drive, or a folder, can be all organized into a virtual file system tree start with root "/" and all sub directories. Any drive or partition can becomes any subfolder or root of this tree, as long as you "mount" them to this file system.

To answer your question how to do this, you simply get a Linux installation cd or live USB, and fire up the installation program. In one of the steps, it will ask you to pick which drive/hard disk to install Linux. If you are not familiar with Linux, you may just go along with the default setting, all you need to do is to pick your SSD drive to install Linux. Once this is done, after system reboot, you should now have a working Linux OS on your SSD drive. Now you can "mount" your 8TB drive to the system - pretty much anywhere you want. To mount a drive in a persistent way (so it will show up again after a reboot), you should run

sudo nano /etc/fstab

and add the below line

UUID=XXXXXXX  /home/myusername/ext ntfs  defaults,uid=????,rw        0       2

where UUID can be found by typing command blkid (if your system asks you to install a package to run this command, then install it first). The /home/myusername/ext is simply an existing folder where you want this drive to be appear in your file system. It can be anywhere. ntfs is a drive formatted with Windows NTFS partition, for example an existing Windows partition on it, but you can reformat it to ext4 using gparted and type ext4 in this field. The ???? in uid=???? is a number that is reported by

id `whoami`

which makes the drive to be readable/writable by your account. Once you add this line, and save /etc/fstab, then you can mount your drive by

sudo mount /home/myusername/ext

or whatever folder you want to mount it. Once you have the drive mounted, every time you go to the /home/myusername/ext folder, it will read/write the 8T drive.

If you want the drive to store system files, such as for installing new programs, it is recommended to set your mount point to /user/local or /opt and choose your installation path during your installation process.

Here are some of my partition tips: I usually do not let the Linux installer to use the entire drive for the OS. Instead, I go to the manual partition settings, and partition the system into dedicated partitions, aiming at separating user files from system files. This way, when there is a problem that I have to reinstall the system, I can pretty much keep my personal files intact by only replacing the system partitions. My typical partition scheme is

/ -> a partition ~10GB
/boot -> 1GB
swap -> 4GB - 8GB
/usr -> 20GB
/home -> all the rest
may occasionally create /tmp or /var on certain systems

this way, you may have about 450GB SSD space to read/write your personal files, which is fast. Only use the 8TB drive for infrequently used files or backup/archive. You can see that Linux OS and apps only consume a very small foot print and have a stable size, in comparison, Windows OS bloats significantly over time and easily eats up all your "C:" drive using the junk files and inefficiently managed update packages.


Accidentally deleted Python 3 on Ubuntu 18.04LTS

if files or packages that belong to the ubuntu innards were removed try

sudo apt install ubuntu-desktop --reinstall

from bash.

if you are not on main ubuntu but kde, lxde or other flavours change the package accordingly.


File manager display error when opened with Explorer

Try installing Nautilus by using the below command:

sudo apt-get install --reinstall nautilus-share


There is the LDAP Administration Tool , available from the repositories.

There is also the GQ LDAP Client , but it's a bit older and (I'm going to be blunt) not as good. :)


How do I install FreeNX server so that it works correctly?

First of all, the nx user is a system user (id less than 1000) so he is not visible in System->Administration->"Users & Groups", you should see him in /etc/passwd.

Next, I use freenx server without custom ssh key, so I suggest to make it to work without the added complication of custom key. I restore my security using the firewall to deny access to non desired clients.


How to install Eclipse for Oracle Java on Ubuntu 12.04

Have a look at the shortest answer to this question.

It tells you to edit the eclipse.ini file so Eclipse can use Oracle's JDK7.


How to open and place a new window in another workspace automatically under Unity?

ok, I developed one by myself.

this depends on wmctrl and linq.js

var log = console.log;
var exec = require('child_process').exec;
var spawn = require('child_process').spawn;

var lq = require('linq');
var wlist = [];
var wIDlist0 = lq.empty();
var wIDlist = lq.empty();
var wIDlistD = lq.empty();
var wIDlistE = lq.empty();

var sw;
var sh;
var tw;
var th;

var nx;
var ny;
var nxy;

var vx;
var vy;
var wused = [];

var firstrun = true;

var c1 = exec("xrandr | grep Screen | awk '{ print $8 }'", function (err, stdout, stderr)
{
    sw = stdout * 1;

    var c2 = exec("xrandr | grep Screen | awk '{ print $10 }'  | cut -d ',' -f1", function (err, stdout, stderr)
    {
        sh = stdout * 1;

        var c3 = exec("wmctrl -d | awk '{ print $4 }' | cut -d 'x' -f1", function (err, stdout, stderr)
        {
            tw = stdout * 1;

            var c4 = exec("wmctrl -d | awk '{ print $4 }' | cut -d 'x' -f2", function (err, stdout, stderr)
            {
                th = stdout * 1;

                console.log(sw);
                console.log(sh);
                console.log(tw);
                console.log(th);

                nx = tw / sw;
                ny = th / sh;
                nxy = nx * ny;
                console.log(nx);
                console.log(ny);
                console.log(nxy);

                main();

            })

        })

    })

})

var main = function ()
{
    setInterval(f1, 250);

}

var f1 = function ()
{
    var c5 = exec("wmctrl -d | awk '{ print $6 }' | cut -d ',' -f1", function (err, stdout, stderr)
    {
        vx = stdout * 1;

        var c6 = exec("wmctrl -d | awk '{ print $6 }' | cut -d ',' -f2", function (err, stdout, stderr)
        {
            vy = stdout * 1;

            f2();
        })

    })

    var f2 = function ()
    {
        var listWindows = spawn('wmctrl', ['-l', '-G', '-x']);

        listWindows.stdout.on('data', function (data)
        {

            wIDlist = lq.empty();
            // wlist = [];

            var dataS = '' + data;
            var wlistA = dataS.split('\n');

            lq.from(wlistA)
                .forEach(function (x)
                {
                    // log(x);
                    var sA = x.split(/\s+/g);

                    var id = sA[0];

                    if (sA[1] == '0')
                        if (sA[6] != 'N/A')
                        {
                            //   log(x);
                            wIDlist = wIDlist.union([id]);
                            wlist[id] = [sA[2], sA[3], sA[4], sA[5]];
                        }

                });

            wIDlistD = wIDlist.except(wIDlist0);

            wIDlistE = wIDlist.except(wIDlistD);

            wIDlist0 = wIDlist;

            log(wIDlistD.toArray());
            var wcount = wIDlistD.toLookup().count();
            log(wcount);
            log('------------------');

            if (firstrun)
            {
                wcount = 0;
                firstrun = false;
            }

            if (wcount > 0)   //new windows
            {
                //-------------------
                for (var i = 1; i <= nxy; i++)
                {
                    wused[i] = false;
                }

                wIDlistE.forEach(function (id)
                {
                    var g = wlist[id];
                    var x = g[0] * 1;//  log(x);
                    var y = g[1] * 1;//log(y);
                    var w = g[2] * 1;//log(w);
                    var h = g[3] * 1;//log(h);

                    var cx = (vx + x + w / 2 + tw) % tw;
                    var cy = (vy + y + h / 2 + th) % th;

                    var wx = Math.floor(cx / sw);
                    var wy = Math.floor(cy / sh);

                    console.log('@@-----------');
                    console.log('@@' + wx);
                    console.log('@@' + wy);

                    var n = wy * ny + wx + 1;

                    wused[n] = true;

                });

                var filled = true;
                for (var j = 1; j <= nxy; j++)
                {
                    log(wused[j]);
                    if (wused[j] == false)
                        filled = false;
                }
//-------------
                if (filled == false)
                {
                    wIDlistD.forEach(function (id)
                    {
                        var loop = true;
                        var i = 1;
                        while (loop)
                        {
                            if (wused[i] == false)
                            {
                                wused[i] = true;

                                var x1 = (i - 1) % nx;
                                log('!!!' + x1);
                                var y1 = Math.floor((i - 1) / nx);
                                log('!!!' + y1);

                                var px = (x1 * sw + 200 - vx + tw) % tw;
                                var py = (y1 * sh + 200 - vy + th) % th;
                                log(px);
                                log(py);

                                var c = spawn('wmctrl', ['-ir', id, '-e', '0' + ',' + px + ',' + py + ',' + '-1' + ',' + '-1']);
                                c.stdout.on('data', function (data)
                                {
                                    log(data);

                                });

                                c.stderr.on('data', function (data)
                                {
                                    log('stderr: ' + data);
                                });

                                c.on('exit', function (code)
                                {
                                    log('child process exited with code ' + code);
                                });

                                var x2 = x1 * sw;
                                var y2 = y1 * sh;
                                log('@@@@@@')
                                log(x2);
                                log(y2);
                                var c2 = spawn('wmctrl', ['-o', '' + x2 + ',' + y2  ]);
                                c2.stdout.on('data', function (data)
                                {
                                    log(data);
                                });

                                c2.stderr.on('data', function (data)
                                {
                                    log('stderr: ' + data);
                                });

                                c2.on('exit', function (code)
                                {
                                    log('child process exited with code ' + code);
                                });
                                loop = false;
                            }
                            else
                            {
                                if (i == nxy)
                                    loop = false
                                else
                                    i++
                            }
                        }

                    });

                }

            }

        });

        listWindows.stderr.on('data', function (data)
        {
            log('stderr: ' + data);
        });

        listWindows.on('exit', function (code)
        {
            log('child process exited with code ' + code);
        });
    }

}


Ubuntu 20.04 Login with no "see password" option

Assuming you have a fresh install of Ubuntu 20.04, The workaround is to set the eye-icon size to 1px so that it is not visible and not reactive..
To use the workaround
Download the script from github with below command..
wget -qO - https://github.com/PRATAP-KUMAR/focalgdm3/archive/remove-eye-icon.tar.gz | tar zx --strip-components=1 focalgdm3-remove-eye-icon/focalgdm3

Run the command
sudo ./focalgdm3 \#4f194c

Optionally you may change the color #4f194c in above command with any color or you may replace the color \#4f194c with an absolute path of the Image if you wish an Image as background.

For reverting back to normal
Run the command
sudo ./focalgdm3 --reset

The above works only for login screen.. and not for lock screen, to use the same theme file for lock screen, we need to configure it separately.

Configuring the same file for lockscreen
copy the gresource file used for login screen with below command to system default folder
sudo cp /usr/local/share/gnome-shell/theme/custom/custom-gnome-shell-theme.gresource /usr/share/gnome-shell/theme/Yaru/

$ ls /usr/share/gnome-shell/theme/Yaru/
custom-gnome-shell-theme.gresource  gnome-shell-theme.gresource
$

Now to get away the changes we are doing from system upgrades.. make a local copy of the file /usr/share/gnome-shell/modes/ubuntu.json
sudo mkdir -p /usr/local/share/gnome-shell/modes
cp /usr/share/gnome-shell/modes/ubuntu.json /usr/local/share/gnome-shell/modes

Open the file ubuntu.json
sudo -H gedit /usr/local/share/gnome-shell/modes/ubuntu.json

Now edit the ubuntu.json file to use our login screen gdm3.css file with below content..
{
    "parentMode": "user",
    "stylesheetName": "gdm3.css",
    "themeResourceName": "theme/Yaru/custom-gnome-shell-theme.gresource",
    "debugFlags": ["backtrace-crashes-all"],
    "enabledExtensions": ["ubuntu-dock@ubuntu.com", "ubuntu-appindicators@ubuntu.com", "desktop-icons@csoriano"]
}

Now reboot to see the changes..

To revert back to normal, remove the two files we created for lock screen purpose..
sudo rm /usr/local/share/gnome-shell/modes/ubuntu.json /usr/share/gnome-shell/theme/Yaru/custom-gnome-shell-theme.gresource

References:
How do I change login screen theme or background in Ubuntu 20.04?
How to customize Lock Screen theme in Ubuntu 20.04


Connecting to Private Internet Access server using OpenVPN and Ubuntu 16.04 server

Start by downloading this: https://www.privateinternetaccess.com/openvpn/openvpn.zip and extract it somewhere.

That archive contains 3 important files: ca.crt, crl.pem and YourServer.ovpn (e.g. Germany.ovpn), copy those to /etc/openvpn/. Rename the .ovpn file to .conf and add a line auth-user-pass secrets Create a new file /etc/openvpn/secrets with your PIA username on the first and your password on the second line, like this:

p1234567
MyPIAPassword

For security reasons you should chmod 600 that.

See if your connection works: systemctl start openvpn@YourServer (e.g. systemctl start openvpn@Germany. Debug as necessary: tail -f /var/log/syslog|grep ovpn and systemctl status openvpn@YourServer

If it works, make it run on startup by editing /etc/default/openvpn and uncommenting the line that says AUTOSTART="all"


Monitor shows only middle of screen, edges missing. After update 11.10 to 12.04

These days very few Ubuntu computers need anything at all in their xorg configuration files since modern xorg servers create a configuration on the fly. It may be that the reason you have one is because your system has been updated from much older versions where they were often critical.

If you are comfortable using Alt-Control-F1 to make changes, you might use it to rename your /etc/X11/xorg.conf. Even if it fails utterly the xorg server should use a reduced resolution failsafe configuration but it's safer if you know how to use Alt-Control-F1 to go back--just in case.

As an alternative, you can try various resolutions with the Display system settings control or the xrandr command.

modelines are used to generate various clock signals within your graphics adapter. These signals need to be compatible with both your adapter and your monitor. They affect how much margin there is between when the adapter sends a signal to start displaying a line of pixels when those pixels should start to be sent to the monitor and how long to wait after sending the pixels before starting the next line of pixels. Getting an appropriate mode set up may be key to solving your problem.

Since this is related to resolution problems this might be helpful.


How to disable window caption bar in GNU Screen?

You can't disable it to get back some more screen real estate, but you can change its colour so that it "disappears"...

Add the following to your .screenrc:

caption string "%{kk}XXXXXXX"

So, how does this work? Well assuming your screen terminal background is black, you are making the caption strings background and foreground black as well. "k" stands for black, the first is for the foreground and the second one is for the background. The "XXXXXX"s are simply a string to make it work.

I guess if you have chosen a different background colour for your main terminal, you simply change kk to whatever colour you have chosen. Yes, you get a small gap, but not as in your face as the big bars across the screen.


How can I copy/paste files in the terminal window (SSH)?

Time to learn a new command!  :)

To learn more about it:

man scp

Secure Copy allows you to copy the contents of your friends directories to your local system.

So you mention you are comfortable with using SSH. Let say that your friends IP address is 192.168.1.100. and your username is joe.  The files on your friends computer are located in /share/music/.

  Open a terminal window using "Ctrl-Alt-T" or use the Dash Search Bar

Now to copy individual files issue the following:

scp joe@192.168.1.100:/share/music/filename1.mp3 .

What this says is, ssh into your friend's computer at 192.168.1.100 with the username joe and copy the mp3 file /share/music/filename1.mp3  to your local present working directory (note the period)

You can actually specify a location to save the mp3 other than your present working directory

scp joe@192.168.1.100:/share/music/filename1.mp3 /var/tmp

So in the example above, I'm saving the mp3 to /var/tmp

Just make sure that you have proper permissions to the directory your saving too.

Now, to save whole directories, you need to use the recursive flag -r

scp -r joe@192.168.1.100:/share/music/album1 /var/tmp/

So now all the mp3's in /share/music/album1 will save to /var/tmp/


Install python 2.7.11 on Ubuntu without compiling or replacing the pre-installed version

The python package would need to be recompiled to use the /usr/local prefix which would mean modifying the source package, you could download the source using apt-get source python2.7 and modifying the debian/rules file to compile with the /usr/local prefix but then apt would still see it as another newer replacement for python2.7 unless you renamed the package.

You would probably be better installing it from source using something like GNU stow so that it doesn't mess with your main installation https://www.gnu.org/software/stow/


Ubuntu 12.10, I installed seahorse utils for encryption, but now 'Passwords And Keys' won't open

This is a known bug:

https://bugs.launchpad.net/ubuntu/+source/seahorse/+bug/1154049

I'm having the same problem and it's really frustrating.  According to the bug report this issue has been fixed in Seahorse itself but I don't know when the fix will propagate to 12.10.  Apparently the fix also requires a fix in gnome 3.6 too:

https://bugzilla.gnome.org/show_bug.cgi?id=694053


How to start GUI application with upstart?

Create a file $HOME/.config/upstart/myGuiStart.conf

Content:

start on desktop-start
stop on desktop-end

respawn

exec firefox

or  another example with a delay:

start on desktop-start
stop on desktop-end

respawn

script
    sleep 30
    firefox
end script

description of respawn:

 respawn
         A service or task with this stanza will be automatically started
         if it should stop abnormally.  All reasons for a service stopping,
         except the stop(8) command itself, are considered abnormal.  Tasks
         may exit with a zero exit status to prevent being respawned.

More info:

http://ifdeflinux.blogspot.de/2013/04/upstart-user-sessions-in-ubuntu-raring.html

http://upstart.ubuntu.com/

Respawn bug? -> https://askubuntu.com/a/62461/265974


Bluetooth Broadcom BCM20702 does not load firmware (driver issue) - 14.04

To fix the issue of firmware not working for a Broadcom Bluetooth you need to perform two steps (1) see: Bluetooth Broadcom 43142 isn't working, and (2) uninstall 'Blueman'.
In my post I already worked through Pilot6's fix (step 1); but my bluetooth device was still not playing music (Was connected but still not playing music). Next I uninstalled blueman using software center:

At this point do a restart. After the restart there will only be one bluetooth logo (instead of two)

At this time pair the chosen device as usual. Now when you go to sound settings, you will see the Bluetooth device.

A massive thanks to Pilot6, first for posting a working solution, and second for responding when I asked for help. Thank You! Too bad the blueman software breaks the firmware used by the O/S, the blueman interface is really nice. Well problem fixed.... Hope this is of help to you.


Yes, this did work, using export:

PATH=/bin:/usr/bin:/sbin:/usr/sbin
export GDAL_DATA=/mnt/gdal/gdal-data
export LD_LIBRARY_PATH=/mnt/gdal
NAME=tomcat7
DESC="Tomcat servlet engine"
....


Software center will not let me authorize

I found the answer. There is a bug in Ubuntu where you set automatic login. When you change your root user account to automatic login you delete your password and it will no longer work. You must change ownership with sudo chown -R myusername:myusername /home/myusername

Thanks to Sergey for the answer!
Setup auto login and now I do not have root authorization for anything


Different UI language for week/month from default in KDE

Week and month names in calendars are usually controlled by the LC_TIME environment variable, so you need to change that. This command sets/changes LC_TIME in the /etc/default/locale file:

sudo update-locale LC_TIME=fr_FR.UTF-8

At next login, weeks/months will hopefully be displayed in French.

Edit: The Problem is related to this bug. As suggested inside the comments, changing the default language to British English fix the issue.
 Also more or less the same problem is discussed here.


Trying to install apache, but it says "package apache2 is not available"

The most installation manuals recommends the good practice to update the repository and upgrade the existing packages before install a new one. So try:

sudo apt update && sudo apt upgrade
sudo apt install apache2


How can I install OBS (Open Broadcaster Software) without errors on Ubuntu 18.04 LTS

Add the following libraries before running cmake and make:

$sudo apt install libavcodec-dev libavformat-dev libavdevice-dev
(ref: How to download and install ffmpeg from Launchpad?)

Next you will need:
$sudo apt-get install libmbedtls-dev

and Qt5Svg is required as well:
$sudo apt-get install libqt5svg5-dev


I was having this same problem but I found running the following worked for me

sudo update-manager -d

See if that works for you


Dual boot Ubuntu and Windows 7 on two SSD + two HDD

That sounds like a good plan.  I have dual booted Linux with Microsoft Windows in the past, and it has worked just fine.  That also sounds like a good computer your building.  Should be very fast!
Good luck!


What is the default root password when was never set at installation time?

By default root does not have a password and the root account is locked until you give it a password.

When you installed Ubuntu you were asked to create a user with a password.  If you gave this user a password as requested then this is the password you need.  If not, or you have forgotten it,  then you need to set a password.

Instructions on how to do it are here:
How do I reset a lost administrative password?

Once you have an administration password you can use sudo to run commands that would otherwise require you to be root and enter your password.

If you want to set a root password see this question
How to enable root login?

However, read all the answers carefully first to make sure you want to do this.  It's not recommended and many of the answers explain why.


In the console, type

sudo dpkg-reconfigure locales

Select the locale that is relevant, and press spacebar. You will see an asterisk indicating the selected locale. Press Tab, to highlight OK. THen press Enter. Same for the next screen. That should regenerate the environment locale for your installation of Ubuntu.


you have to enable the user themes under extensions in th gnome tweak tool. (load shell themes from user directory) then copy the theme to the themes folder and you will be select the option from gnome tweak tool to install


How do I remove all Gnome Environments I had added?

Use these commands in order

sudo apt-get install ppa-purge
sudo ppa-purge ppa:gnome3-team/gnome3
sudo apt-get update
sudo apt-get upgrade

Restart your PC


Unable to install Brother MFC7460DN Network Printer

Since Brother does not supply a 64bit package, you will need to use the 32bit compatibility library to install the available 32bit package.
First you need to download the cupswrapper MFC7460DN deb package from the brother website to your ~/Downloads folder
Also install package the ia32-libs that you should find in either synaptic manager or software center.
ia32-libs
Reach for you terminal and install the deb package you downloaded
sudo dpkg  -i  --force-all packagefilename.deb

Open Natty dash and find printing - you will then be able to find your network printer via its IP address.


How do I sync music to my Android with Clementine?

I'm not sure why Clementine doesn't find songs at first, but I can transfer musics anyway:

Right click on a track and select "Copy to device...", it might take a while, but it works, at least it did for me (You'll see a progress indicator saying "Organising files..." under play controls).

Btw my device is Nexus 4 with Android KitKat and I'm using Clementine 1.2.3.


Not able to boot into ubuntu after reinstalling it

Bluetooth and reinstalling ubuntu
So first off, unless your bluetooth worked then stopped, reinstalling ubuntu would have reinstalled an ubuntu with the same problem.
Hardware support on ubuntu, while convenient because it's plug and play, has less coverage than windows. Newer laptops will often suffer from ubuntu/linux drivers for their wifi/bluetooth/trackpad/keyboard simply not existing because noone has developped them yet.
Since manufacturers rarely see it as their obligation to support anything other than windows, the task of creating the linux drivers will fall to volunteer open source hobbyists.
From there the progression of the driver usually goes : once their driver has been tried and prooved it is made to be compatible with everything else with the in-developement version of the kernel and that kernel usually becomes available either with an update of the system, or if the kernel difference is too big, with a new version of ubuntu.
This means that if you need support for a piece of your hardware now you will have to check these solutions in order :

Try newer ubuntu if yours isn't already the newest
Upgrade kernel further still with ukuu
Search for WIP open source drivers to compile from source or patch into your kernel

Correctly reinstalling ubuntu
If you ever do reinstall ubuntu (as in, you wish to replace the curent one) you should, durring the install process, select "something else"
Selecting "install allongside" in this 2nd install of ubuntu no longer means : "create a windows-ubuntu dual boot" it now means : "create a windows-ubuntu-ubuntu tripple boot".
The option called "something else" will however bring you to a less user friendly interface which is a partitioning window, but there is a way to make the best of it :
You could for example simply use it to delete the ubuntu, swap and efi partition and apply the changes, then simply reboot from the installer and try again and this time select "install allongside" and this time you would get the desired result.
Or you could delete the same partitions and create them again and simply click install.
What you need to do is to first create a 500mb EFI partition and then another partition that has all the defaults (all the leftover size, ext4 and mountpoint /).
All in all it's an easy-to-use interface as well.
About the "mess" boot-repair leaves
Boot repair lists all installed kernels for all installed ubuntus.
After the steps you described, upgrading kernel once on each ubuntu and reinstalling ubuntu, you must have been left with quite a long list.
Reassuringly the firstmost item in the list is now the correct boot choice for booting the ubuntu you installed last (or if it wasn't run from a live-USB, the ubuntu you ran boot-repair from).
What I do to avoid these situations is :

Remove old kernels

Bizzarely kernels do not opperate the same way other packages on the system do.
When you update a package on your system both the old and the new version of the package do no co-exist. The old package is deleted and the new version is installed.
But with kernels, both stay on the system. your system is just "plugged-in" to the new kernel and the old one is "dormant" but still installed.
This is actually handy because a kernel upgrade is by far the most breaking change you can make to your system.
Very often people may have a system that runs fine in the moment after a kernel upgrade, but when they attempt to reboot, it will not boot.
For this reason, the old kernel is kept, and when Grub (the ubuntu bootloader) detects a failiure to boot it will show up upon the next try and reveal the option to boot with the old kernel (as well as safe-mode for both kernels)
This will allow the user to boot back into his system using the old kernel that actually works and then he can promptly remove the problematic new kernel.
So what I do when I have prooven my kernel is working by rebooting using it, is to clean up a bit by removing the old kernels using :
sudo purge-old-kernels
sudo apt autoremove
sudo apt autoclean

Then you can clean up grub's look by runnning
sudo update grub

The second thing I do is to use grub-customiser

To install :
sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer

Which allows me to sort things and delete useless items.
Now that we know how we got here how do we fix it
My best answer would be to re-run your usb installer once more but this time use "something else" like I said above and delete all of the partitions of the two other ubuntus, and add just one partition for the new one.
Basically start over but with a clean base.


Upgrading from 12.04 LTS to 14.04 LTS failing

phew; if you go to 14.04.1 you do get support for 2 more years;

like you, we were on 12.04 but made the big leap to 16.04 recently; we did a fresh install;

if you look at the idea of creating a home partition; then your own files are separate; and updating the system files of a distro becomes much simpler;

https://wiki.ubuntu.com/Releases

only 14.04.1 is supported now as you know: as the rest are long gone

but back to what you did: the d option is said to refer to development issue; so that classification no longer applies to the 14 series;

the do-release-upgrade -c is said to allow you to check what you might get

it is also suggested you can find it through upgrade manager

Or (for the GUI way - this program is also known as the Software Updater and can be searched and found in the GUI under that name):

update-manager

For this though once you are completely up-to-date with all the latest updates it will show you an Upgrade... button which will allow you to upgrade to 14.04.


Ubuntu Core on Raspberry Pi: Hide cursor on boot

snap set mir-kiosk cursor=none

https://discourse.ubuntu.com/t/configuring-mir-kiosk-a-masterclass/8150


Suddenly, ubuntu goes really, really slowly

Problem: several shortcuts take between 20 and 25 seconds to work (ex. Ctrl+Alt+T to open a terminal, Print Screen or Alt+PrtScr to take screenshots, Super+E to open nautilus,...)
Solution: remove dbus-user-session package.
apt remove dbus-user-session


Fix mismatched vermagic Ubuntu 20.04 kernel 5.4.0-42-generic

The error is telling you that you compiled your driver against 5.4.44 kernel source but you are running 5.4.0. If you do a uname -a on your Linux box you will probably see that you are running 5.4.0-42-generic and if you do a modinfo on your .ko file you will see it is 5.4.44.
For what ever reason the Linux source in Ubuntu is now returning a sublevel of 44 instead of 0. You can see this in the top directory of the linux source tree in the Makefile at line 4. It seemed to change between 20.04 and 20.04.1. I'm not sure if that was intentional since it's based on the 5.4.44 branch. I was doing some performance testing and when I tried to recompile my kernel I couldn't get cpufreq-info to work. I changed my sublevel back to zero recompiled the kernel and cpufreq-info would work.
I'm sure this is not the correct way to fix it but I was able to continue. I tried doing a apt source linux and apt source linux-5.4.0 both had the sublevel set to 44.


How do I use my home directory on a separate partition?

When installing Ubuntu to a hard drive the installer takes care of partitioning. In case it finds an empty unpartitioned space it will use this for your Ubuntu Installation. If you had already installed an OS the Installer will let you shrink a partition to then hold Ubunutu.

By default a single partition, and an additional swap partition will be created. In case the installer finds a pre-existing swap partition it will not create an additional one. We may want to hold our HOME in a separate partition, be it to

mirror this partition
easy format the OS partition without deleting HOME
having the OS on a fast SSD but HOME on a conventional drive,
or a variety of other reasons.

  Note that it is not a good idea to share all of the HOME partition with different distributions or releases as this may lead to conflicting configuration settings from differing application versions. Rather than sharing all of HOME we should share data on a shared partition only. These data directories can then be symlinked to from the user's home subdirectories.

In the following sections let me depict procedures for having HOME on a partition or a drive different to the OS:

  Backup all of your important data before you change partitions.

Desktop installation

On installing Ubuntu choose "Something else" to have access to the partitioner.
If the drive was used before, remove the partition table or delete partitions to hold your Ubuntu. All data on these partitions will be deleted.
Create a new partition to hold the OS root directory.
Choose the mount point / for this root partition:

Note the different mount points you may be able to choose for any partition created.
Repeat step 3. and 4. for the /home partition:

In case there is a pre-existing HOME partition holding data we now have to make sure to untick "Format?" before we proceed with the installation to not delete this data:

Choose "Install now" to partition and format the drive and proceed with the installation.

Ubuntu Server installation

The server installation will guide you through the partitioning using partman. At the partitioning step we may delete, or create new partitions similar to the desktop installation. Shown below are interim steps when we do so:

Choose "Manual" partitioning for an individual setup:

Choose partition to change or free space to create a partition

Select mount points / for root or /home for HOME:

Repeat steps 2. to 4. until finished:

Continue server installation:

Move exisiting HOME to a different location

See question and answers below on procdeures to move the HOME directory to a different partition or drive:

Move home folder to second drive


Just remove the ext2fsd 0.68 from windows. and fix the Ubuntu by any of the method you like on this page ( I go with fsck /dev/sdaX, where "X" is your partition where is Linux install)

and the problem will solved.


wifi connected but not transferring any packets Ubuntu 14.04

Cracked it. The solution is to disable 802.11n with this command in a terminal prompt:

echo "options iwlwifi 11n_disable=1" |sudo tee /etc/modprobe.d/iwlwifi.conf

Then reboot.

Now it works fine on my Draytek router.

Thanks to everyone who offered advice.


Unable to connect to university wifi on Ubuntu 18.04 LTS

A workaround using your smartphone
While it may not be working for all smartphones, here is a workaround that works for my LG G5.

Connect your smartphone with the university WiFi
Share your smartphone's internet (Setting>Network>Tethering)
Choose either USB tethering or Bluetooth tethering.
Do not choose Wi-Fi hotspot as your smartphone cannot connect to a WIFI network and act as hotspot at the same time.


This is rather hacky but just tested it on Natty and found it did the trick.

sudo cp /usr/share/applications/gnome-appearance-properties.desktop /usr/share/gdm/autostart/LoginWindow
logout
Login screen will come up, with the Appearance prefs panel displayed.
Choose new appearance settings
Login
sudo unlink /usr/share/gdm/autostart/LoginWindow/gnome-appearance-properties.desktop


clicking on hyperlinks in evince crashes google chrome ubuntu 15.04

Today I suddenly discovered that hyperlinks started working. Either something I've done before finally worked or there was some update in evince, I don't know. Big relief, anyway.


Use path bar and address bar in Nautilus

No, it is not possible to do so.

The reasoning of "is it really not possible to do so" might be uninteresting, but I can say something about why it isn't, and probably shouldn't be, possible.

Fair warning: the answer is wordy. Its lengthy, but I believe its sensible. While I highly recommend that you do read on, feel free to not read on.

The design of nautilus: Having an option to display both would require disproportionate vertical widening of the icons area, as now there would be two lines required to display the pathbar as well as address bar. But then other buttons on the right would have slack space above and below them, unless they readjust themselves, which is again a big design question by itself.
The aesthetics of nautilus: Having both pathbar and address bar would be awfully ugly to see.
Most people, and I mean barring a handful of exceptions like you and me, people have preference for either. Its a clear choice for them. Having an option to "tweak" this would mean cluttering the preferences section of nautilus, again to no avail. In fact, in the recent version, you can see that a lot of configuration and menu options have been removed, or hidden to make the overall experience of the nautilus very very simple.
Wastage of screen real-estate: You would require only either of them at any point. This is true even if you are a person who use both of them multiple times throughout the day. You would want just either of them at any time, and it just makes sense, even from your point of view, to actually press Ctrl + L when you want the access to the other thing. Seeing the unrequired alternative on the screen would clutter the thinking process too.


How do I see what updates are a available in the terminal

You can run

sudo apt update && apt list --upgradable

That will first update the package list and then show available upgrades.


had the same issue... press ctrl+c once and the network configuration dialog will restart... it didn't hang the second time


Will grub overwrite EasyBCD entry if I already have Windows 7 and Windows XP installed?

By installing Ubuntu with the option "Install side by side with Windows 7" for a dual-boot installation you will replace the MBR and by this also your Easy BCD bootloader by Grub2.

Before you install Ubuntu you will have to delete the partition that holds Windows XP to make space for the Ubuntu OS. No need to format or partition at this point, the installer will do that for you later.

When your disk is fairly standard partitioned then Grub2 will detect any exisiting Windows 7 installation, and will offer a menu choice at boot to choose the OS you want to run. Thus, if you have a spare partition you may also install Ubuntu as triple-boot with Windows 7 and Windows XP.

In theory it is also possible to chainload Grub from Easy BCD but this is a rare installation type, and thus not really recommended.

In case your Windows Boot Record fails to start Windows 7 you may have to rebuild it with the help of a Windows repair or installation CD. Thenafter a reinstallation of Grub2 is needed for booting Ubuntu.


How to connect to Ubuntu server from Windows 10 locally and securely?

So I understand the scenario is as follows (please correct me if I'm wrong):

both Windows PC and Ubuntu PC are in home LAN
there is port forwarded on your router from outside to the game server port on Ubuntu PC (ONLY the port used by game server is forwarded, ssh port is NOT forwarded)
people who will use the game server will connect from outside via the forwarded port, NOT from your Windows PC
you want to connect to Ubuntu PC and control it from your Windows PC, but NOT from the outside

In that case, you can safely connect from your Windows PC to your Ubuntu PC via ssh, because the ssh port to your Ubuntu PC is not forwarded, so there is no possibility to connect to it from outside.
Also bear in mind that ssh connection requires username and password, so even if someone is able to connect to ssh port on your server, they need the username and password to actually log in (and you have no reason to give them username and password).
You need to install a ssh client on Windows (it comes default with Windows 10, but you need to enable it) and ssh server on Ubuntu.
The only thing you will NOT be able to accomplish via ssh is to turn the PC on, because once you turn it off, there is no software running that will listen on ssh port and execute your commands. However, you could use Wake-on-LAN feature to turn it on, but this is a completely different topic and not quite Ubuntu related.


'cannot find -lboost_iostreams' while trying to install Deluge 1.3.3

It's trying to build libtorrent and you do not have the buildtools (gcc) installed to do this. I would suggest rather than building libtorrent just install python-libtorrent.


problem occuring while creating .exe file

Does the file exist and do you have read permissions on it. Is it executable, it's directory path needs to be executable. The commands ls -l and chmod will help.
Secondly your terminology is a bit microsoft, sh files which execute more like  .bat files and binaries which ms calls  .exe.


Is it possible to keep different ssh login shells a same $DISPLAY number?

As @meuh suggested, I post my own answer here.
Magic commands of Jupyter can reset the environment variables of the notebook without restarting the Jupyter server.
So here I just use %set_env DISPLAY localhost:11.0 to reset the DISPLAY env variable consistent to the current login shell and I can run gui programs in ipython notebook without restarting the Jupyter Server.


Possible to use ureadahead to cache frequently used programs?

Maybe

Hmm - maybe the preload is the application what you are looking at

:~$ apt-cache show preload

Description: adaptive readahead daemon
 preload monitors applications that users run, and by analyzing this
 data, predicts what applications users might run, and fetches those
 binaries and their dependencies into memory for faster startup times.
 .
 Note that installing preload will not make your system boot faster
 and that preload is a daemon that runs with root priviledges.

Homepage: http://sourceforge.net/projects/preload

Few Links

http://www.cyberciti.biz/tips/speed-up-your-linux-system.html

http://www.howtoforge.com/speed-up-your-system-with-preload-on-ubuntu-9.04


New 18.04 install on ASUS - TUF FX705DY Laptop - Stuck at dev, clean xx/xx files, xx/xx blocks

Stealing from the comment chain above:

i ran into this same problem and was able to make this work properly by disabling secure boot and ensuring UEFI boot mode was enabled


Pressing the right Ctrl key on your keyboard should give you back mouse control.


How do I add ~/bin to PATH for a systemd service?

You could hardcode the PATH in the systemd service:

[Service]
Environment=PATH=/home/someUser/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

More flexible would be PAM. It's awfully roundabout compared to simply using bash -c '....', but you can do this with PAM.

Create a new PAM configuration in /etc/pam.d (say /etc/pam.d/foo) and add:

session    required     pam_env.so user_envfile=some-file user_readenv=1

And in /home/someUser/some-file, add:

PATH DEFAULT=/home/someUser/bin:${PATH}

Of course, you can adjust the some-file name to something more sensible, but the path in user_envfile has to be relative to the user's home directory (the user that you set in User= in the service).

Then in the service file, in the [Service] section, add (foo being the file in /etc/pam.d created earlier):

PAMName=foo

Now, when you start the service (after reloading, etc.), the session modules in /etc/pam.d/foo will be run, which in this case is just pam_env. pam_env will load environment variables from /etc/environment, subject to constraints in /etc/security/pam_env.conf, and then the user environment from ~/some-file. Since PATH is set to a default value in /etc/environment, the user environment prepends to this default value.

Here, the default value of user_envfile is .pam_environment, which is also read by the PAM configuration of other things like SSH or LightDM login, etc. I used a different file here in case you don't want to affect these things. You could remove the user_envfile=... and use the default ~/.pam_environment. you could also just use an existing PAM configuration in /etc/pam.d which has user_readenv=1, but other PAM modules may cause unwanted side effects.


Since 11.04 the boot times and the startup times of the desktop have been a bit more "sluggish" then previous versions, there is not much you can do about.

Maybe a fresh install will give you some extra speed but no miracles there.

Ubuntu 11.04 and 11.10 are noticed to be a bit slower.


CryptKeeper icon doesn't show up in the tray?

It is a bug.

Here is the bug report:

Bug #760800 “Cryptkeeper icon do not appear on the gnome panel” : Bugs : “cryptkeeper” package : Ubuntu

And a work around:

How To Re-Enable The Notification Area (Systray) In Ubuntu, For All Applications ~ Web Upd8: Ubuntu / Linux blog

Basically you run the following command :

gsettings set com.canonical.Unity.Panel systray-whitelist "['all']"

See the link for a more detailed explanation and an graphical solution.


Displaying command progress in SSH terminal

If you disconnect, everything stops. What you want to do is to ssh into the remote box and use a program like screen or tmux so you can reconnect. That way, you could for instance ssh into something from work use screen and do your thing, disconnect and go home, get home and realize you forgot to arm the missles or whatever then ssh from home and pick up where you left off.

Screen Tutorial

Another Screen Tutorial


Dota 2 Failed to create OpenGL context on Acer Aspire 4741

As @CelticWarrior said, in the official documentation for your graphics card, OpenGL v3.1 and above is not supported. Your graphics card may very well be able to run the required version of DirectX, but not OpenGL. In order to run Dota 2, you would either need to go back to Windows or upgrade your hardware to a supported model.


intel wi-fi 6 ax200 intermittent on 20.4

looks like simply uninstalling backport-iwlwifi-dkms might have fixed the issue. Apparently not required?


Set Eclipse as the default program for opening a file on Ubuntu

Navigate to the file in Nautilus
Right click the file and select "Properties"
Select the tab: "Open With"
Select the application you want to use as default. If you don't see it in the list select "Show other applications" and navigate to it and select it.
Select "Set as default" in the bottom right.
Done


Cannot login through Firefox in AskUbuntu

Go to Edit Menu -> Preference -> Privacy Tab -> Click on Firefox will: & select Use custom settings for history -> click Show Cookies -> Delete All Cookies

OR ELSE

Go to Help Menu -> Troubleshooting Information -> Click Reset Information.

This will make your firefox to default settings.


How to find out where the "grub" is installed

Disclaimer

dd command is extremely dangerous . Should be used with caution . Use it at your own risk. Below command uses dd, is tested by me, and will not harm your system. Do not change the format of the command , the only thing you can change are the letters of the device

eg: /dev/sda , /dev/sdb, /dev/sdc ...etc

You can examine the first 512 bytes of the device with dd command through strings

For /dev/sda

sudo dd bs=512 count=1 if=/dev/sda 2>/dev/null | strings

The results in my device

ZRr=
`|f
\|f1
GRUB
Geom
Hard Disk
Read
 Error

as you can see , GRUB is there.

source


Make gnome terminal warn before closing even there is no process running?

Short answer: gnome-terminal only prompts you if a foreground process is active and the configurable option confirm-close is true.

The long answer is:

As you can see in source code, gnome-terminal checks vor TERMINAL_SETTING_CONFIRM_CLOSE_KEY when it receives a window close request.

Here you will see that it maps to confirm-close.

You may get or set this setting using

gsettings get org.gnome.Terminal.Legacy.Settings confirm-close
gsettings set org.gnome.Terminal.Legacy.Settings confirm-close true

The source of the function that decides if a confirmation is needed is here.

gnome-terminal only asks for a confirmation if confirm-close is true and if a foreground process is active in at least one tab. So if you want to always be asked before closing a gnome-terminal window you have create one tab and start a foreground process in it, i. e.

  ping -i 10 127.0.0.1

Furthermore you have to activate tabs:

  menu -> terminal -> settings -> open new terminal in: tabs

You may create a gnome-terminal profile which starts such a process automaticly. So you can configure gnome-terminal to start that profile on startup or you may easy start it yourself selecting

  file -> new terminal -> your profile

from the menu.


Not able to cd into samba location (in a windows share location)

The program "cd" can only navigate into directories mounted to your local VFS, and a URI that starts with "smb://" describes a remote resource.  In order to cd into an SMB share, you have to mount it.

In your case, it sounds like the SMB share was already mounted and accessible from nautilus.  That means the SMB share is already mounted somewhere in your local VFS.

In Ubuntu 15.04, I believe the default mount point for SMB shares (at least the ones you connect to using nautilus) is:

/run/user/$UID/gvfs/smb:host=$SERVER_NAME

So instead, try:

$ cd  /run/user/$UID/gvfs/smb:host=server/path/to/file.txt

Edit: For a more in-depth explanation of this, here is a similar question on unix stackexchange with some great answers


UBUNTU 16.04 - Asking for password when connecting to Windows network

I realized I just had to use my system password (that I use to login to Ubuntu)


ubuntu 18.10 doesn't boot to gdm after update

You may have a problem with an older computer, with an older GPU. Try this...

boot to recovery mode
choose root access

type:

sudo mount -o remount,rw /      # to remount the disk r/w

sudo pico /etc/gdm3/custom.conf # edit this file

change:

#WaylandEnable=false

to:

WaylandEnable=false

Then reboot.


Quick access to key-value storage for users

Maybe the problem is with your workflow ? If you keep on manually referencing the same data it may be hint that you could automate your life more. I keep a git repo with bunch of bash, python and assorted snippets in it. A particular task quickly grows a small script. Jobs tend to "clump" anyway and the particular values you need are persisted in the script.

Many tools and files are available for recording key value pairs, in one form or the other, aliases, /etc/hosts, environment variables, general bash scripting etc. Maybe the level of generality you think you need with a general lookup like you propose is of limited utility, given that specific solutions already exists.

Having said that, why don't you cook up a little tool to scratch your itch and see if others find it usefull ?


"git config --list" command not showing complete list, is the configuration incomplete?

No, a default installation and only specifying user.name and user.email, you will only have those two options list.  Take a look at the documentation on where these values are pulled:

If not set explicitly with --file, there are four files where git config will search for configuration options:
$(prefix)/etc/gitconfig
System-wide configuration file.
$XDG_CONFIG_HOME/git/config
Second user-specific configuration file. If $XDG_CONFIG_HOME is not set or empty, $HOME/.config/git/config will be used. Any single-valued variable set in this file will be overwritten by whatever is in ~/.gitconfig. It is a good idea not to create this file if you sometimes use older versions of Git, as support for this file was added fairly recently.
~/.gitconfig
User-specific configuration file. Also called "global" configuration file.
$GIT_DIR/config
Repository specific configuration file.

Take a look at the options.  Most have defaults or default behavior that git will take if not specified.
To answer your question, you should have a usable configuration even with those couple specified.


To fix this specific problem

There are other issues with your script presumably dealt with in Byte Commander's answer, but for those coming in from Google, to fix this specific problem, always surround variables with double quotes. For example [ "$dv" -eq "$on" ].

Explanation

A unary operator only has one argument. A binary operator has two arguments.

For example, -eq is a binary operator, because it has two arguments and figures out whether they're equal.

When the shell sees [ 3 -eq 3 ], everything is fine, because -eq takes two arguments, and it has been given two arguments, the 3s. What if one of those was blank, though? It would be either [ -eq 3 ] or [ 3 -eq ]. Those are missing one of the arguments, so the shell gets to thinking you meant to use an operator that only has one argument, a unary operator.

Your variables can be blank, causing just this problem. To avoid the issue, surround all uses of a variable with double quotes.


What's happening in this case is that PulseAudio locks the ALSA Backend that LMMS tries repeatedly to access (causing the high CPU) and since Pulse has it locked, LMMS can't send audio through.

You can easily disable PulseAudio while using LMMS by launching LMMS with the command pasuspenderlmms.

That, or you could just stick to using Pulse as your output, and applying some latency lowering tips.


I have always been afraid on how to treat my laptop, because I wanted it to last as long as possible, I have done a lot of researches in the past and I can share you my experience and what I learned.

Modern laptops use lithium Ion (Li-ion) batteries, which are not subjected to overcharging or "memory effect". This means that you can charge your laptop whenever you have the opportunity to, even for small amounts of time, without having to be concerned. Every battery has a lifespan in charge cycles, depending on various factors, but usually it is around 500 complete charging cycle (from 0% to 100%, so if you charge it from 30% to 80%, it will count half a cycle on battery).

The main degrading factor for lithium batteries is heat, whether it is caused by the environment you are, or by the stressful conditions your laptop is working on. Whenever your laptop gets too hot, and your battery too, it suffers, and this will reduce lifespan over time.
The only way you may have to protect your battery from heat would be to detach it while you are connected to AC, but this is not an option on modern laptops.

There is another factor to keep in mind, which is low and high percentages. You can find plenty of researches of this online but the general point is that when battery discharge over some point (around 20%) they enter a more stressful state, and the same is true for high percentage (80%-90%).

So to sum up, Li-ion batteries does not like stress, whether it is heat, high or low percentage.
You should avoid letting you battery discharge down to 0%, a good practice is to charge it when it reaches 20%-30%, and also would be nice for it to be unplugged before it reaches 100%, because again, after around 80%, it enters a stressful state, and you can also observe that charging is slower at some point.
You should also avoid charging it when it is too hot, it is better to leave it rest for a while, so that it can cool down, and then you can charge it, so that you avoid stressing it.

Obviously in every day life it is fairly impossible to follow best practices, and sometimes you will heat it too much, or make it discharge or whatever. But that is not a problem, if those things happens rarely, you will be fine, just try not to put too much stress on it.

Then you have to consider how you plan and need to use it, what is more important for you, battery life or performance.

In my case I have two laptops and a chromebook. I use my main laptop, which is an Asus vivobook pro, plugged in all the time, and I've been doing that for a year and a half now, it has never used to last a lot, when I first bought it battery used to last like 2-3 hours, and if i unplug it now it's almost the same.
Then I have a Dell XPS 15, which lasts much more, I was able to get 8-10 hours on it without letting it die, and I use it in stressful conditions, both environmental and because of the work I do on it. It also has more than a year, and I haven't seen any degrade on battery. Then I have a chromebook which I use on a daily basis during weekdays, and I charge it everyday or once in two days.
I let them charge to 100% for convenience, so that i can get the most out of the battery but I try not to let them go under 20%.

As you can see it depends a lot also on the battery itself and how the hardware and the operating system will manage it, and then come other factors as I said.
In your case, as far as I know, thinkpads has very long battery life, so you should be able to use it for the entire day an then charge it at the evening, unless you need it on all the time.
I would anyway, if possible, avoid letting devices charge overnight, of course they stop when they reaches 100%, but they also slowly discharge a bit, and as long as they are plugged in, they will be kept 100% all the time, so the battery will lose a little bit of capacity, and it will be filled up again immediately, and as you can guess this put a stress on it.

In conclusion, you should not worry too much about battery on your devices, I had been doing that for a while, and I still tend to, but the effort is not worth the time, batteries will degrade anyway, so the best advice I can give you is use it as you need to, just try to follow the best practices and avoid stress when possible.

(I apologize for any english mistake in advance, I am not a native speaker)


Error: cat: /boot/grub/video.lst: No such file or directory

/boot/grub/video.lst holds all the video modes that your machine is capable of. According to the GRUB documentation it is generated by grub-install. I've had no exerience with this problem before but maybe try to reinstall grub.


What application in ubuntu that is like MDMA in Windows?

You should be able to just plug it in and use it. It's a networking thing, so you'll click the network icon and configure mobile broadband from there. You don't need a special application in order to use a mobile broadband connection in Ubuntu.


Installing tt-rss : files arn't where they ought to be

Ubuntu packages are not supposed to install anything in /var/www. Instead, the recommended approach is to install your application into /usr/share. This is what tt-rss has done as well. The site is located at:

/usr/share/tt-rss/www

The package installer creates a default Apache HTTP configuration file at /etc/tt-rss/apache.conf. To enable it, we'll just link it into /etc/apache2/conf.d:

sudo ln -s /etc/tt-rss/apache.conf /etc/apache2/conf.d/tt-rss
sudo invoke-rc.d apache2 reload

You should now be able to surf to http://localhost/tt-rss, where you will be greeted by an error message:

To fix this, simply edit /etc/tt-rss/config.php and adjust the SELF_URL_PATH according to your setup. Afterwards, refresh the page to see the login screen.

You'll still have to properly configure tt-rss. But this should get you started.

After working on it a bit more, it is apparent that the packaged version is not compatible with the default prototype 1.7.0 that is installed by default. To remedy this, install an older version of prototype locally:

cd /usr/share/tt-rss/lib
sudo rm prototype.js
sudo wget http://prototypejs.org/assets/2009/8/31/prototype.js

Now it should let you log in with the default admin/password login.


Ubuntu 12.04 installed via Wubi failed to boot problem

From a terminal on the LiveCD/USB (Applications > Accessories > Terminal), run the following commands:

sudo apt-get install lilo
sudo lilo -M /dev/sda mbr

This assumes that sda is the Windows drive. If not, change this to reflect the actual drive e.g. sdb, sdc, etc.

Ignore any warnings and continue with the installation to the MBR. The main point is to get lilo installed and allow the user to boot Windows, and hopefully Ubuntu, again.

source: http://ubuntuforums.org/showthread.php?t=1639198

edit:
https://wiki.ubuntu.com/WubiGuide#How_do_I_manually_uninstall_Wubi.3F


New Acer Aspire 3 - Can I install ubuntu BEFORE letting the default WIN10 setup start?

If you dont want install W10 continue too boot the Ubuntu ISO, but if you want have W10 is recomended install it first, because some say that windows dont recognize linux. The best way should be install W10 creating a partition for it(dont use all disk as partition, you will have problems to make linux partitons after), and then install ubuntu in other partition of you disk(ubuntu recognizes w10)


why Can't I use the internet on mozilla?

have you made any changes to the settings? Especifically, did you set up a proxy or changed the proxy settings?

You could - in a first step - ping a server like google (ping www.google.com) and check if you get any response, if so, it shows that your net is working and that it is the browser setting. If not you could try to ping google using its IP address... If that works, then the issue is most likly an issue with the DNS Servers (which are responsible for the resolution of the domain names).

Either way... it would help to have some more information on that one. You could - of course - also try to open the page with another browser and check if that works.

Hope that helps you.


How to change the color of comments using nano or pico

Go to the /usr/share/nano directory and check out the *.nanorc files there.  For example, to change the comment color in PHP, edit /usr/share/nano/php.nanorc and change:

## comments
color brightblue "//.*"
color brightblue start="/\*" end="\*/"

to

## comments
color brightgreen "//.*"
color brightgreen start="/\*" end="\*/"

...which is much less invisible when using PuTTY.

This information could also be entered into a ~/.nanorc file for an individual user.


The same partition was used as swap space for both distros - the UUID of the partition was changed during the installation of the second distro.

To solve this you need to copy the UUID shown in the output of blkid for /dev/sda5, and place that information into /etc/fstab, in the line below the command "# swap was on ..."

To do this I would

open two terminal windows
In the first window, enter the command blkid | grep sda5
In the second window enter the command sudo cp /etc/fstab /etc/fstab.bak
In the second window, enter the command sudo nano /etc/fstab
In the first window, highlight the numbers which make up the UUID: "2921846b-0788-49e4-b81e-0afb576dd1a7" - press ctrl+shift+c to copy the UUID
In the second window, use the arrow keys to move the cursor to the bad uuid, and use the delete / backspace keys to delete that uuid.
press ctrl+shift+v to paste the new UUID in place.  Press press ctrl+o and then ctrl+x to save and exit the editor.


Removing blue link borders around pictures in HTML emails in Evolution

You could try to add the border="0" attribute to the img tags. I see that you set the borders to 0px, solid in your style attributes, but perhaps not all html renderers can interpret this (more advanced) css.

<img src="/foo/image.png" border="0" /> accomplishes the same css magic, but only using html which should be more "backward compatible"


How do I redirect input from one sound card to output on another sound card?

After some fiddling, I managed to get my CD input recognized by ALSA, see my answer on the other question. Now it shows up in alsamixer.

I ended up using the solution provided in this answer. I created a script in my home directory which contains the following code:

pacat -r --device=alsa_input.pci-0000_00_1b.0.analog-stereo | pacat -p --latency-msec=1

While this is running, sound input from the input device selected in alsamixer (press F4 to switch to input controls) is redirected to my USB audio device. Unfortunately, the input device is reset whenever I lock my screen so I have to change it back to my CD-in repeatedly. If anyone knows how to circumvent this, please let me know.


Vim - up-down line movements the cursor changes column position

open ~/.vimrc and add these 2 lines

nnoremap j gj
nnoremap k gk

close and restart vim.

ps: it will still go to the first column on empty lines, and you might want to set nowrap.


Some ideas:

Try a 10.04-LiveCD to verify it still works
look with lshw (Console) or gnome-device-manager, if the device is detected and configured with the correct driver
try lsusb (as stated above) or lspci to identify your device.
dmesg|less (shows the log of the system-startup) may point you to errors if the device is not properly detected


Ubuntu 16.10 stuck with Gallium 0.4 on llvmpipe (LLVM 3.8, 256 bits)

So, I found a solution.

First I went in Synaptic, searched for Gallium, removed totally mesa-udpau-drivers (or something like that). It didn't make any improvement.
And then I went to install 4.9 kernel following this instructions: http://ubuntuhandbook.org/index.php/2016/12/install-linux-kernel-4-9-ubuntu-linux-mint/ . Reboot and ... Everything went back to normal :)


How to dump ALL dconf/gsettings so that I can compare them between two different machines?

Use the dump command of dconf (https://developer.gnome.org/dconf/unstable/dconf-tool.html):

dconf dump /

As always you can use output redirection to save the output to a file for later use:

dconf dump / > dconf-backup.txt


Remember what directories are open in one session of Nautilus

Nautilus does not support this functionality. What you might want to do is use session saving, or write a script to have nautilus open those directories by default.

You could replace nautilus with this script in your start up applications. (I will need more time for the script part).


Ubuntu Focal 20.04 update with kept back files

install them manually
sudo apt-get install base-files sosreport

http://archive.ubuntu.com/ubuntu focal-updates/main amd64 ubuntu-server amd64 1.450.2
http://archive.ubuntu.com/ubuntu focal-updates/main amd64 base-files amd64 11ubuntu5.2