Downloaded Cinnamon Interface on Ubuntu 18. Is Bluetooth connection normal?

No, you can hide it from the panel with no consequence.

Security vulnerabilities, if any, will be addressed in updates.


The general process for this process is:

Ensure you have all of your files backed up
Open GParted
Identify your Windows partitions, often they will show as being mounted under /media or in a custom location if you specified so in your /etc/fstab.
You can also match their sizes up to what you expect from what Windows reports
Delete the partitions by right-clicking on there listings
Expand your Ubuntu partion (will be mounted as /) by right-clicking it

We can provide better directions if we know more about your setup.
 Supplying us with sudo fdisk -l will allow us to try to identify your windows partition better


What does "user account" in samba share actually mean?

I entered the username/password of my Ubuntu user

Unlike Windows where there is just the one user in Linux there are two. One for local logins and the other for samba.

You need to add the local user ( mark for example ) to the samba password database:

sudo smbpasswd -a mark


Using wget to retrieve files from autostart downloads

Well for me it worked.

But you can get the direct link if you want, the problem is how to have always the latest version.

I got the direct link using firebug in firefox.
You need to install the add-on and then enable the net panel:

Then you past the link you gave us in the browser and you will see all the details in firebug, from which you only need to copy the link (look at the one that has the correct size).

The result being:

http://get.geo.opera.com/pub/opera/linux/1216/opera_12.16.1860_amd64.deb


Black area with stroked circle on the screen

I have read reports of the media keys not functioning correctly on the Dell Vostro 1510 under both Ubuntu and Windows causing the keys to blink and cause media playback issues etc.

You could try using xbindkeys to remap the keyboard to fix the problem - it is available in the software centre to download - just do a search for it.

Alternatively here is a link to the developers website.


How to stop windows from opening along the edges?

You can give this a try.
Launch CompizConfig Settings Manager and click on Place Windows:

And then choose Smart for the placement mode:


grep for string not preceded by another string

This could be solved using a regular expression with negative lookbehind (which is experimentally supported in grep as pointed out by the comment from arrange):

$ grep -P '(?<!Mr )John Smith' file

Since the support is just experimental, you might want to use perl instead:

$ perl -nle 'print if /(?<!Mr )John Smith/' file


How to install NetBeans with java ee edition?

To download the package, you can go to the link :

  https://netbeans.org/downloads/start.html?platform=linux&lang=en&option=javaee

After downloading it, open the folder; open a shell by right clicking and SELECTING oPEN IN TERMINAL

Then run the command :

sudo ./<name of the downloaded file>

You will be prompted for password; the installation should start from there.


Where is the list of launcher-locked .desktop entries?

Found it! A little better searching and some testing found the answer.  It's kept in gsettings, and I pulled the list using

gsettings get com.canonical.Unity.Launcher favorites

And then a simple

find -iname <foo.desktop>

Showed me where it made the placeholder.


Will Ubuntu 20.02 run on Intel Core 2 Duo E8400 (2) @ 3.000GHz and 160GB of hardisk

Ubuntu 20.04 will run on your configuration. but might be possible slow performance you will get.
Because 20.04 version has heavy graphics and animations.
I hope this answer will help you.


Below command should help you out. If not, please post your input and output as well.

sudo apt-get install gcc*


Uninstalling old xenial Ruby gems after bionic upgrade

When you change ruby version, you should always run gem pristine --extensions to recompile C extensions. It may facilitate using your old gems under the new version of ruby. Have you tried that?

If you prefer to uninstall the old gems check Uninstall old versions of Ruby gems on Stack Overflow.

Otherwise, under Ubuntu there are two ways to manage multiple ruby versions and select the default one:

1) Use Ubuntu Snap rather than Apt - it'll allow you to choose which version to install, the latest or any prior one. See The official Ruby snap is available post on the Ruby.org website for instructions. To avoid possible conflicts, you may want to uninstall the existing apt installed version first by running

sudo apt remove ruby && sudo apt autoremove

Main advantage of installation with snap is the official support both by Ruby.org and Ubuntu. You can downgrade or upgrade the version to use. First run snap info ruby to list all the available versions (currently 2.3 through 2.7) and then follow the instructions linked above to select the versions to install (multiple versions can coexist) and to switch between them.

2) If you prefer to stick with Debian's Apt package management tool, you can rely on Brightbox PPA Ruby packages for Ubuntu which gives you almost the same choices (at present, they have yet to provide the very recent version 2.7). Here you'd have to rely on Brightbox to continue providing optimized Ruby packages for Ubuntu as they have done for years. They’re currently maintaining packages for Ruby 2.6, 2.5, 2.4, 2.3, 2.2, 2.1, 2.0, 1.9.3, and 1.8.7, and you can also switch the default Ruby version back and forth between the versions.


Let's first check your file system

boot to a Ubuntu Live DVD/USB in “Try Ubuntu” mode
open a terminal window by pressing Ctrl+Alt+T
type sudo fdisk -l
identify the /dev/sdXX device name for your "Linux Filesystem"
type sudo fsck -f /dev/sdXX, replacing sdXX with the number you found earlier
repeat the fsck command if there were errors
type reboot

Then let's check your HDD

Open the Disks application. Select your HDD. Go to the "hamburger" icon and select SMART Data & Tests. Take screenshot(s) of the SMART Data and edit them into your question for me to review. "Current Pending Sector Count" = 240 indicates the problem.

Bad Block

"Current Pending Sector Count" = 240 indicates the problem.

Note: do NOT abort a bad block scan!

Note: do NOT bad block a SSD

Note: backup your important files FIRST!

Note: this will take many hours

Note: you may have a pending HDD failure

Boot to a Ubuntu Live DVD/USB in “Try Ubuntu” mode.

In terminal...

sudo fdisk -l # identify all "Linux Filesystem" partitions

sudo e2fsck -fcky /dev/sdXX # read-only test

or

sudo e2fsck -fccky /dev/sdXX # non-destructive read/write test (recommended)

The -k is important, because it saves the previous bad block table, and adds any new bad blocks to that table. Without -k, you loose all of the prior bad block information.

The -fccky parameter...

   -f    Force checking even if the file system seems clean.

   -c    This option causes e2fsck to use badblocks(8) program to do
         a read-only scan of the device in order to find any bad blocks.
         If any bad blocks are found, they are added to the bad block
         inode to prevent them from being allocated to a file or direc‐
         tory.  If this option is specified twice, then the bad block scan
         will be done using a non-destructive read-write test.

   -k    When combined with the -c option, any existing bad blocks in the
         bad blocks list are preserved, and any new bad blocks found by
         running badblocks(8) will be added to the existing bad blocks
         list.

   -y    Assume an answer of `yes' to all questions; allows e2fsck to be
         used non-interactively. This option may not be specified at the
         same time as the -n or -p options.


I think if you boot with the isolcpus=2,3 option it will limit you to 2 cores, isolcpus=1,2,3 will limit to 1 core.


How to re-enable Banshee icon in the older notification area?

You need to go to Edit --> Preferences --> Extensions tab, and then check   Notification Area Icon:


How to get apt-cacher-ng to download AND cache packages from Apt HTTPS repositories?

Let's say the URL of your apt-cacher-ng service is http://localhost:3000 and you are storing it in the bash variable ${LOCAL_APT_CACHE_URL}.
Then you have to rewrite your sources.list file and the sources.list.d directory files with the following two transformations:
HTTP
This command rewrites an Apt repository URL at http://example.com to http://localhost:3000/example.com:
find /etc/apt/sources.list /etc/apt/sources.list.d/ \
-type f -exec sed -Ei 's!http://!'${LOCAL_APT_CACHE_URL}'/!g' {} \;

HTTPS
This command rewrites an Apt repository at https://example.com to http://localhost:3000/HTTPS///example.com. apt-cacher-ng receives the HTTP request and then initiates its own HTTPS request--removing the need for any MITM or passthrough. HTTPS packages are cached properly.
find /etc/apt/sources.list /etc/apt/sources.list.d/ \
-type f -exec sed -Ei 's!https://!'${LOCAL_APT_CACHE_URL}'/HTTPS///!g' {} \;

This transformation has to be done for any new repositories that are added later on--whether by directly modifying the sources.list or through a utility like add-apt-repository.


How to solve "dpkg: error processing archive /var/cache/apt/archives/libvlccore9_4.0.0~rc1~~git20171225+r73378+113~ubuntu16.04.1_amd64.deb (--unpack)"

Had the same problem and this fixed it:

sudo dpkg -P libvlccore8

Then again sudo apt-get -f install


You should look at makefile. There is install section with the place of installed files. Simply remove them.


how do I populate the Favorites channel group in mythtv?

I ran into the same problem. I found that using the arrow keys to navigate mythfrontend solved it. After selecting the channels, use the left arrow key to exit editor. Then either ESC or left arrow will prompt for saving changes. If I used ESC to exit channel selection, it would prompt for save but did not. 18.04 with v29.1.


What does 'emulating a virtual desktop' do on Playonlinux

Emulate a virtual desktop is an option in Wine to run applications contained inside a window, which pretends to be the desktop of Windows.


Black screen after login on fresh Ubuntu 19.10

I tried reinstalling it again (formatting the hard drive once more in the process) and it worked (at least for now).


Windows Comfort Mouse 4500 Configuration

Install:

We will need xbindkeys and xte to do this. Install them by running:

sudo apt-get install xbindkeys xautomation

Bind:

Now the fun starts!
Before we start binding our mouse buttons to actions we need to create a configuration file for xbindkeys.  Run:

touch .xbindkeysrc && xbindkeys -f .xbindkeysrc  && gedit .xbindkeysrc

This command creates the file and opens it for editing.  Add this to the bottom of the file:

"xte 'mouseclick 2'"
b:9

Save the file.

Restart the computer.

NOTE: If you tell me what you want the other buttons to do I will add the commands for that.


It seems the best solution to your problem is to delete the ~/Library/Application Support/Transmission/Resume folder. I've looked at a few threads and everyone seems to have arrived at that answer. To see more information, look here.


How can I see my files in 2nd partition of hdd?

You cant use gparted to change a partition that is mounted. You say you cant see your 2nd partition but if it is mounted to /home then everything in this folder will be on your 2nd partition.

If you open the 'System Monitor' and click the 'File Systems' tab you will be able to see each partition and where it is mounted.

If you would like to alter a partition then you will have to do so from a live USB or CD as this it the only way you will be able to change the HD without mounting it first.


How to restore the default Ubuntu 20.04 boot screen logo?

This changes are also should be written into initramfs with

sudo update-initramfs -u -k all

and then reboot to check effect.


Adobe Flashplayer plugin - when will this be upgraded on Ubuntu?

I will neither talk about the security issues related to using proprietary plugins (that recently proved being faulty in many ways), nor about the ethical implications in it.
I will just talk about the story, which is not as simple as you write it, and Ubuntu is completely unrelated to it.

There are 3 players in the game. Mozilla, Google and Adobe.

Adobe at some points decides that it will not update the Flash NPAPI plugin for Linux, for reasons that no one else knows, nor has to know.
They are a private company, they choose what to develop and what not. Fine.

Google at some point starts developing a new way to integrate plugins in a browser, called PPAPI and abandon after some time the old technology NPAPI, developed by Netscape.

Together with what above, this implies also that on Android you could not play Flash contents anymore.
This is a bit less fine than before and it piss off a lot of users, coders and companies.

At some point in history Adobe and Google start talking and they find a way to develop and mantain a PPAPI version of the latest Flash plugin, that will be packaged directly by Google and embedded into Chrome.

Now, Mozilla can't/won't use PPAPI technology in Firefox. This, with what is above, implies that the latest Flash plugin from Adobe/Google won't work in Firefox. Fine, there is alwasy the 5-years-old NPAPI plugin from Adobe that we can use.
Unfortunately this does not include the latest features and it is block by more and more websites everyday (note that Adobe claims that it is secure, as they still provide security updates).

So the question now. Is there another browser, apart from Google Chrome, that works on Linux and can take advantage of the latest PPAPI proprietary Flash plugin?
Yes, any browser that supports PPAPI techonology.
Like? For example the (non completely free) Chromium-browser, on which Google Chrome is based.

Now, how to take advantage of this latest PPAPI plugin in Chromium?
Following the wiki.


Not enough free space on /boot to upgrade - already cleaned old kernels!

ok I figured it out and I'm leaving this answer here for whomever bumps in the same problem and despite cleaning the old kernels from /boot still has problems with the GUI updater

I found out that the GUI updater might stick with the same old notice even after you have cleaned space in /boot. Restarting didn't help.. This might as well be a bug?

How I solved:

went to terminal and manually installed the necessary packages, like:

sudo apt-get install linux-generic

check with sudo apt-get upgrade if you have any more to install who have been kept back and install those too, in my case I had also to run:

sudo apt-get update linux-tools-virtual

after that I did a

sudo apt-get autoremove

later tried to run again the GUI updater... it will say everything's ok up to date and invite to restart since there's a new kernel

I was able to solve since although far from being an expert I know my way around the command line. I'll file a report to Ubuntu in case this is a bug with the GUI updater.


recompiled kernel with luks full-disk encryption?

It used to be make mrproper, make, and fixup lilo.  Now I feel dumb for two days building the kernel, once. I'm still confused, but that's another cover.  In the end, here is what worked:

uninstall the 5.0.0-29 kernel packages entirely (nevermind adding suffix to beat the versioning, I purged them all entirely, I have a previous version built by The Canonical to fallback to).
git reset --hard in the repo (etc, until git status was clean)
fakeroot debian/rules editconfigs (I hit ctrl-c after amd64-generic)
edit debian.master/config/annotations to match the changes I made to .config
fakeroot debian/rules binary-headers binary-perarch binary-generic
dpkg -i ../*.deb

So many bugs, but the original question above is now solved and I can handle the rest.  The only reason I use ubuntu now, is the single fact that the installer does this full-disk encryption for me.  afaik, it's the only one that does.  others?  Any others, and I'll switch.

Thanks for your patience, everyone who read this question (all 11 of ya).

I love you all.


How do I use the 'scientific' mode in the Calculator?

The Calculator has various modes. What you are looking for is the Programming mode, which lets you display numbers in various bases. To use it, select Calculator › Programming from the menu.

As you asked for the scientific mode, I must add that functions commonly used in scientific calculations are available using Calculator › Advanced.


Are there widgets available for promoting Ubuntu on your site?

There are some attleast at https://wiki.ubuntu.com/WebsiteButtons, tho those are not as fancy as countdown banner were. Maybe someone else knows more?


How to resolve an internet IP Address into its FQDN

$ dig +short -x 8.8.8.8

dig -- domain information groper

+short -- one line output

-x -- reverse lookup

If you want reverse resolution of hostnames which do not have public rDNS, you may be able to accomplish it by manually adding entries to /etc/hosts.  (1) This would be a headache if you have lots of hosts for which you want this to work, and (2) I don't know if etherape in particular will observe entries in /etc/hosts or not.  But for the example in your comment, you could add

91.211.73.234         www.gumtree.com

to the end of /etc/hosts


If you are using the 32 bit version of Ubuntu, you don't need nor will you find an ia32-libs package. That's only required for the 64 bit version of Ubuntu.

To install 32-bit libraries on a 64-bit Ubuntu system, Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the commands below.

sudo apt-get install ia32-libs


Undeterministic black second screen [Ubuntu 15.10, Dell Latitude 3340 (hdmi) -> IIyama (vga)]

If the HDMI cable is not the issue, it could also be worth while to upgrade to a more recent video driver.

There should be options for upgrading Your driver here: https://01.org/linuxgraphics/downloads/intel-graphics-installer-linux-1.4.0


The program was downloaded correctly (At least from the parts you pasted here it seems to be the valid repo python script). You probably need to add the ~/bin directory to your PATH variable to make it work.

To do this, you need to run the following command in your Terminal:
export PATH="~/bin:$PATH"

Check now if the repo command works.

If it works, to make those changes persistent, simply add this command from above to the end of your .bashrc file.


No clue how to download Skype onto Asus 1015e

Here is the link to download Skype:

Skype Download

Remember to choose your distribution


Dual OS setup on a bootable flash drive?

Partition your hard drive with something like Gparted, or any hard drive editor, into FAT32, as you can usually only install OS onto FAT32. When you partition something, it basically splits it into to seperate sections for putting files in.
Use http://unetbootin.sourceforge.net UNetbootin to install an OS onto usb drive. (Make sure you choose the right spot (partition) for installation. It's pretty straightforward once you download it, you just open it, choose the distro you want, and choose the usb device you want to install it to. Note the options will be like disk2s1, to find which one is which (I've only done this on mac), you need to type in "diskutil list", it'll tell you the normal name of the drive, and the numbered name like disk1s2. Usually the thing you put on a usb drive is a live boot, which you can boot it from.
That's basically it, unless you need a bootloader, like REfind http://www.rodsbooks.com/refind/.

Tips

-Please know that you can only run it from the usb, it won't save anything. To make it save, you have to install an OS from another storage device. For example, I could install Ubuntu onto my computer by first making a partitioned spot for the installation of Ubuntu (usually EXT4 format) on your computer and then loading up the thing you installed with the above guides and using the installer to install to your computer partition
-please keep in mind this is my first answer I think, so I may have gotten stuff wrong.


How to create video from images with filename yyyy-MM-dd:HH:mm:ss

I'm afraid your are right about the error being due to the file selector.
Quoting the manual:

      For creating a video from many images:

              avconv -f image2 -i foo-%03d.jpeg -r 12 -s WxH foo.avi

      The syntax "foo-%03d.jpeg" specifies to use a decimal number composed of
      three digits padded with zeroes to express the sequence number. It is the
      same syntax supported by the C printf function, but only formats accepting a
      normal integer are suitable.

If you want you can start at an integer greater than 0:

  -start_number start
  Specify the first number in the sequence

You do not need to really rename: you can create symbolic links with the ln command, which would take really little space on your disk.

I advise you to make a backup of your pictures before trying scripts

You can try to use this bash script:

#! /bin/bash
INPUTDIR="$1"
OUPUTDIR="$2"

SORTEDLIST="$(cd "$INPUTDIR" && ls -1 | sort -n)"

COUNT="$(echo -e "$SORTEDLIST"|wc -l)"
echo "Found $COUNT files"

ZEROES="$(echo -e "$COUNT"|wc -c)" # (will count \n)
echo "Using $ZEROES characters to display integers"

COUNTER="0"
for file in $SORTEDLIST; do
    ID="$(printf "%0${ZEROES}d" "$COUNTER")"

    echo "ln -s $INPUTDIR/$file $OUPUTDIR/$ID.jpg"
    ln -s "$INPUTDIR/$file" "$OUPUTDIR/$ID.jpg"

    COUNTER=$((COUNTER + 1))
done

This script assumes that all all your images are located inside a directory containing only the images that you want to include in your video.
To use it:

create an output directory that will contain your links: mkdir output
execute it ./script.sh nameofthefoldercontainingyourimages output


Whatever you do you, make a backup before you play with filesystems!
Check the manpages ( man tune2fs ) before using this!
This only works on ext filesystems!

To disable journaling you can use (where XN points to your partition letter and digit):
tune2fs -O ^has_journal /dev/sdXN

From the man page:

tune2fs - adjust tunable filesystem parameters on ext2/ext3/ext4 filesystems
Option: -O [^]feature[,...]
Set or clear the indicated filesystem features (options) in the filesystem. More than one filesystem feature can be cleared or set by separating features with commas. Filesystem features prefixed with a caret character ('^') will be cleared in the filesystem's superblock; filesystem features without a prefix character or prefixed with a plus character ('+') will be added to the filesystem.
...
has_journal

Use a journal to ensure filesystem consistency even across unclean shutdowns. Setting the filesystem feature is equivalent to using the -j option.

You might also need the ...

Option: -f
Force the tune2fs operation to complete even in the face of errors. This option is useful when removing the has_journal filesystem feature from a filesystem which has an external journal (or is corrupted such that it appears to have an external journal), but that external journal is not available.
WARNING: Removing an external journal from a filesystem which was not cleanly unmounted without first replaying the external journal can result in severe data loss and filesystem corruption.

The filesystem needs to be either unmounted or in read-only mode. From the grub prompt: "advanced options" -> "recovery mode" -> "Drop to a root shell prompt" or use a Live DVD.


change directory during Install of deb packages for libreoffice 4.2 producing no file found cmd line

The directory isn't actually called LibreOffice_4.2.0.x_Linux_x86-64_deb, but 4.2.0.4. Not to rub it in, but if you had followed the instructions, this wouldn't have been a problem :)

«(No need to write everything: use Tab ↹ to autocomplete the command line, or copy and paste with the middle-click mouse button)»

So, everything is fine and you've done everything correct, except either copy/pasting or entering the complete filename rather than using Tab to complete it for you. :)


Installing RStudio -- is this very different from other packages?

There are two components to get RStudio to work

First, get R from PPA

You can get R from the repositories, but it likely won't be the latest version. I use Michael Rutter's PPA. The following commands will get the latest version of R installed:

sudo add-apt-repository ppa:marutter/rrutter
sudo apt-get update
sudo apt-get install r-base r-base-dev

Second, install RStudio

Unfortunately, the makers of RStudio do not make their software available via a PPA or in the Ubuntu repository. You have to install it from the deb file which is available on their website.

Go to https://www.rstudio.com/products/rstudio/#Desktop
Click on DOWNLOAD RSTUDIO DESKTOP button.
Look for "RStudio Desktop Open Source License" and click the
DOWNLOAD button below it.
Look under the "Installer for supported platform" and find that
says: "RStudio x.y.zzz - Ubuntu 12.04+/Debian 8+ (64-bit)", assuming
you are using 64 bit Ubuntu and click on it. This will download the
`deb' file. Wait for the download to complete.
Open the file browser and double click on the Deb file to open it in
the Software Center.
Install using software center.

If you run into libgstreamer dependency issues see Install the lastest version of RStudio

You are right, the deb file will not update itself and revisiting the RStudio every now and then to see there are updates is tedious. Inside RStudio Menu > Help > Check for Updates eases the pain somewhat. If you click on this RStudio will check for updates of itself and give you the option to close RStudio and download the new deb file. This will close RStudio and open your default web browser and take you to the RStudio download page in step 3 above.

You can get RStudio to automatically check for updates in Menu > Tools > Global Options...> General Tab> Automatically notify me of updates to RStudio check box.

Bonus Point

As you use R, you will need to install other R packages. Sometimes these are available in the repositories. Say the r package you want it foo then the package in the repositories is called r-cran-foo.

sudo apt-get r-cran-foo

will get the job done. This is the best option as it will keep foo updated. However, this does not always work.

If this does not work you will want to install and/or update R packages from inside RStudio. If you do this, you will find that RStudio would put the new files (including updates) inside in your home directory /home/<user>/R/.

One way to solve this problem and let RStudio install additional packages in its proper place is to add yourself to the group staff by using the following command in the Ubuntu terminal:

sudo adduser <user> staff

Replace <user> with your username.

After this, you will get the option of installing or updating packages /usr/local/lib/R/ or in /home/<user>/R/. Then you will be able to choose the former as the default install location.

Source: https://stackoverflow.com/questions/5560139/install-r-package-xml-in-debian-ubuntu

Hope this helps


How to replace compiz with another window manager

I had the same problem with Unity/Compiz workspaces... ie: dragging windows between workspaces causing a freeze.

I recently installed the GNOME (ubuntu-gnome-desktop) environment (as we're all going to GNOME in 17.10). With GNOME, the gdm3 display manager (be sure to select gdm3 over lightdm during the install), and the lack of compiz, workspaces work fine there. Highly recommended to fix your problem.

sudo apt-get update
sudo apt-get install ubuntu-gnome-desktop

Logout. When you get back to the login screen, click on the little Ubuntu icon next to the username, and select GNOME. Now login and you'll be in GNOME. Then reboot.


Using script /bin/sh -c gnome-terminal to open 4 Terminal Windows at Startup

You do not need /bin/sh -c if you are running it from script. Also, use & instead of ;, like so

#!/bin/bash

gnome-terminal -t WINDOW-ONE &
gnome-terminal -t WINDOW-TWO &
gnome-terminal -t WINDOW-THREE &
gnome-terminal -t WINDOW-FOUR &

I believe the reason why it behaves like it does in your original script is because the shell is waiting for each line of script to complete first, so it is waiting for the first window to get done. With &, you disconnect gnome-terminal from script, and the script can go on to the next line. Hope that makes sense


Control monitor brightness with keyboard shortcut?

Bind a keyboard shortcut

Gnome allows you to bind any key to run a command of your choice. If xbacklight worked, I'd suggest you use that. Since you said it does not, you can use the brightness script I'll include below.

Go to Settings → Keyboard → Shortcuts and scroll to the bottom of the list.
You'll find a + button. Click it to open the Add Custom Shortcut dialog:

For the Name put "Brightness Up", for the Command, type brightness +10
Click the "Set Shortcut" button and hit the key you want to turn the screen brighter.

Now do the same for "Brightness Down", using brightness -10.

b9's brightness script

Many external monitors cannot control the backlight lamp with xbacklight. But you can still control the brightness using software. Here's a script I wrote which does that.

#!/bin/bash
# brightness: Change all monitors brightness in software.
# by hackerb9, 2019

# Examples:  brightness 75;  brightness -5; brightness +10
# Usage:
#       brightess [n] [+n] [-n]
#       n       An integer from 0 to 100 specifies a brightness level.
#       +n      Increase brightness by n.
#       -n      Decrease brightness by n.
#               No argument shows current brightness level.

b=$(xrandr --current --verbose | grep Brightness)
b=${b#*: }                      # Remove "Brightness: "
b=${b#0.}                       # 0.30 --> 30
[[ $b == "1.0" ]] && b="100"
case $1 in
    +*|-*)
        b=$((b $1))             # b=b+10,  b=b-10
        ;;
    [0-9]*)
        b=$1                    # b=75
        ;;
    *)
        echo $b; exit
        ;;
esac

[[ $b -lt 0 ]] && b=0
[[ $b -gt 100 ]] && b=100

if [[ $b -eq 100 ]]; then
    b=1.0
else
    b=0.$b
fi

outputs=$(xrandr --current | awk '$2 == "connected" {print $1}')
for o in $outputs; do
    xrandr --output $o --brightness $b
done

To install the script, paste it into a file called brightness, set it executable, and put it in your path. Or, you can cut-and-paste these commands:

wget https://github.com/hackerb9/brightness/raw/master/brightness
chmod 755 brightness
sudo mv brightness /usr/local/bin/

xbacklight

If xbacklight did work for you, you could use it as a drop-in replacement for brightness in the above instructions. (xbacklight +10 for Brightness Up, xbacklight -10 for Down.)


It would be great if you show your script. But anyway, you have to use exit command like:

mount <partition> /mnt/controlurg || exit 1

This command just will stop running script. You can show some message(or write to log file) like:

mount <partition> /mnt/controlurg || eval 'echo "Error mounting partition" 1>&2; exit 1'

mount <partition> /mnt/controlurg || eval 'echo "Error mounting partition\n" >> mount.log; exit 1'

To kill all processes use killall command.


Natural Scrolling on Ubuntu Gnome isn't working

As stated in the solution linked in the comment, uninstall xserver-xorg-input-synaptics

sudo purge xserver-xorg-input-synaptics

then log out and back in.


Change your default window grabbing key
Go to Settings Manager > Window Manager Tweaks > Accessibility and change Key used to grab and move windows to another different from ALT

Logoff and login again.
Source: XFCE Window Manager Tweaks Wiki


So what directory can I go to remove some unnecessary files?

/

All the other directories you show us with the df command are not part of / or are virtual filesystems.

And this depends on what you installed on your system. The generic places (like /var/cache/archives/  to delete the deb files it cached are temporary fixes.

28Gb is a lot for a desktop. If you have apache, mysql installed you will need more than 28Gb. If not you need to examine the software you installed on this system and start removing some. And the would be using the apt purge command, not a specific directory.


My first time in emergency mode. Don't know what to do. Steps to debug

For newbies like me...

I want to add this

When loading the system. You can see the logo KUBUNTU.

You can press the up arrow once and then you see what the system is actually doing at the moment.

There was a line in RED

Time Timed out waiting for device /dev/sdc1

There were another in Yellow

DEPEND Dependency failed for /HDD
DEPEND Dependency failed for Local File Systems.

This new insights to my problem was about to add to this post in order to give more information that could help me getting answers.

But the kind comment by @user966203 resolved my problem

If you have suggestions on how to give more accurate information in such a case please comment or answer this question.


Toshiba Satellite L855-14J and Ubuntu 12.10

After some time, I've managed to fix almost every problem I encountered.

Wired network: As I could make normal installation with wirelles working out of the box, this wasn't a big issue. You can check with lspci that network card used in that laptop is Atheros AR8161. Fix this by installing linux-backports-modules-cw-* for your kernel (you can check it by typing uname -a - mine was 3.5.0-19-generic)

sudo apt-get install linux-backports-modules-cw-3.6-3.5.0-19-generic

and running

sudo modprobe alx

USB 3.0: I wanted to use external HDD with USB 3.0 enclosure but I found it not working. For this problem I don't blame Ubuntu (Linux) because I haven't managed to find any other working USB 3.0 device so I can check it. It may be some problem with enclosure or powering USB port, because it is working with desktop and Windows 7. If I find more, I'll post and update.

As this laptop comes with only one USB 2.0 port and two USB 3.0 ports, I found useful to disable USB 3.0 in BIOS is order to make it behave like USB 2.0.
No Intel HD graphic: I was hoping that I could use i7 built-in HD 4000 GPU with Intel open-source drivers for general usage and saving battery life, but I was wrong. This time it's Toshibas bad idea to make graphic non-switchable, so laptop can only use AMD graphic, not i7s one. Be careful if you intend to buy Toshiba laptops and want to have both GPUs as it seams that this is theirs general practice.
Fglrx drivers: I managed to make it working by installing fglrx from repository. It seams that fglrx package wasn't compatibile with this kernel or X (I don't really know for sure) but fglrx-updates package did the trick. So:

sudo apt-get install fglrx-updates fglrx-amdcccle-updates

and don't forget to

sudo aticonfig --initial

and reboot.

After this process, I got scared because whole screen was tearing hard and was really unusable. Fortunately, this fixed it. Open amdcccle and in Display options -> Tear free enable Tear Free Desktop to reduce tearing. Also, In 3D -> More settings put Wait for vertical refresh to Always on.

If everything was OK fglrxinfo should give you
Brightness: With default open-source drivers, brightness changing didn't worked, but with fglrx working everything was ok.

Also, in case someone is interested, I've added 4GB RAM more and changed built-in HDD for SDD. Laptop performances are quite impressive and one feels more productive in such fast enviroment - it boots in Ubuntu for ~6 seconds.

Only bigger downside, with missing Intel HD graphics, is low battery life. Best result was almost 2h with low display brightness and using only terminals and Firefox.


Switching monitors when Steam Controller is turned on

I ended up using this Python standalone Steam Controller driver: https://github.com/ynsta/steamcontroller

There are a few example script on how to get button events and set up a callback. I just set up a callback for the home button and launch steam from there. The only issue is, that you can't have that script running while steam runs because the standalone driver will capture all controller events, but I wanted steam to control the controller (just start steam and close the script).

So I have:

main.py: controls all scripts, waits for button_callback.py result then launches start_steam.py, when that exits restart button_callback.py
button_callback.py: waits for a home button press, then exits
start_steam.py: activates tv via xrandr, switches audio sink via pacmd to hdmi, waits for steam close, deactivates tv, reverts audio


The problem had nothing to do with docker.

It turned out that APT had a proxy configured. Not sure how it got there, maybe IT placed it in the first place. When I moved to a different sub network, the proxy broke (since it wouldn't be reachable anymore).

The solution was to remove the following line from /etc/apt/apt.conf.d/90-apt-proxy.conf:

Acquire::http::Proxy "http://10.11.55.xxx:3142"

Thanks to @steeldriver for the pointers.


I had an old laptop with a touchscreen, which I wanted to use for a project. It had a small (2GB) harddisk with Debian on it, which was missing some features I needed (missing drivers for the graphics adapter and no touch calibration tools)

The BIOS only supported booting from a floppy drive (with a special connector) or a CD-ROM drive (PCMCIA), neither of which i have, and finally, PXE boot.

Not being able to boot from USB, and not having access to the proper hardware, what to do, when I wanted to install Ubuntu?

To solve this, I began searching for PXE articles. I ran across this article on PXE on Ubuntu 15.04 (note that articles for previous versions deviated very much from 15.04 configuration files, etc.)

I decided to experiment, so i created a Virtual machine running with bridged networking, with a plain Ubuntu 15.04 server, configuring the server as stated, with apache2, tftpd-hpa, inetutils-inetd. I also made sure that I had the server-i386 flavor of the ISO, since the netboot file needed was not avaiable on the other ISOs.

An extra issue was that I have a router with DHCP already, and since the machine being installed on needs an IP from the server I had set up in order to get the required settings for the tftp server. My solution was to unplug my switch from my router, start up the laptop, let it get the ip address, and boot ubuntu load screen, and then replug the router, and pause the virtual machine running my PXE server. This is definitely an approach I would use in the future when installing Ubuntu on ancient hardware.


how to backup data from usb drive using dd or dd_rescue in ubuntu

Since you have no errors on the device you don't have to use "dd_rescue". "dd" is sufficient.

I don't know your system configuration. Therefore I suppose your SD card is device /dev/sdx. To create an image using dd please enter the following commands:

dd if=/dev/sdx of=backup-image.img

It's a good idea to unmount the partitions of the SD card before.

I hope this helps?


How do I install Brother MFC7340 - Ubuntu 12.10

Are you using this printer via Network or USB and is your Ubuntu 32bit or 64bit? I also had troubles with my Brother printer the first time I installed it.


Why is the Enable Wireless button greyed out and unselectable?

You can try that:

turn on wireless switch
in a terminal windows execute the below command
 sudo rfkill unblock wifi
reboot
in a terminal windows execute the below command
 sudo ifconfig wlan0 up
enable wireless in NetworkManager

Worked for me!


SSD caching (e.g. ASUS P9X79 WS) ‒ possible on Ubuntu?

I too have been considering options for the SSD on my HP Envy 6. You might want to read this article on Phornix discussing bcache.  Bcache "is a Linux kernel block layer cache. It allows one or more fast disk drives such as flash-based solid state drives (SSDs) to act as a cache for one or more slower hard disk drives."

Before you jump in with bcache, I would highly suggest reading the "Getting started" section in their documentation.  They way I read it is that the entire SSD must be used for the cache (unlike Intel Smart Caching which can use subsets of the drive).

There are also a few posts about this topic here:

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

I have been waiting to see how this project matures before implementing it on my system. As an alternative, you could put the OS on the SSD and /home on the hard drive. There are several suggestions on how to optimize performance in this configuration (e.g. see here); however, the only option I have enabled is the discard line in /etc/fstab as other reading has indicated many of the other changes may not be necessary.


updates/applications to all VirtualBox's OS's

I'd suggest the following...

Shutdown all 3 VMs

For each of the 2 VMs to be updated:

Using VBoxManage, connect the updated VMs root disk as an extra disk
Boot the VM, login and start a terminal session
Mount the updated system's root partition e.g. sudo mount /dev/sdb /mnt
Copy the update cache from the updated machine - sudo cp -dpv /mnt/var/cache/apt/archives/*.deb /var/cache/apt/archives
Run sudo apt-get update && sudo apt-get -y upgrade to update all packages
Shutdown the VM, disconnect the extra disk and reboot.

The VM to be updated should detect that the .deb file is already 'downloaded' to the cache and simply use it to upgrade. New packages will need to be installed but should also not need to be downloaded again.


How to install via source code / Installing in Ubuntu (PPA)

I could not find any guidance on the provider's site

All the info you need is there; you just missed a vital part of that page. See the last bit of my answer.

Regarding source install: download the tar file on that page you linked to and read the install.txt or readme. It will have command line instructions on how to install. Not the easiest method though and if you get uncompiled code you also need to compile (ie. configure/make) it. If you are lucky they did that for you and installation is just a copy/paste.
From the "tar":

To install Turpial from sources you should go to source folder and run (as superuser):
# python setup.py install

or using sudo::
$ sudo python setup.py install

Normal install is possible from the repositories
Turpial is in the repositories.  So ...
sudo apt-get install turpial

will install turpial version 3.0 when using Ubuntu 15.04.

Method for getting the newest version
But the easiest method listed on that page that will work for Ubuntu is PIP:

Installing via PIP
pip install turpial

Generally pip will not be installed on your system and if you do not have pip installed ...
 sudo apt-get install pip

Currently this will install version 3.0 so it should be the same as the one from our repositories. In case there is a new version and 15.04 is not told there is an update you can get the newer version like that.


Here is what I would do:

Create a launchpad account.

Sign the Ubuntu Code of Conduct.

Make a PPA.

Write a metapackage that depends on all the packages you want to install. Every time you install a package, update the PPA.

You can learn how to write a metapackage here.

Add the PPA to all computers you want to update.

Run:

sudo apt-get install yourmetapackage

When you change the PPA:

sudo apt-get upgrade


using a xspf file on both ubuntu and windows

i found it! after examining the error better i realized it was looking for /D: rather than just D:

and appearently by using ""ln -s /media/fuseteam/Data/D:" it created a file in my home folder

so the correct command was "sudo ln -s /media/fuseteam/Data /D:"


how can i fix the wifi connection for ubuntu 12.04?

simply taking their solution 2 and tweaking it to look like :

  sudo rmmod -f iwlwifi

  sudo modprobe iwlwifi 11n_disable=1

If you notice that the wifi speed improved, then make the change permanent :

  gksudo gedit /etc/modprobe.d/iwlwifi-disable11n.conf

and add this line to the file:

  options iwlwifi 11n_disable=1

save and quit.

If you're on battery, turning off power management could help as well

  sudo iwconfig wlan0 power off


I've had a quick look at an archived version of the site (via http://web.archive.org) but can't find any reference to any specific password requirements. The FAQs themselves seem unavailable (It looks like there was some script on there to reveal individual sections that wasn't preserved in the archived copy) and nothing is mentioned on the registration page either.

That said, if you're worried about any of your passwords being threatened, I'd suggest changing them anyway. Even down to changing anything that may have been somewhat similar. It's a pain I know, but best practice whenever you think one of your passwords could have been compromised.


Installing NVIDIA drivers on Ubuntu (Guest) in VirtualBox causes it to stop working

It is not a good idea to install video drivers to a guest system.

Guest systems do not have direct access to the graphics adapter. That is why they use virtual VBox drivers.

Just remove the Nvidia driver and never install it to guest systems.

If you did not do that already, install Guest Additions from Machine menu. This will install the virtual drivers.


How to change time display to 12h time format in Ubuntu

There are several ways:

From GUI (Settings):

Open Settings >Details> Date & Time. Then pick either 24 hrs or am/pm
From GUI (using dconf-editor)

Open dconf Editor (not installed by default, run

sudo apt install dconf-editor

to install), and browse to org > gnome > desktop > interface > clock-format, and change the format to '12h'

From command line:

Run the command:

gsettings set org.gnome.desktop.interface clock-format '12h'

To revert:

gsettings set org.gnome.desktop.interface clock-format '24h'


System wide Proxy settings when on a windows network with a password

First of all, if you are behind a Web Proxy to go to the Internet, you cannot use ping to test the connection to Internet.
This is because ping is not able to use any proxy to do its work, it is using its own protocol : ICMP to send and receive packet. Web proxies works only for the TCP protocol.

So if you are able to open any web site in your web browser, then you can be sure that your connection to Internet is working, no reason to do ping to double-check that.

Now regarding your problem with the package manager, if you go to System Settings -> Network, you can there define a Web Proxy configuration and apply it system-wide.
When I do so on my laptop, I'm able to use apt-get without manually configuring Proxy directives into its configuration files.
To work, you have to open your terminal after having clicked the Apply system-wide button. (Setting cannot be applied to already running program, only to those starting after you apply the settings).

UPD: More about Proxies and authentication

Another source of problem, as you are in Windows environment, may be the authentication mechanisms used on your web proxy.
If this proxy is configured to use NTLM, it is possible that some application cannot authentify to it.
In this case, what you can do is to install a local proxy supporting NTLM like cntlm, running it on 127.0.0.1 is enough and pointing it to your real Web Proxy. Then just use this local proxy as default proxy for your Ubuntu system.


If you are ready to do some more reading/research/experimenting (this is not just a simple "install and go" solution) then you could use a tool such as Prometheus specifically it's node-exporter where a node in this context will be your PC. The node exporter can capture a lot of data from your PC on a (configurable) periodic basis. Prometheus has a basic web-based interface to query that data.
There are versions of Prometheus in the Ubuntu repositories so to get started it may be as easy as:
sudo apt-get install prometheus prometheus-node-exporter
If you want to report/analyse/graph that captured data then you may need other tools. I use Grafana which supports lots of data sources including Prometheus. It allows you to graph current/historical data very easily in many different ways.


It's possible that the copy of Ubuntu you put on your usb drive has an error. Verify the .iso file you used to create the live usb following these steps.

If that isn't the problem, make the live usb again. If it still doesn't work, try a new usb drive.


Will installing Ubuntu using the "erase entire disk" option remove and erase all currently existing partitions?

Using the "Erase entire disk", will erase all partitions.

Since you're new, I would recommend to start with dual booting with Windows first. Get used to Ubuntu and then you may decide later to remove Windows completely. This is especially recommended if you do not have recovery media or another means of reinstalling Windows should you wish to.

In any case, I would recommend doing a backup of your important data on an external disk before trying to install Ubuntu. If something goes wrong, your data would be safe.


Cannot change screen brightness on my lenovo z 570?

Try switching off Num Lock.

With my z570 xubuntu the brightness keys are without function if Num Lock is active.
When i switch it off every thing works fine.


What do I do if Ubuntu 16.04 freezes, but I can move only the mouse?

Well there is a magic key combination (to reboot):

While holding Alt and the SysReq (Print Screen) keys, type REISUB

For more details visit this answer : https://askubuntu.com/a/36717/497359


How can I install wireless drivers without internet?

If you know that the driver is in use while you boot from that usb, just issue lshw,  find out network section, under that find your Broadcom device, go to its configuration: section; there you'll find a driver=xxx entry, that's the driver module in use. Then issue the command modinfo xxx where xxx is the driver module name. You'll find the location of the module under filename: entry. It should be a .ko(kernel object) file.
By the way, make sure the USB installation and the HDD installation uses same kernel version or copying won't work.


12.04 runs out of support in nine days time; after five years of support and service; so many would recommend you make plans immediately to install a new version that can give you continued support

http://fridge.ubuntu.com/2017/03/15/ubuntu-12-04-precise-pangolin-reaches-end-of-life-on-april-28-2017/


How to remove GRUB boot launcher from Windows 10 without a recovery disk

This can be done in two ways using the command prompt or by using EasyBCD(not sure if it is possible with windows 10).
The Command prompt method

Open command prompt(Press Win+X and choose command prompt)
Enter bootsect /nt60 <drive name>: /mbr


When you are using multiple monitors - make sure with what configuration tool (or how) you manage the configuration. There are several ways how to configure just this one setting, how screens are positioned relative one to another.

I would try to check what tools (settings->Display, driver configuration tool) you have that shows configuration as it is working for you now, and in that tool change the settings, as far as my experience - Ubuntu can be configured the common Linux way, but then Ubuntu configuration tools kick in and override settings in Xorg or wherever you set them.


trying to overwrite '/usr/bin/opencv_haartraining', which is also in package libopencv2.3-bin 2.3.1+svn6514+branch23-12~oneiric

http://www.iasptk.com/ubuntu-fix-broken-package-best-solution

After trying

sudo dpkg --configure -a

and

sudo apt-get install -f

the problem of a broken package still exist the solution is to edit the dpkg status file manually.

sudo nano /var/lib/dpkg/status

(you can use vim instead of nano)

Locate the corrupt package, and remove the whole block of information about it and save the file.


I cannot open the terminal (from launcher, dashboard or other terminals)

There are two important errors in the output, each is at the bottom of the two python error stacks:

  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 42, in <module>
    from . import _gi
ImportError: cannot import name '_gi'

  File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
    import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'

Let's figure out which packages aren't working:

$ dpkg -S /usr/lib/python3/dist-packages/apt/__init__.py
python3-apt: /usr/lib/python3/dist-packages/apt/__init__.py

$ dpkg -S /usr/lib/python3/dist-packages/gi/__init__.py
python3-gi: /usr/lib/python3/dist-packages/gi/__init__.py

So the two packages for you to reinstall are python3-apt and python3-gi

However, those two packages are fundamental to the operation of your Ubuntu system, and it's really unlikely that both failed at once. Something else important is going on that you have not mentioned yet.


How To Replace Logitech Wireless Unified USB Plug In Ubuntu

You need to either:

Using Windows and the Logitech Keyboard/Mouse, and Unifying Software, you need to pair the USB dongle and the K400r keyboard. Once paired, it'll then work in Ubuntu.

In Ubuntu, install solaar and it'll do the pairing, and some limited configuration. More information about solaar, and software downloads, can be seen at their GitHub repo page.

To install solaar from the Ubuntu repos, in a terminal:
sudo apt-get update
sudo apt-get install solaar

Then follow the Solaar usage guide.
You should also make sure that the firmware in the USB dongle is current. See this link for instructions and the firmware.


Why did not they make a distribution for Ubuntu Server 13.04 for 32-bit?

The i386 builds of Ubuntu haven't gone anywhere. You can download the ISO at releases.ubuntu.com for i386, amd64, or even for armhf+omap4 on the server.


Not able to play videos properly in Ubuntu 16.04

A solution is to disable "Hardware-accelerate decoding" in preferences->input/codecs

Source:
https://trac.videolan.org/vlc/ticket/16877


Installing GIMP: snap, repository, or PPA?

You'd probably be better and more consistent support by using tested apps from the repository.  Many people (including me) use PPA's for certain of our preferred apps.

When you choose a PPA then you'll have to remember which PPA's are using and be prepared to use the developers of the PPA for ultimate support.

You can get general support for common PPA's from regular Ubuntu support communities.  But if a PPA fails, or you discover some conflict with your PPA and Ubuntu, you may have to be prepared to remove the PPA, then check and verify your Ubuntu installation.  Then reinstall the PPA and rely on the PPA community to fix what might be a conflict.

Keep in mind the repository is tested by the community and not expected to present any problems.  If there is a problem with the application in the repository, the Ubuntu developers will work to resolve it or remove it from the repository.


Stuck in the "Log in as another user" screen loop

I've managed to fix this by disabling Wayland usage in gdm3. Edit /etc/gdm3/custom.conf, replace

#WaylandEnable=false

with

WaylandEnable=false

and restart everything.


How to crawl a website using wget until 300 html pages are saved

You could try something like this:

background your wget command and record its PID ($!)
set up an inotifywatch on the receiving directory to count files
kill the wget process when the count exceeds a threshold

To illustrate, using a shell function to simulate the recursive wget:

#!/bin/bash

local_dir=tmp

wgetcmd() {
  local i=0

  while :
  do
    # simulate page download
    echo "Downloading... $((++i))"
    touch "$local_dir/file${i}.html"
    sleep 2
  done
}

wgetcmd & pid=$!

j=1
while kill -s 0 $pid && read path action file
do
  if (( ++j >= 30 )); then
    echo "Reached page limit"
    kill $pid
    break;
  fi
done < <(inotifywait -m "$local_dir" -e close_write)


Dual boot Ubuntu+Windows 8: Ubuntu won't show up

I followed this guide. The point is I had to choose the boot option UEFI after disabling secure boot, and then install Ubuntu. Previously I had set it to CMS.


Systemctl failure using --global setting

To make your service available for all user you have to put the script into the /lib/systemd/user directory.
It makes no sense to set --user and --global at the same time. Just run
sudo systemctl --global enable *service*

to enable the service globally.


Cannot install Ubuntu 14.04.3 LTS on a computer with Windows 10 UEFI

When you get to the install menu you need to change the boot sequence a bit. With Install Ubuntu selected, press e and add nomodeset just after splash. Then Ctrl+x or F10 to continue booting. You should be able to install the system as you normally would.

Or, if given the option in the install menu, press F6 and choose nomodeset from the dropdown menu.


How do I create Ubuntu Live CD with .config and .mozilla inside the ISO?

I believe you can achieve your desired result by utilizing SystemImageKit. The goal of this project is Image-based computing: Operating system complexity reduction by encapsulation. This is accomplished by utilizing the following features which appears (at least to me) to cover all of your requirements and more. This approach eliminates the need to customize the ISO completely.

grub2 with custom helper scripts
ISO files, containing one live operating system each
ExtensionImage files, the contents of which are symlinked into the / upon boot
AppImage files, the contents of which are mounted when the app is executed
An init file that does local configuration and is run when the system boots (and an auxiliary initrd that helps loading this configuration)
Files in $HOME which is mounted from a persistent location

Detailed information regarding this currently active project can be found in the projects readme.md file.


Preserving text formatting when piping output to csv file

Paste this into a file and save it as posture.py

for line in open('temp.txt','r'):
    a,b,c=line.split(':')
    state=b.replace('Posture side','').replace(' ','')
    side=c.rstrip().replace(' ','')
    print('%s,%s' %(state,side))

And then

./posture.exe > temp.txt
python posture.py > posture_result_acc5.csv

How it works.

The output from your posture.exe is written to a temporary file.

The Python script reads the temp file one line at a time.

Each line is split into three chunks by splitting on the colons.

The 'state' value is the middle chunk with the spaces and 'Posture side' removed.

The 'side' value is the third chunk with the spaces and newline character removed.

These are printed as a comma seperated pair.

The output is redirected into the csv file.

If you want the words as well as the value, then change the last line of the Python script to

print('Posture state: %s,Posture side: %s' %(state,side))


Wireless doesn't work reliably on an Acer Aspire 8930 with an Intel wifi link 5100

The Intel WIreless with the Linux Kernel has always not worked well. This is the workaround to get it to work properly:

Press Ctrl + Alt + T. Type in this command: sudo gedit /etc/modprobe.d/intel_11n_disable.conf
Paste this into the gedit windw that opens: options iwlagn 11n_disable=1
Save, and close gedit. When back at the prompt type sudo update-initramfs -u.
Run sudo modprobe -r iwlagn && sudo modprobe iwlagn.
Try it out!

Hope that helps!
Source:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/871254


How can I test a game on Linux within a Windows 10 system?

VirtualBox supports a maximum of 256MB video memory which is in insufficient for your purposes compared to VMware which you have which supports up to 2GB video memory in VMware Workstation 11. VMware Workstation 15 and later supports virtual graphics memory up to 3GB. Even with that if it you are testing a graphics intensive game, you aren't going to get realistic test results unless you install Ubuntu on your computer's hard drive, not as a guest OS in a virtual machine.


Found an answer, Ill leave it here, maybe someone will find this useful:

sudo apt-get remove --purge nvidia-*
sudo apt-get install ubuntu-desktop

To check if succeded:

startx


Dual boot Linux boots into maintenance mode after Windows update

I finally solved the issue myself.

When Windows does the Oct 2019 update it changes the block ID of the Windows partition!!

So the Windows block ID in /etc/fstab must be updated!!

SOLUTION:

From linux command line type 'blkid' and note the block ID for the Windows partition
Edit /etc/fstab and replace the old Windows block ID with the new block ID
reboot


Why does Japanese text show up with Chinese glyphs?

Were the encoding is UTF-8, applications will chose the first font capable of displaying that character. By default it goes in alphabetical order. So if you have both Chinese and Japanese fonts installed, you might end up with glyphs you don't want.

You can select the order that applications will select the fonts by editing your ~/.fonts.conf file. Though if you move Japanese in front of Chines you might end up reversing the problem.


Ubuntu partition filesystem not detected after Win 8 install

Unless you've got another physical disk, your Windows installation has trashed Linux. I'm afraid that recovering Ubuntu is essentially impossible at this point. If you've got important user data, you might try using PhotoRec to try to recover it, but that can be a tedious process. As to getting Ubuntu to boot again, re-installing is the easiest solution by far.


While performing automation testing in Selenium, your test code or test script could result in erroneous results if it is interacting with a web element that is not yet loaded in the Document Object Model (DOM). Or if it is on another iFrame, tab, or window which is not in focus, or any such scenarios. These types of unexpected erroneous outcomes are known as Selenium focus issues.
Selenium can only control a browser when its window is in focus. How do you ensure that the Selenium test code interacts with web elements when they are in focus? You can use workarounds like the addition of minimal delay (in seconds) to ensure that the element on which the testing is performed has loaded. Still, that solution is not foolproof as any change in web page design could make the test inefficient.
I learned selenium from Gayatri mishra, she provides online classes on selenium and other software programming courses, which is great for beginners.


This invocation:

psql -h 127.0.0.1 -U meta

should match this line in pg_hba.conf:

host    all             all             127.0.0.1/32            trust

because the lines are tested in the order of the file and it stops at the first match (a match being on TYPE+DATABASE+USERNAME+[CIDR unless TYPE=local], and that combination is the first match for the above invocation.

trust means that no password will be requested by the server, but what actually happens per your question is that a password is requested, so there's a contradiction between what you get and your pg_hba.conf

Maybe you're not editing pg_hba.conf at the right place. Since version 10, postgresql has a view that reflects the file contents, see

https://www.postgresql.org/docs/10/static/view-pg-hba-file-rules.html

  This view can be helpful for checking whether planned changes in the
  authentication configuration file will work, or for diagnosing a
  previous failure. Note that this view reports on the current contents
  of the file, not on what was last loaded by the server.

You might check with select * from pg_hba_file_rules order by line_number;
whether the contents are what you expect.

Also show hba_file as another SQL command will report where the server finds that file.

Also you need to read the server logs to get additional details about authentication failures, or failure or success to reload the pg_hba.conf file.

On Ubuntu, server logs are under /var/log/postgresql unless configured otherwise in postgresql.conf


Just using a simple custom toolbar produces a more modern/minimalist feel (without any loss of functionality, since the less-common features are still in the menu):

To create a custom toolbar:

Disable all of the default toolbars from View > Toolbars
Go to Tools > Customize > Toolbars and create a new toolbar with only the commands that you personally use.
With your new toolbar selected in the customize window, click the "Toolbar" button iand change "Icons Only" to "Icons and Text".
Finally, right-click the drag handle on your new toolbar and "Lock Toolbar Position".


pass environment variables to services started with systemctl

This happens because a unit in systemd is encapsulated from rest of the system. Have you tried setting it directly in the unit file like this?

  Environment="FOO=foo" 'BAR=bar'

The variables FOO and BAR are then available in your unit. For example if this is my ExecuteStart:

  ExecStart=/bin/echo $FOO ${FOO} ${BAR}

With the Environment option from above this would result in the following output:

  foo foo bar

An alternative would be doing it via a environment config file. For this you can read the fedora dokumentation:

http://fedoraproject.org/wiki/Packaging:Systemd#EnvironmentFiles_and_support_for_.2Fetc.2Fsysconfig_files

This link contains some useful examples with docker:

https://coreos.com/os/docs/latest/using-environment-variables-in-systemd-units.html


Windows no longer boots on dual-boot system

If you have the windows 7 CD, you need to boot from it, and choose Startup Repair .

If you don't have your Windows 7 Cd, you can download a Windows 7 Recovery Disc, you can download it.  Click the desired architecture:

32-bit (x86)

64-bit (x64)


Repetitive Battery Percentage Notifications (Razer, 20.04)

Credits to https://github.com/polychromatic/polychromatic/issues/147#issuecomment-380219281

The battery notification feature is part of the OpenRazer daemon itself -- Polychromatic has no control over it.

To disable it, there's an option inside ~/.config/openrazer/razer.conf in your home directory:

# Mouse battery notifier
mouse_battery_notifier = True

To change when it sends a notification, edit /usr/lib/python3/dist-packages/openrazer_daemon/misc/battery_notifier.py as root and set the interval at line 16:

INTERVAL_FREQ = 60 * 10

(In seconds, so 10 minutes)

(Also note that editing this file will cause it to get overwritten when OpenRazer updates)


Is there a program that emulate folder/file structure for databases in ubuntu?

you can use Fuse ( https://en.wikipedia.org/wiki/Filesystem_in_Userspace ) .
the project on github https://github.com/libfuse/libfuse .
This is a very mature project , so in Ubuntu you have already all packages .
Example :

create a zip

cd /tmp/
zip test_fuse_zip.zip /etc/printcap /etc/profile /etc/environment

verify the content

unzip -l /tmp/test_fuse_zip.zip

Archive:  test_fuse_zip.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
      135  2020-06-20 19:31   etc/printcap
      581  2018-04-09 07:10   etc/profile
      399  2020-06-18 23:07   etc/environment
---------                     -------
     1115                     3 files

create a mounting point

mkdir /tmp/my_zip_fs

mount the zip so it will appear has a file system

fuse-zip /tmp/test_fuse_zip.zip  /tmp/my_zip_fs/

do some modifications in folder

cd /tmp/my_zip_fs/

mkdir lib
mkdir usr
mkdir root
date > root/cur_date.txt

cd /tmp/

umount the zip

fusermount -u /tmp/my_zip_fs

check the content

unzip -l /tmp/test_fuse_zip.zip

Archive:  /tmp/test_fuse_zip.zip
Length      Date    Time    Name
---------  ---------- -----   ----
      135  2020-06-20 19:31   etc/printcap
      581  2018-04-09 07:10   etc/profile
      399  2020-06-18 23:07   etc/environment
        0  2020-06-21 13:43   lib/
        0  2020-06-21 13:43   usr/
        0  2020-06-21 13:44   root/
       29  2020-06-21 13:44   root/cur_date.txt
---------                     -------
 1144                     7 files


You have:

ACCEPT     all  --  anywhere             anywhere

and

DROP       all  --  anywhere             anywhere

which is a bit confusing.

The recommended practice is to set the default policy to DROP and then to accept the traffic you need.

Ping does not work because you haven't allowed it.

Try this script:

#!/bin/sh

# Delete all existing rules
iptables -F

# Set default chain policies
iptables -P INPUT DROP

# allow established/related
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

# allow ssh
iptables -A INPUT -p tcp --dport ssh -j ACCEPT

# allow http
iptables -A INPUT -p tcp --dport http -j ACCEPT

# pings
iptables -A INPUT -p icmp --icmp-type echo-reply -j ACCEPT
iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT

Make it executable and run it.

Then consider if you need some rules for your OUTPUT and FORWARD chains.

For more information check out the Official Ubuntu iptables howto.


What is GPG?

GPG, or GNU Privacy Guard, is a suite of cryptographic software. It can be used to encrypt or sign data and communications to ensure its authenticity.

This type of cryptography is based on key pairs. A public key is hosted on a key server (e.g. keyserver.ubuntu.com) and the private key is kept secret. Using the public key, one can verify the signature made by a private key. Likewise, knowing someone's public key will allow you to encrypt a message that can only be read by the holder of the corresponding secret key.

Further Reading: GnuPG for Daily Use (a Mini How-To...)

What's this have to do with me?

In this context, the apt repository that you are downloading a package from should be signed by a secret key so that you can verify that the packages you are installing come from where they say they are.

The actual file in the repository that is signed is the Release file. This file contains the checksums of a number other files in the repository. For instance, here is the file for official Ubuntu 12.10 repository and its corresponding GPG signature. When you install a package, apt verifies the signature.

Further Reading: All about secure apt

Common Issues

The public key for the official Ubuntu archive is already know by your computer, but if you want to add a PPA or third-party repository you must import their key. If you try to update a repository whose key you don't have, you'll see warnings like:

W: GPG error: http://ppa.launchpad.net oneiric Release: The following signatures
couldn't be verified because the public key is not available: NO_PUBKEY B725097B3ACC3965

When you install a package from that repository, you will also receive a warning:

WARNING: The following packages cannot be authenticated!
  dropbox
Install these packages without verification [y/N]?

While these warnings can be silenced by running apt with the --allow-unauthenticated flag, but it is better to add the key to your system so that you can take advantage of the added security.

When adding a PPA you should use the add-apt-repository tool as this will automatically handle adding the key for you. If you need to add the key manually, use the following command:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys KEY_ID_HERE

If you'd rather do this with out using the terminal, consult this answer.


If you have lxd configured properly to use zfs, then it will give you one zfs dataset per container. Something like this:

NAME                                                                                USED  AVAIL  REFER  MOUNTPOINT
nsn7/lxd                                                                                12,8G   241G    19K  /nsn7/lxd
nsn7/lxd/containers                                                                        10,9G   241G    19K  /nsn7/lxd/containers
nsn7/lxd/containers/maas-19-trusty-pxe5                                                    5,67G   241G  6,05G  /var/lib/lxd/containers/maas-19-trusty-pxe5.zfs
nsn7/lxd/containers/maas-20-xenial-pxe5                                                    5,21G   241G  5,51G  /var/lib/lxd/containers/maas-20-xenial-pxe5.zfs
nsn7/lxd/containers/maas-20-xenial-pxe5@snapshot-maas-2.0b4                                 106M      -  5,62G  -

In the above output, I even have a snapshotted container, and lxd used a native zfs snapshot for that.

It's not clear what your other questions are. Maybe start with comparing your zfs list -t all -r output with mine above and go from there?


please, when you find a solution for your problem post the steps to solve it.

in order to install ubuntu-restricted-extras open terminal and execute
'

sudo apt-get install ubuntu-restricted-extras

'


`zip` works in shell but not in Python script

Before getting to the problem, I'll quote Jacob Vlijm's comment under this answer (thanks for the comment and for the link):

  [...] using os.system at all is a really bad idea. Outdated and deprecated. Use subprocess.call() or subprocess.Popen() intead.

Here's the first (or one of the first) deprecation proposal, dated back to 2010.

So you should really use subprocess.Popen() instead of os.system().

When you run os.system() the command is executed in Dash (/bin/sh), while when you run the command in a terminal the command is executed in Bash (/bin/bash);

Dash doesn't support brace expansion and interprets {.zip,} literally;

Run the command in Bash: change

os.system("zip -r " + PATH + "{.zip}")

to

os.system("bash -c 'zip -r " + PATH + "{.zip,}'")

Or anyway as Darael suggests FWIW passing /Backups/backups/20152011-120209{.zip,} to expand /Backups/backups/20152011-120209 to /Backups/backups/20152011-120209.zip and /Backups/backups/20152011-120209 you might as well just pass the paths directly avoiding to spawn another shell:

os.system("zip -r " + PATH + ".zip " + PATH)


Can't build Ubuntu Kernel: Why does "make mrproper" get rid of debian directory? How do I build a Ubuntu/Trusty kernel without debian/rules?

I just ran into the same error over and over and was getting annoyed. Turns out, if you copy your kernel config .config to the root, that is what causes the issue. There should not be a .config file at the source root.

You have to run fakeroot debian/rules editconfigs instead and edit the config file for the proper arch.

Use these instructions: https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel


Does HDMI require X in order to display?

No. All that is required is proper video output data, provided via the display adapter; the same as with VGA, DVI, or DisplayPort, as well as HDMI.


ubuntu 12.04 install failure (will not boot)

If I were you I would first check again the boot priorities in the BIOS. Please ensure that your hard disk is set as "first boot device" or "second boot device" if you put your CD/DVD/BD drive as first boot device. If you have more than one hard disk drive connected to the motherboard, don't forget to configure the "Hard Disk Boot Priority" in your BIOS so that the one containing GRUB is the first one in the list.

If there is no problem with boot priorities, you should try to switch the mode of your SATA controller between AHCI and IDE (I suppose that you are not trying to set up any RAID). With some motherboards (rare), using AHCI may be a problem when using Ubuntu. If it works properly with AHCI, keep this mode because it provides enhanced performances, but if it doesn't, switch to IDE mode (normally more compatible). Don't forget that your motherboard has two different SATA controllers, so you have to configure the one handling the SATA port where your hard disk drive is connected. Look at "PCH SATA Control Mode" and/or "GSATA3 Ctrl Mode" options in "Integrated Peripherals" section of your BIOS. Don't hesitate to test AHCI mode if the controller is already set up in IDE mode. If your hard disk drive is connected to the GSATA3 controller from Marvell, you may also try to connect it on a port handled by the Intel PCH controller.

If Ubuntu still does not boot properly, check that "EFI" boot is disabled. Change "EFI CD/DVD Boot Option" to "Disabled". As a last resort, you can try to set "EFI CD/DVD Boot Option" to "EFI" and reinstall Ubuntu completely.

I hope that the advices above will help you to fix your boot problem.


Is it possible to install Ubuntu FROM a smartphone?

It is perfectly possible. You can carry multiple live CD images on your phone all the time and use them when needed, but you will need root access to your phone for that. There is an Android app called DriveDroid. DriveDroid allows you to boot your PC from ISO/IMG files stored on your phone. This is ideal for trying Linux distributions without the need to burn different CDs or USB flash drives.

Alternatively, if your phone has mass storage emulation (Android 4 usually has NOT) AND your PC supports UEFI, then, in theory, you can place rootfs and UEFI boot partition on that emulated storage. In theory.


How can I upload my .xsession-errors file to launchpad from the terminal?

In principle, yes, but it may require launchpad authentication which will try to launch a browser (chicken and egg problem).

Try apport-collect <bug-number>.


How do I route the output of a single program to a mic input?

To redirect to mic input is not possible AFAIK, but fortunately it is not needed. What you have to do is just set up a new pulseaudio SINK which will automatically have a monitor SOURCE. No external programs needed, pulseaudio does the job. (Basically to accomplish such things is why pulseaudio was developed.)

So the question is whether you want to hear the sounds which you redirect to your new sink? (Play it on your speakers.) Or you don't.

If you DO want to hear what you are redirecting then follow the technique what I use for sending music over skype:

Get the name of your default sink:

pactl list sinks

In the output search for the name of the sink. It will be something similar to this: "alsa_output.pci-0000_00_14.2.analog-stereo"
Run the following command with the appropriate change in the master= section to your above found default sink name:

pactl load-module module-remap-sink sink_name=secondary master=alsa_output.pci-0000_00_14.2.analog-stereo

Open the application FROM which you want to redirect sound and start playing the sound in it.
Open the application TO which you want to redirect sound and start recording in it.
Start pavucontrol (If you don't have it: sudo apt-get install pavucontrol)
While your applications are playing/recording sounds: In pavucontrol, on the Playback tab change the sink from what it is on (Built-in ...) to the remapped sink (Remapped Built-in ....) for your application. On the Recording tab make similar changes for your recording application: change it to something like Monitor of Remapped...
Still in pavucontrol on the Input devices and Output devices tabs: change Show: to All Input devices and All Output devices and make sure that the remapped sink and its monitor source is not muted and have enough volume.
After this your setup should be working.

If you want to make your new sink to be automatically setup when pulseaudio starts: Edit the /etc/pulse/default.pa file and add the following line with your default master sink name in it (You will need root permissions to edit the file, so use sudo or gksu)

    load-module module-remap-sink sink_name=secondary master=alsa_output.pci-0000_00_14.2.analog-stereo

Pavucontrol stores our changes (or at least for me it does), so next time you won't have to redirect the sinks-sources in it. (But if it won't save it for you, then do redirect them when you need.)

If you don't want to hear the sounds what you redirect then use simply

 load-module module-null-sink

in the appropriate places (without sink_name or master section) and change the redirections in pavucontrol similarly as you did with the remapped sink but now with the null-sink and its monitor.


Install 11.10 on GPT with separate /home partition

This page should have everything you need: http://www.rodsbooks.com/gdisk/index.html


sudo blkid -o list

lists all devices with labels:

device          fs_type  label     mount point         UUID
----------------------------------------------------------------------------------
/dev/sda1       ntfs     WINRE_DRV (not mounted)       604C3A6A4C3A3B5C
/dev/sda2       vfat     SYSTEM_DRV (not mounted)      6C3C-72E3
/dev/sda3       vfat     LRS_ESP   (not mounted)       5240-1BEE
/dev/sda5       ntfs     Windows8_OS /media/Win8       A47A42FF7A42CDAC
/dev/sda6       ntfs     Daten     /media/Daten        72860971860936DF


You can do it with Regex, from the parent directory:

find . -type f -regextype posix-egrep -regex '\./([^/]+|Testing/.*)$'

\./([^/]+|Testing/.*)$ will find all files (-type f) in the current directory and in the Testing directory only.

To run a command, add -exec action:

find . -type f -regextype posix-egrep -regex '\./([^/]+|Testing/.*)$' -exec echo {} \;

Replace echo with your actual command.

Example:

$ find . -type f
./foo
./Sourced/src
./Testing/test
./bar
./spam
./Models/model

$ find . -type f -regextype posix-egrep -regex '\./([^/]+|Testing/.*)$'
./foo
./Testing/test
./bar
./spam

$ find . -type f -regextype posix-egrep -regex '\./([^/]+|Testing/.*)$' -exec echo {} \;
./foo
./Testing/test
./bar
./spam


Installing Ubuntu in Boot Mode UEFI and secure boot on.Any Problem?

I would say turn Secure Boot OFF. It depends on the laptop, but I don't see a reason to leave Secure Boot ON.

I have a UEFI system, and I turned: Fast Boot, Fast Startup and Secure boot OFF.


Terminal got hanged when editing something in vi

Ctrl+Q will undo Ctrl+S. These are ancient control codes to stop and resume output to a terminal. They can still be useful, for instance when you are tailf-ing a log file and something interesting scrolls by, but this era of unlimited scrollback buffers has really obsoleted them.


Cannot download anything on ubuntu, any ideas?

The reason for the error you get is because of server side issues. To resolve these issues, you can try switching your current server to the main server.

To switch your server, open 'Software Sources' and click on the drop down list for 'Download from:'. You can then choose 'Main server'.

or you may try Package Manager Troubleshooting


How to view multiple USB partitions on "Startup Disk Creator"?

Startup Disk Creator no longer supports multiple partitions, it now creates a single ISO9660 read only partition on the flash drive.

It also no longer supports persistence.

UNetbootin still supports multiple partitions and persistent casper-rw and/or home-rw files with maximum 4GB persistence each.

Mkusb will make a persistent install with ISO9660 OS partition, casper-rw persistence partition, (limited only by drive size), and a NTFS data partition that can be used by Windows and Linux.


this is the portal for linux drivers for Epson http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX

entering 645 gives one this http://download.ebz.epson.net/dsc/du/02/DriverDownloadInfo.do?LG2=EN&CN2=&DSCMI=16859&DSCCHK=7ace3f4ac22dba2019b7bac02a046f33b413343b and with 64bit ubuntu you would need epson-inkjet-printer-201106w_1.0.1-1lsb3.2_amd64.deb and are you happy to install a deb package?

to set up a printer you need 1) the drivers and 2) to register so this package covers 1) but Ubuntu should jump in and do 2) for you; if not, go to the PRINTERS folder and select the ADD NEW button and let it search


SOLVED
It the linked post did not mention it and it didn't occur to me that to check the "Tunnel via Loopback Address" box on the SSH tab in Remmina. That ended up working.  Tragically slow, but it worked.  Thansk for the thoughts.


NOTE: /usr/lib/pymodules/python2.6/django is a link to /usr/local/lib/python2.6/dist-packages/django

I deleted it now.
Was not sure if the process of removing really has to be done manually.


Why is using the # symbol as a preface not a comment?

Yes, the # sign must be used.  This is a special-case comment called a shebang line that causes the program specified (/usr/bin/env python in your case) to be run with the path to your program as an argument  WikiPedia's page on Shebang is very good.


Forgot BIOS supervisor password on an Acer Aspire laptop

I'll give some tips on how you can work from here.
First off, removing the battery for an hour is by no means making sure your computer is totally left without any electricity running through it's circuits. Apart from removing the battery, you should also have your laptop unplugged from the power supply (charger) and then press the power button a few times repeatatedly and then continuously for a bunch of seconds (less than a minute). That way we're making sure the computer is totally out of power. The fact that there's no battery, will make anything based on ROM and/or flash-memory, revert to factory settings since there's no juice for it to keep running. That's the general idea of 'removing the battery', and more or less works for all computers.
Regarding your question about clearing CMOS, it's actually pretty simple. All you have to do it find the appropriate pins on the board that say something like 'Clear CMOS' and short-circuit them. To do so, all you need is a conductor, whatever kind. A paper clip as shown here, or anything that's metal as a matter of fact will do.


How can I Increase swap partiton by decreasing root partion and be able to hibernate my system

I suggest to add a swap file instead of resizing root partition.

First create a empty file somewhere in /

sudo dd if=/dev/zero of=/swapfile bs=1024K count=2000

make it a swap file:

mkswap /swapfile

open /etc/fstab:

sudo nano /etc/fstab

add this line into it:

/swapfile         swap          swap    defaults        0 0

run:

sudo swapon /swapfile

check you swap size:

$ cat /proc/meminfo | grep -i swaptotal
7874913


Can't access ./apache2.conf ubuntu 14.04

If you're trying to edit apache2.conf you'll need to use some sort of text editor. Nano is a good basic text editor, which ships as standard with Ubuntu.

So enter:

nano /etc/apache2/apache2.conf

Then make your edits. When you want to save edits, press  Ctrl  +  X  To save and exit.

After editing the Apache configuration file, it's always a good idea to issue:

service apache2 reload

This will reload the configuration file, and should alert you to any syntax errors.


How do I have my Ubuntu system automatically update?

Go to

System Settings > Software and Updates > Updates

Set

Automatically check for updates to daily
Set display immediately for both Security and Other Updates

You can always update manually by running the following commands in the terminal, one after the other

sudo apt-get update
sudo apt-get upgrade


shred overwrite a file to hide its content and optionally delete it.

Delete in Nautilus (the file manager) moves a file to the Trash folder. You can navigate to the Trash folder and select the same file and press Delete. This will "permanently" deletes that file as if you pressed Shift+Delete before the file was sent to Trash.

"permanently" delete means the space the file had occupied is marked as free space. The contents of the file is not destroyed. The file can still be recovered using file recovery tools.

Shift+Delete "permanently" deletes a file.

Deleting files in SSD works a bit differently than in HDD. SSDs can only delete a whole block. So, if a block contains two files, and you delete one, the other file has to be moved to another block before the whole block is deleted. This is called garbage collection. Constantly moving files around to delete other files would wear out SSDs quickly. The TRIM option tells tells garbage collection to wait until the other file in the block is deleted and only then delete the whole block. Source

Currently there is no way to securely delete a single file from an SSD other than send a whole block for garbage collection. See How to securely wipe files from SSD drive?

See What is the recommended way to empty a SSD? for how to securely erase a whole SSD.

Hope this helps


How do I copy files with SCP to /var/www?

I think it is a permissions issue indeed. The user you are logging in to the server with must have write permissions to the directory you are copying the file into. In this case /var/www/documents.

Try to log in as ubuntu and do something like echo test > /var/www/documents.

If you get the same error as before, you should add the ubuntu user to whatever group that documents directory belogs. You can check that by doing for example:

ls -la /var/www

The fourth column shows the group name. Then you can do:

usermod -G web ubuntu

(change web with the real group name you get)


do-release-upgrade does nothing after I answered a question

Ok I really don't know what happened, I just hit s and enter some more times and it worked!

Now I'm rebooting, and everything seems to be OK!


How can I easily scale a screenshot, taken from a high-DPI screen?

1. Make a screenshot as usual, then automatically scale the latest screenshot you took with a shortcut key.

Placed under a shortcut key, the script below will:

Find the last added screenshot in your screenshot directory (which is ~/Picures, as you mentioned in a comment)
Scale the image into an arbitrary percentage
Rename and save the image as renamed_filename.png, where filename.png is the original filename.

How to use

The script needs the python3-pil library to be installed, which might not be the case on your system:

sudo apt-get install python3-pil

Copy the script below into an empty file, save it as resize_screenshot.py
Test- run the script by taking a screenshot and subsequently run the script by the command:

python3 /path/to/resize_screenshot.py 80

where 80 is the desired output size percentage. The script now created the resized copy of the last screenshot.
If all works fine, add it to a shortcut key: System Settings > Keyboard > Shortcuts > Custom SHortcuts. Add the command:

python3 /path/to/resize_screenshot.py 80

The script

#!/usr/bin/env python3
import os
import sys
from PIL import Image

percent = float(sys.argv[1])/100

pic_list = []
# list all .png files in ~/Pictures
pic_dir = os.environ["HOME"]+"/Pictures"
files = [pic_dir+"/"+f for f in os.listdir(pic_dir) if \
         all([f.endswith(".png"), not f.startswith("resized")])]
# create a sorted list + the creation date of relevant files
pics = [[f, int(os.stat(f).st_ctime)] for f in files]
pics.sort(key=lambda x: x[1])
# choose the latest one
resize = pics[-1][0]
# open the image, look up its current size
im = Image.open(resize)
size = im.size
# define the new size; current size * the percentage
newsize = [int(n * percent) for n in size]
# resize the image, save it as renamed file (keeping original)
im.thumbnail(newsize, Image.ANTIALIAS)
newfile = pic_dir+"/resized_"+resize.split("/")[-1]
im.save(newfile, "png")

An example

An example of your image, resized by:

python3 <script> 80

2. Fully automatic option

While the script above does its job on a shortcut key, you can make it fully automatically with a background script. All thye script does is check for new files in ~/Picures, and perform the rescale action as in the first script.

The script

#!/usr/bin/env python3
import os
import sys
from PIL import Image
import time

percent = float(sys.argv[1])/100
pic_dir = os.environ["HOME"]+"/Pictures"

def pics_list(dr):
    return [pic_dir+"/"+f for f in os.listdir(pic_dir) if \
            all([f.endswith(".png"), not f.startswith("resized")])]

def scale(f):
    #open the image, look up its current size
    im = Image.open(f)
    size = im.size
    # define the new size; current size * the percentage
    newsize = [int(n * percent) for n in size]
    # resize the image, save it as renamed file (keeping original)
    im.thumbnail(newsize, Image.ANTIALIAS)
    newfile = pic_dir+"/resized_"+f.split("/")[-1]
    im.save(newfile, "png")

p_list1 = pics_list(pic_dir)
while True:
    time.sleep(2)
    p_list2 = pics_list(pic_dir)
    for item in p_list2:
        if not item in p_list1:
            scale(item)
    p_list1 = p_list2

How to use

The setup is exactly as the script above ("How to use"), but instead of [4.], add it to Startup Applications: Dash > Startup Applications > Add. Add the command:

python3 /path/to/resize_screenshot.py 80

3. Fully automatic option with a scale dialogue

Practically the same script, but now with a scale dialogue, immediately after you saved the image to ~/Pictures:

This screenshot was automatically resized to 80% :)

The script

#!/usr/bin/env python3
import os
import sys
from PIL import Image
import time
import subprocess

# --- change if you like the default scale percentage, as proposed by the slider:
default_percent = 80
# --- change if you like the screenshot directory
pic_dir = os.environ["HOME"]+"/Pictures"
# ---

def pics_list(dr):
    return [pic_dir+"/"+f for f in os.listdir(pic_dir) if \
            all([f.endswith(".png"), not f.startswith("resized")])]

def scale(f, size):
    #open the image, look up its current size
    im = Image.open(f)
    currsize = im.size
    # define the new size; current size * the percentage
    newsize = [int(n * size) for n in currsize]
    # resize the image, save it as renamed file (keeping original)
    im.thumbnail(newsize, Image.ANTIALIAS)
    newfile = pic_dir+"/resized_"+f.split("/")[-1]
    im.save(newfile, "png")

p_list1 = pics_list(pic_dir)
while True:
    time.sleep(2)
    p_list2 = pics_list(pic_dir)
    for item in p_list2:
        if not item in p_list1:
            try:
                size = subprocess.check_output([
                    "zenity", "--scale",
                    "--value="+str(default_percent),
                    ]).decode("utf-8")
                scale(item, float(size)/100)
            except subprocess.CalledProcessError:
                pass
    p_list1 = p_list2

To use

Setup is exactly as above, apart from the command, now without scale percentage:

python3 /path/to/resize_screenshot.py

Note

As always, the background script practically uses no resources, unless your ~/Pictures directory is insanely huge :).


Ubuntu is installed in UEFI mode even after selecting Legacy mode in BIOS

It's not 100% clear what your current problem is; however:

Your Windows is definitely installed in BIOS mode to /dev/sda, which is an MBR disk.
Your Ubuntu appears to have been installed in EFI mode to /dev/sdb, which is a GPT disk. (Your /home is on /dev/sda2, though.)

This configuration is awkward because switching boot modes typically requires mucking about with firmware settings on each reboot. (See below for one possible way to simplify this, though.) It's unclear to me which of these OSes you're able to boot. Your initial post suggests that nothing boots, but the Boot Repair output seems to indicate that you've successfully booted Linux in EFI mode:

efibootmgr -v
BootCurrent: 0011
Timeout: 0 seconds
BootOrder: 0000,0001,0002,0003,0011
Boot0000* P0: WDC WD5000LPVT-75G33T0        BIOS(10,0,00)AMBO
Boot0001* P4: TSSTcorp DVD+/-RW SU-208BB    BIOS(12,0,00)AMBO
Boot0002* Atheros Boot Agent    BIOS(14,0,00)AMBO
Boot0003* P1: SAMSUNG SSD PM830 mSATA 32    BIOS(15,0,00)AMBO
Boot0011* ubuntu    HD(1,22,2faf1,9cbd791f-e51b-4808-8506-314beba6aee9)File(EFIUbuntugrubx64.efi)

The BootCurrent: 0011 line suggests that you've booted Ubuntu via its EFI boot entry, Boot0011. OTOH, that entry appears to be malformed (EFIUbuntugrubx64.efi rather than \EFI\ubuntu\grubx64.efi), so your current state is puzzling to me.

In any event, I can think of a number of options for how to proceed:

Run Boot Repair and tell it to do a BIOS-mode GRUB repair. I'm not sure precisely what options you'd select to do this, though.
Re-install Ubuntu in BIOS/CSM/legacy mode. You'll need to force this boot mode by fiddling with firmware options or by using your firmware boot manager's options to select a BIOS-mode boot rather than an EFI-mode boot. Once you boot the installer, drop to a shell and look for a directory called /sys/firmware/efi. If it's present, you've booted in EFI mode and should try again; if it's present, you've probably booted in BIOS mode. Note that it is possible to install to a GPT disk in BIOS mode, although some BIOSes have bugs that may require jumping through some hoops.
In an EFI-mode Linux boot, install my rEFInd boot manager. Once it's installed, edit /boot/efi/EFI/refind/refind.conf: Locate the scanfor item, uncomment it, and ensure that hdbios is among the boot options. With any luck, when you reboot, you'll see a gray icon that will boot Windows in BIOS mode, along with options to boot Linux in EFI mode. Unfortunately, rEFInd's BIOS-boot support doesn't work on all systems, so I can't promise this will work for you. If it does, though, it may be the easiest way to get your existing setup working.
Re-install Windows in EFI mode. This will require converting /dev/sda from MBR to GPT (which gdisk can do), and you'll also need to force the Windows installer to boot in EFI mode (which can be tricky, and I don't have specific pointers, offhand).
Convert Windows to boot in EFI mode, as described here. This is a tricky and risky procedure, but it stands a good chance of working.

One more tip: If you keep GPT on /dev/sdb, you should use gdisk to convert /dev/sdb2 from what gdisk calls type 0700 to 8300. This will keep the Linux root partition from showing up as an "unformatted disk" in Windows. See this page for more on this issue.


Want to connect Sony Z2 (Android phone) to Ubuntu 12.04

The internal "sdcard" memory of this phone will only be exposed to Ubuntu after we had allowed USB debug mode. To do so we need to activate the developer's tool menu by 7 taps on the about phone build number entry.

After that the phone's internal sdcard can be mounted with read and write permissions  as a mass storage device without further tweaks using Nautilus. Only after allowing USB-debugging we will also have ADB-access from the command line.

  This inconvenience was introduce to protect the phone's internal file system from accidental damage. Therefore be cautious about data you are going to write to the phone's internal memory.


How to switch out a backtrack distro? (Multiple Ideas)

My personal solution: Burn a GParted live usb, delete your backtrack partition, and hope for the best. In theory, as long as Ubuntu is installed to sda1, the system will still work. But be sure to backup your data first. ALSO: A word of warning, windows installs completed after installing Ubuntu sometimes overwrite GRUB, manual intervention may required, but nothing too hard.


How can I change the default Nautilus Bookmarks?

You can edit your own bookmarks file. On each line, specify a bookmark URL (either as file:///... or smb:// or ftp://, etc) followed by a space and a user-friendly name, which may contain spaces. Nautilus will pick it up automatically.


Regarding Logitech keyboards and Ubuntu 16.04

There is a command you may want to use:

sudo dpkg-reconfigure keyboard-configuration

It takes you through a few settings, of which the first is the keyboard model. If you scroll the list of options, you'll find quite a few various Logitech options. If you try them out, you may find one which fits better.

(Please note that changes you make this way are persistent unlike changes via the setxkbmap command.)