Remove Windows completely replace Ubuntu without deleting Personal Files

All you need to do is copy your personal files from your Windows installation to an external storage device, then you can erase everything and install Ubuntu.


Can I make user list in Empathy more compressed?

A solution to this problem is available by changing the source code and recompiling the package (described for 12.04 through 14.04 at http://vaab.blog.kal.fr/2013/04/04/fixing-empathy-in-ubuntu-12-10/#tl-dr). The description is suitable for beginners of programming and/or system administration.

This problem is registered with Canonical with at least 2 bug reports, and has been escalated to the GNOME project.

empathy contacts list compact mode is missing in 3.6 (Ubuntu)
missing settings: compact view, show/hide avatars, show/hide protocol (Ubuntu)
Contact list entries take up a lot of space (GNOME)
No options for contact list appearance (compact view) (GNOME)

Everybody is welcome to chime in at one of those reports (preferably in the GNOME project directly), register as being affected, or - even better - provide a patch.


cp: target ... is not a directory - why does this happen?

you must use

cp LIME_SRC/soapySDR/name "CMakeLists.txt" LIME_SRC/soapySDR/mybuild

or

cp ~/LIME_SRC/soapySDR/name "CMakeLists.txt" ~/LIME_SRC/soapySDR/mybuild

instead of

cp /LIME_SRC/soapySDR/name "CMakeLists.txt" /LIME_SRC/soapySDR/mybuild

because your repertory mybuild is located in /home/alan/LIME_SRC/soapySDR/mybuild and not in /LIME_SRC/soapySDR/mybuild


Installed gmate but themes and plugins now showing up in gedit

Those plugins don't work with GNOME 3. In fact, most of the old Gedit plugins don't work with the latest Gedit 3.

Update: here's a working plugins list for Gedit 3: http://live.gnome.org/Gedit/Plugins . And the old Gedit 2 plugins: http://live.gnome.org/Gedit/PluginsOld


What is the recomended application set for QA/tester's suite in Ubuntu?

I have been away from QA since 2007, and was at the time working with windows.  So needless to say at the time I did not think much of any tools that would run under Linux.  So I've done some research, and I found many tools that can be used.

  ABI Compliance Checker.  A tool for checking backward binary
  compatibility of a shared C/C++ library. It analyzes changes in API
  that may cause compatibility problems: changes in call stack, v-table
  changes, removed interfaces, etc.

  Autonet.  Autonet is a GUI network test platform, internally it's
  based on CLI to communicate with devices. It can help you to arrange
  test cases, setup commands to devices ,run commands to check results
  and record test results.

  Doit: Simple Web Application Testing.  Doit is a scripting tool and
  language for testing web applications that use forms. Doit can
  generate random or sequenced form fill-in information, report results
  (into a database, file, or stdout), filter HTML results, and compare
  results to previous results, without having to manually use a web
  browser. It uses a console-based web client tool (like Curl or Wget)
  to send and receive HTTP requests and responses respectively.

  PETA.  Eclipse-based platform for automated software testing and
  covers the software life cycle from the specification up to the
  maintenance phase. The components of message based software systems
  like Client-/Server-, Multitier- and Service-Oriented-Architectures
  (SOA) may be simulated as well as tested in isolation and in their
  supposed interaction.

And others too many to list.  Most of these tools will run under Linux, and I will include these links, that will give all the information that you need ( description, platform, download location, and installation procedure).

Sources and Links:

Open Source Testing

Aptest

Software Testing Help

Software Testing Software

Indiangnu


If you open Nautilus, you are able to see the partition with your broken installation, you can explore that and copy the files you need on your new installation.


How to add shortcut to unity launcher programmatically?

You can add dynamic quicklists at runtime by using DbusMenu. You can read more about that here: https://wiki.ubuntu.com/Unity/LauncherAPI. That page also describes adding counters, progressbars and setting urgency.


Maximize windows to physical screen when using a virtual resolution w/xrandr

Let me answer my own question; the answer is bizarrely involved.  The trick is that the desired desktop behavior (which held in 10.04) is now (in 11.04) controlled by Compiz, which has a notion of "outputs": that is, screens to draw on.  These are configured in the CompizConfig Settings Manager (package compizconfig-backend-gconf or -kconfig), in the "general options" menu, under the "Display Settings" tab.

This thing has three settings, all of which are important.  The most important is "Detect outputs": that must be unchecked, because the whole point is that I want to create an unphysical screen setup, whereas autodetection will just pick up the size of my screen.

The second most important is the "Outputs" box, which is a list of resolutions.  At first glance you may expect that the thing to put in here is "1024x768", but that's wrong: it tells Compiz to use the whole virtual screen, so maximized windows will flow into the bottom; that's the wrong behavior.  But writing "1024x600" doesn't work either, since that will tell Compiz to pretend that the screen is only 600 pixels high; the counterintuitive result is therefore it decides to stretch every window.  This is ugly and also nonfunctional, causing amazing graphical glitches and, mysteriously, displacing buttons from the place you need to click to activate them.  Not good.

A much better option is to write "1024x600+0-168", which tells Compiz that there are actually 168 unused pixels on the bottom: that reproduces the "black bar" behavior I was complaining about.  It's good to know where that comes from, but I still don't want it.  But it tells me what it means: it means that Compiz is simply ignoring those pixels: it won't draw windows there.  My mouse still goes there, though, because that behavior is controlled by X, which comes before Compiz.  It seems that the thing to do is somehow tell Compiz to draw there (so windows can go there) but also not to draw there (so they don't want to go there).

The totally correct solution is therefore to describe two output devices to Compiz: one "1024x600+0-168", and one "1024x768", thus telling Compiz to draw and not draw on those bottom pixels, at the same time.  But how to make sure it knows which one to "want"?  That's the first option in this tab: "Overlapping Output Handler".  Set it to "Prefer smaller output", which is exactly what I said in words up there.

So the answer: run xrandr --mode 1024x700 --fb 1024x768 --panning 0x768; go to Compiz' display options and put in two outputs "1024x600+0-168" and "1024x768"; uncheck "Detect Outputs"; and make "Overlapping Output Handler" prefer smaller outputs.  Whew.


How can I install a dual boot configuration with Ubuntu and Windows XP?

I would recommend formating your computer to fresh windows XP 64 install. Then I would create two partitions. Install Ubuntu on to the partition that is not installed by windows.

I feel that this is the best setup for maintaining to two systems on a dual boot machine have done it for years.

Here is a tutorial on this process. Windows install first Linux installed first


How can I resize an external USB NTFS partition?

You will not be able to resize the drive while it is mounted ie: in use - boot into Gparted Live CD, attach the drive (make sure it is not mounted!!) and then you should be able to resize the drive as you want.

Here is some useful documentation on using Gparted: http://www.dedoimedo.com/computers/gparted.html


Can't use gksudo to run gedit, error copying .Xauthority

You've hit an unfortunate snag, see eg https://askubuntu.com/a/961975/29073. The problem is probably you're using Wayland, and the default permissions aren't set for you to open up a GUI window from the commandline.

I'd skip the GUI method, open a terminal, eg gnome-terminal (I use kubuntu and actually use yakuake) and do

sudo nano /etc/default/grub

Edit as appropriate, save (ctrl+x, choose yes), then don't forget to

sudo update-grub

If you need to use gedit then you can allow root, and any local user, to create windows on your display by doing xhost +local: before issuing the gksudo command.


How to replace PulseAudio package with self-compiled one?

At first, I tried checkinstall, but it produced a package without any dependencies, so I still had that problem of package manager uninstalling libraries that PulseAudio depends upon.

Instead, I followed this suggestion and got a package that was much closer to the original.  Have not had any problems with it ...so far.


Edit /etc/default/grub, and uncomment the line (i.e. remove the "# "):

GRUB_GFXMODE=640x480

... then run the following command in a terminal:

sudo update-grub

... and reboot.


getting warning when i use sudo apt-get update command

Look at your /etc/sources.list (or the files in /etc/sources.list.d) and remove or fix those lines that cause the error.

This answer should help.

How can I fix a 404 Error when using a PPA or updating my package lists?


How can I disable recent documents in Unity?

Go to System Settings and choose Privacy.

Then, turn off the button next to Record Activity. Now, your recent documents will no longer be logged by Zeitgeist.


Right clicking and in the menu select "Continue previous numbering"


The repository 'http://dl.google.com/linux/chrome/deb stable Release' does not have a Release file

The previous answer was wrong (Traxidus Wolf).

That issue (reference) wasn't an error but just a message for that guy to answer yes or no (change from Google Inc to LLC), it happened to all last week after an update.

The problem was that apt-get is low level now and apt more user-oriented so apt-get did not ask for the user interaction.

This error is different:

The "key" is "repository can't be authenticated"

IMHO... you don't have the key of the repo

To solve that just use this command:

$ wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -

https://www.google.com/linuxrepositories/

In the past you could add any repo you wanted, now you need their gpg key otherwise doesn't work.


Recursive chown starting with the directory above current directory

This issue is caused because you have run:

sudo chown -R admin:admin .*

We know that . indicates the current directory and .. indicates the parent directory. When you run the command with .*, it simply means that match any hidden file in the current directory (stating with .), the current directory itself (.), the parent directory (..). Simply put anything after . (* means 0 or more characters). As a result the parent directory along with all of it child directories get chown-ed to admin:admin.

Look at this test:

test$ ls -al
drwxrwxr-x 4 foo foo 4096 Jun  3 07:15 .
drwxrwxr-x 4 foo foo 4096 Jun  2 18:06 ..
drwxrwxr-x 2 foo foo 4096 Jun  3 07:15 egg
drwxrwxr-x 2 foo foo 4096 Jun  3 07:12 spam

$ sudo chown -R bar:bar spam/.*

test$ ls -al
drwxrwxr-x 4 bar  bar  4096 Jun  3 07:15 .
drwxrwxr-x 4 foo  foo  4096 Jun  2 18:06 ..
drwxrwxr-x 2 bar  bar  4096 Jun  3 07:15 egg
drwxrwxr-x 2 bar  bar  4096 Jun  3 07:12 spam

To revert back you need to chown the affected directories again.

I am not really sure what your plan was, but here are some ideas:

To chown any directory recursively (including hidden files):

sudo chown -R foo:foo /spam/egg/

To chown only the files (including hidden files) inside that directory (not the directory itself):

(shopt -s dotglob && sudo chown -R foo:foo egg/*)

To chown only the non-hidden files (without the directory itself):

sudo chown -R foo:foo egg/*


Which one is the Official Ubuntu Channel?

Celebrate Ubuntu is an Official channel:

  A new official Ubuntu YouTube channel has popped up stuffed with short promotional videos.

Planet Ubuntu is also an Official channel for Ubuntu.

  Planet Ubuntu is a window into the world, work and lives of Ubuntu developers and contributors.

Ubuntu Contributor Channel is also an Official Ubuntu channel.

So, all three are Official.


How to get another text-file be opened in new tab in mousepad?

Looks like it isn't possible: https://bugzilla.xfce.org/show_bug.cgi?id=11196 and https://forum.xfce.org/viewtopic.php?id=9129

It should be said that using gedit in Xubuntu is not an issue.  Both use gtk, which makes gedit a native application to Xubuntu, in a sense.

So forget about trying to get mousepad to work like gedit.  Just keep using gedit!


As Michael K pointed out the packages you can keep in sync by doing:

dpkg --get-selections > <file>

Copy the file from source machine to destination using your favorite method then

dpkg --set-selections < <file>
apt-get dselect-upgrade

This way all the packages that were installed on one machine will be installed on the other further the packages that were removed on the source machine will be removed from the destination, so doing that is extraordinarily dangerous especially when syncing desktop to laptop since laptop may require certain drivers that desktop in general will not.

In my experience deploying standardized systems I can tell you that once the base build is put in place the synchronization of the packages is a very very rare thing predicated as Michael pointed out on hardware being identical and most importantly purpose being identical as well.


How do I know if GCC produced warning inside a shell script?

The easiest way is to add to the gcc command the option -Werror which
makes all warnings into errors.


Bash return permission denied error when I redirect the output of ls to a file

Because root is the owner of the directory where you want to create hello file and users from the same group and other users doesn't have permission to write in that directory, you will get bash: hello: permission denied error when you run ls -laR > hello.

Moreover, you will get exactly the same error when you run the same command using sudo in front of it. This because output redirection (the > operator) is done by the shell, not by ls, so sudo has no effect upon it. sudo has effect only on ls  -laR. To prevent this, you have to login as root:

sudo -i

Then you can use redirection:

ls -laR > hello

Otherwise, you can run your bash command in a subshell with root privileges:

sudo bash -c "ls -laR > hello"

Finally, another option, instead to use redirection via the > operator, you can use tee command:

ls -laR | sudo tee hello

You don't have to use in this case sudo for ls command because users from the same group with root and all other users have read and execution permission in that directory.


Yes, it works. Double check your computer also has nvidia hardware, OpenCL is still a no-go. BTW tensorflow/gym alsos run on windows, however some OpenAI gym environments may have problems with dependencies.

If you want to build use python3, gcc5, cuda8, cudnn6. This is a config I have tested, and I know that it works.


Possible to install Ubuntu on Portable External Hard Drive?

Yes, it is possible. You just need to find a computer running Linux, Windows, or Mac. Once you have done that just rename the .ISO to.IMG and go here and download Raspberry Pi Imager on your computer of choice. Once you have done that, launch Raspberry Pi Imager and press the "Choose OS" button and scroll to the bottom of the list and select "Use custom" and choose the.IMG file that you renamed. Press the "Choose Storage" button and plug in the hard drive and select that hard drive's name. Once that's all done press the "Write" button. Wait a while, and now you have Ubuntu on a hard drive


Answer is simple: Use Amarok.
sudo apt-get install amarok

It is a music player and music manager from the KDE suite.

Once you install it, connect the iPod and it would appear as a local device (with ipod somewhere in its name). Before you can sync, you need to setup your local library. For this: from settings menu, go to Configure Amarok, and then in the collections tab, make sure you tick your local music folder.

Perform full collection rescan by going to Tools menu, and Update Collection.

Now coming back to the iPod section in the left hand side pane, if you right click on an artist/album/genre/song, it would allow you to copy to the local collection. Vice-a-versa, in local collection, if you right click on any artist/album/genre/song, it would allow you to copy it to your ipod.

Refer http://www.howtogeek.com/howto/4791/how-to-use-amarok-to-manage-your-ipod/ for more detailed info on this.

Update: Just read your question once again. If this was prompting you to sell your ipod Shuffle, then definitely no need to do that anymore :) .


Installing CMAKE's latest version from binary without using sudo

CMake appears to follow the convention of allowing an installation prefix to be defined at build time. If you run

./bootstrap --help

or consult the provided README.rst file

  You need to have a C++ compiler (supporting C++11) and a make
  installed. Run the bootstrap script you find in the source
  directory of CMake. You can use the --help option to see the
  supported options. You may use the --prefix=<install_prefix>
  option to specify a custom installation directory for CMake. You can
  run the bootstrap script from within the CMake source directory or
  any other build directory of your choice. Once this has finished
  successfully, run make and make install.

The choice of directory is up to you, but for example you could run

./bootstrap --prefix=$HOME/opt/cmake3.12.0
make
make install

to install everything under the root $HOME/opt/cmake3.12.0 without requiring elevated permissions.


Using 32 cores for win7 enterprise guest causes huge slowdown

VirtualBox performance is terrible when you assign it more cores than are cores in a single CPU socket.

The most likely problem is that the guest OS see it as multiples cores in the same CPU (the guest sees a SMP system but the hardware is really NUMA) and creates lots of inter-CPU traffic.

Your setup should work well with 20 cores or less.

Source.


To calculate the mean and variance of a column of subset of a data using awk

You can use GNU datamash:

datamash -W -g 1 mean 2 svar 2 < file

Explanation:

-W Use whitespace as delimiter
-g 1 Group by field 1
mean 2 Print mean of field 2
svar 2 Print sample variance of field 2

See more operations here.

Install datamash with apt:

sudo apt install datamash


Is there an App that can make my desktop dimmer

Follow these steps exactly:

Open terminal via Ctrl-Alt-T
Create a folder for the script

mkdir -p ~/bin

Open the file ~/bin/setup.sh in gedit.

gedit ~/bin/setup.sh

Copy over the code below save the file, close the editor.

#!/bin/sh
# Author: Serg Kolo
# Date: Mon Aug 24 , 2015
# Description: setup script for creating
# launcher and setting up the Dimmer script

DESKFILE="$HOME/bin/Dimmer.desktop"
SCHEMA="com.canonical.Unity.Launcher"
KEY="favorites"
SCRIPTFILE="$HOME/bin/Dimmer.sh"

createBinFolder() {
 if [ ! -e "$HOME/bin" ]; then
   mkdir "$HOME/bin"
 fi
 echo "created bin folder"
}

createLauncher() {
 OUTPUT="$(gsettings get $SCHEMA $KEY | awk -v file="$DESKFILE" -v sq="'"  '{ sub(/\]/,""); print  $0","sq"application://"file sq "]"  }')" ;
 gsettings set $SCHEMA $KEY "$OUTPUT" ;
 echo "Launcher for Dimmer created"
}

createScriptFile() {
 touch "$SCRIPTFILE"
 chmod 755 "$SCRIPTFILE"
 echo "Created script file. Please copy over the code to \"$SCRIPTFILE\""
}

createDeskFile() {
 printf "[Desktop Entry]\nName=Dimmer\nExec=%s\nType=Application\nTerminal=false" "$SCRIPTFILE" > "$DESKFILE"
}

createBinFolder
createScriptFile
createDeskFile
createLauncher

Make the file executable and start the setup script

chmod 755 ~/bin/setup.sh && ~/bin/setup.sh

That script will create bin folder and blank Dimmer.sh file.
Edit the file Dimmer.sh

gedit ~/bin/Dimmer.sh

Copy the code below, save and close the editor

#!/bin/sh
# Name: backlightscript
# Author: Serg Kolo
# Date: March 2 , 2015
# Description: Simple script to change screen brightness using xrandr

# uncomment this for debugging as needed
# set -x

NEWVAL=$( zenity --scale --min-value=0 --max-value=7 --text="Enter number between 0 and 7" ) && brightness=$(($NEWVAL+2))

if [ "$NEWVAL" != "" ]; then
    xrandr --output "$( xrandr | awk '$2=="connected" {print $1}')" --brightness 0.$brightness
fi

Now you should be able to double click on the launcher and get that dimmer app working.


It is called the legacy-tray, it is where running applications can put settings if they are not optimized for Gnome 3

I don't know about moving it to the right but this extension moves it to the task bar and this one removes it.


How can I search for files in all sub-directories using the shell and then copy those files?

The command is:

find /path/to/directory -name "*.mp3" -exec cp {} /some/other/dir/ \;

Alternative:

find /path/to/dir/ -name '*.mp3' | xargs cp -t /target/

Example:

alex@MaD-pc:~/test$ ls
1  2  3
alex@MaD-pc:~/test$ ls 1 2 3
1:
1.txt  2.mp3  3.txt

2:
4.txt  5.mp3  6.txt

3:
alex@MaD-pc:~/test$ find . -name "*.mp3" -exec cp {} 3/ \;
alex@MaD-pc:~/test$ ls 3
2.mp3  5.mp3

For more information:

man find


It seems a bug. I confirm this, eject lock doesn't works yet.
Add your info to this and contribute:
https://bugs.launchpad.net/ubuntu/+source/eject/+bug/885051


Start up on Ubuntu 12.10 is much slower than on 12.04

For me it varies.

On some PCs the time is the same, on others the time for 12.10 is slightly faster. On a few, the time difference is noticeable (Like 10 to 15 seconds faster). This changes if I update the system. After upgrading 12.10, the changes is more noticeable for more PCs as 12.10 somehow speeds up.

What I would recommend would be to remove preload, Chromium and any other non-default changes you made. Then test both. Just a FYI, preload sometimes does not make the boot part faster. This varies on the hardware/software.

For 40 seconds of time, I would also suggest for you to add your hardware specs here. This could lead to better help.


Change owner of external hard drive partition from root to user

Some filesystems (e.g., FAT32) don't support per-file owners, groups, or permissions. You can only set permissions on them filesystem-wide, and you do so via a mount option: mount -o uid=123,gid=123,umask=0000 /dev/whatever /mnt/Aquarius

Source: man mount


How to get Pantheon Greeter on Ubuntu 14.04 instead of Unity Greeter

To install Pantheon Greeter on Ubuntu 14.04,Open terminal and run the commands:

Since  libgranite3 (>= 0.2.0) missing in 14.04,so we need the following PPA as well.

sudo add-apt-repository ppa:elementary-os/os-patches
sudo add-apt-repository ppa:elementary-os/daily
sudo apt-get update
sudo apt-get install pantheon-greeter

Note:
After installation remove ppa's:

sudo add-apt-repository -r ppa:elementary-os/os-patches
sudo add-apt-repository -r ppa:elementary-os/stable
sudo apt-get update

Note: Tested and working. refer here

For settings I found a similar link refer Can I replace the default login screen for the Pantheon Greeter?


Limiting internet bandwidth for already started applications

For the general case, it is theoretically possible in the kernel, using the owner extension to netfilter. I can see the option --pid-owner on the man page of iptables on die.net, but it says it is broken with SMP :(

In my own system, a 10.04, there is no such option on the manual :( . So I believe we are out of luck this time ;( . Maybe there will be another incarnation of the --pid-owner option some time in the future. A gui on top of that would not be rocket science.

The first step must be taken on Linux itself and iptables.

As for more specific types of traffic, such as HTTP. There should be ways to make accommodations using proxies, but it probably needs some hacking because this use-case does not arise often.


Any commands that will change the keyboard?

In Keyboard Preferences ( where you put the layouts that you want to
use) there's a button "Options...", there is a list with several items, one of them is "Key(s) to change keyboard layout".


When coming out of sleep mode, the system drive is put into read-only mode?

Okay, I figured out a work-around. I just went into the settings and changed the action for closing the laptop to "do nothing."


Load increasing to very high levels periodically

Use 'top' (in a console, which is the term you were looking for), or gnome-system-monitor or ksysguard to figure out the main CPU hog.


I ran into the same problem and could not find a solution specifically for cudo-miner. However, after a bit of hit and trial, the following steps worked for me without any further trouble.

Use the installation command from cudo miner website to start the installation. Answer the questions and move forward with the installation. It will finish the execution and throw the aforementioned error.

Now run the following set of commands.

sudo rm /var/lib/dpkg/info/cudo-*
sudo dpkg --configure -D 777 cudo-miner-service
sudo apt -f install

All the cudo-miner* packages should be correctly installed now.


Is there anyone running his/her own instance of Launchpad?

According to the FAQ:

  "Launchpad's production configuration information and some configuration-specific admin scripts are not part of the Launchpad code base..."

...so you would need to create these files yourself or remove the functionality that depends on these scripts. Based on the contents of that paragraph, I get the impression that these files are not trivial and contribute some pretty major functionality to Launchpad.

And it doesn't end there. Since Launchpad is an extremely active project, updates to the codebase are very frequent and could break your private instance very easily. The FAQ states:

  "Essentially, there's a risk of a private instance becoming an unintentional fork, where its code cannot be safely updated due to the data in the local instance being incompatible with the latest database schema or code assumptions."

So you would have to stay up to date on all of the latest patches and changes and also make sure that they integrate with your instance without any problems.

According to the FAQ, the purpose of releasing the source code for Launchpad was not so that others could run "Launchpad-clones," but so that anyone can help contribute patches / bugfixes for the original instance of Launchpad.

All of this is to explain why there are no other instances of Launchpad anywhere. It's simply too much work and for very little gain.


Static IP address option on first time run of Ubuntu - Who do I ask?

This question has quite a few answeers to that already asked question. Where can I send feature requests?
Here is one of the answers.
14
You can make a feature suggest by submitting it as a "bug" at bugs.launchpad.net/ubuntu.
Mark the bug with the tag [Wishlist] and the developers will know there is a demand. Only the maintainer of a project or bug superviser can then change the "Importance" to "Wishlist"
These types of bugs unfortunately are not usually given a high priority so you may have more luck trying to approach the upstream developers.
The link to actually file a bug "Report a bug" in the top right corner leads to a page, where the possibility to file a bug is hard to find. The link can be found in the section:

Tips and tricks >> 2. Filing bugs at Launchpad.net

It is also possible to file a bug now at the console if you type
ubuntu-bug
into the console and follow the instructions.
Note: I think this whole process could be optimized and I think it is strange to call feature requests still "bugs".
So I filed a feature-request here


How can I fix the SSL error of RStudio after the installation on Ubuntu 18?

Easy workaround: Download rstudio-1.2.5033-amd64.deb for Ubuntu 16. This works out of the box on my system and RStudio starts as expected.


If you are interested about this question, here's how I finally do it.

Instead of trying to include the conditional part in the .xbindkeysrc directly I made a separate script that will loop fast enough to run or kill xbindkey daemon

#!/usr/bin/sh

while true
do
    if [[ "$(xdotool getwindowfocus getwindowname)" =~ "Chrome" ]]
    then
        xbindkeys 2>/dev/null
    else
        killall xbindkeys 2>/dev/null
    fi
    sleep 0.5
done

Then in my .xbindkeysrc I write all the Emacs chords.
And also I use systemd to run the script on startup.

Hope it helped you.


Cannot install packages either in command line or Synaptic Package Manager

Your /etc/apt/sources.list.d/neurodebian.sources.list has a wrong syntax.

But it seems useless to install terminator package. You could try this:

sudo mv /etc/apt/sources.list.d/neurodebian.sources.list /etc/apt/sources.list.d/neurodebian.sources.list.bak
sudo apt-get update

and try to install terminator again

Hope it helps


Ubuntu Server 16.04.1 Not booting normal after install

I ended up finding out it was an issue with the onboard graphics card that was causing issues.

If I started in safemode, and different graphics defaults were used, I was able to log in.


LC_ALL error after updating ubuntu to 18.04 (from 17.10)

I moved on after not being able to boot into the desktop.
Tried to correct and create a new locale from command, but failed - and ultimately did a complete reinstall.


Grub unaccessible after windows 10 and ubuntu 14 install

in your second case scenario where you install win-10 first you needed to have grub installed to /dev/sda when you install Ubuntu,,,,,assuming /dev/sda is the drive it all went to.
 if you chose say /dev/sda2 grub got installed to a partition table (which you can do if you are going to chain load from one grub install to the next)instead of the MBR (master boot record)of the primary drive ,,,which is where you want it .


A Juju Charm that configure dependencies to work with jenkins

There is already a Jenkins charm in the Juju Charm Store. I'm not sure I completely grasp what you're trying to do though. The README for the charm outlines how to add custom install scripts which I think may be along the lines of what you're referring to.


Upgrades from 14.04 to 16.04 are not automatically made available but in July the first point release 16.04.1 will become available and all 14.04 users will be offered the upgrade then.

However, if you want to upgrade immediately, you do NOT need to upgrade to an intermediate release first. Just run the following in a terminal (and type your password):

sudo update-manager -d

You will then be offered the 14.04 -> 16.04 upgrade without waiting for 16.04.1.

The reason Ubuntu doesn't automatically offer 16.04 to 14.04 users is simple: those users are using a very stable LTS release, and might hit undiscovered bugs in 16.04 if they upgraded immediately at release. Any important bugs found in 16.04 should be fixed by the 16.04.1 point release, so LTS users have less chance of running into bugs in the new release.


Unable to decrypt text files with openssl on Ubuntu 18.04

For files which are already encrypted, you can use the md option to force the old md5 password method.

This fixed my issue with files encrypted with 1.0.2 with aes-256-cbc which would not decrypt on 18.04 (openssl 1.1.0+).

My previous decrypt:

cat encfile | openssl enc -d -aes-256-cbc -base64 >plainfile

My new decrypt on 18.04:

cat encfile | openssl enc -md md5 -d -aes-256-cbc -base64 >plainfile

Note:
This will not work with files encrypted on 18.04 (openssl 1.1.0g+) as those will have used the newer SHA password method by default as Luis de Sousa notes.

References:
https://askubuntu.com/a/1067765/873241 (Luis de Sousa's answer)
https://bugzilla.redhat.com/show_bug.cgi?id=1520084
https://github.com/fastlane/fastlane/issues/9542


Confused about what makes up the Ubuntu GUI

The GUI on Ubuntu is made up of a large number of pieces, working together. At the base level is Gnome 3 (Not to be confused with Gnome Shell). Gnome 3 uses GTK "widgets" to display all the parts of applications on the screen. On top of Gnome 3, Ubuntu uses Compiz and Unity to give the shell, which consists of the launcher, the menu bar, and the other Ubuntu pieces. Unity is the actual shell, while Compiz is what's known as a compositor - it deals with all of the graphics, transparencies, and animations you see.

So, any Gnome 3 theme will theme your Ubuntu box.

Hope this helps!


How do I assign a specific user read/execute permissions to a susbset of folders in shell & SFTP?

For the protection/permission part, if your filesystem supports ACLs, yo may run

setfacl -R -m u:jonny:r /home/kai/projects.complete
setfacl -R -m default:u:jonny:r /home/kai/projects.complete

which reads:

Set (-m) the access control list (ACL) recursively (-R) for user jonny readonly (u:jonny:r) on the directory /home/kai/projects.complete, and set the default ACL to the same, which says that every directory newly created below will get the same ACL automatically. You also have to make sure that 'others' do not have any access to your directories: chmod -R o-rwx /home/kai

It will not be possible to give jonny a readonly directory as home directory, as with login/logout there are files written to the home directory.

For the configuration of FTP, this depends on the FTP server you are using. Most of them chroot to the home directory (or some other, if configured), so the FTP user cannot change to some directory outside. Look into the description of your FTP server.

To access a folder outside the chroot jail, see e.g. http://www.ducea.com/2006/07/27/allowing-ftp-access-to-files-outside-the-home-directory-chroot/


Netplan is shipped in the netplan.io package.  Running apt install netplan.io will give you the /etc/netplan directory; you will need to provide your own config files in this directory, with a .yaml extension.

If the netplan.io package was not installed for you on upgrade from Ubuntu 16.04 to Ubuntu 18.04, then it appears you are missing the ubuntu-minimal package.  It is recommended that you install this package to ensure you have the standard Ubuntu experience.


How to resolve the errors that show up when trying to install Unity tweak tool?

I'm also using Ubuntu 16.04.

  Note : If you have tried installing tweak-tool before please visit Removing Unity-Tweak-Tool first and follow all instruction.

Now to install follow below steps:

First open Terminal (Alt+Ctrl+T) and paste  sudo apt-get install unity-tweak-tool gnome-tweak-tool.
Enter your password.
Now it will take 1-2 minutes to install.
After installation is finished, you can launch the Tweak-Tool from terminal by typing unity-tweak-tool, OR launch it via Dash.

  Try purging the unity tweak tool and reinstalling it(if above one failed to give you desired result).

sudo apt-get purge unity-tweak-tool
sudo apt-get autoremove && sudo apt-get autoclean
sudo apt-get install unity-webapps-common unity-tweak-tool
sudo apt-get install unity-tweak-tool

  I Hope this time it works for you as it working for me.


How to create wifihotspot in ubuntu 10.04 LTS

Click on the network icon and select edit connections.

Go to the wireless tab and click the Add button.

Enter an SSID and choose the ad-hoc mode.

Go to the IPv4 tab and choose "Shared to other computers" method

Go to the IPv6 tab and choose "Ignore"

Deselect the "Connect automatically" check mark.

Click Save.

Then when you are connected through an ethernet cable connection, you can click on network icon, go to "Connect to a hidden wireless network, choose the new network and click connect.

From the android side, you need to enable ad-hoc network compatibility. This is not the right forum to discuss that but you could check here


Why does killall (sometimes?) needs to be applied twice?

I am going to state a application-specific possibility.

When you use killall program, a SIGTERM (signal 15) is sent to the program. The usual response to SIGTERM is that the program would exit gracefully.

Now as the SIGTERM is catchable, a program can have a signal handler for SIGTERM that would do some task upon receiving the first SIGTERM (first killall) and return to a state where the second SIGTERM would just terminate it (default action). This is highly dependent on the developer of the program of course and not a general case.


I accidently uninstalled my software manager Ubuntu 16.04 LTS

Simply open a terminal and enter this command:

sudo apt-get install software-center

You can open a terminal by pressing Ctrl + Alt + T or by opening the Dash, entering "Terminal" into it, and hitting Enter.

This installs the Ubuntu Software Center which is what you were using before if you're on 14.04.

If you're on 16.04, enter

sudo apt install ubuntu-software

to get back what you used before. I would, however, if I were you, still enter the first command instead. The Ubuntu Software Center is slower than Ubuntu Software but Ubuntu Software has many bugs.

Note that when you send either of these commands, you will be prompted for your password. This is the password you entered when installing (if you didn't change it since) and the one you use to log into your machine (if you didn't enable automatic login). You will not see your password, stars, dots, or anything the command line when typing it in. Don't get confused by this, just type it in, and hit enter.


How to recreate apache configuration directory?

I got the answer.

sudo apt-get remove --purge apache2 apache2-utils
sudo apt-get install --reinstall  apache2 apache2-utils


Web pages in Firefox scroll automatically. Is someone intruding on my computer?

So to summarise your questions, these are the suspicious activities you've seen on your computer:

Web pages on Firefox scroll automatically.
An update entitled "универсальный образ ядра Linux" and subtitled "Linux-image-generic" was proposed in the Update Manager. All others are in the default Ubuntu language. Some packages' names are translated in Russian in Software Center. Not apps, only packages.

For the second activity, I would not consider this suspicious at all. Ubuntu is divided into thousands of packages, each one can receive updates. I wouldn't be surprised if not all the packages in Ubuntu's repositories get their meta-data translated into Russian on time before release, sadly. English is still by far the most used language in Ubuntu.

For the first problem, I would say this is much more likely to be a bug than a security breach. Even if you're aware from your touchpad and your mouse, it could well be that the hardware is problematic, sending signals to your computer when it shouldn't, or that the software is buggy, badly interpreting mouse signals.

The output of the commands you ran do not look suspicious to me, although I only glanced at it and didn't analyse it properly.


what is the mate equivalent of startxfce4?

For the purposes of a VNC server (TightVNC especially, assuming you already have an X server running), mate-session for the MATE desktop should be be the equivalent of startxfce4 for Xfce, much like GNOME's gnome-session.

Although this may not be the tutorial you are following, it is possible in a tutorial at DigitalOcean to replace startxfce4 & with mate-session & in the example xstartup file from Step Two in order to start the MATE desktop when the VNC server starts.

For the sake of answering the question in the title exactly, however, there is an important difference between the behaviors of startxfce4 and mate-session. startxfce4 starts an X server before launching the Xfce Desktop Environment, but mate-session merely starts MATE, requiring an X server to have been started beforehand. Thus, the actual MATE equivalent of startxfce4 would be something like

export DISPLAY=:0
startx
mate-session

However, due to the behavior of startx, these cannot all be executed in one terminal. Instead, you could execute startx in one terminal (tty1, for example). Then, after switching to another terminal (tty2, for example), you could set the DISPLAY variable to the proper value and execute mate-session. Finally, you could switch back to wherever you started the X server (by doing Ctrl+Alt+F1, for example, if you used tty1) to see the MATE desktop.


Ubuntu DualBoot Installation Process - Resizing Partition

do you want to erase your partitions? if not then I have to tell you that by doing this you will erase all data ...
I recommend you resize your partitions using some tools other than ubuntu installer. try paragon partition manager


If you are not using rsync via ssh, you need to have rsyncd running on the remote side.

For the firewall, make sure port 873 is open for tcp.

Assuming /etc/services is correct, you might open it for udp 873 as well.

$ egrep rsync /etc/services
rsync       873/tcp
rsync       873/udp


How to install WIFI driver Ralink corp. RT3090 Wireless 802.11n 1T/1R PCIe, I am running ubuntu 15.04, 32bit on Hp-Probook-4520s?

Thanks for your quick response and support.
I think driver was already installed by Ubuntu 15.04,
In terminal I wrote "rfkill list"
found that it was hard off
in terminal wrote "rfkill unblock all"
and here I am using wifi without any problem.


Ubuntu 12.04.2 LTS boots to command line of some kind

Barring any other solutions, you can try removing the drivers.
If you installed the drivers as packages, running

sudo apt-get remove --purge fglrx*

should remove the drivers, allowing you to start fresh with your flickering unity.

If you installed them by hand, the way to remove them is described in this question.


Can't install Eclipse IDE for Java, is there any better suggestion for Java IDE in 16.10?

NetBeans IDE from the default Ubuntu 16.10 repositories supports the Maven build system. Open, build, run, debug, profile, and deploy your existing Maven projects, which can be opened without an import procedure.

NetBeans and IntelliJ don't need a plugin for Maven support, but IntelliJ is not in the default Ubuntu 16.10 repositories .


It all depends on what you mean by "fingerprint".

There's the fingerprint of the Internet services your machine provides (which port, which software, which version, if available), if it's connected to the Internet (remember, if you're connected to the Internet, the Internet is connected to you). You can minimize the size of this fingerprint by being behind a well-administered firewall, reducing the number of services your machine runs, running services on non-standard ports, editing version strings, etc, etc.

Then there's the fingerprint of the IP address your ISP has assigned you. TOR (see previous answer) can help with that, but with a sufficiently detailed examination, one might be able to see a 47.853GB download of a forbidden document from some evil website to a TOR node, AND one might be able to see a 47.853GB encrypted file from some TOR nodes to your IP, and draw conclusions.

Then there's the fingerprint  your browser presents to the sites you visit (via TOR or not). The PanoptiClick project of the Electronic Frontier Foundation https://www.eff.org/
 to see how unique your browser configuration and add-ons are.

Then there are actual fingerprints - wear thick gloves.

First, consider what you want to secure, then from whom (well, really, do a Threat and Risk Assessment), and figure out how much effort/time/money it will take to secure it. Is your "fingerprint" your machine provides to snooping parties on the internet, really the highest risk?


No widget drag/drop in Qt Creator after Blender-startup

I don't have an answer, but I can confirm this bug. There are other applications, where drag and drop no longer works once blender was started (Clementing, Kmail). I suppose blender does something it shouldn't do, but the other applications are at fault too. They should not get that easily confused by a misbehaving program.

The only workaround I know is to log out and back in.


Why can't I access webmin since installing Dansguardian and squid?

In Firefox proxy configuration, enter the following in the "No proxy for:" text box:

localhost, 127.0.0.0/8, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16


Change or Assign a Drive Letter to an external hard drive (or any drive)

All you need to do is use fdisk (in linux) to change the partition id to 7. In your case the partition id 83 (linux partition) or something else which windows considers the volume as hidden. When the partition id is 7, windows will automatically recognizes the partition volume as NTFS and assigns a drive letter whenever the FDD was recognized. Drive letter is a mount point which is windows specific. In linux some directory, mostly /mnt/dir is used for mount point. Linux can successfully mount NTFS volumes with partition id 7 and hence you will be able to use the partition from both LINUX as well as windows.


Can't install anything from software center

Have you tried to install from a terminal? open a terminal and type the command

sudo apt install synaptic

You will then be asked for password for authentication. Enter password and Synaptic will install. I believe you will find Synaptic easier to work with.
Software center seems to have issues in 16.04 as well.

Edit - after a bit of research (should have done in 1st place - sorry) I discovered the correct command to install from terminal. give this a try.


After Dual Ubuntu Installation the boot screen doesn't updated?

I reinstalled lubuntu. and while installation i provided /dev/sda for boot partition.

Now its working fine....


Accessibility: Shortcuts for color inversion + mousewheel for zoom

I found your post while looking for a way to zoom using mouse-wheel. Still searching.
But there is a way to get the invert-color with a shortcut.
Use gnome-shell extensions. Invert-window-color works and has Super-I as default shortcut.
Invert Window Color


Corel AfterShot Pro photo editing software not starting after update from 16.04 to 18.04

(Copied from the OP's original post)

The solution turned out to be a re-install of three dependencies. Apparently they get eliminated in the course of the upgrade.

See this page from Corel:

https://support.corel.com/hc/en-us/articles/235552727-AfterShot-Pro-Installation-fails-on-Ubuntu-16-10

  Problem: Installation of AfterShot Pro fails on Ubuntu 16.10, it is
  recommended you follow the steps from the workaround below:

  Cause: Some of the libraries are not available in the new version of
  the operating system.

  Workaround:

  Manually install libraries before installing AfterShot Pro

  Reboot system to ensure all previous attempts to install the software are terminated.
  Download and install the libraries, in the same order specified below:

  http://packages.ubuntu.com/xenial/amd64/libpng12-0/download
  http://packages.ubuntu.com/xenial/amd64/libgstreamer0.10-0/download
  http://packages.ubuntu.com/xenial/amd64/libgstreamer-plugins-base0.10-0/download

  Proceed to the installation of AfterShot Pro

  AfterShot Pro will install successfully.


SSH into Ubuntu over internet won't accept correct password

Thank you to anyone who replied!

I had a quick brainwave, and tried something else:

I went on to my outermost router (our CentryLink modem) and changed the SSH port to 22222, then went to the other router (Netgear AP) and set the external port to 22222. What was probably happening was that the Pi was trying to SSH into the modem, rather than the server.

Having done that, everything works!


It appears to be mounted as /host already.


Is there an IDE in Linux that also makes the makefile so that you can the make command from the command line?

CodeLight is an IDE on Linux that allows you to run the make command from the command line. So, using this I can utilize both ways to develop.


Can not login after Nvidia driver installation

I am referring to this answer from my other answers. I had a login loop issue as mentioned here. It seems you are also encountering login loop issue due to nvidia drivers issue.

First uninstall the currently installed NVIDIA drivers.Boot the computer, when the GRUB menu appears ...

Highlight the Ubuntu menu entry and press the E key.Add nouveau.modeset=0 to the end of the linux line. Press F10 to boot the Ubuntu operating system.

When the login screen appears press Ctrl+Alt+F1.Enter your user name and the password, then execute :

sudo apt-get purge nvidia*
sudo reboot

Now install the latest official stable NVIDIA drivers.Boot the computer, when the GRUB menu appears ...

Highlight the Ubuntu menu entry and press the E key.Add nouveau.modeset=0 to the end of the linux line. Press F10 to boot the Ubuntu operating system.

When the login screen appears press Ctrl+Alt+F1. Enter your user name and the password, then execute :

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

Note : Maybe it is explicitly necessary to select the NVIDIA adapter in BIOS.

In case you have installed the nvidia driver from their site then uninstall it as per that instructions.Uninstall that driver by running, as root, sh ./NVIDIA-Linux-x86_64-361.28.run and follow the on screen instructions.

Note : The solution I have provide has been tested on Ubuntu 14.04 LTS and Ubuntu 15.10 for two GPUs


Mutt is a fairly popular text-based CLI email client that you can run in Ubunutu (and other distros).  Get it with

sudo apt-get install mutt


Ubuntu 16.04 only works when secondary monitor is connected

You appear to have an Intel "Skylake" CPU in your Gigabyte Aero 14 laptop. The Skylake has integrated Intel graphics and unless I'm mistaken is used by default to drive the primary (non-external) monitor. Issues have been reported with screens freezing related to the Skylake line of mobile processors. Considering everything you've already tried and the results you've reported I think it's safe to say that this may be a kernel issue and not the usual graphics driver issue. Make sure you do not have nomodeset or vga= as a kernel parameter, since Intel requires kernel mode-setting.

It could also be useful to temporarily try intel_idle.max_cstate=1 as a kernel boot parameter.

You might also reconfigure X.

EDIT:
Since your laptop has Optimus Graphics technology you might need to install nvidia-prime or bumblebee and check your BIOS display setting to obtain the desired results (as it's unclear at least to me whether you've selected a specific display adapter or are using a hybrid graphics setting .

You might also obtain some clues from this question.

It's also possible that in your numerous attempts to find the right graphics driver for your situation that you may have inadvertently created something of a mess in which case you might find this answer particularly useful.


Is there a utility to extract/compress files using any type of archiving algorithm?

I just realized that 7-Zip (command 7z) can do it. 7-Zip is able to extract and compress many types of archives. Here is a quote from man 7z:

DESCRIPTION
    7-Zip is a file archiver with the highest compression ratio. The pro-
    gram supports 7z (that implements LZMA compression algorithm), LZMA2,
    XZ, ZIP, Zip64, CAB, RAR (if the non-free p7zip-rar package is
    installed), ARJ, GZIP, BZIP2, TAR, CPIO, RPM, ISO, most filesystem
    images and DEB formats...

7-Zip can extract/compress archives and is detecting the compressing algorithm itself.

This should work as you are expecting:

Compressing

$ 7z a file.tar.gz file
$ 7z a file.zip file
$ 7z a file.7z file
$ 7z a file.gzip file

Extracting

$ 7z x file.tar.gz
$ 7z x file.zip
$ 7z x file.7z
$ 7z x file.gzip

Also here is a little test. Here I create five archives and give them different filename extensions.

$ cd /tmp
$ touch testfile
$ for alg in {zip,gzip,7z,tar.gz,rar};do 7z a testfile."$alg" testfile;done
$ ls testfile*
testfile.7z
testfile.gzip
testfile.rar
testfile.tar.gz
testfile.zip

Now to detect the compressing algorithm, I will use the binwalk utility.

$ for arch in testfile.*;do binwalk "$arch" | sed -n '4p' | awk {'print $3'};done
7-zip
gzip
7-zip
gzip
Zip


I experienced the same problem with an external SyncMaster P2370HD monitor-HDTV as second display. I upgraded the Ubuntu Desktop to 16.04 LTS and
then the kernel to 4.9 and this fixed the problem.

cat /etc/lsb-*
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.2 LTS"

uname -r
4.9.0-040900-generic

See kernel 4.9 description for further info.
This may be will help you to perform the upgrade.


Does juju run on non-Ubuntu distributions?

The juju client currently runs on Ubuntu, Debian, OSX, and Windows. For distributions that do not have Juju packaged it can be built from source.

As far a deploying it on a non-Ubuntu server, right now work is underway to enable support for CentOS, Debian, and Windows. Support for these operating systems is expected to land in future Juju versions, optimistically 1H of 2015.


I figured it out, this is an xfs file system so I needed to use:

sudo xfs_growfs /fastdisk/


UPDATE: it became clear that vipin8169 runs vim on a remote server -- naturally, the vim over there does not have access to the clipboard of the local workstation, so the answer below is not applicable.

:set clipboard=unnamed

Everything you yank from now on will be copied to the clipboard, so to copy the whole file, do 1GvGGy in the normal mode. After that, you can use Ctrl-V or middle button click in any other application to paste the contents of the file.

Explanation: 1G means go to the beginning of the file (2G would be "go to the beginning of the second line"). v is to start marking a block. GG goes to the end of the file, y yanks it into the unnamed register (which is now also clipboard thanks to :set clipboard=unnamed).

Also, whenever you copy something from now on, you will be able to paste it with the regular p keypress.


There was some package in earlier 10.10 that made mozzila notifications show up in ubuntu. But when I upgraded it was amongst the removed and unsupported ones.

Sadly, I don't remember the name now.

EDIT: Thunderbird identificator is not compatible with thunderbird 10.02


Ubuntu Server 14.04.4 LTS "Failed to recover vector for irq 44"

So it turns out that the warning(error?) was coming from one of the servers (5) Ethernet ports.  I only need one port anyway, so I disabled ports 2-5 and the error stopped appearing.

I don't know if I would technically call this solved (because it's probably a driver issue), but the problem has been effectively mitigated for my purposes.

Thanks!


The Formula disappears partially when converting from odt to pdf

It seems that this happens when (the computer's memory is less* and) the document has large number of formulas [1].
A workaround would be to increase the cache size of OLE objects, i.e. go to Tools > Advanced > Open Expert Configuration and increase the value of "org.openoffice.Office.Common/Cache/Writer/Writer" from 20 (default) to a value of 600 [1, 2].
To be sure, restart LO writer after saving the above change.
References

https://bugs.documentfoundation.org/show_bug.cgi?id=99225#c56
https://bugs.documentfoundation.org/show_bug.cgi?id=99225#c19

*I increased my laptop's RAM from 3GB to 6GB and, in spite of this, the problem persisted. So I am unsure as to how much RAM is "less" RAM. Thankfully the workaround seems to work.


How to add Minecraft to the Unity launcher?

Setting up a Minecraft launcher on Ubuntu 12.04, these steps worked for me, mostly pieced together from the various other tips.

In a terminal, first fetch a Minecraft image icon:

cd /usr/share/icons; sudo wget http://images.wikia.com/yogbox/images/d/dd/Minecraft_Block.svg

Then create a minecraft.desktop file (using the gedit text editor to keep it user-friendly; just enter the whole "gksudo ..." command at the command line):

gksudo gedit /usr/share/applications/minecraft.desktop

and paste in these contents, and then Save of course:

[Desktop Entry]
Name=Minecraft
Comment=
Exec=/opt/minecraft.sh
Icon=Minecraft_Block
Terminal=false
Type=Application
StartupNotify=true

(Note: you can also paste directly into the file by using

sudo sh -c 'xsel -ob > /usr/share/applications/minecraft.desktop'

if you have xsel installed.)

Finally (almost), open up your file manager and go to /usr/share/applications - either click the Home Folder icon in your launcher and navigate, or here's the terminal quickie:

nautilus /usr/share/applications &

Locate your new Minecraft entry, and drag it over to your launcher bar.

At this point, you're practically done, except in this case I've created a little Minecraft starter script, saved in /opt/minecraft.sh, which assumes the minecraft.jar file is also saved in /opt. You can change all these "/opt" references to be wherever you've saved the original minecraft.jar file (be sure to change the Exec value in the minecraft.desktop file too).

The minecraft.sh file needs to contain just these three lines:

#!/bin/bash
cd $(dirname "$0")
java -Xmx1G -Xms512M -cp minecraft.jar net.minecraft.bootstrap.Bootstrap

(NOTE: for versions older than 1.6.1, you will need to use net.minecraft.LauncherFrame instead of net.minecraft.bootstrap.Bootstrap. The internal structure of the file and classes has changed as of 1.6.1.)

and of course that script needs to be executable, e.g. with the command

sudo chmod a+x /opt/minecraft.sh

If you have a system with more memory or notice poor performance when playing with higher render distances, you can increase the value of the -Xmx1G flag as desired. This tells Java the maximum amount of memory it's allowed to use. -Xmx1G means that it has a cap of 1 GB. -Xmx2G would be 2 GB, -Xmx3G would be 3 GB, and so on.

That's it! Using the starter script, and ensuring it cd's to the folder that contains the minecraft.jar file, seems to be a helpful step that other instructions overlooked.


How to Uninstall / Remove Ubuntu 12.04 from Live Media

You can uninstall Ubuntu doing a new install. During this new install, you overwrite the old install formatting the old partitions and you replace their old content with the new installation.

Of course, consider doing a backup before.


You can mount the other drives with the following command lines.

List drives in order to identify partitions

sudo lsblk -o model,name,size,fstype,label,mountpoint

Create mountpoints (only once).

sudo mkdir -p /mnt/sdb-seagate
sudo mkdir -p /mnt/sdc-hitachi

Mount the relevant partition

sudo mount /dev/sdxn <mountpoint>

where x is the drive letter and n is the partition number. The following examples assume that you are interested in the first partition in drive /dev/sdb and and the fifth partition in drive /dev/sdc.

sudo mount /dev/sdb1 /mnt/sdb-seagate
sudo mount /dev/sdc5 /mnt/sdc-hitachi

You can create more mountpoints and mount more partitions if you wish.
The partitions might be mounted with ownership for root (the superuser). It should be possible to read (and write) with sudo. If you wish, you can add mount options in order to get access for your regular user, for example

sudo mount -o rw,users,umask=022 /dev/sdb1 /mnt/sdb-seagate

This is particularly useful for Microsoft file systems, FAT32 and NTFS, where the files and directories get their permissions in linux when the partition is mounted.
Finally list drives again to check, that the partitions that you want to access are mounted

sudo lsblk -o model,name,size,fstype,label,mountpoint


Can't switch to multi-user.target on Ubuntu 16.04.3 Desktop

I just had the same issue! Fixed it by using the command:
systemctl enable getty@tty2
It forces the machine to use tty2 by default on boot.
Hope this helps you as much as it helped me


my laptop touchpad stops working during the live demo

What actually happens is when you are starting a live demo of Ubuntu, it changes bios settings internally. I have tried to reset all Bios settings but the issue was still there.

To reset bios, either reinstall BIOS or update BIOS.It can be downloaded from your laptop manufacturer website. For me, it did the magic. I hope, it will work for you also.


Ubuntu on Flash USB rather than SSD: performance penalty when not r/w-intense use?

Your intuition is correct, there should not be a significant performance problem in the case of an XBMC box. If you think about it, this is almost exactly what the Raspberry Pi does, although technically it uses an SD card rather than a USB drive.


can't install oracle-java8-installer (installer script out of date)

Seeing the same thing here, need oracle java 8 specifically.
Here's something related, trying it out now.
I want to install oracle-java8 on Linux but Ubuntu says: already the newest version


Can I restore backup made using Ubuntu to a new operating system?

Yes. The contents of a user's ~ do not affect the operating system itself, however the individual applications may be sensitive to changes in the formats and contents of configuration and data files stored within the home directory.


Comparing the output of 2 commands using test without temporary variables

You cannot do a direct comparison because wc -l file outputs [number] file and uniq file | wc -l outputs only [number]. You can do as @stelldriver suggested, redirecting the file to wc's standard input with wc -l < file, so that only [number] is outputed, or use awk to get only the first field (see below).
Also, backticks are bad for readability. Prefer the $(command) construct.
You get "too many arguments" because your expressions are not quoted, so the shell splits the [number] file output into two words instead of only one.
All in all, this is what you are after:
test "$(wc -l file|awk '{print $1}')" -eq "$(uniq file|wc -l)"

We pass wc -l file output to awk so as to get only the first field, the [number].

Just for more clarity in the answer, see what happens with your original attempt by prepending an echo to the command:
$ echo test `wc -l file` -eq `uniq file|wc -l`
test 19 file -eq 17

As can be seen, there are 4 arguments for the test command: 19, file, -eq and 17.
If you try the one I propose, you get a proper comparison with 3 arguments for test:
$ echo test "$(wc -l file|awk '{print $1}')" -eq "$(uniq file|wc -l)"
test 19 -eq 17


How can I decrease the volume increment in 14.04?

You should control your volume either my mouse scroll as you suggested or by left/right arrow keys.

If arrow keys aren't working, then it's probably a bug described at indicator-sound keyboard controls with left/right ARROW keys broken.

This bug was fixed in the package ido - 13.10.0+14.04.20140213-0ubuntu1.

If the volume adjust is too coarse-grained, try upgrading indicator-sound package (>= 0.5.6) or try to Decrease mouse sensitivity below the standard limit.

Alternatively you can define your own keyboard shortcuts in System->Preferences->Keyboard Shortcuts. As a side note you must have the correct sound mixer device selected in System->Preferences->Sound for it to work properly. This may be a problem source if your volume will not adjust.


"Starting Wireless Hotspot..." but nothing happens

ap-hotspot uses hostapd to create wireless network

I had problems creating hotspot using hostapd in Ubuntu 14.04 mainly because new version of hostapd in 14.04 default repository is buggy.

You can solve this problem by downgrading hostapd in Ubuntu 14.04 LTS to a previous version

Uninstall buggy hostapd using apt-get:

sudo apt-get remove hostapd

Then install non-buggy version of hostapd:

64 - bit:

cd /tmp
wget http://old-releases.ubuntu.com/ubuntu/pool/universe/w/wpa/hostapd_1.0-3ubuntu2.1_amd64.deb
sudo dpkg -i hostapd*.deb
sudo apt-mark hold hostapd

32 - bit:

cd /tmp
wget http://old-releases.ubuntu.com/ubuntu/pool/universe/w/wpa/hostapd_1.0-3ubuntu2.1_i386.deb
sudo dpkg -i hostapd*.deb
sudo apt-mark hold hostapd

"sudo apt-mark hold hostapd" will prevent hostapd to upgrade to the buggy version.

Then try running ap-hotspot again, I think it should work. It worked for me like a charm.


Ubuntu 12.04 under VB 4.1.14 -- ping resolves domain, but wget fails

Every MAC address in the world should be unique, so don't assign the host MAC to your VM network card.

A connection time-out does suggest a firewall problem. However, normally, you would expect that the VM has the same capabilities as your host system. What the NAT interface actually does is substitute the VM IP address (typically 10.0.2.15) with your host's IP in network packets that are sent out. For the outside world, it seems that your VM network traffic originates from your host system.


Do I need to install after boot up from USB

If you use the install button, it will install Ubuntu to the hard disk of your machine.

You do not have to install it, however. You can run the Ubuntu operating system in Live Mode directly from the USB to decide if you are comfortable with it, but any changes you make will not be saved between restarts.

If you do decide you like the Ubuntu Linux operating system, you can install it -- either as a dual boot alongside an existing Windows install or by overwriting the Windows operating system entirely. It is all up to how you want to use it.

Welcome to the world of Ubuntu!


To start developing apps for Ubuntu mobile devices you can use the Qt 5 framework.

For further information go to Ubuntu app developer site

Take a look at the following related questions:

How Can I get started with Ubuntu for Phone Development?
How do I start developing applications for Ubuntu on mobile devices?
Is there way to compile Qt5 programs, written with c++, to Ubuntu Touch?


Can I move the contents of the boot partition to the root drive?

If your boot partition is out of space it is most likely because there are too many old kernel images.

You can safely uninstall old kernels that you don't need/use anymore.
You can find the kernel version you are using with:

uname -a

To find all the installed kernels, instead:

dpkg -l 'linux-image*'|grep 'ii'


Ubuntu Dash not showing software results and Software Center freezing / not bringing up gksu prompt

I found another thread with the issue of the dash and I've also been having the same problem with software centre as well.  Some solutions for these problems are discussed in detail here.

One suggestion on that link worked for me, and for that I entered in the terminal:

sudo unity --reset-icons

Good luck.


Black screen like a console when shutting down Ubuntu 20.04

I have the same issue starting from yesterday. I'm using only Linux (Ubuntu 20.04) no any dual boot. When I shut down I see the same screen about one minute. But before yesterday it was shutting down in less than 10 seconds. Now I solved it, I just run sudo update-grub and sudo shutdown -P now and now it shutdowns as before. (I am not sure I solved it or it is solved by itself)


Getting "Disk /dev/sdX doesn't contain a valid partition table" on LUKS external drive

You are not doing anything wrong. This behavior in fdisk and gparted is expected since you formatted the entire raw device as a LUKS volume, so there is no partition table on the device. The partition table normally resides at the beginning of the device (and also the end of the device for GPT), but it is not strictly necessary if the whole device will be encrypted anyway.

However, I prefer to have a partition table even on devices containing only a single volume (whether it be LUKS or a filesystem) for the following reasons:

Standard tools will recognize that there is an existing partition even if they do not recognize the contents inside the partition, so they are less prone to accidentally overwrite the contents.
More flexibility for resizing in the future, in case you want to shrink the volume to create space for another partition.


Not packaged for Precise

As you can see on the packages.ubuntu.com site with a query, this isn't available in Precise (12.04), but only for Quantal (12.10) and newer.

Rather than installing from source, here's how to build your own package from the sources of Quantal.

Manual package build (backport)

This is a very very verbose description - for anyone building a package for the first time.

Install basic packages to build software and packages: build-essential  and devscripts .
Go to the source package (gflags) page at Launchpad: https://launchpad.net/ubuntu/+source/gflags
Unfold the section for "The Quantal Quetzal (supported) 2.0-1" version.
Locate the source package description file (.dsc extension). At the time of writing this is https://launchpad.net/ubuntu/+archive/primary/+files/gflags_2.0-1.dsc
Copy the link to your clipboard.
Open a terminal and download the source package using dget:

dget https://launchpad.net/ubuntu/+archive/primary/+files/gflags_2.0-1.dsc

This will fail the first time:

gpg: Signature made Thu 31 May 2012 14:48:41 CEST using RSA key ID 8AE09345
gpg: Can't check signature: public key not found
Validation FAILED!!

Install the required RSA key as in the error message above:

gpg --keyserver keyserver.ubuntu.com --recv-key 8AE09345

Configure the DPKG development scripts to use your GPG keyring:

echo 'DSCVERIFY_KEYRINGS="/etc/apt/trusted.gpg:~/.gnupg/pubring.gpg"' > ~/.devscripts

See Added key, but dget still shows "gpg: Can't check signature: public key not found" for why.
Run the earlier dget command again. This should now succeed.
Hop into the directory created:

cd gflags-2.0/

Try building the package.

debuild -uc -us

Explanation for the options: unsigned changes file, unsigned new .dsc file. As you are not redistributing the package, there's no need to sign anything.

This may fail due to missing build dependencies, e.g.:

dpkg-checkbuilddeps: Unmet build dependencies: debhelper

Note this is really system specific.
Install the build dependencies (satisfy all above from the output you get), e.g.:

sudo apt-get install debhelper

Try building the package again:

debuild -uc -us

One directory below, you'll find your packages, e.g.:

$ cd ..
$ ls -al *gflags*.deb
-rw-r--r-- 1 gert gert 108450 Jun 24 18:59 libgflags2_2.0-1_amd64.deb
-rw-r--r-- 1 gert gert 147590 Jun 24 18:59 libgflags-dev_2.0-1_amd64.deb
-rw-r--r-- 1 gert gert  14778 Jun 24 18:59 libgflags-doc_2.0-1_all.deb

Install them:

sudo dpkg -i *gflags*.deb

In case this fails because of binary dependencies not satisfied, run

sudo apt-get install -f

Done!

You can remove or update them any time, like any other package.

The next time you will build any package you will not have to go through all the hoops... in general the recipe is like:

dget <.dsc-file>
cd thefolder
debuild -uc -us
sudo dpkg -i ../*somepattern*.deb


What is the difference between echo $var and echo "$var"

There is no difference between echo $var and echo "$var".

However for other commands such as ls (list files) there could be a big difference.

Try this in your terminal:

$ touch "File A"

$ var="File A"

$ ls $var
ls: cannot access 'File': No such file or directory
ls: cannot access 'A': No such file or directory

$ ls "$var"
File A

The double quotes " tells Linux to treat everything in between as a single entity. Without the double quotes everything inside is treated as separate entities delineated by spaces.

So in the first example $var is two different things "File" and "A".

In the second example "$var" is one thing "File A".

The echo command automatically processes a single word or multiple words until the end of the line as one thing. Many other commands expect one or many things.


Ubuntu 18.04 Beta Install Freezes on Loading screen during install on a AMD Threadripper cpu/mobo

Is the DVD good?

At the boot menu, select Check disc for defects.

It should say  Check finished:no error found. Press any key to reboot system.

If it doesn't say that, you will need to burn the DVD again.

Disable the splash screen to see debug output

It is often helpful to  disable the splash screen so you can see the kernel debug output.

To do that, as soon as you see the boot menu, press the E key. Using the arrow keys move the cursor at the end of the line that says linux /casper/vmlinux.efi file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash ---.

Delete quiet splash --- so that the line reads linux /casper/vmlinux.efi file=/cdrom/preseed/ubuntu.seed boot=casper and then press F10 to boot.

When the system will hang, look the info and see if you can find any useful tips that could help you (or others) to solve the problem.

UEFI-related problems

You could try booting the system in UEFI-CSM mode to rule out problems related to the firmware. Enable UEFI-CSM in your BIOS and in the boot menu of your motherboard choose the entry that doesn't contain UEFI.

If you want to edit the boot option to disable the splash screen, as soon as you see this icon  push the spacebar and then select your language. Then, press F6 and Escape and you can now edit the boot option as you did  before.

Old Radeon card (very unlikely but worth trying)

If you have an old Radeon card, you might want to use the nomodeset option. Edit the boot menu as you did before. Delete quiet splash --- and replace it with nomodeset.


By default the user's home directory is used as the root directory so you only have access to files/folders within the user's home directory.

To change the root directory to / you can add the following to the config file and restart the service:

  local_root=/


Where can I find a compatible graphics driver for an old unsupported graphics card?

You have alrady found that the open source driver radeon does support your hardware to run Unity even in 1920x1080 but do not expect to find any better drivers for a graphic card no longer supported by the manufacturer (they do not even provide drivers for Windows7).

Be happy that you can run a modern OS like Ubuntu but dont expect too much on gaming powers on this old computer.


In order to run guvcview capture from command line you need to send a SIGUSR1 signal to the running application. First start it:

guvcview --no_display -n capture_file.avi

Then from a second shell window type the following:

killall -s USR1 guvcview

This will start a video capture and save the file in the current directory. You need to combine these 2 lines into a shell script if you want to run it automatically. Information from guvcview output:

GUVCVIEW Signals:
SIGUSR1: Video stop/start capture
SIGUSR2: Image capture
SIGINT (ctrl+c): Exit


How do I remove all desktop-related packages, leaving server only?

To remove x11 and everything that uses it:

apt-get purge libx11.* libqt.*


Low FPS on League Of Legends ubuntu 14.04

I only get 40-55 FPS on very high settings

So turn the settings down.

You're doing this through Wine. League of Legends is uses Direct3D. Microsoft has not made DirectX available natively for Linux so Wine has to translate all those Direct3D calls into OpenGL... And that takes time.

One thing that might be an idea is switching to a CSMT-patched build of Wine. These essentially have multi-threading for the translation process, and that speeds things up quite a bit in some (not all) games. Until they're pulled into the main version of Wine, the patches can run behind the standard builds but it's largely worth it.


Asus USB-AC68 [0b05:1817] on Kernel 4.10, latest Ubuntu Zesty Zapus

Here's a link that can help you
https://www.howtogeek.com/233159/how-to-find-your-wi-fi-password/
first find your password on the back of the adapter
if you previously have it on windows goto
How to Find the Current Wi-Fi Network’s Password on Windows


Which version of Ubuntu are you using 11.10 or 12.04 (both are tagged)? Is this a new install or an upgrade? If so, you may want to try installing proprietary drivers for your graphics card...go to the wrench icon in upper right hand corner of your screen and click "system settings" then "additional drivers" Ubuntu will then search for specific drivers for your graphics card. Do you have enough RAM? I had 512 in my netbook and had to by a 1gig stick to get Unity to work well in 3d.

If this doesn't work we will probably need more info to help you. How much RAM do you have? What graphics card are you using? What specifically have you tried? Which version of Ubuntu are you using?


How to read older login info using the "last" command?

The last command uses the binary file /var/log/wtmp to show a listing of last logged in users.

But /var/log/wtmp is a rotated file where old entries are archived into /var/log/wtmp.x where x is a digit [0-9].

So If you need to look deeper in the login history, try to open one of those files:

last -2000 -f /var/log/wtmp.1 | less


Sony VAIO with Insyde H2O EFI bios will not boot into GRUB EFI

I was eventually able to solve this. I replaced the EFI/Microsoft/boot/bootmgfw.efi with the grub64.efi. I renamed the former to bootmgfw.efi.old and used grub to add a menu option to chainload into it.

This implies that the firmware is hardcoded to look for the microsoft windows bootloader, and does not respect efibootmgr settings, or startup.nsh. That's really terrible.

I found out how the Sony EFI boot process works:

Look in /EFI/Microsoft/Boot/fwbootmgr.efi; if present, boot it.
Look in all sub-directories of /EFI/ for grubx64.efi.  If present, boot it.
Boot /EFI/Boot/bootx64.efi
Display an error message, such as "Operating System not found".

Under Linux, the efibootmgr tool does work, but it displays a lot of auto-generated nonsense, including the last USB drive you've used.

Here's how I learned all this:

I opened up my new machine and collapsed the Windows partition in order to install Linux and Mac side by side.
I installed Ubuntu 12.10 and the installer overwrote fwbootmgr.efi, backing up the old Windows bootloader.
I restored the old Windows bootloader, but couldn't boot anything except Windows.
I renamed the Windows bootloader to something bogus, and then the Grub BL took over.
I renamed the ubuntu directory to something else, and Grub still loaded, even though I had install rEFInd.
The only way I could get rEFInd to do what I wanted was this:
Move fwbootmgr.efi to its parent directory; rEFInd will still find it, and Windows won't complain that you renamed it.
Rename grubx64.efi to rfgrubx64.efi or something else recognizable.
Copy rEFInd from /EFI/refind to /EFI/boot, rename /EFI/refind_x64.efi to *.bak, and lastly rename /Boot/refind_x64.efi to bootx64.efi.  You should now be able to boot the Windows BL or GRUB from rEFInd.  I plan to upgrade my MacOS install to Clover, and load Clover from rEFInd as well.

(Perhaps it is possible to use the Windows Boot Manager to do all this, but EeasyBCD's EFI support is still a mess in my experience.  I refuse to touch it again for a while.)


When the default text-to-speech program (spd-say) speaks it is accompanied by noise/crackling/buzzing (and some echo), how to fix?

It seems to be a bug in the combination of speech-dispatcher with pulseaudio. As a workaround you can set

AudioOutputMethod "libao"

in /etc/speech-dispatcher/speechd.conf.

(Source: https://bbs.archlinux.org/viewtopic.php?id=215987)


How can I match string that have repeated characters repeated a certain number in a range?

Do:

sed -E 's/\b([[:alpha:]])\1{1,4}\b/word/g'

\b matches word boundary
([[:alpha:]]) matches any alphabetic character in current locale, and put that as captured group 1
\1{1,4} matches the captured group 1 to 4 times i.e. in total, the character is being matched 2 to 5 times
if matched, the word is replaced with string word
the g modifier of substitution (s) replace all such occurrences of words

To match any character, not just alphabetic, replace [[:alpha:]] with .:

sed -E 's/\b(.)\1{1,4}\b/word/g'

Example:

$ echo 'a aa aaa aaaa aaaaa aaaaaa' | sed -E 's/\b([[:alpha:]])\1{1,4}\b/word/g'
a word word word word aaaaaa


I was too quick on this one, your test works. I suspect you somehow have set $SCREEN_NAME either globally or previously in the script as a string containing an illegal character.

^[a-zA-Z0-9_.-]+$ matches a non-NULL string containing only the allowed characters, so if $SCREEN_NAME is a non-NULL string containing only the allowed characters, $SCREEN_NAME =~ ^[a-zA-Z0-9_.-]+$'s value is 0.

! inverts its value, so if $SCREEN_NAME is a non-NULL string containing only the allowed characters, ! [[ $SCREEN_NAME =~ ^[a-zA-Z0-9_.-]+$ ]]'s value is 1.

So the condition is ok.

Run echo $SCREEN_NAME in both bash and your script and check whether the actual output matches what's expected.

Edit: To remove the trailing carriage return, one solution is to pipe grep's output to tr before cut:

SCREEN_NAME=$(grep -i 'server_screen_title' server.properties | tr -d '\r' | cut -f2 -d'=')


ALT+F2 will allow you to run commands in the shell, so you can type e.g. firefox ask.ubuntu.com and that will open a new tab with the expected website.


I hate the fact that the menu bar swallows useful key mappings like alt-f (forward word) to do something rarely needed like open the file menu.

I searched and searched for ways to disable these alt menu keys and found nothing. Turns out you can kill them off using a bit of script in your init file.

Tested on Ubuntu 18.04 LTS. Atom editor version 1.0.

# Get rid of the alt-menu shortcuts
atom.menu.template.forEach (t) ->
  t.label = t.label.replace("&", "")
atom.menu.update()


updated ubuntu repositories on bash on ubuntu on windows

The WSL uses the same binaries used by Ubuntu. You can use the same repositories.

Currently (October 2017), WSL runs Ubuntu 16.04.3 LTS. If you have an older version, you can upgrade your distribution using sudo do-release-upgrade.

The /etc/apt/sources.list includes the same repositories for ubuntu:

deb http://archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse

deb-src http://archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://security.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse


What is the recommened way to dual-boot Windows 8.1 and Ubuntu on two HD?

Yes, it's definitely possible and the Ubuntu installer allows it when choosing the option "something else". Just plan the partition layout of both drives accordingly. You can create the partitions beforehand with GParted, if you feel more comfortable with that tool.

In my personal experience, the Windows installer doesn't like some partitioning schemes (with its boot and recovery partitions and whatnot), even though they should be fine, so

I usually start out with an empty partition table and then create the partition(s) for Windows from its installer with the desired size(s),
then I create the partition(s) for Linux/Ubuntu from a live DVD/USB (optionally), and
finally I install Ubuntu with the "something else" option, creating and/or assigning all the partitions as needed.


GNOME window decorations missing in Ubuntu 12.10

Try running metacity --replace from the command line.

That should restore the window manager. You may not have a window manager (other then Compiz) installed.


Fatal error: Couldn't find any fabfiles!

In order to be able to run the command sudo fab deps_local you have to be in the directory in which you can find the fabfile.py. That file (which is part of the repository) is where you unzipped the ADL LRS folder. If you did not change its name it is called Django-1.4 (which in this case is a directory, not the name of a software package).


Windows 10 + Ubuntu 15.10 Dual boot perfect BUT Ubuntu needs 10MINUTES to Start up

Fast-Startup & Hibernation

If you have set the Windows partition to be automatically mounted (check in /etc/fstab if that's true), then having Windows hibernated is probably to blame.

If you didn't hibernate Windows before switching over to Ubuntu, then the problem is most likely due to Windows' fast-startup option where it partially hibernates the OS when shutting down.

To be able to avoid it, use restart instead of shutdown when you want to switch over, or turn off fast-startup.

Turning fast-startup off or on from control panel (long way):

Open the Control Panel, and click on the Power Options.
Click/tap on the click the What the power buttons do link on the left side.
Click/tap on the Change settings that are currently unavailable link at the top.
If prompted by UAC, click/tap on Yes.
Do step 6 or step 7 below for what you would like to do.
To Turn On Fast Startup (this is the default setting).

A) Under Shutdown settings, check the Turn on fast startup box, click/tap on the Save changes button, and go to step 8 below. (see screenshot below step 8)
To Turn Off Fast Startup

A) Under Shutdown settings, uncheck the Turn on fast startup box, click/tap on the Save changes button, and go to step 8 below. (see screenshot below step 8)
You can now close the System Settings window if you like.
Note
If the Turn on fast startup setting is not listed, then you will need to close the System Settings window, enable hibernate, then start over at step 1 again.

To turn on/off fast startup using a BAT file (fast way):

The .bat files below will change the registry key and value below.

Open the run program with the (Can use the Windows + R shortcut). Open regedit and navigate to

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Power

Change the DWORD value for the DWHiberbootEnabled entry.

0 = Turn off fast startup
1 = Turn on fast startup

Download and run the .bat file as admin:

Disable fast-startup

If ever want to turn it back on use:
Enable fast-startup

References: 1, 2

Check your drives for errors

Here's two ways of doing so:

When starting up your computer

On the grub boot loader, pick Advanced options for Ubuntu 15.10, then pick an option (recovery options).

Next go down to fsck    Check all file systems and press enter. It warn you that it will remount that it'll remount your drives in read/write mode instead of staying in read-only mode, so it can apply changes if needed.

When you're on a live cd/usb/sdcard session

You can run:

sudo fsck -CV /dev/sda

-C Display completion/progress bars for those  filesystem  checkers
-V Produces verbose output, including all file-system specific commands that are executed.

The reason why I stated to do this on a live cd/usb session because it's not recommended to do this on a running system; doing so WILL
cause SEVERE filesystem damage if the filesystems being checked are still mounted.

References: 1


How do I get nVidia drivers working on new 2012 iMac?

Your OpneGL Vendor String reports it's running VMware's opengl implementation. Have you previously run this install through VMware (fusion?)?

I'm guessing that you need to uninstall the VMware guest tools and reinstall the nvidia-current package.

The vmware guest tools uninstall utility is:

sudo vmware-uninstall-tools.pl

(hopefully that utility is in the PATH!)


how to install mencoder in ubuntu 14.10?

Step 1: download the Ubuntu 14.04 .deb file from http://pkgs.org/download/mencoder. If you used dpkg at this point to install this, you would run into dependency problems. Specifically, the packages libavcodec54, libavcodec-extra-54, libavformat54, libavutil52 and libswscale2 may not be installed on your system. However, you may have newer packages installed, or there may be newer packages available, that provide the same functionality. Therefore, we are going to modify the .deb file.

Step 2: find out what versions of these packages are already installed on your system:

apt-cache policy libavcodec*

(and likewise for the other packages) will tell you that. If none is installed, but one is available, say libavcodec56 has an installation candidate, install it (sudo apt-get install libavcodec56). Make a note of the version, i.e. the last two digits, of each package. Note, however, that you need either libavcodec54 or libavcodec-extra-54, not both.

Step 3: download a script called videbcontrol. It is available from here. You want to make it executable; and if you don't like vi you may edit the script, find the line that uses vi (line 35 of the current script), and change that to nano or any other preferred editor.

Step 4: run the videbcontrol script against the deb file:

videbcontrol mencoder_1.1+dfsg1_0ubuntu3_amd64.deb

Or whichever deb file you have downloaded. (You may need to specify path names here, but you don't need sudo). This will open the deb's control file. In it you will find a line with "Depends on:" listing the packages that I mentioned in Step 1. Now carefully replace the version numbers with the ones that you have actually installed in Step 2. Closing the editor will save the .deb file als a .modified.deb file.

Step 5: Install the modified .deb file using sudo dpkg -i mencoder[version].modified.deb . Hopefully, all the dependencies will be satisfied at this point.

Incidentally, this is how I installed the nixnote2 beta on my system, with more or less the same dependencies.


Removing the gnome-desktop is not a good idea without installing the unity desktop.

As a normal procedure you have to run sudo apt-get install ubuntu-desktop unity to install the Unity desktop and then remove the gnome-desktop.

Now your machine is in kernel panic mode and to recover from it follow the below steps.

Go and take a look in to the below URL to boot the machine in the recovery mode

How do I boot into a root shell?

Once you are in shell install the unity desktop using the below provided command.

sudo apt-get install ubuntu-desktop unity


Take a look at this StackOverflow post. You'll find some interesting suggestions to your problem. Namely, you have the following options

Use some proprietary ODBC driver
Use a programming language specific library like jackcess (java) or MDB Tools (C) - Both are open source
Use Crossover Office (optimized but not free) or install through Wine (free - assuming you have a valid license for office)
Create a web user interface for your application and connect it to access via ASP/PHP/etc

For more details and links to the specific solutions follow the abovementioned link.

Also you may find it worthwhile to have a look at Kexi. AFAIK it has some limited .mdb tools.


Script wont print my echo statement (Also need to suppress the warning)

Wile using HEREDOC delimiter, there should not be any lagging or trailing spaces and the delimiter should be the only word on the line. I this example, I had a space after EOF which was causing all the issue. Script is working as expected after removing that lagging space!!

Credit for this answers goes to the user Carlos Campderrós on StackOverflow. Just sharing his answer to my question here


Why does memory usage shown in System Monitor differ from that in ps_mem?

You can run free -m to check memory usage:

Pc_mem show the actual memory usage(used col) but gnome system monitor shows the usage of (buffer/cache - used) according to this answer.
But i find that equation is changed with system monitor 3.18.2 to

  (1-(used/total))*100 or (1-(used/available))*100.


Assuming that you already have the language pack installed, right click the flag or two letter code (which indicates the country).  Choose "keyboard layout handler" settings.  Uncheck Keep system layouts and the select Add.  Scroll down to Macedonian (mk) and select it and then OK.  You can then move it up or leave it where it is. Recheck Keep system layouts. Close.  I believe that you have to reboot for the changes to take effect.


Ubuntu 18.04 - No wifi adapter found problem

Here is how you install it in about five minutes.

Donkeyday: "Hey, friend, can I borrow your ethernet connection for just a few minutes? I brought along six of your favorite beverage."

Friend: "Sure, Donk, glad to help you! Let me put a couple of those beverages on ice."

You then open a terminal and do:

sudo apt-get install --reinstall git dkms build-essential linux-headers-generic
git clone https://github.com/tomaspinho/rtl8821ce
cd rtl8821ce
chmod +x dkms-install.sh
chmod +x dkms-remove.sh
sudo ./dkms-install.sh

Your wireless should now be working. Detach the ethernet, thank the friend and enjoy!

Here is how to do it in about five days...maybe.

Go here: http://packages.ubuntu.com/

Select Bionic in the drop-down box. Search for git, dkms, linux-headers-generic and build-essential. Be sure to locate their dependencies and the dependencies of the dependencies. Be sure to download the correct version, either 32- or 64-bit. Once you've download about fifteen or so packages on another computer, transfer them with a USB stick or similar to the desktop of your Ubuntu computer. Open a terminal and install them:

cd ~/Desktop
sudo dpkg -i *.deb

It may complain that a package is missing a dependency. If so, download that and add it to the desktop and try again.

Write many posts on the forum to tell old Chili how you're stuck. Rinse and repeat.

Once that's all done, get this file: https://github.com/tomaspinho/rtl8821ce/archive/master.zip

unzip master.zip
cd rtl8821ce
chmod +x dkms-install.sh
chmod +x dkms-remove.sh
sudo ./dkms-install.sh

Reboot and your wireless should now be working.


The s command in sed is a match-and-replace. In your case, .*>\(.*\)< is the pattern to be matched, and \1 is the template to replace it with.

When you try to find a match for .*>\(.*\)< at the beginning of abc>asf<tfg, the result is abc>asf<. This part of the string is then replaced with asf. tfg was not matched, so nothing happens to it.

Using .*>\(.*\)<.* as your match pattern should get you the results you want.


Assuming you are using lightdm as your display manager, you can change the minimum displayed uid via the /etc/lightdm/users.conf file, e.g. to display all users with uids above 500

[UserAccounts]
minimum-uid=500

The default in Ubuntu is 1000, which is why your 872 user is not shown


Why do I keep getting an error when I try to resize ext4 under extended?

you doesn't able to add extra space to your ubuntu ext4 partition when it was mounted.When you boot into ubuntu os,the ubuntu partition was automatically mounted.So boot gparted-livedisk and then add 2gb unused space to your ext4 partition.


"No bluetooth adapters found" error on Ubuntu 12.04

try installing bluetooth manager from the ubuntu software center - no guarantee. worked for someone with a similar issue.


ZFS package (zfs-ubuntu) does not create zfs module?

Install the pre-requisites and then do a

apt-get install --reinstall zfs-dkms


What server control panels are available for Ubuntu Server?

Here is a list of free and paid control panels that are available for Ubuntu server

  Free CPanel Alternatives

  web://cp

  web://cp was where it all seems to have started for much of the open
  source world. It was written in php and the aim of it's single
  developer was to make a good quality control panel.

  web-cp is an Open Source solution taking up the torch where web://cp
  stopped and is a direct continuation of that project. Like the
  original this is written in php and so should put little additional
  stress on a server. This might be good for you if your server is a
  little lacking in the power needed to run piles of additional
  software.

  FlexCP

  FlexCP is an Open Source solution and so is likely to improve in
  proportion to the number of users. It can be obtained under the GNU
  GPL version 2 from sourceforge.net. It is a redevelopment of
  "web://cp" and as of writing had not released any file packages.

  Cube Panel Lite

  This is the stripped down version of the non-free Cube Panel. Being
  closed source there is a lot less that can be easily researched on the
  subject. I can however tell you that you will be limited to one server
  and 30 domains. After that yo will be looking for an upgrade or
  another free alternative.

  VHCS

  VHCS is an open source solution released under the Mozilla Public
  License 1.1 (MPL 1.1) and it appears to be a live and ready to go open
  source solution. For mission critical servers this might be the choice
  of system for this reason only. It is a sourceforge.net project so
  downloading should be simple even if installation is not.

  And of course

  Webmin

  Webmin is a free and impressive looking suit of control panel
  packages. It is free and open source solution licensed under the BSD
  License according to sourceforge.net. Much like the Fedora and Red Hat
  relationship there is a non-free version too. The GNU GPL is also used
  which is a bit confusing for the fussy.

  Non-Free CPanel Alternatives

  Plesk

  After CPanel this is possibly the next biggest system used.

  Cube Panel

  While "not at all" playing off the CPanel naming this is a
  commercially viable package. Like CPanel there are three levels of
  management allowing for reseller accounts but also like CPanel you are
  going to pay for this. The key advantage here is that you an get a
  free 20 day trail version to test out prior to purchase. You may also
  find that the "lite" version has everything you need.

  Ensim pro

  Direct Admin

  While "not a free offering" the lifetime unlimited license is a mere
  US$299 which, right now, is arround UK£147 (give or take a bit). This
  comes with 90 days of support which should be enough to get you up and
  running. Alternatively you can pay by the month for ongoing support.

  Virtualmin Pro

  The pay for, super "pro" version of webmin's virtualmin for those that
  want all the power. The webmin site says "Both the Pro and GPL
  versions are built from the same codebase, so all bugfixes and some
  new features go into both of them."

  VHCS Pro

  ServerPilot

  ServerPilot is a SaaS control panel for developers hosting their
  websites on Ubuntu servers. The basic server configuration and
  security functionality is free. The paid plans offer advanced
  features and monitoring.

Source:LordMatt


Chrome on Ubuntu 13.04: click to select url in address bar. How to achieve this?

Two possible solutions:

triple-click the url
press F6