How do I install applications in Ubuntu?

You can install applications different ways.  Terminal, the Ubuntu Software Center, and Synaptic.

With the Ubuntu Software Center, you just open it from the Launcher, and search for the application that you want.

If you know the right commands to install via terminal, then you'd just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, you can run the command(s) needed to install the application.

For synaptic, it has to be installed on you system.  To install it, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo apt install synaptic

Once installed, you can open it, and search for the application that you want to install, and just mark it for installation.

Also in some cases, you have to download either a .deb file in case of your question about Chrome, and have to manually install it, or a .tar.gz file, and that also have to done manually.

Now as far as Chrome is concerned, you can install it by downloading the .deb file, or just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

For 32bit

wget https://dl.google.com/linux/direct/google-chrome-stable_current_i386.deb
sudo dpkg -i google-chrome-stable_current_i386.deb

For 64bit

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb

If you encounter any error during the installation, when its done do

sudo apt -f install

For pros and cons of the different ways to install see this Post.

Source for Chrome installation: Google

Addition

Installing software in Ubuntu can be done several ways:

Ubuntu Software Center

You can search for an application, or go through the categories:

Synaptic Package Manager

You can search for an application, or go through the categories:

Installing via Terminal

Installing from terminal can be done in several ways:

APT
You can search for an application.  The command to search for software is:

apt search <application_name>

Adding Repositories:

Edit the sources list file, and add

sudo -H gedit /etc/apt/sources.list

Or add from terminal

sudo add-apt-repository <repository_name>
sudo apt update
sudo apt install <application_name>

Others ways you can install

Manual download of a .deb (Debian package):

Once downloaded, you can double-click on the package to have it open in the Software Center, from where you can install it.
Or, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, navigate to the download location, and run the command(s) below:

sudo dpkg -i <package_name>.deb

Other options:

.rpm files are packaged for Fedora or Mandriva, but you can use alien (you can install using Synaptic) that allows you to convert .rpm files to .deb. (may not work all the time)
.tar.gz files are compressed. If you see the .tar.gz, it could be compressed files that have a pre-compiled binary file, or files that have the source code allowing you to compile the application from source.  To find out how to install from a .tar.gz, see How to install from a .tar.gz.

For more info see Installing Software, or A beginners guide to installing programs in Ubuntu


Mouse click not recognised after Nvidia driver install

I had the same issue from installing Nvidea-current and nvidea-settings.
Following up on the comment by Op, I did the following and it fixed my issue

First I did the following command to see what model GPU I had

$ sudo lshw -C display  *-display
   description: VGA compatible controller
   product: GF108 [GeForce GT 630]
   vendor: NVIDIA Corporation
   physical id: 0
   bus info: pci@0000:03:00.0
   version: a1
   width: 64 bits
   clock: 33MHz
   capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
   configuration: driver=nvidia latency=0
   resources: irq:39 memory:fa000000-faffffff memory:d0000000-dfffffff memory:ce000000-cfffffff ioport:dc00(size=128) memory:c0000-dffff

From that I went to Nvideas driver page and using the manual driver search and that info I downloaded their .run installer file.

After restarting I ran

$ chmod +x NVIDIA-Linux-x86_64-390.12.run
$ sudo ./NVIDIA-Linux-x86_64-390.12.run -x
$ cd NVIDIA-Linux-x86_64-390.12
$ sudo ./nvidia-installer -XZqaq --no-x-check

Restarted display service

$ sudo service gdm3 restart

And my mouse problems, and previous display problems, were fixed.

Answering this question with more detailed answers so this question doesn't get  pruned.


How can I use a .html file as desktop background/wallpaper?

Maybe Mozilla prism could help with some of what you want: http://prism.mozillalabs.com/,  you can install prism from the repository by typing in your terminal;

sudo apt-get install prism

then launch prism and enter the URL to your web application, a shortcut to the web app can be created on your desktop,

you must right click on the web app shortcut on the desktop and allow execution, when the web app shortcut is double clicked your web app will start.


Next time you log into your session click on the network indicator and then click on Edit Connections.

Choose the connection you're session is connected to automatically and click Edit. Uncheck the Automatically connect to this network when available. Hit OK and you're done.


Why is my swapfile not getting automatically mounted?

I think the problem is because you have the same name swap for your subvolume and the directory you mount to.
I didn't test it, but mount could throw an error on
UID=65238893-d167-43fd-9c3d-489759c09f06 /swap           btrfs   defaults,noatime,subvol=swap  0   0

Then the next line wasn't used as well.
Your swapfile was created not on a separate subvolume, but on @.


There are two compiz plugins that you should try:

Dim Inactive

This can chage the colors of all windows that do not have the focus currently.
The brightness, saturation and opacity can be reduced, down to fuly black, gray values only, and invisibility.
A good use case is to just get everything out of the way, by making it almost black over a black background. Something like the zen mode of some editors, but for any application, or even dialog window!

Trail Focus

This doea about the same as Dim Inactive, but in multiple steps gradually. The steps are defined based on the order of how recent a wind had the focus.
You can leave the thee windows you currently work on fully visible, make the fourth to eighth most recently focussed window get darker in four steps, and keep all other windows in very dark so they are barely recognizable.

Opacify is somewhat more complex and controls only opacity, but I expect it can be used in a similar way.


Ubuntu is playing no Firefox sound if USB hub is connected

I had a very similar problem. When I plug the USB-C hub, both firefox volume control options can be switch on. But the firefox still doesn't play any sound. It worked previously. Reboot the laptop doesn't help.
I solved my problem using PulseAudio Volume Control. In the playback tab in the control, I can specify the output device of the individual application. I changed the device of firefox to "Built-in Audio Analog Stereo" as all other applications, and the problem solved.


To get this change permanently for every session, create a file called .xmodmap with the the current keymap table, using the following command (after you have run previously xmodmap -e "clear mod5" and xmodmap -e "keycode 108 = Alt_L"):

xmodmap -pke > ~/.xmodmap

Then, create a file called .xinitrc in your home directory (using touch ~/.xinitrc command), containing the following line/command (use gedit ~/.xinitrc command to open the file for editing):

xmodmap .xmodmap

Another solution is to run:

sh -c 'xmodmap -e "clear mod5"; xmodmap -e "keycode 108 = Alt_L"'

command to your startup applications and that'll run it when you log in. Search in Dash for "startup applications".


how do I change #autoenable=false to true?

enter  sudo nano /etc/bluetooth/main.conf
erase false and enter true
press Ctrl and x at the same time to exit. (In nano, ^ at the bottom menu means to press Ctrl.)
y and Enter to save.


Why was the virtualbox package removed from the 14.04 repository?

In Ubuntu 14.04, Virtualbox package version 4.3.10 is available in multiverse repository. So enable multiverse repository and install virtualbox  through apt-get.

sudo add-apt-repository multiverse
sudo apt-get update
sudo apt-get install virtualbox

How  i know that information?

$ apt-cache policy virtualbox
virtualbox:
  Installed: (none)
  Candidate: 4.3.10-dfsg-1
  Version table:
     4.3.10-dfsg-1 0
        500 http://ftp.cuhk.edu.hk/pub/Linux/ubuntu/ trusty/multiverse amd64 Package


We do successfully run Ubuntu GNOME remix 13.04 64-bit in Virtual Box 4.2.12 on an Ubuntu 12.04 64-bit host.

For stability we may have to update our Ubuntu OS by booting into a root shell and run:

apt-get update
apt-get dist-upgrade

We did experience occasional crashes from the default wallpaper, which can be replaced by a static wallpaper running:

gsettings gsettings set org.gnome.desktop.background "file:///usr/share/backgrounds/gnome/FootFall.png"

If we can not log in to the grpahical desktop we can log in to TTY by pressing HOST + F1.

We may also remove the Guest Additions to change settings in the GUI.


Which partition is better to use in a Nokia booklet 4g?

If this is your first Linux system and you know nothing about it yet, just keep default settings in installer — the disk will be partitioned and reformatted automatically. Do this only if this is your only OS on computer, the data will be lost!

In other cases use "install next to..." option in installer. Lubuntu will be installed alongside with other system on disk.


Try and run:

sudo su

before any of the steps in "Certificate Authority Setup".


Ubuntu UI Toolkit's interaction with my device fails due to SSH protocol capabilities mismatch

The above problem is fixed by installing Qt Creator 3.3.0.

https://qt-project.org/forums/viewthread/51072/


How to let built-in DHCP assign a static IP to LXC container based on name, not MAC address

I ran into this recently and I think I found an easy solution. I (only) tested it on Ubuntu 14.04.

First, uncomment this line /etc/default/lxc-net:

LXC_DHCP_CONFILE=/etc/lxc/dnsmasq.conf

In /etc/lxc/dnsmasq.conf, define a dhcp-hostsfile:

dhcp-hostsfile=/etc/lxc/dnsmasq-hosts.conf

Then add entries in /etc/lxc/dnsmasq-hosts.conf like this:

mail,10.0.3.16
web,10.0.3.17

Beware: changes will become effective after you have restarted lxc-net (which restarts dnsmasq):

service lxc-net restart

Afterwards you can modify /etc/lxc/dnsmasq-hosts.conf and send the SIGHUP signal to dnsmasq:

killall -s SIGHUP dnsmasq

So yes, you need to restart lxc-net, but only once. Hope this helps.


Is there any Systems Dynamics software packaged for Ubuntu?

The answer to this question appear to be no. These past few days I found several free or open System Dynamics programmes that should run on Ubuntu, but none is packaged at this time; some of them are just code libraries. Here's the list:

DynSim - a Java package, apparently undocumented.
MapSim - a simulation engine for System Dynamics. Provides a .NET library that works on Windows and under Mono on Linux plus a simple GUI tool. MapSim uses its own modelling language described in a reference manual.
NetLogo - the famous agent based modelling framework; supports system dynamics models as a secondary feature.
Sphinx SD Tools - a project dedicated to create a common accessible environment for System Dynamics simulation. It is developed on the Java 6 platform and uses the Java Swing GUI.
SystemDynamics - a graphical Java application for modelling, visualisation and execution of System Dynamics models.
Simile - A proprietary System Dynamics and object-based modelling and simulation software package similar to Stella, Model Maker, Vensim, etc. A free evaluation version, which limits the size of saved models, is available.


Can't get internet working in Ubuntu 12.04 guest virtual box

As far as I know it will only work with bridged mode.
Also you might have to set the proxy of Ubuntu too.

What is the ifconfig output when you use bridged mode?

To set a proxy try:

  export http_proxy=ip.or.hostname:port


Why is using git with && failing when inside a .sh but not from the command line?

You may as well create an alias to chain all the commands and then execute the alias object itself.

git config alias.op '!git fetch --all && git reset --hard && git merge'
git op

&& only runs the second command if the first one exited with status 0 (was successful). ; runs both the commands, even if the first one exits with a non zero status.

Your example with && can be equivalently paraphrased as

if git fetch --all ; then
    if git reset --hard; then
       git merge
    fi
fi


Make "sudo apt-get update" output only what it is doing on one line

This will be difficult to do without writing a proper application that uses ncurses or similar to control the terminal. With bash, you can get some of this effect with the following script:

#! /bin/bash
height=${1:-5}

# Buffer up to the height
do_height()
{
    for ((i = 0; i < height; i++))
    do
        "$@"
    done
}

do_height printf "%-${cols}s\n" ""

# Get dimensions of terminal
cols=$(tput cols)
lines=$(tput lines)

sudo apt-get update |&
    while IFS= read -r line
    do
        sleep 0.01
        if [[ $line =~ ^(Hit|Get|Fetch|Read) ]]
        then
            out=("$line" "${out[@]:0:4}")
        else
            out=("" "${out[@]:0:4}")
            tput cup $((lines - height - 1)) 0
            printf "%-${cols}s\n" "$line"
            do_height printf "%-${cols}s\n" ""
        fi
        tput cup $((lines - height - 1)) 0
        for ((i = height - 1; i >= 0; i--))
        do
            printf "%-${cols}s\n" "${out[i]}"
        done
    done

Run as foo.sh N where N is the number of lines you want to keep. Note that:

this assumes you're at the bottom of the terminal.
errors will always be printed N lines above the last line.
apt-get provides more transient output when it's printing to a terminal, so the output here will seem jerky as intermediate lines are not available.

So the final output will  look like:


Job for fail2ban.service failed because the control process exited with error code

If I am not wrong you have not installed any MTA (sendmail/postfix) on the server.
Try to restart the fail2ban after installing the sendmail/postfix.

I have fixed the issue after installing the MTA.


Beginner GPU passthrough Windows Host to Ubuntu Guest (Whats KVM? I use vBox)

From my knowledge, GPU passthrough can't be done on virtualbox, and I am not sure you can even do it on windows.
There are different solutions to your specific need (run concurently windows and ubuntu with each having access to a gpu) :
Virtualization but not from windows. It is easier to setup two parallel system, one windows and one linux, from within an os dedicated to virtualization like unraid or proxmox. Both of them use kvm to do so. You can also have a not virtualised linux and windows in a vm, but this requires more setup steps. This is not what i would recommand for you as your usage of linux is light.
Much more in line with your initial need, wsl2. Windows subsystem for linux is nowaday a better experience for using linux inside of windows, and is now capable of using the GPUs.


Short answer:

Remove the quotes in:

Icon="/home/dtoan/Pictures/book Reader.png"

Unlike the Exec= line, spaces should be left alone in the Icon= line.

Apart from everything, I wouldn't use spaces in a name in general.


There is something I saw a couple of days back on http://www.omgubuntu.co.uk, allowing the use of the MS Office web apps on Ubuntu.  I have a VM of Win8 installed, and run office that way, when I need to, but there is a .deb for installation in Ubuntu, or apparently a chrome link to the same set of apps.


First of all, do not freak out. Your Windows partition (and your data) is not affected. By deleting the Ubuntu partition the BootManager that took care of the dual boot to Ubuntu and Windows was also deleted.

You could use an Ubuntu Live CD/DVD to reboot from. One of the installation steps will let you allocate only 64 GiB out of the 124 GiB remaining unallocated. At another step it will setup the BootManager to allow you to dual boot.

Another way, is to use a Windows DVD to fix the BOOTMGR. Steps are presented in this article http://pcsupport.about.com/od/findbyerrormessage/a/bootmgr-is-missing.htm


GLOBIGNORE=".:.."

to hide the . and .. directories. This also sets the dotglob option: * matches both hidden and non-hidden files.

You can also do

shopt -s dotglob

Gilles :)


To install Grub Customizer, enter the following into the Terminal:

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer

Then to run it,

grub-customizer

Hope this helps

Update

To download Grub2

sudo apt-get install grub2


Sound output keeps getting revert back to the other "Multichannel Output - Built-in Audio" every reboot on Raspberry Pi 4

Workaround described here solved the problem.
Solution is removing the following lines from /etc/pulse/default.pa
# Use hot-plugged devices like Bluetooth or USB automatically (LP: #1702794)
.ifexists module-switch-on-connect.so
load-module module-switch-on-connect
.endif


I don't know what you can do to make sure the system is not damaged.

The biggest potential problem is loss of data in the cache waiting to be written into the hard disk. the files in /tmp are temporary and are deleted when you shut down properly. A hard reboot leaves them behind, and the error you saw probably told you just that. Ubuntu checks the health of the hard disks after X number of proper shutdown / restarts. You may want to do that manually by booting from a LiveUSB/DVD

SHORT STEP-BY-STEP TUTORIAL FOR CHECKING EXT4 HARD DISK FOR ERRORS

STEP 1. Ensure you have access to a Ubuntu LiveDVD/Installation Disk. If not, download a copy using another machine.

STEP 2. Change the BIOS on your machine to allow you to boot from a CD.

STEP 3. Insert the Ubuntu disk into your CD-ROM and reboot your machine. Choose the option to 'Try Ubuntu' -- don't reinstall the system!

STEP 4. Once Ubuntu starts (you will not be required to provide a password) you will be in the main desktop.

STEP 5. Open a teminal by pressing Ctrl+Alt+T

STEP 6. Get a pen and paper to write down the paths to your disk drives. Note that when Ubuntu boots it identifies all the hard disks on the system and creates a directory in the '/dev' folder for each. By default these devices are not mounted. If you see a picture on your desktop of a drive then a disk is mounted. You must unmount all disks that are to be checked before proceeding!

STEP 7. Search for Disk Utility in Dash and open it to see what drives are on your system. Use this to verify the drives are not mounted. Also note the addresses of the disks to be checked... they should look like /dev/sdc or /dev/sda1. Also, ensure the drives are actually ext4 and not some other format. Once you recorded the paths then exit the Disk Utility.

STEP 8. To proceed with the check type sudo fsck.ext4 -cDftvy -C 0 /dev/sda1 in the terminal -- remember to substitute your device address. You can only do one disk at a time. On my machine 1TB of data took 3 hours to complete and the bulk of the time (99.99%) was spent checking for bad blocks. If you want to know what the parameters mean then check out the links at the bottom of this post or type fsck.ext4 in the terminal to see a short list of the common command options. Note that fsck.ext4 appears to be a synonym for e2fsck.

STEP 9. As the fsck command has been passed the (v)erbose option parameter details of the progress and any errors will be listed in the terminal window. If errors are found then you will need to consider your options based on whether the fsck package was able to fix them.

STEP 10. Once finished you can shutdown the machine. Ubuntu ejects the CD tray so you can remove the disk before competing the shutdown.

References:

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

http://manpages.ubuntu.com/manpages/lucid/man8/fsck.ext2.8.html

http://kernelnewbies.org/Ext4

http://linuxexpresso.wordpress.com/2010/03/31/repair-a-broken-ext4-superblock-in-ubuntu/

Hope this helps


How to create an mkv file from an mkv and an mka file from termial

You do not need the + sign in the command. It means something quite different than you think.

mkvmerge -o output.mkv input.mkv input.mka

This should do the trick for you.

The plus sign appends the streams from the second file to the first. So if you were to have two video files and you wanted to make a single file that plays first the video from file1 and then video from file2 on the same stream, then you'd use the plus. The error basically tells you that it cannot find any video in your .mka file, and it has nothing to append.


How do I use my laptop as a screen for PS3?

I would love to be proven wrong, because it would be frickin sweet to use your laptop to display game console output. But. The HDMI port is an output. All it does is send stuff from the graphics card to whatever is plugged into it. Same thing goes for the PS3. If you plug your PS3 into it, they're just gonna sit there sending output signals at each other.

Check out the specs for your card. I don't see anything about it having an input port.

What MAY be possible, and lofi, is installing a TV tuner card to your computer and using the antenna input on the TV tuner card to take the coax output from your PS3.


How to install PHP SQL Server drivers in Ubuntu 19?

There is another article within the Microsoft's documentation, called Installing the Microsoft ODBC Driver for SQL Server on Linux and macOS. I think the steps mentioned there are exactly what you are searching for.

For Ubuntu 19.04 they offer only Microsoft ODBC Driver 17 for SQL Server, here is the relevant part:

  This article explains how to install the Microsoft ODBC Driver for SQL
  Server on Linux and macOS, as well as the optional Command-Line Tools
  for SQL Server (bcp and sqlcmd) and the unixODBC Development Headers.

  Important: If you installed the v17 msodbcsql package that was briefly available, you should remove it before installing the
  msodbcsql17 package. This will avoid conflicts. The msodbcsql17
  package can be installed side by side with the msodbcsql v13
  package.

  Ubuntu

sudo su
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -

#Ubuntu 19.04
curl https://packages.microsoft.com/config/ubuntu/19.04/prod.list > /etc/apt/sources.list.d/mssql-release.list

exit
sudo apt-get update
sudo ACCEPT_EULA=Y apt-get install msodbcsql17
# optional: for bcp and sqlcmd
sudo ACCEPT_EULA=Y apt-get install mssql-tools
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
source ~/.bashrc
# optional: for unixODBC development headers
sudo apt-get install unixodbc-dev

  Note

  Driver version 17.2 or higher is required for Ubuntu 18.04 support.
  Driver version 17.3 or higher is required for Ubuntu 18.10 support.


How do I clone a hard drive that is in use?

There is no safe way to backup a virtual hard drive attached to a running virtual machine in Virtual Box.

Adapted from this thread in the Virtual Box Forums we have the following backup options:

Recommended:

Shutdown the guest and backup all files
Advantage: Safe and fully recoverable.
Disadvantage: Downtime from shutdown/reboot.

Alternatives if data are not critical:

Backup files from within the guest.
Advantage: Fairly safe, no downtime.
Disadvantage: Needs external backup solution running on the guest. Not all applications can be backed up by this.
Save the machine's state, backup all files, restart the guest
Advantage: Fairly safe, downtime may be much shorter than a reboot.
Disadvantage: needs similar hardware to recover. Some application data may become inconsistent.

Not recommended

Take a snapshot then copy files
Advantage: Very fast, no downtime
Disadvantage: Not safe, may lead to inconsistencies. Backup copies may not be recoverable on another host machine. Application data may get lost.
Just backup the files of a running manchine
Advantages: none
Disadvantages: disk image corruption may lead to unusable backups.


Icons label of Unity launcher sometimes disappear

This is a bug which is fixed for the next Unity update (5.16). See the complete bugreport: https://bugs.launchpad.net/unity/+bug/1034164


You can use e.g. pgrep to search for processes with a specific name.

As an example, I can see if the music player Rhythmbox is running by typing this:

$ pgrep rhythmbox
827

If any numbers are printed (and the exit status is 0), this means it found a matching process. Otherwise the output will be empty and you get a non-zero exit status.

Now we can simply run this over and over in an infinite loop. To save resources, we wait a second between each iteration. Depending if a matching process is found or not, this little script below will then either write yes or no to a file status.txt.

#!/bin/bash
while sleep 1 ; do
    if pgrep rhythmbox &>/dev/null ; then
        echo "yes" > status.txt
    else
        echo "no" > status.txt
    fi
done

You could also do anything more useful inside the loop, like e.g. switching symlinks between two pre-made html documents. Assume we have running.html and stopped.html and want to have the correct one of those linked as status.html, which then could be served by your web server. It could look like this:

#!/bin/bash
while sleep 1 ; do
    if pgrep rhythmbox &>/dev/null ; then
        ln -s running.html status.html
    else
        ln -s stopped.html status.html
    fi
done

I haven't tested how a web server might react on this link switching though, it could also be possible that it caches stuff and changes won't be live immediately, no idea. You've got to try it out.


VMware Workstation not running after performing an update on Ubuntu 18.10 to 19.04

Here exactly the same problem:
This solution works to me
Ubuntu 19.04 - VMWare kernel modules updater


IPSEC VPN client inside Docker container (Ubuntu)

The most probable reason is apparmor configuration. Check the syslog on host. If you see apparmor "DENIED" errors, you can try following (on host):

# apt-get install apparmor-utils
# aa-complain /usr/lib/ipsec/libstrongswan.so.0

This will result in apparmor complaining, but allowing the library to be loaded in container.


You can install Guake Terminal from software center. Its a drop down terminal and add it in your start up programs.


Can I use a community wallpaper from Lubuntu 15.04 in 14.04

Actually just install the ubuntu wallpapers

sudo apt-get install ubuntu-wallpapers-version-of-ubuntu-here

Then symlink it into Lubuntu Wallpapers directory

sudo ln -s /usr/share/backgrounds /usr/share/lubuntu/wallpapers/community-wallpapers

Now you should see a community-wallpapers directory when choosing images.

:)


This deb file is incompatible with Ubuntu 19.10 release, because it requires libssl1.0.0 package that is unavailable.

You can install it on Ubuntu 18.04, or look for a newer lightworks release.

You can find a beta at the same place.


Why can't I connect to SSH server from Ubuntu client? (while windows client is okay)

When Connect to Ubuntu Server from Linux Client Via Terminal, Specify the port Number,
 Suppose that your server ip 192.168.16.10 (any hostname) ,with port 39

at terminal

ssh username@192.168.16.10 -p 39

where username is exist username on that server you connect , -p : specify the port number.

At Vinagre Client , New Connection , then Specify the hostname:portnumber,


Dual monitor setup - One monitor goes to sleep, the other doesn't

First Try Updating Your Drivers Via PPA

Add the oibaf ppa for latest AMD drivers:

sudo add-apt-repository ppa:oibaf/graphics-drivers

and install any updates it makes available:

sudo apt update && sudo apt upgrade && sudo apt dist-upgrade

Reboot and try out the new drivers. If it works, your done! If not, try installing the pro drivers.

Download and Install Pro Drivers

If the above doesn't work. you can try installing amdgpu-pro. There is a complete guide at the AMD website. Here is a quick and dirty version:

Get the driver from here. Under linux tab, download the 18.04 version.

cd ~/Downloads
tar -Jxvf amdgpu-pro-*.tar.xz

Install the package:

cd amdgpu-pro-VERSION (whatever the name of your unzipped directory is)
./amdgpu-pro-install

You will need to enter your sudo password and provide some confirmations. Reboot and see how it works.

Sometimes Hardware Dies

Just because the above doesn't work for you, doesn't guarantee that your hardware is fried. HOWEVER... OP fixed issue with new hadware:

  I think in the end the issue was a bad video card. The machine kept
  freezing on the screensaver every so often so I got a different video
  card, also radeon and both issues went away.

Unfortunately the fix isn't always free.


How to safely reconfigure networking on a hosted server?

Simple solution may be have your commands run in a script in the background.  Take them down, then bring them back up if it has failed.

You would need to extend this script to move your edited eth0 script, in or out depending on the condition.

#!/bin/bash
ifdown eth0; ifup br0
if curl https://google.com
then
echo "Test passed."
else
ifdown br0 ; ifup eth0
fi

Obviously, test this in a local environment first.  You may have to sleep the script to allow for the interfaces to actually be connected with an ip.


I would try to use the GUI to set the static IP. If that works then you know that you are using the NetworkManager package to control that NICs IP. The package should disable itself for the interface if it is mentioned in the manual config (as per: https://wiki.debian.org/NetworkManager) But that seems to not be happening.

You can also remove the NetworkManager completely with...

sudo apt-get install network-manager-gnome

sudo apt-get remove network-manager

...and then attempt to change it manually.


Where can I look for malware that may have been installed on my machine?

The objective of malware is to do something. So it will need to communicate with the outside world. So the best approach is to have a look at the network traffic that is occurring on your computer.

I like dnstop utility. Install by sudo apt-get install dnstop

Then run the utility against your network card

sudo dnstop -l 3 eth0

When the utility runs press the 3 key, this will change the screen to display all the dns requests that are made by your computer.

In my case I went to Ubuntu and it tried to access the following

Query Name               Count      %   cum%
-------------------- --------- ------ ------
www.gravatar.com             2   40.0   40.0
askubuntu.com                2   40.0   80.0
ny.stackexchange.com         1   20.0  100.0

This gives me an idea of what web sites were accessed. What you need to do is not do anything and sit back and wait for a while to see what your computer accesses. Then laboriously follow up on all those web sites it accesses.

There are many tools you could use, I thought this was an easy one for you to try out.


How do I skip grub and boot directly to Ubuntu 20.04?

Add
GRUB_RECORDFAIL_TIMEOUT=0

to your /etc/default/grub (sudo is required to edit it) and then run sudo update-grub.
Simply reboot and the system should boot Ubuntu directly without pausing at the grub menu.
Source


Glitch free solution to stream sound output from an ubuntu machine to another (14.10 both)

You can stream audio and video with vlc :
f.i. this is a command to stream a video file from your local disk Video/video.mp4 to a multicast destination on your lan  (copy the command as a single line in a terminal, replacing filename)
vlc  --sout '#transcode{vcodec=mp4v,acodec=mpga,vb=2000,ab=128,deinterlace}:rtp{mux=ts,dst=239.255.12.42,sdp=sap,name="TestStream"}' Videos/video.mp4

On the reading pc(s), run vlc and open the stream rtp://239.255.12.42

You can change source file Video/video.mp4 by a youtube url like https://www.youtube.com/watch?v=afBm0Dpfj_k

EDIT: to stream  audio only as played on your first pc,  just change source file Video/video.mp4 with pulse://
  vlc  --sout '#transcode{vcodec=mp4v,acodec=mpga,vb=2000,ab=128,deinterlace}:rtp{mux=ts,dst=239.255.12.42,sdp=sap,name="TestStream"}' pulse://

Look here for streaming using vlc interface instead  command line.
Look here for more command line streaming (set stream video size , format etc...)
You can also remotely control the streaming vlc from a web interface on the reading pc: look here


When you intend to use symbolic links for a script, the right way to get the real path of that script is:

# Absolute path to this script
scriptpath=$(readlink -e "$0")
# Absolute path this script is in
scriptdir=$(dirname "$scriptpath")
java -mx3g -cp "$scriptdir/*" MyApp.jar

More about: Reliable way for a bash script to get the full path to itself?


Already asked and answered I believe... http://permalink.gmane.org/gmane.linux.power-management.general/56400 Unless someone knows different.

But it seems to be an apparently harmless message that doesn't alter whether your system is working properly. Mine does exactly the same thing so unless your system has some other problem you haven't explained it's probably not worth worrying about


Ubuntu 14.04 not booting after error message. /temp could not be mounted (still need help)

Try using this line in the Terminal:    sudo nano /etc/grub.d/10_lupin

As I'm not that familiar with using Vi to edit text, Nano was a little easier for me to edit. just press Ctrl+o to write the file Ctrl + x to exit when you're finish with it, and when you're back in the terminal, enter    sudo update-grub


How to add Ubuntu to the Windows 8 Boot Menu with a GPT Harddrive

There is no known way until now for adding a foreign, non-Windows UEFI/EFI loader to be chain loaded by Windows boot manager (Windows 7/8).

Regarding Visual BCD Editor - it is UEFI capable. You can create UEFI loaders for Windows 7/8.

Chain loading foreign, non-Windows OSs is possible for MBR disk scheme. You use a so called boot sector loader chaining over partition boot sector or MBR code of foreign system. You can see here how it goes.

UPDATE: (01.jun 2014)

There is a new tool for Windows 8.1/7/Vista called BootNext which allows direct booting of Linux(Ubuntu) from Windows on UEFI firmware.


Iptables on Ubuntu Server does not open ports

Make sure there's actually something listening on port 4447/tcp.
Otherwise, if there isn't, nmap won't show this port as open.

You can check this with:

sudo netstat -tpln | grep 4447

If you aren't getting the program name in the output, there's nothing listening on this port.

UPDATE:

After OP's clarification it looks like the goal is to redirect incoming TCP connections to a certain port to an alternate port. Such as redirecting incoming connections to 4447/tcp to 3306/tcp where MySQL is listening.

Assuming that your server has the IP address 10.0.0.1 and MySQL is listening on it on 3306/tcp, the way to do what you're after is:

iptables -t nat -A PREROUTING -p tcp --dport 4447 -j DNAT --to-destination 10.0.0.1:3306
iptables -t nat -A OUTPUT -p tcp -d 127.0.0.1 --dport 4447 -j REDIRECT --to-ports 3306

iptables -A INPUT -p tcp --dport 3306 -j ACCEPT
iptables -A INPUT -p tcp --dport 4447 -j ACCEPT


This is question is out of curiosity as how this is happening. Which Script is downloading the wallpaper from the server and replacing /usr/share/backgrounds/abc.jpg on every startup/shutdown or boot.

Impossible for us to answer. The script name is decided by your IT department and is not a "generic" name.

There are a lot of methods on how to do this. The 2 main methods are ...

crontab
/etc/crontab

Both can hold a command to do something on @reboot where a script can be called to copy that background over to your system. The 1st one is a file per user. So they could have made that with a "root" or a "sudo" account.

crontab -l

will show your user crontab. It is not possible for you to view others unless you know the password for that account. The 2nd is probably readable by anyone (more /etc/crontab) but editing requires "sudo" permissions.

But it is also entirely possible that the file is copied over to your system when you boot from a daemon. Where this daemon does a call ("ssh", "ftp") to a central server and retrieves the background from there.

  And how I can make this stop.

You need to ask your IT department.


You need to install the libqt4-qt3support package, which provides that library.


You are trying to do:

alias shortcut = 'long command'

The solution is to not put spaces before and after the =. So it should be:

alias shortcut='long command'


this command works good:

ufw allow from 192.168.1.203 to 192.168.1.50 port 80 proto tcp

203 local machine, 50 apache

but i am finding the way for command to replace 192.168.1.50 with eth0
so when i change ip adress on that nic eth0 to rule stay....


I would try to disable it from you bios. Depending on what model computer you have, that should be doable.


cannot install 16.04 - missing dependency

Change your update mirror to the main mirror first, then do an update. Once you have updated, reboot and run the upgrade.
I had the same issue.
That is as short as I can make it.


How to enable to work only one card on my laptop?

An article in Ubuntu Community Help covers the subject of Hybrid Graphics.

I will outline the main things:

First you've to determine if your kernel has been compiled with the proper option. When it has this option you can use this option to activate a GPU. You can do this by terminal and with a GUI. The script for this GUI has been provided in the article.

  Note that this method is not supported by all machines and only works
  if you are using the opensource driver (nouveau, radeon) and not the
  proprietary ones (nvidia, fglrx).


I also had the theme issue once. Just change the theme to something different and then change it back to ubuntu and you're fine.


It would be helpful to know exactly what model of wifi card you're using, but perhaps installing the bcmwl-kernal-source package would solve the issue.


mcetool indicates that this is a hardware error - it could be anything (overheating, bad RAM, bad CPU, bad thermal paste, blocked fans, bad CPU or RAM sockets, ....)


Sounds like you don't have the multiverse repository enabled, which is where ttf-mscorefonts-installer lives.

Follow this question How do I enable the "multiverse" repository? on how to enable it.

After that try again and proceed with enabling pipelight just to make sure

 sudo pipelight-plugin --enable silverlight

Follow through with that and you should be good to watch Netflix in your desired browser.

Or you can install the Netflix app provided in the ppa

 sudo apt-get install netflix-desktop


Certificat SSL for Apache signed BY Microsoft PKI

The Problem was in my ssl certificat. well now i m using lets encrypte certificat it works well . but before install the agent. rename the name of your certificat to cacert.pem , because the agent configuration file in the : C:\ProgramData\OCS Inventory NG\Agent ocsinventoryagent.ini  contain cacert.pem in its config so if u use another name it will not works .


How do I get a list of unique names and the sum of numbers from each row containing this name, with 1 command?

With plain Awk, you could do something like this:

$ awk '$5 == "sold" {
    q[$7 FS $8] += $6; v[$7 FS $8] += $6 * $10
  }
  END {
    for (item in q) print q[item], item, v[item]
  }' ChestShop.log
2 Prismarine Bricks 496
112 Sea Lantern 2784000

With GNU Awk (gawk) version 4.0+, you can control the sort order as follows:

gawk '$5 == "sold" {
    q[$7 FS $8] += $6; v[$7 FS $8] += $6 * $10
  }
  END {
    PROCINFO["sorted_in"] = "@val_num_desc";
    for (item in q) print q[item], item, v[item]
  }' ChestShop.log

(sorted in descending order of quantity) or

gawk '$5 == "sold" {
    q[$7 FS $8] += $6; v[$7 FS $8] += $6 * $10
  }
  END {
    PROCINFO["sorted_in"] = "@val_num_asc";
    for (item in v) print q[item], item, v[item]
  }' ChestShop.log

(sorted in ascending order of value). Note that all of these assume the format of your file is as originally shown, with each item's name consisting of the 7th and 8th whitespace separated field. If it isn't, then you will likely need to parse it with a regular expression and capture the elements - for example, using GNU Awk:

gawk 'match($0, /sold ([0-9]+) (.*) for ([0-9.]+)/, m) {
    q[m[2]] += m[1]; v[m[2]] += m[3]
  }
  END {
    PROCINFO["sorted_in"] = "@val_num_asc";
    for (item in v) print q[item], item, v[item]
  }' ChestShop.log

Note that this assumes that the keyord for can't appear elsewhere in the line.

If you don't have access to GNU Awk, thn it may be simpler to pre-process the file with another regex tool in order to insert appropriate delimiters so that you can then use POSIX awk with that delimiter.


How to install the Qt WebGL streaming plugin?

Install the dependencies:
sudo apt install qtbase5-private-dev libqt5websockets5-dev

Download the source code of the Qt WebGL Streaming plugin. Here we choose Qt 5.12.4, as suitable for Ubuntu 19.10. Choose a different version from the Qt downloads page if your distribution comes with a different version of Qt.
wget https://download.qt.io/official_releases/qt/5.12/5.12.4/submodules/qtwebglplugin-everywhere-src-5.12.4.zip

Alternatively, you can also clone the repository:
git clone https://github.com/qt/qtwebglplugin

The usual build process: unpack the archive, run qmake, then run make.

Copy the resulting libqwebgl.so library to where Qt processes look for the platform plugins:
sudo cp build/plugins/platforms/libqwebgl.so /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/


Where are the headers of libavcodec and libavformat located?

They are located in /usr/include/x86_64-linux-gnu/libavcodec. A simple sudo find / -name "libavcodec"would have revealed this.

The packages i have installed are:

libavutil-dev:amd64 7:2.8.6-1ubuntu2
libswresample-dev:amd64 7:2.8.6-1ubuntu2
libavcodec-dev:amd64 7:2.8.6-1ubuntu2
libavformat-dev:amd64 7:2.8.6-1ubuntu2


Chrome Ubuntu loading apache2's localhost instead of remote website

Just found that disabling apache2 appears to work around it:

sudo /etc/init.d/apache2 stop

That's not a fix, however, since it should all work fine when apache2 is running


I had the same problem , and its easy to recover whole partition within a few steps!

first , install testdisk:

sudo apt-get install testdisk

then get into testdisk , and I assume you wont find nothing from Quick Search so use Deeper Search,
There it will list some NTFS partitions , identify yours , highlight it and press 'p'
then when you found the desired file , press 'c' , it will ask you where to save your recovered file , locate to destination and press 'c' again!

Repeat for other files as well!


The command to show the default program and alternative programs to open magnet links is:

gio mime x-scheme-handler/magnet

Set your preferred app, for example:

gio mime x-scheme-handler/magnet org.qbittorrent.qBittorrent.desktop


How do i build from git repository with submodules on Launchpad?

There's no way to do it at the moment, but this is a known bug and should be fixable.  (Feel free to dig into the git-build-recipe source and propose a fix if you're in a rush.)


Update your ubuntu to latest version 12.04.1


"Failed to start apparmor initialization" after updating

I had to install snapd

sudo apt install snapd

Don't know why that didn't happen automatically


I was with the same problem of yours, then, after a couple of weeks with no solution, i finally found a website that had my problem solved. Run these commands on the terminal as root:

~# echo tifm_sd >> /etc/modules
~# echo mmc_block >> /etc/modules

Idk why but "sudo" does not work with me for these commands.

The website that helped me: http://kaustubhghanekar.blogspot.com.br/2013/04/making-you-sd-card-work-with-your.html

That is it! Here my SD Card Reader (JMicron) now works properly.

Ps: Sorry for the bad english, it isn't my natural language.


Explicit pictures show when searching "gedit" in Ubuntu Dash

This answer was written before you explained that the embarrassing results don't come from a list of recently used local files, but from the References scope.
It mainly targets at disabling local files/application history, but also disabling online search results from the Dash. Once you disabled the online results, you won't get those very ugly result thumbnails from Wikipedia any more.

I wrote a bug report/feature request about this issue against the unity-scope-home on Launchpad to ask for a child protection filter that either entirely blocks NSFW content from the search results in the Dash, only blocks them if they are no exact matches of the query, or only blocks at least their preview thumbnail to make them less offensive.
If you agree with me that this would be useful and you have a Launchpad account (or don't mind creating one - it's free of course and you only need to enter an email address), please consider confirming this bug.
You do this by visiting the link below, logging in to Launchpad, and then clicking on the yellow pencil icon next to the line

This bug affects N persons. Does this bug affect you?

Select Yes and click on Change and you're done.
Here is the link to the bug report.

Old answer (disabling local file/application history and online search results):
To disable recording of your file and application usage that, open the System Settings and go to the Security & Privacy options.

Switch to the Files & Applications tab:

Here you should turn Record file and application usage OFF. Additionally you can/should also use the Clear Usage Data... button to get rid of old recordings.
Then you can also disable online search results (This is where the explicit images in your case were coming from!). To do that, switch to the Search tab.

Here you can simply turn Include online search results OFF.


How do I add a system-wide menu item to the Applications menu?

You can create the proper .desktop file and place it in /usr/share/applications which is the global place for applications.

It would like something like this:

[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=Sample Application Name
Comment=A sample application
Exec=/opt/application
Icon=application.png
Terminal=false
Categories=Application

Name will set the name that appears in the menu, and Category will place it in a certain category in the menu. Exec is the command to start the program, it uses full paths and can also take parameters. You can open the other .desktop files in /usr/share/applications with a text editor to get an idea.

For more info: desktop-files


Accessing a folder that I can't "name" in the shell

A few suggestions, first try using tab completion

cd /var/www

rm -rf ./.TabTab

Or use find

cd /var/www
find -maxdepth 1 -type d -exec rm -ri '{}' \;

If that fails, try running fsck (from a live CD).

Post any error messages or odd behavior you get


Installation stopped at "Configuring Target System"

It seems to be related to https://bugs.launchpad.net/ubuntu/+source/gnome-keyring/+bug/820485.

You can try the following options as suggested:

Instead of starting Live and then installing, select "Install Ubuntu Now"
Do not select the "Download Updates while installing" option.


I had the same problem; I came up with this upstart conf file which will find all flashcache drives and load them, then set sysctl settings for the drives, and then mount them.  If you add more drives, all you need to do is add them to /etc/fstab and make sure they have the option nobootwait in the fourth field, e.g.

  /dev/mapper/export /export ext4 nobootwait 0 1

Here's the file, which should go into /etc/init/flashcache.conf:

# flashcache - Set up flashcache devices and mount them

description "Set up flashcache devices and mount them on boot"

start on mounted

task

console output

script
    # Load any flashcache devices and get them ready to mount, then set sysctl settings.

    PATH=/sbin:/bin:/usr/bin

    # Load up any flashcache devices
    for P in /dev/disk/by-id/*; do
        if flashcache_load $P 2>/dev/null; then
        echo "Loaded flashcache device from $P"
        fi
    done

    # Now look through all WRITE_BACK devices and set the sysctl settings
    for d in $(dmsetup table | grep 'cache mode(WRITE_BACK)' | perl -pe 's@.*ssd dev \(/dev/disk/by-id/(.*?)\), disk dev \(/dev/disk/.*?/(.*?)\).*@$1+$2@'); do
        # disable writing dirty cache data at shutdown
        sysctl -w dev.flashcache.$d.fast_remove=1
        # change reclaim policy from FIFO to LRU
        sysctl -w dev.flashcache.$d.reclaim_policy=1
        # do not write "stale" data to disk until evicted due to lack of space
        sysctl -w dev.flashcache.$d.fallow_delay=0
    done

end script


Resolved.

I ended up installing codelite-plugins package from Ubuntu repository

sudo apt-get install codelite-plugins

I wanted to avoid this, because it has a lot of plugins I will not use. I can disable them in plugin manager, but I don't like installing stuff I don't need.

Here is a full list of plugins you get with the package (02 Mar 2019):

Also...

For those of you who are more advantageous, have a look HERE. Official Codelite Github page has the app source and plenty of plugins. You can compile everything yourself and most likely choose what you want/need. I was too lazy to do it though...

Enjoy, hope this helps somebody.


Why aren't multimedia codecs included by default?

Some are for legal reasons - some video/audio formats require further license agreements or don't quite fit under the Ubuntu license schema. You can read more about this on the Ubuntu Wiki: Restricted Formats page.

I know that Ubuntu Studio comes with a lot of these codecs and "drivers" already installed. However for an average desktop user it's a lot of overkill as it's designed for multimedia market.


I assume that you want to bind for any bash command.

1.0 First get commands to change workspace from terminal

Go to first workspace. Open terminal and run wmctrl -d | awk '{print $6} for me it yields 0,0 note it as co-ordinates of first workspace.
Move terminal to Next workspace and do above procedure again for all workspaces.

My output after doing above steps

virpara@Ascension:~$ wmctrl -d | awk '{print $6}' #in workspace 1
0,0
virpara@Ascension:~$ wmctrl -d | awk '{print $6}' #in workspace 2
1366,0
virpara@Ascension:~$ wmctrl -d | awk '{print $6}' #in workspace 3
0,768
virpara@Ascension:~$ wmctrl -d | awk '{print $6}' #in workspace 4
1366,768

You may be thinking What we've got after doing this? we have co-ordinates to switch to desired workspace.

We can use wmctrl -o X,Y to switch to respective workspaces. where X,Y are your workspace co-ordinates.

For me, Commands to switch to workspaces are as follows,

For Workspace 1 => wmctrl -o 0,0
For Workspace 2 => wmctrl -o 1366,0
For Workspace 3 => wmctrl -o 0,768
For Workspace 4 => wmctrl -o 1366,768

2.0 Set HotKeys for those commands

How to install AutoKey

Open software center > search for autokey > install AutoKey(GTK)

How to bind any key ?

Step 1 : Press Ctrl+Shift+N or from File > Create.. > New Script. Rename with whatever you like.

Step 2 : Paste below code as shown, I'll bind Super+1 to Workspace 1. Replace wmctrl -o 0,0 with your command.

import os
os.system("wmctrl -o 0,0")

Step 3 : Then in bottom-right corner there is three Set buttons to set for Abbreviation or Hotkey or Window Filter. Click second Set button (because we want to set hotkey).

Step 4 : Click Super then Click Press to Set and hit a key you want to assign(in your case 1. I'm hitting 1).

Step 5 : Click OK.

Step 6 : Click Save in bottom-right corner.

Try hitting Super+1.

Go to Step 1 : and do this for all commands you got earlier in 1.0 to bind to Super+2, 3, 4 .


Both Chrome and Firefox will let you drag links to the desktop, where a .desktop file is created. For this page it looks like:

[Desktop Entry]
Encoding=UTF-8
Name=Link to launcher - How to create Shortcut to a Web Page in Linux? - Ask Ubuntu
Type=Link
URL=http://askubuntu.com/questions/892588/how-to-create-shortcut-to-a-web-page-in-linux
Icon=text-html


Edit: At the time this answer was written, the question's original title read:

What's a source code?

This answer was composed to address that form of the question.

When humans write software, they need to design the coding language such that it makes a lot of sense; it's easy enough to grasp what is going on, thus it's easy enough to work with it.
But such code:

in order to work, it needs a lot of other programs to be present and run on the computer

this makes distributing it more complex and challenging

tends to run pretty slow on computers

Solving both of these challenges involves running the original, human-friendly code through a sort of "converter" (often called "compiler"), that takes in the original written by people, and outputs something that:

has a lot of the (originally) externalized variables and logic baked in

the code will be less readable and less flexible
but it will be more self-efficient and will need the presence of less helper programs

is further optimized for machines to run it

such code can outperform (speed-wise) the previously discussed variant by the factor of dozens or hundreds

There may be various degrees of differences between the variants. The original human-optimized code is always readable to you and to other humans, containing words and logical constructs that you can recognize; machine-optimized code however, at its most extreme, may indeed consist just of 0s and 1s; just by looking at it, you would have no chance forming an idea what it does.
From the aforementioned variants, the first, human-optimized one is called the "source code".
The compiled, machine- and distribution-optimized variants sometimes fall into a category that's called a "binary".
The interesting impact is that when someone gives you only the machine/distribution-optimized variant (e.g. binaries), then you can use the software, but cannot change how it works or what it does. (And creating copeies of it might also be challenging.) Often it's a lot of work even for experts to look into it somehow and figure out how it works (called reverse-engineering).
But when somebody lets you have the human-optimized source-code as well, along with the compiler that's necessary to compile it into its final, machine-optimized form, then you may have full control over that software: from then on, it only depends on the rights that the enclosed license grants you (which is usually pretty permissive in open-source projects).
In Ubuntu repositories, the source code of various software you use may be offered to you. But you need to download it only when you intend to change aspects of the software, and then compile a modified variant of it yourself. If you don't want to get into that, the source code is of little use to you.


After deleting the EFI menu entry for Windows, I always have a system error and can't shut down properly

There's no need to remove the Windows entry from the firmware's built-in boot manager. If Windows is setting itself as the default boot loader (which you don't explicitly say it's doing, but might be why you're removing its entry), see this question/answer for a solution.

The system error is probably unrelated to this, but I can't be sure. Can you provide more details, like an error message? You'll get better diagnostics on the shutdown problem if you start up without the quiet splash kernel options, which are enabled by default. You can remove them in GRUB by hitting e to edit the options before booting.


How do I back up and restore Passwords and Keys?

Keyring data is stored in several places:

"Passwords" (GNOME Keyring data) are stored in ~/.local/share/keyrings
"Secure Shell" data (SSH keys) are stored in ~/.ssh
"PGP Keys" (including GPG keys) are stored in ~/.gnupg

Note that copying the whole .gnupg folder copies your trust data as well, so this is probably preferable to doing an import/export through the "Passwords and Keys" interface.

You will need to backup and restore each of these folders. Preferably don't use a flash drive to do this (see note below). When restoring the folders, make sure the permissions are set correctly (see note below).

Note on flash drives

You should avoid using a flash drive to store/transfer keys, even temporarily, since deleted data is easily recoverable from a flash drive unless you take precautions, like encrypting the drive. If you have a network connection, transfer over ssh would be both convenient and secure.

Note on permissions

When you restore the folders, they need the correct ownership permissions, which you can apply as follows:

chown --recursive USERNAME:USERNAME ~/.ssh
chmod 755 ~/.ssh
chmod 644 ~/.ssh/known_hosts
chmod 644 ~/.ssh/authorized_keys
chmod 600 ~/.ssh/config
chmod 600 ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa.pub
# repeat the last two for other public/private pairs
# you may need to "service ssh restart" after changing these values

chown --recursive USERNAME:USERNAME ~/.gnupg
chmod 700 ~/.gnupg
chmod 600 ~/.gnupg/*
# for any subfolders, you need to apply 700 to the folder
# and 600 to the files in that subfolder:
# chmod 700 ~/.gnupg/subfolder
# chmod 600 ~/.gnupg/subfolder/*

References:

Permissions on private key in .ssh folder? (Super User)
Fixing “WARNING: UNPROTECTED PRIVATE KEY FILE!” on GNU/Linux (How-To Geek)
ssh returns "Bad owner or permissions on ~/.ssh/config" (Server Fault)
What are the correct permissions for the .gnupg enclosing folder? gpg: WARNING: unsafe enclosing directory permissions on configuration file (Super User)
Notation of traditional Unix permissions, especially "Numeric notation" (Wikipedia)


Install logrotate to manage your log files:

How to manage log files


How do I save all images from .xls file?

Open the xls file in OpenOffice or LibreOffice
save it as a open document (.ods).
rename file to  have .zip extension
uncompress that zip file

All images should be in a Pictures/ directory in that zip file.

This also works if you are given a .PPT which can be saved in Impress.


that is great to hear that you love the new install of Ubuntu. I must admit, that I loved it too and have not looked back at all. The more you play with it, the more you will love it and the more you will realise you don't like the bigger OS's trying to rule the world. Sorry that is my little rant over lol.

You can reduce the size, but when I looked into it, it was a bit of a game. Have a look at this link, it may help you and good luck.

As the Ubuntu OS is only a week old, you could back up your user folder and then install it again. This time giving the Ubuntu partition the size you require.

Reduce partition size


How can I change the system-devices panel icon (the gear icon) without changing the theme?

At least on 16.04 and 16.10, the icon is located:

/usr/share/icons/ubuntu-mono-dark/status/22/system-devices-panel.svg

As you can see, to test, I replaced it with an owncloud icon :)

Notes

No need yo say that your new icons need to be of the same type (.svg)
To edit/replace fioes in /usr you need administrator`s permissions. After backing up the old icons, simply run the command (from a terminal):

sudo cp /path/to/new/icon.svg  /usr/share/icons/ubuntu-mono-dark/status/22/system-devices-panel.svg

You might also want to replace:

/usr/share/icons/ubuntu-mono-dark/status/22/system-devices-panel-alert.svg

and

/usr/share/icons/ubuntu-mono-dark/status/22/system-devices-panel-information.svg

...to make a matching set in case there would be a change in state for some reason.


Is there a maximum amount of time that tail -f can reliably run?

It maybe that the log file has been renamed as part of the scheduled log rotation, so in which case tail -f is looking at the (now) old log.  Perhaps using tail -F is a better approach as this can detect when the new replacement log file appears.


Dreampie Python Interpreter Documentaion

From the Github issues page:

  There's no real documentation, but you can find the important staff under Help->Getting Started.


Finally I find use jabber protocol will get ride of this problem
As now(gnome 3.10), this problem is fixed


How to install an application without some dependencies?

Try this:

sudo apt-get clean
sudo apt-get -d install multisystem
cd /var/cache/apt/archives
ls *.deb

Then you can manually install individual packages:

dpkg --ignore-depends=unwanted-package.deb,another-unwanted.deb -i package.deb

Note that this is a way to install software without dependiences, not to make it work properly without dependiences.


RAID drive not detected by Lubuntu installer

Finally I've been able to get around this issue by myself but it will not works for everybody.

I disabled the single drive raid into the bios' controller.
as a result, few seconds are lost on the boot while the fasttrack controller scan for drives and the motherboard bios' cannot allow to boot on it.
But it also allow the installer to detect the drive and start the installation.

At the first reboot, I rebuilt the single raid drive, allowing to boot on it. As it's a single drive, nothing is modified on it by the fasttrack controller and so no data is lost.

But this method would not have work if I had a dual drive raid 0 or even maybe raid 1.


Updated amd microcode do not load after reboot

Here, it did not load either, but apt wanted to autoremove it - just to install it again afterwards (on apt-get update). Turns out an "apt-get dist-upgrade" was needed to upgrade the linux-generic. Afterwards, the amd-microcode was uptodate again (and the autoremove issue went away).


scribus interface do not scale correctly on ubuntu budgie 18.04

With Debian testing it works OK with the latest Scribus code.

The problem seems to be solved with the most current (available) versions of Qt and Scribus.

I would not suggest you to install newer versions of Qt than what Ubuntu provides, but you could try to install scribus-trunk instead of scribus-ng. There might have been some progress on this matter since the release of Scribus 1.5.4.


Steps to take to take to safely share my little server with classmates

Don't give sudo/root access.  Whatever servers you create, ensure that the server is running by it's own access in it's own space.  For instance if you were running a web server, it would be running as the user www-data.  www-data can make changes in its area but can't make any changes outside of it's access control.

So check the name of the userid and groupid of the running server to verify that it's running in it's own space.

Most servers will already come with this design.

Also, you yourself might consider being careful when running elevated sudo commands.  It'll take an elevated command to make system-wide changes.  So if as you are concerned one of your guru students wanted to try to gain control of your server, they might try to get you to run a script or a problem that would turn on elevated access to him or one of his programs.  If you ran the test programs as a normal user, you couldn't make inadvertent harmful changes.

Only run sudo commands when you are intentionally aware of specifics that you want to install or configure.

Your Personal Space

By default your home directory is browser and readable by the world.  You in the permission command it's the O for others.  The x on a directory is permission to enter it.  The r on a directory or file means permission to read the content.

Your home folder looks something like this if you haven't changed it:
(The output of ls ~/ which is your home directory)

$ ls -l ~/
drwxr-xr-x 24 apollo apollo 4096 Sep 25 18:03 apollo

In this case apollo is the userid groupid.  The permissions are in groups of three, uuugggooo.  The first three is you the user.  The second three is the group permission, and the last three is others or everybody.

The permission bits are:

r - Read
w - write
x - execute (or for a directory enter)

So if you look at the default permission above you can see that everyone can read and enter the directory.  This can be changed with the command chown.  For instance:

$ chmod go-rx ~/

That command would make the specific directory inaccessible to the groups and others.  The home folder would then look like this:

drwxr----- 24 apollo apollo 4096 Sep 25 18:03 apollo

Having that type of permission, no one can browse your personal space.  Of course if it were something you wanted to share, you could perform that command on your ~/Documents folder or any other folder that you want to be sure no one can browse.

While by default many of your folders can be browsed, they can't be changed by others.

You might consider making a test account for yourself and using it to test what is available to the students.

You most likely have good students, but most children as well as most people, will be curious and try to go to a place where they might feel is off limit out of curiosity.  Also, your student, while they shouldn't could likely share the password with the friends and brothers who might be more inquisitive.


How can I automatically mount eSATA drives when plugged in?

Previously, when HAL (Hardware Abstraction Layer) was handling the hardware devices, you would follow the instructions found at http://vstone.eu/2009/04/hal-and-auto-mounting-external-e-sata-devices/

However, current distributions use udev to handle hardware devices, which means that you have to do some work (I did not find instructions for udev and eSata).

So, what needs to be done is edit /lib/udev/rules.d/80-udisks.rules and the section that says

# Set eSATA port type for known eSATA CardBus adapters - first we want to ensure
# the device is on a cardbus controller (upper PCI device) - then we check
# vid/pid (lower PCI device)
#
SUBSYSTEM=="scsi_host", ATTRS{class}=="0x060700", GOTO="ata_port_cardbus"
GOTO="ata_port_cardbus_end"
LABEL="ata_port_cardbus"
# Mass storage controller: Silicon Image, Inc. SiI 3512 [SATALink/SATARaid] Serial ATA Controller (rev 01)
#
SUBSYSTEMS=="pci", ATTRS{vendor}=="0x1095", ATTRS{device}=="0x3512", ENV{UDISKS_ATA_PORT_CONNECTOR_TYPE}="ata_sata_external"
LABEL="ata_port_cardbus_end"

You would probably need to add your Vendor/Device IDs (similar to 0x1095, 0x3512). That is, add a single line similar to

SUBSYSTEMS=="pci", ATTRS{vendor}=="0x1095", ATTRS{device}=="0x3512", ENV{UDISKS_ATA_PORT_CONNECTOR_TYPE}="ata_sata_external"

You can find your Vendor/Device ID by using the command lspci.


Touchpad & TrackPoint (ThinkPad L520) suddenly unresponsive

I had the exact same problem/config, typing

  synclient TouchpadOff=0

in a terminal solved it.


Install rocks without reloging after 'apt-get install luarocks'

You can try with this command:

sudo luarocks --from=https://raw.githubusercontent.com/torch/rocks/master/ install loadcaffe


The solution is easy:

sudo apt-get install php-gd php-mysql

16.04 LTS comes now with php 7.0 and the names of the whole packages including the virtual packages have changed to be now php-* or php7.0-* instead of php5-*.


If you have Intel processors, make sure intel-microcode is installed... this will assure that you're running with the latest processor microcode:

sudo apt-get update

sudo apt-get intel-microcode

Install thermald... to help control the temperature:

sudo apt-get update

sudo apt-get install thermald

Thermald comes with a default configuration file at /etc/thermald/thermal-conf.xml that will control most computers, but may need to be customized for some computers. See man thermal-conf.xml for some details and examples. Once one has modified the configuration file, stop thermald and restart it:

sudo service thermald restart

After installing thermald, I'd stop the thermald process, and run it manually as sudo thermald --no-daemon to watch its actions in real time. This real time info can be used to create your own customized thermal-conf.xml file. See man thermald for more information.

sudo service thermald stop
sudo thermald --no-daemon --loglevel=debug

You can search for thermald here on Ask Ubuntu to see what previous answers there are.

A good starter reference is at https://wiki.ubuntu.com/Kernel/PowerManagement/ThermalIssues


Dropbox will not permit me to associate it to any account

Check your logs. See if Dropbox is giving any errors. On Ubuntu, you would use journald like so:

journalctl -xu dropbox

Another thing worth trying is starting over. Perhaps you installed Dropbox and there was an error, or you missed a step. You can completely remove Dropbox and try installing again. Here is their official un-install instructions:

https://www.dropbox.com/help/desktop-web/uninstall-dropbox


It looks like you've installed non-Ubuntu packages.  Ubuntu packages have the word "ubuntu" in the version.  You need remove the non-conflicting packages to return your system to the Ubuntu versions.

Firstly uninstall libcups2:

sudo apt-get remove libcups2 cups-core-drivers cups-daemon

Then tell apt to fix it:

sudo apt-get -f install

Then make sure everything else is in line:

sudo apt-get install ubuntu-desktop

If there are other non-Ubuntu packages that conflict, you'll get a similar warning.  If that happens, just repeat the process removing the conflicting packages and running apt-get -f install.

As for installing hplip, that's another question.


How do I prevent ubuntu one from connecting automatically?

Opening the Ubuntu One application from the launcher, switching to the Settings tab, and unchecking the Connect automatically when computer starts setting, will disable connecting to the server when the client starts.

Also, Ubuntu One does not store your password locally. It acquires an OAuth token when you log in from the client, and stores that. However, changing your password on the server should cause the token to be revoked, but there may be a bug where the authentication server and the file synchronization server get desynchronized in the process.


How can I assign a keyboard shortcut for the script that I have created?

Go to System Settings -> keyboard -> shortcuts.
Click on  + to add a custom shortcut.Name it anything.
In the command box type gnome-terminal -e "path_of_script".
Make sure your script has executable permission.

Also if you want  your gnome-terminal should remain open after executing the script, add read  at  the last of your script.


FIXED. I did a standard upgrade with the software updater and magically, after 3 weeks, this problem was instantly solved the second the upgrades came in. Unbelievable. I've been going crazy trying to fix this, and it happens by itself. Rather, I think it's because I added an ubuntu-mate ppa that I needed last night and didn't have for xenial. (NB There is NO checkmark to accept this answer. Is it because I answered my own question?)


Upgrading from Ubuntu 14.04.4 LTS to 16.03.6 safe or not?

If I were you I would just make a Clonezilla backup image of your system drive.  You could then upgrade, and if it breaks something, just restore the image and it'll be like nothing ever happened.  That way you don't have to worry about the restore point not working post-upgrade.


Reverting Xubuntu's startup screen back to Ubuntu's

It turns out I did not remove everything xubuntu-desktop installed. plymouth-theme-xubuntu-logo and plymouth-theme-xubuntu-text were leftover. So I executed sudo apt-get purge plymouth-theme-xubuntu* and sudo apt-get purge *xubuntu* (just in case) and thesesolved my problem.


Ubuntu One fails to sync home folder on Lubuntu

The missing module is provided by the ubuntuone-couch package. Just use synaptics package manager to install it.


After unmasking my Apache Server it deleted some essential .service and .conf files.

Restore them from a backup.

"Apache" and "service" only shows me 1 result on our systems:

$ locate .service | grep http
$ locate .service | grep apache
/lib/systemd/system/apache2.service.d
/lib/systemd/system/apache2.service.d/apache2-systemd.conf

Contents:

$ /lib/systemd/system/apache2.service.d$ more apache2-systemd.conf
[Service]
Type=forking
RemainAfterExit=no

Can you edit into the question a list of file names you removed?  Maybe history can help identify them. Or maybe you get an error that a service or conf is missing.

Regarding .conf: most of them are personal so can not be recreated by the system and you really need to restore them from a backup.


Root user already exist in PC but password is not setup.

Just you need to do

  sudo passwd root

that's it.

then you can do as normal logs as user.


In any way, never copy-paste a password from a plain-text source.

The script below can be used to paste your password in an entry of a Zenity dialog. Subsequently, after pressing OK, the script will type out what is entered (or pasted) after three seconds.

Although I wouldn't see how, I am not sure if there are any security issues with what you want, so use it at your own risk.

The script

#!/usr/bin/env python3
import subprocess
import time
try:
    password = subprocess.check_output([
        "zenity", "--entry", "--title=Password",
        "--text=Paste your password below"]).decode("utf-8")
    time.sleep(3)
    for c in password:
        subprocess.call(["xdotool", "type", c])
except subprocess.CalledProcessError:
    pass

How to use

The script needs xdotool:

sudo apt-get install xdotool

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

python3 /path/to/pasteword.py

within three seconds, click in the entry where you have to enter the password, it will be typed out by xdotool
If all works fine, add it to a shortcut: choose: System Settings > "Keyboard" > "Shortcuts" > "Custom Shortcuts". Click the "+" and add the command:

python3 /path/to/pasteword.py

Note

If you find the three seconds not the most convenient value, you can change it in the line:

time.sleep(3)


Unity 17.04 Desktop Launcher problem for MySQL Workbench

Following a suggestion in another post, I found the Unity Dash.  There I get 3 matching icons for mysql_workbench.  All I know is I clicked one, and am now able to Lock either from there or from running mysql_workbench from a terminal and it works OK again.

I'm sure the multiple icons are symptomatic of something unhelpful.

I have deleted all ~/.local/share/applications/*mysql-workbench-bin.desktop files.  I no longer get multiple matches from Dash, and the one I do get works fine again.  So I guess that was connected to the problem.


The /etc/apt/apt.conf file is still read if it exists.  The apt configuration provided by packages is installed as separate files in /etc/apt/apt.conf.d/ so that it can be added and updated independent of any local changes you make in the main configuration file.

So if you have local configuration changes, just create the file.


Why am I unable to see a folder in a ntfs formated drive

May be similar to reported bug Data saved to a fuseblk (Windows NTFS) file system is silently lost


If you are running the official Eclipse version, go to Help -> Install Software. From there you can select a repository for the applications specific to your version and you can search for Window Builder.
Just click install and reboot Eclipse.

Then you can create new Window Builder classes with your Create New and Open With menus.

This was tested on Eclipse Luna Java EE on Ubuntu 14.10.


The tags available are Weekly, Daily, Monthly, Boot, Hourly, and Other.

W Weekly. This is a snapshot taken weekly.
D Daily. This is a snapshot taken daily.
H Hourly. This is a snapshot taken hourly.
M Monthly. This is a snapshot taken monthly.
B Boot. This is a snapshot taken at boot.
O Other. This is usually when you've triggered the snapshot manually.

Note that O can also trigger/take the place of a regularly scheduled backup and so you can get two tags for the same backup.


My trackpad stopped working (not detected) after update, how do I fix this?

I had the exact same problem !

To fix it you need to have a lookup for a line for i2c_hid in /etc/modprobe.d/ folder and to comment it.

Lookup with this command for example : grep -r i2c_hid /etc/modprobe.d/

And you may find this :

/etc/modprobe.d/blacklist.conf:blacklist i2c_hid

Then you just need to comment this line and reboot. And your trackpad will be back :-)


Ubuntu Server Install for Plex - not using HDD just small NVME

If Plex can see the additional drive but cannot do anything with it, then the issue may be permissions. Based on this article, you will need to do the following:

Switch to the super user:
sudo su

Change the default directory permissions to 755:
find /usb/media3 -type d -exec chmod 755 {} \;

Change the default file permissions to 644:
find /usb/media3 -type f -exec chmod 644 {} \;

Open PMS and add the directories to the appropriate sections
Manually invoke a Library update

If you're not sure where the external device is mounted to, you can find with with df -h:
$ df -h
Filesystem     1K-blocks      Used Available Use% Mounted on
udev             3927124         0   3927124   0% /dev
tmpfs             791108      3172    787936   1% /run
/dev/nvme0n1p2 458726552 235684072 199670756  55% /
tmpfs            3955540        24   3955516   1% /dev/shm
tmpfs               5120         4      5116   1% /run/lock
tmpfs            3955540         0   3955540   0% /sys/fs/cgroup
/dev/sda1      491207920 138964460 327221748  30% /media/usb0
/dev/nvme0n1p1    997456     10264    987192   2% /boot/efi
tmpfs             791108        44    791064   1% /run/user/1000

For the sake of this example, I can see a storage device is mounted to /media/usb0, and that's where I will be able to access the data and copy new files to.
If you would like something a little easier to read, try lsblk:
$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda           8:0    0   477G  0 disk
└─sda1        8:1    0   477G  0 part /media/usb0
mmcblk0     179:0    0  29.7G  0 disk
└─mmcblk0p1 179:1    0  29.7G  0 part
nvme0n1     259:0    0   477G  0 disk
├─nvme0n1p1 259:1    0   976M  0 part /boot/efi
├─nvme0n1p2 259:2    0 445.5G  0 part /
└─nvme0n1p3 259:3    0  30.5G  0 part [SWAP]

Hope this helps


How to force aptitude to display each search result in multiple lines?

The simpler thing you can do, without using an option for the display format, is to change the display width.

aptitude uses as display width that of the terminal, or a fixed width of 80 if cannot determine the terminal width (i.e. when you pipe the result to another command).

You can change that with the -w option, for example:

aptitude -w 200 search pattern

Unfortunately, the field containing the package name expands considerably, and don't seem to be controllable through the format option (-F).

Also, could be useful to pipe the result to less -S: the -S option makes less to not wrap line longer than the terminal width. What seems to be cut can be seen using the right and left arrows.


Objects fade away on desktop on Ubuntu 14.04, after reinstalling Nvidia 340.24 driver

although not on ubuntu, i have notice 340.24 has a lot of bugs when compare to 331.89,

i have small intermittent pauses,
firefox would flicker on certain pages aftwe going back page.
mouse selection in menu lags.
nautilus lags in showing folders.

best revert back to older driver and report bug to nvidia.


Ubuntu Core 16 "snap find" only shows 5 snaps available

I read somewhere in the snapcraft forum that that's an artificial limit on the pattern-less snap find.  If you try something like snap find ca you will find packages not found in the pattern-less find, so the command is working fine


Cant select free space on disk when installing Ubuntu Server

Solution:
I just downloaded 16.04 server and upgraded to 20.04 from there. 16.04's setup is so much better and I could actually select the free space!
It's been a while since I installed Ubuntu Server on a PC but I still don't know what was really the problem.
(No offense, Canonical - your setup method for server 18.04 and above is kinda bad, bring back the 16.04-style installation!!!)


Did you select boot usb from the start up menu? Its under the F12 menu I do believe and then from the select boot sequence and make usb device first.


Install the indicator-sound package which provides the normal ubuntu volumecontrol via the command

sudo apt-get install indicator-sound

and to make the change take effect do

killall unity-panel-service

if this didn't work than run following command in terminal

gsettings set com.canonical.indicator.sound visible true

and you will be good to go


Bless doesn't fix white boot screen boot delay for single-boot Xubuntu 14.04 on Macbook 4,1

It sounds like you've already tried variations on the "bless" command, but I can at least confirm that it is possible to fix this on a setup just like yours.

I too have a MacBook 4,1 and I just installed Xubuntu 14.04.1 (32-bit) on it a couple of days ago in a single-boot configuration.  Right after install, I was having the 30-second white-gray screen delay problem.  Here's what fixed it for me:

Clear PRAM by holding Command-Option-P-R right after the Mac boot chime, and wait until the second boot chime to let go.
Boot into a Mac OS X 10.6 installation disc.
Run a Terminal, and type the following:

bless --device /dev/disk0s1 --setBoot --legacy --verbose
Shutdown from the installer.
Turn on the MacBook and hold down the trackpad button after the chime to eject the installation disc.
The laptop should continue booting Xubuntu after the disc ejects.

Following that procedure got me down to a white-gray screen delay time of only about 4-5 seconds.  Note that the "--verbose" in the bless command is optional, but it will give you more debugging information that might be helpful if something still isn't working right.

In case it makes a difference, I should also mention that I wiped my hard drive before installing Xubuntu and accepted the default values for a full-disk install.  That ended up automatically partitioning my hard drive as GPT with the first partition as a 1MB BIOS Boot Partition (type 0xEF02), the second partition as ext4 for the root filesystem, and the third and final partition as 1GB of swap.  Xubuntu 32-bit always requires booting in BIOS mode, so the proper boot partition for me to feed to the "bless" command was "/dev/disk0s1", and the "--legacy" flag tells the Mac to boot using BIOS-compatibility mode.  Your specified boot partition and whether you use the "--legacy" flag or not would likely change if you're booting Xubuntu 64-bit in EFI mode, though I can't say I'd recommend that on this particular laptop unless you've upgraded and maxed out the RAM.


can I install mint along with ubuntu on my 32GB pendrive?

You can install as many different live distros as you like on a pendrive using Multisystem.

It is very well maintained, and there are frequent automatic updates once you have the repositories installed.

You can get the source here:

http://sourceforge.net/projects/multisystem/

But you can also install and keep it updated it via Ubuntu package manager by downloading the following, extracting it and running it as root (be warned!):

http://liveusb.info/multisystem/install-depot-multisystem.sh.tar.bz

The only thing is that you will have to start with a freshly-formatted USB, then use Multisystem to install Ubuntu and Mint. However it will mean you won't have to manually configure Grub2 yourself, which would be another way to do things.


screen rtorrent freezes when using screen for other programs

it turns out that the copy command was maxing out the usb connection. I have a dodgy USB hub which is unpowered and seems to run at usb1.1 speeds - I was saving the downloads from rtorrent onto an external hard drive over this usb1.1 connection whilst also copying files from this drive to another drive.

Now that I have figured out that the hub was slow I removed it and the two instances of screen (rtorrent and cp) work fine together. Neither of them freezes :)


how to dual boot windows 7 and xubuntu 12.04 lts

Yes, you can. Install Ubuntu after Windows. Please refer the following link for details.

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


Is it possible to fix Ubuntu 16.04 by installing Ubuntu 16.04 over the top of the existing Ubuntu 16.04?

When you install Ubuntu 16.04 overtop of an existing 16.04 you won't have to reinstall Windows OS because it's on a separate partition. Just make sure you pick the installation option "Install alongside windows".

The question of how to install overtop an existing version of Ubuntu (without upgrading / conversion pains) is described here: how-to-reinstall-ubuntu-keeping-my-data-intact Pay close attention to the files that need to be backed up.

Having to reinstall the non-Ubuntu Linux applications you've been using is not necessarily a bad thing because you get fresh, clean, up-to-date non-converted versions of them too.

If you are in doubt of the "new installation" process and have extra space you can shrink the current Ubuntu partition using GParted. Then create a new partition and install a second fresh version of Ubuntu 16.04. Next install all the non-Ubuntu Linux applications you've been using and test them. Of course this takes extra time but gives you peace of mind about the whole installation from scratch process with this trial run.


See if anything here will work for you. It worked for me. http://blog.jdpfu.com/2012/09/14/solution-for-slow-ubuntu-in-virtualbox


What mouse model do I need to not have double click problem in LP:365300?

I found a bug in launchpad for this issue (LP #365300). Comment #55 points out that this is in fact a hardware issue among all sold mice in the market. It seems that Microsoft fixes this by implementing the double click delay in reverse I think. If you experience this issue try another mouse, that should solve it.


The IDENTIFIED BY {password} bit is unnecessary. If the MySQL user has not already been created, then:
CREATE USER 'wordpress'@'localhost' IDENTIFIED WITH mysql_native_password BY 'superSecretPassword!123';

Then you can assign permissions:
GRANT ALL ON `wordpress`.* TO 'wordpress'@'localhost';


What causes Pinta to crash instantly when I begin image selection?

Probably it's Mono problem and seemly v4.4.1 or older or dependently in some versions only.

Try once install/keep up-to-date the Mono by the following command (Ubuntu 18.04):

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update
sudo apt install mono-devel

Or in older Ubuntu please follow instructions mentioned here.

Sometimes installing mono-runtime package would be enough to fix that.

You may also need to follow 3rd step in instructions and do Installation Verification.

If Mono was working fine then you should not have crash problems when using crop in Pinta as well.

You may need to try with different versions of Mono to get it to work.


HDD backups are larger than physical disk size

Well, I did some research to find out that my conception was wrong; and I do have an answer.

The Linux/Ubuntu /dev/ folder contains a list of device IO interfaces, not so much files. Here's a link to where I discovered this.

So, instead of reading a file, and dumping it to a file, I was reading an output stream, and dumping it to a file. Of course, output streams don't necessarily have any beginning or end, and can be read indefinitely. Thus, I have no idea what's in my backup file, other than what the HDD output while I was querying it.


You can edit /etc/systemd/resolved.conf

and set the DNS to the locally running bind aka DNS Server via

[Resolve]
DNS=127.0.0.1

restart with

systemctl restart systemd-resolved.service

and when you dig (or lookup as explained above) you DO get (just) a www.example.com A record with a locally served DNS' zone files appropriate IP result but it doesn't display as much information as what you get if you append @127.0.0.1 or the resolv.conf has 127.0.0.1 ahead of 127.0.0.53

This is a partial answer sourced from the help in comments and should be retained and not deleted like all the other replies I added that were delete on the grounds they where not declared like this one as a valid/useful Answer or partial answers, but they probably where useful for certain situation.
In my case I'm doing DNSSEC etc. and need to see more substantial results like those from @127.0.0.1 or at least that was why I didn't put more clarity on it being correct in some cases. I was of course expecting the full response you get when the resolv.conf points directly to the DNS running on the system at 127.0.0.1 and not chained via 127.0.0.53 to the DHCP provided router gateway (typically).

[Also please note the meager comments are insufficient to show work with code blocks and results, hence the importance of not deleting the communities discussion on resolving these problems together. Please consider multiple user flags for deletion status.]


Existing 14.04 repair going on for 20 hours. Should I abort?

Yes, if you can handle it. It maybe worth trying the whole repair again with a scratch free clean live cd.


Cannot remove codeblocks using apt-get - Ubuntu 14.04

While revisiting this error today, I came upon the solution proposed in this forum post. It turns out that the issue is caused by the cross dependency between several of the codeblocks packages, so the entire install needs to be repaired using this command:

sudo apt-get purge codeblocks-contrib-dbg codeblocks-libwxcontrib0 codeblocks-dbg \
codeblocks-dev codeblocks codeblocks-headers libcodeblocks0  codeblocks-contrib \
codeblocks-contrib-common codeblocks-wxcontrib-headers codeblocks-wxcontrib-dev \
codeblocks-common libwxsmithlib0 libwxsmithlib0 libwxsmithlib0-dev

copied in as one line in the terminal. After processing, I could once again successfully install software.


Power Button shutdown permission override

Alright, I've got a solution that works nicely, for me at least. I'm running Ubuntu 14.04. I haven't extensively tested it, but it seems to do the job. Comment if you see issues.

Create Polkit rules

Run this command in a terminal:

gksudo gedit /etc/polkit-1/localauthority/50-local.d/disable-shutdown.pkla

And copy this into it:

[Disable shutdown/reboot]
Identity=unix-user:*
Action=org.freedesktop.login1.reboot;org.freedesktop.login1.reboot-multiple-sessions;org.freedesktop.login1.power-off;org.freedesktop.login1.power-off-multiple-sessions;
ResultAny=no
ResultInactive=no
ResultActive=no

Save and close, then also run this:

gksudo gedit /etc/polkit-1/localauthority/50-local.d/disable-suspend.pkla

And paste this into it:

[Disable suspend/hibernate]
Identity=unix-user:*
Action=org.freedesktop.upower.suspend;org.freedesktop.upower.hibernate;org.freedesktop.login1.suspend;org.freedesktop.login1.suspend-multiple-sessions;org.freedesktop.login1.hibernate;org.freedesktop.login1.hibernate-multiple-sessions
ResultAny=no
ResultInactive=no
ResultActive=no

Save and close.

These two files will tell Ubuntu to not let any user initiate a shutdown, reboot, suspend or hibernate action. These can be modified to only disable some of these action, if desired.

Edit powerbtn.sh

Run this command to edit the script that gets run when the power button is pressed:

gksudo gedit /etc/acpi/powerbtn.sh

On about line 6, insert the following:

initctl emit power-button-press

The top of the file should now look like this:

#!/bin/sh
# /etc/acpi/powerbtn.sh
# Initiates a shutdown when the power putton has been
# pressed.

initctl emit power-button-press

[ -r /usr/share/acpi-support/power-funcs ] && . /usr/share/acpi-support/power-funcs

# If logind is running, it already handles power button presses; desktop
# environments put inhibitors to logind if they want to handle the key
# themselves.
if pidof systemd-logind >/dev/null; then
    exit 0
fi

What this does is emit a signal that Upstart will use (which we are getting to next) to change the permissions on the shutdown operation. It won't inhibit the normal power button press procedure, so you will still see the usual Ubuntu Unity shutdown menu  (or at least I did :P )

Save and close gedit.

Create Upstart jobs

I read somewhere that Ubuntu will be moving to systemd instead of Upstart some time in the next few releases, so this will work for 14.04 but might not for releases after this

Run this command in a terminal:

gksudo gedit /etc/init/power-button-pressed.conf

This will create a new file, which will become a task that runs when you press the power button.

Copy the following into it:

description "Allow shutdown when power button is pressed"

start on power-button-press
stop on shutdown

emits power-button-timeout

task

script
    mv /etc/polkit-1/localauthority/50-local.d/disable-shutdown.pkla /etc/polkit-1/localauthority/50-local.d/disable-shutdown.ignore 2> /dev/null
    mv /etc/polkit-1/localauthority/50-local.d/disable-suspend.pkla /etc/polkit-1/localauthority/50-local.d/disable-suspend.ignore 2> /dev/null

    sleep 1m

    initctl emit power-button-timeout

end script

pre-stop script
    initctl emit power-button-timeout

end script

Save and close this, and then run:

gksudo gedit /etc/init/power-button-restore.conf

And paste this into it:

description "Re-disable shutdown, on boot or when signalled"

start on (power-button-timeout or local-filesystems)

task

script
    mv /etc/polkit-1/localauthority/50-local.d/disable-shutdown.ignore /etc/polkit-1/localauthority/50-local.d/disable-shutdown.pkla 2> /dev/null
    mv /etc/polkit-1/localauthority/50-local.d/disable-suspend.ignore /etc/polkit-1/localauthority/50-local.d/disable-suspend.pkla 2> /dev/null

end script

These will temporarily rename the security policy files so that they are ignored, thus enabling user shutdown, restart, suspend and hibernate. This can, of course, be modified as you please to only enable some of these. After one minute, the files will be renamed back to what they should be, thus disabling user power management once more. The pre-stop section should restore the permissions on shutdown. If not, the second Upstart job will run on boot to restore the policy.

That's all there is to it! For the users on this machine, I've also hidden the shutdown option from the device menu, so users only see a "log out" option. Run dconf-editor, navigate to "apps" > "indicator-session" and tick "suppress-restart-menuitem" and "suppress-shutdown-menuitem". This does nothing for the permissions, it just helps to not confuse people when they press "Shut Down" and it doesn't work.

So, to clarify, now when the power button is pressed, the user will be presented with the Ubuntu power menu, which if shutdown and reboot have been supressed will only show a log out option. Choose to log out, and then from the login screen the shutdown menu will work and the computer can be turned off, for one minute only.


The hkp stands for http keyserver protocol or Horowitz Keyserver Protocol similar to http protocol for web pages. this is used with key servers, to regulate how they communicate.

Except:

  PGP keys can be retrieved with a variety of protocols; the two dominant ones are LDAP and HTTP. Email and FTP are also used, but are less common. When searching for keys, there are two dominant options: LDAP queries and HTTP queries by some format. So while HTTP keys can be retrieved from any arbitrary URL, something a bit more structured is used to search and, commonly, retrieve.
  There is a higher-level protocol above HTTP called the “Horowitz Keyserver Protocol”, or “HTTP Keyserver Protocol”, or just HKP. This specifies a specific default port number (11371) and a local URL name-space for constructing URLs to retrieve, upload and search for keys.

More information:

adv
           Pass advanced options to gpg. With adv --recv-key you can e.g. download key from
           keyservers directly into the the trusted set of keys. Note that there are no
           checks performed, so it is easy to completely undermine the apt-secure(8)
           infrastructure if used without care.

The option adv allows the use of advanced options like --keyserver and --rec-key

The command:

apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8

is saying retrieve keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8 from this location or server hkp://p80.pool.sks-keyservers.net:80

Source:

https://people.spodhuis.org/phil.pennock/pgp-keyservers

man apt-key


This will work for versions 12.04 and above in case after installing Dropbox from their site using the DEB package, the icon does not show in Unity.

Remove Dropbox if already installed

sudo apt-get remove dropbox

Install the nautilus-dropbox package

sudo apt-get install nautilus-dropbox

In the case the steps above still do not work do the following (This package should already be installed but just in case):

sudo apt-get install libappindicator1

You will now need to restart Nautilus. You can either logout and then login or simply Reboot the PC.

The end result should be something like:

Tested on 12.04, 12.10, 13.04 and 13.10.


On Ubuntu 18 Terminator windows are not grouped under same icon in Dock in a Wayland session

A correct StartupWMClass= line (which you already added) in your .desktop launcher for the application usually fixes this problem , but this sometimes fails in a Wayland session (see: bug1, bug2).

Until the bug is fixed, one possible (may not be preferable though) workaround would be to switching to a good ol' Xorg session.


A few things come to my mind:

ubuntu 16.04 uses systemd by default instead of upstart. So you could try to write a systemd unit instead of an upstart script
If you use /etc/network/interfaces to manage your network, you could add a line like the following to your interface:

up sysctl net.ipv4.conf.enx002427fe2be7.rp_filter=2

and remove the corresponding line from your /etc/sysctl.d/999-vpn.conf file.

If you use NetworkManager there is /etc/NetworkManager/dispatcher.d/ where you can put scripts to execute after a connection is made. Of course in your script you should check that the interface that is brought up is actually your USB adapter.

if [ "$1" == 'enx002427fe2be7' ] && [ "$2" == 'up' ] ; then
    sysctl net.ipv4.conf.enx002427fe2be7.rp_filter=2
fi

Alternatively you could put that script in /etc/network/if-up.d/. This should work for both, ifupdown and NetworkManager. (Source: https://askubuntu.com/a/14139/726877). In that case you don't need the up line in /etc/network/interfaces.

if [ "$IFACE" == 'enx002427fe2be7' ] ; then
    sysctl net.ipv4.conf.enx002427fe2be7.rp_filter=2
fi

These are just different ways to do the same thing: add the sysctl setting for the network adapter when the network adapter is brought up and therefore available but no sooner.