How to disable windows minimization to the "Activities button" on Gnome?

I wanted to do the same but with frippery bottom panel, instead of the dock. The concept is the same though. I think you can edit this file:

/usr/share/gnome-shell/js/ui/windowManager.js

I tried pinpointing the effect but the only thing I find here is this:

/* scale window down to 0x0.
     * maybe TODO: get icon geometry passed through and move the window towards it?
     */
    this._minimizing.push(actor);

    let primary = Main.layoutManager.primaryMonitor;
    let xDest = primary.x;
    if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL)
        xDest += primary.width;

    Tweener.addTween(actor,
                     { scale_x: 0.0,
                       scale_y: 0.0,
                       x: xDest,
                       y: 0,
                       time: WINDOW_ANIMATION_TIME,
                       transition: 'easeOutQuad',
                       onComplete: this._minimizeWindowDone,
                       onCompleteScope: this,
                       onCompleteParams: [shellwm, actor],
                       onOverwrite: this._minimizeWindowOverwritten,
                       onOverwriteScope: this,
                       onOverwriteParams: [shellwm, actor]
                     });
},

If there were any other transitions, maybe it would be possible to substitute it. I could even settle for a fadeout transition. I just don't know where these variables are specified. I think the important lines are x: xDest, , y: 0, and transition: 'easeOutQuad',

If there's anybody willing to add to this or correct it, please help.


Unattended upgrades doesn't upgrade additional repository

Unattended upgrades uses the format "Origin:Section"; Here's an example.
//    "${distro_id}:${distro_codename}-updates";
Origin  = ${distro_id}
Section = ${distro_codename}-updates

So we need to:

Find the Origin field,
Find the Section field, then
Wrap those in the correct formatting.

Step 1: Find the URL of the source that you want to add. It's located in your apt sources. It's inside your file /etc/apt/sources.list.d/icinga-main-focal.list The URL looks something like this...
deb http://security.ubuntu.com/ubuntu focal-security main restricted universe multiverse
  ...or...
deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
  ...or...
deb https://downloads.plex.tv/repo/deb/ public main

Step 2: Find the corresponding Release file in your system for the URL.
http://security.ubuntu.com/ubuntu focal-security
  ...becomes...
/var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_focal-security_InRelease

http://dl.google.com/linux/chrome/deb/ stable
  ...becomes...
/var/lib/apt/lists/dl.google.com_linux_chrome_deb_dists_stable_InRelease

https://downloads.plex.tv/repo/deb/ public
  ...becomes...
/var/lib/apt/lists/downloads.plex.tv_repo_deb_dists_public_Release

Step 3: Use grep to find the "Origin" field.
$ grep Origin /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_focal-security_InRelease
Origin: Ubuntu

$ grep Origin /var/lib/apt/lists/dl.google.com_linux_chrome_deb_dists_stable_InRelease
Origin: Google LLC

$ grep Origin /var/lib/apt/lists/downloads.plex.tv_repo_deb_dists_public_Release
Origin: Artifactory

Step 4: Find the Section field.
Go back to the URL in Step 1. The Section is simply the first word after the URL.
http://security.ubuntu.com/ubuntu focal-security
  ...becomes...
Section: focal-security

http://dl.google.com/linux/chrome/deb/ stable
  ...becomes...
Section: stable

https://downloads.plex.tv/repo/deb/ public
  ...becomes...
Section: public

Step 5: Put it all together, and format it properly. Recall that the format is: "Origin:Section";. The quotes and the trailing semicolon are essential formatting elements.
http://security.ubuntu.com/ubuntu focal-security
Origin: Ubuntu
Section: focal-security
Formatted line for Unattended Upgrades: "Ubuntu:focal-security";

http://dl.google.com/linux/chrome/deb/ stable
Origin: Google LLC
Section: stable
Formatted line for Unattended Upgrades: "Google LLC:stable";

https://downloads.plex.tv/repo/deb/ public
Origin: Artifactory
Section: Public
Formatted line for Unattended Upgrades: "Artifactory:public";

Step 6: Add the line to the correct section of /etc/apt/apt.conf.d/50unattended-upgrades.
Test it: Run sudo unattended-upgrade, then check the logfile at var/log/unattended-upgrades/unattended-upgrades.log to ensure that it ran without error and that your source was properly included.


Opening webdav ms-word:ofe|u| protocol links with LibreOffice

It is possible to achieve similar behaviour in Linux as well by registering the ms-word protocol handler. However, there are some limitations, but for the basic usage, it will work.
First, a new protocol has to be registered and an application that will open it. The application .desktop files will handle the new protocol, and they are located in /usr/share/applications. LibreOffice use libreoffice-writer.desktop file, so you may copy this file to libreoffice-writer-msword.desktop. A copy is needed because the libre office does not understand ms-word:ofe|u| part, so it is required to strip it from the command line. In the new .desktop file, put the following in the Exec line:
Exec=bash -c 'echo "%U" | cut -d "|" -f 3 | xargs /usr/bin/libreoffice --writer'

Next, a new protocol handler should be registered with this command:
xdg-mime default libreoffice-writer-msword.desktop  x-scheme-handler/ms-word

This will register our desktop file with ms-word: protocol.
The next step is to test. The best is to try from Firefox, enter this URL in the command line:
ms-word:ofe|u|https://file-examples-com.github.io/uploads/2017/02/file-sample_100kB.doc
Firefox should prompt for opening the LibreOffice, which will open the document from the given location.
However, there are drawbacks:

The ofe:u part of the URL is a parameter that can only be interpreted by word. We are striping this part and using default open functionality. Probably this can be replaced by some scripting that would consider LibreOffice parameters.
Chrome has some issues with entering custom handlers in the omnibox (the box where you enter URL). It always does google search; it seems this is the default for all Chromium-based browsers (tested on Chrome, Opera and Brave). However, it works from JavaScript - if you enter in the browser console:

    window.location="ms-word:ofe|u|https://file-examples-com.github.io/uploads/2017/02/file-sample_100kB.doc"

Chrome will do the same as Firefox or Vivaldi browsers - it will open the application using xdg-open. It seems that this is the case with any other custom handler like zoommtg: (Zoom video calls); it works with JS, but not from omnibox.


Is there a way I can get a single menu at boot listing the OSes from
  both the disks?

Yes. When installing on your new SSD, you can either have it install GRUB to your HDD (replacing the GRUb currently on there), or you can just have it install to your SSD. Either way, it will detect all of the operating systems. (And if it doesn't you can make it detect them by doing sudo update-grub

However:

Make sure you install in the same boot mode as your other OSes! So if all of your currently installed OSes are installed in MBR mode, then install to your SSD in MBR mode. Likewise, if all your OSes are installed in UEFI mode, mkae sure to install in UEFI mode to your SSD
Also note that installing Windows after Ubuntu will nuke GRUB, so make sure to install Ubuntu after Windows.


You (may) need the newer version of kill-ryzen.sh from here: Script to reproduce randomly crashing processes under load on AMD Ryzen processors That worked for me and I was having the same problem.


Jumpy and wonky mouse wheel scroll ubuntu gnome 16.04 LTS

I had this same problem, and searched for an answer -- then I tried a different mouse, and the problem went away.  Turns out the scroll wheel on my mouse was just dirty inside, and when I cleaned it (I blew it off with a can of compressed air), it worked fine. YMMV of course.


need assistance to install Epson L380 printer drivers on ubuntu 16.04

The epson printer driver is available here:

http://download.ebz.epson.net/dsc/du/02/DriverDownloadInfo.do?LG2=EN&CN2=&DSCMI=55539&DSCCHK=5ef6ec128765534a989152269045f12fc58077f2


Java: plugin install for freemind, get : NoClassDefFoundError org/objectweb/asm/Opcodes

Or maybe the library is correctly installed, but it is the plugin/freemind that does not locate it correctly?

This is the case, I guess.
For me it works if I start freemind in terminal in the follownig way:

ADD_JARS="/usr/share/java/asm3-all.jar:/usr/share/java/antlrall.jar" DEBUG=1 freemind


Use the Dash

You can use the "DASH" (assuming unity is your interface).  Select the "Application Lens " and filter for Games


Is there a way to make Ubuntu 18.04 login screen dark themed?

Be Careful while editing the gdm3.css or its original file.. small mistakes in code.. will not let you login.. you need special support to bring back things to normal.. Proceed with your own.

Take backup of the file /usr/share/gnome-shell/theme/communitheme/gnome-shell.css
Open the file with gedit

sudo -H gedit /usr/share/gnome-shell/theme/communitheme/gnome-shell.css

Look for the fields below

.login-dialog {
  border: none;
  background-color: transparent; }
  .login-dialog > StBoxLayout {
    background-color: green;
    border: 1px solid #cccccc;
    box-shadow: 0 3px 9px 1px rgba(0, 0, 0, 0.5);
    border-radius: 6px;
    padding: 12px 40px 24px 40px; }

Change green to any valid color as you wish in the above field

.login-dialog-user-list {
  spacing: 12px;
  padding: .2em;
  width: 23em; }
  .login-dialog-user-list:expanded .login-dialog-user-list-item:selected {
    background-color: blue;
    color: #ffffff; }
  .login-dialog-user-list:expanded .login-dialog-user-list-item:logged-in {
    border-right: 2px solid #E95420; }

Change blue to any valid color as you wish in the above field.
Save the file, close & reboot to see the change in action.

Edit 09/09/2019

.login-dialog-username,
.user-widget-label {
  color: magenta;
  font-size: 120%;
  font-weight: bold;
  text-align: left;
  padding-left: 15px; }

and

.login-dialog-prompt-label {
  color: blue;
  font-size: 110%;
  padding-top: 1em; }


Ubuntu fail on boot after Windows 10 update (20H2)

I had a similiar issue with my dual boot setup:

W10 on one SSD
ArchLinux on another SSD
UEFI GRUB on Linux disk
Mobo booting from the UEFI/Linux disk
although in my case the update failed (and for like the n-th time already, drives me crazy tbh...)

After the failed update GRUB went down. I would only get a black screen with GRUB letters on it.
My fix was all about recreating GRUB as you would do when installing Linux to get the dual-boot in the first place.

boot the system from a live-USB instance
mount all the partitions in correct mount-points (not sure if that step was necessary though, probably not...)
reinstall GRUB with grub-install in the way applicable to your setup (UEFI vs BIOS)
reconfigure GRUB with grub-mkconfig

grub-mkconfig succesfully located both Linux and Windows and generated correct entries.
After that I exited the live-USB system, rebooted and everything was back and working.


auto_increment_increment resets after mysql restart?

As pointed out by ssta, you can use a configuration file.  Probably the best place for it would be the my.cnf file, used at startup.
Make the following changes:

...
[mysqld]
auto_increment_increment = 10
...

Save the file and restart the server.

sudo service mysql restart

That should work (I did not test it myself).  By curisoity, why do you want such a behaviour?


How do i check if VNC - Vino is installed on my ubuntu computer

Open the Ubuntu dash and search for Desktop Sharing, then click on the icon

Or if you prefer, type vino-preferences in a terminal.

Yes it should be installed by default.


I have an ASUS EEE 1000HE with 2Gb memory and have upgraded yesterday to 11.04. For the first 15 minutes or so I experienced the same slow-down, but then I restarted and the problem was gone.

My backup plan was to stick with 10.10 or jump to Xubuntu as I know that our EEE's don't have fancy graphics capabilities, but neither seem necessary now. 11.04 runs very well.

Kind Regards,
Bjorn


Ambiance Theme Nautilus grey Files Selected

Corrected in 12.04. Guess it was just a passing thing.


How can I open my Meteor app's port to the local network

So I solved my problem. It had to do with the firewall. The command to make the port accessible on the local network ip (192.168 etc.) was: sudo ufw allow [port-number].


how to disable usb based on vendor id in linux environment?

This should be possible using udev rules, but is probably not easy and will require some experimentation. It is possible to accidentally do bad things like blocking your mouse and keyboard from working requiring restore with a live USB stick. I haven't tested these commands, caveat emptor.

Create a new file with a low priority number, eg /lib/udev/rules.d/20-block-usb.rules with contents:

BUS=="usb", PROGRAM="/bin/filter_usb.sh %s{idVendor} %s{idProduct}", RESULT!="allow", OPTIONS+="ignore_device"

When a USB device is inserted, /bin/filter_usb.sh should be called with the vendor and product IDs of the device as arguments, and unless it echoes allow then the device should be ignored, eg:

#!/bin/sh
vendor=$1
product=$2

if [ "$vendor" = "0123" ]; then
    if [ "$product" = "4567" ]; then
        echo allow
    fi
fi

You will probably want to look into udevtest for experimenting with rules, and as noted, you need to make sure your mouse, keyboard etc are whitelisted. You may want to restrict the blocking rule only to USB block devices by adding SUBSYSTEM=="block", before PROGRAM in the original rule.


Maybe you could try this:

sudo apt-get update
sudo apt-get install libreoffice-sdbc-postgresql

EDIT: You can also search for libreoffice-sdbc-postgresql in the software center.


Sounds like a very broken installation to me. Probably caused by a bad CD media, or a corrupted download. I would redownload the .iso, check it's md5 hash (as suggested by fossfreedom) and burn it to a new CD (again verifying the CD once completed). Then do a fresh reinstallation.

edit: I just re-read your question and noticed that you were asking if it was the motherboard or hard disk. I would not suspect the motherboard. Slight possibility of it being the HDD, but again, my theory is a broken installation due to bad media or a corrupted download.


Unable to install Ubuntu 18.04 on a UEFI BIOS

"I have used Rufus to create live-stick with the GPT partition scheme":  this is probably your problem.  The USB should not have a GPT partition table and should have an MBR partition scheme for boot compatibility.  The disk where you intend to install Ubuntu should, however, use the GPT partition scheme for a UEFI installation.

I suggest using etcher as a no-nonsense option to write the .ISO to your USB.  Unlike rufus, it does not present you with choices that won't work.

Also consider the possibility that your USB device is corrupted, or that your download is corrupted.  Did you verify the integrity of the downloaded .ISO before writing it to the USB?


How do I prevent my HDMI-audio-only connected GPU from powering off itself?

I decided to turn off Standby and Sleep for the installation, and that seems to have helped the issue. It's not a preferred workaround, but it's acceptable in my case.

It looks like the card gets turned off when entering standby mode, and doesn't get woken up when the OS is woken.


This is a duplicate... I had the same problem, Type in sudo apt-get update then type sudo apt-get install --reinstall ubuntu-desktop then sudo apt-get update and finally sudo apt-get install unity once all that is done type startx tell me if anything goes wrong from there


How to block email addresses in Thunderbird?

You can block a sender in Thunderbird by following suggestions here or here. I should add that this post is more suitable for Mozilla support.


Simply enter the following three commands in a terminal pressing enter after each one (don't include the $ symbol, and replace USERNAME with your username).

$ gconftool-2 --set --type=string /desktop/gnome/url-handlers/aos/command 'wine "/home/USERNAME/.wine/drive_c/Program Files/Ace of Spades/client.exe" -"%s"'

$ gconftool-2 --set --type=boolean /desktop/gnome/url-handlers/aos/enabled true

$ gconftool-2 --set --type=boolean /desktop/gnome/url-handlers/aos/needs_terminal false

Then you can launch the game like normal by going to www.ace-spades.com  or http://iammorthor.com/aos/ (I like this one better) and clicking on the name of the server you would like to join.

Links

http://appdb.winehq.org/objectManager.php?sClass=application&iId=12965


is it safe to Install Ubuntu 14.04 packages on Kubuntu 14.04?

Test this:

In synaptic you can select the packages you want to install and under the first menu there is an option to generate a script which you can take to another machine and run there.

This script will download with wget all the packages you specified that you wanted and their dependencies.

Once run you'll have all the package files needed.

Carry them on a CD/USB stick and install them by:

sudo su
dpkg -i *.deb


List of Ubuntu 18.04 Multimedia System Libraries

It seems I was having an issue with the ALSA system library. I was not aware of the versioning symlinking used in some linux libraries. See stackoverflow q & a. So, although the package libasound2-dev seems to install a non-system library in addition to headers, it is in fact a symlink to the most recent linux ASLA system library. Therefore, the binary will run on Ubuntu 18.04, dependency free.
For completeness sake:

# libc headers and object files. annoying that gcc is a dependency here.
apt install gcc libc6-dev
# x11 headers
apt install libx11-dev libxext-dev
# opengl headers
apt install libgl1-mesa-dev
# alsa headers and symlink library
apt install libasound2-dev


Can Ubuntu be installed in a subdirectory of another Linux variant?

Without root access, I doubt it. You can chroot on a broken Linux installation (for example a non-working grub) to try to repair it, but you won't have access to anything "physical" without a mount --bind to host's /proc, /dev and /sys directories. And these kinds of mount require root access.

A virtual machine should be your option if you are not root.


Are you trying to dual boot on your second UEFI laptop? The UEFI partition does not really matter if you are not planning to dual/multiple boot. See bullet #3 below:


How to configure a SSH server to use a certain public key?

This isn't the best way to get around the problem. If you configure the Ubuntu side to use a different IP address than you use in Windows you shouldn't have this problem.

If you can't do that, a more straight forward solution is to disable host key checking for that host on your laptop.

Note, doing this will prevent ssh from warning you about a man-in-the-middle attack where someone is impersonating your dual boot system on your network, but that probably has a very low chance of happening.

To disable host key checking, add the following to the top of ~/.ssh/config or /etc/ssh/ssh_config:

Host <HOSTNAME OR IP ADDRESS>
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null

The 'StrictHostKeyCheck no' option will prevent your laptop from checking the remote host identification, and the 'UserKnownHostsFile=/dev/null' option will cause ssh to save the remote host's identification to /dev/null, meaning it won't be saved.


pip install in the terminal installs by default to the global environment. pip install in my experience fails about half the time in both the global environment and the virtual environment, so I prefer to use pip in the virtual environment whenever possible, because it allows me to easily correct problems caused by pip install by manually deleting files that have been installed by pip install in the virtualenv virtual environment.

In Python, an environment is a folder (directory) which contains everything that a Python project/application needs in order to run in an organized, isolated fashion. When you delete the environment folder, you also delete everything that was installed by pip from that environment.

There's also pip uninstall but even so, it's safer to use pip in an isolated virtualenv virtual environment in your /home directory, because it puts the files installed by pip somewhere in the /home directory instead of in a directory that is owned by root.


You are running a 32bit system, as the output of your dpkg --print-architecture and file /sbin/init suggests.

The other command, uname, is in fact reliable: You are running a 64bit Linux 4.0.4 kernel.

The face that Linux 4.0 is not yet shipped with Ubuntu suggests that you manually upgraded to the newest kernel (or somebody else did it for you), in which the wrong architecture was chosen.

You may be surprised, but it is indeed possible to use a 64bit kernel with a system that is elsewise 32bit, as long as a minimum of dependencies are also installed in 64bit.

The fact that your Java is being installed as 32bit is due to the fact that the package manager, dpkg, sees i386 as the native architecture and hence installes the corresponding package.

You can, however, force the installation of 64bit Java. The base requirement, a 64bit kernel, is already given. So you only need to tell dpkg to allow 64bit installations:

sudo dpkg --add-architecture amd64

Then you should be able to force a desired foreign architecture on future package installations:

sudo apt-get install oracle-java8-installer:amd64

Now, this may install a hell lot of packages, namely all dependencies for Java and their dependencies recursively, all in 64bit, even if you already have them in a 32bit version.

Such a hybrid system can, however, be unstable, so you may want to choose to reinstall the system.

(There are ways of turning your system into 64bit, but this is higher necromancy most people on here would never even think of, and I will certainly not link anything of this dark magic here.)


Game Dev Tycoon: error loading libXrandr

Try running:

sudo apt-get install libxrandr2:i386

I am getting some errors running this game as well (error while loading shared libraries: libudev.so.0). I have libudev1 installed, it just won't run. There may have to be some manual linking.

EDIT:

There was some linking needed for mine:
How do I resolve a "Cannot open shared object file libudev.so.0" error?


Where are the Unity desktop wallpapers located?

/usr/share/backgrounds

The default wallpapers are part of ubuntu-wallpapers-<codename> package (e.g. ubuntu-wallpapers-precise, ubuntu-wallpapers-trusty, etc.). Run dpkg -L ubuntu-wallpapers-$(lsb_release -cs) to get the list of wallpaper files.


Help with 'xrandr' - High DPI w/ External

You can use the panning option of xrandr.

It has been well explained in Pandemum's answer in the following post:

Change DPI on HiDPI laptop with two external monitors


Take a turn, you are in the wrong direction!
The correct way is move on with newer release. But for side packages like this one, you can always install builds from older releases. If APT didn't raise any unmet dependencies.
A rule that may help you in future with other packages: See python-wxgtk2.8, The upstream version 2.8 is part of Debian package name. Ubuntu (dpkg/apt) allows installation of multiple copies of a package if they don't have same package name.
Tested on VBox with Ubuntu 16.04.

Add needed repository and update package list
 echo "deb http://archive.ubuntu.com/ubuntu wily main universe" | sudo tee /etc/apt/sources.list.d/wily-copies.list
 sudo apt update

Install it
 sudo apt install python-wxgtk2.8

Remove repository entry and update package list again
 sudo rm /etc/apt/sources.list.d/wily-copies.list
 sudo apt update

Note:
Following this method on large scale can lead to unmet dependency hell. So keep in mind this is similar to PPA's. To solve issues with following packages, purge them:
libgstreamer-plugins-base0.10-0
libgstreamer0.10-0
libwxbase2.8-0
libwxgtk-media2.8-0
libwxgtk2.8-0
python-wxgtk2.8
python-wxversion


You can try Puddletag or even MP3Tag in Wine.

Personally I found the latter to be more suited to my tagging needs, but Puddletag is also a quite good alternative.


What precautions should I take with .debs I find on the internet?

Things to consider:

How well known is the site? For example, was it a random blog covered in ads, was it a random user on some forum, or was it a well known, respected site?

What does it claim to install? For example, does it claim to install a kernel or a iconset, but is it only 1MB big?

How "important" is it that you have the contents of this .deb?

Ways to test things securely:
I use arkose (its in the standard repos
) sandboxing with my debs (and other things) - use it something like this:
sudo arkose -n -c "cd $PWD; $SHELL"
What that does it give me a "sandbox" (otherwise known as "YAY I CAN SCREW UP!") with copy-on-write access to everything on my computer, including my home directory - so if the nasty nasty .deb does sudo rm -rf /*, I DON'T LOSE ANY DATA!
Another thing that isn't stressed enough is MAKE BACKUPS. Those are extremely helpful, and we have many questions on the topic.
In short, just make sure you think about it, and don't just download a random deb and install it.


ATI Driver installer screen missing nearly all text, how do I resolve this?

I faced the same issue. After beating my head over it for a long time, I discovered the cause: locale. I assume you have locale set to something other than en_US. Try this as root (for any amd-catalyst version):

LANG="en_US" /bin/bash ./amd-catalyst-13.4-linux-x86.x86_64.run

from the directory in which the driver is. Fixed the issue for me.


Lubuntu not connect to internet after placing the static address

In my opinion, you need to have the following entry. Most likely, your PC is not getting the DNS server. make this entry below the gateway line. It should look like this.

iface eth0 inet static
address 192.168.1.110
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 8.8.8.8 4.2.2.2 192.168.1.1

default DNS are 8.8.8.8 (Google DNS), or 4.2.2.2 and the 192.168.1.1 is the router IP which ideally should be the DNS for your PC. You could also add the DNS servers of your service provider in front of the router IP separating it with a single space.

Hope this helps
Regards


You might want to change the swappines. On my Aquarius M10 it is set to 100% by default. If you want to know what swappiness is and why it can make things slower read this: https://en.wikipedia.org/wiki/Swappiness.

To change swappiness you must install the terminal app from the software center, then enter the folowing commands.

sudo su
mount -o remount,rw /
bash -c "echo 'vm.swappiness = 30' >> /etc/sysctl.conf"
cat /proc/sys/vm/swappiness

Restart your device. (yay)

If the last command doesn't return 30 then try this:

nano /etc/sysctl.conf

Once you enter this command you will enter a text editor. You will see 10 black dots on an orange box in the shape of a key pad. Tap and hold that box and a menu should pop up, select the option that says "SCR". You will see some arrow keys above your keyboard, use them to navigate the text file look for a line that says: vm.swappiness = some number if you don't find it just add it. Replace some number with 30. Now you want to save the file by taping and holding the orange dots from before, and selecting "nano". you will see some options appear above your keyboard. Tap "ctrl+o" then "ctrl+x". Restart your device.


I don't know if this will fit your exact needs, but I use Miro to stay up to date with all my podcasts and rss feeds that I like to watch.  We all know Netflix doesn't work on Linux so it doesn't support that, but Amazon Prime is similar to Netflix and doesn't have ads like Hulu which is the only reason I don't like Hulu.  If you pay for something you shouldn't have ads, but back on topic.

Miro is probably the best application for searching new shows and staying up to date.  It does have a bunch of channels like youtube, hulu, pbs, and you can add more if you like.

Hope this helps.


This issue started coming up for me last week.  How I resolved it was removed the repositories from my list.

You can either do by going into software centre and unchecking the repositories in the list. Or remove them using the terminal window.


Ubuntu 16.04 LTS - USB flash drive doesn't appear in the launcher

Using Gnome Disks to format clears the USB drive, but doesn't create a new partition. To create a new one:

sudo fdisk /dev/sdb (make sure the usb drive is /dev/sdb, it looks like it based on your output of lsblk)

Type o, n, p, 1, Enter, Enter, w

Now format the new partition with sudo mkfs.vfat /dev/sdb1

Your USB drive should now appear under the file manager


How to execute a python file from LXTerminal?

You've got several options here (choose the one you like best):

Make the file itself executable.

On the first line of the file, make sure the "shebang" is there:

#!/usr/bin/env python

This is needed for the shell so that it knows how to run the file.
Mark the file executable on the filesystem:

chmod +x thefile.py

Run it like any other executable:

./thefile.py

or

/full/path/to/thefile.py

Run the file directly in the Python interpreter:

python thefile.py

The disadvantage of this is that everyone who would like to run the file should know how to call it. With the first option you have this inside the file itself and you can run the file without knowledge of that.


I uninstalled ' python ipython python-imaging python-serial python-wxgtk2.8', making my desktop unusable. What can I do?

python is a required package for Ubuntu. Many of Ubuntu components are built using python.

I assume you have standard Ubuntu release (Unity), to fix it reinstall all missing packages using:

sudo apt-get install ubuntu-desktop

If you have different release, here all available meta packages:

~$ apt-cache search .*ubuntu-desktop
ubuntu-desktop - The Ubuntu desktop system
edubuntu-desktop - educational desktop for Ubuntu
kubuntu-desktop - Kubuntu Plasma Desktop/Netbook system
lubuntu-desktop - Lubuntu Desktop environment
qtubuntu-desktop - Qt plugins for Ubuntu Platform API (desktop)
ubuntu-desktop-mir - System compositor for Ubuntu Desktop
xubuntu-desktop - Xubuntu desktop system


Install ubuntu desk top 16.04 after downloading

First, you need to make sure you have a drive that can burn DVDs.  You cannot use a CD as it will not be large enough to hold the image.  Once you have that and a blank DVD, you can just burn the .iso file to the DVD with Brasero, which is installed by default.


How to move a program from a partition to another one?

There are several ways you can do this. IMO it is easiest to mount your truecrypt partition to /usr/local and "install" vbox and the libs there.

You can manually copy vbox to /usr/local (/usr/local/bin , /usr/local/lib , etc) or compile vbox from source using the option PREFIX=/usr/local , then install.

You then need to make sure /usr/local/bin /usr/local/lib is on your path.

Modify these directions if you choose an alternate mount point.

Probably easier to keep vbox installed in the default location and when making a guest, place the guest virtual hard drive on your encrypted partition.


By default in Ubuntu 18.04 the shell theme is the file /usr/share/gnome-shell/theme/ubuntu.css

to change the required colors.. you need to edit this file..

open the file with below command

sudo -H gedit /usr/share/gnome-shell/theme/ubuntu.css

look for the part

/* Slider */
.slider {
  height: 1em;
  -slider-height: 0.3em;
  -slider-background-color: #363633;
  -slider-border-color: #1f1f1c;
  -slider-active-background-color: #dd4814;
  -slider-active-border-color: #bb3e11;
  -slider-border-width: 1px;
  -slider-handle-radius: 6px; }

and change the colors as you wish..

for example:

/* Slider */
.slider {
  height: 1em;
  -slider-height: 0.3em;
  -slider-background-color: #363633;
  -slider-border-color: #1f1f1c;
  -slider-active-background-color: blue;
  -slider-active-border-color: blue;
  -slider-border-width: 1px;
  -slider-handle-radius: 6px; }


So I seem to have found the reason for this annoying bug, it seems whenever I had tried to start the installer, it would some reason go from 1920x1080 60Hz down to 1920x1080 30Hz and then the smallest resolution possible while at 30Hz, because my monitor isn't able to display 30Hz, it just told me that it wasn't supported, which is the reason I was just seeing this message.

The way I got around this and was able to discover the issue is because my graphics card has an HDMI port in the back, I used this in order to plug it into my TV, and it booted straight up after that, I was able to see the hertz difference as my TV notifies me whenever the image changes size or Hz, and when my screen would have gone black with my normal monitor, it notified me that it had gone from 60Hz to 30Hz... In order to solve this I had to go through the whole install process with the smallest screen size (which I wasn't able to change), then boot it up still with the same screen size, then install the proprietary drivers from NVIDIA for my graphics card and some microcode for my AMD CPU, after all of that and a restart, it's working perfectly, and is what I'm using right now to write this!

Hope this helps if anyone else gets stuck in future! :-)

-Adam


can relative path access more than one level?

Yes, all paths can have multiple components. "Relative" paths don't begin with "/", and start looking in the current directory. "Absolute" paths begin with "/" and start looking at the root of the filesystem tree, also called "/".

So, you can use paths like this:

cd $HOME
ls Desktop/MyFiles/text.txt

or:

cd $HOME/Desktop/MyFiles
ls text.txt

In either case, ls /etc/passwd would refer to the same file.


How do I turn Numlock ON for login screen Ubuntu 17.10 Wayland

You need to set it as gdm user via gsettings command

The solution that should work:

Open terminal via Ctrl+Alt+T, then run command to get root privilege:

  sudo -i

Switch to user gdm in the terminal:

  su gdm -s /bin/bash

Finally set ‘Numlock on’ via gdm user:

  gsettings set org.gnome.settings-daemon.peripherals.keyboard numlock-state 'on'

Restart the computer and done


How to create a installer package of my software made in Code Blocks

There are tons of linux software install systems, so narrowing it down the two you might want to most look at are the .deb packages and source packages.
For Ubuntu's .deb format see http://packaging.ubuntu.com/html/packaging-new-software.html

That set of instructions depends on the traditional source distribution, a real under taking all truth be told.  Skim over http://www.gnu.org/prep/standards/standards.html paying the most attention to the Configuration section.  Then this blog post https://robots.thoughtbot.com/the-magic-behind-configure-make-make-install will get you primmed on using autotools, which you may have to install. sudo apt-get install automake should give enough to fallow the directions on the blog post.

A 3rd format worth mentioning is the rpm format for Fedora/Red Hat Linux, but it would involve another Linux installation (or virtual machine).

Now a location to distribute the project from is the next major consideration. https://www.github.com is the current source distribution center most people favor.

congratulations on having a project you want to share,and good luck.


You cannot log remotely to a terminal that is already running on the machine.

Instead, use ssh to log to the system, it is installed by default on most distribution. Then, after login through ssh, you can kill the running server by using (let's say the executable is CraftBukkit)

> killall CraftBukkit

You can confirm the name of the running process to kill by looking at the process list shown by typing

> ps aux

Next, you can restart the server by calling the command line but add the "screen" command in front. Running the server inside a screen session enables you to always reconnect to the session from anywhere by doing

> screen CraftBukkit param1 param2 ...
// use CTRL-a then d to detach session
> screen -r // will reattach session

If screen is not available on the system install it with

sudo apt-get install screen


swap is only being recognized when trying ubuntu from live CD

Is the swap enabled?  swapon <device>

See cat /proc/swaps

If it's listed, then it's enabled.  If not, then the system isn't using it as swap.

blkid | grep swap

It appears your fstab entry looks incorrect.

Try using the line:

/dev/sda6 none swap sw 0 0

Then sudo swapon -a

You can try using UUID you get from blkid command above and using that in place of /dev/sda6


Can I clone a 1TB hard drive with Ubuntu and Windows 8.1 to a sshd on a laptop?

Check out Clonezilla here, I've used it to clone Windows+Ubuntu installs on a single disk before. It even offers to attempt clone the bootloader as well. Assuming secure boot is off it should work fairly well for you.


How to compile a C program that uses math.h?

Append -lm to the end of your gcc command.

With all recent versions of GCC on GNU/Linux systems like Ubuntu, when you use the math library, you have to explicitly link to it. It is not automatically linked to along with the rest of the standard C library.

If you are compiling on the command-line with the gcc or g++ command, you would accomplish this by putting -lm at the end of the command.

For example: gcc -o foo foo.c -lm


Is there a way to run a command every time the mouse moves?

The question literally

Detecting mouse movement, can be done with several tools. Two examples:

Using xdotool in a script:
[you'd need xdotool to be installed]:

sudo apt-get install xdotool

Compare (in a loop) two mouse positions, with a time interval:
The command to get the mouseposition from xdotool:

$ xdotool getmouselocation
x:1449 y:137 screen:0 window:79691788

If we parse this output in a (python) script, we can let it run a command if the mouse moves (if position1 does not equal position2):

#!/usr/bin/env python3
import subprocess
import time

def get_mousepos():
    curr = subprocess.check_output(["xdotool", "getmouselocation"]).decode("utf-8")
    return [int(it.split(":")[1]) for it in curr.split()[:2]]

current1 = get_mousepos()
while True:
    time.sleep(0.5)
    current2 = get_mousepos()
    if not current1 == current2:
        # run a command:
        print("action")
    current1 = current2

Using (python's) tkinter
The exact same process can also be done with python's own tkinter:

[you'd need tkinter3 to be installed]:

sudo apt-get install python3-tk

The script, using tkinter:

#!/usr/bin/env python3
from tkinter import*
import time

root = Tk()

def current_position():
    return [root.winfo_pointerx(), root.winfo_pointery()]

pos1 = current_position()
while True:
   time.sleep(0.5)
    pos2 = current_position()
    if not pos1 == pos2:
        # run a command:
        print("action!")
    pos1 = pos2

root.mainloop()

An example related to what you are aiming at

An example of what can be done to control what command to run when the mouse trespasses a certain position (line) below.

#!/usr/bin/env python3
import subprocess

def get_mousepos():
    curr = subprocess.check_output(["xdotool", "getmouselocation"]).decode("utf-8")
    return [int(it.split(":")[1]) for it in curr.split()[:2]]

current1 = get_mousepos()
while True:
    current2 = get_mousepos()
    # make the jump depend on the position and direction:
    jump = 100 if current2[1] < 525 else -100
    if current2[0] < 1000 and current1[0] >= 1000:
        print("gone left") # you can run any other command here, like:
        subprocess.Popen(["xdotool", "mousemove", str(current2[0]), str(current2[1]+jump)])
    elif current2[0] > 1000 and current1[0] <= 1000:
        print("gone right") # you can run any other command here
        subprocess.Popen(["xdotool", "mousemove", str(current2[0]), str(current2[1]-jump)])
    current1 = current2

In this example, the mouse makes a jump when you move it from left to right or vice versa:

In this case, the mouse jumps a fixed jump. However, throwing some mathematics in, and move the jump line to the right side of your screen (+ a separate "arrangement" for the top left of the second screen), you can make the jump proportionally, to create the setup that you where aiming at in your first question: make (in a dual screen setup) both screens seem of the same vertical resolution when moving the mouse from one screen to another.

The "dead corner" where you cannot move the mouse from one screen to another would not exist then. (I have a working situation on my two screens)

It would still have a strange effect with windows if they are are spread over the two screens however, but it can be done.


Configuring network on a fresh installed 18.04: RTNETLINK answers: File exists

I'm assuming you have already checkout out: https://help.ubuntu.com/community/NetworkManager

I have found it more friendly if you use 'renderer: NetworkManager'.  Place the following into /etc/netplan/01-netcfg.yaml

network:
  version: 2
  renderer: NetworkManager
  ethernets:
    enp3s0:
      addresses: [ 193.171.201.236/27 ]
      gateway4: 193.171.201.225

Build /etc/NetworkManager/NetworkManager.conf something like this:

[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=false

[device]
wifi.scan-rand-mac-address=no

[device-enp3s0]
match-device=interface-name:enp3s0
ignore-carrier=true
managed=true

[device-other]
match-device=type:ethernet
managed=false

Try a simple configuration first, then use 'ifconfig -a' to verify the configuration worked.

After you change the above netplan configuration file, restart the network:

netplan apply
systemctl restart network-manager

You may need to install the network-manager package, too.

apt-get install network-manager

You can also check the status with:

systemctl status network-manager


Laptop's speakers sound bad. Poor sound quality

According to https://forum.manjaro.org/t/solved-terrible-sound-in-linux-much-better-in-windows/8203/6 and http://www.alsa-project.org/main/index.php/Asoundrc
We have to do some manual settings editing on pulse audio config. The path is /etc/pulse/daemon.conf. Open a terminal by pressing ctrl+alt+t. First of all, backup the configuration file:
sudo cp /etc/pulse/daemon.conf /etc/pulse/daemon.conf.backup

Then type sudo nano /etc/pulse/daemon.conf
(If your file is empty, it means the file you are looking for is not in this directory. In this case, try to locate it:
sudo updatedb, this will update your files database index. Then type locate daemon.conf to find the file location. Replace /etc/pulse/ with the path to your daemon.conf file)
Find the following lines (ctrl+w to find text in file) and replace your values with the following (lines might be in a different order in your system):
default-sample-format = float32ne
default-sample-rate = 48000
alternate-sample-rate = 44100
default-sample-channels = 2
default-channel-map = front-left,front-right

default-fragments = 2
default-fragment-size-msec = 125
resample-method = speex-float-5
enable-lfe-remixing = no
high-priority = yes
nice-level = -11
realtime-scheduling = yes
realtime-priority = 9
rlimit-rtprio = 9
rlimit-rttime = -1
daemonize = no

Press ctrl+o to save changes, then press ctrl+x to quit
now type nano ~/.asoundrc in terminal and paste te following code:
pcm.!default {
    type plug
    slave.pcm hw
    }

This will bypass dmix for pulseaudio increasing sound quality by a lot. We can’t have more than one resampler because if we do it gets resampled twice and some sound quality is lost (as explained by Calthax in this thread).
Credits to Calthax and AlsaProject wiki page.


Why does apt-get update get a 403 from private-ppas for purchases in the software-center?

You need to check your Launchpad login credentials to apt.conf (probably the hash) or use the method of:

https://user:pass@private-ppa.launchpad.net/commercial-ppa-uploaders/bit-trip-beat/ubuntu

To log in.


'select file' dialog is always shown at an incorrect position

That is just windows placement.

Place your mouse cursor on the top bar of the file manager> left click and hold, drag the window back onto the screen. Temp fix.

You may modify your /apps/nautilus/preferences/navigation_window_saved_geometry

Using gconf-editor or dconf-editor navigate to /apps/nautilus/preferences/navigation_window_saved_geometry

The entry should be something like this "1268x683+219+78"

Save and exit.


How to prevent the automatic switch from an email in evolution/thunderbird to firefox when clicking on a hyperlink in the email?

To avoid that: open config window in Firefox:

about:config

there found:

browser.tabs.loadDivertedInBackground

and change to True


How would I report a bug in the paste.ubuntu.com service?

It doesn't have its own Launchpad site but you can post bugs for all official ubuntu web content on the ubuntu-website-content Launchpad section. See for example this bug.


How to install package from Ubuntu install DVD?

Find the package on your DVD (or online), and then use:

sudo dpkg -i packagename.deb


Found the solution myself:

You need to edit the /boot/grub/grub.cfg file. In the Windows 9x sections (which were automatically detected), add this command:

parttool (hd0,X) boot+

where X is the partition with the specific Windows install you want to boot. This sets the correct partition as active, thus it will be mapped as drive C. Edit all the Win 9x entries you have with the correct partition number.

Leave everything else default.

This is just a temporary fix and will be lost after running update-grub, so I recommend making a backup of the grub.cfg file so you can easily copy it back in case your Win 9x entries stopped working after an update.


You need to install numpy using pip
 install pip :

sudo apt-get install python-pip python3-pip

Then install numpy using pip

sudo pip3 install -U numpy


how to configure 2 network interfaces with different gateways

To configure two interfaces say eth0 and eth1 to use two networks 192.168.0.0/24 and 10.10.0.0/24 a tool iproute2
can  be used to achieve this.

Steps:

Edit your /etc/network/interfaces:

auto lo
iface lo inet loopback

# The primary network interface

allow-hotplug eth0
iface eth0 inet static
    address 192.168.0.10
    netmask 255.255.255.0
    gateway 192.168.0.1

# The secondary network interface
allow-hotplug eth1
    iface eth1 inet static
    address 10.10.0.10
    netmask 255.255.255.0

Add second routing table by editing `/etc/iproute2/rt_tables:

#
# reserved values
#
255     local
254     main
253     default
0       unspec
#
# local
#
#1      inr.ruhep
1 rt2

Populate new routing table:

ip route add 10.10.0.0/24 dev eth1 src 10.10.0.10 table rt2
ip route add default via 10.10.0.1 dev eth1 table rt2

# The first command says that the network, 10.10.0.0/24, can be reached through the eth1 interface.
# The second command sets the default gateway.

Add routing rules:

ip rule add from 10.10.0.10/32 table rt2
ip rule add to 10.10.0.10/32 table rt2

# These rules say that both traffic from the IP address, 10.10.0.10, as well as traffic directed to
# or through this IP address, should use the rt2 routing table

Making the Configuration permanent by adding it to /etc/network/interfaces:

iface eth1 inet static
    address 10.10.0.10
    netmask 255.255.255.0
    post-up ip route add 10.10.0.0/24 dev eth1 src 10.10.0.10 table rt2
    post-up ip route add default via 10.10.0.1 dev eth1 table rt2
    post-up ip rule add from 10.10.0.10/32 table rt2
    post-up ip rule add to 10.10.0.10/32 table rt2

Source:

https://www.thomas-krenn.com/en/wiki/Two_Default_Gateways_on_One_System


This warning is grossly exaggerated. The main problem with it is that it will install files under /lib and/usr, overwriting some files provided by the Ubuntu distribution. This means that it won't be easy to uninstall or upgrade your manually installed drivers. I recommend specifying ./configure --prefix=/usr/local when compiling the library and the utilities, so that everything you install that isn't part of the distribution is under /usr/local. For the drivers, you don't have this luxury: they must be under /lib/modules, but fortunately these aren't so critical.

Nonetheless, I suggest carefully reviewing and keeping note of what files are being installed. Run make -n install to see this, before running sudo make install. Alternatively, install the stow package, create a directory /usr/local/stow/alsa-1.0.24, give yourself write permission on it (e.g. sudo chown hannibal /usr/local/stow/alsa-1.0.24), specify ./configure --prefix=/usr/local/stow/alsa-1.0.24, and run make install without sudo. Then run sudo stow alsa-1.0.24 from the /usr/local/stow directory. Finally, symlink the modules under /usr/local/stow/alsa-1.0.24/lib/modules to the corresponding directory under /lib/modules and run sudo depmod -a.

Compiling the packages from the upstream source is not the easiest solution.
There's a PPA with Alsa 1.0.24 packages for lucid; those binary packages might work on maverick. Or you could try recompiling the 1.0.24 packages from natty.


Install eawpatches midi soundfont alternative to freepats via apt

It seems that you forget to add GPG key, follow guide from repository site (accessed by mentioned link https://www.fbriere.net/debian):

Using the fbriere.net-keyring package (recommended)
...
This package can also be downloaded, and installed with dpkg -i.
Manual installation
It is also possible to manually download the key, either from a keyserver or directly from this site, and add it via apt-key. Here are two examples:
 wget -q -O- 'https://www.fbriere.net/public_key.html' | sudo apt-key add -
 wget -q -O- 'http://pool.sks-keyservers.net/pks/lookup?op=get&search=0x96B4BF71E4D7FB01' | sudo apt-key add -

then you can proceed with
sudo apt-get update

and package installation.


Want to reinstall Ubuntu 14.04 after backing up Home folder to different partition. Is it too risky?

If you have a good backup everything is safe.

There is one thing you should know. Your home folder has all your "user configured" stuff in it.

When you restore your home folder, if you want a true "fresh" install, do not copy over the entire folder. Only copy over what you need. For example don't copy back ~/.config instead copy only what you actually see using like ~/Documents,


How do I make Ubuntu full scale in Virtual Box

I'm assuming you have tried Full Screen and Seemless modes.  My guess is you might not have to increase the Video Memory you have configured for Virtual Box.

For size estimates: with 64 Mb of Video memory configured in Virtual Box, I am running a Full Screen Mode display of Ubuntu 10.04 at 2560x1024 resolution.


Where can I find information about ubuntu compatible or certified hardware/PC models?

See the Ubuntu Certification website at:

http://www.ubuntu.com/certification/

Specifically, for desktops and laptops/netbooks, go directly to:

http://www.ubuntu.com/certification/desktop/


Dual Boot Ubuntu 12.04.2 & Windows 7 (Separate Drives)

If you connect both disk1 (Win7) and disk2 (Ubuntu) and set your BIOS to boot first disk2 (i.e. Ubuntu), you should be able to update grub2, which is on disk2, without overwriting Win7 bootloader, which is on disk1, and have Win7 included in the grub menu by entering this command in terminal: sudo update-grub

If you want to be on the safe side, you can have your Win7 installation CD ready or a recovery CD created in Windows to easily restore Win7 bootloader any time when it gets overwritten accidentally (e.g. if you attempt to install grub2 by mistake to Win7 disk).


I want to install AMD driver in ubuntu 15.10. but I cant

AMD now (28.11.2015) not support 15.10.
You have 3 options:
1. Install 15.04 or 14.04
2.  Enable "proposed" in Software & Upgrades (it contains update candidates to stable repository) and install all updates.
proposed
3. Wait till support will be added in main repository.


Installing Guest Addition on 12.10 Server

The errors seem to be because you have a whole bunch of programs missing on your guess. The shell script tries to install the graphical X guest additions (even though you apparently don't have X installed on your server). It also tries to compile the guest kernel modules, but you have neither GCC nor the kernel headers installed, so it fails.

Normally the package manager would automate installing dependencies you need, but a shell script can't do that.

Fortunately, the Guest Additions have been available in the Ubuntu universe repositories for a while. You can install them using from the package virtualbox-guest-utils (on the guest). You probably want to skip installing the virtualbox-guest-x11 package which virtualbox-guest-utils recommends, since you don't have X. The necessary compilers, headers, and DKMS stuff should get installed automatically. Be aware that this will use roughly 200 MB of additional disk space.


Is there an easy way to configure an Ubuntu system to function as a proxy/file server from behind an NAT?

You can configure using Squid proxy server and Dansguardian content filtering combination The following is the link and the steps

http://kamleshgosavi.blogspot.in/2011/01/dansguardian-content-filtering-with.html

Dansguardian Content Filtering With Squid Transparent Proxy On Ubuntu Dansguardian Content Filtering With Squid Transparent Proxy On Ubuntu

sudo apt-get install squid3 sudo nano /etc/squid3/squid.conf

(Search for http_port 3128 and add following ) http_port 3128 transparent

(Search for INSERT and add following )

acl localnet src 192.168.2.0/24

http_access allow localnet http_access allow localhost

sudo /etc/init.d/squid3 restart For squid in detail follow the below link dont follow the IPtable part from this link


Bash script to split file by its content renaming the split files from an another file

Place your files in the parent directory of the SPLIT directory and create a script file following the steps below and call it my_script.sh so the structure of this directory will be like this:
Company.txt
extract_GL2_1.txt
extract_GL2_23.txt
my_script.sh
SPLIT/

IMPORTANT:

Files in the SPLIT directory will get created and deleted, DO NOT PLACE ANY FILES IN THE SPLIT DIRECTORY.

Run the script ONLY ONCE or otherwise you will get duplicate entries in the result files.

To create and use the script file, please follow these steps:

Create and edit the script file in your parent directory by running the following command in the terminal (cd to the directory first):
nano my_script.sh

Copy and paste the following code into the editor:

#!/bin/bash

echo
echo "splitting files ..."
echo
cat extract_GL2*.txt |
        while read line
                do
                        echo "$line" | grep DETAIL | awk -F\| '{print >> "SPLIT/"$11".txt"}'
                done

echo "renaming splitted files ..."
echo
        while IFS='|' read f1 f2
                do
                        mv -n "SPLIT/$f1.txt" "SPLIT/$f2.txt" 2> /dev/null
                done < "Company.txt"

echo "combining splitted files ..."
echo
        while IFS='|' read f1 f2
                do
                        cat "SPLIT/$f1.txt" >> "SPLIT/$f2.txt" 2> /dev/null
                done < "Company.txt"

echo "cleaning up ..."
echo
        while IFS='|' read f1 f2
                do
                        rm "SPLIT/$f1.txt" 2> /dev/null
                done < "Company.txt"

Save the script file and exit the editor by pressing Ctrl + X then press Y.

Make the script file executable by running the following command in the terminal:
chmod +x my_script.sh

Run the script by running the following command in the terminal:
bash my_script.sh

Done
Best of luck


Unity does not get listed in lightdm on xubuntu 13.04

The list of sessions is defined by the .desktop files in /usr/share/xsessions. There should be ubuntu.desktop containing entry for Unity.

On my Ubuntu (12.10 with GDM) the ubuntu.desktop file contains the following text:

[Desktop Entry]
Name=Ubuntu
Comment=This session logs you into Ubuntu
Exec=gnome-session --session=ubuntu
TryExec=unity
Icon=
Type=Application
X-Ubuntu-Gettext-Domain=gnome-session-3.0

But there is a possibility that your should look different.


Your problem is with your nouveau video driver.

Lets first check your file system for errors.

To check the file system on your Ubuntu partition...

boot to the GRUB menu
choose Advanced Options
choose Recovery mode
choose Root access
at the # prompt, type sudo fsck -f /
repeat the fsck command if there were errors
type reboot

If for some reason you can't do the above...

boot to a Ubuntu Live DVD/USB
open a terminal window
type sudo fdisk -l
identify the /dev/XXXX device name for your "Linux Filesystem"
type sudo fsck -f /dev/XXXX # replacing XXXX with the number you found earlier
repeat the fsck command if there were errors
type reboot

If that doesn't solve your problem, boot to the GRUB menu, hit the e key, find "quiet splash" and change it to "quiet splash nomodeset", then control-x to continue to boot. Reinstall your video drivers.


What should I do to avoid my roommate from changing my password through using system recovery mode .?

For this user case probably the best "solution" is to re-install Ubuntu with full encryption (LUKS). This would secure the data and prevent changing the  root/users password(s).

This could be defeated with a few methods, both hardware (key loggers) and software (custom kernels), but both of those options are unlikely. The OP can assess these risks.

With the above suggestion, I agree with the advice that the ultimate solution is to prevent physical access. In general physical access is root access via any number of techniques.


From the FAQ:

  LFS stands for Linux From Scratch which is a project that aims to
  teach you about the inner workings of Linux by building a Linux system
  by downloading, building, and installing the packages yourself.

Since you download, build and install the whole thing yourself, it's not based on Ubuntu.


how to get links from chrome to open in firefox?

so I'll try to help with making urls like ff:whatever to be opened in firefox. First, firefox does not know how to interpret ff: mime type, so we need to write a simple script that will remove ff: from the URL and pass the rest to firefox:

#!/bin/bash
firefox $(echo $1 | sed 's/ff://')

Place this script somewhere (I'll refer to it later as /path/to/script) and don't forget to make it executable with chmod +x /path/to/script.
Next we need to create a .desktop file that will handle ff: mime and call this script. Good place for this file would be in ~/.local/share/applications/. You can give it any name

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=false
Name=OpenInFirefox
Comment=Open link in Firefox
Categories=Application;Network;
MimeType=x-scheme-handler/ff;
Exec=/path/to/script %u

Don't forget to replace /path/to/script with path to the script created before.

That's it. Now run sudo update-desktop-database and all links that start with ff: should open in firefox.


Ubuntu/Kubuntu 16.04.1 installation in VirtualBox

This should not happen and seems to be a bug in virtualbox. Consider to write a bug report.
If you are using two displays, you may shut off one of them, that may be a first aid.
I suggest to install the guest additions, they contain a video driver. To be able to do this, switch to console/tty0 of your virtual ubuntu. It is accessable with your host key +F1. Normally the host key is the right control key.

Insert guest additions using virtualbox menu.
mount cd with

sudo mount /dev/cdrom /mnt

go to /mnt and show content

cd /mnt
ls

Install guest additions with

sudo sh ./VirtualBoxLinuxAdditions.run

EDIT: Did you activate 2d or 3d acceleration in VirtualBox? It is an experimental feature and can cause some strange errors.


Try "lxpanel", this is a super lightweight no-nonsense taskbar which is fully customizable.

To install lxpanel:

sudo apt-get install lxpanel

If you decide that you also want the applets for things like network etc.:

sudo apt-get install lxpanel-indicator-applet-plugin


Ubuntu 14.04 display issue from VMWare console

I've cracked it :) By accident I installed kernel 3.14.0-031400 rebooted and vCenter console now shows my desktops correctly. I downloaded this version quite by accident but glad I did as the latest version (3.16.1Utopic) doesn't fix the issue. I'm going to leave it at this for the time being as I have lots of learning and work to do before I can fully move all of my infrastructure over to Linux.

Hope the above helps others in the same position as me.


How can I play the League of Legend in Ubuntu 15.04 (64-bit)?

PlayOnLinux seems to be a bit outdated, see if this is any help:

https://github.com/TheUnnamedDude/pol_league_of_legends


It may be a problem of drivers not installed. Try using the program 'Additional driver' that is pre-installed to download the appropriate drivers. If it doesn't work, try to download them manually from the producer's site.


Ubuntu 18.04 service not executing on startup even when its enabled

So I found out the problem, my /app/configuration/cv_init/startup_cv.sh executes a docker command, and my service was trying to execute before docker was ready. I just added the required dependency and it works perfectly.


It's in ~/.putty/sessions and if you want you can fool around with copying that around between machines. However, this is not a very effective strategy to manage your access to the servers. It will require manually coping credentails and in the event of someone getting access to your logins it will be harder to revoke access to those credentials.

What many do instead is have a single SSH key you use that represents your identity, usually your only/default SSH key:

 cat ~/.ssh/*.pub
 # If you do not have a key generate one with ssh-keygen command
 # only enter a password if you want to encrypt the key (optional)

This will print out your public key. It's a single line of text that allows other servers to guarantee that the incoming connection is from that SSH key. Log into the remote server (for the first time using a password or local terminal) then add the public key line from earlier to a file called ~/.ssh/authorized_keys (create this file and any directories if it doesn't exist)

Now just about every area of Linux will understand the remote sftp:// and ssh:// connections to that server and negotiate them automatically without prompting you for anything (unless you encrypted your keyfile earlier) This means File Browser (nautilus) and terminals will simply "just work"


visual studio code menu bar not visible in ubuntu18.10

in settings.json add this:

"window.titleBarStyle": "custom",

cheers


How can I make my mouse auto-click every 5 seconds?

Edit: xdotool click --delay 5000 --repeat 200 1

For 200 clicks with mouse

Open terminal, install xdotool

sudo apt-get install xdotool

Also, open the window you want to click side by side with terminal. Select terminal (as active window) and move the mouse over the point where you want to click. In terminal type (try not to move the mouse)

xdotool getmouselocation

You will need the x:XXX and y:YYY (bottom). You can move the mouse from here, but let windows stay where they are.
Type

gedit script

Paste the following on gedit (change the XXX and YYY for the numbers you got before)

#!/bin/bash
while [ 1 ]; do
  xdotool mousemove XXX YYY click 1 &
  sleep 5
done

Save and close it. Then

chmod +x script

To execute it,

./script

To get less, simply change the 5 after sleep to less.

Source: http://manpages.ubuntu.com/manpages/lucid/man1/xdotool.1.html and http://ubuntuforums.org/showthread.php?t=925217


You say: I already burned it on a CD , so you have already downloaded a .iso file from Download Ubuntu Desktop

Now you select at BIOS as first boot device your cdrom and restart your computer.

The last step is put your CD at the cdrom and select install Ubuntu from the CD menu.

The .exe are executable files for Microsoft Windows, so you do not need a .exe file for installation.

--

Help from ubuntu.com for installing from CD or DVD, click here

( Just ignore the steps for windows )


What other software is available to remove old files/kernels to increase space and cleanup drive?

I'd recommend letting apt handle this for you, using the command:

sudo apt-get autoremove

That should do everything you need. Once the process is complete, it's worthwhile checking the filesystem locations that Zanna has mentioned in her answer.

On a sidenote, I prefer to keep at least one old kernel version that I know works, just incase the current kernel suddenly stops working. I'm probably just being paranoid, but it's nice to have one to revert to.


Why can't Ubuntu Make install Intellij IDEA on 16.04?

The version of ubuntu-make in the 16.04 packages doesn't support IntelliJ.  According to TechGeeks you will need at least version 16.03 (the one in Ubuntu 16.04 is 16.02.1).  To do this, execute the following (if this is a new install):

sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make
sudo apt update
sudo apt install ubuntu-make

If you still have it installed, you can just do the following:

sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make
sudo apt update
sudo apt dist-upgrade

This got my ubuntu-make version up to 16.09 and I was able to install IntelliJ IDEA using the command you used in your post.


Open a terminal and use this command to fix the corrupted association

xdg-mime default caja-folder-handler.desktop inode/directory

This should fix the problem for you.


Why does "Automatically connect eligible plugs and slots of snap "okular"" take a relatively long time?

It seems that

  Automatically connect eligible plugs and slots of snap "..."

is just a way to indicate that supplementary material is being downloaded.

While the downloading of okular has a straightforward progress indicator, the time while "Automatically connect eligible plugs and slots of snap "..."" is in progress is denoted by just a rotating |.

However, if one keeps Ubuntu's system monitor open at the same time, it's quite evident that "Automatically connect eligible plugs and slots ..." means a download is in progress.

The process in the terminal and the downloading activity shown in the system conclude at the same time.

In the case of installing the okular snap on a clean (no other qt-dependent snap having been installed) Ubuntu 20.04, the supplementary material downloaded after the okular snap is kde-frameworks-5-qt-5-14-core18  5.68.0. Watching the network activity in the system monitor indicates that approximately 333 MiB were downloaded.

It's not a big deal but now I know that "Automatically connect eligible plugs and slots ..." means downloading stuff.


Are btrfs updates rolled in to 12.04 LTS (3.2) kernels?

No. Ubuntu only adds new hardware support to older kernels and backports security fixes or severe regular bugs.

Since 12.04 LTS this process enhanced by including completely newer kernels from later Ubuntu releases. This means you can install the Quantal and Raring kernel in 12.04 straight from the repositories. Just wait for a few months and you'll find the Ubuntu 13.10 kernel in 12.04.

Please note that this won't backport userspace binaries for Btrfs support! So be aware about using the Btrfs tools from the 12.04 repositories on a newer kernel.

See also: Ubuntu wiki: LTS Hardware Enablement Stack.


It probably is the same bug that I suffered. I tried lots of things. If you switch from En1 to En2 & back again each time you boot up that's a workaround (using the icon in the system tray). The only permanent solution I found was to remove Ibus.

Beware! Removing Ibus removes most of the Unity System Settings too.

There's a thread here:

Wrong Keyboard Map


You can call your script using only the whole path, without the dot .:

/path/to/script

sudo also works fine:

sudo /path/to/script

  Will they usually find all the stuff they need to run properly?

Do you mean like, "will my script find the files which are in the same folder?" That depends of your code. For example, if you have the script /tmp/test.sh:

#!/bin/bash
ls

If you invoke it from your home folder, it will run ls in your home:

test@ubuntu:~:/tmp/test.sh
Desktop     Dropbox         Imagens  NetBeansProjects     Público
Documentos  Modelos    R          Vídeos

In this situation, dirname is your ally:

#!/bin/bash
current=$(dirname $0)
ls $current

Running it from your home folder, it gives:

test@ubuntu:~:/tmp/test.sh
acroread_1000_1000     hiRF7yLSOD              pulse-2L9K88eMlGn7
unity_support_test.0    clementine-art-jt5332.jpg

which is the content of my /tmp/ folder.


Why does "~" folder in my home directory keep reappearing?

Next time you can run lsof | grep /home/**yourusername**/~ and see what process is creating the file or has it open.


Issues compiling a patched version of pulseaudio

Use git cloning instead of downloading a tar.

Run

sudo apt install git
git clone https://github.com/dmitryvk/pulseaudio.git
cd pulseaudio

You need some libs too

sudo apt-get install libjson0 libjson0-dev libsndfile1-dev
./autogen.sh
CFLAGS="-ggdb3 -O0" LDFLAGS="-ggdb3" ./configure --without-caps
make

And it builds OK.


Change notification(alert) sound in Ubuntu

The short answer is, things don't work that way any more. Each program has its own settings for that (and they are often not configurable via GUI, and are VERY hard to find in any other manner.) This includes your file manager (which might also use portions of a different "program" to function) or any system program, many of which were not designed to be configurable for the GUI let alone sounds! Blame it all on ALSA and Linux community fragmentation, I guess.


Where to find the checksums of Ubuntu ISO images?

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

In your case the md5sum is 59d15a16ce90c8ee97fa7c211b7673a8


As a start I would recommend booting the machine into single-user mode, as described for example at https://wiki.ubuntu.com/RecoveryMode.  This should get you a command line with root access.

From here you can check some of the possible causes of the problem.  It would probably good to look at recent error messages in system log files. I see various causes associated with this problem, see for example Ubuntu gets stuck in a login loop.

Hope this helps.


Still can't use usb in virtualbox after extension install in ubuntu 13.04

To be able to use USB you need to add your user to the vbox group.

You can do it from the command line:

sudo usermod -a -G vboxusers username

You don't need the extension pack to be able to use USB, it's only needed to install USB2 support.


This is a command ./RedistMaker and it will (/should) create the directories and files you need. The cd ../Redist/OpenNI-Bin-Dev-Linux-x64-v1.5.2.23/ should get you from the directory where you executed the command to 1 directory up and then into a new directory Redist into a new directory OpenNI-Bin-Dev-Linux-x64-v1.5.2.23.
Ans in there there should be a file named install.sh.

So the starting spot where you should find Redist should be OpenNI/Platform/Linux/.


separate audio output in two device it is unclear: do you want two playback sources each in a separate output or do you want one playback in both internal speakers and headset?

If you want two or more playback sources each in a separate output: that is possible with pavucontrol (PulseAudio Volume Control): you should be able to output each different playback source to a separate device, like for example VLC to headset and Qmmp to internal speakers.

Depending on your desktop the same options may be present in the default audio volume settings (e.g. in Plasma:Audio Volume Settings > Audio Volume > (tab)Applications).

If you want playback in all output devices at the same time (e.g. in both internal speakers and headset): as indicated here install paprefs and set it (selecting the “Simultaneous output”).

But I am in Kubuntu 18.04, and in Plasma 5.12 paprefs is not needed, as a similar setting is already there:

A new output option should become available after reboot, called “Simultaneous output”.


Look for free pascal in the Ubuntu Software Center, that will fit your needs.


How confidential are automatic crash reports made by apport?

All crash bug reports filed by Apport are marked private by default and are only visible to people with relevant privileges (generally, the Bug Control members for bugs filed on packages from the repository).
Usually, crash bug reports don't contain any sensitive information (mostly because they don't involve software that deal with private information). However, it is still possible CoreDump.gz and Stacktrace.txt attached to the bug report contain sensitive information like the one you described. Hence, they are marked private to be on the safe side.
When you are filing a bug report, you can review what information is being uploaded for your own sake. Here's an image of an Apport crash dialog.

You should closely go through the information being provided under CoreDump and Stacktrace. If it contains information that you are not comfortable being uploaded, you can cancel the process.
What about Whoopsie?
Since 12.04, Apport has been silently collecting crash data for Whoopsie without requiring any user interaction. That itself is not a direct privacy problem though because only people who signed the non-disclosure agreement have access to the Ubuntu error tracker.
See also:

How do I enable or disable Apport?
What is the 'whoopsie' process and how can I remove it?
How can I track a bug that caused a crash and was reported via apport / whoopsie?

A final note on Privacy policy
All bug reports you submit are covered by Ubuntu privacy policy. Quoting relevant sections from it for reference:

Error reports
When you chose to send an error report, it includes a unique
identifier for your computer. This identifier does not identify you,
unless you (or someone acting on your behalf) discloses it separately.
An error report may include personal information such as the state of
programs that were running at the time. You can block future error
reports from the privacy panel of System Settings.


XFCE: Drag-and-drop pointer stuck on some windows

I have same issue, and here is my solution:
the tmp solution is:

xfwm4 --replace

it will restart xfwm4(I guess) and fix this issue, but when this issue may be occurred again

so I try to downgrade xfwm4, in my case, xfwm version "4.13.0-1mint1+sonya" has this issue(when I upgrade to linux mint 18.3 xfce, it use this version xfwm4), and my old os linut mint 18(it use xfwm4 4.12.3-1ubuntu2) has not this issue, so I try to downgrade, I use following:

sudo apt remove xfwm4 -y
sudo apt install xfwm4=4.12.3-1ubuntu2 -y


There's the alsa-tools-gui package which bundles an application called hda-jack-retask that permits "retasking" of hardware audio ports.

To install the package run the following in a terminal window ( CTRL  +  ALT  +  t ):

sudo apt-get install alsa-tools-gui

Afterwards, you should be able to start hdajackretask and reconfigure the ports as needed.


Can't find weston.ini on Ubuntu 17.10 to turn on Numlock

Ubuntu does use Wayland as the default (on GPUs which it can work on). However, Wayland is simply a protocol definition. Weston is one implementation of the protocol, but it is not the implementation used by default in Ubuntu. The implementation used in Ubuntu, is the GNOME shell itself.


Did you read the edubuntu wiki?
Please check whether "QT_IM_MODULE" and "GTK_IM_MODULE" are defined.


Selecting Windows in grub redirects to bootmgr

Looks like you have not cleaned wubi.

Boot into Windows
Open Add/Remove programs
Search for Ubuntu, and uninstall it.
Reboot.

That should fix it.


Can i install juju zookeeper on maas server itself?

Juju, as of 1.1.0, no longer uses Zookeeper. What you're referring to is the bootstrap node. At this time it isn't possible to locate the bootstrap node outside of the environment. However, you can deploy a service to the bootstrap node using the --to flag. It's not recommended, but if you know that the two won't collide, you can juju deploy --to 0 <service> to have a service shared on the bootstrap node.


Hello! I have problems with my ubuntu18.04(amd64) desktop virtualization machines

You can check if you have the virtualization enabled in the BIOS by trying to temporarily give more than one CPU to a VM (IIRC this is disabled if you have no hardware support or virtualization).

Other than that, when the guest system performance monitor to see what is limiting it (RAM/Swapping, CPU...) and the hosts performance monitor for same.

Otherwise, give more indication about the host hardware, and the VM settings (video support: 2D? 3D?).


Can you empty cached items from memory without needing to close Firefox?

Official Mozilla Support Answer

Mozilla has a support document for this particular question.

The document offers additional information - so it is worth a look.

It also says that clicking the Clear Now button could take an unknown amount of time to clear all the caches (and it does clear all of them including the memory cache you want to clear) because it is done in the background by another processor thread. Though you can check how it's doing by going to the about:cache page.

Alternative: Using Add-On

You could use an add-on to delete the cache.

As far as I know there are several, I always used Empty Cache Button.


Well I knew I could run something on login, but I knew it would exit out straight after running. What I now remember is that I can run as much as I like on a remote server. You can just chain the commands together!

ssh user@server -t "cd /websites/website ; /bin/bash"

Now I can just tell fabric to do that and we're away. Simple.

I did say it wasn't anything to do with the Fabric but here's the new part of my fabric script too, based on the above:

def ssh():
    ''' SSH into the remote server at the correct directory '''
    local('ssh -t -p%(port)s %(server)s "cd %(remote_dir)s ; /bin/bash"' % {
        'server': server_host,
        'port': server_port,
        'remote_dir': remote_dir,
    })

I symlink the same script around so the variables (server_host, server_port and remote_dir) change from site to site.

Because Fabric can handle the outbound connection you can also just do this:

def ssh():
    ''' SSH into the remote server at the correct directory '''
    run('cd %s ; /bin/bash' % remote_dir)

This does work but the output is prepended with a string from Fabric. This made the prompt over 80 chars long and while I've got tons of resolution, that's too much for me :)


Where to put One-Off Computer-Wide Software Folders?

One good place to put this is under /srv, typically something like /srv/wiki.example.com.  The Linux Filesystem Hierarchy Standard endorses this location.

Another option is something like /home/wiki or /home/httpd.

Putting it in /usr/bin is not a good idea; that should be reserved for programs installed by Ubuntu.

/usr/local/bin is a better place to put a symlink to the program.


I can't enable wireless on a Sony PCG-61315L

If the wireless is stuck as if disabled by hardware (it happens in some laptops when you use the wireless button a lot) and you cannot physically enable it,  try in Terminal:

sudo rfkill unblock wifi


Well, this line in the output was key:

(intel_gpu_top:25862) intel-mmio-CRITICAL: Last errno: 13, Permission denied

Turns out that you need to run it as root:

sudo intel_gpu_top

It would be nice if they printed a "You must be root" message or something to the terminal instead of just crashing.....


Where can I find the Ubuntu kernel changelogs?

Besides the package itself (package linux) you can find these on

kernelnewbies.org
kernel.org

And then there is the Linux Kernel Mailing List (LLKML.ORG) where (technical) discussions on the design of, and bugs in the Linux kernel take place.


phpmyadmin showing error regarding mysqli, but its already installed

Check if the PHP MySQL module is actually there:

php -m | grep mysqli

If the above command returns nothing probably something goes wrong during the installation of the MySQL module. So you can try to reinstall it:

sudo apt-get install --reinstall php-mysql

Then restart the web server, flush your browser's cache and reload the page.

The PHP modules are enabled through .ini files located in /etc/php/<php.version>/mods-available and their binaries are located in /usr/lib/php, here is example output from my system:

$ cat /etc/php/7.0/mods-available/mysqli.ini
; configuration for php mysql module
; priority=20
extension=mysqli.so

$ sudo find /usr/lib/php -type f -name 'mysqli.so'
/usr/lib/php/20151012/mysqli.so


How can I lock an application (and all its new windows) into a specific workspace?

IMPORTANT EDIT

Below a rewritten version of the script from the first answer (below). The differences:

The script now is extremely low on resources (like it should be with background scripts). The actions are now arranged to act if (and only if) they are needed. The loop does practically nothing but check for new windows to appear.
Bot the WM_CLASS and the targeted workspace are now arguments to run the script. Only use either the first or the second (identifying) part of the WM_CLASS (see further below: how to use)
The script now keeps focus on the currently active window (actually re- focusses in a split second)
When the script starts, it shows a notification (example gedit):

The script

#!/usr/bin/env python3
import subprocess
import sys
import time
import math

app_class = sys.argv[1]
ws_lock = [int(n)-1 for n in sys.argv[2].split(",")]

def check_wlist():
    # get the current list of windows
    try:
        raw_list = [
            l.split() for l in subprocess.check_output(
                ["wmctrl", "-lG"]
                ).decode("utf-8").splitlines()
            ]
        ids = [l[0] for l in raw_list]
        return (raw_list, ids)
    except subprocess.CalledProcessError:
        pass

def get_wssize():
    # get workspace size
    resdata = subprocess.check_output(["xrandr"]).decode("utf-8").split()
    i = resdata.index("current")
    return [int(n) for n in [resdata[i+1], resdata[i+3].replace(",", "")]]

def get_current(ws_size):
    # vector of the current workspace to origin of the spanning desktop
    dt_data = subprocess.check_output(
        ["wmctrl", "-d"]
        ).decode("utf-8").split()
    curr = [int(n) for n in dt_data[5].split(",")]
    return (int(curr[0]/ws_size[0]), int(curr[1]/ws_size[1]))

def get_relativewinpos(ws_size, w_data):
    # vector to the application window, relative to the current workspace
    xpos = int(w_data[2]); ypos = int(w_data[3])
    xw = ws_size[0]; yw = ws_size[1]
    return (math.ceil((xpos-xw)/xw), math.ceil((ypos-yw)/yw))

def get_abswindowpos(ws_size, w_data):
    # vector from the origin to the current window's workspace (flipped y-axis)
    curr_pos = get_current(ws_size)
    w_pos = get_relativewinpos(ws_size, w_data)
    return (curr_pos[0]+w_pos[0], curr_pos[1]+w_pos[1])

def wm_class(w_id):
    # get the WM_CLASS of new windows
    return subprocess.check_output(
        ["xprop", "-id", w_id.strip(), "WM_CLASS"]
        ).decode("utf-8").split("=")[-1].strip()

ws_size = get_wssize()
wlist1 = []
subprocess.Popen(["notify-send", 'workspace lock is running for '+app_class])

while True:
    # check focussed window ('except' for errors during "wild" workspace change)
    try:
        focus = subprocess.check_output(
            ["xdotool", "getwindowfocus"]
            ).decode("utf-8")
    except subprocess.CalledProcessError:
        pass
    time.sleep(1)
    wdata = check_wlist()
    if wdata !=  None:
        # compare existing window- ids, checking for new ones
        wlist2 = wdata[1]
        if wlist2 != wlist1:
            # if so, check the new window's class
            newlist = [[w, wm_class(w)] for w in wlist2 if not w in wlist1]
            valids = sum([[l for l in wdata[0] if l[0] == w[0]] \
                          for w in newlist if app_class in w[1]], [])
            # for matching windows, check if they need to be moved (check workspace)
            for w in valids:
                abspos = list(get_abswindowpos(ws_size, w))
                if not abspos == ws_lock:
                    current = get_current(ws_size)
                    move = (
                        (ws_lock[0]-current[0])*ws_size[0],
                            (ws_lock[1]-current[1])*ws_size[1]-56
                        )
                    new_w = "wmctrl -ir "+w[0]+" -e "+(",").join(
                        ["0", str(int(w[2])+move[0]),
                         str(int(w[2])+move[1]), w[4], w[5]]
                        )
                    subprocess.call(["/bin/bash", "-c", new_w])
                    # re- focus on the window that was focussed
                    if not app_class in wm_class(focus):
                        subprocess.Popen(["wmctrl", "-ia", focus])
        wlist1 = wlist2

How to use

The script needs both wmctrl and xdotool:

sudo apt-get install wmctrl xdotool

Copy the script above into an empty file, save it as lock_towspace.py
Of your specific application, find out the WM_CLASS: open your application, run in a terminal:

xprop WM_CLASS and click on the window of the application

The output will look like (in your case):

WM_CLASS: WM_CLASS(STRING) = "sun-awt-X11-XFramePeer", "MATLAB R2015a - academic use"

Either use the first or the second part in the command to run the script.
The command to run the script then is:

python3 /path/to/lock_towspace.py "sun-awt-X11-XFramePeer" 2,2

In the command, the last section; 2,2 is the workspace where you want to lock the application to (without spaces: (!) column, row), in "human" format; the first column/row is 1,1
Test the script by running it. While running, open your application and let it produce windows as usual. All windows should appear on the targeted workspace, as set in the command.

OUTDATED ANSWER:

(second) TEST VERSION

The script below locks a specific application to its initial workspace. If the script is started, it determines on which workspace the application resides. All additional windows the application produces will be moved to the same workspace in a split second.

The focus issue is solved by automatically re- focussing on the window that was focussed before the additional window was produced.

The script

#!/usr/bin/env python3
import subprocess
import time
import math

app_class = '"gedit", "Gedit"'

def get_wssize():
    # get workspace size
    resdata = subprocess.check_output(["xrandr"]).decode("utf-8").split()
    i = resdata.index("current")
    return [int(n) for n in [resdata[i+1], resdata[i+3].replace(",", "")]]

def get_current(ws_size):
    # get vector of the current workspace to the origin of the spanning desktop (flipped y-axis)
    dt_data = subprocess.check_output(["wmctrl", "-d"]).decode("utf-8").split(); curr = [int(n) for n in dt_data[5].split(",")]
    return (int(curr[0]/ws_size[0]), int(curr[1]/ws_size[1]))

def get_relativewinpos(ws_size, w_data):
    # vector to the application window, relative to the current workspace
    xw = ws_size[0]; yw = ws_size[1]
    return (math.ceil((w_data[1]-xw)/xw), math.ceil((w_data[2]-yw)/yw))

def get_abswindowpos(ws_size, w_data):
    curr_pos = get_current(ws_size)
    w_pos = get_relativewinpos(ws_size, w_data)
    return (curr_pos[0]+w_pos[0], curr_pos[1]+w_pos[1])

def wm_class(w_id):
    return subprocess.check_output(["xprop", "-id", w_id, "WM_CLASS"]).decode("utf-8").split("=")[-1].strip()

def filter_windows(app_class):
    # find windows (id, x_pos, y_pos) of app_class
    try:
        raw_list = [l.split() for l in subprocess.check_output(["wmctrl", "-lG"]).decode("utf-8").splitlines()]
        return [(l[0], int(l[2]), int(l[3]), l[4], l[5]) for l in raw_list if wm_class(l[0]) == app_class]
    except subprocess.CalledProcessError:
        pass

ws_size = get_wssize()
init_window = get_abswindowpos(ws_size, filter_windows(app_class)[0])
valid_windows1 = filter_windows(app_class)

while True:
    focus = subprocess.check_output(["xdotool", "getwindowfocus"]).decode("utf-8")
    time.sleep(1)
    valid_windows2 = filter_windows(app_class)
    if all([valid_windows2 != None, valid_windows2 != valid_windows1]):
        for t in [t for t in valid_windows2 if not t[0] in [w[0] for w in valid_windows1]]:
            absolute = get_abswindowpos(ws_size, t)
            if not absolute == init_window:
                current = get_current(ws_size)
                move = ((init_window[0]-current[0])*ws_size[0], (init_window[1]-current[1])*ws_size[1]-56)
                new_w = "wmctrl -ir "+t[0]+" -e "+(",").join(["0", str(t[1]+move[0]), str(t[2]+move[1]), t[3], t[4]])
                subprocess.call(["/bin/bash", "-c", new_w])
            focus = str(hex(int(focus)))
            z = 10-len(focus); focus = focus[:2]+z*"0"+focus[2:]
            if not wm_class(focus) == app_class:
                subprocess.Popen(["wmctrl", "-ia", focus])
        valid_windows1 = valid_windows2

How to use

The script needs both wmctrland xdotool

sudo apt-get install wmctrl xdotool

Copy the script into an empty file, save it as keep_workspace.py
determine your application's `WM_CLASS' by opening the application, then open a terminal and run the command:

xprop WM_CLASS

Then click on your application's window. Copy the output, looking like "sun-awt-X11-XFramePeer", "MATLAB R2015a - academic use" in your case, and place it between single quotes in the head section of the script, as indicated.
Run the script with the command:

python3 /path/to/keep_workspace.py

If it works as you like, I'll add a toggle function. Although it works already for a few hours on my system, bu it might need some tweaking first however.

Notes

Although you should not notice it, the script does add some processor load to the system. On my elderly system I noticed an increase of 3-10%. If you like how it works, I will probably further tweak it to reduce the load.

The script, as it is, assumes the secundary windows are of the same class as the main window, like you indicated in a comment. With a (very) simple change, the secondary windows can be of another class however.

Explanation

Although probably not very interesting for an average reader, the script works by calculating in vectors. On startup, the script calculates:

the vector from the origin to the current workspace with the output of wmctrl -d
the vector to the application's window, relative to the current workspace, by the output of wmctrl -lG
From these two, the script calculates the absolute position of the application's window on the spanning desktop (all workspaces in one matrix)

From then on, the script looks for new windows of the same application, with the output of xprop WM_CLASS, looks up their position in the same way as above and moves them to the "original" workspace.

Since the newly created window "stole" the focus from the last used window the user was working on, the focus is subsequently set to the window that had focus before.


How I can make GUI of Netbeans look darker?

You can install "Dark Nimbus Theme" from Tools - Plugins - Available Plugins.
Not as dark as your eclipse, but perhaps what you're looking for.


Brightness is too much and I can't control it

When using a desktop, it is usually not possible for Ubuntu to change the brightness. You have to use the brightness buttons on your monitor.


a question about kernel updates, ubuntu 12.04

we run behind(Ubuntu) on upgrading our kernel

Sort of. From Ubuntu repositories you'll be getting only those kernels that have been adjusted to fit the distribution and undergone testing by Ubuntu stuff, not vanilla kernels as available at http://kernel.org.

As can be found here:

  What differentiates the Ubuntu Kernel from the upstream Linux Kernel?

  With every Ubuntu kernel release, we attempt to remain as true to the upstream Linux kernel as possible. However, there are inevitable patches which we carry on top of the upstream Linux kernel which differentiates the Ubuntu kernel from the upstream Linux kernel. This document attempts to describe the general set of patches which are carried and why:

  /Kernel/FAQ/UbuntuDelta

Moreover, as it can be observed, you'll stay on 3.2.0 unless you upgrade - you'll get updates and backports for this version only.

If you are interested in building your custom kernel - here is a place to start: https://help.ubuntu.com/community/Kernel/Compile


Why is "LANG=C;sudo apt-get clean" etc recommended?

If you're troubleshooting, you'll likely post your results in some forum, or here, sooner or later.

When that happens, it's much more simpler for other users to understand your logs and output, if they're not internationalised.

That's to say, if you're using French or Chinese or Hindi or whatever as your system language, the output is likely to use terms in that language, and that makes it all the more harder to understand what's going on.

The C locale forces default output (which is typically ASCII-only English).

It's best to start a troubleshooting session with:

export LC_ALL=C

Instead of setting specific locale variables, or setting it just for a specific command.


Unmet dependencies when trying to install Ansible on Ubuntu 18.04

I guess you considered the installation guide from docs.ansible.com

$ sudo apt-get update
$ sudo apt-get install software-properties-common
$ sudo apt-add-repository --yes --update ppa:ansible/ansible
$ sudo apt-get install ansible

Ubuntu 18.04 LTS would now return, sshpass cannot be installed.

To solve this issue, you need to add the Universal Repository, which is one of the main Ubuntu repositories:

Main - Canonical-supported free and open-source software.
Universe - Community-maintained free and open-source software.
Restricted - Proprietary drivers for devices.
Multiverse - Software restricted by copyright or legal issues.

To do this via Terminal:

$ sudo add-apt-repository universe
$ sudo apt-get update

Eventually, rerun the command to install the Ansible package:

$ sudo apt-get install ansible
$ ansible --version
  ansible 2.7.0


Working Ctrl+X and Ctrl+V, but not Ctrl+C, in ALL apps

Check your keyboard shortcuts. There may be an incorrect setting.


The general procedure for changing build options for an Ubuntu/Debian package goes like this:

Get the build dependencies
Download the source package
Change the appropriate files (usually debian/rules)
Build the packages
Install the packages

The commands involved:

sudo apt-get build-dep graphviz
apt-get source graphviz
cd graphviz-* # Or check the directory with ls and pick the correct version

Then you can delete the configuration option from debian/rules, either using an editor, or:

sed -i '/--without-gts/d' debian/rules

This command is specific to this instance, as there is only one match for --without-gts in debian/rules.

Then build the package:

dpkg-buildpackage -us -uc

This will create a bunch of packages in the parent directory. The options indicate the you don't wish to make a package for uploading to the Ubuntu repositories (and so don't want to sign them, etc.). Now you can install these packages:

sudo dpkg -i ../*.deb # or pick out the packages manually

The build dependencies may be different from the installation dependencies, so to install all the dependencies you might need to run:

sudo apt-get install -f


How to access a synced folder from another PC?

If you are already syncing a folder on Computer 1 with Ubuntu One, you can easily add that folder on Computer 2 with the Ubuntu One app.

Open it and click on the 'Cloud Folders' button. You should see the ~/.local/share/gnote folder from your question there.

Make sure you are seeing all the folders by clicking the small black triangle next to 'My Folders' to expand the list.

This assumes you have already added it on Computer 1, and that at least one sync has occurred. I seem to remember that Ubuntu One may not support symlinks, nor folders outside /home, so watch for that if you have problems.

I can't find any documentation specific to hidden files, but this related question seems to indicate it's possible.

I'm also scratching my head wondering how this isn't an exact duplicate, but I can't find this same question on Ask Ubuntu right now. It's a good question anyway.

For completeness, here is the answer to your question on the Ubuntu One tutorials page, here is the main tutorials page, and here is the FAQ page. Hope this helps and post an update to your question if it doesn't, and I will adjust the answer.


I made similar observations with the system partition (Lubuntu 14.04) on a USB drive (rather than a live system). It's not without problems unfortunately.

Many USB sticks (USB2.0 in particular) are quite slow with writing, and even if they have a decent speed when writing large files, some might become very slow with scattered writes of small blocks (with ext4 filesystems many 8k blocks are written). What happens then is that the system's write queue gets congested and applications are stuck waiting for a long time for their writes to finish (that's the state shown as "I/O wait"), even when they were only writing a few bytes to a logfile. When this happens to e.g. the panel app, the entire desktop may "freeze".

What helped somewhat was disabling the disk cache in firefox, and other things that might write to disk a lot. In a standard system unfortunately a lot of stuff is writing to disk all the time.

I investigated this using "iostat -x 1" (shows the state of disk I/O in general) and "iotop". The latter hels with identifying processes that write to disk a lot.

I also played around with different disk schedulers and their settings, but it didn't really help a lot so I won't get into detail here.

I actually had two cheap(ish) USB 3.0 drives that died from this kind of use after a few months or a year, apparently they are not made for being written to a lot (flash memory will wear out from a lot of writing, in particular if the filesystem is not optimized for flash).

The only thing that really helped was getting a good high-quality USB drive that can support the write load. What you want to look for in particular is decent write performance (at least several MB/sec) for small (8K) block sizes. I'm now using a SanDisk Extreme USB 3.0 32MB, stick which apparently uses an SSD controller - so much more sophisticated optimization/wear leveling and better write performance than the usual USB drives. It also has some limited SMART support, so at least it won't fail without warning if you have an eye on it.
They are usually quite expensive, but I found some relatively cheap 'refurb' ones on chinese ebay. Not intending a commercial plug here, there are probably others with similar performance.

Another option might be to use f2fs ("flash friendly file system") on the system partition, but I have not tried or investigated this.