Lumping Debian and Ubuntu together is slightly strange. They are similar but not quite the same.

a2enmod is a script unique to the Debian based distros. Essentially a2enmod cgi looks for files called cgi.load or cgi.conf and symlinks them from /etc/apache2/mods-available for available modules, to /etc/apache2/mods-enabled for enabled modules. You may need to restart apache after this.

vi is a text editor. People prefer it cause you almost always have vi on most systems. nano is a better option for a new user - its simpler and doesn't have some of the quirks vi does.

Personally if you're unsure what you're doing, I'd recommend starting with sudo cp /etc/apache2/apache2.conf /etc/apache2/apache2.conf.bak - so if you mess up, you have a known good copy of apache's config

Since this is Ubuntu and not Debian, you will want to invoke it with sudo nano /etc/apache2/apache2.conf. Ubuntu definitely has nano. Nano works a lot more like any other text editor you're familiar with. You need sudo cause I suspect the Debian instructions assume root is in use, Ubuntu has no password for the root account and sudo is the right way to do it. It elevates permissions just to run the command more or less, which is more secure.

I'm connected over putty and copy/paste works (and if you're new, connecting via ssh  from a gui enabled terminal is smart). Copy and paste these lines to the end of the file, ctrl x exits, prompting you to save. Save, restart apache, and carry on


Mouse arrow disappear after computer wake up from suspend mode in ubuntu 13.10

Running this solved the issue for me:

$ gsettings set org.gnome.settings-daemon.plugins.cursor active false

If that doesn't work for you, then you can try running these commands as a workaround:

$ sudo modprobe -r psmouse
$ sudo modprobe psmouse


KDE workspace gone after update 14.04 LTS

I assume that accessing the network enables you to re-install the needed packages, so maybe that fixes your problem.

First, disable network-manager for the running session:

sudo service network-manager stop

Next, try to bring up your network ethernet device (wlan is much more complicated on command line) and fire a dhcp client:

sudo ifup eth0
sudo dhclient eth0

If everything works fine you might have an address now and can reinstall everything you need via:

sudo apt-get install --reinstall kde-workspace lightdm-kde-greeter


Trying to get two websites on one server and ip

First of all I got rid of the redirects as they were irrelevant.

Now I use ServerAlias
I also use DirectoryIndex
I set them up in different virtual hosts on same port using wildcard entry

Enabled all three and now it works.


Windows 10 (UEFI) on the first disk drive/ Ubuntu (Legacy) on the second disk drive

If you install in Legacy, then the only way you can dual boot is from UEFI boot menu, not from grub. UEFI & BIOS write info to drive for booting differently so you cannot change once started.

Still use gpt on Ubuntu drive. Ubuntu can boot from gpt partitioned drives with either UEFI or BIOS. I would still add an ESP - efi system partition (FAT32 300 to 500MB with boot flag) as well as required bios_grub (1 or 2MB with bios_grub flag). Grub than can be installed for either UEFI or BIOS boot.

UEFI/gpt partitioning in Advance (only missing bios_grub partition):

How to prepare a disk on an EFI based PC for Ubuntu?

Then if later you can resolve issues you can convert to UEFI without totally partitioning. You do need to partition in advance, boot installer in BIOS mode, and then use Something Else install option. Just be sure to install grub boot loader to MBR of Ubuntu drive.

Only real difference between UEFI & BIOS is grub. UEFI uses grub-efi-amd64 and BIOS uses grub-pc. So probably something between UEFI/BIOS write of data to drive and drivers in UEFI. You can later reinstall grub in UEFI mode with no changes to system if you have ESP.

Do you have latest UEFI from vendor? That often can be an issue. Or you may just need a boot parameter. What brand/model system?


How to skip php 8 libs installation during installation of phpmyadmin

To use PHP 5.6 you have to download phpmyadim 4.9.7. You can download it with wget https://files.phpmyadmin.net/phpMyAdmin/4.9.7/phpMyAdmin-4.9.7-all-languages.tar.gz.


Position the cursor at the beginning of the character from which you want to copy. Press Alt+Shift+A to set mark.  ( Alternatively, set mark with Ctrl+6 )
Use arrow keys to highlight the text to copy.

Use Alt+Shift+6 to copy (Alternatively, Alt + 6 )
Navigate to the place you want to paste. Release paste with Ctrl+U

Where is reference to these keybindings

All of these are defined under the documentation, which you can access with Ctrl+G at any point. Note that leading ^ stands for Ctrl and M for Alt in the documentation, since this is traditional way of Unix defining meta characters. Lines from documentation:

  ^^    (M-A)     Mark text starting from the cursor position

and

  M-^   (M-6)     Copy the current line and store it in the cutbuffer


Pros and cons of installing Ubuntu alongside Windows Boot Manager

On a personal note, I would recommend you to stick with Something else option only. The reason is - I have personally messed 4 laptop hard disks simply because I failed to understand the right process.

Choosing Install alongside Windows boot manager is safe, but please do take note of everything to avoid messing your hard disk. If you are in any doubt, stick with Something else option only.

You can take help of this link dual boot windows and ubuntu if you want to perform every step with utmost caution.

Once you are done installing Ubuntu, perform the following steps to setup your grub menu:

Boot into Windows OS
Combine Windows + r together and type cmd to open command prompt.
Type bcdedit /set "{bootmgr}" path \EFI\ubuntu\grubx64.efi and hit enter key

P.S - You do not need to have admin rights on command prompt before you perform the above action.


Another good option is mysql-workbench. It can easily be installed using apt-get (the third command will do, yet I prefer to update and search first):

sudo apt-get update
sudo apt-cache search mysql-workbench
sudo apt-get install mysql-workbench

Then you can just type mysql in the HUB and voila.

It works like a charm. There is also a download from their website, yet that gave me in 12.10 a dependency error (the download is for 12.04 so that might explain it).

Others have also referred to: druid and DBDesigner. There is also another post on DB design on superuser.com.


I believe running the following commands should fix the issue.

First, press CTRL + T to open a terminal window.

Next, type the following command in the terminal, press enter, type in your password when you are asked to do so and then press enter again.

sudo apt-get update

Then, do the same for the next command and type Y and press enter to accept the changes so long as it doesn't mention removing anything:

sudo apt-get install lm-sensors tp-smapi-dkms tpb

Finally, run the following command and follow the given on screen instructions (type yes and then press enter to accept each of the prompts):

sudo sensors-detect

You may need to reboot for the changes to take effect and you should also have more accurate hardware temperature readings as a side result.


fdisk output is differ from gparted for my USB Stick

The output is correct, what you are missing here is that partition type is differ from a partition's file system.
What you see in fdisk output is partition type and gparted is showing you the filesystems.
To see filesystems of your USB and get a better look you might want to use lsblk"
lsblk -o name,fstype,parttype /dev/sdb

which should give you somthing similar to:
NAME           FSTYPE   PARTTYPE
sdb
├─sdb1         fat32    0xc
└─sdb2         ntfs     0x7

And the hex code you are observing here simply is the partition type.
For example 0x64 and 0x65 means Novell Netware.
From: What's the difference of partition type and filesystem type?

Partitions are nothing more than entry’s in a partition table stored on the hard drive and this table sets the boundary for the start and the end of the partition on the drive and holds some useful information about the partition including its type.
File systems are a way of storing data inside the partitions in a fashion that is easy to manage and read and write data to it. Some do it better than others.
A partition entry in the partition table will need a partition type to help the Operating System know how to handle the partition.


Ubuntu 15.10 freezes on purple screen with orange/red dots and the word "ubuntu"

Highlight Try Ubuntu without installing - press the E key.
Add nouveau.modeset=0 to the end of the linux line.
Press the F10 key to boot into the Live desktop.

Click on Install Ubuntu and start the installation.
When finished, reboot into the installed system.
First of all install the proprietary NVIDIA drivers.

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

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

Open a terminal and execute :

sudo apt-get update
sudo apt-get install nvidia-352 nvidia-prime
sudo reboot

Now you don't have to add a parameter anymore ...


Suddenly only 'snap' directory is visible in root

You are in the home directory of user root, which is /root. Use pwd to check your current directory.


Ubuntu 14.04, 13.10 and 13.04 have terribly slow graphic performance

The Atom™ line of CPU's with the integrated Cedarview graphics are rather pathetic in terms of performance. I've used my Acer D270 netbook with 15.04 and it functions but I've never enjoyed the experience. (I'd rather use an I3 any day of the week). I would agree with @bodhi.zazen that moving to lubuntu or xubuntu would provide a far more acceptable experience. Since it's a netbook with integrated graphics upgrading the graphics card isn't an option in this case.

Sources: Experience,
ARK


Enable/Disable Passwordless Login/Autologin Via GUI/Command Line

I honestly don't know the difference. I'm not sure I've seen the phrase "passwordless login" where I haven't just assumed they're talking about auto-login.

For machines that use LightDM (11.04 up) you can add a user to the configuration in /etc/lightdm/lightdm.conf using the autologin-user variable so the file ends up looking something like this:

[SeatDefaults]
autologin-guest=false
autologin-user=oli
autologin-user-timeout=0
autologin-session=lightdm-autologin
greeter-session=
user-session=ubuntu

That gives you a screen where that user (oli in this case) is logged in automatically after a few seconds. If you want to alter that timeout so it happens more quickly , you can play around with the autologin-user-timeout variable in the same file.


Everything is good, you can ignore the problem, that's a bug. Your command has caused no harm.

The "problem" was this, and that's ok in your case:

softwareproperties.ppa.PPAException: 'Error reading https://launchpad.net/api/1.0/~team-xmbc: Not Found'

in:

Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 119, in <module>
    shortcut = shortcut_handler(line)
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 837, in shortcut_handler
    ret = factory(shortcut)
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 382, in shortcut_handler
    return PPAShortcutHandler(shortcut)
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 346, in __init__
    info = get_ppa_info(self.shortcut)
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 333, in get_ppa_info
    _get_suggested_ppa_message(user, ppa))
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 292, in _get_suggested_ppa_message
    lp_user = get_info_from_lp(LAUNCHPAD_USER_API % user)
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 87, in get_info_from_lp
    return _get_https_content_py3(lp_url)
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 107, in _get_https_content_py3
    raise PPAException("Error reading %s: %s" % (lp_url, reason), e)
softwareproperties.ppa.PPAException: 'Error reading https://launchpad.net/api/1.0/~team-xmbc: Not Found'

Here is the bug report.


Kazam did not ask to save my recording and now it is lost

2 possibilities:

If you have set in File> preferences > screencast, automatic File saving to ON, it will be saved in the folder that you've chosen.
By default it's in ~/Videos but maybe you've changed it.
if not, at the end of the recording, kazam asks you save for later and then let you choose the destination folder.

Remark: There's a bug about the custom destination folder. Each time you relaunch kazam, the destination folder is reset to the default ~/Video even if you've changed it before.


Unable to run javac though java is working

You are probably having jre installed, since java -version is working. You will be able to execute java class programs with java. However, to compile java programs, you will need jdk, as Nattgew suggested. You can install openjdk from the software center or from the terminal using:

sudo apt-get install openjdk-7-jdk

or if you need Oracle's jdk, see this question:

How can I install Sun/Oracle's proprietary java jdk 6/7/8 or JRE


This is usually caused by the overwriting or deletion of the MBR/GRUB, which tells the computer where the OS' are and where to boot them from.

If you have been partitioning you probably overwrote the GRUB files, something that is commonly done. I did it myself once.

The fix depends on if you have an OS installed yet.

If you do:

Boot a LiveCD/USB and run GRUB Boot Repair. If you google it, tons of results will come up, several being tutorials.

You can download an ISO with it included here: http://sourceforge.net/p/boot-repair-cd/home/Home/ or download/install it in the Ubuntu LiveCD. If you are using the Ubuntu LiveCD, read on. If you are using the ISO with it included, jump ahead to step 2, explaining the repair process.

1 How to install boot-repair in the Ubuntu LiveCD:

  boot your computer on a Ubuntu live-CD or live-USB.
  choose "Try Ubuntu"
  connect internet
  open a new Terminal, then type:

  sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get
  update

  Press Enter.
  Then type:

  sudo apt-get install -y boot-repair && (boot-repair &)

  Press Enter

2. How To Run Boot-repair:

Once you have it, to fix the boot record, run it like this:

  Recommended repair

launch Boot-Repair from either :
    the Dash (the Ubuntu logo at the top-left of the screen)

    or System->Administration->Boot-Repair menu (Ubuntu 10.04 only)
    or by typing `boot-repair` in a terminal

Then click the <kbd>Recommended</kbd> repair" button. When repair is finished, note the URL (paste.ubuntu.com/XXXXX) that appeared on a

  paper, then reboot and check if you recovered access to your OSs.
      If the repair did not succeed, indicate the URL to people who help you by email or forum.

If there is no OS installed, just install a new Ubuntu installation! This will write new GRUB files and it should get rid of this error!


How can I get a numlock notification like the volume notification in Gnome 3?

To display a notification like the volume one in Gnome 3 you can use gdbus (dbus-send won't work because it can't pass function parameters of type a{sv} (array of dict{string:variant}))

With gdbus the volume notification looks like this:

gdbus call --session --dest 'org.gnome.Shell' --object-path '/org/gnome/Shell' --method 'org.gnome.Shell.ShowOSD' "{'icon': <'audio-volume-high-symbolic'>, 'label': <'Line-Out'>, 'level': <90>}"

So for something like Numlock on notification you'd use:

gdbus call --session --dest 'org.gnome.Shell' --object-path '/org/gnome/Shell' --method 'org.gnome.Shell.ShowOSD' "{'icon': <'input-dialpad-symbolic'>, 'label': <'Numlock On'>}"

Icon names are the names of the icon files from the icon theme in use without the extension. Icons themes are located in /usr/share/icons/ or ~/.icons/. So for the /usr/share/icons/Adwaita/scalable/devices/input-dialpad-symbolic.svg you'd use 'input-dialpad-symbolic'. You can also specify icon by it's full path like '/home/user/.icons/Icon-Theme-Name/devices/symbolic/input-dialpad-symbolic.svg' if it's not in the icon theme in use.

The way I discovered this is by looking at dbus calls by using dbus-monitor. When I lowered the volume it printed this:

method call time=1563905341.664155 sender=:1.34 -> destination=:1.8 serial=149 path=/org/gnome/Shell; interface=org.gnome.Shell; member=ShowOSD
array [
  dict entry(
     string "icon"
     variant             string "audio-volume-high-symbolic"
  )
  dict entry(
     string "label"
     variant             string "Line Out"
  )
  dict entry(
     string "level"
     variant             int32 94
  )
]

destination=:1.8 seems to be the same as org.gnome.Shell so both --dest ':1.8' and --dest 'org.gnome.Shell' work.


Can't run VMware Workstation player on Ubuntu 17.04 due to gcc-7.1 problem

I managed to get past the gcc problem (which is now at 7.2.0). I used the steps here, modifying them for gcc-7.2.0. (This is for 64bits system)

So, download the GCC 7 source and prerequisites from here

cd ~
wget http://gcc.parentingamerica.com/releases/gcc-7.2.0/gcc-7.2.0.tar.xz
tar xf gcc-7.2.0.tar.xz
cd gcc-7.2.0
contrib/download_prerequisites

We will install the compiler in /usr/local/gcc-7.2, as not to mess with the default compiler, as this might break your system.

cd ~
mkdir build && cd build
../gcc-7.2.0/configure -v --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --prefix=/usr/local/gcc-7.2 --enable-checking=release --enable-languages=c,c++,fortran --disable-multilib --program-suffix=-7.2

Then we build the thing with

make -j 8

where we have specified that we want 8 threads to work on the job at the same time. The reason for this is that I have 4 cores that are hyperthreaded (they can each process 2 threads at the same time). Adjust this according to your setup. This step takes a lot of time - took me around 30 minutes on a decent laptop. Once the above is done, install the compiler

sudo make install

Now we jsut have to tell our system to use this compiler. I didn't do what is advised in the guide that I have linked at the top, instead I followed this in order to set up an alternative compiler by doing

sudo update-alternatives --install /usr/bin/gcc gcc /usr/local/gcc-7.2.0/bin/gcc-7.2 50 --slave /usr/bin/g++ g++ /usr/local/gcc-7.2.0/bin/g++-7.2

And then selecting the alternative compiler, using

sudo update-alternatives --config gcc


Upgrading to Ubuntu 16.04.2 LTS from live USB fails

Got the same issue from 1 year now on my Inspiron 5567 Kaby Lake 7500U.

The secret to install Ubuntu/Debian/any linux distrib on new Inspiron 5567 Kaby Lake is here: you need to create a special boot setup.

For a dual boot with a Windows 10 preinstalled :

Burn your iso with Rufus (mostly GPT mode for laptop after 2013, config autoselected by default in Rufus. Change to MBR if the pc is older),
Go in your USB key and enter the EFI  and please notice the name of the files here...as grubx64.efi (unsecure boot) or shimx64.efi (secure boot). You will need this info later.
Restart the PC with the USB plugged in. When the Dell logo appears, hit F12 till you see the boot menu. If you can see your USB key here, don't select it. First, enter the BIOS by selecting bios setup.
Go on Boot Sequence, you need to ensure the BIOS is set to UEFI, disable Legacy option ROMS and check that secure boot is enabled on the Secure Boot Enable line.
Now the most important operation... come back to Boot Sequence (General menu on the left)

click on Add Boot Option. The Add Boot Option window will pop up. Type a name in the Boot Option Name text area ("Ubuntu", for example).
Click the button to the left of the File Name text area. The EFI Boot Selection window will pop up.
In the File System drop down menu choose FS0: and EFI. Then using the directories section, navigate until you can choose SHIMx64.EFI (for Ubuntu only - for other distros use grubx64.efi or grubx.efi if your PC is not amd64, anyway it will be named grubxxxxx.efi) in the Files section.

A new boot option will now appear on the top and in the boot menu. Save and exit
The pc will now restart, when the Dell logo is coming, press F12 again, till the boot menu appears. Select the name you entered in the previous step (NOT the USB key)
The GUI installer will come up and you can run it

If it does not work for you exactly like this, try disabling secure boot in the BIOS.


How do I install Ubuntu on laptop with broken screen

It is possible. I did this once with a laptop of a friend (he wanted to use his laptop which had a broken graphic card as a server, he has used it for a year as a minecraft, irc, plex, owncloud and subsonic server). The final way to install ubuntu was to remove the hard drive, insert the hard drive into another laptop, install ubuntu and then put the hard drive back again. Before you put the hdd back, you should install openssh-server. After you put the hdd back, you can control your laptop remotely (google for putty/xming if you're using windows or type ssh -X username@lan-ip-address in a terminal on a linux pc).


Linking error when trying to compile on a shared drive

This happens, because vfat type filesystems don't support symlinks. Mount flags won't change this situation.

I'm not familiar with CMake, but I suppose you are using some kind of rule in your makefile that is telling CMake to make a symbolic link to lib/libopencv_core.so.2.4.3, which fails.


If the image you set as wallpaper resides in partition other than the ones that are mounted automatically when Ubuntu starts, then your wallpaper is sure to be reset as the file cannot be opened and read since it does not mount the partition on its own(may be a bug).

Usually, partitions other than ext partitions(/, /home, /boot, etc.) are not mounted at boot time. You may name a thousand exceptions!

To set the image as wallpaper, copy the image to your "Home" folder and then set it as your wallpaper.


It is possible to 'switch' (see Install page), but I would recommend doing a fresh install of Trusty (14.04) beta. If you are trying to keep all data, then you need to backup (and not rely on conversion).

wiki.ubuntu > Touch > Instructions for flashing phone/tablet

I have the new 14.04 beta (build 209), based on AOSP 4.4.2 source code, running on my Nexus 4.


If you have a £ above the 3, a € symbol on the 4, a # and a ~ to the left of the carriage return (enter) button and a \ | key to the left of the Z then it's a UK keyboard.

If you have a # above the 3, a \ next to return then it's likely a US layout. If it's not one of those, it's probably a Swiss keyboard, since Logitech is a Swiss company.

If none of these options work, then upload a picture of it.

Edit: From the picture, yes. That is an Hungarian keyboard. If there are more versions of the Hungaria layout, it's probably the simpler one.
If you go to System Settings > Keyboard > Text Entry > The keyboard button at the list, you can see how the keyboard is supposed to look.


Compiz Put Stopped Working After Upgrade

Not the actual solution, I found a way around it was to add <Control> to the key-bindings, to avoid the binding conflict with the launcher.  It'd still be nice to know how to fix this, through.


Well make sure openssh-server is installed. If installed already try reinstalling as follows :

sudo apt-get remove --purge openssh-server
sudo apt-get install openssh-server

For Ubuntu 16.04 LTS , there isn't any issue with 4.4 kernel and Linux kernel 4.6 is also compatible as well. If you still have the problem then I recommend you to upgrade your kernel or recompile your kernel.


When you open a bash terminal it loads the content of ~/.bash_history and builds the active shell's history (in the RAM), adding every command executed in that shell to it – and only to it, not to the file.
Only when you close a bash terminal its history is appended to your ~/.bash_history file.

Options of history:
history -a # save the active shell's history to ~/.bash_history (appending)
history -c # clear the active shell's history
history -d NNN # delete row NNN of the active shell's history
history -r # reload the active shell's history from ~/.bash_history (appending)
history -w # save the active shell's history to ~/.bash_history (overwriting)

Options for ~/.bashrc file
If you want to change this behaviour so that the temporary history is saved to ~/.bash_history directly after executing a command, add this line:
PROMPT_COMMAND="history -a"

If you additionally want every terminal to automatically load the ~/.bash_history file after every command execution, add this line instead:
PROMPT_COMMAND="history -a; history -c; history -r"

If you want to exclude certain commands (e.g. everything beginning with sudo and cat) from being saved, add this line:
HISTIGNORE="sudo*:cat*"


for ubuntu machines, you just need to setup an apt repository and add it to the software sources on all machines. then all the ubuntu users can install your software and get updated when you update your software in the apt repository.

  see How to set up an APT repository? for more details.

alternatively, you can just use the launchpad PPA service.

  see https://help.launchpad.net/Packaging/PPA for more details on how to register a lauchpad account and publish your software through a PPA.


MongoDB ServerSelectionTimeoutError: No replica set members available for replica set name "abc"

I have solved my own problem.

It turns out that, in order to change what database I run code against, I need to do the following:

Kill all ssh sessions on Vagrant, to close any existing tunnels.
Stop the local mongod service:  service mongod stop
If opening a new tunnel:  execute the desired ssh command on Vagrant to create the desired tunnel.  If connecting locally, do nothing.
Restart mongod:  service mongod start

And now my code will connect without errors.

It may be that there's a better way to achieve this, but this allows me to do what I wanted to do.


How to modify Unity windows snapping shotcuts

You can do this in CompizConfig Settings Manager (ccsm) under Window Management -> Grid -> Put Left/Right


Netplan.io failed to start LSB: Netplan Calender Service

It's confusing but netplan is different than netplan.io  netplan is some calendar and day planner whereas netplan.io is the package that configures your network interfaces.  Your error is the day/calendar planner.
You should be able to ignore (and remove) netplan unless you actually want to use it.


Remmina Problem: A valid certificate for the wrong name

I copied the .remmina files back over when upgrading from 11.10 to 12.04

I found that this is happening only on Windows 2008.  Possibly a RDP6 issue.

This was solved because security somehow got reset to 'Negotiate'. I changed Advanced/Security to 'RDP', and all is working again.


Partition cannot be unmounted "Volume is busy" on Ubuntu 18.04.1 . Offending process - jbd2/sdb4

This just happened to me today. I used this command to figure out which process was keeping the drive busy.
fuser -vm /mnt/dir
This command needs to be run as root.

I found the solution here: https://unix.stackexchange.com/questions/107885/busy-device-on-umount/107887


Open your terminal and type this

 sudo dpkg -i --force-overwrite /var/cache/apt/archives/thunderbird_14.0+build1-0ubuntu0.12.04.1_amd64.deb


Install wmctrl and then run wmctrl -m. According to the man page:

   -m     Display information about the window manager and the environment.

For my system, I see:

$ wmctrl -m
Name: Openbox
Class:
PID: N/A
Window manager's "showing the desktop" mode: OFF
$


Ubuntu Studio LVM password entry box missing

I developed that plymouth theme (it's forked from Xubuntu) and the original author had no box for LUKS encryption. I use LUKS encryption myself, but never needed more than the actual text to prompt me.

FYI, this theme is likely to be replaced in future versions of Ubuntu Studio. I'll probably backport the new version.


Can we install Xcache 2.0 or 3 on Ubuntu 12.04?

xcache 2.0.0-2 is backported for precise by blubolt team.

You can download the .deb files from here

Alternate way to get 2.0.0-2 is to add the blubolt preciseplatform PPA

deb http://ppa.launchpad.net/blubolt/preciseplatform/ubuntu precise main
deb-src http://ppa.launchpad.net/blubolt/preciseplatform/ubuntu precise main

For more information https://launchpad.net/~blubolt/+archive/preciseplatform


How to copy (or move) a file to a folder that is not existing while i am performing the copy (or move) operation?

you can use the install command given file or a full directory to a given location.

install -D sample.txt /path-to-create/sample.txt

for your case

install -D path1/batman.py path2/batman.py

If path2 doesn't exist then it will create it

In case of moving there is no single command to do that so you should use mkdir and mv to ensure that.

But you can make this simple trick.

create a function

mkmv () {
  mkdir -p "$2"
  mv "$1" "$2/$1"
}

Now add this function to your .bashrc

after that run the command

source .bashrc

Hot to use the command?

After adding the function to .bashrc you can easily use the command in your termianl

mkmv batman.py path2

$1=batman.py

$2=path2

Now if path2 doesn't exist then it will create and then move the file inside


No bootable device error message on UEFI after installation

In my case some UEFI params needed to be set in the BIOS. I followed these instructions:

https://itsfoss.com/no-bootable-device-found-ubuntu/

Here is a short description of the steps.

Step 1: Go to BIOS (with F2)

Step 2: Turn ON Secure Boot (You might need to set BIOS password before doing this)

Step 3: Select an UEFI file as trusted for executing: HDD0 -> EFI -> ubuntu -> shimx64.efi

Step 4: Add a description and confirm. Save BIOS settings and reboot.

BTW, later I discovered that when Secure Boot is turned ON that Linux won't recognize WiFi hardware, so I needed to turn it OFF.


Correctly setup apache virtual hosts with multiple users

Since question is the top search result in google when asked "apache virtual host separate user", I'd like to give a more elaborate answer based on this answer. My answer does not cover the usecase of PHP and CGI (you would use suPHP). It focuses on PHP when used as an apache module.

You can use the apache module apache2-mpm-itk. It is available for the current version of apache 2.4. It comes with the directive AssignUserID. This directive defines the user and group a virtual host's request is handled with. This is an example of the apache site configuration I ended up with:

<VirtualHost *:80>
ServerName www.site1.com
DocumentRoot /home/www/site1.com
AssignUserID site1 www-data
php_admin_value open_basedir /home/www/site1.com
...
</VirtualHost>

Of course, this does only improve security as long as the individual DocumentRoots are owned by their respective users and are not group accesible.
For further PHP-related security, scripts are jailed in the DocumentRoot with the open_basedir restriction.
As for the backend file access, I prefer SFTP with chroot.

Note: apache2-mpm-itk is currently incompatible with Apache's http2 module.


How to prevent a file under user folder to be deleted?

It is possible to make a file impossible to delete, even from root, on an ext2/3/4 filesystem, changing a file system attribute of the file:

$ cd
$ touch dummy
$ sudo chattr +i dummy
$ rm dummy
rm: remove write-protected regular empty file `dummy'? y
rm: cannot remove `dummy': Operation not permitted
$ sudo rm dummy
[sudo] password for enzotib:
rm: cannot remove `dummy': Operation not permitted
$

More information on chattr and lsattr manual pages.

If later you want to delete the file you should use

sudo chattr -i dummy

before using rm.

There are two drawbacks to this:

you have to be root to change
attributes;
you can forget about the attributes of that file or the way to change them, so that it seem you cannot delete the file anymore.


Is there any software that will do face recognition in photos?

Digikam

(...will in the next release, very soon. there may be a beta/development version that does now. please read:)

"Aditya Bhatt added face detection and recognition to digiKam. He says: 'Because of my project, digiKam can now automatically detect faces in photographs. It allows you to tag these faces with People Tags, and can also identify unknown faces and automatically tag them. My work also introduced a wrapper library called libkface that can be used by other KDE apps. Right now everything works okay, but it needs a bit of usability and GUI work, as well as some tweaks to libkface. Hopefully my work will make it in time for the Christmas release, which will be 2.0!'"

this is taken from the latest google summer of code update on kde.org, here:
http://dot.kde.org/2010/12/14/kdegoogle-summer-code-2010-part-1-2


How to remove icons/shortcuts from Unity menu?

It seems that you can't remove apps from the Dash, however you can manage your launchers (*.desktop files) in one of the following directories:

/usr/share/applications
/usr/local/share/applications
~/.local/share/applications

If your launcher file is in any of the first two directories, you will require root permissions to remove it.


Strange popup - Keyboard stops working and mouse can't be held

Had a similar issue on my new ASUS R500A, with keyboard stopping and the mouse no longer being able to click (moving and hovering still worked) in X. Ctrl-Alt-Fn still worked, and I could open a shell from a terminal screen.

I too did stumble into a media key that showed that same "blocked" icon, but I couldn't relate that to the problem. I have no steps to reproduce.

I have the same Ubuntu version running on an older HP laptop for quite some time now and never saw that before.


I've been having this problem. I couldn't find a decent fix, but I have this work around. Note that it's a horrid hack but it does the job for me until the root problem is fixed -- hopefully it will help someone else. Every 5 seconds it checks dmesg for HDMI connection errors and if it finds one it restarts the connection.

I made this watchdog script -- replace "DFP1" with the name of your output (get it from xrandr).

#!/usr/bin/env python
import os
import time

valid = "ELD_Valid=1"
invalid = "ELD_Valid=0"

def executeCommand(the_command):
    temp_list = os.popen(the_command).read()
    return temp_list

def getDMESG():
    return executeCommand("dmesg | grep -i hdmi | tail -n 10")

def needsRefresh():
    list = getDMESG();
    valid_index = list.rfind(valid)
    invalid_index = list.rfind(invalid)
    if invalid_index > valid_index:
        return True
    else:
        return False

def doTest():
    if needsRefresh() == True:
        os.popen("xrandr -display :0 --output DFP1 --off; xrandr -display :0 --output DFP1 --auto").read()

while True:
    doTest()
    time.sleep(5)

If anyone knows a better way to detect the error (with catalyst drivers), please let me know. (With the opensource drivers I think you could trigger the reset bit of the code on drm acpi events if you wanted to do some scripting).

I start it by adding this to /etc/rc.local: (change "xbmc" to the user name that you log in as)

su xbmc -c 'python /home/USERNAME/src/check_hdmi.py &'


Is Ubuntu branding with other Linux Distro logos OK?

If it's non-commercial, no problem. The trademark policy should allow this. If there's any doubt, you can email your plans to Canonical and you'll get a straight answer in writing. Here's the relevant extract:

Community advocacy. Ubuntu is built by, and largely for, its community. We share access to the Trademarks with the entire community for the purposes of discussion, development and advocacy. We recognise that most of the open source discussion and development areas are for non-commercial purposes and will allow the use of the trademarks in this context, provided:

the Trademark is used in a manner consistent with the Usage Guidelines below
there is no commercial intent behind the use
what you are referring to is in fact Ubuntu. If someone is confused into thinking that what isn't Ubuntu is in fact Ubuntu, you are probably doing something wrong
there is no suggestion (through words or appearance) that your project is approved, sponsored, or affiliated with Ubuntu or its related projects unless it actually has been approved by and is accountable to the Ubuntu Community Council

To keep people at Canonical happiest, you could adhere to the branding guidelines here:

http://design.canonical.com/brand/B.%20Complete%20Ubuntu%20brand%20guide%20-%20November%202010.pdf

They are design guidelines so aren't legal-issue-aimed but you'll find out the way Canonical wants things branded. For the Ubuntu Logo, you want page 38 onwards. You'll see how much space you need to give it and what you are allowed to do in the way of editing it (not much!)


How do I scan a SD Memory Stick from my Phone and recover accidently deleted photos?

You can use Photorec to recover the images. Run with no arguments and follow instructions, it should guide you step by step

sudo photorec

I would suggest following the guide here   https://help.ubuntu.com/community/DataRecovery#Imaging_a_damaged_device.2C_filesystem_or_drive to image the card before just in case

EDIT:
Also before you go through the trouble try plugging the sd card into the computer and checking through all the folders (look at hidden too) I seem to remember a trash folder, Android might have put them there


How to enable YouTube which is banned on a system

I'm not sure that this is the right place to ask that question, since it's got nothing to do with Ubuntu (or any specific OS for that matter), BUT... Since it's already there, I might as well answer you :)

A note first: Before anyone thinks that it is 'not right' to try to circumvent a rule like this, there can actually exist a number of situations when there is no other way to access somethings that are otherwise completely legal and allowed and there's nothing wrong in doing so or trying to do so. I myself have had an awful opportunity to live in a place where so many convenient websites are blocked on a country level (I'm talking about Skype and Flickr and things like that, completely harmless). Also, rational people should not be approving any kind of restrictions, and grown-ups need to be responsible for their own actions.

Depending on the method used to block the content, there might be one or more methods (or none :) ) that you can use. The first thing that I'd suggest is trying to use a proxy server. You can do it in several ways. The best place to start would be Hide My Ass. There you can:

Use a web proxy: Just type an address in the Web Proxy field on the Hide My Ass homepage;
Find the List of ip:port proxy addresses that you can use in your browser. If you don't know how to use these addresses, please leave a comment here;

You can also find many useful instructions on that website.

A second solution is to use Tor project and its Vidalia tool. Basically, it's a shared connection tool. You have several options there too.

One, download and install Vidalia Bundle. It includes the proxy
solution and a browser already set up to work with Tor network.
Or you can install Vidalia tool separately (I believe it's available
from Ubuntu Software Centre) and then set up your browser to use a
proxy server on your localhost address.

There is some great documentation on Vidalia's website, but if you're having trouble with it, feel free to leave a comment here.

Another possible solution that I just remembered might help you is to download and install Opera desktop browser. When you open Opera, enable its Opera Turbo feature. Opera Turbo is a traffic compression tool by Opera, but by nature it uses Opera's proxy servers. That might be handy.

Finally, also in Opera, you have a feature to browse internet in a 'Private tab'. I'm really not sure if that will help, but it's worth mentioning. I also have no idea if any other browser has this feature. To enable private browsing in Opera, click on Opera button > Tabs and Windows > New private tab, and browse away :)


Yes its possible to access other users decrypted data, since eCryptFS does not distincts who is accessing a file. eCryptFS only manages the encryption/decryption of the files on the disk. As soon as it is mounted, any permitted user can read/write encrypted files transparently.

However, Linux has other technics to define access to a file or directory: E.g. the POSIX file permissions. So its highly recommended to simply restrict access to a private directory to only the user who has the key to it...

chown -R user ~/Private
chmod -R 700 ~/Private

There is also a FAQ entry: http://ecryptfs.sourceforge.net/ecryptfs-faq.html#no-ecryptfsac


Very annoying issue with Firefox Quantum 66.0 : scrolling sites with arrows keys not working properly

You can enable/disable smooth scrolling & go back to the old behavior in Preferences > Type "scrolling" in "find in preferences" box.
There you may find the desired Scrolling options.


Organizing software - where in the filesystem?

The traditional places to install additional software is either /opt or usr/local See also the other similar question


What are benefits of upgrading filesystem from ext2?

Wikipedia covers most of this:

http://en.wikipedia.org/wiki/Ext3
http://en.wikipedia.org/wiki/Ext4

The big advantage of ext3 is journalling, which means you don't need to fsck every time you unmount uncleanly (e.g. power failure / kernel panic). ext4 makes fscking much faster, when you do need to.

It's hard to know whether ext3 or ext4 will be faster than ext2 for your use case. I know for some workloads they will be slower.

The freezing problem sounds like either thrashing or a dying hard drive.

Chance of data loss is minimal, assuming the person doing the upgrade doesn't do something stupid.


In 18.04 opencv waitKey loop exit immediately

Obviously API implementation changed from 2.4.9 to 3.2 so example needs to be corrected.

In ver. 2.4.9 when no key pressed in x ms time returns -1

In ver.  3.2  when no key pressed in x ms time returns 255

So code for both versions for me looks like this:

int k; // key
k=waitKey(30);
if( 255!=k && -1!=k )
   break;


Lower window with double click on title bar in xfce4

If I understand your request, you must use the action: shade instead of lower to hide the window but still see the titlebar. If you want to hide the window, the action is iconify.


Some device is waking up your machine immediately.

You can show all devices which can wakeup and those states with cat /proc/acpi/wakeup

# cat /proc/acpi/wakeup
Device  S-state   Status   Sysfs node
PS2K      S4    *disabled
PS2M      S4    *disabled
UAR1      S4    *disabled  pnp:00:06
P0P1      S4    *disabled
RP01      S4    *disabled  pci:0000:00:1c.0
PXSX      S4    *disabled
RP02      S4    *disabled
PXSX      S4    *disabled
RP03      S4    *disabled
PXSX      S4    *disabled
RP04      S4    *disabled
PXSX      S4    *disabled
RP07      S4    *disabled  pci:0000:00:1c.6
PXSX      S4    *enabled   pci:0000:06:00.0
RP08      S4    *disabled
PXSX      S4    *disabled
PEG0      S4    *disabled  pci:0000:00:01.0
PEGP      S4    *disabled
PEG1      S4    *disabled
PEG2      S4    *disabled
PEG3      S4    *disabled
RP05      S4    *disabled  pci:0000:00:1c.4
PXSX      S4    *disabled  pci:0000:03:00.0
RP06      S4    *disabled  pci:0000:00:1c.5
PXSX      S4    *disabled  pci:0000:04:00.0
GLAN      S4    *disabled
EHC1      S4    *disabled  pci:0000:00:1d.0
EHC2      S4    *disabled  pci:0000:00:1a.0
XHC   S4    *disabled  pci:0000:00:14.0
HDEF      S4    *disabled  pci:0000:00:1b.0
PWRB      S4    *enabled   platform:PNP0C0C:00

In my case it turned out that USB (EHC1 and EHC2) was responsible for the wakeup. You can toggle each device with echo <DEVICE> | sudo tee /proc/acpi/wakeup where <DEVICE> is the device name from the list above.

Try to disable all but PWRB and PXSX and check if this helps. If so you can re-enable one after an other until you found the device which is waking up.

EDIT

copy this script into gedit

#!/bin/sh
#Prevent USB and Ethernet from waking up
for i in "IGBE" "USB0" "USB3" "USB5" "EHC0" "EHC1"; do
echo $i | sudo tee /proc/acpi/wakeup
done

save it to ~/prev_wakeup and then run chmod 755 ~/prev_wakeup and ~/prev_wakeup. Next try to go into hibernate and check if this helped.

If so you can add this to your /etc/rc.local

#Prevent USB and Ethernet from waking up
for i in "IGBE" "USB0" "USB3" "USB5" "EHC0" "EHC1"; do
echo $i > /proc/acpi/wakeup
done


Additional libraries in Ubuntu Touch (libpng, libfreetype etc.)

The chroots are like VMs, so it's just apt-get install inside the chroot. The console of the chroot is accessible through the GUI of the SDK or the schroot command.

Well-written FindStuff.cmake scripts are finding things correctly (usually they are doing find_library, find_path, pkgconfig, etc.).


I would highly recommend Komorebi.
It's more dynamic and cross platform.


usually Grub will display, if you've removed Windows, so there is no other player in the game.
But: (there is always a but ;-) if grub has a hidden timeout -you won't see it. It will just start an you couldn't change the to the image you'd like to start. Depending on your grub version you may alter the line in /etc/default/grub:

GRUB_TIMEOUT=5
GRUB_TIMEOUT_STYLE=menu

(this is valid for grub 2.04 - currently I'm running not ubuntu, so you version might be different)
A timeout of ‘0’ means to boot the default entry immediately without displaying the menu.


I installed KDE desktop on Xubuntu and installed some stuff but some applications including Firefox and Chrome show a weird font

Since no one responded I figured it own on my own.

Reason is that most of the applications were made for xfce since that was my old desktop and it uses gtk2/gtk3 for application styling.

so in the settings i had to modify the Application style for gtk2/gtk3 applications and just set the font there to the desired normal Noto Sans font.


How to find out root cause if dpkg command says package status half-configured

I don't think dpkg have a verbose option for installing packages... Although, I know there is a dpkg log in /var/log/dpkg.log.

I'd rather recommend to uninstall and install new version and or install package from a repository using apt-get kaupackage...

Do you see maybe something in syslog or in dpkg.log?

Regards,


bogofilter issue. How do I reset the "learning of bogofilter"

I found this on their website (seems to me that you can create a list of words into a text file and then can edit this file and the use this new filtered file again):

  How can I delete all the spam (or non-spam) tokens?

Bogoutil lets you dump a wordlist and load the tokens into a new wordlist. With the added use of awk and grep, counts can be zeroed and tokens with zero counts for both spam and non-spam can be deleted.
The following commands will delete the tokens from spam messages:

bogoutil -d wordlist.db | \
awk '{print $1 " " $2 " 0"}' | grep -v " 0 0" | \
bogoutil -l wordlist.new.db

The following commands will delete the tokens from non-spam messages:

bogoutil -d wordlist.db | \
awk '{print $1 " 0 " $3}' | grep -v " 0 0" | \
bogoutil -l wordlist.new.db

Regarding

  Uninstalling bogofilter seem to uninstall the program but not the "learned data".

You probably need to "purge" the application. In general user created files and settings are not removed when deleting software. See What is the correct way to completely remove an application? for a bit on information on that.


Is it possible to diy a command under Ubuntu?

Add

alias gb='cd /media/Dan/evolution'

to your ~/.bashrc file and everytime when you type gb your shell changes to the directory /media/Dan/evolution.

Running below command would add a line to .bashrc file

echo  "alias gb='cd /media/Dan/evolution'" >> ~/.bashrc

And then restart the terminal


Sound (tray and audio) problem made worse

Okay, a simple run of the following command:

apt-cache search pulse | egrep 'tray|indicator'

returns the following:

indicator-sound - System sound indicator.
indicator-sound-gtk2 - System sound indicator.
pasystray - PulseAudio controller for the system tray
pnmixer - Simple mixer application for system tray
volti - control audio volume from system tray/notification area

Although, I think what you are looking for is indicator-sound as the tray icons are called indicators for unity. In any case, run the following command to hopefully install the system tray icon you are looking for:

sudo apt-get install pasystray pnmixer volti indicator-sound

reboot.

If you are using unity, you might be able to skip a reboot by running the following command:

indicator-sound &

For Kubuntu:

Run the following command to install the systray icon:

sudo apt-get install kmix

Start it up using the following command:

kmix &


How to correctly install CrashPlan backup software on Ubuntu 16.10?


How to install software from old repository?

The problem is that the package you are trying to install is old and their dependencies cannot be satisfied. Probably because the libraries you have installed in your system are more up to date than the ones the package needs, or they are not available anymore (like sun-java6-jdk).

I guess you have three options here:

Try the manual installation using the .tar.gz provided here;
Using gem to install it (gem is something like an apt-get for ruby). I don't know if this installs what you need or just some management tools/libraries, but you can try it:

sudo gem install appscale-tools

Install that package in a Ubuntu Lucid system, which you can have in your current system using virtualization (ex: VirtualBox, LXC, or even a chroot may work)

Hope this helps.


Download Game from Blizzard

http://dist.blizzard.com/downloads/hs-installers/a6029a1d625c79252defff3914fb6e67/retail.1/Hearthstone-Setup-enUS.exe

Install Wine

sudo add-apt-repository ppa:ubuntu-wine/ppa

sudo apt-get update

sudo apt-get install wine

Install Hearthstone from Play on Linux.

Source/Full Guide: http://www.sysads.co.uk/2014/04/install-hearthstone-heroes-warcraft-ubuntu-wine/


How to listen new port Ubuntu Server from command line?

If you run the command nc -l 3000 nc will run in foreground and you won't be able to do anything else without stopping nc

so you must run nc as background task:

nc -l 3000 &


How do I get Ubuntu Minimal to boot in Virtualbox?

After trying 12.04 minimal, I gave ubuntu server a shot, and it gave me an error saying that PAE/NX was disabled. Apparently I had PAE/NX deselected under system -> processor. Selecting it fixed the issue. Since PAE is a prerequisite for the more modern builds of ubuntu, its essential this is selected.


Windows explorer-like file manager for Linux with "List" view style

This is the Caja file manager (a fork of Nautilus, Unity's file manager) in Ubuntu MATE, which uses Gnome 2, but it's very much the same deal with Gnome 3 (Nemo), or KDE (Dolphin).

Note the dialogue in the top middle that says "Compact": Its other two options are "List" and "Icon". Nautilus has the functionality, except with different looking buttons.

In the application's preferences, you can configure the default view for folders.

I'm pretty sure almost any file manager you can possibly find for Linux will have this functionality, with perhaps the exception of Midnight Commander but that's because it's text-based and already awesome.


if you have the iso on your pc try dd the iso to your usb stick
dd if=/path/ot/ubuntu.iso of=/dev/usb-stick bs=4M
to know which /dev is ur usb type fdisk -l


How can I get a redundant filesystem which grows easily?

You can use RAID 1 + LVM on top
When need more space - add 2 more disks, create another RAID 1 with them and add it to the existing LVM

LVM also supports snapshots


You can install xrdp.
And the best solution is to use Teamviewer for both LAN and WAN


How do I "sync" read/unread with Thunderbird and Hotmail

I should say that I am always quite surprise to see Ubuntu users complain about the fact that Thunderbird should supports closed standard... IMAP exists and is the solution. So if you want to be able to sync your mails status, you should just use another mail address.


Transfer music files from ubuntu to an mp3 player

Try a media player, such as clementine.

Many MP3 players will allow you to copy your files directly to the mounted filesystem, but some do not.  It is best to allow your media player to handle these transfers.


SublimeText turns into black hole with Unity/nVidia/Xinerama

Edit: It seems it's a memory problem, xinerama makes my two cards to run out of memory with three monitors. Some people managed to solve it increasing shared memory size on the BIOS, unfortunately my cards are not integrated and I don't have that option.

Same problem here, both with Firefox and Thunderbird (and other apps too), focus lost = black window.

Two GeForce 8400 GS with three monitors.

The problem is xinerama with the drivers, since you have to enable Composite manually in the xorg.conf file in order to make unity work.

Going back to nouveau driver solves it, with you get other problems like continuous freezes.


How to connect to the Internet using an Airtel 3G USB dongle?

Here is how it worked for me:

Properly insert your dongle to the USB port; don't worry if it's not detected by Ubuntu.
Go to: Network Connection -> Mobile Broadband -> Add

Now there are 5 simple steps; select the natural options:

Select appropriate mobile device (for me, Huawei)
Choose country provider/region (for me, India)
Choose your provider (for me, Airtel)
Choose your Billing Plan (for me, Default)
Confirm Mobile broadband settings (confirm)

Since in my case it was without password, I din't have to do any extra settings related to ip address or any setting in the final dialog.


/var/log/auth.log is owned by syslog:adm, with permission 0640, so:

only user syslog can write to the file
user syslog and any member of group adm can read the contents of the file
no one else can read or write to the file
no execute permission for anyone as its supposed to be plaintext log file

So, as you can see only way to change i.e. write to the file is to:

run the process as user syslog
or be root who can do anything anywhere in the system

For an outsider/cracker to break in and change the logfile, they need sufficient privileges like mentioned above.

For example, they could use a privilege escation vulnerability, a zero day attack (depends on target value mostly), or a plain password brute forcing, or something else altogether to get in as privileged user.

If they can get in, you have more important things to worry about than changing the contents of any log file. In essence, that won't be your computer any more.


How to clean up remnants of old versions?

Unfortunately I can't give you an answer to your problem, but I can give you some tips to try to understand what's happening.

When you upgraded your system all the applications installed with apt-get/Software Center had to be also upgraded, and when a package is upgraded it replaces the previous version, so I really don't know how you can have 2 versions of Update Manager.

If any of those apps where manually installed, then you may have two versions (the one you manually installed and one managed by the system). In this case just remove one and use the other.

Regarding the duplicate launchers: they are stored in /usr/share/applications (system-wide) and ~/.local/share/applications (only visible to your user). You can check those two locations and see if there are no duplicated launchers.

If you have problems identifying which launcher belongs to each application, you can launch each duplicated item and run the following command in a terminal:

$ xprop | grep DESKTOP_FILE

Your cursor will change to a cross. Then click in the window of that application. You may get (not all applications give you this information) an output similar the following:

$ xprop | grep DESKTOP_FILE
_NET_WM_DESKTOP_FILE(STRING) = "/usr/share/applications/gnome-terminal.desktop"

In my case I clicked in the terminal window. You would click on both the versions launched and hopefully would get two different paths there.


detect network malicious activity coming from own server

Depending on what your notion of malicious activity is...

You can still install and run nethogs in the background of each docker then check periodicaly an output files


I found a workaround for anyone who might be having the same issue. No idea what the actual problem is but it seems as though setting the IPv6 settings "Method" section to "ignore" has resolved it.


How to remove sub-folders from Ubuntu One or only sync the parent folder?

I had the same problem and was unsuccessful in solving it through the control panel, but I did solve it through the web interface. The control panel only controls how this device syncs with the cloud, so it can't remove folders from the cloud.

Both answers offered so far seem to misunderstand the question, so here is a clarification of what I believe was the original problem:

Let's say that inside ~/Parent/ you synchronize ~/Parent/child1/ and ~/Parent/child2/, but not ~/Parent/child3/ or ~/Parent/child4/. Now you want instead to synchronize ~/Parent/ along with anything I put in there. But when you try to synchronize ~/Parent/, you get an error saying it overlaps with other things you've synchronized. You can stop synchronizing each of these folders through each device's Ubuntu One control panel, but the control panel cannot remove the folders from the cloud.

The solution is to forget the control panel and to log into https://one.ubuntu.com/files/, click on "More" to the right of each child folder, and select "X Stop synchronizing this folder." Ideally, you should now be able to synchronize the parent. But for me this never works unless I restart the sync daemon (from terminal: killall ubuntuone-syncdaemon then ubuntuone-launch). Then I can right click on the folder I want to sync and select "Ubuntu One > Synchronize this folder".

Maybe the developers will figure out in the future an easier way to synchronize the -parent folder that just includes all the already-synchronized child folders by default.


what do i have to do to use NX on a different port than 22 (SSH)

On the commercial NX, edit /usr/NX/etc/server.cfg, change SSHDPort, and restart NX.

(A little more... I like to link the NX etc directory.)

ln -s /usr/NX/etc /etc/nx
sudo vim /etc/nx/server.cfg

Change SSHDPort and save.

/etc/init.d/nxserver restart


The Problem was fixed :

I typed pkexec chmod 0440 /etc/sudoers

And then the permission was changed and then i gave the default permission /etc as  chmod 744 /etc


Start with this hyperlink for tablet.
http://www.ubuntu.com/tablet


It is really opinion and usage based, but my 2 cents are below:

I'm writing this answer from laptop with SSD where Ubuntu is installed into ext4 (GPT, two partitions for / and /home). Having no filesystem related issues since 2013.

Recently I have installed SSD to other laptop for Ubuntu testing and partitioned it using btrfs. This adds fantastic features - backup and restore the filesystem snapshots by using TimeShift. This functionality is great if you need to use real hardware with snapshots like if it was VirtualMachine with snapshots.

So you have to decide by yourself what do you need.


You need to disable Secure Boot in UEFI (BIOS) settings to use hibernation in Ubuntu.

Your swap size is probably enough. You can test it by running

sudo pm-hibernate

If that works and the system wakes up correctly, then you can enable hibernation using this guide


How can I safely shut down Xfce from the terminal?

I think what you want is xfce4-session-logout (online manpage).

Excerpt from the manpage (reformatted, filtered):

   The  xfce4-session-logout command allows you to programmatically logout
   from your Xfce session. It requests the session manager to display  the
   logout  confirmation  screen,  or,  if  given  one  of the command-line
   options below, causes the session manager to take the requested  action
   immediately.

OPTIONS:
   --logout     Log out without displaying the logout dialog.
   --halt       Halt without displaing the logout dialog.
   --reboot     Reboot without displaying the logout dialog.
   --suspend    Suspend without displaying the logout dialog.
   --hibernate  Hibernate without displaying the logout dialog.
   --fast       Do  a  fast shutdown.  This instructs the session manager not to
                save the session, but instead to quit everything quickly.

So to shut down, use

xfce4-session-logout --halt

and to reboot, use

xfce4-session-logout --reboot

If you just want to get the dialogue where you can pick an action manually, run it without arguments:

xfce4-session-logout


I've installed gnome-panel, where is it?

You can run the GNOME Panel within Unity by running gnome-panel in a terminal.

If you want a look even more similar to the old GNOME 2:

You can install gnome-session-fallback  and choose GNOME Classic at the login screen.

gnome-session-fallback can be installed in the Software Center or by running:

sudo apt-get update
sudo apt-get install gnome-session-fallback

Or you can install the Mate desktop as explained here.

If you just want to have gnome-panel run when you log in, open "Startup Applications" either from the Unity Dash or the menu in Gnome Classic.  Click "Add" and put "gnome-panel" in the "Command" field.  You don't have to put anything in the "Name" or "Comment" field, they're optional.  Click "Add" again.


Multiple thunderbird users using same local directory

You can do it if you move your profile folder outside the home folder, to a location that does not depend on the user that logs in. Then you share the same profile folder for both users.

Alternatively, if you want to keep the home file structure and if we say now the profile folder is on user's office account, then you could probably share this folder with other user(s).


You should be able to find your graphics driver version in file /var/log/Xorg.0.log. There will be multiple occurrences, but search for string "LoadModule". When you get to the one with your display adapter name in it, e.g., fglrx for the ATI proprietary driver, the next few lines should show your driver version.

For example, my system has:

[    15.540] (II) LoadModule: "fglrx"
[    15.540] (II) Loading /usr/lib/x86_64-linux-gnu/xorg/extra-modules/extra-modules.dpkg-tmp/modules/drivers/fglrx_drv.so
[    15.549] (II) Module fglrx: vendor="FireGL - ATI Technologies Inc."
[    15.549]    compiled for 1.4.99.906, module version = 8.95.3


Can I copy 2 partitions at a time with sudo dd

See where the partition ends with sudo parted /dev/sda unit s print.  Add one to the end sector, and tell dd to copy that many sectors: sudo dd if=/dev/sda of=/dev/sdb count=xxxx where if is the input device and of is the output device.


I've seen a video by Alan Pope, showing an Ubuntu phone connected to the Pebble Time watch.

  Pebble / Ubuntu Phone integration

  Published on Nov 20, 2015

  A quick teaser showing an incoming call notification from Ubuntu phone to the Pebble Time watch. It's early days for this work by a Canonical Developer Michael Zanetti, to get Ubuntu Phone and Pebble watch talking to each-other. Apologies for the potato quality video.

Source: https://www.youtube.com/watch?v=5hgvKC2HWp8


How can I find out, which jar-files java is currently running (and their PIDs)?

You can run the lsof command, which lists which processes has open files, with your jar file given as an argument. An example viewing a file with less:

egil@mutter:~$ lsof foo.c
COMMAND   PID USER   FD   TYPE DEVICE SIZE/OFF     NODE NAME
less    18871 egil    4r   REG    8,2        0 53862540 foo.c
egil@mutter:~$

To easily reuse the pid in a script, you could run it in terse mode:

egil@mutter:~$ lsof -t foo.c
18871


How to install Qualcomm Atheros AR9565 wireless drivers?

Here's one way to solve this. I myself had the same problem as mentioned here. I followed two posts on ubuntuforum by anoop-n2 and chili555, and kind of did a mix of things, which can be outlined as follows:

You need to have linux-headers-generic and build-essential installed, try

sudo apt-get install linux-headers-generic build-essential

which will turn out to be of the newest version if those are already there.

The following should be done in a terminal as root:

sudo -i
wget https://www.kernel.org/pub/linux/kernel/projects/backports/stable/v3.9-rc4/compat-drivers-3.9-rc4-2-s.tar.bz2
tar xvf compat-drivers-3.9-rc4-2-s.tar.bz2
cd compat-drivers-3.9-rc4-2-s/
./scripts/driver-select ath9k
make

Now this will probably give the following error:

error: redefinition of ‘kref_get_unless_zero’
include/linux/kref.h:47:32: note: previous definition of ‘kref_get_unless_zero’ was here

In this case, open the header file, and find the entire block of the function:

static inline int __must_check kref_get_unless_zero(struct kref *kref)
{
    return atomic_add_unless(&kref->refcount, 1, 0);
}

Next comment out the entire block of the function using line comment (put // in front of each line) or block comment in c as,

/*static inline int __must_check kref_get_unless_zero(struct kref *kref)
{
    return atomic_add_unless(&kref->refcount, 1, 0);
}*/

then type the following commands one by one:

make
make install

Then load the driver using

modprobe ath9k

or reboot the system. Afterwards the wifi should be working.


rsync creates new directory on local drive instead of syncing to external drive

I think this solved it for me:

https://www.youtube.com/watch?v=-Qwr3e7oPN0


How to securely share my internet connection with another machine

Click System Settings >> Network >>  Wireless network >> Use as Hotspot.

This is assuming your hardwired into internet and will broadcast WIFI to the second computer, which of course will suffer performance hits, as will you, but for web browsing, should be fine, just don't try to stream NetFlix!

This is a link to original post I found on subject. howtogeek


Linux Couldn't access full permission file

I believe you need to set the permission on that specific file. And I do not recommend setting those permission on a folder, it is very insecure

So it would be

chmod 777 /var/myproj/www/sample.pdf

There is also a chance you don't own the file, so

chown your-user /var/myproj/www/sample.pdf

Please note that certain application will automatically rechange permissions back to default, and sudo is usually needed to change file permissions.


How to run Compiz on Unity 2D, Ubuntu 12.04

This happens because 2D is using Metacity. Simple fix though...

Open Unity 2D's session settings:

gksudo gedit /usr/share/gnome-session/sessions/ubuntu-2d.session

Change metacity

[GNOME Session]
Name=Ubuntu 2D
RequiredComponents=gnome-settings-daemon;
RequiredProviders=windowmanager;panel;launcher;
DefaultProvider-windowmanager=metacity
DefaultProvider-panel=unity-2d-panel
DefaultProvider-launcher=unity-2d-launcher

DesktopName=Unity

To compiz

[GNOME Session]
Name=Ubuntu 2D
RequiredComponents=gnome-settings-daemon;
RequiredProviders=windowmanager;panel;launcher;
DefaultProvider-windowmanager=compiz
DefaultProvider-panel=unity-2d-panel
DefaultProvider-launcher=unity-2d-launcher

DesktopName=Unity

Save file and exit gedit

While still in terminal:

sudo restart lightdm

Log back in and have fun. Hope this helps :)


Trying to reformat a Lenovo t410 with ubuntu installed already?

Use Ubuntu install media as a 'live' system, boot it and use "try ubuntu"

mount the hdd to check for any wanted files  [optional]
use gparted to reformat the drive and erase any data  [optional]

Neither step is mandatory. You can select the 'format partition' checkbox   under 'something else' for a new install.  Key is not to upgrade, just select 'Something Else' as your install option, and you have control to alter partitions, format, or  use existing...

You can overwrite the password with a known one (hashed) if you know the encryption used (its usually default), but its cleaner just to start again as you intended.


By default Ubuntu file manager doesn't have an option to open folders with elevated permissions; you need nautilus-admin plugin for that.

Open Software Center and search for nautilus-admin package. Install it. Once the plug in has been added, stop file manager (the command for that is nautilus -q) and restart it.

Now, you can copy and paste files in file manager with Admin permissions , if you right-click on body of the folder and select "Open as Administrator".

However, if the folder where you try to copy the file has permissions other than root user, for example userA:userA , you will have to use command line to add yourself to userA group (considering that you have sudo privileges). There is no GUI way to do that!


What you are looking for are virtual environments. They allow you to have different version of a package. They also make it possible to have several versions of python live together.

Make a virtual environment that uses 2.4. Install numpy in it. Run your script in that venv (virtual environment). Enjoy.


Not quite an answer to what was asked, but to do all images in a folder at once from the command line.

for f in *.jpg; do convert $f -resize 700 $f; done

This assumes all your images are .jpg and will resize them to 700 pixels wide.

This will overwrite the original file (which is what the question implied was required) but if you want to keep the original, you have a couple of options.

for f in *.jpg; do convert $f -resize 700 ../resized/$f; done

This puts the resized photos into a directory called resized. (You need to create this first)

Or you could change the filename

for f in *.jpg; do convert $f -resize 700 $(basename $f .jpg)-resized.jpg ; done

This adds -resized to the filename of each, e.g. file0001.jpg will be resized and named file0001-resized.jpg


How can I find out what is causing my gnome-panel to freeze?

The comments on this bug report on the same issue first point the reporter to a wiki page entitled Debugging a Program Crash and then to a page describing how to get a backtrace. Perhaps those will help you get the debugging info you need.

I answered a question about a similar problem with a workaround that may help you. It goes like this:

Create a script called delayed-gnome-panel.sh in your home directory and mark it as executable.
Edit the script to look like this:

#! /bin/bash
sleep 3 && gnome-panel &
exit

Then edit /usr/share/applications/gnome-panel.desktop so that exec=bash /home/<user>/delayed-gnome-panel.sh.


To start the app just type spotify or /usr/bin/spotify


Ubuntu/VNC: Too many "Too many security failures"

Yes, there are scanning bots for popular vnc ports.
There is solution without killing vncserver: Connect by SSH, and type in command to change VNC password vncpasswd After changing password, authentication failures will reset and you'll be able to login again. In this case your VNC desktop will remain launched without interrupting.


Because that's what Network Manager uses to cache DNS locally. It's from dnsmasq-base. This version of the package doesn't include the server-start-up scripts that the dnsmasq package does.

If you are being hacked, this has nothing to do with it. It's completely standard for Ubuntu.


To make Skype auto-login when it starts launch Skype, then login with the automatic login tick box selected (I have highlighted the bit which you will need to tick in the bottom right hand corner):

After you have completed that part, you can then do as @Harris  says to make Skype launch automatically when you login:

Move your skype.desktop file into your autostart folder with:

cp /usr/share/applications/skype.desktop ~/.config/autostart/

And you shouldn't need to make the skype.desktop file executable for it to work.


JavaNNS requires a library to work. The library it requires is the kernel from SNNS. SNNS was an X Windows application and a 'kernel', but the X Windows part was effectively deprecated in favour of JavaNNS... JavaNNS uses the original SNNS 'kernel' though.

If I remember correctly, JavaNNS was distributed with the SNNS kernel, precompiled for various platforms, but I it is all quite ancient stuff so I'm not particularly surprised it has some problems. Probably wouldn't work even if it found the library.

I did create Debian packaging for the SNNS kernel and JavaNNS last year (I used SNNS about 10 years ago and wanted to again last year), which you are welcome to help yourself to if you like. I offer no warranty or support of course, but it should work in so far as it will build, install, the package dependencies between them work, and it will find the library! At least, it worked on by Debian system at the time (which was probably Squeeze).

The repositories on git for both are checked in pristine sources with the debian packaging committed afterwards (neither had a git repo previously so I couldn't fork):

JavaNNS git repo
SNNS git repo


In linux, the drivers are included as a part of the kernel (device driver to be specific), usually, but not always, built as modules.

http://www.tldp.org/LDP/khg/HyperNews/get/devices/whatis.html

If you need assistance, please identify the hardware (video card, wireless card) you are having a problem with.

How can I find my hardware details?

Note: There are hardware devices for which there are no drivers (open source or proprietary) and in general you can not use windows drivers in Linux, although ndiswrapper does allow some windows drivers for wireless cards.


Ubuntu 13.10 NFS mounted shares keep losing permissions

I am not sure if you are still encountering errors, but I had an issue with my Synology and  Ubuntu 12.04. I would loose permissions for my NFS mounts constantly.

I enabled NFS v4 on the Synology and my fstab file now looks like this:

# NFS home directory
#topher:/volume1/nfs_home    /home   nfs     nfsvers=3,nouser,rsize=8192,wsize=8192,atime,auto,rw,dev,exec,suid      0       0
topher:/volume1/nfs_home     /home   nfs     nfsvers=4,nouser,rsize=8192,wsize=8192,atime,auto,rw,dev,exec,suid      0       0

It seems to be more stable and I haven't lost permissions yet, which was a daily occurance before.


Share Windows 8.1 Folder with Ubuntu 14.04

Share the folder on windows machine to all users.

Change the settings in windows machine:
Go to Control Panel > Network and sharing center > Change advanced sharing settings > Enable Turn Off password protect sharing option.
NOTE: Make sure the folder's Properties > Security includes Guest. Folders in C:\Users generally don't include that user.
[This will allow sharing of files on network without knowing the username and password of windows machine]

Now try to access the folder from ubuntu.

reference: How to access shared folder without giving username and password


When you have disabled password login and use ssh keys there is no need to be worried.

SSH is constantly beeing tried from all around the world...

If you like you can install & configure fail2ban to automatically add blocking rules to your iptables


Run sudo script at startup under 15.04 using 'systemd'

I finally solved this problem by using an rc-local.service and /etc/rc.local instead of creating a separate systemd service. Here is what I did:

In terminal: systemctl enable rc-local.service
In /etc/rc.local I put the following:

#!/bin/sh -e
(sleep 20 && echo 0 > /sys/devices/platform/asus-nb-wmi/leds/asus::kbd_backlight/brightness)
exit 0

Make /etc/rc.local executable:

sudo chmod a+x /etc/rc.local

To confirm, check the status of rc-local.service

systemctl status rc-local.service

It should show green and say active. That was it.


Installed Ubuntu 14.04 from USB and need help

Windows 7 typically have a hidden boot partition / Recovery Partition. Your bios will show the F9 Recovery option upon booting. The problem is where did you install the Grub boot loader. From booting from the USB you can inspect your hard drive and see all partitions. And remove them. You can probably use the whole drive. Do you use legacy 4 partition table or EFI with GPT partitioning scheme? Technical, right? Personally I went for dual boot from windows boot loader by shrinking windows partition and installing grub on new partition. This way enables windows and linux hibernation to work. But that is not the point here, you already have wiped the main windows partition, but what about the boot partition. What is the message when trying to boot without USB?


Is there any "Ubuntu touch" vmdk/iso for trying on VirtualBox?

The 'Canonical' way to run Ubuntu Touch in emulation is to use the ubuntu-emulator rather than VirtualBox and friends. If you are using Trusty Tahr or later run the following:

sudo apt-get install ubuntu-emulator ubuntu-emulator-runtime ubuntu-emulator-images

Then you create the emulation:

sudo ubuntu-emulator create just_testing

There will be a reasonable download and then you can run your copy of Ubuntu Touch in emulation:

ubuntu-emulator run --scale 0.75 just_testing

The --scale 0.75 option can be varied to produce the 'phone' size of your choice or even omitted completely if desired. Another option to manipulate is --memory 720 which specifies in megabytes the amount of memory available to the emulator.

A screenshot of all of this running on my own system:

References:

Ubuntu Docs: Touch Emulator
Emulate Ubuntu Touch
A quickstart guide to the Ubuntu emulator


you can also try the handy ...

gnome-screenshot --interactive


How to connect .sql file to MySQL Server to work with application server

A .sql is a text file. more {file}.sql will show you the contents and instructions that will be executed if you feed MySQL the file.

You do that with ...

mysql -u {user} -p {database} < {file}.sql

Careful though. This will add the file contents to {database} and can potentially kill your database. Therefor first examine the file and see what is in it. If unsure add snippets of it to your question (delete sensitive content ;) )


How to make Ubuntu support single display 5120x1440 resolution?

According to Intel only HDMI 1.4 at a max of 4096x2304 at 30Hz is possible. And according to Philips your monitor requires HDMI 2.0 or DisplayPort 1.4 to get full resolution.

Thus, you will need to upgrade to a GPU capable of HDMI 2.0 or DisplayPort 1.4, along with a cable to match the specification. Then you should be able to get the native resolution.


check if newer version of docker image is available

curl -kvu "myuser:mypasswd" -H "Accept: application/vnd.docker.distribution.manifest.v2+json" -X HEAD https://myrepo:5000/v2/myimage/manifests/<tag>

Will return a response like this:

< HTTP/1.1 200 OK
< Content-Length: 9080
< Content-Type: application/vnd.docker.distribution.manifest.v2+json
< Docker-Content-Digest: sha256:5891d3d01fcdb5ec7dc8a27f25360b132510c7b92369ad50926c27ca7d7cfacf
< Docker-Distribution-Api-Version: registry/2.0
< Etag: "sha256:5891d3d01fcdb5ec7dc8a27f25360b132510c7b92369ad50926c27ca7d7cfacf"
< X-Content-Type-Options: nosniff

Docker-Content-Digest: field should be checked against the digest of local image

docker images --digests myrepo:5000/myimage
REPOSITORY                         TAG                 DIGEST                                                                    IMAGE ID            CREATED             SIZE
myrepo:5000/myimage   i386                sha256:5891d3d01fcdb5ec7dc8a27f25360b132510c7b92369ad50926c27ca7d7cfacf   b9e9c7f4a462        6 days ago          491 MB

docker images --digests myrepo:5000/myimage Should be run without the tag (i386 in this case)

If the digests mismatches, then there is a newer version of the image available. So basically, you check the digest of the remote and the local image. If they mismatch, a newer version is available.


Try using sudo chown yourUserName /path/to/folder this will give you ownership of the directory if it was for some reason mounted as root. If this still doesn't work try chmod +rwx /path/to/folder which will allow reading and writing to that directory


It's a read-only file system. Even if you have write permissions, it won't work, as the file system is mounted read-only. Maybe the file system is in an unclean state? It used to be that it refused to mount automatically, suggesting manually mounting read-only. Maybe that changed.

Boot Windows and run filesystem checks on the ntfs partitions. Make sure you shutdown Windows completely, unmounting all file systems. Linux can't mount ntfs partitions if Windows is (semi-)hibernated.
Have a look here https://ubuntuforums.org/showthread.php?t=2342159

For changing permission of folders including its enclosed file. See this Question How can I change permissions of a folder, including its enclosed files and subdirectories?


Correct way to compile using only qmake command.
You can install qt5-default package to set qt5 as default while using development binaries.

sudo apt-get install qt5-default qtdeclarative5-dev


Trackpad Buttons on 2012 Samsung Series 9 Not Working Properly, appears to double click and doesn't have right click

This clickpad requires some manual Xorg configuration in order to get right and middle clicking to work properly.

Create a new file called /usr/share/X11/xorg.conf.d/52-synaptics-np900x3b.conf.
Inside paste the following:

Section "InputClass"
        Identifier      "np900x3b clickpad"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        # Enable the clickpad and set click actions
        # Single click = left button
        # Two-finger click = right button
        # Three-finger click = middle button
        Option          "ClickPad"      "1"
        Option          "ClickFinger1"  "1"
        Option          "ClickFinger2"  "3"
        Option          "ClickFinger3"  "2"
EndSection

Then log out and log in.  You should now be able to right click by using two fingers, and middle click with three fingers.  I have not experienced the one-finger double-click problem that you describe.  If this configuration doesn't fix it, you could also add the option

Option         "SHMConfig"     "True"

Then you can try debugging with synclient -m 1 which will give you feedback on what the touchpad driver is seeing.

More information about this fix and other issues are available at the Series 9 Community Wiki page


How do I install the empathy smilies (from maverick) in Pidgin?

If you mean the new Ubuntu speech-bubble emoticons, then try this:

http://feedproxy.google.com/~r/d0od/~3/VRw0IcDI77w/


If you're on a server without a GUI, here's a package that will backup and rotate all of your MySQL databases daily by default.

sudo apt-get install automysqlbackup

That's it. The default configuration is sane so you're done unless you need something special. The backup files will be placed in /var/lib/automysqlbackup which you should rsync somewhere off-site.


Impossible to enable bluetooth on an Acer Aspire One 756-877

Check the BIOS. If Bluetooth is disabled or if there is an external switch or keyboard key to enable it, try these.


Do you have xscreensaver -nosplash in your startup applications?

If not try to add and see if it fixes your problem.


Automatically use usb_modeswitch for Wifi USB

I've found the way to do it. I've modified the file /lib/udev/rules.d/40-usb_modeswitch.rules appending before the line LABEL="modeswitch_rules_end" the following:

# Realtek 8211CU Wifi AC USB
ATTR{idVendor}=="0bda", ATTR{idProduct}=="1a2b", RUN+="/usr/sbin/usb_modeswitch -K -v 0bda -p 1a2b"

After that, every time I connected the wifi dongle, the disk doesn't appear and automatically the Wifi is detected. Maybe it's not the cleanest method, but it works.


After run say Ubuntu recommends installation of gnustep-gui-runtime. Uninstall it by running:

sudo apt-get remove gnustep-gui-runtime

You can also run sudo apt-get autoremove to remove the automatically installed dependencies of gnustep-gui-runtime.


Can you use the new beta Adobe Flash 10.2 in Google Chrome

Yes you can!

Simply go to your /opt/google/chrome folder

Replace the file "libflashplayer.so" (I recommend doing a backup of that file) and your done.

I would recommend doing the same for the /usr/lib/flashplugin-installer/ folder.

By the way, this combined with the 200 line kernel patch makes flash SUPER FAST even on my crappy computer!


The command changes to the directory $(KDIR) and runs make from there to build the target modules.

$(MAKE) is a macro which runs the make executable. The reason for it (instead of just using make) is that that executable could have different names.

-C <directory> changes to a certain directory before running make.

SUBDIRS=<variable> defines the variable SUBDIRS when running make.

modules means it will try to build that target.


When logged in to the terminal look for a file in home directory called .Xauthority (hidden file) use ls -al. If the file is owned by root use sudo chown <user>:<user> .Xauthority.


Bash script to take screenshot and save the image - Ubuntu

You need to install the package imagemagic to use import command, via Ubuntu Software Center or:

sudo apt-get install imagemagick

This will allow you to use import command. Also try out graphicsmagick-imagemagick-compat package.

other alternatives to import are

scrot. Install it with:

sudo aptitude install scrot

Usage: scrot screen.png
gnome-screenshot.  Install it with:

sudo aptitude install gnome-screenshot


The icons of various apps in the ISO file

Open the file browser and go to the location

/usr/share/icons

Press Ctrl+f to open the search bar.

Insert the word "ubiquity" and you will have a list of all the icons (png and svg) available.


How do I manually set the resolution of an external monitor on my laptop?

I was able to manually add the required modes using the following commands

xrandr --newmode "1280x1024_60.00"  109.00 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync
xrandr --addmode VGA1 1280x1024_60.00

Although others may have to adjust the resolution, refresh rate and other values on their own


Cannot Access Base Files with LibreOffice 5.1.3

Try this:

Open a terminal,Press Ctrl+Alt+T

Run it:

rm ~/.config/libreoffice/4/user/basic/dialog.xlc
rm ~/.config/libreoffice/4/user/basic/script.xlc
touch ~/.config/libreoffice/4/user/basic/dialog.xlc
touch ~/.config/libreoffice/4/user/basic/script.xlc


How to power down on signal from Tripp Lite UPS?

Please have a look at the nut(Network UPS Tools) package.

The driver for your device is most likely tripplite_usb.


If you are going to format the filesystem anyhow, you may just use the -E discard switch to mke2fs to have it trim the unused portions of the disk.  e2fsck also supports the same option so you can trim the fs while checking it rather than formatting it.

sudo mke2fs -E discard -T ext4 /dev/sdaX
sudo e2fsck -E discard /dev/sdaX


check if all default packages are installed from the Ubuntu manifest

There is a full list in the manifest file of each distribution at http://releases.ubuntu.com

To generate a list use

cd /tmp/
# 14.10: $ wget http://old-releases.ubuntu.com/releases/utopic/ubuntu-14.10-desktop-amd64.manifest
# 16.04.2: $ wget http://releases.ubuntu.com/releases/xenial/ubuntu-16.04.2-desktop-amd64.manifest
# for 16.10:
wget http://releases.ubuntu.com/releases/16.10/ubuntu-16.10-desktop-amd64.manifest \
     -q -O - | cut -f 1 > packages.manifest.list
# compare it with the list generated by
dpkg --get-selections  | cut -f 1 > packages.installed.list
# from moreutils you can use combine:
combine packages.manifest.list not packages.installed.list > packages.diff.list

For 32 bit use another manifest with the ending desktop-i386.manifest:

wget http://releases.ubuntu.com/utopic/ubuntu-14.10-desktop-i386.manifest -q -O - | cut -f 1 > packages.manifest.list

Now just figure out how to ignore those packages that are removed upon installation, such as GParted, Ubiquity, various language packs, etc.:

IGNORE="language-pack|ubiquity|linux-|locale-|spell-|-help-|hyphen-|l10n|wbrazilian|wfrench|witalian|wportuguese|wspanish|mythes-"
cat packages.diff.list |egrep -v '('$IGNORE')' |less

(full list of removed packages here)


Try this, one command at a time:
Disclaimer: I don't have access to an Ubuntu machine and so can't test these out.

sudo apt-get purge skype

sudo apt-get autoremove
rm -rf ~/.skype

If that doesn't work, try this:

sudo dpkg --remove skype
sudo dpkg --remove getskype-*


Netflix on Firefox 53.0 (64-bit) not playing back

You must be able to play DRM protected content to use Netflix.

As stated on Netflix' help page about the specific error code you gave:

  If you experience the error code F7701-1003 on your computer, it typically indicates an issue with your browser's Widevine Content Decryption Module (CDM).

According to Mozilla, Firefox can playback DRM protected content using Widevine since version 47, but you might have to enable it first.

Therefore open the "Preferences" and switch to the "Content" tab or type about:preferences#content in your Firefox address bar. There should be a checkbox labelled "Play DRM content", which needs to be checked.

Note that Firefox will download and install Widevine on demand, which means it can take a while after you vsit Netflix the next time again until it finished and Widevine is ready.


Solution 1: redirect to a file you can write to

Your current working directory is /, which by default can only be modified by root. Type cd ~ to change to your home folder, or cd followed by the path to a directory you can write to, then do it again.

Solution 2: redirect with sh under sudo

Shell redirections are not passed along to programs. This means that even if execute a program under sudo, redirection (like >>) will still be performed under your account. This is what happens:

  sudo         ls -l /usr/bin         >>/ls-output.txt
-------------------------------------------------------
|     execute external program      | redirect stdout |       what your shell sees
| sudo | command to execute as root |                            what sudo sees

If you want to sudo a redirect, you need to run a shell as root. You can do this:

     sudo         sh   -c '      ls -l /usr/bin           >>/ls-output.txt   '
-------------------------------------------------------------------------------
|      execute external program (pass the single-quoted string verbatim)      | your shell
|    sudo       |                command to execute as root                   |    sudo
                | sh | -c | execute external program |    redirect stdout     | root shell

That way, the redirect is part of a sh invocation that is done under sudo.

Solution 3: redirect with tee under sudo

As Oli♦ suggested, you can also pipe your command into tee:

       ls -l /usr/bin          |     sudo        tee /ls-output.txt
-------------------------------------------------------------------------
| execute external program | pipe |      execute external program       | your shell
                                  |  sudo  | command to execute as root |    sudo

Note that the tee is executed under sudo, but not the ls. This is because tee needs root priveleges (to write to /ls-output.txt), and ls does not. If the program generating output did need root privileges, you would need to sudo both of them.

   sudo        ls -l /root              |    sudo        tee /ls-output.txt
--------------------------------------------------------------------------------
|     execute external program      | pipe |     execute external program      | your shell
| sudo | command to execute as root |                                             sudo #1
                                           | sudo | command to execute as root |  sudo #2

Also, if you don't want the output displayed on the screen, you can add >/dev/null to the very end of the line.


How to stop a infinite while loop running in background?

Use the break builtin to stop the while loop.

From help break:

break: break [n]

Exit for, while, or until loops.

Exit a FOR, WHILE or UNTIL loop.  If N is specified, break N enclosing
loops.

Exit Status:
The exit status is 0 unless N is not greater than or equal to 1.

So in your snippet, you can do:

while :; do
    if [ -n "$var1" ] ; then
        break
    fi
done

Or even shorter:

while :; do
    [ -n "$var1" ] && break
done

To pass any input to the function, use positional parameters i.e. arguments. The first argument can be retrieved by $1, second $2 and so on.

For example, if you call function foobar by:

foobar spam

In the function you can use get spam by using $1:

$ foobar () { echo "This is $1" ;}

$ foobar spam
This is spam


Is there a tool or trick to help with quoting madness?

You can avoid most layers of quoting by passing the mysql commands via stdin instead of via argv:

for server in A B C; do
    ssh "$server" 'mysql db' <<< "select * from foo where line like '%abc%';" &
done
wait

For a more generic answer, see http://mywiki.wooledge.org/BashFAQ/096


Adding a custom launcher to the Unity Launcher

The exec line needs to be:

env LANGUAGE="ja" google-chrome

So, open alarcarte and click on the 'Properties' option of Google Chrome.

Then, replace the existing command with the following:

env LANGUAGE="ja" /opt/google/chrome/google-chrome %U

After modifying it, pin it to your launcher and from now, Google Chrome would be in Japanese.


Ubuntu in suspend mode shuts off when room is cold

It is a hardware effect. You have a buildup of condensation on CPU socket, it short-cirquits near the power lines and the motherboard protection switches everything off.
May be your power unit or motherboard has a protection that shuts PC down when too cool to avoid condensation.
Anyway, you need a specially built PC to use in such conditions or at least a way to dry the air inside it.


Unable to install .deb on Ubuntu Software Center

Use gdebi to install your .deb files

sudo apt-get install gdebi

and right click on your .deb file and open with gdebi


Hello Chicks and Zeridon, do you know apt-spy ?! This debian command is present in Ubuntu too.

http://manpages.ubuntu.com/manpages/dapper/man8/apt-spy.8.html

With apt-spy you could generate a new sources.list as to your wishes.


Dreamweaver runs nicely on Wine. A native alternative would probably be nvu - i haven't tested it though.
As for Flash, it also runs nicely on Wine , with the only exception being the CS4 version.

Have you even checked wine's page before being sure that they wouldn't work?


Ubuntu and Eclipse cannot find the latest Java version

Try this I look it up and Java requires more than that I have not try this fix but here it is. Check out the page HERE

sudo apt-get install eclipse
sudo apt-get install openjdk-6-jdk openjdk-6-source openjdk-6-demo openjdk-6-doc openjdk-6-jre-headless openjdk-6-jre-lib

Execute this in your terminal. The first one installs eclipse if it is already installed it will just update it. (You will be asked to enter your password) and the second one installs all the Java stuff you may need!


Xubuntu different boot results, sometimes succeed; most of error: times attempt to read or write outsie of disk hd0

If possible, backup your important files!

Three things to do:

Check your disk SMART information

boot normally, or to a Ubuntu Live DVD/USB
start the Disks application
select the disk in the left pane
click on the "hamburger" icon
select SMART Data & Tests
review data, look for disk fail/pass messages
run tests

Lets check your file system for errors

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

Run memory tests

go to http://memtest86.org and download free memory diagnostic
run at least one full pass to test memory


How to fix Error 508 in LibreOffice Calc?

According to the list of error codes, Error 508 means your brackets don't add up. Maybe you opened a bracket and didn't close it, or you closed more brackets than you have openend before.


Partitioning advice with SSD/HDD combination

I keep my /home on the SSD, but some directories under my user(s) are symbolic linked to /data disk. Like ~/Downloads, ~/Dropbox, ~/VirtualBox VM's, etc...

Because then all the cache directories of the user can be accessed quickly, and the 'data'-directories can't fill up the root suddenly. For example when you create a VM in Virtual box with 64GB disk for a test, suddenly the disk might be full.

Due to reinstalling my os every 6 months (to have a clean system and to learn), I started writing some basic bash scripts, that in the end, I just run command by command anyway, but it gives me a lead and I put reminders. All my favourite apt-get installs are in there, fixes, tricks and my directory creation. Following is a part of it

##after your hdd is mounted on /data let's say
# remind adjust /etc/fstab
MEMEME=$(whoami)
MYSECONDHOME=/data/home/${MEMEME}
sudo mkdir -p ${MYSECONDHOME}
sudo chown ${MEMEME}:${MEMEME} ${MYSECONDHOME}
cd ~/
mv Downloads ${MYSECONDHOME}
ln -s ${MYSECONDHOME}/Downloads ~/Downloads
mv Documents ${MYSECONDHOME}
ln -s ${MYSECONDHOME}/Documents ~/Documents
dropbox stop; sleep 5
mv ./Dropbox ${MYSECONDHOME}
ln -s ${MYSECONDHOME}/Dropbox ~/Dropbox
dropbox start
##... and so on for others
##... remind to stop services before moving their directory


Changing background colour of selected search in vim in gnome terminal

You can change that using:

:hi IncSearch ctermbg=Red

The following colors should be available:

Black
DarkBlue
DarkGreen
DarkCyan
DarkRed
DarkMagenta
Brown, DarkYellow
LightGray, LightGrey, Gray, Grey
DarkGray, DarkGrey
Blue, LightBlue
Green, LightGreen
Cyan, LightCyan
Red, LightRed
Magenta, LightMagenta
Yellow, LightYellow
White

Other options you might be interested in are:

:hi IncSearch ctermbg=<color name> ctermfg=<color name>
:hi Search ctermbg=<color name> ctermfg=<color name>

See :h hi for the complete help on these options.