If it's a "typical" wifi set up it should be running DHCP server, so both of your laptops should get an IP automatically once you connect to wifi. run ifconfig -a to confirm that you got an IP and try to ping both boxes from each other. If you can connect to your office WiFi but don't get an IP talk to your network admin and ask for IP.

Once you can ping, ssh is the way to go to connect to boxes sudo apt-get install openssh-server read more here https://help.ubuntu.com/16.04/serverguide/openssh-server.html


source code for application launcher plasmoid

There are many

There are many application launchers for the KDE:

KDE Userbase: http://userbase.kde.org/Plasma_application_launchers

Kubuntu forums: http://www.kubuntuforums.net/showthread.php?59851-KDE-Application-Launchers

Kickoff

The default application launcher - Kickoff source: https://projects.kde.org/projects/kde/kde-workspace/repository


About the sound: It is routed to the HDMI sound output. (Because Ubuntu automatically assumes that of you plug in ab HDMI monitor, the sound should also go there. Good for  TVs, bad for monitors).

Solution: Open pavucontrol

Go to Output devices, and select the correct output device there.

For video, there might be multiple culprits, (including sound actually). But still
 can you show the output of xrandr?

It should be something like:

$ xrandr
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 8192 x 8192
DVI-I-0 disconnected (normal left inverted right x axis y axis)
VGA-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 509mm x 286mm
   1920x1080     60.00*+
   1440x900      59.89
   1280x1024     60.02
   1280x800      59.81
   1152x864      75.00
   1024x768      70.07    60.00
   800x600       60.32    56.25
   640x480       59.94
DVI-I-1 disconnected (normal left inverted right x axis y axis)
HDMI-0 disconnected (normal left inverted right x axis y axis)


The 'File Manager' icon in the Unity launcher opens my Home folder. How can I get it to open my Documents folder instead?

Have a look at the answer to How to add my favorite places as a quicklist in my home's icon in Unity?

You can change the first Exec line to read Exec=nautilus Documents and it will open your Documents folder.


Can't find an icon to launch Ubuntu Tweak on Ubuntu 14.04

1) Installed right ?
First, let's reinstall the package :
sudo apt-get purge ubuntu-tweak
sudo apt-get autoremove && sudo apt-get clean
sudo add-apt-repository -y ppa:tualatrix/ppa && sudo apt-get update
sudo apt-get install ubuntu-tweak

2) Desktop file
If that didn't work, let's make sure Ubuntu Tweak installed his .desktop (launcher, kind of).
Please verify if you have the output "yes" with the commandline :
[ -e /usr/share/applications/ubuntu-tweak.desktop ] && echo yes || echo no

if the output is "yes", you can try :
  sudo chmod +x /usr/share/applications/ubuntu-tweak.desktop

if the output is "no", or if it still doesn't work, then, do this commandline :
  sudo wget http://pastebin.com/raw.php?i=ENWxyiPU -O /usr/share/applications/ubuntu-tweak.desktop && sudo chmod +x /usr/share/applications/ubuntu-tweak.desktop

3) Manually add a menu entry
If both methods did not worked, we're going to try to manually add a shortcut. You'll need alacarte:
sudo apt-get install alacarte
alacarte

Create a new menu entry :
Name: Ubuntu-Tweak
Command :  ubuntu-tweak
Icon : /usr/share/icons/hicolor/48x48/apps/ubuntu-tweak.png


Sound Logout Ubuntu 12.04 & Mac OS 9 Theme

Here's two links:

http://www.noobslab.com/2012/05/mac-os-x-lion-for-ubuntu-1204-precise.html
http://techmix.net/blog/2011/07/17/how-to-change-login-sound-in-ubuntu-11/


Prevent a window from being active on screen directly after being launched

I'm assuming that you wish that launched windows will not take the focus from your active window at launch time. If you are running Unity it is easy to do so.
Launch CompizConfig Settings Manager, Click General Options and then choose the Focus & Raise Behaviour.
This is the place where you will notify the WM which windows will be prevented from taking focus.
Click the + button and just fill in the identification of the windows. If you don't know the Window Class you can click Grab and click on the window you want to prevent. It will automatically detect its class.

By the way, the Invert  will do the opposite - Will force a window to open in focus.


Fix scaling of java-based applications for a high DPI screen

A major convenience upgrade would be to use a background script, automatically setting the resolution per application, while you can set different resolutions for different (multiple) applications at once.

That is exactly what the script below does.

An example of a default resolution of 1680x1050:

Running gedit, automatically changing to 640x480:

Running gnome-terminal, automatically changing to 1280x1024:

When the application is closed, the resolution is automatically set back to 1680x1050

How to use

Copy the script below into an empty file, save it as set_resolution.py
In the head of the script, set your default resolution, in the line:

#--- set the default resolution below
default = "1680x1050"
#---

In the very same directory (folder), create a textfile, exactly named: procsdata.txt. In this textfile, set the desired application or process, followed by a space, followed by the desired resolution. One application or script per line, looking like:

gedit 640x480
gnome-terminal 1280x1024
java 1280x1024

Run the script by the command:

python3 /path/to/set_resolution.py

Note

The script use pgrep -f <process>, which catches all matches, including scripts. The possible downside is that it can cause name clashes when opening a file with the same name as the process.
If you run into issues like that, change:

matches.append([p, subprocess.check_output(["pgrep", "-f", p]).decode("utf-8")])

into:

matches.append([p, subprocess.check_output(["pgrep", p]).decode("utf-8")])

The script

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

#--- set the default resolution below
default = "1680x1050"
#---

# read the datafile
curr_dir = os.path.dirname(os.path.abspath(__file__))
datafile = curr_dir+"/procsdata.txt"
procs_data = [l.split() for l in open(datafile).read().splitlines() if not l == "\n"]
procs = [pdata[0] for pdata in procs_data]

def check_matches():
    # function to find possible running (listed) applications
    matches = []
    for p in procs:
        try:
            matches.append([p, subprocess.check_output(["pgrep", "-f", p]).decode("utf-8")])
        except subprocess.CalledProcessError:
            pass
    match = matches[-1][0] if len(matches) != 0 else None
    return match

matches1 = check_matches()

while True:
    time.sleep(2)
    matches2 = check_matches()
    if matches2 == matches1:
        pass
    else:
        if matches2 != None:
            # a listed application started up since two seconds ago
            resdata = [("x").join(item[1].split("x")) for item in \
                       procs_data if item[0] == matches2][0]
        elif matches2 == None:
            # none of the listed applications is running any more
            resdata = default
        subprocess.Popen(["xrandr", "-s", resdata])
    matches1 = matches2
    time.sleep(1)

Explanation

When the script starts, it reads the file in which you defined your applications and their corresponding desired screen resolutions.

It then keeps an eye on the running processes (running pgrep -f <process> for each of the applications) and sets the resolution if the application starts up.

When pgrep -f <process> does not produce output for any of the listed applications, it sets the resolution to "default".

Edit:

"Dynamic" version (as requested)

While the version above works with multiple listed applications, it only sets the resolution for one application at a time.

The version below can handle different applications with a different (required) resolution, running at the same time. The background script will keep track of what is the front most application, and will set the resolution accordingly. It also works fine with Alt+Tab.

Note that this behaviour might be annoying if you switch a lot between the desktop and listed applications; the frequent resolution switch might be too much.

differences in how to setup

The setup is pretty much the same, appart from the fact that this one uses wmctrl and xdotool:

sudo apt-get install wmctrl
sudo apt-get install xdotool

The script

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

#--- set default resolution below
resolution = "1680x1050"
#---

curr_dir = os.path.dirname(os.path.abspath(__file__))
datafile = curr_dir+"/procsdata.txt"
applist = [l.split() for l in open(datafile).read().splitlines()]
apps = [item[0] for item in applist]

def get(cmd):
    try:
        return subprocess.check_output(["/bin/bash", "-c", cmd]).decode("utf-8")
    except subprocess.CalledProcessError:
        pass

def get_pids():
    # returns pids of listed applications; seems ok
    runs = []
    for item in apps:
        pid = get("pgrep -f "+item)
        if pid != None:
            runs.append((item, pid.strip()))
    return runs

def check_frontmost():
    # returns data on the frontmost window; seems ok
    frontmost = str(hex(int(get("xdotool getwindowfocus").strip())))
    frontmost = frontmost[:2]+"0"+frontmost[2:]
    try:
        wlist = get("wmctrl -lpG").splitlines()
        return [l for l in wlist if frontmost in l]
    except subprocess.CalledProcessError:
        pass

def front_pid():
    # returns the frontmost pid, seems ok
    return check_frontmost()[0].split()[2]

def matching():
    # nakijken
    running = get_pids(); frontmost = check_frontmost()
    if all([frontmost != None, len(running) != 0]):
        matches = [item[0] for item in running if item[1] == frontmost[0].split()[2]]
        if len(matches) != 0:
            return matches[0]
    else:
        pass

trigger1 = matching()

while True:
    time.sleep(1)
    trigger2 = matching()
    if trigger2 != trigger1:
        if trigger2 == None:
            command = "xrandr -s "+resolution
        else:
            command = "xrandr -s "+[it[1] for it in applist if it[0] == trigger2][0]
        subprocess.Popen(["/bin/bash", "-c", command])
        print(trigger2, command)
    trigger1 = trigger2

Notes

Although I have it running for several hours without an error now, please test it thoroughly. If an error might occur, please leave a comment.
The script -as it is- works on a single monitor setup.


How to use Redatam (statistics program) with Ubuntu, or recomend alternative

R is probably the most famous and most powerful open source statistics application on Ubuntu. It's free but you will need to learn how to use it. If you're doing this stuff all the time, that probably won't be too hard. If programming doesn't come naturally to you, you might struggle with it.

Matlab has a Linux version and is very popular for statistical analysis. Again, this is a language driven application so there is lots of syntax to learn.

GNU Octave is free and open source. Less popular than Matlab or R. Language-driven
again.

SPSS is probably the most commercially used application and is probably the best fit for exactly what you're doing (the others will do what you're asking - but you'll need to program them to do it). SPSS is another HUGE application though so there's going to be a certain amount of learning. They have a Linux version (Debian 6 is the latest they support but this should work on Ubuntu too).

Matlab and SPSS have various purchasing options (depending on your organisation) and they vary in different countries anyway, so I'll let you look them up. If you can put the work in, R is every bit as good as them though, and free.


The /lib/modules directory somehow got deleted.  Reinstalling the OS from scratch fixed the problem.


Ubuntu 20.04.2 bluetooth headphones stops playing/loses A2DP configuration

I think I fixed the problem. Not sure which one helped:
sudo nano /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf

changed wifi.powersave to 2
sudo nano /etc/bluetooth/input.conf

set IdleTimeout=0


My /etc/environment was corrupted; fixing that solved this issue.


Ubuntu One Music Streaming API - getIndexes.view only returning a subset of artists

By default, Ubuntu One's Subsonic API implementation will only return MP3s, which is why some of your music is not being returned.  This is done since we can't rely on clients supporting other formats.

If you change your client ID to start with ubuntu (e.g. use ubuntu-haiku instead of haiku), the server will assume you know how to handle Vorbis files too.


Problem webcam Ubuntu 14.10, please help me! :(

I lied the link that you actually want which actually is good is https://obsproject.com/download#linux open broadcasting software obs


I/O error : Permission Denied(qbittorrent)

Some years ago I'd a similar problem and found a solution according to this link.

Here is the note of aqeel13932:

  The real problem is I have a NTFS partition where my torrents located.
  when it's mounted it usually take the name "New Volume" but when I was following the steps of sledgehammer999 mentioned I noticed that the in /media/[Username]/ there was two folders one called "New Volume" the other called "New Volume1" which represent my real partition
  so what I just did:

1 - unmounted the partition.
2 - deleted the "New Volume" folder in "/media/[User]/"
3 - mounted my partition.
4 - recheck my torrents
and it worked perfectly.

Hope this help others


The lock to launcher is indeed not working for matlab. There is however a .desktop file that is part of the Matlab installation.

sudo ln /usr/share/app-install/desktop/matlab-support:matlab.desktop /usr/share/applications/matlab.desktop

You have to update a few things in this file (matlab.desktop):

[Desktop Entry]
X-AppInstall-Package=matlab-support
X-AppInstall-Popcon=3
X-AppInstall-Section=multiverse

Version=1.0
Type=Application
Terminal=false
Exec=matlab -desktop
Name=MATLAB
Icon=_usr_share_icons_hicolor_48x48_apps_matlab
Categories=Development;Math;Science
Comment=Scientific computing environment
StartupNotify=true
StartupWMClass=com-mathworks-util-PostVMInit

X-Ubuntu-Gettext-Domain=app-install-data

Give the icon an absolute file path by changing the icon path above to

Icon=/usr/share/app-install/icons/_usr_share_icons_hicolor_48x48_apps_matlab.png

And change:

Terminal=true

Now you should be able to lock the icon to the launcher as well as start matlab from there.


kubuntu 18.04: My touchpad sensitivity is way to high, configuring the touchpad in system settings doesn't affect anything

Open the Activities overview and start typing Mouse & Touchpad.
Click on Mouse & Touchpad to open the panel.
Adjust the Pointer Speed slider until the pointer motion is comfortable for you. You will see one slider per each pointing device, such as mouse or touchpad.

There is an option for Touchpad sensitivity.

This is from the Help pages from Ubuntu: https://help.ubuntu.com/stable/ubuntu-help/mouse-sensitivity.html.


I had a similar problem (no boot, no grub) that I fixed by:

Read man grub-install

Boot from a Live USB key.
Open a terminal window Ctrl-Alt-T
Do sudo grub-install /dev/sda
Note: I also did sudo grub-install /dev/sda1, but I don't think it helped my problem.


I seem to be having the same problem.

Strangly only happens on certain programs (eg grsync and terminal) and not others (eg gedit and nautilus).

When it happens my system is not workable, the empty help page forces itself on the foreground. It closes upon Quit or Force Quit from launcher, but immediately opens again.
I can move other open windows, but can't use them since the help page sort of 'forces itself' and doesn't allow input in other apps. CPU load goes up, due to yelp and xorg, but not to 100%.

Typing 'yelp' in terminal without arguments works fine, except for several repeats of this message:
** Message: console message:  @0: event.layerX and event.layerY are broken and deprecated in WebKit. They will be removed from the engine in the near future.
(don't know what that means)

I want to backtrace, but since everything works fine from terminal there's no real use, so I was wondering what arguments yelp needs to display specific help info (eg for grsync)? Without arguments 'Ubuntu desktop guide' is displayed and everything is fine.

I'd appreciate any help, thanks

Precise Pangolin 64-bit, Kernel 3.2.0-24-generic, Intel® Core™ i5-2430M CPU @ 2.40GHz × 4, AMD Radeon HD 7400M Series on a Sony Vaio laptop


Unable to launch application with keyboard shortcuts in 16.04

Check if key is working:

sudo apt install evtest
sudo evtest

Choose correct device and press super key. Exit with Ctrl + D.

Create new user and try it there. User can be removed after testing

sudo adduser USERNAME
sudo deluser --remove-home USERNAME


FRESH INSTALL NEEDED? Error message: 'not all updates can be installed...'

you might want to try going through this guide and cleaning up some of the installed software?
http://www.ubuntugeek.com/cleaning-up-a-ubuntu-gnulinux-system-updated-with-ubuntu-14-10-and-more-tools-added.html


Different display scale settings - 18.04

On Gnome 3.32 (default for Ubuntu 19.04) is possible to set up fractional scaling even for X. The command is:

gsettings set org.gnome.mutter experimental-features "['x11-randr-fractional-scaling']"

After that you can go to Display Settings and sets different scaling ratio for each monitor you have, even in 25% increments.

If, for any reason, you need to reset fractional scaling, the command is:

gsettings reset org.gnome.mutter experimental-features


This seems to start plasma_store limiting the used memory to 1GB. As soon as you stop the command, the memory should be freed.

  The -m flag specifies the size of the store in bytes, and the -s flag
  specifies the socket that the store will listen at. Thus, the above
  command allows the Plasma store to use up to 1GB of memory, and sets
  the socket to /tmp/plasma.

Source: https://arrow.apache.org/docs/python/plasma.html


PC BIOS does not recognise External HDD as bootable after installing Linux

Not sure if this will solve all your problems but have you considered using Plop boot manager. It lets you boot from any device even without BIOS support.
  http://www.plop.at/en/bootmanagers.html


Minecraft for Ubuntu 12.04 does not pass done loading screen

Try running:

export LD_LIBRARY_PATH="/usr/lib/jvm/java-7-openjdk/jre/lib/amd64/"

before starting minecraft. The location might be different so you should hunt around in /usr/lib/jvm/[java folder]/ for a similar place.

I had this problem in arch and this solved it but because it was not ubuntu I'm guessing the location would be different.


adduser adds user to a group. Use sudo useradd username to add user onto the system


I prefer you to go to the synaptic package manager there type "open office" in the search space. you will then find what applications of open office you have downloaded and from there you may uninstall open office completely. try to do this it might solve your problem. Remember that you have to install "synaptic package manager" first.


Unable to see the UI while using USB modem

If your manufacturer  does not support linux you won't get any GUI but for monitoring your data you can use modem-manager which is available in software center.

In windows ubuntu partitions appear to be unformatted because windows doesn't recognise ext4 format partitions.
And finally about boot repair you can use boot-repair.
Instructions on how to get it and how to use it are here.
To install from terminal

Open the terminal and run the following comamnds

sudo add-apt-repository ppa:linuxonly/modem+manager+gui
sudo apt-get update
sudo apt-get install modem-manager-gui


How do i put 3 windows side by side using keyboard shortcuts in 14.04?

Intro
The script below serves to resize windows to 1/3 of the screen width, and place them to either left, center, or right position.There are numeric options, 0 for left, 1 for center, and 2 for right.
The script relies on xdotool so make sure to install that with sudo apt-get install xdotool.
In Unity, the script must operate on unmaximized windows. The reason for that is because Unity locks windows in place when they are maximized, making them not respond to whatever command xdotool issues.
Note: This script will be updated and refined over time. I will likely add it to my personal github repository but as of right now it exists as a gist
Setting Shortcut
Go to System Settings  -> Keyboard -> Shortcuts -> Custom and click on the + button in the lower left corner to create new entry. Provide a custom name and full path to script ( or bash /path/to/script ARG ) as in my example .

Save it, and click on the right field . You will be prompted to press keys that you want to correspond to this shortcut. I've set it to Ctrl Super 1.

You now have a shortcut for placing window to the left. Repeat the same steps for center and right shortcut.
Script Source
#!/bin/bash
# run script like so:  bash thirds.sh NUMBER
# where NUMBER is 0,1 or 2
# 0 is left, 1 is center, 2 is right
get_screen_geometry()
{
   # determine size of the desktop
   xwininfo -root | \
   awk  -F ':' '/Width/{printf "%d",$2/3}/Height/{print $2}'
}
xdotool getactivewindow windowsize $(get_screen_geometry )

xdotool getactivewindow windowmove \
$(get_screen_geometry | awk -v POS=$1  '{ printf "%d ", POS*$1  }'  ) 0


Unable To Log In - Won't Accept Password

Reboot. If you can see the GRUB menu, choose Advanced options for Ubuntu and select one of the "recovery mode" entries. You will see a menu like this:

Choose the root entry.
In the prompt that appears enter these commands:

mount -o rw,remount /
passwd <USER>

Replace <USER> with your username.


xserver-xorg-input-synaptics-lts-quantal is the default driver for touchpad in ubuntu 12.04, see whether it is there or not. If it is not there then try

sudo apt-get install xserver-xorg-input-synaptics-lts-quantal

If it is there then try to reconfigure it with

sudo dpkg-reconfigure xserver-xorg-input-synaptics-lts-quantal

If it states that it is not installable, then try to install the another version with

sudo apt-get install xserver-xorg-input-synaptics

Before installing do sudo apt-get update

logout and log in back, might need restart...

Hope this helps..


After installing fglrx on Ubuntu 14.04 there is no backlight (hd 5470). Is there any workaround?

Try adding acpi_backlight=legacy or acpi_backlight=vendor (not both) as a kernel parameter.

If it doesn't help, you could look into this Wiki-Article for more information.

Good luck!


Ubuntu booted to tty. No GUI. "pkcs#7 signature not signed with a trusted key"

I found the solution. I reinstalled and reconfigured gdm3 and it automatically started.
Reinstall gdm3:-
sudo apt-get install --reinstall gdm3
sudo dpkg-reconfigure gdm


Problems with Ubuntu MATE 16.04.01 LTS and Acer Aspire ONE D150-1 Bk

I solved these problems by updating the BIOS of my netbook to the latest version.


How to create an alias for an ip address on a network on ubuntu?

If you do not want to setup a custom DNS server, then you can define a hostname for your ip address by adding it statically to the file /etc/hosts/. The format is simple, and illustrated by the data that is there by default. For example
127.0.0.1   localhost

makes it so that the local host can be reached by the hostname "localhost".
That has to be done for each client computer that needs access.


Reinstall your hard disk back into your computer.

Then to check the file system on your Ubuntu partition...

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

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

boot to a Ubuntu Live DVD/USB
start gparted and determine which /dev/sdaX is your Ubuntu EXT4 partition
quit gparted
open a terminal window
type sudo fsck -f /dev/sdaX # replacing X with the number you found earlier
repeat the fsck command if there were errors
type reboot


How to get KeePass to properly work with Chromium?

You must add {DELAY=50} at first of keystroke sequence and it will slow down typing rate of all text. This will make typing in Google Chrome or Chromium is correct.

I hope this can help you.


Original answer from "Steam Install Error on 14.04 Ubuntu 64bit"

Try this :

sudo apt-get install libc6:i386

sudo apt-get install libgl1-mesa-glx-lts-trusty:i386

Then relaunch Steam


How to activate support for ANSI escape in terminal?

It is a problem related to LESS

Set up the environment variable.

export LESS="-eRiMX"

and It is fixed. For making it global, add it to your .bashrc file in your home folder.

Source :

http://excid3.com/blog/how-to-fix-esc-in-your-terminal/


How do I copy files and return which files were copied?

Open the terminal and type:

cd /path/to/source/directory # in your question it is the current directory
cp -rv . /path/to/destination/directory # in your question it is named filename

cp - copy files and directories
-rv stands for two options of cp: recursive and verbose. The verbose option returns which files have been copied.
The . character after -rv stands for the current directory.


I've solved by:
1- Re-configure internet connection with:
sudo ip link set dev eth0 down
sudo dhclient eth0

2- update:
sudo apt-get update

3- reinstall unity:
sudo apt-get install unity

4- reboot


Manually change cron file without crontab -e

This solution was tested on: Ubuntu 18.04 and Debian 9, both on PC and ARM (raspberry pi3 and udoo neo).

I found the solution in a doc from 1999 (thanks redhat). Cron (Vixie) was released on 1993.

It says that you need to add your cron jobs to /etc/crontab, but It's better to add your crontab jobs to /etc/cron.d/username. Change username by your user (root, john, etc.) and It's done!.

IMPORTANT TIP

In /etc/crontab/ or /etc/cron.d/username you must set the username that run this cronjob inside the file. Example syntax:

* * * * * root echo "Hello World"

This is a pretty easy example but you should take care of syntax. For a few more examples and information about cron and their periodicity you can check Ubuntu's cron manual.


If you have a bootable windows device use this to fix mbr so you can boot in to Windows.

There are plenty of guides to fix windows mbr.

Then, use an Ubuntu 15.10 device to install bootloader.


Removing ndiswrapper and inserting it back hangs OS after several times

If your computer is connected over wifi via ndiswrapper, removing it could certainly cause problems. If you insist on uninstalling ndiswrapper, you may want to disconnect your wireless connection and even remove the windows driver first. If your wifi drops there are many possible causes:

too far from router
outdated/unsupported driver
modem configuration, interference in the building, any other cause that could interfere with wifi...

If your wifi drops, don't remove ndiswrapper. First try to reconnect, what happens? You could use the command sudo ifconfig [wlan0] [down/up] where wlan is your wireless adapter (could be wlan1, ra0...). Treat this as a wireless issue and troubleshoot it accordingly. It would help if you would post the chipset and windows driver you're using, that way device-specific troubleshooting steps could be looked at.

See more on wireless troubleshooting here, here, here, and here.


Additional printer settings button is unresponsive

I needed to install Print Settings (system-config-printer).


I'm not sure if you are able to do that in Unity 2d, but this program might help:

http://m.omgubuntu.co.uk/2011/10/unity-2d-tweak-app-updated-for-11-10/?wpmp_switcher=mobile


Is there a game that works on one computer but with four players?

I would go for super tux kart! It's like mario kart but with a Linux feel to it :)
It's a 3D game but it has simple graphics and it's done in a playful way.

It's available in the software center or from sourceforge.

As you can see below, it works well with a 4-way split screen.


Why won't the mute key LED light go out at all?

I figured it out. I am having a Jabra USB headphone dongle plugged into my laptop at all times since I use my Jabra's all the time for conferences and music. It's a USB-C dongle that my headphones connect to when I turn them on. I just unplugged the dongle. hit the mute key and the LED went out. Then I put the dongle back in and now I can toggle mute/unmute with the LED coming on and going off.  I had that dongle inserted during the update from 20.10 also. It's so small and in use all the time so I had totally forgotten about it!


mp3 codecs cannot be installed no software is actually installing

Have  you checked if you are able to connect to Internet? If yes, update the software list first

sudo apt-get update

sudo apt-get install ubuntu-restricted-extras


Ubuntu 17.04 Suddenly Crashed And No Idea Why

Start with the simple stuff first...

Lets first check your file system for errors.

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

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


Looks like they ended ubuntu one contacts sync mobile support.
See this canonical blog post.

There's an upcoming change / revamp in the contacts system, including google contacts sync.


mongodb does not shutdown cleanly on system shutdown

Indeed, there is a limit on the time that services are allowed to take to shut down. Ubuntu uses upstart to start and stop services, and upstart's default limit for that is 5 seconds (see the upstart documentation on kill timeout). Possibly it will solve your problem if you increase that timeout. You have to place the kill timeout directive mentioned in the link in the upstart configuration file for mongodb. On Ubuntu 12.04, this file is found at /etc/init/mongodb.conf. You can find an upstart file that contains the kill timeout directive in the current mongodb source. (However, this file may not work on your Ubuntu system due to different paths.)

I had the same problem on Ubuntu 12.04 even without replication, and for me kill timeout 300 fixed the problem.


Inconsistent Resolution / Positions / Fractional Scaling for 4K Display & HD Display Using NVIDIA Drivers

This is a known issue with KDE and Nvidia (never seen it in Gnome and this is not a fix for any other desktop), luckily a semi fix (I can't get the giant lock screen fixed yet) is quite simple and GUI only.
First undo any changes you to scaling, just take make sure there is no issues with that.
Next get the Nvidia drivers from this PPA and install them (they are a bit more up to date)
sudo add-apt-repository ppa:graphics-drivers/ppa && apt update
sudo apt install nvidia-graphics-drivers-440
sudo reboot

Now in KDE open the system settings >> Appearance >> fonts and scroll to find "Force Font DPI" and check the box, I set this to 120, you may have to tweak this number, now reboot.

This will of mostly fixed any scaling issues, there is a chance some icons are still tiny, however you can fix this in the system settings too.
Go to System Settings >> Appearance >> Icons and click the Configure Icon sizes button, here you can adjust the sizes of various types of icons around the desktop in real time.

Now you can go back to display settings and adjust the scaling as you like, everything should scale together.
Why is this still an issue in 2020? I don't know, seems to be an Nvidia issue, rather than an Ubuntu one.


Rugged Effect on Trash and Workspace viewer

This is a known bug.

A workaround is to alter the theme file for the panel:

Alt + F2 → gksu gedit /usr/share/themes/Ambiance/gtk-2.0/apps/gnome-panel.rc
At the top part of the file, add this new style:

style "panel-applet-context-menu" = "dark"
{
    xthickness = 0
    ythickness = 0

    bg[NORMAL] = "#4b4a46"

    engine "murrine" {
        textstyle = 2
        text_shade = 0.35
    }
}

Change

widget "*PanelApplet*"            style "panel"

to

widget "*PanelApplet*"            style "panel-applet-context-menu"

Save and run
Alt + F2 → killall gnome-panel


Will upgrade from 12.04 to 14.04 work with LVM encryption?

In general the upgrade system will work but if we all say "yes" to your question and the system does not what then?! Maybe it can be fixed, maybe not. But at that moment you have a problem that might need a format or a rebuild of your system. Who knows.

Your problem has a very simple solution: make a backup and make sure you know how to and that you can restore that backup.


Double-sided printing is grayed out? UBUNTU 16.04 / BROTHER MFC-7360n printer/scanner

The driver for the Brother MFC-7360n has no double-side printing feature hence the "not available".

The online brochure for this model says:

Duplex Printing
– Helps save paper
(Not available on MFC-7360n)


Set up of ubuntu 18.10 server on ZFS error on boot

Solved it, had the wrong mountpoint. So in BusyBox ran

zfs set mountpoint=/ tank/os/ubuntu
reboot

This booted up normally.


Unable to delete a folder, it keeps recreating itself

The folder belongs to gstreamer package:

  GStreamer is a development framework for creating applications like
  media players, video editors, streaming media broadcasters and so on

It is likely that whichever video/audio player you are using is relying on that framework, hence it's creating the config directory for it. Deleting it is somewhat pointless, as it will reappear.


Quick method to create a file and open it

There's no such shortcut, Apparently, one could use Alt+. according to Sebastian Stark's answer
touch ${filename}
xdg-open <alt>+<.>

If your shell uses libreadline ( which /bin/dash on Ubuntu does not, but bash does ), then you can use that shortcut.

You can also create a file with shorter number of characters via bash:
: > ${filename}; xdg-open ${filename}

In this case, : command is built-in no-op command, which only returns exit status of 0 for success, but the trick here is that shell creates new or truncates existing file designated by ${filename}. xdg-open opens the said filename in default editor, since it will be just a plain file.
If you want to go even shorter, you can use bash history expansion feature to reuse command parameters:
: > myfile.txt ; xdg-open !#:1

If portability is a concern, you should use $_ for other shells. Of course, you can turn these into function or alias and call the alias or function name; call it something like mko() for "make and open":
# function definition to put in ~/.bashrc
mko(){  : > "$1"; xdg-open !#:1 }
# call it as so:
mko ~/Documents/myfile.md

Making a function also has advantage in adding a template to the file, if you need that:
mko(){
cat > "$1" <<EOF
### HEADING1
- bullet 1
- bullet 2
EOF

xdg-open "$1"
}

Sidenote: in case you also need to create directories along the path, you should use mkdir -p, see the related question.
Sidenote No.2: dessert's answer actually addresses a very fair point: most text editors do allow specifying a pathname for new file as one of their arguments. However, in cases where file has to exist - otherwise you get No such file or directory error - well, you can use this answer. Consider also that > truncates an existing file, so this can be useful where you want to quickly clear the file and start adding new content.


To enable it the rewrite module, run "apache2 enable module rewrite":

sudo a2enmod rewrite

You need to restart the webserver to apply the changes:

sudo service apache2 restart

If you plan on using mod_rewrite in .htaccess files, you also need to enable the use of .htaccess files by changing AllowOverride None to AllowOverride FileInfo. For the default website, edit /etc/apache2/sites-available/default:

    <Directory /var/www/>
            Options Indexes FollowSymLinks MultiViews
            # changed from None to FileInfo
            AllowOverride FileInfo
            Order allow,deny
            allow from all
    </Directory>

After such a change, you need to restart Apache again.

Apache documentation on AllowOverride
Manual page of a2enmod


Win Key/Super Key doesn't do anything on logitech G610

So, I used this keyboard: logitech G610. It was the only mechanical keyboard I could get at a local store, so I didn't anticipate the "gaming button". It is one of the special buttons, similar to the multimedia keys and it is labelled with the pictograph of a joystick, I now realise.

Pressing this button turns off the win keys as in windows this would presumably return the screen to the desktop.

I must have pressed it by accident and it keeps the state over reboots. It has no other function other than turning off the win keys as far as I can tell.


Fullscreen Video Tearing on Ubuntu 14.10 (Haswell Graphics)

This problem was happening on Ubuntu 16.04 on my Macbook Pro. I solved it with these steps:

 sudo apt-get install compizconfig-settings-manager

Then go to General -> Composite and uncheck "Unredirect Fullscreen Windows". Best of luck!


Why does the gnome-control-center say that I am running 16.04 when I am running 15.10?

Ubuntu 15.10 still comes with Gnome 3.16 by default.

GNOME 3.18 is the one that will be released (at the time of this writing) with Ubuntu GNOME 16.04, and gnome-control-center is directly backported from 16.04 on the GNOME 3 Staging PPAs with the Ubuntu GNOME 16.04 logo patched into it at build time.


Sounds like you having the same fun as a few people with Ubuntu and the ATI cards in 12.10

However there are ways around it.

First of all I would suggest you get your pc back to working order (albeit without full propriety ATI support) so you do not have to start in text mode again.

I would clean out any installs you have of the ATI drivers (so you can start again properly)

Open up a terminal (ctlr+alt+t) and insert the following command to cleanse your system of what has been installed so far:

sudo apt-get remove --purge fglrx-updates fglrx-amdcccle-updates

This should return your pc to its previous albeit open source state.

There is an issue many people have found with ATI's current driver which is affected by X-org changes with 12.10

I suggest you read this really excellent guide that Steven Myall did on ATI cards

Steven Myalls guide on Ask Ubuntu

This alerted me (I too have an ATI card which is a pain!) to the fact that I would have to downgrade my system slightly as I would also have to  using this approach from Computers and You.

Computers and You guide to fixing ATI in Ubuntu 12.10

Personally I have to be honest here Michel and ask you to think about how much you need the proprietary  drivers compared to the open source ones. For me for the amount I use them, it was not worth me doing this yet but I will do when I get a bit of time to mess around.However I do not do gaming or watch lots of videos.

However both sources I feel really go a long way to getting your system running Ubuntu with ATI drivers so if you want to get them working, these are the best ways.

Let us know how you get on.


Display got messed up, can't see most of the screen

[1] With xrandr:

How do I change the screen resolution using Ubuntu command line?

[2]
Start the console (lalt+f2 or win+f2 or rescue mode from your install media).
Check "Monitor" section in /etc/X11/xorg.conf. Are there any exotic resolutions listed? Put single entry, pretty much obvious for your setup. Try "man xorg.conf" to get you started. xorg-server also has a small tool that should calculate VESA resolution entries for your monitor.

cvt -r 1280 1024 60

produces

Modeline "1280x1024R"   90.75  1280 1328 1360 1440  1024 1027 1034 1054 +hsync -vsync

Put the Modeline into monitor section (but don't copy/paste above one). With just a single entry, X should stuck with it.

[3]
Depending on your desktop environment (kde/gnome/lxde/ etc.) resolution might be set in user's profile. Try adding different user and log in with it. Is resolution the same? Refer each of mentioned GUI-s...


Fix "NTFS Partition is in an Unsafe State" without Windows installed and ntfsfix refusing to operate

In the past, when you were running Microsoft Windows, much of the disk's data, file metadata, disk metadata and possibly Secret Microsoft Stuff was kept in RAM, for quick, easy access. The way you last shutdown/turned off/pulled the plug on Windows kept it from bringing the disk to a consistent, up-to-date state. Thus, the The NTFS partition is in an unsafe state.... message.

I'm unfamiliar with ntfsfix, but ntfsfix refuses to operate with read-write mounted device means that you have the drive mounted with the read-write options, so that any other process can write to the disk while ntfsfix is performing disk surgery. This can lead to total confusion and data loss. You must unmount the disk first

sudo umount /dev/whatever

so that when you subsequently run ntfsfix, ntfsfix can ensure it has exclusive access to the disk. You still may not recover your data, but this will get you closer.


How to reference a file relative to the current dir in a shell script?

From myproject/docs/copy.sh you want 2 directories up and into target. You can do that with ...

../../target/myapp.jar

This though ...

scp ~/Projects/myproject/target/myapp.jar user@myip:/var/www

I would use a variable and set it at the beginning of your script or from a configuration. You can't use ../../ inside the scp when you have "Projects" above it.

This will give you the directory your script is in:

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"


To check whether the USB is really disfunctional, I ran

sudo badblocks -c 10240 -s -w -t random -v /dev/sdb1


How to replace avconv with (the real) ffmpeg and have it work right?

Updated Answer for Pre-2015 Releases

Because no one is maintaining an all-inclusive ppa like Jon Severinsson's, Rmano's method of using a static build is now easiest. Note updates have to be checked and done manually.

After heading to the official ffmpeg download page, click the
link under Linux Static Builds. (The target may change so it's not
linked directly here.)
Click the appropriate (32- or 64-bit) and
desired (snapshot or numbered) release to download. (Snapshot is recommended.)
If the libav version of ffmpeg was installed, remove it. The two can not reside on the same machine. If libav was not previously installed, skip to 4.

sudo apt-get remove ffmpeg
sudo apt-get purge libav-tools
# *Ignore any autoremove message that may appear.*

Extract the files (and two directories) as follows:

For single-user systems: to $HOME/bin
For multi-user setups: to /usr/local/bin

Static build install is done and ffmpeg is ready to use.

To update: Upon checking and finding a newer release, the install folder can be sorted by date and the existing version files quickly identified and deleted. (The timestamps will all be the same as the ffmpeg binary.) The update can then be downloaded and extracted the same as the earlier release.

Should a comprehensive ffmpeg repo re-emerge, it would install as before:

# Replace avconv with the real ffmpeg
#   www.askubuntu.com/a/373509/165265
#
sudo add-apt-repository ppa:<name of ppa here>
sudo apt-get update
sudo apt-get install ffmpeg

With the real ffmpeg returning to 2015 releases and beyond, the need for this work-around will eventually fade away.

Much gratitude to the community for the help.


Save the output of darkice or icecast2 stream to file (mp3)?

A solution that I found to be easy enough to implement was to just curl the icecast2 stream itsself. The solution below is what i use with a cron job which runs every 30 mins, it records for 31 mins giving me 1 min of overlap between recordings and sets the file name to the time of start of recording.
sudo curl --output /media/usb/"$(TZ=America/New_York date +'%Y_%m_%d_%I_%M_%p').mp3" http://(icecast2 mount point) --max-time 1860


How do I install Ubuntu on a unformatted harddrive?

@Bart you can install without formatting that HDD. Because Ubuntu is going to do it for you by itself. You have to just click on Install Ubuntu, when the Installation window comes in front of you.


I could provide support for Ubuntu, but the steps may not work on some of the other distros, to start out with, you've already mentioned it doesn't have the Live boot option for performing the configuration that is available using USB.  I'm sure the ElementaryOS guru's have similar steps that with their distributed tools to resolve installation issues.  As far as working on devices, so far I haven't seen any computer that Linux didn't work on.


systemd on 15.04 won't log stdout of unit

In fact, buffering in UNIX depends on the context: when stdout is redirected to something interactive like a console - it is usually line-buffered, otherwise it is fully buffered.

Buffering may be changed inside the application using setvbuf library call.

But it can also be done with stdbuf command on launch:

ExecStart=/usr/bin/stdbuf -oL /opt/foo/.cabal-sandbox/bin/foo

(for line-buffered case)


How do I remove these "phantom" nvidia modules

I found the solution. In short: I was booting into an old kernel.

I use a program called Grub Customizer which lets me enter custom startup entries. I forgot that the main grub entry I boot from had a hard-coded reference to kernel version 4.13.0-36-generic. Once I updated that reference to the newest version, 4.13.0-43-generic and rebooted, that solved my problem.


How to upgrade OpenSSL 1.1.0 to 1.1.1 in Ubuntu 18.04?

NOTE: As of ~August 2019, openSSL 1.1.1 should be available for installation via normal package upgrades/installations for 18.04. Or, you can download the .deb package directly from here.

According to the OpenSSL website:

The latest stable version is the 1.1.1 series. This is also our Long Term Support (LTS) version, supported until 11th September 2023.

Since this is not in the current Ubuntu repositories, you will need to download, compile, and install the latest OpenSSL version manually.
Below are the instructions to follow:

Open a terminal (Ctrl+Alt+t).
Fetch the tarball: wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz
Unpack the tarball with tar -zxf openssl-1.1.1g.tar.gz && cd openssl-1.1.1g
Issue the command ./config.
Issue the command make (You may need to run sudo apt install make gcc before running this command successfully).
Run make test to check for possible errors.
Backup current openssl binary: sudo mv /usr/bin/openssl ~/tmp
Issue the command sudo make install.
Create symbolic link from newly install binary to the default location:
sudo ln -s /usr/local/bin/openssl /usr/bin/openssl

Run the command sudo ldconfig to update symlinks and rebuild the library cache.

Assuming that there were no errors in executing steps 4 through 10, you should have successfully installed the new version of OpenSSL.
Again, from the terminal issue the command:
openssl version

Your output should be as follows:
OpenSSL 1.1.1g  21 Apr 2020


Set dark theme for menubar etc (NOT editor) code::blocks

I found an answer at the following link: http://codeisland.org/2013/codeblocks-dark-theme/

For me, a Linux Mint user, the system-wide version didn't work.

I will now reproduce it here, in case the link disappears. All credits go to original finder of the workaround.

Code::Blocks theme support…

… is not existing. That is due to the fact that (for portability) Code::Blocks GUI is build using wxWidgets, which offers a “native look & feel on every platform”. This is equivalent to whatever the desktop environment thinks is right.

So, to get a dark theme in Code::Blocks, you need a dark-theme for the whole desktop environment? Yes and no.

Code::Blocks for Linux is explicitly created with the wxGTK port, meaning that the wxWidgets API is wrapped around the Gtk API. So, on Linux, Code::Blocks uses Gtk for it’s GUI.

Now, the wxGTK port is not completely up to date, so it doesn’t use Gtk-3, but the (older) Gtk-2. That is important, because the way themes work has slightly changed between those versions.

For applications which use Gtk-3, Gnome 3 offers a gtk-application-prefer-dark-theme-entry in it’s settings.ini-file, which tells all Gtk-3 apps to use the dark version of the currently set theme (if available, for example the Gnome 3 default-theme, “Adwaita”). This does however not affect Gtk-2 applications (like Code::Blocks).

Also, Gtk-3 applications can decide to not use the dark theme or to always use it (like Eye of Gnome):

GtkSettings *settings = gtk_settings_get_default ();
g_object_set (G_OBJECT (settings),
    "gtk-application-prefer-dark-theme", TRUE, NULL
);

(From the “Eye of Gnome”-source, main.c line 175)
Dark theme for Gtk2

So, I went over to Gnome-Look.org and searched for a good, dark Gtk-2 theme and found “Elegant Gnome” to be a good match. I then manually copied the theme itself [Elegant-GTK] over to ~/.themes/ and it’s icon-theme [Elegant-AwOken] to ~/.icons/.

Now, to get Code::Blocks to use the theme, you have two options: Make it the default Gtk-2 theme or tell Code::Blocks to explicitly use the theme-files you downloaded.

I choose the later option. After some research, I stumbled across a Blog-post, where I found the following method:

GTK2_RC_FILES=/path/to/your/theme/gtkrc application

This temporarily sets the environment-variable GTK2_RC_FILES to the theme-path, for the start of application (in our case codeblocks). Code::Blocks should now have a dark look.

[...]

Enable everything as default

Last but not least, I want Code::Blocks to always start with the dark Gtk-2 theme. If you set the theme system-wide, you don’t need to do this.

I put the command with the temporary theme in a shell-script and changed the /usr/share/applications/codeblocks.desktop-file to read:

[Desktop Entry]
Exec=/home/luke/.codeblocks/start_dark.sh
# More stuff down here...

Or you can copy the file to your home directory and modify it there: cp /usr/share/applications/codeblocks.desktop ~/.local/share/applications/codeblocks.desktop

The script looks like this:

# It's important to give the path to the "gtkrc"-file here!
GTK2_RC_FILES=~/.themes/Elegant-GTK/gtk-2.0/gtkrc codeblocks

And now, Code::Blocks is dark.

Getting rid of window-decoration

Now, I had a black editor and GUI theme, but a white window-titlebar. To get rid of that, I installed the “Maximus” extension for GnomeShell.

The future

This article might not work a very long time! As posted on the start-page of wxWidgets:

2012-07-09

wxWidgets 2.9.4 has been officially released. […]

2.9 series bring many improvements compared to 2.8 series […] Compared to the previous 2.9.3 release, the most important change in this release is beta-level support for GTK+ 3 in wxGTK port.

we believe that 2.9.4 can be used in production environment […]

So, it’s a matter of time until Code::Blocks will move on and use Gtk-3, which will then not work with the steps described here. I’ll update the article as soon as I run into problems with this.  I no longer use code::blocks :(


Your question does not specify if you have the wireless access and your internet is running fine with no network icon at top panel.

Well, if your network is at fault,

Open the terminal with CTRL+ALT+T .

Type rfkill list in the terminal.

You should get a similar result with wireless lan 'yes' for soft-blocked.

saket@saket:~$ rfkill list

0: sony-wifi: Wireless LAN
    Soft blocked: no
    Hard blocked: no

1: sony-bluetooth: Bluetooth
    Soft blocked: yes
    Hard blocked: no

3: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no

You can fix this by typing the following code in terminal and rebooting the laptop.

rfkill unblock wifi

If the internet access is fine and the networking icon is missing, type the following lines into the terminal and the panel should be working fine.

sudo add-apt-repository ppa:jconti/gnome3
sudo apt-get update
sudo apt-get install indicator-applet-complete
sudo reboot


Ubuntu 20.04: How can I encrypt the other hard drives on my system with the same key as my primary disk?

You can encrypt your hard drives using Disks utility which is already installed in Ubuntu 20.04.
To be able to encrypt your hard disk you need to do the following:

If you have any data, make backup and delete the partition
Click on + Create partition in unallocated space
Next
Choose Internal disk for use with Linux Systems only (ext4) && Password protect volume (LUKS)
Next, write your password
Click on Additional partition options --> Edit Encryption Options
Disable User Session Defaults --> Enable Unlock at System Startup

I hope this will help you.


Where did my close, minimize, and maximize buttons go along with my panels?

Ubuntu 11.04 uses what they call Unity. On a default install (ie - nothing with added or modified Gnome replacements or customizations), part of Unity (aside from the dock) includes a universal panel that runs along the top of any screen you have. That universal panel holds your window buttons (you'll see them appear when the window has focus). You can also access the settings and other menu items through the Ubuntu logo on the left of this panel. The other main UI part of that is that left side panel that you now see.

After a little looking, I found the following set of terminal commands that should reset Unity for you:

gconftool-2 --recursive-unset /apps/compiz-1
unity --reset
sudo reboot now

Resetting Unity and doing a clean reboot should fix your issue. If it still doesn't work, you might need to uninstall and purge AWN, then try resetting Unity again.


Installing Wine, PlayOnLinux and League of Legends on Ubuntu 16.04 LTS

Go to a terminal by pressing Ctrl+Alt+T and type:

sudo apt-get install mesa-utils

and that will solve your problem.


If you have managed to boot to Ubuntu, open a terminal and try running

sudo update-grub

It will automatically search for operating systems and may solve your problem.

If this does not help, please open a terminal and post the output of sudo fdisk -l. We can then make sure that you still have your Windows partition.


How to uninstall 8.10 while keeping 11.04?

I reckon they are both in different partitions. You could delete the 8.10 partition after doing the proper backup and telling grub to update itself since 8.10 is no longer available do to "unforeseen circumstances" = Formatted Partition ;)

But a couple of things. The shutting down I am pretty sure is not related to the 8.10/11.04 relation. I recommend you check the hardware first and maybe do a dmesg to see if something comes up that tells you the cpu is frying, the hard drive is dying or something dramatic that says this is the problem.


How to search in another language than the system language?

In the Terminal, type:

gksu gedit /usr/share/libtranslate/services.xml

List item

In the file, make this line of code bold in  the google section of the gedit file.

<language to="it" tag="en"/> `

When I looked in gedit, the language you want to change looks like this "*", so you still need to change that part to "it", but the rest is done for you.

After this, restart language translator from the dash. After you have done this, resart gnome-translate. Next, try it out with this code: echo"Hope this helps. Good luck." | translate-bin -s google -f it -t en.


What you want is to use polling approach, to continuously read output of xinput --list --name-only and figure out if the name of your mouse is there or not, and if it is - run the script. This would be something like this:

while true; do
    if xinput --list --name-only | grep -q -i 'Mouse Name' ;
    then
        echo "yes" # this is where you run script
        break # exit the loop after running the script.
    fi
done

In this case we exit loop as soon as the mouse is there. However you probably want this to be continuous so that you can connect and disconnect  the mouse. Instead of break, I'd use another while loop there, that does the opposite - waits for mouse name to disappear. Body of that while loop can be just this - true or :.


Search using a regular expression with alternation

You can use a bracket expression:

grep -rn "[GJBH] Bush"

Or group your or-expressions:

grep -rnE "(G|H|J|B) Bush"


Mount point 0 is not valid path, ignoring and cryptoswap1.swap:8 not an absolute path, ignoring

As far as I can tell you have a syntax error in /etc/fstab on the line mounting /boot (the last token is $ which AFAIK is not allowed); and you have a syntax error on the line for swap (it does not start with a /).


"PTY allocation request failed" error when trying to connect using SSH with ControlMaster

I'm assuming that you have specified the ControlPath and ControlMaster in ~/.ssh/config ? In which case ssh will always check for the ControlPath when attempting to access that server. As I understand it this is the default if a ControlPath exists even if ControlMaster=no is set (because it is automatically set to 'no' if the ControlPath exists so as not to attempt to create a new ControlMaster).

You will need to specify a new ControlPath:

ssh -o ControlPath=~/.ssh/%r@%h:%p-newsession server

However: I do the same thing but do not need to tell it to run 'false', I simply use the available options in SSH. See the man page for a way to create forwarding connections without starting a shell. When done properly the PTY is only allocated as needed, even over the same control connection.

-f      Requests ssh to go to background just before command execution.
-N      Do not execute a remote command.  This is useful for just forwarding ports.
-T      Disable pseudo-tty allocation.

So in my case (along with other, unrelated options):

ssh -fNT server

where ~/.ssh/config already specifies the ControlPath.


Python get foreground application name in Ubuntu 19.10

You just need to change two lines:

Change

window = subprocess.Popen(['xprop', '-id', window_id, 'WM_NAME'], stdout=subprocess.PIPE)

to

window = subprocess.Popen(['xprop', '-id', window_id, 'WM_CLASS'], stdout=subprocess.PIPE)

Change

match = re.match(b"WM_NAME\(\w+\) = (?P<name>.+)$", stdout)

to

match = re.match(b'WM_CLASS\(\w+\) = ".*", (?P<name>.+)$', stdout)


Ubuntu, (any version) won't install on Dell Inspiron 15 7567

I had this same laptop. The issue was solved by installing Windows 10 and updating BIOS from official Dell website, then i could install Ubuntu.


This is a known issue with the Spotify Linux client. It's something that the company is aware of, but in the meantime you can use the Spotify Gnome Integration software to get the media keys working.

Edit: Hooray, we added this feature in client version 0.9.4! It should now work, if it doesn't then please post a message on the community forums.


Virtual box works no longer, suspect a kernel update caused this

You need to purge and reinstall VirtualBox.

Back up your virtual machines somewhere safe.
Purge Virtualbox:

$ sudo apt purge virtualbox*

Get rid of old deps and configs:

$ sudo apt autoremove
$ sudo apt autoclean

Install a shiny new VBox

There are two options for installing VBox. From standard repos (Option 1) or from a PPA (Option 2). Do one or the other NOT both.

Option 1. You can install directly from the standard repos like this:

$ sudo apt install virtualbox

Option 2. Install from the PPA

If you want the absolute latest version of VBox and any potential closed source drivers follow these steps to install from the PPA.

4.2.1. Add the following line to your /etc/apt/sources.list:

deb https://download.virtualbox.org/virtualbox/debian bionic contrib

4.2.2. Download Oracle public key:

$ wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
$ wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -

4.2.3. Install VirtualBox:

sudo apt-get update
sudo apt-get install virtualbox

More info on PPA install here.

Enjoy :)


How to `cat` filename returned by `which`?

Use backticks:

cat `which gjslint`

If the path contains whitespace (unlikely with default paths), you need to put it in parentheses:

cat "`which gjslint`"

An alternative would be cat "$(which gjslint)". The reason I use backticks instead of $() is because it's easier to type, two keystrokes with one hand vs 4 keystrokes with two hands. I am aware of the disadvantages of using ` over $(), but those do no apply in this case. You're not going to nest backticks or use slashes for quickly finding a program.


How to remove all files last modified one and more months before

According to man find, you can use strings that the date command recognizes.
-newerXY reference

       Succeeds  if  timestamp  X  of the file being considered is
       newer than timestamp Y of the file reference.  The letters X
       and Y can be any of the following letters:

       a   The access time of the file reference
       B   The birth time of the file reference
       c   The inode status change time of reference
       m   The modification time of the file reference
       t   reference is interpreted directly as a time

       Some combinations are invalid; for example, it is invalid
       for X to be  t.   Some  combinations are  not implemented on
       all systems; for example B is not supported on all systems.
       If an invalid or unsupported combination of XY is
       specified, a fatal error results.   Time  specifications
       are interpreted as for the argument to the -d option of GNU
       date.  If you try to use the birth time of a reference file,
       and the birth time cannot be determined, a fatal error
       message results.   If  you specify a test which refers to
       the birth time of files being examined, this test will fail
       for any files where the birth time is unknown.
According to man date, you can use human-readable phrases like "a month ago". For more details, see GNU Coreutils Manual: Date input formats.
DATE STRING
       The --date=STRING is a mostly free format human readable date
       string  such  as  "Sun,  29  Feb  2004 16:21:42  -0800"  or
       "2004-02-29 16:21:42" or even "next Thursday".  A date string
       may contain items indicating calendar date, time of day, time
       zone, day of week, relative time, relative date, and numbers.
       An  empty  string indicates the beginning of the day.  The date
       string format is more complex than is easily documented here but
       is fully described in the info documentation.

As bac0n notes, you may be interested in find's -delete flag:
-delete
       Delete  files;  true if removal succeeded.  If the
       removal failed, an error message is issued. If -delete
       fails, find's exit status will be nonzero  (when  it
       eventually  exits).   Use  of -delete automatically turns
       on the `-depth' option.

       Warnings:  Don't  forget  that the find command line is
       evaluated as an expression, so putting -delete first will
       make find try to delete everything below the starting
       points you specified. When testing a find command line
       that you later intend to use with -delete, you should
       explicitly specify -depth in order to avoid later
       surprises.  Because -delete  implies  -depth,  you cannot
       usefully use -prune and -delete together.

       Together  with  the -ignore_readdir_race option, find
       will ignore errors of the -delete action in the case the
       file has disappeared since the parent directory was read:
       it will  not  output an error diagnostic, and the return
       code of the -delete action will be true.

So the command you need may look something like:
find -type f \! -newermt "last month" -delete


How can I always keep the Desktop icons organised, and sorted by name?

Arrange desktop icons alphabetically by command

The script below will rearrange a desktop like:

...into an alphabetically ordered desktop like:

Ordered:

directories first, then files
from top to bottom, from left to right

Set the number of items vertically

Furthermore, you can set an arbitrary number of items vertically (rows); the horizontal spacing will be set automatically accordingly.

The script

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

# set the size of the squares (indirectly, by setting n- rows)
rows = 10
# set x/y offset of the matrix if you want
x_offs = -15
y_offs = -30

def get(cmd):
    return subprocess.check_output(cmd).decode("utf-8")

dt = get(["xdg-user-dir",  "DESKTOP"]).strip()
# find size of the left screen
left = [int(n) for n in sum(
    [s.split("+")[0].split("x") for s in \
     get("xrandr").split() if "+0+" in s], [])]

# size of the squares (icon area)
sqr = int((left[1]/rows))

# number of cols, squares
cols = math.floor(left[0]/sqr)
n_sqrs = cols*rows

# define positions (matrix)
pos = list([[
    str(int((math.floor(n/rows)*sqr)+(sqr/2)+x_offs)),
    str(int(((n%rows)*sqr)+(sqr/2)+y_offs)),
    ] for n in range(n_sqrs)])

# list iconfiles, split into dirs and files, sort & combine
iconlist = [os.path.join(dt, item) for item in \
            sorted([item for item in os.listdir(dt) if not "~" in item])]
dirs = []; files = []
for it in iconlist:
    if os.path.isfile(it):
        files.append(it)
    else:
        dirs.append(it)
iconlist = dirs+files
# place icons in position(s)
for i, item in enumerate(iconlist):
    location = (",").join(pos[i])
    subprocess.call(["gvfs-set-attribute", "-t", "string", item,
                       'metadata::nautilus-icon-position', location])
# simulate F5 to refresh desktop, retry for max 20 secs if not in front
t = 0
while t < 40:
    w_id = [l.split()[-1] for l in get(["xprop", "-root"]).splitlines() \
        if "_NET_ACTIVE_WINDOW(WINDOW):" in l][0]
    if "desktop" in get(["xprop", "-id", w_id, "WM_CLASS"]):
        subprocess.Popen(["xdotool", "key", "F5"])
        break
    else:
        time.sleep(0.5)
        t += 1

How to use

The script needs xdotool:

  sudo apt-get install xdotool

Copy the script into an empty file, save it as arrange_dt.py
Test- run it by the command:

python3 /path/to/arrange_dt.py

within 20 seconds click on the desktop, your new arrangement will be applied. If you run the script from a shortcut, while the desktop is in front, the arrangement will be applied immediately. If the desktop is not frontmost, the script waits for max 20 seconds. If time exceeds, simply press F5 to apply.
If all works fine, add it to a shortcut key: choose: System Settings > "Keyboard" > "Shortcuts" > "Custom Shortcuts". Click the "+" and add the command:

python3 /path/to/arrange_dt.py

Options

You can influence the arrangement of the icons in three ways:

set the size of the "tiles"

# set the size of the squares (indirectly, by setting n- rows)
rows = 10

This will set the (max) number of icons vertically. The size of the "tiles" will, be equal (x,y)
set the horizontal offset

x_offs = -15

This will set the x- deviation from the default position of the icon-matrix as a whole
Set the vertical offset

y_offs = -30

This will set the y- deviation from the default position of the icon-matrix

An example, using:

# set the size of the squares (indirectly, by setting n- rows)
rows = 6
# set x/y offset of the matrix if you want
x_offs = 50
y_offs = 10

Explanation

The explanation below is mostly an explanation on the concept rather than the coding

To position the icons alphabetically, we first list the items on the desktop, using python's os.listdir(Desktop)
Then we split the files into two sublists; files/folders, and sort both lists, join them again, folders first.
Then we create the matrix:

Since the number of rows is set in the head of the script, we divide the height of the screen by the number of rows. Thus we have the size of the "squares" the icons will be placed in (centered).
Since the icons are similarly spaced horizontally, we can then calculate the (max) number of columns by dividing the width of the screen by the width of the "squares" in which the icons will be placed (per icon), rounded down to the first integer below.
In the image below, these "virtual" squares are visible, the red dot is where the icon is placed.

Then all we have to do is place the first icon on half of the size of a square, both horizontally and vertically.
To find the x-position of all other icons, we simply need to divide their index (starting with zero) by the number of rows, rounded down. The outcome will be added to the x position of the first icon (top left), for example:

item 10 (index 9): 9/4 = 2,25, rounded down: 2
x position = position of icon 0 + 2 x the width of a square

item 17 (index 16): 16/4 = 4, rounded down: 4
x position = position of icon 0 + 4 x the width of a square

To find the y-position of all other icons, we simply need the remainder of the index and the number of rows. The outcome x the width of a square will be added to the y position of the first icon (top left), for example:

item 10 (index 9): 9%4 = 1
y position = position of icon 0 + 1 x the height of a square

item 17 (index 16): 16%4 = 0
y position = position of icon 0 + 0 x the height of a square

Subsequently, we place the icons on the desktop, using the command:

gvfs-set-attribute <path_to_dir_or_file> metadata::nautilus-icon-position x,y

Finally, we need to press F5 with the desktop in front, to apply the changed layout (refresh the desktop). If that is the case, it will be done immediately. If not, the script re- trys during 20 seconds if the desktop is in front, virtually presses F5 and breaks. If after 20 seconds the desktop still was not in front, you need to manually press F5.


Lubuntu wireless driver problems (Lubuntu 12.04, Realtek RTL8190)

I found the same issue with Lubuntu 32Bit. What I did was attach an ethernet cable and run sudo apt-get update and sudo apt-get install -f.

By running ifconfig wlan0 up you will enable WiFi and then test with iwlist wlan0 scanto see if it recognizes any Networks; test with Ethernet and WiFi. When you are aware of which wireless network you want to connect to run iwconfig wlan0 essid NETWORK_ID key s:WIRELESS_KEY: replace NETWORK_ID with the name (essid) of the nework and WIRELESS_KEY with the network passcode.

I cannot add my source as I went looking when I had this issue. Please let me know if this helps!


Script to enable "source" downloads in a deterministic manner

In the end, I just enabled all the src repos.

sed -i '/^#\sdeb-src /s/^#//' "/etc/apt/sources.list"

This doesn't require upgrading the OS to an arbitrary version.


EDIT: in this particular instance it may be a bug - see "Light Display Manager" is offered as login option. The suggested workaround is to add the lightdm account to the list of hidden-users explicitly by editing your /etc/lightdm/lightdm.conf file i.e.

[UserAccounts]
minimum-uid=500
hidden-users=nobody nobody4 noaccess lightdm
hidden-shells=/bin/false /usr/sbin/nologin

The lightdm display manager decides whether to display an account on the login screen based on the numerical value of the account's UID. Usually in Ubuntu regular user accounts have UID values above 1000 and 'system' accounts such as the lightdm account itself have low-number UIDs and therefore don't show up - the threshold is set by a minimum-uid value in the /etc/lightdm/users.conf file e.g.

[UserAccounts]
minimum-uid=500

so if you are seeing the lightdm account on the login screen, either this value is set too low, or the lightdm account got created with an unusually high UID - you can check with the id command e.g.

id lightdm

Other *nix flavors may use different conventions for the minimum UID for regular user accounts so it's possible yours differ if the accounts were migrated or were chosen for compatibility with another system. You can see the default values for your own system by looking in the /etc/login.defs file.


First, since you are dual-booting Ubuntu and Windows 10, it is clear that currently you are using GRUB as your bootloader that comes from Ubuntu. So, to answer this part:

And how do I delete the windows boot loader from disk?

If you delete the Windows partition, the windows bootloader will be removed without causing any issue as your current active bootloader is GRUB and you are just deleting an inactive one.

To answer this part of your question:

So I was thinking why not just delete the Windows 10 by formatting the OS drive
from Ubuntu and install Windows 7 on the formatted drive. Will this work?

Yes, of course you can delete your Windows 10 partition from Ubuntu using GParted or any other similar tool (even cli ones) and then make a bootable pendrive or DVD using Unetbootin or K3B respectively. Boot from that pendrive and install windows 7 in the partition that previously contained Windows 10.

For this part:

Why can't I just delete or format Windows 10 partition from Ubuntu without using Gparted?

Yes, you can use other tools to format your Windows 10 partition apart from Gparted such as fdisk but it's much more easier to use GParted, then anything else currrently available. If you are wondering about GParted Live DVD, then it's not absolutely necessary. You can install GParted inside Ubuntu, by typing the following command:

sudo apt-get install gparted

N.B.: If your laptop is still under warranty, then please contact your manufacturer before deleting any partition because in my country doing that voids the warranty.

Solution to N.B. You can back up your partitions with tools such as Clonezilla or the good old dd command to keep your warranty intact.


Is it possible to install Apache Tomcat 8 on Ubuntu 20.04?

You can always download and extract the tomcat8 package yourself and use a systemd script like this: https://gist.github.com/zengxs/a697d786b244d7b857d3d006213306a1
(or start the tomcat from within the bin folder)
Why is your school assignment bound to a fix version of Tomcat btw?
Cheers
Martin


Hopelessly late I know, but just in case someone else should wonder - workdir should be set for you by /usr/share/initramfs-tools/scripts/init-bottom/overlayroot. Maybe you need to regenerate your initramfs?

The default is /media/root-rw/overlay-workdir/_ and you can set it manually by adding workdir=... as an option to the overlayfs mount command/fstab entry.


How to prevent a Bluetooth headset to autoconnect without disabling Bluetooth?

Hardware solution:

Obtain a cheap USB mouse.

Put your Bluetooth mouse away somewhere safe.

Attach the USB Mouse

Open a terminal and issue the command rfkill list this will give you a listing of rf devices, preceded by an index number.

Issue the command  rfkill block n where n is the index number of the device you wish to block (in this case your bluetooth interface)

You can re-enable the device with the command rfkill unblock n where n is the index number of the device you wish to unblock (in this case your bluetooth interface)
Note: I don't have bluetooth so I tested this process with a different rf device.

Software solution:

Install blueman bluetooth manager from the Software Center or with this command:
 sudo apt-get install blueman

Note: Installation requires the "universe" repository to be active in your software sources.

Open Blueman from the dash.

Select the headset from the list

Click Setup...

A window will open up, on that window, check Do not connect.

Click Next button

You're done

You should be able to connect and disconnect bluetooth devices at will.


Error while installing unity-tweak-tool on Ubuntu 14.04

This is reiterating what the first two replies said,  but I've added a few extra steps along with why you're  doing them.

First run

 uname - r

to find what kernel version you're using.  As the update is reporting that you have an older kernel installed that is no longer required.

The first two listed are programs you no longer need - these can be safely removed, they'll be reinstalled later if they are in fact needed.

Let me repeat,  IF, AND ONLY IF,  your computer is giving you no problems run 'sudo apt-get autoremove'

The PPA error is saying that either you mistyped the address for the PPA or that the PPA no longer exists. As previously reported,  its nit for your version,  remive it.

This error can be ignored for the moment, more on this later.

In other words perform the following steps:

uname - r
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get install --fix-missing
sudo apt-get update && sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get install unity-tweak-tool

My original post had a few more steps until I saw that the PPA is not for Trusty.


Popup "The software on this computer is up to date" appearing constantly

It is not clear why you are getting constant popups of "The software on this computer is up to date."

Sometimes trying to achieve the same objective via command line may give us some clue to the actual error (or fix the problem!).

Open a terminal by pressing Ctrl+Alt+T and enter:

sudo apt-get update

wait till the flow of text stops. Copy any errors in the end if any. Then enter:

sudo apt-get upgrade

wait till the flow of text stops. Copy any errors in the end if any.

If this does not solve the problem, edit the question and include the errors you are getting.

Hope this helps


Are all versions of Ubuntu secure against DROWN attack?

CVE-2016-0800:

Priority Medium
Description
The SSLv2 protocol, as used in OpenSSL before 1.0.1s and 1.0.2 before
1.0.2g and other products, requires a server to send a ServerVerify message
before establishing that a client possesses certain plaintext RSA data,
which makes it easier for remote attackers to decrypt TLS ciphertext data
by leveraging a Bleichenbacher RSA padding oracle, aka a "DROWN" attack.

Package
Source: openssl098 (LP Ubuntu Debian)
Upstream:   needs-triage
Ubuntu 12.04 LTS (Precise Pangolin):    not-affected
Ubuntu 14.04 LTS (Trusty Tahr): not-affected
Ubuntu Touch 15.04: DNE
Ubuntu Core 15.04:  DNE
Ubuntu 15.10 (Wily Werewolf):   DNE
Ubuntu 16.04 (Xenial Xerus):    DNE

Package
Source: openssl (LP Ubuntu Debian)
Upstream:   needs-triage
Ubuntu 12.04 LTS (Precise Pangolin):    not-affected
Ubuntu 14.04 LTS (Trusty Tahr): not-affected
Ubuntu Touch 15.04: not-affected
Ubuntu Core 15.04:  not-affected
Ubuntu 15.10 (Wily Werewolf):   not-affected
Ubuntu 16.04 (Xenial Xerus):    not-affected

DNE = does not exist
Ubuntu is not affected by this problem.


Ubuntu 16.04 lock screen without dimming/turning off

I use xscreensaver instead of gnome-screensaver.

sudo apt-get remove gnome-screensaver

sudo apt-get install xscreensaver

Configure xscreensaver :

Lock screen

Those instructions are from here :
Configure screensaver in Ubuntu


To get to a command prompt simultaeously press the Ctrl+Alt+T keys.

Then type free -h and tell us how much RAM you have. For example my system shows 8 GB:

$ free -h
              total        used        free      shared  buff/cache   available
Mem:           7.7G        5.3G        445M        545M        1.9G        1.4G
Swap:          7.9G        412M        7.5G

Copy your four of lines to the clipboard (highlight with mouse and press Ctrl+C). Then edit your question and post the four lines from clipboard (press Ctrl+V) into your question.


On a dual boot computer, will it harm Ubuntu installation if I upgrade Windows 8.1 to 10?

Upgrading may mess with your grub so be prepared to do a boot repair. Otherwise it wont mess with your pre-existing partitions as windows doesn't
 even recognize the ext4 format.


Kodi hangs on splash screen at first run; apparent database error in logfile

You could 'repair' the missing data
I dont remind where is stored the ViewModes6.db file, lets say its~/.kodi/userdata/Database/ViewModes6.db
The concerned table contains only 1 line, if there is no other missing component it will be a quick fix .

# Install sqlite3 if not present
sudo apt-get install sqlite3

# Define db file location (setup your own)
DbFile="~/.kodi/userdata/Database/ViewModes6.db"

# Create the version table
sqlite3 $DbFile "CREATE TABLE version (idVersion integer, iCompressCount integer);"

# Fill in the table with default data (only 1 line!)
sqlite3 $DbFile "insert into version (idVersion, iCompressCount) values (6, 0);"

You can also use the sqlitebrowser GUI if you want it a bit easier

sudo apt install sqlitebrowser


Does Ubuntu have a Kernel Splash Screen? If so, how to enable it?

Grub Theme
What you are looking for is a Grub Theme that runs before the kernel loads with Plymouth splash screen:
Here's my Grub Theme which is a spin on Tux theme referenced in your links:


Move all JPGs and rename them into one directory

Use the numbered when using mv
numbered, t
make numbered backups

man mv
mv --backup=TYPE with type being 1 of these:

none, off       never make backups (even if --backup is given)
numbered, t     make numbered backups
existing, nil   numbered if numbered backups exist, simple otherwise
simple, never   always make simple backups


How can I automatically turn off an external monitor that has been idle for a certain amount of time using a command/script?

You are on the right track with xprintidle. All you need to do is configure a periodic check inside an infinite loop. If the system is idle, you turn the display off.
I created a service that can do this for the purpose of powering down machines after a period of inactivity, but it can be used to run any shell command after a period of inactivity. You can find the script with documentation on my GitHub page.
I am currently using this to do exactly what you describe on a laptop with an NVIDIA card. I have mine set to time out at 300 seconds (5 minutes) with a check every 10 seconds, so it could potentially remain idle for about 310 seconds before blanking the screen, but the variance of 10 seconds doesn't matter to me.


How to disable welcome message after SSH login?

The welcome messages are generated by the files residing in /etc/update-motd.d/.

From man update-motd:

  Executable scripts in /etc/update-motd.d/* are executed by pam_motd(8)
  as the root user at each login, and this information
         is  concatenated  in  /var/run/motd.

So if you don't want the outputs of those scripts upon login via ssh just remove the execute flag on them:

sudo chmod -x /etc/update-motd.d/*

Now if you want to show something you want upon login, you have two options:

Make a script, put it in /etc/update-motd.d/, make it executable, also make sure it outputs on STDOUT.
ssh has a Banner option. You can put the text in a file and set it in the Banner option so that the content of the file is shown upon login via ssh. Note that this is applicable to only ssh.

Banner /etc/foobar

From man 5 sshd_config:

 Banner  The contents of the specified file are sent to the remote user
         before authentication is allowed.  If the argument is “none” then
         no banner is displayed.  This option is only available for
         protocol version 2.  By default, no banner is displayed.


Get Wacom CTL-480 to show up in gnome-control-center?

I figured this out -- I'm 90% sure this is what fixed it for me:

sudo apt-get install xserver-xorg-input-wacom

(In the end it turned out the default button mapping was exactly what I wanted, I just need to enable autoscroll in my browser).


Wired and Wireless Network Issues with PPPoE

In order for Network Manager to manage your wireless connection, your wireless interface must NOT be listed in /etc/network/interfaces. But pppoeconf adds it. So what you need to do is remove it.

Edit /etc/network/interfaces by opening a terminal and typing

sudo gedit /etc/network/interfaces

and delete the following lines:

auto wlan0
iface wlan0 inet manual

Restart, and you should be good to go.


Have you told the outside machines to use the 1.2.3.4 machine as the nameserver?  If your outside machines are still using DHCP then they will be looking to your router/hub for a DNS machine.

Hugs

Mandy


How to remove this known missing dependency?

this is how I installed -----FOLLOW EXPLICITLY------

sudo apt purge spyder spyder3
sudo reboot now

Re-open a terminal and continue-------------

sudo apt install python-rope python-sympy spyder
sudo apt update
sudo reboot now

This is how I finally got spyder to install with missing dependencies. I assume you can use apt to install any of the missing dependencies found in Help > Dependencies and look for any highlighted missing packages. Worked for me.


Why am I unable to upgrade to 20.04 from 18.04?

I am not sure, from your description, exactly what is happening in your case; it would be really helpful to get more information about where the process is failing. Open a command terminal.
Before starting, do you have enough free disk space:
df -h
Check that enough free space is available for the directory holding the apt files: /var/cache/apt/archives/
Try removing all unnecessary apt temporary files:
sudo apt-get autoclean
Then update the package information from the remote repositories:
sudo apt update
Try the upgrade:
do-release-upgrade
If you get any useful error output, edit your answer to include the full error details. You may manage to fix the problem yourself by searching on the internet for the error message.


Have you tried purging and reinstalling.  Maybe something got botched up.

sudo apt-get purge gnome-shell
sudo apt-get autoremove
sudo apt-get update
sudo apt-get install gnome-shell


Try this Out
install ntfs-3g by:

sudo apt-get install ntfs-3g
Then run the ntfsfix command on your NTFS partition.
For example:

ntfsfix /dev/sda4
Can refer this for futher understanding
Problems with ntfs partitions ubuntu


If you have Ubuntu 12.04 (not xubuntu/kubuntu/lubuntu), try these commands:
sudo apt-get update
sudo apt-get install ubuntu-desktop ubuntu-minimal ubuntu-standard

..and reboot the pc.
These three packages are called "meta-packages", "groups" of other packages required and preinstalled on a default ubuntu desktop installation.
Hopefully it will reinstall the required packages. If it doesn't, try this:
sudo dpkg -P --force-all ubuntu-desktop ubuntu-minimal ubuntu-standard
sudo apt-get install ubuntu-desktop ubuntu-minimal ubuntu-standard

..and reboot the pc again.
Update
After searching the internet a bit, I discovered that this problem might arise if you are missing the file /etc/lsb-release. Test this by executing: cat /etc/lsb-release -- it should show the contents of the file. This file must pre-exist for a lot of packages.
You can recreate that file manually:
gksu gedit /etc/lsb-release

..and enter this text:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=11.04
DISTRIB_CODENAME=natty
DISTRIB_DESCRIPTION="Ubuntu 11.04"

Save and exit.
You could now try and reinstall the configuration and the base-files package. We'll reinstall all the affected packages just in case:
sudo apt-get -o Dpkg::Options::="--force-confnew" --reinstall install base-files python-apt python-software-properties software-properties-gtk software-center
sudo apt-get update
sudo apt-get -f install
sudo apt-get dist-upgrade

(Please save and post the output of this command, it's required to see what happens)
Then try to see if the file exists:
cat /etc/lsb-release

It should show the release information. Try opening software-properties-gtk or software-center


Move files from one folder to another with same name

Yes, you will be OK with mv, eg:

mv /path_to_source_folder/filename /path_to_destination_folder/

or, for example from the level of im/second: (cd im/second)

mv t1/3.jpg ../t1/ && mv t2/4.jpg ../t2/

There are more ways to do that, do man find for example, man rsync

when you look at ls command output, the .. (2 dots) 'means one step back', . (one dot) means 'in here' and you can use it as such

Of course if you want to remove the second folder, you use rmdir command or rm -R (use with care, always do man {command} if you are not sure.


VPN default route issue when using the UI

In your VPN connection settings, tick the box 'use this connection only for resources on its network'


Changing .bashrc to allow a call to "android" from any directory

Use $HOME instead of ~ and put it on one line (and I took out the leading . that's a bad idea because someone could put something in your current directory and you'll run that first - for example sudo) -

export PATH="$HOME/.android_os/adt-bundle-linux/sdk/platform-tools:$HOME/.android_os/adt-bundle-linux/sdk/tools:$PATH"


Release upgrade to 14 failed with a Python exception

The problem was due to an old postgresql package that had somehow been blacklisted from removal. Since the upgrade required this package to be uninstalled, but couldn't due to the blacklist, it failed, but this true error was hidden in the logs and only this Python traceback was immediately visible.

Manually removing the package then re-running sudo do-release-upgrade fixed the error.

cat /var/log/dist-upgrade/main.log|less
...
Dist-upgrade failed: 'The package 'postgresql-9.4-postgis-2.1' is marked for removal but it is in the removal blacklist.'


I think you have created a loop of things.

For example consider the following (bad) script, lets call it check.sh:

while :; du -sh /home/user >> /some/file 2>/dev/null; sleep 5; done

Now create a cron entry so that check.sh will run after every 30 minutes:

*\30 * * * * bash /path/to/check.sh

Lets consider the script first run at 10:00, the disk space will be checked and saved in a file. The tricky part is sleep 5, if you don't put a valid condition for closing it, it will pause the script for 5 secs and then will continue from the top meaning the same checking and writing operation. This loop will go on and on.

Again after 30 mins, cron starts a new process that will do the same thing over and over again. Remember the first process started by cron at 10:00 is still running.

This cycle will continue and in 6 hours you will have 13 of the same processes triggered by cron and most importantly every process is running in a indefinite loop.

In summary, while using cron you don't need things like sleep 5 unless your operation demands something like that, in the latter case put a valid condition so that the process does not run indefinitely.


How to build the driver for cx2072x codec

I recently needed the cx2027x codec aswell (for an asus e200ha). You are correct, the repository you linked does have the fixes, but for an older kernel.

The last two nights i sat down to merge and update these older fixes into a newer kernel, and i got it to work with 4.16.

Here is a fork with these updated fixes. You can find .deb packages of the amd64-variant of the kernel in "releases": https://github.com/heikomat/linux

Along with the kernel you need two ucm-files for alsa, and copy them to /usr/share/alsa/ucm/chtcx2072x. You probably also need to disable realtime-scheduling in /etc/pulse/daemon.conf. For a more detailed description on what to do, see this little manual (it's in the same fork)


Why does Rhythmbox use a different version number?

Rhythmbox 0.13.3 is older than the current packaged version. Launchpad may be missing release information for the main series or this package is linked to the wrong Rhythmbox series.


PXE Boot Server stalling with "File not found" error

Found the problem: The pxelinux.0 file did not copy over correctly. There must have been an error when I was downloading the CD, as when I looked through all of the files, the pxelinux.0 file was empty.


Depending on your requirements, you may try installing something like VirtualBox or VMWare.

Take a look at this list of solutions to figure out what covers your need.

The above are full virtual machines. If you only need to run Windows programs on the Linux server, you may want to check out Wine.


Unable to upload files (pdfs, images) larger than 1 MB

You can do it in 2 ways, by editing the php.ini file or using .htaccess

If you edit the php.ini file which is located in /etc/php5/apache2/php.ini

Find the value that says upload_max_filesize and change it to the value you wish, for example here I have a max upload file size of 100M

upload_max_filesize = 100M

Now you also need to edit the post_max_size that PHP will work with through POST, for that we edit the value to whatever you want, I recommend same as upload:

post_max_size = 100M

In the case you wish to do it with .htaccess, simply create this file in the root folder of you web site and add the following lines:

<IfModule mod_php5.c>
    php_value upload_max_filesize 100M
    php_value post_max_size 100M
</IfModule>

Note that .htaccess does not work 100% of the time because it depends on Server settings. On your localhost it will work perfectly but if you are hosting on a shared site or an external address, the server might have limits to the max size that can be uploaded.


How to Install Oracle 10gR2 EE database on Ubuntu 12.04

I suggest to have VirtualBox installed on your Ubuntu, and then you can have 10gR2 on some OLD Linux dist inside VM, maybe CentOS?


Creating a multi purpose thumb drive: best practice

Mkusb

Mkusb makes a persistent flash drive with FAT32 boot partition, ISO9660 read only OS partition, ext2 casper-rw persistence partition and NTFS data partition accessible to Linux and Windows.

The drive will boot BIOS and UEFI.

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

The drive is easy to hack into a multibooter or Full install drive among other mods.


As @N0rbert said, It probably depends on version of Ubuntu you're working on.
You could test sudo apt-get update and then run sudo apt-get install ruby-full again.
If above mentioned method fails, you must try other methods. Ruby official site states:

There are several ways to install Ruby:
When you are on a UNIX-like operating system, using your system’s package manager is the easiest way of getting started. However, the packaged Ruby version usually is not the newest one.
Installers can be used to install a specific or multiple Ruby versions. There is also an installer for Windows.
Managers help you to switch between multiple Ruby installations on your system.
And finally, you can also build Ruby from source.


What is the best way to install graphic card drivers?

You could download the NVIDIA Driver x64 version from here. http://www.nvidia.com/download/driverResults.aspx/77525/en-us. You will actually be downloading .run file. After downloading the file, you will have to open terminal and follow these steps:

Make the .run file executable by typing sudo chmod +x NVIDIA-Linux-x86_64-340.32.run
Then, type after the above executed, sudo ./NVIDIA-Linux-x86_64-340.32.run

Now, you could proceed with the installation.


There is not an easy way to do this, but take a look at this question for more information on how to write a script to do this for you:

trim the terminal command prompt working directory

Best,
Lev


First off to install a deb file I use

sudo dpkg -i  some-file.deb

so in your case issue

sudo dpkg -i    ./argos3_simulator-3.0.0-i686-beta52.deb

however looks like that deb wants the 32 bit libraries not the normal 64 bit ones so give yourself that

dpkg --print-foreign-architectures  # show what you currently have

sudo dpkg --add-architecture i386   # make your machine 32 bit savvy

Most importantly to jackup your machine so it becomes a developer box with a basic set of tools to compile code etc issue

sudo apt-get install  build-essential

now finally re-issue your original command

sudo dpkg -i    ./argos3_simulator-3.0.0-i686-beta52.deb

If its still showing similar errors just install them using (update with missing libraries in your error message) :  [then re-issue original command again]

sudo apt-get install libfreeimageplus-dev:i386

UPDATE  I battled using above approach, looks like the precompiled binary is using an obsolete library(s) so below will compile it from source (on 64 bit Ubuntu 16.04)

https://github.com/ilpincy/argos3

sudo apt-get install cmake libfreeimage-dev libfreeimageplus-dev  qt5-default freeglut3-dev libxi-dev libxmu-dev liblua5.2-dev lua5.2 doxygen graphviz graphviz-dev asciidoc

download the source code, compile and install by issuing following :

git clone git@github.com:ilpincy/argos3.git

cd argos3
mkdir build_simulator
cd build_simulator
cmake ../src
make
make doc
sudo make install
sudo ldconfig

I can confirm above runs OK ... ignore

[WARNING] Error opening directory "/home/scott/src/github.com/ilpincy/argos3/build_simulator/plugins/simulator/physics_engines/physx/": No such file or directory

then just issue this to see help

argos3 --help


How to get a downloaded file to run / install

This one line command should do the trick

chmod +x /home/rod/Downloads/eagle-lin32-7_6_0-1.run && ./home/rod/Downloads/eagle-lin32-7_6_0-1.run

Since run is an executable you have to use the terminal to run

./(executable-file-with-extension)


How do I reduce the screen and file size of a recorded video, plus convert to FLV?

You can resize and convert with ffmpeg using ffmpeg -i input.ogv -s widthxheight -sameq output.flv. You can also change the video bit rate with -b:v bitarate and control the frame rate with -r framerate to reduce the size of outcome. As izx has mentioned the bit rate option is recommended over changing frame rate or dropping frames.


Server crashed a few times due to lack of memory - how can I find out how much is available to each process?

To get an overview of the memory use of your system, use the command free. For memory calculations per process, cf. How can I display the memory usage of each process.


I had explicitly uninstalled flash, however, the messages continued to appear. disconcerting and distracting.

Finally, sudo apt-get remove update-notifier did the trick.

Of course, now must manually check for updates, but that beats that persistent microsoft-like annoying reminder.


How can I get juju running on eucalyptus?

It would appear that the success or failure of making juju work with Walrus depends on this bug in txaws:

https://bugs.launchpad.net/txaws/+bug/907450

Its arguable that this is not so much a bug in txaws but a bug in the way walrus is setup, since amazon doesn't have the leading / in their S3 service. So the answer is most likely that to make this work, you need to have Walrus accessible without a leading path.


How to associate file types with Sublime Text 2?

This is how I changed the default editor for multiple file types in 12.04:

Right click the file in question
Choose 'Properties'
Select the 'Open With' tab
Choose 'Sublime Text' under 'Related' or 'Recommended' Applications
Select 'Set as default' option on the bottom right

If Sublime Text doesn't show up on this list, make sure it's fully installed via the package manager.

Unfortunately I haven't found a way to do this in batch yet and a previous method of opening some hidden file and doing a find and replace for sublime text didn't work for me.


Exporting docx files as PDFs using LibreOffice

Perhaps an intermediate conversion into an open document file (.odt) may be useful.


My brand new HP notebook won't boot Ubuntu 12.10 from USB flash drive, but I can boot the USB flash drive from other computers. How can I fix?

You probably have to set your BIOS to boot from USB.