Grainy display on Intel 4400 with Ubuntu 14.04 (also 15.10)

I actually found a solution for this. There is a LVDS Panel Select setting in BIOS what programs the EDID which will be later read by the video chip. The default value for that setting is Auto-select or Auto-detect or something similar. In my case, setting the panel to BOS made the artifact disappear in Linux. There were two more options there: LG and Samsung, depending on the exact model of your screen, it's possible another setting will work for you.


I ran into similar situation like  6 or 7 years ago, not remember well, but will try to help.

First you need to mount LVM partition; (ref: linuxquestion)

  1- Boot Ubuntu.

  2- Install lvm2:

$ sudo apt-get install lvm2

  3- Load the necessary module(s):

$ sudo modprobe dm-mod

  4- Scan your system for LVM volumes and identify in the output the
  volume group name that has your Fedora volume (mine proved to be
  VolGroup00):

$ sudo vgscan

  5- Activate the volume:

$ sudo vgchange -ay VolGroup00

  6- Find the logical volume that has your Fedora root filesystem (mine
  proved to be LogVol00):

$ sudo lvs

  7- Create a mount point for that volume:

$ sudo mkdir /mnt/fcroot

  8- Mount it:

$ sudo mount /dev/VolGroup00/LogVol00 /mnt/fcroot -o ro,user

Than whilst the partition is mounted, you should try to update grub configuration as explained in here:  Ubuntu does not put Fedora into GRUB menu

  sudo update-grub

Your Ubuntu should now see all partitions with bootloader settings and should add all OS'es into the grub.


Find the location of an installed application to type in the Launch Application window

You need to choose the appropriate program to open that file. Most of the programs on Ubuntu are installed in /usr/bin/ directory. So, once you click "Choose" and the window pops up for you to  navigate to the program, navigate through /usr/bin/ and find the appropriate program. For example, if you have clicked on a torrent/magnet link, you would select transmission-gtk. To open an application installed in a custom directory, you need to navigate through that directory and select the program.

If you can't find the application in /usr/bin/; then the other appropriate directories to look out for are /bin/, /usr/share/, /usr/local/, /opt/. See the following question for further details:

What is the Linux equivalent to Windows' Program Files?


I think you should consider the following:

Create your own custom APT Repository using info from here for example but there are a few more out there.
Sync only what you want users to see
Change your users desktop source lists to this repository

At this point your users should only see what you want them to see.  You might also have to do some fancy footwork with firewalls to disable access to default ubuntu sources so that your users don't add them as custom sources and start downloading stuff on their own.


Does new block device always appear in the /dev directory?

In recent systems, a special virtual filesystem (devtmpfs) is mounted on /dev:

$ findmnt /dev
TARGET SOURCE FSTYPE   OPTIONS
/dev   udev   devtmpfs rw,nosuid,relatime,size=1000388k,nr_inodes=250097,mode=755

You can mount devtmpfs elsewhere and whatever's in /dev will appear there too:

$ sudo mount -t devtmpfs udev /mnt
$ ls /mnt/sda*
/mnt/sda  /mnt/sda1  /mnt/sda2  /mnt/sda5

Alternately, you could use udev to populate another directory in addition to /dev.

Aside from such tricks, nope. The devtmpfs filesystem is automatically populated by the kernel. Wherever that filesystem is mounted, the devices will show up there.


Ubuntu says that filesystem is read only when trying to use sudo or su

Given the age of the disk, and that it has started getting bad sectors, it really sounds like your disk is failing. My best advice is to stop using it, get hold of a new disk, and either try to copy everything to the new disk, or do a fresh install on the new disk, and copy the files of importance from the old (The latter is the easiest, but the former is possible too).


How to juju deploy a service to units of multiple architectures with different configurations?

Configuration values are set at the service level not at the unit level. You would either need a charm which had multiple values and able to pass the proper values through to the appropriate units or have two nova-compute services, one for arm and one for amd.


How do you effectively use the 'script' command to record an interactive shell?

While the script manpage has no example usage, the related scriptreplay manpage does have one:

% script -t 2> timingfile
Script started, file is typescript
% ls
<etc, etc>
% exit
Script done, file is typescript
% scriptreplay timingfile

Essentially, script is run once at the beginning of the session, with an optional filename (if none given, the default is called typescript). The problem with script is that it's an exact copy of everything that happens, so if you try to view the file directly, you will have problems (which is why the scriptreplay command is useful - or you could simply cat the file).

For your purposes, it might be better, if more verbose, to use a command like tee:

trans .. | tee some-file


It shows 20 buttons by default, which doesn't mean you actually can trigger 20 buttons.

To check which ones work, you can use the xev command.  Type the command into a terminal, ensure the xev window has focus and then try your buttons:

Button numbers are shown as highlighted.


OpenJDK is a development environment for building applications, applets, and components using the Java programming language. To install OpenJDK 9 in Ubuntu 16.04 from the terminal type:

sudo apt install openjdk-9-jdk

To install OpenJDK 8 replace the 9 in the above command with 8.

To display the path to the default JDK type:

update-alternatives --display java

To install Oracle's proprietary Java JDK from a .deb file that is downloaded from the Oracle website see How can I install Sun/Oracle's proprietary Java JDK 6/7/8 or JRE?

Because you may have installed multiple versions of Java from .rpm files, .deb files and/or directly from the Ubuntu repositories, it is possible that you may have messed up the Java path. This question is about how to change the Java path after installing Java from multiple sources - Ubuntu: change the path from OpenJDK 6 to Oracle JDK 7

You can use either update-alternatives (which is installed by default in Ubuntu) or update-java-alternatives (which is installed when openjdk-9-jdk is installed) to manually choose which Java to use before running an application. See update-java-alternatives vs update-alternatives --config java.


My wired connection does not work. What information is needed to diagnose the issue?

Currently, these are the ones that I can think about.

sudo lshw -C network
ip link show
ip addr show


I found this patch suggested in a launchpad discussion about this issue, and I've compiled it. Now I can configure the timeout (it's the "Delay before showing switcher" option at the top). I've uploaded the compiled deb files (for Oneiric 64 bit) on 4shared and in a torrent, if anyone wants it.


I had this error when i went to use a livecd of backtrack, all i done was redoenload it and installed the image onto a new cd it started to work the, think it was just a problem with the download


although over 2 years old i found using beep still to be an issue on my ubuntu 12.04 based system.

after making sure the beep mixer level is > 0 through alsamixer the solution to a similar question at this askubuntu answer worked fine for me; it boils down to un-blacklisting the pcspkr module in /etc/modprobe.d/blacklist.conf. Or you can just do sudo modprobe pcspkr for a temporary solution.

as described in the accepted answer a more pleasant audible notification could be achieved through playing some notification sounds present by default on most systems such as (for gnome based systems) e.g. paplay /usr/share/sounds/gnome/default/alerts/glass.ogg

note that paplay (using pulse audio) might nowadays be the way to go instead of the alsa-based (but still working) aplay.


How to install the tortoisehg in Ubuntu20.04

Update:
I now do have a working package. It is available on github:
https://github.com/glaure/tortoisehg4ubuntu
Please give feedback!
Old:
I do not have a working package or snap. But using these instructions, it is rather easy to get tortoisehg working from source.

Check that python --version returns a Python 3 interpreter. If not, you have to change the symlink /usr/bin/python to /usr/bin/python3.
OK:
$ python --version
Python 3.8.2

Not OK:
$ python --version
Python 2.7.18rc1

Change the symlink:
$ sudo rm /usr/bin/python
$ sudo ln -s /usr/bin/python3 /usr/bin/python

pip3 is needed to fulfill all the build dependencies.
sudo apt install python3-pip build-essential

Clone tortoisehg repository.
hg clone https://foss.heptapod.net/mercurial/tortoisehg/thg

Change into thg directory.
cd thg

Install PyQt5.
pip3 install pyqt5

Install mercurial.
pip3 install mercurial

Install Qscintilla.
pip3 install qscintilla
sudo apt install pyqt5.qsci-dev

Lets build tortoisehg for inplace usage.
make local

Start tortoisehg.
./thg

I got tortoisehg working on three different Ubuntu 20.04 installations using this recipe.
Update:
https://github.com/glaure/tortoisehg4ubuntu
Contains scripts for automating the tasks listed above..


The 1.94 GB partition for Ubuntu is a DVD, using the CDFS (Compact Disk File System). You can't change that partition, nor install a working Ubuntu on it, and although it's possible to write to a DVDR disc, it's slow and awkward. Let's take a slice of Drive 0 instead, which has a total of 476 GB capacity, now split between three (3) partitions;

EFI for booting,
NTFS for Windows, its programs, downloads and data, and
a Recovery partition Windows makes to help you recover from disk corruption.

The Ubuntu install process will automagically slice up the space now used by NTFS and let you add a fourth partition for Ubuntu.

Put that Ubuntu DVD in the laptop, shut down Windows and turn off the laptop. Then, turn it back on, and press the key on your laptop which lets you interrupt normal booting to Windows. I don't know, offhand, what it is, because you have not told us what the make and model of your PC is.

A reminder to choose it, and which key it is, will probably appear in white letters on black background, briefly before the spinning balls of the Windows startup sequence show up. Press that key, whatever it is, and choose to boot from the Ubuntu DVD instead. The Install Ubuntu icon will appear at upper left on the desktop screen soon.

When you launch Ubuntu's "Ubiquity" installer and get started with installation, you will soon see a screen titled "Installation Type" at upper left. It will ask how you wish to use the disk, with choices similar to these...

Install Ubuntu alongside <===========
Erase disk and install Ubuntu
Encrypt the new Ubuntu installation...
Use LVM with the new Ubuntu installation
Something else

Yep, choose the first one, Install Ubuntu alongside. A screen which follows that lets you choose how much space to take from the Windows partition to use for the Ubuntu partition, quicker than you can eat two double-double flavoured TimBits.

Windows uses NTFS by default, and Ubuntu can mount that NTFS partition to read and write files once the install's complete and you reboot.  Ubuntu and other Linux OS use the ext4 partition type frequently for personal installations such as this.  FAT32 is used mostly for USB flash drives, because it has a 4 GB size limit per file, and it's getting hard to find drives that small any more.


Remove the settings file and log out and you will be fine.

Removing the dconf binary file:

rm ~/.config/dconf/user

Restarting xorg:

sudo service lightdm restart


How I know what version of clang I have installed?

clang --version

See below:

$ clang --version
Ubuntu clang version 3.5-1ubuntu1 (trunk) (based on LLVM 3.5)
Target: x86_64-pc-linux-gnu
Thread model: posix


Is it possible to rename keyboard layouts as they appear in Xfce panel list?

The panel applet, xfce4-xkb-plugin relies on several files in  /usr/share/X11/xkb/rules such as evdev.lst and evdev.xml. You can't edit any of these files with the plugin (even if running it with gksudo, which is not recommended). You are correct when you say the 'edit' button just allows you to replace the selected layout, but not edit the title of the layout.

On the official site for xfce4-xkb-plugin, in any other available documentation, and in the source code, there seems to be no hidden options. The documentation does mention about it not handling other xkb options that well (and you are limited to a small number of options), so if you plan to make use of a lot of the available xkb options you might need to use the setxkbmap utility so you can have a more powerful tool to specify multiple options for layouts.

You could of course construct a custom xkb layout, although that is maybe too much if you only want to edit the titles of the layouts, and a discussion of that is probably beyond the remit of the question. However, for more on xkb and custom layouts, see the official xkb documentation.

So, it's definitely not possible to edit the layout names using xfce4-xkb-plugin itself.


How long does it takes to encrypt a 1TB usb disk?

Caveat: I have not tried this myself

What does the INITIAL encryption do in practice?

For all data:
 - Read a bunch of the data
 - Process it in a special way
 - Write it back to disk

Add the time to null out all free space (write zeroes).

Answer:
So the processing time should be similar to reading out all contents, then writing it back, with a slight penalty for processing it in between.

For estimated read speed of a drive:*
Open a terminal and type/copy + execute this  (press ENTER on it).

dev="/dev/sdb"; echo "About to do READ-speed test on $dev"; sudo hdparm -Tt $dev

man hdparm will tell what it actually does.

Use lsblk to find out things to type into dev="..."


Confused about the security of ubuntu (Linux)

This is actually OS independent. If an attacker has physical access to your machine, then that machine is compromised. Period. This has nothing to do with what operating system you are using, it is true for all of them.

The only way to protect yourself from that (and it is also imperfect) is to encrypt your data. User passwords fail miserably since, as you point out, it is trivial to boot into a different system. When that happens, your data is under the control of this other OS, and the user passwords of your original system are completely irrelevant.


As of 18.10 (cannot check in earlier versions) VPN connections in NetworkManager have a setting vpn.persistent which does just that: reconnects to a VPN on connection loss until you disconnect manually. It is set to "no" by default and unfortunately isn't exposed neither in Gnome Network Settings nor in nm-connection-editor.

But you can set it through a CLI like this:

nmcli connection modify <Your VPN connection name> vpn.persistent yes

The connection must exist before you do that, of course


How to automatically uninstall older kernels so that "The volume 'boot' has only ... MB disk space" does not appear?

You could add

system ("sudo apt-get remove $(dpkg -l|egrep '^ii  linux-(im|he)'|awk '{print $2}'|grep -v `uname -r`)");

to some line in the apt source code for upgrading packages.

Alternatively, just make a script called aptupgrade and paste this in it:

sudo apt-get remove $(dpkg -l|egrep '^ii  linux-(im|he)'|awk '{print $2}'|grep -v `uname -r`); sudo apt-get upgrade

That should leave only 1 old kernel, in case the new kernel borks something.


Automatically mount network drive after connecting to VPN

Ideally I would connect to VPN and the drive would get mounted.

Create an executable script that starts the command you need to execute to connect to the VPN and add a line behind it with " && " and the command to mount the drive. Then instead of using the normal command you use that script. If you use an icon to connect to the VPN change the ".desktop" file to have it start this new script.
Mind that to give a better answer you should add information to your question about the commands used to connect to the VPN and to mount the drive.


Ubuntu live cd wont boot from OLD machine

you can check the md5 sum of the iso you burned to make sure your download is not corrupted. you can also put the cd in an other computer to see if the problem is specific for this computer.


Your system had a hiccup and there are some not upgraded packages.

sudo apt-get install -f
sudo apt-get update
sudo apt-get dist-upgrade

Now reinstall perl-base:

sudo apt-get install --reinstall perl-base

But now the problem is:

Reading package lists ... Done
Building dependency tree
Reading state information ... Done
Reinstallation of the perl-base is not possible, it can not be retrieved.
0 upgrade, 0 newly installed, 0 to remove and 0 not upgraded.

Very funny, now we tried this:

apt-get download perl-base

and, oh no!

E: Can't find a source to download version '5.20.1-1' of 'perl-base:amd64'

Very, very ... ok, next try:

wget http://mirrors.kernel.org/ubuntu/pool/main/p/perl/perl-base_5.18.2-2ubuntu1_amd6%E2%80%8C%E2%80%8B4.deb

and o_O...

--2015-10-20 20:56:05-- mirrors.kernel.org/ubuntu/…
Resolving mirrors.kernel.org (mirrors.kernel.org)... 149.20.37.36, 198.145.20.143, 2620:3:c000:a:0:1994:3:14, ...
Connecting to mirrors.kernel.org (mirrors.kernel.org)|149.20.37.36|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2015-10-20 20:56:05 ERROR 404: Not Found.

--2015-10-20 20:56:05-- mirrors.kernel.org/ubuntu/…
Reusing existing connection to mirrors.kernel.org:80.
HTTP request sent, awaiting response... 404 Not Found
2015-10-20 20:56:05 ERROR 404: Not Found.

Ok, last try, open http://packages.ubuntu.com/trusty/amd64/perl-base/download with your browser and install:

sudo dpkg -i perl-base_5.18.2-2ubuntu1_amd64.deb

Now we suddenly have a problem with mixed distributions in /etc/apt/sources.list. apt-cache policy … shows Trusty and lsb_release -a and gives the information:

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.10
Release: 14.10
Codename: utopic

Execute:

sudo sed -i 's/trusty/utopic/' /etc/apt/sources.list

or delete the file and create a new one using Software & Updates. After that execute:

sudo apt-get update
sudo apt-get install -f
sudo apt-get dist-upgrade

And finally...

sudo apt-get install mysql-client

For future readers here is the chat.

And in the next days, upgrade your system to Wily. Utopic is not supported anymore.


How to Increase the size of my Root Logical Volume in a partition?

I found Tecmint's guide to do so. I guess I didn't know what to search for.
"How to Extend/Reduce Logical Volume Management"

Since the partition is encrypted, a lot of the commands had to be run as a super-user, but besides that, it works!


A simple restart did it.

Even if you close the terminal, there might be some old instances of bash still active in background, So just restart bash (I would rather just restart overall) and everything should be OK.

To sum it up, here is how to make sure you're safe:

Run the following in terminal:

env x='() { :;}; echo vulnerable' bash -c "echo this is a test"

this is simply to make sure you're actually vulnerable (the output should be "vulnerable this is a test").

Update bash and your packages:

sudo apt-get update && sudo apt-get install bash

Restart your system (or restart bash completely - don't just close the terminal!)
Open the terminal after the reboot - run the above test again. The result you should see now is "this is a test".

Good luck


As everyone said , it's probably the problem with the installation itself and not regarding bootloader, and use pendrivelinux to burn ubuntu to usb , since its slightly slower => less chances of failure/corruption.

At splash screen of dell , choose boot menu (I think its F12) otherwise enter setup and set priority to usb.

Then on partitioning screen , choose to install Ubuntu alongside Windows 8.


How to change to cd rom drive in terminal Ubuntu 13.04

The CD-ROM is usually mounted in /media/<user-name>/<disc-name>  You can get there in terminal by typing:

cd /media/<user-name>/<disc-name>

or through Nautilus by selecting the disc on the left side.


On 12.10 it seems like you need to install account-plugin-irc  package to use IRC in Empathy. Perhaps this will solve the problem on earlier versions of Ubuntu (such as 12.04) as well.


KVM host: Ubuntu 12.04 3.2 Kernel showing incorrect "cache size" in cpuinfo?

For portability/compatibility reasons, by default KVM only emulates a "standard" CPU with a subset of the available host CPU features. Apart from the reduced cache, you can also see from the flags that none of the SSE features, for example, are available.

To provide the full set of host CPU features to guests, add the -cpu host option to your KVM/QEMU command line.

  For more information, see Tuning KVM


Setting up a DNS without owning a domain

You can install bind9:
apt-get install bind9

You don't need a domain to have a DNS server. If you wanted you could setup, say, your laptop or desktop to a static IP and configure bind9 to translate "laptop" to 192.168.1.10
you could also ping "laptop" and it would resolve laptop to 192.168.1.10

If you wanted to, you could setup to use it as the primary DNS server and have bind9 forward external requests to google 8.8.4.4 or any other DNS server of your choice.


The mkfs program should be at /sbin/mkfs under Ubuntu; however it calls filesystem-specific subprograms depending on the -t < type > parameter e.g. mkfs.ext3, mkfs.ext4 and so on. In the case of xfs, that program (mkfs.xfs) is not installed by default but should be part of the xfsprogs package - so you probably need to install that, either via your favorite GUI package manager or

sudo apt-get install xfsprogs


Urdu font is broken firefox ubuntu 20.04

The fonts-nafees package, which provides the Nafees Nastaleeq font, works best under an Urdu locale. So you may want to run these commands:
sudo locale-gen ur_PK
sudo update-locale LC_CTYPE=ur_PK.UTF-8

and relogin. Hopefully that improves things.
Edit:
The second command adds an entry to the /etc/default/locale file. To undo that, open /etc/default/locale for editing and remove this line:
LC_CTYPE=ur_PK.UTF-8

(and relogin).


14.04 LTS openstack install fails on multi-node installations

What's failing is the juju bootstrap step. You should try that outside of the cloud installer to see if you can get more information.

Point juju at your MAAS environment and try to bootstrap there. If a plain juju bootstrap doesn't yield any clues, try juju bootstrap --debug.

Also make sure that you have nodes in the ready state in MAAS.


Actually, you can create any folder you like in your home folder to put your files in. The home folder is part of the filesystem. It is absolutely not nessecary to create a separate partition for your files or put your home directory on a different partition. To access your home folder just open the filebrowser, in your case based on the screenshot above, this would be the icon looking like a filecabinet, the second from above on the left of your screen. It is  called files if you hover with your mousepointer above it.

It is common to install Ubuntu like it is installed on your laptop, certainly not an issue.


Add repository to the list of sources:

wget -O - https://debian.neo4j.org/neotechnology.gpg.key | sudo apt-key add -
echo 'deb https://debian.neo4j.org/repo stable/' | sudo tee /etc/apt/sources.list.d/neo4j.list
sudo apt-get update

To install the latest Neo4j Community Edition:

sudo apt-get install neo4j

To install the latest Neo4j Enterprise Edition:

sudo apt-get install neo4j-enterprise

Make sure java 8 or above is installed in your system.


Is there a version of the Chromium browser that will run on Ubuntu 8.04 (Hardy)

Chromium was not in the official repositories during 8.04. 8.10 was the first. Next to that Google Chrome 12.0.742.60 beta is not Chromium. Google chrome is the actual version Google released. But even Chrome was released for 8.10+ only.

You could check synaptic for the package. Maybe it gives a hint to where you got it from.
But most likely you installed it from source.

You can find a september 2008 release of chromium here: http://media.codeweavers.com/pub/crossover/chromium/ But this is based of of Lucid, not Hardy.

Other option would be to try and install Google Chrome from their website It is more than likely to complain if your system is too old for it but it would not surprise me if you got this up and running even on 8.04. Chromium from the latest release might be a stretch.


MicroK8s failed to join RPI cluster error code 500

I had the issue of not being able to join the cluster as well. It appears to be a permissions problem. I solved the issue by using:
sudo microk8s add-node (on the master. I know you are supposed to be able to just use microk8s add-node)
sudo microk8s join \<ip address of master\>:\<port\>/\<token issued by master\> (on the joining node. Once more you are supposed to be able to just use microk8s..., but it does not work)
version is microk8s classic 120.2


Unless the drive was old and getting ready to crap out anyway I doubt if a failed install could destroy it.

You don't need to change anything in the bios if it was working before.  Change IDE back to ahci.

In your bios make sure you haven't inadvertently disabled your drive.  Make sure it still shows up in the boot order. Save and exit bios amd retry the install.


I did not see the iPhone directories in the Xubuntu Directory Browser THUNAR. It was possible to see and open the iPhone with Nautilus or with Gigolo.


SynPS/2 Lifebook S935 not working at all How to fix?

Just edit the file /etc/default/grub

sudo nano /etc/default/grub

change the line "GRUB_CMDLINE_LINUX_DEFAULT="nomux quiet splash" to

GRUB_CMDLINE_LINUX_DEFAULT="i8042.notimeout i8042.nomux quiet splash"

save the file and then

sudo update-grub

reboot and have fun with the well working touchpad :-)


Wait for previous command to finish while using tee

Looks like there is some logic missing along with syntax errors.
tee -a will pass output to STDOUT and append simultaneously, no need to use >
And why so many output redirects? May be you should utilize && or ;
Not sure what commands you running but below might give you at least an idea.
some commands | tee -a file; command1 >> file; command2 >> file; command3 >> file

some commands | tee -a file will show STDOUT and write to file, regardless of the exit code, because there is ; next command1 >> file will be executed then command2 and then command3 and so on.
some commands | tee -a file; command1 | tee -a file; command2 | tee -a file; command3 | tee -a file

Here every command set divided by ; will be executed in order from left to right and also every command output will be shown in STDOUT


Which NVidia proprietary driver for GT 745M (Ubuntu 14.04 - Toshiba laptop)

Generally it is recommended to use the NVIDIA drivers from the official Ubuntu repositories.
When there are problems with these drivers, you can install the latest official NVIDIA drivers.

NVIDIA released the final long-lived branch drivers version 361 this month.
The drivers 361.28 already are available in the Proprietary GPU drivers PPA.

Step 1 : Uninstall the currently installed NVIDIA drivers.

Highlight the Ubuntu entry in the GRUB boot menu.
Press the E key.
Add nouveau.modeset=0 to the end of the linux line.
Press F10 to boot.

On the login screen press Ctrl+Alt+F1.
Enter user name and password ... execute :

sudo apt-get purge nvidia*
sudo reboot

Step 2 : Install the latest official stable NVIDIA drivers.

Highlight the Ubuntu entry in the GRUB boot menu.
Press the E key.
Add nouveau.modeset=0 to the end of the linux line.
Press F10 to boot.

On the login screen press Ctrl+Alt+F1.
Enter user name and password ... execute :

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

Personal experience note and opinion :

I installed these drivers when they were released and they are working great without any issue.

Update addressing the question on how to revert back to the drivers from Ubuntu repositories :

Step 1 : Uninstall the currently installed NVIDIA software.

Execute these commands :

sudo apt-get install ppa-purge
sudo ppa-purge ppa:graphics-drivers/ppa
sudo apt-get purge nvidia-361 nvidia-opencl-icd-361 libcuda1-361 libxnvctrl0 libvdpau1 nvidia-prime nvidia-settings
sudo reboot

Step 2 : Install the NVIDIA drivers from Ubuntu repositories.

Execute these commands :

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


How to increase resolution in Ubuntu 12.04 LTS to 1280x800 if it is not found in available modes?

You could add monitor mode with xrandr

xrandr --newmode "1280x800_60.00"   83.50  1280 1352 1480 1680  800 803 809 831 -hsync +vsync

Then, you could add mode to the xrandr with output (my example VGA1, if you are using different, you should write whics name),

xrandr --addmode VGA1 "1280x800_60.00"

Then, select new resolution from the Display window, or use xrandr,

xrandr --output VGA1 "1280x800_60.00"


Wifi internet connection keeps dropping. Need to restart NetworkManager always to work

You can use part of this answer:

How to prevent wifi sleep after suspend

Create this script:

#!/bin/sh

# NAME: /lib/systemd/system-sleep/network-reset
# DESC: Resets network manager after a suspend.
# DATE: December 14, 2019.

MYNAME=$0

restart_wifi() {
    /usr/bin/logger $MYNAME 'restart_wifi BEGIN'
    systemctl restart NetworkManager.service
    /usr/bin/logger $MYNAME 'restart_wifi END'
}

/usr/bin/logger $MYNAME 'case=[' ${1}' ]'
case "${1}/${2}" in
    hibernate|suspend|pre*)
      ;;
    resume|thaw|post*)
      restart_wifi;;
esac

Make the script executable with:

sudo chmod a+x /lib/systemd/system-sleep/network-reset

Note: This answer solves the effect of the problem but doesn't fix the cause of the problem.


Laptop heats up when I start/use PhpStorm IDE

This is a matter of resource usage that generates the heat.  As alluded to in comments, PhpStorm takes a lot of resources and CPU usage.  This in turn means your CPU needs to run and generate heat (as a byproduct) to process the requirements.  This is a side effect of resource-intense programs, and unfortunately there's no good solutions to this problem.  (Windows is plagued by the same problem too)

Short of manually throttling your CPU power (which would impact overall performance of the system and maybe make PhpStorm not work), there's no real way to overcome this issue.


I had found the link from @samsy to be useful, and had a couple of additional things that I did which helped, but did not cure, the problem:

WICD does not entirely work for me in 14.04 - the wireless will not automatically connect, and WICD seems to be unmaintained

I had improvement in wirless performance by setting the regulatory agency:

iw reg get
sudo it reg set US

Change your country code as required

Disk scheduling also seems to have helped me.  My install defaulted to 'deadline' for a disk scheduler.  I've changed to cfq for scheduling, and am much happier with overall performance.

To show scheduler:

for f in /sys/block/sd?/queue/scheduler; do printf "$f is "; cat $f; done

to change scheduler:

echo cfq > /sys/block/sda/queue/scheduler

To change it persistantly, either use the above command in /etc/rc.local, or place it as a kernel option (elevator=cfq) in grub


Background image resize in Ubuntu 18.04.1 LTS

to know the current picture-option run the below command in terminal
gsettings get org.gnome.desktop.background picture-options

Example:

pratap@pratap:~$ gsettings get org.gnome.desktop.background picture-options
'zoom'

in my case, the result is 'zoom'

to know the available options for 'picture-options' run the below command in terminal
gsettings range org.gnome.desktop.background picture-options

Example:

pratap@pratap:~$ gsettings range org.gnome.desktop.background picture-options
enum
'none'
'wallpaper'
'centered'
'scaled'
'stretched'
'zoom'
'spanned'
pratap@pratap:~$

to use the option centered from the available options from above range, use the below command
gsettings set org.gnome.desktop.background picture-options 'centered'

Example:

pratap@pratap:~$ gsettings set org.gnome.desktop.background picture-options 'centered'
pratap@pratap:~$

Use as below

for Background = org.gnome.desktop.background
for Lock Screen = org.gnome.desktop.screensaver

GUI way

open gnome-tweaks.
if not yet installed, install it by the command
sudo apt install gnome-tweaks

find the options under Background and Lock Screen as Adjustment and choose from available.

background color can be changed with this answer as a guideline only. https://askubuntu.com/a/1090204/739431 available options are solid, gradient horizontal and gradient vertical.


I just found the solution: The problem is that the screen positions didn't get saved for the next restart. What ultimatly solved my problem was this: Nvidia X Server Settings don't save screen position settings

I won't delete the question so that other people with the same question can find the solution.


Ubuntu One: PUT to upload a file which is larger than 16302 bytes fails systematically

Finally found the problem. It's a Go language thing, not a Ubuntu One thing.

Apparently, the field request.ContentLength needs to be properly set:

request.Header.Add("Content-Type", "application/octet-stream")
request.ContentLength = n.Size
response, _ := http.DefaultClient.Do(request)

It might appears obvious in retrospect (not really since it was working fine for files smaller than 16304...), but I haven't seen this documented in the Go doc.

Hopefully, this will be useful to someone at some point experiencing a similar problem.


ubuntu kernel git for xenial gives wrong source version

You probably build the kernel not a Debian way. This way you are getting a mainline kernel version.

You need to build the kernel by

fakeroot debian/rules binary-headers binary-generic

This way you will get Ubuntu versions.


How can a free, proprietary application be submitted to the Software Center?

From Ubuntu App Developer:

  Selling software and content

    Can I distribute and sell proprietary software through Ubuntu?

      Yes, you can distribute proprietary software through Ubuntu by joining the Ubuntu Application Developer programme. In some cases the software is provided without a charge, and the developer makes money through advertising or upsells. In other cases a software license is sold to the user giving them rights to the software. Both systems are allowed in the Developer Programme.

You should ask simfy devs to go to this site.


Error after installing packages - Sub-process /usr/bin/dpkg returned an error code (1)

/var/lib/dpkg/info/gdk-pixbuf-psd.postinst: 23: /var/lib/dpkg/info/gdk-pixbuf-psd.postinst: cannot create
/usr/lib/gtk-2.0/2.10.0/loader-files.d/gdk-pixbuf-psd.loaders: Directory nonexistent

The actuall problem here is the above message.  The postinst (installation script) of gdk-pixbuf-psd expects a directory that is nonexistent in order to proceed with the installation. You can "help" it by manual create this directory.

i.e.

sudo mkdir -p /usr/lib/gtk-2.0/2.10.0/loader-files.d/

then try to reconfigure with dpkg

sudo dpkg --configure -a
sudo apt-get install -f


"Multisystem" lost avareness of installed OS

If it is using grub2 as the boot loader you have grub.cfg.

And you can just add your own boot stanzas. One of the advantages of the script like dotclear's is that it gets the correct boot parameters for each install. When manually doing it that can be a bit difficult if you do not know otherwise. Good examples help.

https://help.ubuntu.com/community/Grub2/ISOBoot

https://help.ubuntu.com/community/Grub2/ISOBoot/Examples

Arch example

https://wiki.archlinux.org/index.php/GRUB2#Booting_an_ISO_directly_from_GRUB


Ubuntu 17.10 - Bluetooth service "inactive (dead)"

First Type in to know the status of Bluetooth

sudo service bluetooth status

Then Use systemctl to start the Bluetooth service

systemctl start bluetooth


Who does the folder /etc/www/html belong to?
Group root and User www-data or both www-data ?
In that case, you can add your user to both groups as you said and for that period you can change the permissions for 0775 and after which you can convert it to 0755

This should help.


What is does is add "ipv4" to the file "curlrc". Example starting with an empty file:

$ touch 1
$ more 1
$ echo ipv4 >> 1
$ more 1
ipv4

Basically it forces curl to use ipv4.

The manual has this to say about it:

  IPv6

  curl will connect to a server with IPv6 when a host lookup returns an IPv6 address and fall back to IPv4 if the connection fails. The --ipv4 and --ipv6 options can specify which address to use when both are available. IPv6 addresses can also be specified directly in URLs using the syntax


Is it possible to screenshot a window without the frame?

You can use custom screenshot area.

Press Shift+PrtScr, then select the area you want.


Uninstalling python uninstalled everything that depended on it

Changing or deleting the standard python version of Ubuntu is a unrecoverable error. You need to reinstall.
Boot from a live DVD or USB and reinstall. If your live DVD/USB is the same version as the installed Ubuntu version, you will see a "Reinstall" option. This will reinstall the system in the same setup as the existing installation, without formatting the partitions. That way, your user data and user configuration will be preserved.


I think I killed my portable HD while trying to make Ubuntu bootable from it. How to undo?

If you did step #8 of those instructions (running dd command) then the first 700Mb of your disk (including the partition table, the bootloader and the beginning of the OSX partition) have been overridden by the data from the ISO file.

There's no undo and I guess restoring any data from the disk would require super-complex and time-consuming forensic methods, sorry.

Surely you have a backup of all your data, right?

There are tools called TestDisk and PhotoRec which might be able to restore the partition table or at least to recover some data from the disk. They work on MacOSX and claim to support HFS+ filesystem.


Using WiFi with 12.04 causes network to crash

The Acer Nplify adapter you have is most probably a rebranded Atheros card. Try installing the latest drivers and see if it makes a difference:

Type/paste the following, line-by-line, in a terminal:

sudo apt-get install build-essential linux-headers-generic linux-headers-`uname -r`
wget -O- http://linuxwireless.org/download/compat-wireless-2.6/compat-wireless.tar.bz2 | tar -xj
cd compat-wireless-*
./scripts/driver-select atheros
make
sudo make install

Then reboot.


Maybe reinstalling KDE from the tty would help, but I'm not sure about this. You would have to press Ctrl+Alt+F1 to leave your desktop (tty7) and enter a plain full-screen terminal (tty1). This should allow you to login by entering your username and pw. Then you can try running sudo apt-get install kubuntu-desktop --reinstall. After that, Ctrl+Alt+F7 will bring you back to your GUI/desktop.


cryptswap1 Probably Eating RAM; Stuck in GParted; How to Fix?

First of all, you are using Lubuntu instead of Ubuntu, so you do not have nano installed in your machine. You should use leafpad. The best way to open a text file as root is to type:

gksudo leafpad the_file_adress.

Second, Lubuntu 14.04 should not be using a swap partition. It must have got one, but its priority should be set as -1 and a zram "device" ought to be used instead, most of times. You can check if this is happening by writing this in a shell:

cat /proc/swaps

Zram is a software which creates a tmpfs (temporary file system which is a file system in RAM) where it stored the data compressed to avoid using a swap partition.

About the problem, I do not know if you need an encrypted swap partition since it ought not to be used. Can I ask you how much RAM your computer has? Did you chose to encrypt your home folder when you were installing Lubuntu? If you did it, the encrypted swap partition may be compulsory. I do not know the matter.

Perhaps, the best choice is to follow that user's instructions. I think you can use the disk utility of Lubuntu instead of GParted, but be careful. And you ought to change the seventh step so as to set the priority of that swap partition as -1. You can run sudo swapon -p -1 /dev/..., where ... is the same as previously in their instructions, instead of sudo swapon /dev/.... /dev/... must be the swap device.

However, I have not been able to found out if writing the minus sign in this way is allowed. Perhaps, some user with more knoledge of linux might confirm it. Otherwise, you can try typing it.

If you did not chose to encrypt anything when you were installing, you'd better not run sudo ecryptfs-setup-swap.

I should tell you that more experienced users of Lubuntu usually follow its mailing list:
https://lists.ubuntu.com/mailman/listinfo/lubuntu-users. Writing an email there is the best support option.

Good luck.


Ubuntu 14.04 LTS under Parallels: Graphic Distortion after update

This happened to me with PD 10.2.1 as well.

Fortunately the Parallels tools installer launched automatically and all I had to do is to type the admin password, hit Enter, wait a few minutes while it finishes installing and reboots the VM.

After that it was back to normal.


Having broken packages when installing some i386 packages

It appears that at some point you were attempting to install the development version of wine which some users had difficulty with.

I believe you may have missed the part in the instructions that state "If you have previously installed a Wine package from another repository, please remove it and any packages that depend on it (e.g., wine-mono, wine-gecko, winetricks) before attempting to install the WineHQ packages, as they may cause dependency conflicts."

This being the case I recommend that you

1) remove wine completely

2) Remove any other packages that depend on it (e.g., wine-mono, wine-gecko, winetricks) with sudo apt-get remove wine-mono wine-gecko winetricks

3) Decide whether to install the stable Ubuntu repository package version 1.6 at last check (which I use) or the winehq staging or development package keeping in mind that development packages are under development and aren't likely to be very stable.

3a) To install the stable Ubuntu Repository package issue the command sudo apt-get install wine

3b) To install the staging version issue the following commands in order
If and only if your system is 64 bit, enable 32 bit architecture (if you haven't already):
sudo dpkg --add-architecture i386

Regardless:

sudo add-apt-repository ppa:wine/wine-builds
sudo apt-get update
sudo apt-get install --install-recommends winehq-staging

3c) To install the development version issue the following commands in order
If and only if your system is 64 bit, enable 32 bit architecture (if you haven't already):
sudo dpkg --add-architecture i386

Regardless:

sudo add-apt-repository ppa:wine/wine-builds
sudo apt-get update
sudo apt-get install --install-recommends winehq-devel

I recommend that you use the stable version from the Ubuntu repositories unless you have a good reason to do otherwise (like you are a developer/tester assisting the wine team)

I so, you should know that users of the staging branch should file bugs here, and can now submit test reports to the AppDB

A great place to go for further assistance with wine or to get involved with the project is https://wiki.winehq.org/Main_Page If you visit it would be a good idea to read the FAQ.

Note: As a rule of thumb, I highly recommend current backups prior to making any changes to your operating system. It makes putting things back to normal far easier. With total power comes total responsibility.


How can I rotate all pages with Simple Scan?

As the first page is scanning, rotate it as desired. All the subsequent pages will keep the same rotation.

There is no way to select multiple pages and rotate them all at once after they have been scanned, as far as I can tell.


vsftpd won't auto start on boot with pasv_addr_resolve=YES

After fighting with this for more than 4 hours and reading every single question about it to no avail (:P) I figured it out thanks to an old post and decided to create an account to share (more of a workaround as I guess this is an actual bug)

sudo nano /lib/systemd/system/vsftpd.service

Add under

[Service]
Type=simple

these 2 lines:

Restart=always
RestartSec=5

Done :)


Oh that's very clear now, you cannot install a Linux system on a NTFS partition, that's why you can't install Kubuntu since you only have NTFS partitions. I guess when you deleted the partition from Windows, it automatically formatted it to NTFS. All you need to do is to use Gparted from your live and format the partition in which you want to install Kubuntu to ext4:

Open Gparted
Select the partition for Kubuntu
Right-click : format to -> ext4
Apply operations ( Ctrl+Return)

Then try to install Kubuntu again and you should be good :)


How to configure window switching functionality?

When using Super-S, the currently selected window is the one on top.

However, what I think you mean is "the current workspace" - as far as I know, there is no way to change how to do that in the ccsm package, however, I've been known to be wrong from time to time.


Installing Java Offline

Find out whether you are running a 32 bit or a 64 bit OS:

uname -m

x86_64: 64 bit kernel

i686: 32 bit kernel

Go to the Oracle Java SE website and decide which version you want to install:

JDK: Java Development Kit. Includes a complete JRE plus tools for developing, debugging, and monitoring Java applications.

Server JRE: Java Runtime Environment. For deploying Java applications on servers. Includes tools for JVM monitoring and tools commonly required for server applications.

Accept the license and copy the download link into your clipboard. Remember to choose the right tar.gz (64 or 32 bits). Use wget to download the archive into your server:

wget --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u5-b13/jdk-8u5-linux-x64.tar.gz

Oracle does not allow downloads without accepting their license, therefore we needed to modify the header of our request. Alternatively, you can just download the compressed file using your browser and manually upload it using a SFTP/FTP client.

Always get the latest version from Oracle's website and modify the commands from this tutorial accordingly to your downloaded file.

Installing Oracle JDK

The /opt directory is reserved for all the software and add-on packages that are not part of the default installation. Create a directory for your JDK installation:

sudo mkdir /opt/jdk

and extract java into the "/opt/jdk" directory:

sudo tar -zxf jdk-8u5-linux-x64.tar.gz -C /opt/jdk

Verify that the file has been extracted into the /opt/jdk directory.

ls /opt/jdk

Setting Oracle JDK as the default JVM

In our case, the java executable is located under /opt/jdk/jdk1.8.0_05/bin/java . To set it as the default JVM in your machine run:

update-alternatives --install /usr/bin/java java /opt/jdk/jdk1.8.0_05/bin/java 100

and

update-alternatives --install /usr/bin/javac javac /opt/jdk/jdk1.8.0_05/bin/javac 100

Verify your installation

Verify that java has been successfully configured by running:

update-alternatives --display java

and

update-alternatives --display javac

The output should look like this:

java - auto mode
link currently points to /opt/jdk/jdk1.8.0_05/bin/java
/opt/jdk/jdk1.8.0_05/bin/java - priority 100
Current 'best' version is '/opt/jdk/jdk1.8.0_05/bin/java'.

javac - auto mode
link currently points to /opt/jdk/jdk1.8.0_05/bin/javac
/opt/jdk/jdk1.8.0_05/bin/javac - priority 100
Current 'best' version is '/opt/jdk/jdk1.8.0_05/bin/javac'.

Another easy way to check your installation is:

java -version

The output should look like this:

java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)

(Optional) Updating Java

To update Java, simply download an updated version from Oracle's website and extract it under the /opt/jdk directory, then set it up as the default JVM with a higher priority number (in this case 110):

update-alternatives --install /usr/bin/java java /opt/jdk/jdk.new.version/bin/java 110
update-alternatives --install /usr/bin/javac javac /opt/jdk/jdk.new.version/bin/javac 110

You can keep the old version or delete it:

update-alternatives --remove java /opt/jdk/jdk.old.version/bin/java
update-alternatives --remove javac /opt/jdk/jdk.old.version/bin/javac

rm -rf /opt/jdk/jdk.old.version


Is it possible to change the group of a file if I am not part of that group?

Unfortunately you need to be a member of that group to give that group permission as per this link:

https://serverfault.com/questions/462174/using-chown-to-change-the-group-owner-of-a-directory-is-not-permitted-why

sudo is your only option...


VM Resolution can't go over 640x480, even after guest additions were installed

When your VM is shut down, change the available video memory to something higher.  (I use 128 MB - the max allowed)


Ubuntu can't boot, access rescue mode or reinstall

This might be couple of things:

incompatibility of the linux kernel or drivers with your hardware, that happend i.e. after BIOS update
indication of hardware failing, since you can't even boot from livecd.

Keep in mind that manufacturers mostly focus on windows boxes, that's why sometimes their hardware happens to be problematic with linux kernel.

If it comes to incompatibility you may want to try an older Ubuntu Live CD or - if it still won't boot - the newer one (like daily builds). By doing this you'll ensure whether it's specific to the kernel version, or not.

And when it comes to hardware problems, there are couple of boot options you may want to try to investigate this problem.

Please go to https://help.ubuntu.com/community/BootOptions to find more information about it.

I suggest trying acpi=off, noapic and nolapic. If at some point Ubuntu will boot with such options, it's a starting point for you to investigate it further, i.e. doing memtest, CPU and GPU stresstest and checking your hard drives SMARTs.


Yes you can.  But atleast you need 20 GB. So you can work freely. And your question is a duplicate of this post.
Can I install Ubuntu to my 32 GB USB pen drive?


How can I identify the name of the last played xscreensaver?

Indeed, there is a way to show this information via a log, and it is usually used for debugging purposes. Your user session, whether it is Gnome or Xfce, will usually auto-load xscreensaver with the options xscreensaver -no-splash &, as it does in Xfce, for example, using the file /etc/xdg/xfce4/xinitrc.

Temporary Setting

So if you want to load up xscreensaver with different options just for that session (until you log out), you can kill any running instances with

killall xscreensaver

and then launch it with the appropriate new parameters:

xscreensaver -verbose -no-splash -log /home/$USER/xscreen2.log &

This command launches the xscreensaver daemon process with the verbose option so that it reports on exactly what it does, which is then saved in the specified log.

For this experiment, run xscreensaver-demo to set the screensaver options to random, and choose very low 'blank after' and 'cycle after' values in the settings. Now  when the timeout you specified is reached, xscreensaver will start and write to the log. (The settings changed by xscreensaver-demo are saved in ~/.xscreensaver.)

More 'permanent' setting (example used is for Xfce)

If you want xscreensaver to always save its data to a log (passwords used to unlock screens are not copied to the log), first copy xfce4's systemwide xinitrc to your home folder:

cp /etc/xdg/xfce4/xinitrc $HOME/.config/xfce4/xinitrc

Now change the two occurences of

xscreensaver -no-splash &

at around lines 199 and 208 (in my version) to

xscreensaver -verbose -no-splash -log /home/$USER/xscreen1.log &

If you want to revert to the default setting, just change the commands back in the file or delete $HOME/.config/xfce4/xinitrc so that no custom xfce4 xinitrc settings are applied on login.

(You will have to logout and login for this setting to take effect)

A sample of the log created contains just what you were looking for: a way of identifying which screensavers were playing in a random session (I have shortened the log as it is extremely verbose)

xscreensaver 5.15, copyright (c) 1991-2008 by Jamie Zawinski <jwz@jwz.org>.
xscreensaver: 00:55:14: 0: spawning "glschool -root" in pid 8392.
xscreensaver: 00:56:14: 0: killing pid 8392 (glschool)
xscreensaver: 00:56:14: 0: visual 0x21 (TrueColor,   depth: 24, cmap: 256)
xscreensaver: 00:56:14: 0: saver window is 0x2e0000c.
xscreensaver: 00:56:14: 0: destroyed old saver window 0x2e00009.
xscreensaver: 00:56:14: 0: spawning "glmatrix -root" in pid 8393.
xscreensaver: 00:56:14: 0: child pid 8392 (glschool) terminated with signal 15.
xscreensaver: 00:57:14: 0: killing pid 8393 (glmatrix)
xscreensaver: 00:57:14: 0: visual 0x21 (TrueColor,   depth: 24, cmap: 256)
xscreensaver: 00:57:14: 0: saver window is 0x2e0000f.
xscreensaver: 00:57:14: 0: destroyed old saver window 0x2e0000c.
xscreensaver: 00:57:14: 0: child pid 8393 (glmatrix) terminated with signal 15.
xscreensaver: 00:57:14: 0: spawning "fiberlamp -root" in pid 8395.
xscreensaver: 00:58:14: 0: killing pid 8395 (fiberlamp)
xscreensaver: 00:58:14: 0: child pid 8395 (fiberlamp) terminated with signal 15.
xscreensaver: 00:58:14: 0: visual 0x21 (TrueColor,   depth: 24, cmap: 256)
xscreensaver: 00:58:14: 0: saver window is 0x2e00012.
xscreensaver: 00:58:14: 0: destroyed old saver window 0x2e0000f.
xscreensaver: 00:58:14: 0: spawning "fuzzyflakes -root" in pid 8396.

For more information, see man xscreensaver, man xscreensaver-demo, and the Ubuntu manpages online.


Konversations runs Akonadi migration on every startup

This is an open , upstream, kde bug

https://bugs.kde.org/show_bug.cgi?id=287673

  Akonadi is invoked indirectly by the KDE PIM libraries, which Konversation uses
  for integration with the KDE address book. This integration currently cannot be
  disabled (although we're currently planning to change that).

For now, the only "work around" is to disable akonadi and use an alternate application (to konversation).

Note: disabling akonadi affects KAddressbook, Kmail, Kontact, KOrganizer, Konversation, Kopete, and any Widgets using these applications.

Disable akonadi

Edit ~/.config/akonadi/akonadiserverrc

kate ~/.config/akonadi/akonadiserverrc

And change StartServer=true to

[%General]
Driver=QMYSQL

[QMYSQL]
Name=akonadi
Host=
Options="UNIX_SOCKET=/home/your_user/.local/share/akonadi/socket-ufbt/mysql.socket"
ServerPath=/usr/sbin/mysqld-akonadi
StartServer=false

[Debug]
Tracer=null

Log out and back in or stop akonadi with

akonadictl stop

You can manually start akonadi with

akonadictl start

Un-do the edit to re-enable.

See also : http://ubuntuku.org/16/how-to-disable-nepomuk-akonadi/


Sharing a Connection with full access to LAN

IP routing is hop-by-hop, so the routing only has to know it's neighbors. your computer 2 isn't a neighbor of any of the computer 3's so you need host specific routes.
In your current setup the default gateway is 192.168.1.1 so traffic that isn't destined for anything on your network (192.168.1.0) will be send through the gateway. But anything that is on the network is assumed to have a direct path, so computer 3 does an arp to call for computer 2, but it's not on the same ethernet so it will never respond.
To reach computer 2 you have to route traffic through 192.168.1.10
On computer 3 you can add this route
ip route add 192.168.1.251 via 192.168.1.10
There is a static route menu in the netmanager to set this.
On computer 2 you have to make sure that everything goes through the gateway, since computer 3 isn't directly reachable, so there you have to remove the route that is automatically created.
ip route del 192.168.1.0/24
check the routing for every step of the way and back. And also make sure that the firewall allows the traffic and that computer 1 is allowing forwarding, but I guess that already happened with the "share to other" option.
sysctl -w net.ipv4.ip_forward=1


I resolved the issue.

This system had a slight overclock, that I had forgot about. Nothing was wrong with the overclock itself, the settings in bios are 100% stable.

But! A modern Linux kernel overrides bios/uefi settings for Intel C-states via the Intel_idle driver. So, the C-state settings that was supposed to be set from bios, actually got overridden in Linux.

This is what caused the random freezing, since the system was perfectly stable as long as the C-state didn't change. That meant it worked perfectly under heavy load, but as soon as the system started to switch between idle and light load, the C-states fluctuated a lot and hung the system.

My solution was to lock the C-state in grub via a kernel parameter. GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_idle.max_cstate=1"


How to install software that "Requires installation of untrusted packages"?

You can't install untrusted packages using Update Manager.

Open your terminal and type

sudo apt-get update

You will be prompted for your password. Enter it.

Now enter the following command.

sudo apt-get upgrade

Now it will ask you if you want to download X Mb of packages. Give yes.
Now it will list all untrusted packages and will ask you if you want to install. Again give yes.

Now, all your required packages should get installed.


How can I install spark instant messenger client 2.6.3?

One of a few things might be wrong:

Your script your trying to run isn't executable
You version of Java  is not quite right for the Spark client:

sudo apt-get install galternatives

sudo add-apt-repository ppa:ferramroberto/java

sudo apt-get update

sudo apt-get install sun-java6-jdk sun-java6-plugin

(then use Gnome galternatives GUI to set the default)
Something else...


Is there any way to force Dropbox to open the Dropbox folder in a file manager other than Nautilus?

In my experience (described in greater detail here):

If Nautilus is installed, clicking on the Dropbox tray icon or on the "Open Dropbox Folder" menu item will launch Nautilus regardless of other settings.
If Nautilus is not installed, the Dropbox daemon will look for your "inode/directory" mimetype.
If Nautilus is not installed and "inode/directory" mimetype is not set, the default browser (i.e. the preferred "x-www-browser") will be launched.

P.S.: As a quick and dirty workaround, you might wish to create a script with, say, the following code

#!/bin/bash
exec your-favorite-file-manager $@
exit 0

call it 'nautilus' and place it somewhere in your $PATH.


apt source lists non-existent version of .deb package

So I didn't figure out why my apt-get cache listed 2.4.18-2ubuntu3.1 when only ...ubuntu3.3 was available, but I did find that ...ubuntu3 (no decimal) installed just fine if I specified that version (or removed the other deb sources)


Installing drivers from NVIDIA website for gtx 760?

Login into Virtual console ctrl+Alt+F1.And run the below command to stop the X server,

sudo service lightdm stop


Sending keypresses to remote X session over SSH

You should be able to do that using the xdotool command, after specifying the appropriate X display e.g. to simulate a single 'down arrow' press in the currently active window

$ DISPLAY=:0 xdotool getactivewindow key Down

For entering literal text, you can use xdotool type <string> e.g.

$ DISPLAY=:0 xdotool getactivewindow type 'your text here'

The xdotool package should be available from the Universe repository.


How to convert TIFF scan file to JPEG or PNG general file format in Ubuntu?

The command is convert -separate image1 image2, no need for further options.


What Steps are need to host a Website on Ubuntu using Apache2?

If you have multiple sites on one Apache httpd server, you should post the complete configuration (both VirtualHost).

I'm going to post an example config of a two site Apache server, one which serves to www.example.com and one for www.example.org:

file: /etc/apache2/sites-available/example-com

<VirtualHost 172.20.30.50>
DocumentRoot /var/www/example.com/
ServerName www.example.com

# Other directives here ...

</VirtualHost>

file: /etc/apache2/sites-available/example-org

<VirtualHost 172.20.30.50>
DocumentRoot /var/www/example.com/
ServerName www.example.com

# Other directives here ...

</VirtualHost>

If both your sites point to: localhost, only one site will show, one precedes the other, in other words, has a higher priority. That's wha the "ServerName" directive is there for. It will serve those who try to ener that ServerName.

So if you're only testing things on your localhost, just use the same VirtualHost and use subfolders. One site in: /var/www/site1 and the other in /var/www/site2, and point your browser to: http://localhost/site1 or http://localhost/site2.

Another solution if you don't want to have subfolders in your URL is to bypass your DNS lookup and just force some domain lookups throught the /etc/hosts file. Here is an example (You want to add to the 127.0.0.1 line at the end):

file: /etc/hosts

127.0.0.1 localhost example.com example.org

Your /etc/hosts file might look different, just remember to add the two domains to the end because as I explained earlier, Apache will only serve you one VirtualHost to the same ServerName.

For more information: http://httpd.apache.org/docs/2.2/vhosts/examples.html


If you pressed Up and got ^[[A, it's probably because the shell on the remote machine doesn't support history. If you run history and it says something like sh: 1: history: not found, that confirms it.
More info here: Why don't my arrow keys work in sh?

Also, if you're not sure which shell is in use, run echo $0.


Have you not tried downloading it from the Ubuntu Software Centre (USC)?

Open the USC and in the query box top right type in winewhen you will be presented with the version options.

Select the version Wine Windows Program Loader. If it says it's already installed, perhaps try uninstalling it first then re-install.

Worked straight out of the box on my system without error.

Alternatively, you may need to reverse what you have already done from the terminal but the USC method should work (unless someone knows differently).

Personally, with my limited experience so far with Ubuntu, I find that using the USC to download programs from scratch a much more simple affair tan by using the terminal with it's associated traps for the inexperienced and unwary...


Difference between /usr and /home from installation perspective

Will I be able to run it? what all factors determine that.

Yes. But there a no factors? If it is there is can be executed. If an admin wants to prevent execution (s)he needs to use a tool to block access (acl is one of those tools).

  How does the system differentiate that what softwares installed in /usr are installed by which user.

It does not and does not need to. The admin installs the software, the users use it and by default with no restrictions.

  I am assuming that if user B now installs something else, then all the data related to that will also be in /usr/ directory (RIGHT?)

If B is a normal user he is unlikely to be able to install since he will need the admin password. If A and B are admin then the admin installs software (it does not matter if that admin is user A or user B).

Software that needs to store settings or data will store this in the users home. The software is installed once but the user content (settings, personal data) is shared over all of the users /home's.

  Also, any of the packages installed by any of the user do not go in /bin folder right? That is specific to system binaries.

Yes. /bin is supposed to be clear of any non-system binaries. But is depends on what is installed: it could be software that has a system binary and that will end up in /bin or /sbin if applicable.

  What if there are no users on my system. Will there be no files in /usr folder? ie in my office, when I remote login to a server, it shows no user in home directory.

That does not mean there are no users. If you remote login on my server I would shield my /home/ from you.

Every Linux system MUST have at least 1 user. At a minimum there must be an admin (could be root or a normal user with sudo permissions).


Problems with apt-get update and f.lux on ubuntu

You should really have asked (2) questions, as these are totally unrelated.

First answer - you must run apt-get update as root, so the proper command is:

sudo apt-get update

Second answer - here's a link to the F.lux PPA: https://launchpad.net/~nathan-renniewaldock/+archive/ubuntu/flux


How can I quickly toggle monitor orientation with a shortcut key?

The script below is to toggle rotation of either one of your screens:

#!/usr/bin/env python3
import subprocess

# --- set the name of the screen and the rotate direction below
screen = "VGA-1"
rotate = "left"
# ---

matchline = [
    l.split() for l in subprocess.check_output(["xrandr"]).decode("utf-8").splitlines()\
    if l.startswith(screen)
    ][0]
s = matchline[
    matchline.index([s for s in matchline if s.count("+") == 2][0])+1
    ]

rotate = "normal" if s == rotate else rotate
subprocess.call(["xrandr", "--output", screen, "--rotate", rotate])

How to use

Copy the script into an empty file, save it as toggle-rotate.py
In the head section of the script, set:

the name of the screen you'd like to toggle (find out by running in a terminal the command xrandr)
the rotate direction, either left or right (between quotes, like in the example).

# --- set the name of the screen and the rotate direction below
screen = "VGA-1"
rotate = "left"
# ---

Test- run it by the command (two times, from a terminal):

python3 /path/to/toggle-rotate.py

If all works fine, add it to a shortcut key. Choose: System Settings > "Keyboard" > "Shortcuts" > "Custom Shortcuts". Click the "+" and add the command:

python3 /path/to/toggle-rotate.py

to a shortcut of your choice...

That's it.

Explanation

In the output of the command xrandr, the current rotation of your screen (if any) is mentioned directly after the screen's position, for example:

VGA-1 connected 1024x1280+1680+0 left (normal left inverted right x axis y axis) 376mm x 301mm

In the example, we see: 1024x1280+1680+0 left. The script looks into the line, corresponding to the screen, mentioned in the head of the script. if the screen is rotated, the script runs the (xrandr) command:

xrandr --output <screen_name> --rotate normal

if not, it runs (for example):

xrandr --output <screen_name> --rotate left

To rotate the screen counter-clockwise


Is it insecure to to have a password on the clipboard?

After seeing the curious post I decided to do a little research. It appears that in any windowing system (e.g. X windows, etc) you have a common space that holds the contents of the clipboard. As such, it is available to any program that can pull from the clipboard. As such, I would expect the clipboard to be just as insecure as any other input device with the caveat being that it is going to be worse than, say, a keyboard.  For example, suppose Malware was installed on your computer that could read your keystrokes anything you type would be insecure. I see no reason some other malware couldn't just access the clipboard periodically to check for contents. While that would be a decidedly less efficient way of swiping your password it could get at your bits and bytes.

https://github.com/astrand/xclip/blob/master/README

https://en.wikipedia.org/wiki/X_Window_selection

I am no expert on this stuff so I welcome anyone else's better answer. Just about everything I said above is quite speculative.


I use the following solution to access my Synology NAS in Ubuntu 20.04.1
This also works perfectly well in 18.04.5 on a different PC.
First I did sudo apt-get install cifs-utils and then created the mount point (which I think you have done).
My fstab entry is:
//192.168.1.foo/share-name /mount-point/share-name cifs username=foo,password=foo,rw,uid=1000,gid=500

and the drive mounts perfectly each time.
The OP mentions that he added ver=1.0 to the fsab entry (but mine works without).


Replacement for foobar2000's "Move files" functionality?

I had same problem as you - match foobar2000 possibilities with something from Linux world.

I tried all I could to no solution. Currently I'm using MPD with Sonata, and new files get to MPD database after I process, tag, move with foobar2000 under Wine.

There is no similar package in Linux. Deadbeef has perhaps 10% of foobar2000 functionality (nice converter included)

For your particular problem (move...), and perhaps something more try Ex Falso. It has option to rename files (move) based on tags


Is it possible to permanently lock launcher icons?

I assume you are talking about the Unity launcher.

I don't no way to lock the icons but there's an easy way to restore them:

Save the current icons to a file using

 gsettings get com.canonical.Unity.Launcher favorites > ~/.launcher_icons

Now you can restore them using

gsettings set com.canonical.Unity.Launcher favorites "$(cat ~/.launcher_icons)"

Restoring the icons will close all windows for which there's no icon in the restored ones. So be careful.


Easiest way to create downloadable file that can be executed by double clicking

The best approach to distribute software for Ubuntu would be to package it in a .deb installation file. Upon double-clicking, the Software tool will install the file, and it will as such be registered in the package system of the user. Consequently, the user will also be able to easily uninstall it using Software as well.

Offering the software via a repository, a PPA, is even better. This way, users can automatically be made aware of possible updates to the software and allow installation of the updated version with a single click.

Ideal situation, of course, is where your software is included into the community maintained Ubuntu repositories.

This is of course Ubuntu (and debian derivatives) specific, but Ask Ubuntu is specifically dedicated to Ubuntu. Other "Windows-style" options to distribute scripts and software by having users download and execute them, are not recommended but are still easy to achieve. A user does not need to execute a chmod +x command to make your script executable: the executable bit can be set from any file manager with right-click - Properties. Many file managers would offer to execute the script on double clicking. However, this is changing. To tighten up this unsecure way of working, Gnome Files, for example, no longer launches an executable script on double-click.


You apparently forgot 'install.' The command you want is:

sudo apt-get install bcmwl-kernel-source

Reboot and your wireless should be working.


How do I put a c lib on ubuntu to make extension to gcc?

Just save the header file(.h file) in the same directory where your code file is, and to use the header file in the code file, use #include "header_file_name.h" (I'm assuming your header file is header_file_name.h).
Also, if you put the .h file in some other directory, you might need to specify the whole path in #include.


you should already have all those information in the sshd log file or even in /var/log/syslog file.
What you can try to see what kind of log are generated by sshd find the log use by it reading the config file in /etc/ssh/sshd.conf (not sure of file name) once you find which file populate by the daemon.
Use the command tail -f /path/to/log/file
and attempt a logging you should see lots of info about login attempt.


Epson EH-TW6800 admits HDMI (2x) and VGA video inputs. Additionally it supports network with an Ethernet port or WLAN (optional).

It has an integrated media player for local media via an USB2.0 type A port or network via the aforementioned network connections.

The additional USB2.0 type B port is for service only.

You are not supposed to connect it via USB. The type A port is for USB flash drives and the type B one is for firmware update and diagnostics.
Please connect it to your Ubuntu computer using HDMI (preferable) or VGA (D-SUB). Adjust the settings the same way you would do with an additional monitor.


Backing up Steam Games+Saved data to Copy cloud storage

1
you can copy the .steam folder to another harddrive or USB/DVD .
if you re-install Ubuntu fully copy it to ~/   & after the re-installation make a startup application ~/.steam/steam.sh to make steam start when you login.
2
you can you backups.
run backups => folder to save => add folder 'select ~/.steam' .


How can I get my battery level to display in the notification area (system tray)?

I use switched to using awesome a few weeks ago and quickly discovered the lack of icons. I hunted down nm-applet via ps but I see no such process for the battery. What I did find was acpitool which can query battery levels.

I always meant to get around to writing a vicious icon for it, shouldn't be too hard. I just don't know lua.


Dual Boot - no choice on boot, only Windows 8 booting

I guess you have not turned off the secure boot option wihtin Bios. This Article gives a good overview on that topic.


An alternate answer which may be more appropriate for new installations of Ubuntu is to use the cpupower commands which control the intel_pstate governor system.

The command cpupower frequency-info will indicate on the first line, if intel_pstate is the diver being used, and in the current_policy seciton will indicate either 'powersave' or 'performance'

To change the policy issue the command

sudo cpupower frequency-set -g performance

This does not persist over reboot (for my laptop) but could be placed into /etc/rc.local or a similar initialization method.

On a side note:  I also used the ondemand governor in prior releases of Ubuntu: if desired, intel_pstate can be disabled by use of the kernel variable "intel_pstate=disable"


libdvdcss2 -is a library for viewing videos from licensed DVDs.
sudo apt-get update && sudo apt-get install libdvdcss2
ubuntu-restricted-extras -multimedia codecs, flash player, Microsoft fonts, rar archive unpacker.
sudo apt-get update && sudo apt-get install ubuntu-restricted-extras
Or use sudo apt-get reinstall ***
...   sudo apt autoremove


How to I get the right Pulseaudio profiles to show up without restarting Pulseaudio?

I've been suffering with the same issue for a while, and had finally a chance to look at it. It turns out that unloading and reloading the Pulseaudio module responsible for the audio device works for me.

Unloading and reloading the module, by hand

In terminal window, enter command

pacmd list-cards

and from the output, find the audio device that is missing profiles. You will probably get several cards, and need to locate the right one. Mine looks like this:

[...]
index: 8
    name: <alsa_card.usb-Logitech_Logitech_USB_Headset-00-Headset>
    driver: <module-alsa-card.c>
    owner module: 27
    properties:
            alsa.card = "1"
            alsa.card_name = "Logitech USB Headset"
            [... more output ...]
[...]

From your output, look up the line "owner module". That is the module you need to unload, but you will need to look at it's parameters first, so you can reload it. Enter command

pacmd list-modules

and locate the module driving your card. Again, the relevant part of the output in my case looks like this (index matches owner module from output of pacmd list-cards):

[...]
index: 27
    name: <module-alsa-card>
    argument: <device_id="1" name="usb-Logitech_Logitech_USB_Headset-00-Headset" card_name="alsa_card.usb-Logitech_Logitech_USB_Headset-00-Headset" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1">
    used: 2
    load once: no
    properties:
    [... more output ...]
[...]

You will need the module name and arguments to reload it.

To unload the module, enter command (replace module-index with appropriate value from your output)

pacmd unload-module module-index

To reload the module after it's unloaded, enter command

pacmd load-module module-name module-arguments

Replace module-name and module-arguments with values from output of pacmd list-modules. Leave out the angle brackets.

Now the module should be reloaded, and with some luck your headset profiles are back.

Applying automation

The above steps are a lot of work if you need to reset your device often, as the module index keeps changing and you need to look it up every time. I wrote a shell script for myself to automate the worst of it:

#!/bin/bash

if [ -z "$1" ]; then
  echo "Pulseaudio has these cards:"
  pacmd list-cards | grep 'name: '
  exit 0
fi

MODULE_INDEX=`pacmd list-modules | tac | grep -A 10 -e "argument: .*$1" | grep 'index:' | head -n 1 | cut -d ':' -f 2 | tr -d ' '`
MODULE_NAME=`pacmd list-modules | tac | grep -A 10 -e "argument: .*$1" | grep 'name:' | head -n 1 | cut -d ':' -f 2 | tr -d '<>'`
MODULE_ARGUMENTS=`pacmd list-modules | tac | grep -e "argument: .*$1" | head -n 1 | cut -d ':' -f 2 | tr -d '<>'`
echo "Module index is $MODULE_INDEX"
echo "Module name: $MODULE_NAME"
echo "Module args: $MODULE_ARGUMENTS"

if [ -z "$MODULE_INDEX" ]; then echo "Could not find module index"; exit 0; fi
if [ -z "$MODULE_NAME" ]; then echo "Could not find module name"; exit 0; fi
if [ -z "$MODULE_ARGUMENTS" ]; then echo "Could not find module arguments"; exit 0; fi

echo "Unloading module"
pacmd unload-module $MODULE_INDEX
echo ""
echo "Reloading module"
pacmd load-module $MODULE_NAME $MODULE_ARGUMENTS
echo ""

When run without arguments, the script lists the cards Pulseaudio knows of. When a part of a card's name is given as argument, the script attempts to unload and reload the relevant Pulseaudio module.


create PPA source package from existing .deb package

No, this is not possible.

A binary Debian package contains built binaries only and there is no way to retrieve sources from binaries as a lot of information is lost during the process.

If you were to edit only data that are not modified by the compilation process (say configuration files for instance) then you would be able to generate a new .deb file from the old one. However, you will not be allowed to upload this one to your PPA for safety reasons. All the packages in the PPA's must be compiled on the servers sandboxes to prevent malicious modifications of packages. It does not prevent people from possibly building dangerous Debian package, but at least it guarantees that the provided binaries are really the output of the source code compilation process.


How to make the window manager to show the X - [ ] not on left top corner but bottom left or bottom right corner?

Depending on your window decorator I am sure you can, in example, using emerald to create your own theme which will allow you to define where do you wish to place these controls.

Anyway, Ubuntu Tweak will allow you to set the place on where these controls are displayed on your windows top corners, left or right, and will also allow you to re-arrange the buttons with your preferences.

Take a look at this screenshot:

This options can be found under "Window Manager Settings" in Ubuntu Tweak

I hope this help you.

Good luck!


Open the file .local/share/applications/mimeapps.list from your home directory, and add this line:

application/x-sqlite3=sqlitebrowser.desktop

Close the file. Now, SQLite3 databases should automatically open with sqlitebrowser.


Ubuntu 11.10 doesn't boot anymore after kernel update

I had the same problem. You can loggin via ctrl-alt-f1.
The startx command tells me nvidia module is not found.

I fixed it by ctrl-alt-f1 -> dpkg-reconfigure nvidia-current


Which version is more compatible for me? 14 or 16?

Support for 14.04 will end next year, I would not recommend to go for it any more.

What is far more important regarding performance and requirements, rather than the version of Ubuntu, is the desktop environment you use. 17.10 uses Gnome, 16.04 uses Unity. Both are not the most lightweight environments, so maybe try Xubuntu (XFCE desktop) or Lubuntu (LXDE desktop) instead of plain Ubuntu.

Regarding versions, I'd definitely going for 16.04 if you want an LTS (Long Term Support) release that is very stable and supported until 2021, or 17.10 if you want the latest Ubuntu version with more recent software versions, but only support until July 2018. The next release, 18.04, is going to be officially released in April and will be supported for the next five years, but is currently still in beta.


Where are official version control repositories for source code of Xenial Xerus packages?

Use pull-lp-source from the ubuntu-dev-tools package:

For current development release use

pull-lp-source deluge

for Xenial release

pull-lp-source deluge xenial


Terminal insert A B C D on shift+arrows. Solution?

I've found a workaround to copy text from gnome-terminal. It is via screen.  Credit goes to this answer

Type screen in the terminal
Press Ctrl-A-[ to Enter the copy mode
Move your cursor to the desired start location.
Hit Enter to start copying.
Press and hold → or ← key to select text
Hit Enter again to stop copying.
Then move your cursor the the location you want to paste.
Press Ctrl-A-] to paste the text.

For a more complete screen tutorial, see this page.


how to use gdb to debug execution error?

gdb is good for debugging programs that have debug information. I don't know what tata is. If you compile it yourself you have to tell the compiler and/or the linker to include debug info in the executable. Otherwise the executable file doesn't have any knowledge about "lines". If you don't have access to the source code of tata, bad luck.


Internet connection via proxy established but apt not working

Firefox (like other browsers) has its own internal proxy settings. CLI applications such as apt-get don't see this, they rely on an http_proxy (yes, lowercase, AFAIK) environment variable:

export http_proxy="http://PROXY_SERVER:PORT"


I can't find Install Guest additions option for virtualbox

The solution is to press the following keys: Host+C


Write files in usb when connect by /etc/udev/rules.d/

What works for me, adding delay (sleep) and disown the script that has delay using an intermediate script.

  RUN{type}

...
       This can only be used for very short-running foreground tasks.
       Running an event process for a long period of time may block all
       further events for this or a dependent device.

       Starting daemons or other long running processes is not appropriate
       for udev; the forked processes, detached or not, will be
       unconditionally killed after the event handling has finished.

source: man udev
There a similar case here: Why do my udev rules run if I use udevadm trigger, but NOT at boot time?. Fëamarto's answer seems better than my solution here. It waits till its file system is ready in rw mode. You may give it a try.

Because this is a USB drive, it can be removed before mounting. The script will stay alive till next reboot or it get plugged again (which trigger another instance) and mounted.

One way to fix that is to check if related /dev/sdxY still exists. on each cycle.
Here is my setup:

/etc/udev/rules.d/99-sneetsher-tests.rules

ACTION=="add", ENV{ID_FS_UUID}=="6664-B2DA", RUN+="/usr/bin/sudo -u user /home/user/mycrazy.sh"

/home/user/mycrazy.sh

#!/bin/sh

/home/user/mycrazy2.sh & disown

/home/user/mycrazy2.sh

#!/bin/sh

PATH_USB=/media/user/MYFLASH3
sleep 5
mkdir $PATH_USB/some_folder


Why does my static IP address change itself every 24 hour period?

check your /etc/network/interfaces config file

it should be something like this:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address xxx.xxx.xxx.100
netmask 255.255.255.0
gateway xxx.xxx.xxx.1

there is also the manual that will be of help seeing as you are new :-)

Ubuntu Serverguide - Networking

You may also want to download the pdf for future use:

Ubuntu Server Guide


How can I install Ubuntu without CD and USB?

For BIOS devices:

To install Ubuntu without CD/DVD or USB pendrive, follow these steps:

Download Unetbootin from here.
Run Unetbootin.
Now, from the drop-down menu under Type: select Hard Disk.

Next select the Diskimage. Browse to the directory where you downloaded the iso file of Ubuntu.

Press OK.
Next when you reboot, you will get a menu like this:

Select Unetbootin and you will get the "Try" or "Install" option there.
Finally, you can install your version of Ubuntu alongside Windows.

For UEFI devices:

First, download rEFInd.
Then, extract it.
Now, follow the below steps to install rEFInd[source], so that, you have a boot menu to boot to Ubuntu Live environment. Summary of the installation process given in the source is as belows:

Open cmd with Administrator privileges.
Then,

mountvol S: /S

(you may change S: to any available drive letter)

Type cd in cmd and then drag and drop the extracted folder to the already open cmd window. E.g.,

cd "C:\Program Files"

Copy refind

xcopy /E refind S:\EFI\refind\

In this step S: will be the drive letter that you used above.

Change directory to rEFInd

cd S:\EFI\refind

Rename config file

rename refind.conf-sample refind.conf

Note that {bootmgr} is entered as such; that's not a notation for a variable. Also, change refind_x64.efi to refind_ia32.efi on systems with 32-bit EFIs. Such computers are rare, and most of them are tablets. Check your Windows bit depth to determine which binary you should use.

bcdedit /set {bootmgr} path \EFI\refind\refind_x64.efi

Download EaseUS Partition Master Free and run it.
Select your last partition.

Right-click on it and from the context menu select Resize/Move partition.

From the size shown beside Partition Size minus 4096 MB (to mimic a 4GB pendrive).

Press tab and the rest will be auto-completed.

Select the newly created partition and right-click on it. Select Create Partition from context menu.

In this window, select FAT32 as the File System. Click on OK. Finally, click on Apply (present at the top-left of the window).

Next, extract Ubuntu iso to this partition and finally reboot.
You will be presented with a rEFInd menu. From here select the Ubuntu partition. It will boot into a Live environment. Continue with the installation. After the installation finishes boot to Windows.
Run EaseUS Partition Master Free again.
Right-click on the 4 GB partition and from the context menu select Delete Partition.

Right-click on the partition above the Unallocated partition and select Resize/Move Partition from the context menu.

Extend the bar to the extreme right by dragging the button.

Click on OK. Finally, click on Apply (present at the top-left of the window).

Open cmd with Administrator privileges.
Then,

mountvol S: /S

(you may change S: to any available drive letter)

Remove rEFInd

rmdir "S:\EFI\refind" /S /Q

In this step S: will be the drive letter that you used above.

Reinstall grub as your primary boot manager

bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi


It looks like the packets you need to allow have these characteristics:

They are incoming on interface enp2s0
They have a source IP address of 192.168.1.1
They have a source UDP port of 1900

So what you need is to allow all incoming UDP packets from 192.168.1.1 port 1900.

Use this command to add the rule:

sudo ufw allow from 192.168.1.1 port 1900 to any proto udp

Check out the added rule:

me@ubuntu:~$ sudo ufw status
Status: active

To                         Action      From
--                         ------      ----
Anywhere                   ALLOW       192.168.1.1 1900/udp

Hope this helps!


How to convert Arabic subtitles to utf8 the right way?

Use classic unix/linux way and combine a few simple tools together e.g.

#!/bin/sh
ls *.srt | while read file ; do
  charset=`file -bi $file | sed 's/.*charset=//'`
  echo '###' $file $charset
  case "$charset" in
     us-ascii) charset="";; # no conversion needed
     utf-8)    charset="";; # no conversion needed
     binary)   charset="";; # no charset detected
     *) ;;
  esac
  if [ "$charset" != "" ] ; then
    iconv -f "$charset" -t UTF-8 -o "$file".utf "$file" && mv "$file".utf "$file"
  fi
done

DO test first autodetection correctness without iconv line.
I suggest using case to limit conversion to a few explicitly listed charsets.

Alternative ways of charset autodetection are provided at
https://superuser.com/questions/301552/how-to-auto-detect-text-file-encoding


By default on my Xubuntu installation on Mac OS X closing the lid does not do anything.  What you need to do is open the Whisker menu (mouse icon) and click the settings button in top right.  Then go to Power Manager and set what you want Xubuntu to do when the laptop lid is closed on battery and on AC (you probably want it to suspend to save battery). This is assuming you are running Xubuntu 14.04, if not the Power Manager may be in a different location.

Just as a side note: On my MacBook Pro 9,2 it cannot resume from suspend after it was closed and the display won't turn on.  I heard it was a bug in Xubuntu 14.04, so until the bug is resolved make sure to manually hit suspend from the power button in the whisker menu before closing the lid.  Then when you open it hit a key and it will resume normally hopefully like on my Mac.


after 2nd update of Ubuntu 12.04 LTS no wlan0 again

Let's install the backported driver and see if that fixes your wifi connection but first remove any drivers you installed yourself.

Go here backport driver and download the newest driver to your computer then place the file on your desktop and right click and extract here.

Then do:

cd ~/Desktop/backports-3.15-rc1-1
make defconfig-ath9k
make
sudo make install
sudo modprobe -rv ath9k
sudo modprobe -v ath9k

When there is an update to the kernel you will have to do the following.

cd ~/Desktop/backports-3.15-rc1-1
make clean
make defconfig-ath9k
make
sudo make install
sudo modprobe -rv ath9k
sudo modprobe -v ath9k


How can I set CTRL+SHIFT+W to open an internet browser?

Can not confirm what is using or has been assigned ctrl+shift+w to close tabs or windows but that is probably why the window closes when you try to assign that shortcut to launch browser.

After checking HUD and System Settings>All Settings>Keyboard there appears to be no thing assigned that keyboard shortcut.  Refering to https://wiki.ubuntu.com/Keybindings gives information regarding using dconf Editor to view all keyboard shortcuts but again no thing is being shown that indicates ctrl+shift+w being assigned to any thing.

Searching the web confirms some body has filed a bug at launchpad so it might be worth our while to add as affected here.

Looking at this question may also indicate something has changed with regard how keyboard shortcuts work in newer flavours.
It would appear alt+F4 is the assigned shortcut to close windows.

Depending on your keyboard you could assign the appropriate media key or hot key or Function Key to launch browser through All Settings>Keyboard>Launchers>Launch Web Browser which would give one button launch ability.

Maybe Unity shortcut may be an option?

Open your browser and right click the icon in launcher to lock it to launcher.

Press and hold the Super(Windows icon) which will show HUD with information regarding keyboard shortcuts.

Note looking at Launcher your browser icon may have been assigned a number.
I mostly use Firefox and pressing and holding Super tells me Firefox has been assigned the number 6. So pressing Super+6 will launch browser for me.

If pressing and holding Super does not show a shortcut number for your browser

Just drag and drop the launcher icon to nearer the top of launcher for it to be assigned a number.


Uninstalling Crossover return an error, How to fix it?

Then recreate missed files by
sudo mkdir -p /opt/cxoffice/bin/
sudo touch /opt/cxoffice/bin/cxtie
sudo chmod a+x /opt/cxoffice/bin/cxtie

and then remove the application as usual
sudo apt remove crossover

Note: better method is to install CrossOver again using its crossover_20.0.4-1.deb package and then remove it again.


There is a similar bug reported in Firefox Bug Tracker. One of the workaround mentioned there (which works for a few people) is to set gfx.xrender.enabled to False in the about:config settings page of Firefox.

Type about:config in the Address Bar and search for gfx.xrender.enabled in the search box. Double click the item to make sure its value is False. Then restart Firefox and see if it works for you.


Java 9, OpenJDK or otherwise, is still under development, last I checked, and is very likely to be buggy - it's very very likely this is due to you using Java 9 and not a Stable Release of Java (such as Java 8).

Consider switching back to Java 8, and not use Java 9 since it's still in 'development' and not yet released.  (This applies to Oracle Java as well).

Failing that, remove all Java packages, and try reinstalling them all with:

sudo apt-get install -y openjdk-8-jre openjdk-8-jdk

... which should install all the Java 8 files again and make it usable once again.


There are two parts to this issue:

Part 1: connecting something that can read records with your computer

For this, you can either play the record on your normal turn table, and take the audio output to your line-in via cable.  You'll need a cable with 1/8 inch male audio on one end, and whatever output your turntable has easily available.  EG a headphone jack on your stereo.  Cables like this are available from audio stores like radio shack or best buy or whereever.  If you have more speicific questions about this aspect, I'd be happy to provide more details - comment or edit with more details.

Alternatively, you could use something like @Jim mentions in his comment - a USB turntable.  I have 0 experience with these or if they are Ubuntu compatable.

Part 2: record the audio that's coming in.  For this part, @fossfreedom's answer here covers this in good detail.


Xubuntu 18.04 wrong time with dual boot Windows 10

Set Windows 10 to use UTC Time instead of the default Local Time. Use Regedit and create an entry:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\RealTimeIsUniversal

For 64-bit Windows use QWORD and 32-bit Windows use DWORD. Set the value to 1.


What is the equivilent for "Cmd + Space" on Mac for Ubuntu?

Ubuntu 18.04 and 16.04 both use Super, which you may be more familiar with being called the "Command" or "Windows" key.

If you're using Kubuntu you can pres Super or Alt+Space


Could not display "x-nautilus-desktop:///

I probably faced the very same problem which said something like:

Dbus error....could not display x=nautilus-desktop
 .../usr/lib/gvfs/gvfsd not succeeded...

This was resolved by running sudo apt-get update and then upgrading / reinstalling the packages gvfs and fuseand its dependencies if any.

That's it.

In my case, I doubt if the 64bit Linux Mint ISO, I ran in live mode directly from the HDD which caused the problem in the first place. May be those partitions which were mounted during the live mode were not properly unmounted.

Actually I came across this post of yours yesterday while searching for a solution, but could not find a satisfactory solution anywhere on the web. Fortunately what I tried worked... posting it here so it could be easy reference for anybody in future.


Teamviewer does not work unless I open application

Looks like it's TV issue working with Ubuntu.  I was fine on TV v15.0.8 + Ubuntu 19 until I upgraded to Ubuntu 20 + TV 5.12.  TV only works when I login on the semi-remote box.
I switched to VNC.  All is well now.


Where can I get the latest PAM source code?

You can run the following commands:

sudo apt-get update
apt-get source pam

For more info:

man apt-get

Additionally, you can install the build dependencies by running the following:

sudo apt-get build-dep pam


Are you sure all run ok? I believe commands in lines 64 and 65 need be sudoed too. Try:

git clone https://github.com/LionSec/katoolin.git
sudo cp katoolin/katoolin.py /usr/bin/katoolin
sudo chmod a+x /usr/bin/katoolin
sudo katoolin

Hope it help you


Why are the official/stable 4.* kernels marked unstable?

From the Ubuntu Handbook:

NOTE: The kernel binaries are marked as UNSTABLE (see the link url). You may not do this in a production machine, or you have to know what you’re going to do and know about how to restore if something goes wrong (or see the link at bottom).


Permission denied problem when executing

The problem is that VisualWorks typically installs the files in the wrong directory (/). You must use the custom install to force VisualWorks to install in a directory of your choosing.


Adduser and setting up files for each new user

The contents of /etc/skel are copied to new users home.

There are 2 strategies to make system changes for all users:

Edit the appropriate global system files and remove the same settings from the user files. This is the way I prefer to make changes, and enforce them, so that they apply to all users.

For example, to change the bash prompt for all users, edit /etc/bash.bashrc

Add things to /etc/skel . This will put config files in a user home directory. Since these files are placed in $HOME, users may modify them.


In ubuntu, partitions are not named with alphabets like in windows. From what you have revealed, it seems that you rather have a single perhaps 1TB drive, that was split up into multiple partitions. This single drive shows up in ubuntu as /dev/sda, where /dev/sda1 will be the first partition, /dev/sda2 will be the second partition and so on...

It is risky to propose a new partitioning scheme without risking your data and existing windows installation, so I would advise you find someone (your local Linux user group perhaps?) or a friend who is a bit more familiar with this to assist you.

Otherwise, generally, the Live CD/USB Stick with automatic partitioning does a pretty good job of not messing you your system. You could give that a shot.