Google Chrome wont start after changing hostname

This looks like Chrome bug #367048 -   Cannot start chrome after changing hostname, try:

rm -rf ~/.config/google-chrome/Singleton*


Text too small on lower resolution monitor in a dual display setup

After tweaking xrandr for a few hours with no luck, I gave it up. But later on I found a solution which is pretty simple. This works if you have a Geforce graphic card and use Nvidia X Server Settings.

Install Nvidia graphic card driver and Nvidia X Server
Set the monitor with lower resolution as follows: (in the link)

The idea is to set ViewPortIn to the resolution of the higher display, and then set ViewPortOut to the actual physical resolution.


What are the options for managing multiple Ubuntu installations together and keeping them in same state

I believe what you are looking for is Landscape.

  Manage multiple Ubuntu machines as easily as one and lower your
  management and administration costs.

Edit: for free alternatives, this might help: Are there any open source alternative to Landscape?


How can I avoid "please insert CD/DVD" error when updating Ubuntu?

Go to Ubuntu Software Center > Edit > Software Sources and make following changes:
Uncheck the Cdrom option in Ubuntu Software.Also make sure that you have marked all the other options.

Now go to Other Software and uncheck the Cdrom options.

Now try running sudo apt-get update


Thunar not showing thumbnails in Openbox

I found the solution to my problem. I had to add the following line in my ~/.gtkrc-2.0

gtk-icon-theme-name = "Tango"


How to use a USB to extend space on a certain folder in Linux?

Simply mounting the usb drive on /var/www/html/media will over shadow the existing contents, which maybe acceptable. However you may want to copy the contents to the usb drive before mounting it in the same place. This can be accomplished with rsync and mount --bind

# TODO kill processes using /var/www/html/media until restarting them after bind mounting usb dirve to /var/www/html/media.
# Smart copy the existing contents to usb drive
rsync -av /var/www/html/media/ /path/to/usb/drive
# sync to make sure the folder contents are transfered and no writes are waiting.
sleep 0.5 && sync
sudo mount --bind /path/to/usb/drive /var/www/html/media/
# TODO restart processes using /var/www/html/media


"Any ideas what I can do to free some space?"
It seems that your root system is filled to the brim of 1TB with multimedia files.
My guess is that you're saving files to /mnt/somedir but /mnt/somedir is not actually a mount point for a hard drive so they are truly being stored under /mnt/somedir.
You need to move or remove some of these media files to clear up space on your root file system.
You should review your mount points under /etc/fstab to make sure they are correct.
You can add more storage and move some of the media files off of your root partition to another drive. Or you can just remove/delete some of these files.
You have lots of discretion on which media files to move or delete since your system files should only take up a tiny sliver of 1TB.  Don't delete your system files or software - they are not responsible for filling up your storage.


Your fears are founded : rear and front output are the same only when the source is simple stereo (i.e. music, or basic divx films). For other sources (DVDs, but most importantly games), they are different, and you will have a bad experience...

I Have the same kind of setup as you, but with two sets of speakers and a headset. The only solution I've used so far is use only the front output, with an audio "strip". That is crude, but works...

I'm looking for alternatives, but haven't found yet...


DBX12's answer is good. Let me add 2 details that I had to figure out in 18.10:

Instead of [SeatDefaults] current versions expect [Seat:*]
More importantly: I had to experiment a little with the above script using logger and then xmessage to conclude, that it does get called, it does set things right, but then its effect is unfortunately undone by unity-greeter.

I tried other greeters, and they all honor the solution and start up nicely rotated, except the default unity-greeter. I ended up using slick-greeter.


Use -b ("Batch-mode operation"):

top -b -n1


How to make hotkeys ALT_L+X and ALT_R+Y different in KDE?

Since no one has answered this, I'll try to give you a few clues as to where to look as I don't know the answer myself.

I have seen posts on it before, so I had some idea of what to look for.

(This would be way too ugly to put into a comment.)

Look into X tools including xdotool and the .xbindkeysrc

https://unix.stackexchange.com/questions/80660/how-to-remap-a-key-combination-to-a-key/81178#81178

xmodmap

https://unix.stackexchange.com/questions/90919/map-a-symbol-to-a-specific-key

How do I remap certain keys or devices?

The Linux keyboard and console HOWTO

http://www.tldp.org/HOWTO/pdf/Keyboard-and-Console-HOWTO.pdf


I got it, because I didn't not change major versions and still had PHP5 I assumed that php5enmod oci8 would enable the module, it does BUT IN THE WRONG FOLDER.

php5enmod adds a shortcut to the ini /etc/php5/apache2/conf.d but the 5.6 install is read from /etc/php/5.6/apache2/conf.d. Using phpenmod instead of php5enmod solves the problem. One character difference, hours wasted.


'nvidia-settings' received an X Window System error (error was 'BadValue (integer parameter out of range for operation)'.)

I saw the same issue yesterday. Downgrading from 331.20 to 304.88 worked for me:

wget https://launchpad.net/~ubuntu-security/+archive/ppa/+build/4479926/+files/nvidia-settings_304.88-0ubuntu0.2_amd64.deb
sudo dpkg -i nvidia-settings_304.88-0ubuntu0.2_amd64.deb


How can I get a visual indication if I muted audio and the battery power is running out?

1.Try to reinstall NotifyOSD

    sudo apt-get --reinstall install libnotify-bin notify-osd

Then restart.

2.Installing Battstat Applet  gives you a warning on top of all windows like this:-
http://techrax.tk/wp-content/uploads/2015/05/critical_message.png

To install it, do:-

add-apt-repository ppa:iaz/battery-status
apt-get update
apt-get install battery-status

Followed by

/usr/lib/battery-status/battery-status --indicator

Then just right click on panel and click on "Add To Panel">"Battery Applet"


Which graphics driver alternatives do I have for Intel HD Graphics?

There is no proprietary driver for Intel graphics because Intel has made their own drivers free and open source. You don't have any alternatives.

You can use this driver no problem; It supports everything Intel has implemented.


webcam not working on Dell Latitude 5500 and Ubuntu 20.04

In my case I cannot even see the device detected in lsusb, and the system journal is silent about uvc/UVC/Webcam.


It looks to me that mysql needs to be reinstalled (note the warnings in your post about mysql). Have a look at this post: how to reinstall mysql?


The Systemback not let me select storage directory!! Why?

Please choose a writable Linux filesystem. The NTFS, FAT32 or other non-compatible filesystems are not good.


Is it possible to download updates of Ubuntu 12.10 manually somewhere else and then install later?

For a situation like the one you described, I think that synaptic will be appropriate for your purpose.

(I had the same scenario you described, dial up connection at home, and high speed connection at my office.)

Short Version

Use synaptic to create a shell script in the slow machine. Run the script in the fast machine to download packages. Copy back the downloaded packages to the slow machine. Use synaptic to install the packages.

Long Version

If synaptic is not installed in your machine, you will have to install it.

sudo apt-get update
sudo apt-get install synaptic

I understand that your computer has very slow speed. But I hope that it can cope with the update and around 2500 K download for the above installation.

Start synaptic,

sudo synaptic

You get the opening window of synaptic. Select the files you want to install using the Search function.

Marks the packages you want to select, either left mouse click or right mouse menu-select.
Finish marking all the packages you want.

From the File menu generate the download script.

Save the script at some convenient location. Use any file name you like. Let us say your
name is mydownloads.sh

If you close synaptic, you can ignore the warning about not installed packages.

The script is a simple shell script, containing a series of wget commands, like the following,

#!/bin/sh
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/c/cadubi/cadubi_1.3-2_all.deb

Copy the script to your mobile, start a terminal, move to the directory where
you copied the script and run it there.

sudo ./mydownloads.sh

Please remember that wget needs to be installed in that device. If it is not installed, install

sudo apt-get install wget

Once finished running the script (it may take some time depending on the Internet speed and volume of download), you will get a number of .deb files in the directory from where you run the script. Copy those files back to your computer and run synaptic again.

sudo synaptic

From the file menu, use the Add downloaded package function to select the directory in your computer where you copied the downloaded files.

Click on Apply. Installation of your downloaded packages should go without any problem.

From time to time, you will need to run

sudo apt-get update

at your slow speed machine, select Mark All Upgrades in synaptic and then go through the process of generating the script, download the files at your high speed machine, and
then install the downloaded files to keep the slow machine upgraded.


Assuming you have downloaded the driver file somewhere (perhaps your home directory), untar it: tar -xvzf DPB_RT2870_Linux_STA_x.x.x.x.tgz then change to the directory just createdcd DPB_RT2870_Linux_STA_x.x.x.x
This step asks you to edit the file Makefile:nano Makefilebut as far as I can tell, the settings are already correct. Leave that until you find problems in a later step.
The same for the file os/linux/config.mk. Again, the defaults look OK. The lines that explain whether to opt for "Native WPA Supplicant support" contain commands that you would use after the driver has been compiled. WPA Supplicant is the component that will use your driver to connect to a network.
Go back to the top of the directory tree (i.e. ~/DPB_RT2870_Linux_STA_x.x.x.x) and execute the command make. Apparently, the "too few arguments" error is so common that RALINK have provided a workaround. If you get this error, enter the patch command provided and try make again.
The driver needs a data file, so you copy this to /etc/Wireless (you will need sudo).
You should now be able to load the driver module (i.e. place it in memory where the kernel can use it):

cd os/linux
sudo /sbin/insmod rt2870sta.ko
sudo ifconfig ra0 inet YOUR_IP up
This will load your module once. To have your module loaded after every reboot, you will need to take some additional actions.
These are instructions for unloading your module.


Quake 1 Darkplaces Engine Save and Config Path

They are in ~/.darkplaces so if you back up your home folder you are good.


how to partition 4tb drive with fdisk (cfdisk)?

Well before I tell you the reasons why it isn't possible for gparted to destroy your HDD, I'll tell you that fdisk can't deal with partitions larger than 2TB, so you should be able to partition it with 2x2TB partitions.  But I wouldn't recommend it.

The answer you're looking for is: "Yes, you can do that, but be careful"

The answer that other people will want (or want to give) is that gparted really can't destroy a disk like that.  You can do whatever you want to a hard disk with formatting and partitioning and what have you (as long as you don't do anything insane like writing 10,000 TB to it a day *coughcoughGooglecough*) and it can always be reformatted.  Gparted is the way to go for anything modern.  It will work with most everything out there (if it's post-War On Terrorism) and is easier to work with.  It won't hurt to use fdisk, but just make sure you be careful.  To stay on the safe side, I would stay under 1.5TB per partition rather than trying to ride the line, if you're set on using fdisk.

The answer that I want to give is: "Use gparted.  There's absolutely nothing wrong with it at all."


What values are available for fn and fb options to the xterm command?

The X server finds its fonts along its "FontPath". If you do a grep -A 7 FontPath /var/log/Xorg.0.log you'll see directories with fonts files in them.

Take a look at this link,

and Big-X cursor

and the Font HOW-TO


Did you follow the advice on the gmail support page? Send mail from a different address or alias


Install ImageMagick for Python Ubuntu 16.04

Install wand in Ubuntu 16.04 from the default Ubuntu repositories.

sudo apt install python-wand libmagickwand-dev

Create an image called mona-lisa.png in your own home directory to use in the following example code from the wand documentation.

from wand.image import Image
from wand.display import display

with Image(filename='mona-lisa.png') as img:
    print(img.size)
    for r in 1, 2, 3:
        with img.clone() as i:
            i.resize(int(i.width * r * 0.25), int(i.height * r * 0.25))
            i.rotate(90 * r)
            i.save(filename='mona-lisa-{0}.png'.format(r))
            display(i)

If you are running this code from the terminal, press Enter twice after the end of the code to run the code. This code should run successfully and open the image in a separate window and show the console output. Close all the image windows that the Python code opened by clicking on the X before exiting from the Python interpreter.

I tried troubleshooting your output and got these results:

>>> from ctypes import *
>>> cdll.LoadLibrary('libMagickWand-6.Q16.so.2')
<CDLL 'libMagickWand-6.Q16.so.2', handle 266d6a0 at 7fb271c966d0>

There were no errors on my computer, however I discovered what caused this error on your computer:

OSError: /home/myuname/anaconda3/bin/../lib/libgomp.so.1: version `GOMP_4.0' not found (required by /usr/lib/x86_64-linux-gnu/libMagickWand-6.Q16.so.2)

Clearly the error on your computer is caused by anaconda. Anaconda is known for making a big mess out of the default paths for many Python modules. To fix it you need to tell conda the paths to Python files that were installed by apt.

You can use symbolic links to tell conda the paths to Python files that were installed by apt. Put the symbolic links in conda's own lib/python/site-packages directory which for you would be something like: /home/ksindi/anaconda3/lib/python/site-packages if ksindi is your username.

No sir, I do not like anaconda for making me do all this extra work to make conda recognize the Python packages that I installed with apt.


This video will help you:

http://www.youtube.com/watch?feature=player_embedded&v=gUXUjjg9qQ0

Read this too:

http://www.omgubuntu.co.uk/2012/02/ubuntu-for-android-announced/

I think that when it will ready, you can read it here:
http://www.ubuntu.com/devices/android


How can I display the current keyboard map on screen?

If you are using unity. Open Dash and search for keyboard and open Keyboard

Click on layout settings and add the keyboard layout by clicking "+"

Once you set the extra keyboard layout, you can see a small icon of the top panel(Next to battery icon).

When you toggle the layout you can see the indicator showing the active layout (I used the shortcut Alt+Shift)


python 3.4 is installed on the stable release of Ubuntu 14.04. You need to use python3 to use python 3.4. For example, to execute a script file.py, use:

python3 file.py

This will use python 3.4 to interpret your program or you can use the shebang to make it executable. The first line of your program should be:

#!/usr/bin/env python3

and then use chmod +x file.py to assign executable permissions and then run your python script as ./file.py which would use python3 to execute.

If you want python3 to be used when you type python on the terminal, you can use an alias. To add a new alias, open your ~/.bash_aliases file using gedit ~/.bash_aliases and type the following:

alias python=python3

and then save and exit and type

source ~/.bash_aliases

and then you can type

python file.py

to use python3 as your default python interpreter.

No, you don't need IDLE just to use python3 to interpret your programs.


Reinstall ubuntu on a SSD and keep /home

Yes, this is all possible.

Firstly, it is a good idea to take a backup of your home directory, just in case - it's all too easy to make a silly mistake & be sorry!

Next, install the SSD & reboot from install media, do a normal installation, don't tell Ubuntu about your current SDA drive - be aware, the SSD may well go in as SDA so check carefully when you select the destination drive!

You can allocate /home during the install, but I always prefer not to (just paranoia!) - it's only one tick-box away from formatting it, and it keeps it safe..

Having got your new system up & running, mount the old drive; just double-click it's desktop icon - check the ownership of your old home directory matches - it probably does, unless you have multiple users. If it doesn't, shopt -s dotglob ; chown -R you:you /media/you/wherever will fix it so it does. The shopt command makes it include hidden files, & the chown changes ownership to your new UID & GID.

Now, use `blkid /dev/sdx4' to get the UUID for your home partition, add it to /etc/fstab -

sudo vi /etc/fstab or whatever editor you prefer
UUID=78995654kjhgjyt7896 /home ext4 defaults 0 1 - obviously, using your UUID & filesystem type here.

mount -a should now replace your home directory with the old one, although a reboot is a better idea as you may get some odd effects if you just remount.

You can then delete your old system - /dev/sdx1, and sdx2 -others beware as that is sometimes an extended partition and may hold your home directory! Use gparted to expand into the free space.


How can I run this script on startup, restart, and shutdown?

I suggest you forget SysV if possible and use /etc/init new style scripts. Something like this (put it in /etc/init/unison.conf for example):

start on (runlevel [06] or local-filesystems)
task
# If it needs to run other than root (you need Upstart 1.4, otherwise use "su" on exec line
setuid <username>

script
  # You can place your entire script here, no need for separate script
  exec unison -perms 0 -batch "/mnt/Data/Syncfolder/" "/home/myname/Syncfolder/"
end script


Windows 7 sees all Ubuntu partitions as primary

You can format the NTFS partition in Linux, if this will work on the windows side i don't know. But this command should be able to format the disk correctly:

sudo mkntfs -L "LABEL" /dev/NTFS-DISK

Where NTFS-DISK should be replaced by the right partiotion and LABEL replaced by a filsystem label of your choosing, you have to have the ntfsprogs package installed. Afaik you should then be able to (if you are a superuser/administrator) assign the partition a drive letter in Windows after formatting it.


Distortion during window-resizing, typing in the address bar of firefox and in other places

This issue may not be related to the kernel, because it might be solved using some other methods, but changing/downgrading my kernel from 4.10.0-28 to 4.4.0-28 seems to have solved the distortion issues...

I have also used kernel 4.4.0-89 and that also seems to work fine. I tested using these kernels only because I used to use them on Linux Mint, so I trusted them to see if they can get me out of this problem...

From a similar point of view, I upgraded my kernel from the default 4.10.0-28 to 4.10.0-31(the update was available in the Software Updater utility) to see if that solves it, but it didn't...

So far, I haven't faced any distortion issues on these 4.4.0-x kernel series, neither in Firefox, nor in resizing application windows and other cases...


Can't login after installing AMD driver in Ubuntu 14.04

Change your drivers from the ones that are not working via the Commandline.

Log into the console, Ctrl+Alt+F2.

Use this command to list the available drivers.

$ ubuntu-drivers devices

Then pick one of the alternate drivers from the list and install it with.  Picking the one referred as recommended may be a failsafe.  Some manual proprietary drivers might not show up on the list.  You may have to reinstall a proprietary drives using the supplied install method to switch to that one.

$ sudo apt install [driver]

You may or may not have to remove or rename your current /etc/X11/xorg.conf file.  Some propriety driver installs may reconfigure it.  I would test first without touching it.  If you need to you can rm move it with.

$ rm /etc/X11/xorg.conf

Now reboot.  Now that you have a failsafe way to get back to the GUI, you can test other drivers to optimize your performance.

Note:
You can check your current driver that is in use with:

$ sudo lspci -nnk | grep -i vga -A3


How to remove the scroll limit fade (edge-overshot effect)?

This is not a feature of Ubuntu, or Gnome, it's the underlying GTK3 effect triggered by the edge-overshot event https://developer.gnome.org/gtk3/stable/GtkScrolledWindow.html#GtkScrolledWindow-edge-overshot.

If the effect does not look good with your theme or you find it annoying, then you will need to edit the overshoot CSS class in the GTK+ theme. (If it messes up the display then it is a bug in the theme and should be reported to the theme author).

To disable the overshoot effect you can manually edit the GTK+ theme to tweak the CSS rule.

Find out the current GTK+ theme in use. As I have a custom theme, the standard System Settings did not show the correct theme name. To see the correct GTK+ theme I used Gnome Tweak Tool, installable with:

sudo apt-get install gnome-tweak-tool

In Gnome Tweak Tool Under Appearance you will see the current GTK+ theme, for example MBuntu-Y. The corresponding theme folder will be located under /usr/share/themes/MBuntu-Y. Now make a copy of the original theme (a better option would be to create a copy of the original theme in your ~/themes folder):

sudo cp -r /usr/share/themes/MBuntu-Y /usr/share/themes/MBuntu-Y-original

Next edit the CSS file:

sudo gedit /usr/share/themes/MBuntu-Y/gtk-3.0/gtk-widgets.css

Search for overshoot in the file, and edit the corresponding rule to read like below:

    .overshoot { background: transparent; border:none; }

Once you have saved the file you might need to relogin to see the changes.


Ubuntu 14.04 window problem after waking up from suspend

I'm not sure why it happens after 2 or 3 suspends.  Short of running

tail -f /var/log/syslog

before and after a bad suspend, it will be difficult to tell.

I believe you can, however, run

compiz --replace

from a terminal to fix your window issues (it's worked for me in the past, sometimes waking up from suspend I won't have window borders to click/close/minimize).

Try to get a pre and post log so we can look at that and figure out what's going wrong when suspending that causes this.


How do I change the default 'hostname.local' apache config

There's no magic going on, really.

What you have is a fresh installation to Apache. So, by default, any request on port 80 to your machine will show you the default apache welcome page.

For example, the following would work as well:

http://127.0.0.1/
http://localhost/

If you need to add another domain, you need to point that domain to your machine. The simplest way to do that on a development machine is to edit the /etc/hosts file and a new entry.

Open the file with an editor and add the following line (change mybox.something to whatever you want):

127.0.0.1   mybox.something

After you do that, just open http://mybox.something in your browser and it should work.


Referring to this link, there is a workaround to run QT apps when you encountering this issue. Try adding QT_X11_NO_MITSHM=1 after sudo and before python:

sudo QT_X11_NO_MITSHM=1 python execute.py


No sound on laptop speakers on an Acer Aspire 6920

In the Terminal (Ctrl+Alt+T), run:

alsamixer

And increase the Master volume.


From the Linux documentation:

user: normal processes executing in user mode
nice: niced processes executing in user mode
system: processes executing in kernel mode
idle: twiddling thumbs
iowait: waiting for I/O to complete
irq: servicing interrupts
softirq: servicing softirqs
steal: involuntary wait
guest: running a normal guest
guest_nice: running a niced guest


I've done a bit of googling about this since asking the question and found:

there is currently no fsck for btrfs (as of linux kernel 2.6.36, while maverick has 2.6.35), so "it's rather easy to kill a btrfs by just losing power".
the btrfs launchpad blueprint has the comment " I deferred this for completion in Natty, as we won't be able to complete all the remaining work for Maverick".
there is an open bug about dpkg upgrades and installs being very slow on btrfs.

So all these would suggest btrfs should not be used on a production system, or any other system where you care about the data.


Problems allowing outgoing multicast in ufw

SRC=fe80:0000:0000:0000:f66d:04ff:feee:df54
DST=ff02:0000:0000:0000:0000:0000:0000:0016

I think that this numbers must be within of the number ff00::/8. I don't know if them are.

Or maybe you want to try "My UPnP player can not see MediaTomb, what is wrong?"'s rules. Though them be for a necessity that seems the inverse...


How do which sites I have selected affect updates?

I assume that you refer to the repositories when you refer to 'site'
(The thing you select from 'software sources')

The differences may be:

Speed. Mirrors close to your physical location usually serve updates at slightly greater speed.
Time: At times, there is a delay between synchronizations, so you may get updates a little later, depending on the mirror you choose.

That said, All repositories are periodically synchronized to have Exactly the same content. So It really doesn't matter what repo you choose.

As a side note, This QA thread has information on how to choose a mirror to maximise download speed.


Ubuntu is more sensitive to potential disk failure, and will tell you long before Windows does. Heed the messages Ubuntu is giving you. Your drive is failing. I don't care what Windows (especially XP) says. By the time Windows figures it out, you probably won't even be able to boot to the drive.

Yes, brand-new drives can fail. I've had this exact same thing happen with my Western Digital 1TB drive (it was a factory defect with that line of drives). Since it's brand new, you can get it replaced under the manufacturer's warranty. Do that ASAP.


Network booting couldn't find kernel image

The kernel image (and initrd) must be located relative to the root folder. If you follow that how-to, then you have configured the following parameters:

DHCP server is configured to use /tftpboot/
The boot image is /pxelinux.0 (relative to the TFTP root directory, so the actual path is /tftpboot/pxelinux.0)
PXELinux (part of syslinux) looks for its configuration in the /pxelinux.cfg/ directory. If it does not find a file matching the client MAC address or GUID, then it will fallback to a file named default (/tftpboot/pxelinux.cfg/default) in your case.
That file should contain something like:

LABEL linux
  KERNEL vmlinuz
  INITRD initrd
  APPEND root=...

The vmlinuz and initrd files are then looked up relative to the TFTP root directory, so ensure that the file /tftpboot/vmlinuz and /tftpboot/initrd exist. You can find these files in /boot/.

I would also suggest not to use /tftpboot/ as root directory for TFTP files, but /srv/tftpboot/. That is a more suitable location for site-specific data.

For debugging, be sure to have a look at your syslog. I have used the dnsmasq DHCP server which sends its logs to syslog (/var/log/syslog). ISC's DHCP sever should do something similar.


sudo apt install php-mbstring
sudo service apache2 restart


For the benefit of the reader:

The problem stems from a previous install of package ntp.  When ntp is replaced by openntpd, it leaves some config files around, one of this is /etc/apparmor.d/usr.sbin.ntpd.  This then blocks openntpd from running properly.  ntp is normally installed by default, so this usually always happens after installing openntpd when apparmor is active.

The solution is:

sudo apt-get purge ntp
sudo /etc/init.d/apparmor reload
sudo /etc/init.d/openntpd restart

If you like to use apparmor with openntpd (you probably switched to openntpd to have something more secure, right?), here is what I have added as /etc/apparmor.d/openntpd (I do not know if this is complete.  It works at my side so far):

# vim:syntax=apparmor

#include <tunables/global>

/usr/sbin/ntpd {
  #include <abstractions/base>
  #include <abstractions/nameservice>
  #include <abstractions/user-tmp>

  /etc/openntpd/ntpd.conf r,
  /var/lib/openntpd/run/ntpd.sock rw,
  /var/lib/openntpd/db/ntpd.drift rw,

  capability sys_time,
  capability sys_nice,
  capability sys_chroot,
  capability setgid,
  capability setuid,
  capability kill,
}

Why not "fix" /etc/apparmor.d/usr.sbin.ntpd for openntpd?

Because ntp is a resource monster.  It needs trainloads of permissions, which are not needed for openntpd.  The right thing to do is to restrict openntpd to what it needs, not what ntp needs.

BTW: The probably best solution would be to have Canonical add a proper /etc/apparmor.d/usr.sbin.ntpd to package openntpd, which then overrides the left over config from ntp.  One can consider this a bug in Ubuntu 16.04.


unloggable machine after login trashed by sudo startx

Boot from your Ubuntu (or any other Linux) installation drive, sudo to root and then chown your files back.


Need help installing Brother HL 2270dw printer

You have to edit the file /etc/printcap, as described in step 5-2 of your link.

You can type:

sudo gedit /etc/printcap

If that command does not work, you can edit the file with the terminal editor nano (the easiest for beginners):

sudo nano /etc/printcap

And then edit the file as described in the manual.


Cannot load cgi-library into perl-cgi-script

Partially answering this for my own archiving. This seems to be a recent error that stems from a broken dependency. I got a similar error message when check the error log.

tail -100 /var/log/apache2/error.log
...
 AH01215: Can't locate CGI.pm in @INC (you may need to install the CGI module)
...

After some detective work, I traced this to the following dependency (sorry I lost my source).

sudo apt-get install libcgi-session-perl


cannot log into Ubuntu 12.04.1 LTS after startup

Not exactly a solution but try this:

Log into your desktop and wait until the hard drive stop reading. The way you describe it seems like unity is not loading properly.
After this, switch and  log into a tty. You can do this pressing Ctrl+Alt+F6 and log into the terminal.
Change the variable DISPLAY so the next commands will affect the graphic environment:

export DISPLAY=:0.0
Execute this:

compiz --replace &
This should make compiz try to restart. You should return to the GUI (Ctrl+Alt+F7 or Ctrl+Alt+right arrow) and see if it loads the desktop. Any error message would show up in the tty6 you executed the command.
If this doesn't work, try to reset unity to defaults, in the same tty6:

unity --reset
And repeat the process, try to reload compiz/unity again and see if it works. As a last advice if this is not working you could install an alternative desktop manager like gnome-shell or xfce:

sudo apt-get install gnome-shell

or

sudo apt-get install xubuntu-desktop

That way you'll have at least an usable desktop to surf the web and search the answer. It may be a problem with your graphic drivers and after installing them it may work. What graphic card are you using? I remember having a lot of problems with ATI cards...

Wish it helps, good luck!


ENDOFMENU as used in your example is a so-called here document or here doc. It allows for a multi-line string without needing to escape quoting characters such as ' and ".

Quoting the bash(1) manual:

  This  type of redirection instructs the shell to read input from the current
  source until a line containing only delimiter (with no trailing blanks) is seen.
  All of the lines read up to that point are then used as the standard input for a
  command.

  The format of here-documents is:

<<[-]word
here-document
delimiter

  No parameter expansion, command substitution, arithmetic expansion, or pathname
  expansion is performed on word.  If any characters in word are  quoted,  the
  delimiter  is  the  result  of  quote removal on word, and the lines in the
  here-document are not expanded.  If word is unquoted, all lines of the
  here-document are subjected to parameter expansion, command substitution, and
  arithmetic  expansion.   In  the latter case, the character sequence \<newline>
  is ignored, and \ must be used to quote the characters \, $, and `.

You showed the following code in your example:

cat<<ENDOFMENU
1: print the date
2,3 : print the current working directory
4: exit
ENDOFMENU
  echo; echo -e "your choice?\c"

That makes a string available as stream and then prints them to the console using the cat command. Finally, it prints another blank line followed by the string your choice? and an escape sequence that means "produce no further output" and effectively strips the newline that would follow. It could be rewritten as:

echo -e "    1: print the date
2,3 : print the current working directory
4: exit

your choice?\c"


Install g++ ubuntu 14.04 Depends: g++-4.8 (>= 4.8.2-5~) but it is not going to be installed

The problem is:

libstdc++-4.8-dev : Depends: gcc-4.8-base (= 4.8.2-19ubuntu1) but 4.8.4-2ubuntu1~14.04 is to be installed

Why? That's why:

libstdc++-4.8-dev in the main repositories depends on libstdc++-4.8-dev=4.8.2-19ubuntu1
libstdc++-4.8-dev in the updates repository depends on libstdc++-4.8-dev=4.8.4-2ubuntu1~14.04, which is installed in your system

The solution?

My first choice is, enable the update repository again:

Open Software & Updates and the tab Updates
Select trusty-updates and trusty-security and click Close

If someone has a version for the terminal, then please let me know.

Reload

Install

sudo apt-get install g++

My second choice, downgrade

Hmm, I would say, that's a bad idea =)


How to connect with iPhone using Nautilus?

I have been able to connect using the Fillezilla FTP client. I don't know why, but I simply can't access via SSH using Nautilus, and after racking my brains for a solution to the issue, I decided to go with the simple solution.


Where are the application crash files stored?

If I am not wrong, the crash logs are stored in /var/crash.

-jokerdino at 14:10 UTC on 11-11-2012

These logs can be transported and saved. If if references a data file, it may be of help to save that file for reference.


No wireless interface will connect without the intended SSID and WPA password.

I doubt that the gateway is x.255. Without trying to set an static IP address, check:

route -n

I suspect the gateway is eithe x.1 or x.254.

As well, you lack DNS nameservers. I suggest you set up /etc/network/interfaces like this:

auto wlp2s0
iface wlp2s0 inet static
  address 192.168.0.16
  netmask 255.255.255.0
  gateway 192.168.0.1
  dns-nameservers 192.168.0.1 8.8.8.8
  wpa-ssid <your_network>
  wpa-psk <your_key>

Reboot and check:

ifconfig
ping -c3 www.ubuntu.com

Please make certain that the selected IP address, x.16, is outside the DHCP pool allocated in the router.

Next, check the settings in the router. WPA2-AES is preferred; not any WPA and WPA2 mixed mode and certainly not TKIP. Second, if your router is capable of N speeds, you may have better connectivity with a channel width of 20 MHz in the 2.4 GHz band instead of automatic 20/40 MHz, although it is likely to affect N speeds. I also have better luck with a fixed channel, either 1, 6 or 11, rather than automatic channel selection. Also, be certain the router is not set to use N speeds only; auto B, G and N is preferred. After making these changes, reboot the router.

Next, I recommend that your regulatory domain be set explicitly. Check yours:

sudo iw reg get

If you get 00, that is a one-size-maybe-fits-all setting. Find yours here: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 Then set it temporarily:

sudo iw reg set IS

Of course, substitute your country code if not Iceland. Set it permanently:

gksudo gedit /etc/default/crda

Use nano or kate or leafpad if you don't have the text editor gedit.

Change the last line to read:

REGDOMAIN=IS

Proofread carefully, save and close the text editor.

Next, I'd set IPv6 to Ignore in Network Manager: http://docs.fedoraproject.org/en-US/Fedora/18/html/Installation_Guide/images/netconfig/network-connections-ipv6-ignore.png  This example is for ethernet, but you want wireless.

After rebooting the router and the computer, please show us:

sudo ifdown wlp2s0 && sudo ifup -v wlp2s0

Paste the result at: http://paste.ubuntu.com and give us the link.


Triple Booting - Windows, Ubuntu, and Ubuntu Studio

Wubi can only support a single installation instance at a time, and although it's possible to get around this Ubuntu Studio isn't supported by Wubi until 13.04. This means you cannot install Ubuntu Studio 12.04 or 12.10 with Wubi. There are some workarounds to do this (not recommended). If you use the 13.04 Wubi then you'll be installing a development release that is in beta and not recommended for normal users. It's also not totally clear when or if Wubi 13.04 will be released.

So in order to install Ubuntu Studio you would need to install as a normal dual boot. You would do this by booting from your Ubuntu Studio DVD and select to install it. You can create some free space beforehand by splitting or deleting an existing partition, or see whether the installer can do this for you satisfactorily.

You could also update your existing Ubuntu install to Ubuntu Studio.

Note: if you reinstall with Wubi, it will delete and completely remove any old Wubi install. If you install a normal dual boot, it won't see the Wubi install or interfere with it, but you'll only be able to boot the Wubi install from Windows' boot manager (unless you manually create Grub entries for it).


How to remove sign-in (password) fields when i boot up?

1 - Go to Passwords And Encryption Keys

2 - On there you have the opportunity to change your default password, enter your old password and then in the field where you would put your new password press Enter

You won't be prompted for your password upon logging in any more.

To stop being asked for your password when you Log Out & Log In again go to Users And Groups click on Change Password and then tick the box labelled Don't Ask For Password On Login


Unable to use virtualenv and virtuenvwrapper on Ubuntu 20

I think you missed an important note in the instructions: the export lines need to come before sourcing virtualenvwrapper.sh.  You're sourcing virtualenvwrapper.sh twice.


Is there any way to force a USB HDD stop spinning after "Safely remove"?

Depending on what you are trying to do, I am guessing what it looks like to me that when you are done with the drive you want to keep it plugged in but not mounted.

So what I would advise you to do is to open the menu and search "Disks" (Ubuntu 14.04/10) if your disk is there, instead of clicking Safely remove I would just click on the pause button on that drive.

Because, it you did not know this, I will tell you that the Safely Removal tool does not do anything beneficial, just as long as your not transferring files it is fine to un-mount it.

Also because the safely removal does is just gets your drive ready for unplugging it. Which in this case you are not, as I take it from what you are asking in this question.

Hopefully I could be some help!


After rethinking about the Black Screen with cursor at upper left corner, I suggest you to do these. Cause, those flashing cursor tell me that, BIOS checking for a boot-sector but It was failing.
Check BIOS boot order settings
Just in case, If you have forgotten to boot from CD using first boot device as CDROM. Press the specified key in your keyboard to Enter boot device selection menu in BIOS. I've read just now, Fujitsu Laptop's Bios has these settings:

Press ESC for Diagnostics, F2 for BIOS or F12 for Boot selection Menu

Press F12 to Enter Boot selection Menu and choose CDROM as Boot device.
If the problem still persists, Check CDROM in another machine
Check the CDROM in another machine, You commented that, those worked in other machines 3 weeks ago. I'll recommend to check another time.
If still persists, Try booting from USB
If you see that You can Enter BIOS to select the correct Boot device and also the CDROM is good, I'll suggest you to make a bootable USB and try Booting from that USB. It should work. In that case, I fear, your CDROM drive might get corrupted as Well.

Create a bootable USB stick

Old solution that didn't work
What I can assume is, there may be some graphics driver problem with the Live CD. I'll suggest you to download alternate installer iso and burn to a CD. You should be able to install Ubuntu.
Here is the link for downloading alternate iso for Ubuntu 12.04


Where can i find the Ubuntu-touch 14.04 changelogs

Here are the manifest for the latest and the pending daily-preinstalled image. You can also find other daily images here.


Erase and Install (by @user68186)

When you start the fresh install of Ubuntu 19.04, you should see an option to erase everything and install. This will remove all the partitions and create new ones spanning the whole 2TB.

This option will delete everything in that disk! That means Windows, Ubuntu 18.10, any data partition, any recovery partition etc. etc.

Alternative option

Alternatively you could boot a live system (eg. Ubuntu 19.04's install media), and using gparted to delete your windows partition, then 'grow' your 18.10 partition to use the whole disk as you'd like, then do your install from that media.

You can opt to install using 'something-else' and ensure 'format' checkbox is not checked. This takes note of additional apps you've installed in your 18.10, erases system directories, installs, then re-adds apps you added (if in repositories). It doesn't touch your user data (unless you accidentally selected format).

Of course don't forget to backup any data you don't want to lose, and please note this will be slower than erase/install!

19.04's coming EOL

Ubuntu 19.04 won't receive updates after that EOL in late Jan-2020, but a few days after Ubuntu 19.10's release, you'll be offered the chance to release-upgrade to 19.10 (or you can do it yourself any time after this until shortly after 19.04's EOL).

This is a consolidation of comments by @user68186 and myself


How does one show all applications when choosing an application to open a file with?

Solution:

In terminal, run gedit ~/.local/share/applications/mimeapps.list.  In the text document that opens, add the line application/octet-stream=gvbam.desktop; underneath "[Added Associates]", which should be at the top.  This should force .gbc files, which Ubuntu recognizes as octet-streams, to open using VBA-M.

You will also have to tell VBA-M to load a rom upon launching by using the following steps:

In terminal, run gksudo gedit /usr/share/applications/gvbam.desktop
In the file that opens, replace Exec=gvbam with Exec=gvbam %U

Following this, you will need to run sudo update-desktop-database in terminal to "apply" the edits.

When you click "Open with other application..." in the right-click menu, and click "Show other applications", VBA-M should now be in the list, and the game should open correctly.

If file is not recognized as a GameBoy Color Rom or isn't opening, rename the extension. For example, if the extension is ".gbc" (i.e. GameBoy Color), renaming it to ".gb" (i.e. GameBoy) should make it recognized as a GameBoy Rom.

How I came to my conclusion

In terminal, run gksudo gedit /usr/share/applications/gvbam.desktop. In the "Exec=gvbam" line, add %U afterwards. So in the end, it should the whole line should be Exec=gvbam %U.

While this did add VBA-M to the "Other Applications" list, (and thus allow me to set VBA-M as the default program for .gbc's) the game doesn't actually run; in fact, the VBA-M window completely fails to show up anywhere. I think that this is because of how VBA-M currently works; in a terminal, I ran gvbam "Pokemon Gold.gbc", and it threw the following error:

The program 'gvbam' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadAlloc (insufficient resources for operation)'.
  (Details: serial 474 error_code 11 request_code 154 minor_code 3)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

To further test this, I downloaded another rom, and I chose The Legend of Zelda: A Link to the Past. Having already done the above instructions to add VBA-M to the application list, I chose it as default for the Zelda game, which was a .gba file; the game loaded fine. I noticed in the properties of the files, the .gbc's type was unknown (application/octet-stream), while the .gba's type was Game Boy Advance ROM (application/x-gba-rom); obviously, something else was missing in the association of GameBoy Color roms, which wasn't missing with GameBoy Advance roms.

I tried adding gbc as an associated filetype with application/octet-stream, and that seemed to fix the issue of the .gbc file not opening. However, I then removed it, and tried opening the .gbc again, and it still worked; I'm not sure what I did, but now it works.

Original Answer

This got an upvote, so since someone thought this was good, I'm leaving it here for anyone else who cares. That being said, the information above is probably more relevant to the question.

To start out, you must be sure that the MIME type for your file extension does not already exist. Open a terminal and enter:

grep 'gbc' /etc/mime.types

If there was no output, or the output given did not include your extension, you must add a MIME type.

In a terminal, open the mime.types file by running gksudo gedit /etc/mime.types.  In this file, add the following line to the "application" section:

  application/gbc                   gbc

There should be additional spaces between the two gbc's - just make sure to line the second gbc up with the other extensions.  I would show, but I'm not sure how to do this on askubuntu.

Sources:

Adding Mime Types
Where are file associations stored?
How does Ubuntu create “user-defined” file associations?


Ubuntu Server 18.04 VM network and SSH issues from Ubuntu host

When setting up a virtual network device you need to set the cable connected checkbox, otherwise the network device will be present but has no link.


Try this:

Switch on your computer.

Press and hold the Shift key, which will bring up the Grub menu.

Select the line which starts with Advanced options.

Select the line ending with (recovery mode)

Press Return and your computer will begin the boot process.

Your computer should display a menu with a number of options.

One of the options will be Check all file systems.

Press Return with this option highlighted.

Other of the options will be Enable networking.

Press Return with this option highlighted.

Other of the options will be Drop to root shell prompt.

Press Return with this option highlighted.

Your computer should boot in a terminal, so enter the commands:

mount -o remount,rw /
mount --all
dpkg --configure -a
apt-get autoremove
apt-get update
apt-get dist-upgrade
apt-get -f install
apt-get -m install
apt-get clean
reboot


Citrix client installation and configuration in ubuntu 11.10 or 12.04

Ironically in the last days I wrote an installation guide (using Citrix receiver), here are my steps:

Linux 32-bit

Get the Citrix Receiver from www.citrix.com -> Downloads -> Client Center -> Linux
Install it. You might get a warning this package has low quality.
Get OpenMotif, at least version 2.3.1: http://ftp.us.debian.org/debian/pool/non-free/o/openmotif/libmotif4_2.3.3-5_i386.deb
(Warning: this does not work nicely, maybe because of compositing enabled. You might instead want to install OpenMotif via your Package Manager, e.g. Synaptic)
Now you should be able to start Citrix Receiver (Ubuntu: Applications -> Internet -> Citrix Receiver, in general/or to debug an error via gnome-terminal: /opt/Citrix/ICAClient/wfcmgr -icaroot /opt/Citrix/ICAClient)
Read below how to continue

Linux 64-bit

Get the Citrix Receiver from www.citrix.com -> Downloads -> Client Center -> Linux
Install it. You’ll probably get a warning this package has low quality. In fact this is a 32 bit package.
Get OpenMotif 32 bit, at least version 2.3.1 (taken from this guide)

wget http://ftp.us.debian.org/debian/pool/non-free/o/openmotif/libmotif4_2.3.3-5_i386.deb
Extract the package
Ubuntu/Debian-based: dpkg -x libmotif4_2.3.3-5_i386.deb .
Copy lib files into your 32 bit compat lib folder:
Ubuntu/Debian-based: sudo cp -r usr/lib/* /usr/lib32/
3a. sudo ldconfig
3b. In case you have an Apparmor configuration, you might have to modify it

Now you should be able to start Citrix Receiver (Ubuntu: Applications -> Internet -> Citrix Receiver, in general: /opt/Citrix/ICAClient/wfcmgr -icaroot /opt/Citrix/ICAClient)
Read below how to continue

How to connect

Start Citrix Receiver
View -> Citrix XenApp View
Enter http:// hostname (make sure you can reach this address, e.g. test with ping; the hostname is the same hostname as for the Windows Online version, but leave the http path)
Afterwards enter your credentials like on Windows

My workstation is a 64-bit, unfortunately I hadn't had much opportunity to improve the 32-bit configuration steps. In fact I just posted a question on askubuntu regarding compositing: Citrix Client on Ubuntu has focus problems


As you suggest, creating free space by shrinking the partition would be a good way to get past this.  (Obligatory warning : Back up your Windows data if you haven't.)

You can partition/resize in either Windows or Ubuntu/Linux.

In one case, I had to use a utility in Windows to actually create an ext3 partition in the free space that Ubuntu would see.  After that, I was able to boot the Ubuntu DVD, and was finally able to select the ext3 partition and format it to ext4 for Ubuntu without harming the existing Windows installation.


What EXACTLY do I do to remotely access my server from SSH?

You have not specified clearly what you are trying to do.

Is it a remote server somewhere on internet that you want to ssh into?
Is it a Local server that you are trying to ssh into?
Is your computer the server and you are trying to login into your computer from the internet?

If it is first or second case than you don't need port forwarding and the command you would run in these cases is,

ssh <username>@<server address>

By default, It assumes that the port is 22. If it is not 22 than you need to run this command.

ssh <username>@<server address> -p <port number>

If it is the third case, Then, First of all, You need to start a ssh server on your computer. On Ubuntu you can do, sudo service sshd start
to start a ssh server. Now, Setup port forwarding correctly, And in short, If someone sends a request to your public IP address on port 22(or on which ever port you setup port forwarding) It should send that request to your local server on which ssh server is running.

Once it is done, You should be able to access your local computer from the internet by running this command.

ssh <your pc's username>@<Your public IP address> -p <Port that you used in port forwarding>

let me know if any of this sounds confusing.


Ubuntu 14.04 LTS fails to start with a kernel panic

This was probably caused by fixes and features backported from newer kernels.

In GRUB menu, select Advanced options for Ubuntu, choose the last kernel that worked (not recovery mode).

Now you can:

Remove new kernel and keep using old one, making your system vulnerable to old kernel exploits
Install newer kernel, for which these fixes were made

Easiest way to install new kernel is to download it from kernel.ubuntu.com and install it using dpkg.

First, select the version you want (preferably the newest non-rc one, utopic kernels will work for 14.04 too), then download 3 files:

linux-headers-x.xx.x-xxxxxx-generic_x.xx.x-xxxxxx.xxxxxxxxxxxxx_architecture.deb
linux-headers-x.xx.x-xxxxxx_x.xx.x-xxxxxx.xxxxxxxxxxxx_all.deb
linux-image-x.xx.x-xxxxxx-generic_x.xx.x-xxxxxx.xxxxxxxxxxxx_architecture.deb

Replace architecture with i386 if you use 32-bit Ubuntu, or amd64 if you use 64-bit one (it has nothing to do with CPU manufacturer!).

Move these files to separate directory, open your terminal, cd to that directory and then run this command:

sudo dpkg -i *.deb

When dpkg finishes, you can reboot, and ensure that you are running the kernel you've installed:

uname -a
Linux m132 x.xx.x #1 SMP Tue Jun 10 00:45:23 CEST 2014 x86_64 x86_64 x86_64 GNU/Linux

Remember, you'll have to update kernel manually now, because Software Updates will only install 3.13 patches, as the kernel version never changes after Ubuntu release.

If it still doesn't work, uninstall the kernel you've installed with

sudo apt-get purge linux-headers-3.13.0-24 linux-headers-3.13.0-24-generic linux-image-3.13.0-24-generic
sudo apt-get purge linux-image-extra-3.13.0-24-generic

Replace 3.13.0-24 with version you want to uninstall (or press Tab key to list installed ones). Second command may throw an error as there's no linux-image-extra for some kernels.

PS: Please, follow these instructions to make a bug report for that faulty kernel, so they can fix it for others :)


Phone is recongized in Ubuntu but cannot be found in dev/sdb

Whether a device (phone in your case) comes up as a block device (/dev/XdY where X and Y are hardware-dependent) or a character device (/run/user/nnnn/gvfs/mtp:) are a feature of the combined device's hardware and OS.

So you'll never be able to have it listed as a block device (unless you write your own kernel module).

Having said that: you can always physically remove the memory from the device, solder it on a USB stick's controller hardware, plug it into your machine and access it as a block device that way, but that is more a solution fit for Lifehacks then Ask Ubuntu.

Sorry to be the harbinger of bad news.


How to Install UpWork on Ubuntu 16.04 64bit?

If you have already downloaded the .deb file from Upwork website and have problems installing it with the Software Center try using the terminal command:

sudo dpkg -i upwork_amd64.deb


How to expose my FTP server to the world from behind NAT?

Solved with a pair of 3proxy.

backend 3proxy.cfg in my LAN:

auth iponly
# only allow connect to control or ephemeral ports on FTP server
allow * * ftp.company.org 21,30000-65535
socks -u

tunnel:

ssh@client.net -R 0.0.0.0:1080:localhost:1080

frontend 3proxy.cfg on client:

auth iponly
# allow host names that are resolvable only remotely
fakeresolve
allow *
# chain FTP proxy to parent Socks5 proxy with remote resolve
parent 1000 socks5+ 127.0.0.1 1080
ftppr -p2121


How to start a python file with Ubuntu Core 16 and Raspberry pi

I found a way that can't possible be the right way, but it does get you to the end result you want. If you follow this tutorial to create a snap and include python as a part plugin, it will install python as it install the local snap.

I created a hello world git repository, then did that procedure using my hello world repository as the source. The snap that was created was worthless, but it did install python!

Now which python returns /usr/bin/python and I can use it to run files I create locally.

Aside, I think the right way is to to install from source to use it in a development environment or install it as a plugin with your code as a snap for a production thing, as noted in the answer in the comments. But those ways seem harder than this cheater route.


Hadoop & Spark - why no Ubuntu packages?

There is repo that contain hadoop and spark packages for Ubuntu:
http://bigtop.apache.org
I believe it is not always up to latest shiny release - but newer than 2 years.

# curl http://www.apache.org/dist/bigtop/bigtop-1.0.0/repos/debian8/bigtop.list > /etc/apt/sources.list.d/bigtop.list
# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3A367EA0FA08B173
# aptitude update
# aptitude install spark-python

as of now, their packages are pretty old (hadoop 2.6.0, spark 1.3.1)


Unable to install Ubuntu 14.04 LTS on packard bell imedia S2185 with win 8 previously instlled

I was using universal-usb-installer-easy-as-1-2-3 to create the boot usb stick.

The default persistent storage on the app is 0MB. I increased it to 1.1GB and Ubuntu live booted off the USB device.


installing Ubuntu on an Alienware M17Xr 4 laptop

During install, I would switch the the Intel Graphics. Once you have it installed you can go back and install the drivers for the Nvidia card.


The package you need is called "gnome-session-fallback". Either you install it with the software center or you install it using the shell.
For the first you have to invoke the ubuntu software center from the left sidebar or from the dash and type "gnome session fallback" in the search. Then simply install it.

If you want to use the shell type

sudo apt-get install gnome-session-fallback

in your favourite terminal application.

After that you must reboot your system. Maybe a logout is enough. Over the password prompt is a little sign with the Ubuntu logo. If you click on it, you can choose the desktop environment for the next session. Then select "GNOME Fallback" and log in.

Have fun!


I want the date and time to be added in a text file whenever I open it

Simple.

#!/bin/bash
filetoedit="$1"
if [ "$(head -n 1 $filetoedit)" = ".LOG" ] ; then
    date >>$filetoedit
fi
vim "$filetoedit"

Put the above script in a file in your $PATH, make it executable and call your editor through it i.e. if you save it as open.sh, then open any file e.g. foo.txt for editing as :

open.sh foo.txt

You can adjust the date format (see man date), and change the editor used by replacing vim with your choice.

See "Where should I put my script so that I can run it by a direct command?"


How to rename multiple files like in Windows

Try to install pyRenamer from software center
https://apps.ubuntu.com/cat/applications/pyrenamer/


Configure Wireshark for PPPoE connection

Quit Wireshark, run the command sudo dpkg-reconfigure wireshark-common, and then start up Wireshark again.

Wireshark lists no interfaces, which means the problem may have nothing to do with PPPoE, and may have to do with Wireshark (or, rather, the dumpcap program it runs to do capturing) not having enough privileges to capture traffic.  Running Wireshark as root is An Extremely Bad Idea; the right way to give "minimum privileges" to Wireshark on Debian and on Debian derivatives such as Ubuntu is with the sudo dpkg-reconfigure wireshark-common command.

What you read on the official Wireshark website is talking about capturing PPP control traffic; you can capture data, such as IP traffic, on a PPP device, with tcpdump/Wireshark/etc..  I'm not sure the PPP daemon is even involved with PPPoE, so that may not apply.


Setting up SSL for MAAS 2.4 on Ubuntu 18.04 LTS

The following modules are needed in order for Apache SSL reverse proxy to work with MAAS (2.4):

ssl
rewrite
proxy
proxy_http
proxy_wstunnel

So the command is sudo a2enmod ssl rewrite proxy proxy_http proxy_wstunnel

Then restart  Apache sudo systemctl restart apache2

Note: Use a .crt file for the SSLCertificateFile directive as it may not work properly with .pem in DER format.


keyboard repeats some keys during fast type

Something I found useful was a wireless USB keyboard. The transmitter is inside a USB female connector so it's much much faster than say bluetooth would be. If you're going to get a new keyboard go wireless, because your ability to move around while working will likely help you relax and increase your productivity over just pure speed. It worked for me esp towards online gaming. Frankly I think your only other alternative is to chill out and type slowerr...


You don't need to build anything from source. Run in a terminal

sudo apt install xserver-xorg-hwe-16.04

and you will have the 1.19 xserver version.


udev script doesn't run in the background

RUN could be used only for short tasks.

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
You may use disown that will detach that previous process from the current shell.
#!/bin/bash

if [[ $ACTION == "add" ]]; then
    # I've tried many variations on this, none seem to work
    (su abe /bin/bash -c "/home/abe/Documents/Programs/USB\ Sync/usb-in.sh") & disown
fi

if [[ $ACTION == "remove" ]]; then
    /home/abe/Documents/Programs/USB\ Sync/usb-out.sh & disown
fi

It is similar case as Write files in usb when connect by /etc/udev/rules.d/ and may be you to look to this too https://askubuntu.com/a/635477/26246 by Fëamarto, nice recursive trick which wait till partition is mounted.

Update
udev changed much lately in these years. It is become part of systemd and more confined. Here are the current options:

Set udev rule to trigger a systemd service.
Set udev rule to run a script scheduling the job using at.
A user-space script (python/pyudev, etc) that watches for the target udev event.


ELAN Touchpad not working on Lenovo IdeaPad with Ubuntu 16.04

So, eventually I managed to get the touchpad working on Ubuntu 18.04, kernel version: 5.3.0-46-generic thanks to comments on this link:
https://www.reddit.com/r/linuxquestions/comments/f9h0q4/touchpad_issue_lenovo_s14515iil/
Basically what needs to be done is:

Open the file /etc/default/grub for editing, for example by running
sudoedit /etc/default/grub

Add to the line beginning GRUB_CMDLINE_LINUX_DEFAULT: "i8042.nopnp=1 pci=nocrs" so that it reads:
GRUB_CMDLINE_LINUX_DEFAULT="i8042.nopnp=1 pci=nocrs"

If other parameters are there between the double quotes, it may be OK to leave them.

Save the file and exit

Run this command to update the GRUB configuration:
sudo update-grub

Reboot


You can change the view Page Source configuration by following these steps:

Visit about:config in your Firefox web browser.
Paste view_source.editor.external into the search bar and change the value from false to true by double-clicking on it.
Paste view_source.editor.path into the search bar and right-click on the value to modify it. A dialogue box will appear. Set the path to your desired editor (/usr/bin/gedit for Gedit) and click OK.
Now use Ctrl+U or Page Source to open the editor.


Share Internet from laptop (connected to LAN) to Android using WIFI router

On Unity go to System settings> Network. You should see a 'use as hotspot' button. after you click that you will see your hotspot's network name and password


I used the wrong channel for my Nexus 4; How do I upgrade it, and what channel do I use?

Solution

Do I have to completely reflash my phone?

No. Once you have ubuntu on there, you can simply update.

Do I run the commands from phone, or computer?

Computer, with phone plugged in.

What command do I use?

Boot up phone up normally, and run this command from your computer:
adb reboot recovery
Wait until the phone gets into recovery mode, and run this command:
ubuntu-device-flash touch --channel=ubuntu-touch/rc/bq-aquaris.en

Possible Errors
$ubuntu-device-flash touch --channel=ubuntu-touch/rc/bq-aquaris.en
2015/10/04 09:01:21 Start pushing /home/akiva/.cache/ubuntuimages/ubuntu-touch/rc/bq-aquaris.en/mako/version-25.tar.xz to device
2015/10/04 09:01:21 error pushing:

This is because you are logged into the phone. You need to log into recovery mode with the command: adb reboot recovery
$ubuntu-device-flash touch --channel=ubuntu-touch/rc/bq-aquaris.en
2015/10/04 08:48:24 Expecting the device to expose an adb interface...
device cannot be detected over adb

You are probably in the Bootloader instead of recovery mode. You won't be able to connect to adb there. If not this, you could also try the command:
adb wait-for-device
and try plugging it in until it is noticed.


How to fix empty folders in an NFS export?

Any device mounted separately needs to have its own export entry. So if you have an export /exp and mount some devices on /exp/mnt1, /exp/mnt2, etc., then each of those directories need to be exported, and mounted on the client. So your /etc/exports will look like:

/data 192.168.2.0/24(rw,insecure,all_squash,anonuid=1000,anongid=100)
/data/video 192.168.2.0/24(rw,insecure,all_squash,anonuid=1000,anongid=100)

And you will have to add entries to the client /etc/fstab for both exports.
There's also a typo in your /etc/fstab, where /dev/sdc should be /dev/sdc1 (or whatever the partition actually is). Have a look at this Unix & Linux question for more information.


You can't boot the Ubuntu installation that is currently installed on the hard drive, so you have three alternative ways of accessing the data on the hard drive. They are listed in descending order of speed.

Install another Ubuntu OS as a dual boot on the same hard drive. Install TestDisk recovery application in the newly installed Ubuntu OS.
Buy an inexpensive external hard drive enclosure and mount the old hard drive in it.
Boot from an Ubuntu live USB, and install TestDisk on Ubuntu which is running from the USB  as a live session.

TestDisk is a good software to use for recovering files. TestDisk is relatively fast and usually does a good job. If TestDisk can't recover all the files, there are other recovery applications described in How to recover deleted files? that work more slowly than TestDisk and may do a more thorough job of recovering files that can't be recovered by TestDisk.


How to replace grub with bootloader "systemd-boot" in ubuntu 20.04?

after following https://blobfolio.com/2018/06/replace-grub2-with-systemd-boot-on-ubuntu-18-04/

# Everything in this tutorial should be done as root:
sudo -i

# Now hop on into the EFI partition root.
cd /boot/efi

# Configuration files will go here:
mkdir -p loader/entries

# And kernels will go here:
mkdir ubuntu

running following script
    #!/bin/bash
    #
    # This is a simple kernel hook to populate the systemd-boot entries
    # whenever kernels are added or removed.
    #

# The UUID of your disk.
UUID="CHANGEME"

# The LUKS volume slug you want to use, which will result in the
# partition being mounted to /dev/mapper/CHANGEME.
VOLUME="CHANGEME"

# Any rootflags you wish to set.
ROOTFLAGS="CHANGEME"

# Our kernels.
KERNELS=()
FIND="find /boot -maxdepth 1 -name 'vmlinuz-*' -type f -print0 | sort -rz"
while IFS= read -r -u3 -d $'\0' LINE; do
    KERNEL=$(basename "${LINE}")
    KERNELS+=("${KERNEL:8}")
done 3< <(eval "${FIND}")

# There has to be at least one kernel.
if [ ${#KERNELS[@]} -lt 1 ]; then
    echo -e "\e[2msystemd-boot\e[0m \e[1;31mNo kernels found.\e[0m"
    exit 1
fi

# Perform a nuclear clean to ensure everything is always in perfect
# sync.
rm /boot/efi/loader/entries/*.conf
rm -rf /boot/efi/ubuntu
mkdir /boot/efi/ubuntu

# Copy the latest kernel files to a consistent place so we can keep
# using the same loader configuration.
LATEST="${KERNELS[@]:0:1}"
echo -e "\e[2msystemd-boot\e[0m \e[1;32m${LATEST}\e[0m"
for FILE in config initrd.img System.map vmlinuz; do
    cp "/boot/${FILE}-${LATEST}" "/boot/efi/ubuntu/${FILE}"
    cat << EOF > /boot/efi/loader/entries/ubuntu.conf
title   Ubuntu GNOME
linux   /ubuntu/vmlinuz
initrd  /ubuntu/initrd.img
options cryptdevice=UUID=${UUID}:${VOLUME} root=/dev/mapper/${VOLUME} ro rootflags=${ROOTFLAGS}
EOF
done

# Copy any legacy kernels over too, but maintain their version-based
# names to avoid collisions.
if [ ${#KERNELS[@]} -gt 1 ]; then
    LEGACY=("${KERNELS[@]:1}")
    for VERSION in "${LEGACY[@]}"; do
        echo -e "\e[2msystemd-boot\e[0m \e[1;32m${VERSION}\e[0m"
        for FILE in config initrd.img System.map vmlinuz; do
            cp "/boot/${FILE}-${VERSION}" "/boot/efi/ubuntu/${FILE}-${VERSION}"
            cat << EOF > /boot/efi/loader/entries/ubuntu-${VERSION}.conf
title   Ubuntu GNOME ${VERSION}
linux   /ubuntu/vmlinuz-${VERSION}
initrd  /ubuntu/initrd.img-${VERSION}
options cryptdevice=UUID=${UUID}:${VOLUME} root=/dev/mapper/${VOLUME} ro rootflags=${ROOTFLAGS}
EOF
        done
    done
fi

# Success!
exit 0

ubuntu.conf

title   Ubuntu GNOME
linux   /ubuntu/vmlinuz
initrd  /ubuntu/initrd.img
options root=UUID=81c4bc1c-1a7e-4822-acae-220bbe572240 rw

to see UUID

ubuntu@ubuntu:~$ lsblk -f
NAME   FSTYPE   LABEL                  UUID                                 FSAVAIL FSUSE% MOUNTPOINT
loop0  squashfs                                                                   0   100% /rofs
loop1  squashfs                                                                   0   100% /snap/snapd/7264
loop2  squashfs                                                                   0   100% /snap/core18/1705
loop3  squashfs                                                                   0   100% /snap/gnome-3-34-1804/24
loop4  squashfs                                                                   0   100% /snap/gtk-common-themes/1
loop5  squashfs                                                                   0   100% /snap/snap-store/433
sda
├─sda1 vfat                            1A74-A270                             113.2M    61% /media/ubuntu/1A74-A270
├─sda2 swap                            10842320-1286-413f-bf08-3e0ca76bcf2f                [SWAP]
├─sda3 ext4                            81c4bc1c-1a7e-4822-acae-220bbe572240   87.6G    13% /media/ubuntu/81c4bc1c-1a
├─sda4
├─sda5 ntfs                            80D47B63D47B59FC
└─sda6 ntfs     router_data            4416017316016770
sdb    iso9660  Ubuntu 20.04 LTS amd64 2020-04-23-07-51-42-00
├─sdb1 iso9660  Ubuntu 20.04 LTS amd64 2020-04-23-07-51-42-00                     0   100% /cdrom
├─sdb2 vfat                            1AC3-20ED
└─sdb3 ext4     writable               b8474e17-164a-4fb3-94ff-d4e68f2e1548   25.7G     0% /var/crash
sr0

Actually Install systemd-boot
For most people, installation consists of a single command:

Again, this should go to the EFI partition:

bootctl install --path=/boot/efi

To verify the bootloaders installed on the system — and their order — run:

efibootmgr

reboot

once everything ok you can remove the existence of grub in your system

# Purge the packages.
apt-get purge grub*

# Purge any obsolete dependencies.
apt-get autoremove --purge


Startup disc creator not allowing any iso to be loaded

If the .iso file was downloaded as by root for some reason it could be unreadable by your regular account. You can open a terminal with Ctrl+Alt+T and enter the commandsudo chmod a+r the-image.iso to fix that.

I assume you are using usb-creator-gtk, the standard Ubuntu tool for this. I've had some trouble selecting the iso file I want with that program because of the small window available to select files. Let me suggest starting it from a terminal by using

usb-creator-gtk -i the-image.iso


How do I get 5.1 surround sound working on an Acer Aspire 5738ZG witk three 3.5mm jacks(front speakers, side speakers, Subwoofer and center speaker)?

You need to remove the ";" symbol from the begining of the line. Change the line:

; default-sample-channels = 6

to

default-sample-channels = 6

This should work.


Making the old encrypted /home partition (10.10) available to new install (12.04)

I checked the man page on ecrypt-recover-private and it has two optional arguments, one of which is --rw which allows you to read and write.


Slow Boot in Ubuntu 15.10 on Lenovo Y500

I don't think that a minute to a minute and a half are slow boot times, for example look at this where it shows boot times for computers, most are within the range you're experiencing.

If you would like the computer to boot faster, may I recommend purchasing an SSD drive to allow resources to load more quickly.

Good luck!


Dual screen not working with a Nvidia binary driver

This seems to be a problem with the nvidia binary driver and ubuntu 11.10.

To solve the problem open the 'terminal' application and run

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.back
gksudo nvidia-settings

Now enter your password and set your desired settings. Now do NOT press 'Apply' but instead press 'Save to X configuration file' and press 'Save'.

Now logout and log back in. The second monitor should now be working.

If this does not help, press 'CTRL+ALT+F1' log in and enter the following

sudo rm /etc/X11/xorg.conf
sudo cp /etc/X11/xorg.conf.back /etc/X11/xorg.conf

This will restore your settings.

Source: http://ubuntuforums.org/showpost.php?p=11359478&postcount=17


Can someone explain this rsync command for me?

To break this up into parts, there are two major sections, followed by a summary and notes:

The rsync command:
rsync -uva --delete /srv/bkp01 /srv/offbk2/
the output redirection done by the shell running the rsync command:
rsync-command > ~/offbkp01.log

rsync command:

Base command:

rsync - I assume this needs no explanation (but will provide if requested).

Command options:

-uva - A set of single character options, being (short then long form shown):

-u --update - Tells rsync that all modifications should only apply to files on the destination which are the same age (and different sizes) or older than the ones on the source.  That is, rsync should only pass on the changes from the source that would update the destination, but it should not make any changes that would make a destination file become an older version.

There are some exceptions.  Differences in type (e.g., one is a file, the other is a directory) will cause an update regardless of dates.  Symlinks and other special files ignore this option.  And, importantly, this does not affect which files get deleted.
-v --verbose - Increases the amount of information rsync prints out while executing.  Without this, rsync will print (almost?) nothing.  With this option as-is, rsync will tell you which files are being transferred, and put a summary at the end. More vs increase the information printed, although the man page says more than two vs should only be used when debugging.
-a --archive - This is equivalent to several other options (-rlptgD) packaged together.  As the long name suggests, it's a quick way to set many common options for archiving files and directories. It will:

-r --recursive - Tells rsync to copy directories recursively. Without this, or the more particular -d --dirs option, rsync would simply skip any directories it encountered (and tell you about it in its output).
-l --links - When the source is a symlink, create a symlink on the destination.  Depending on other options, symlinks may otherwise be skipped or made into a full separate copy (i.e., a true directory with contents (or another copy of the file) instead of the symlink).
-p --perms - Sets the permissions of the destination files to the same as the source files.
-t --times - Sets the modification times of the destination files to the same as the source files.  Since keeping these times in sync makes the rsync algorithm more efficient, you generally always want this to be used, explicitly or implicitly.
-g --group - Sets the group attribute of the destination to the same as the source.  Associates by name by default, but will fall back to group ID number in some circumstances.  If the receiving rsync is not run as super-user (or faking it with --fake-super), only groups that the user who invoked rsync on the receiving side is a member of can be set.  Otherwise, the group will just be set to the default group of the same user mentioned before.
-D - Equivalent to the options --devices and --specials together.  They mean:

--devices - Character and block device files are transferred.  Has no effect if the receiving rsync is not run as super-user (or faking it with --fake-super).
--specials - Special files (like sockets) are transferred (they otherwise would not be).

--delete - Tells rsync to delete files that are on the destination, but not on the source.  This is NOT affected by the update option set above (indeed, how could it be since most file-systems will not retain the needed data to see which action was newer?).  This option acts on the sources after wildcard/glob expansion, so dir/* is not the same as dir/.  Some important notes:

This is, obviously, dangerous. You should probably try it with the --dry-run option first, which will do a pretend transfer that allows you to make sure no unintended changes are made.
If there are any I/O (input/output) errors - that is, if anything goes wrong transferring, reading, or writing changes - delete will be ignored from that point on.  This can be overridden with the --ignore-errors option, though you probably don't/won't want to do that.
There are several variations on the delete algorithm, about which you can read more in the man page.  When the receiving rsync is version 3.0.0 or newer (as of the time of this writing) the --delete-during algorithm is used.  If the receiver is older, then --delete-before is used.  If it's important that the files maintain a certain sort of consistency should an error occur (such as not deleting anything until all other changes are made), you should use a more specific option than the default one.

Command locations:

/srv/bkp01 - The source file or directory.  There are some detailed rules on what it means if there is/isn't a slash on the end of the directory, and if the other directory exists.  You can see the USAGE section of the man page for the details, but here the lack of a trailing slash means this directory will be copied into the destination, rather than this directory's contents being copied into the destination.  Same if this is a file rather than a directory.
/srv/offbk2/ - The destination directory.  In general, this will always be the last item listed in the rsync command section unless an option is used to specify it elsewhere in the command.

Shell's output redirection:

Shell commands:

> - This redirects stdout (the standard output) from whatever is on the left to the file on the right, becoming its contents, and creating the file (if possible) if it does not already exist.  Some notes:

You can also redirect stderr (the standard error output) to the same file by adding 2>&1 to the very end of the command above.  Order is important, so be careful generalizing where to put that.  The magic number 1 refers to stdout, 2 refers to stderr, & is (essentially) "the address of", and the full command snippet means "redirect the output of stderr into the stdout stream".
If you want to append to the log file instead of replacing it, you can use >> instead.  The method to redirect stderr to the same place remains the same.
You can send stdout and stderr to different places by using 1> stdout_file 2> stderr_file.  You can also use >> instead of > in that command to do so by appending instead of replacing.

Shell variables / special symbols:

~ - This is shorthand for the current user's home directory, and forms part of the next bit.

Shell-level locations:

~/offbkp01.log - the file offbkp01.log inside the current user's home directory.  This is where the output of the rsync command will be put because of the redirection with >.

Summary:

In summary, this command will:

Copy all regular files, directories, symlinks, special files, and device files
as well as most, if not all, important file attributes,
from /srv/bkp01,
to /srv/offbk2/bkp01,
and it will delete anything in /srv/offbk2/ that is not in /srv/bkp01, with the following conditions:

If a regular file, directory, or symlink(?) has a modification time on /srv/offbk2/ that is newer than its modification time on /srv/bkp01, it will not be updated, if both items are still the same type (regular file, directory, or symlink(?)).

Additionally, rsync will print out some information about what it is doing (specifically, which files are being transferred, and a final summary), which the shell will write into the file ~/offbkp01.log.  That log file will be created anew if it does not already exist, and will be overwritten if it does already exist.

NB: --fake-super is an option used to cause rsync to simulate super-user activities.  It does this by using the files' extended attributes to store the attributes it could not set without having greater privileges.  The real version of each attribute is set to whatever makes sense given the options and the privileges available.  While this makes it convenient to make some backups even if you don't have super-user privileges, one should also note that it may pose a security risk greater than the use of rsync in general, as the real security attributes may not be set properly, even though the information about them was backed-up.

Source: lots of time working with rsync and reading its man-page.


Please make use of this to create a bootable USB for Ubuntu Desktop 14.04.3 LTS. Then follow the process to install Ubuntu. Rather than partitioning during the linux install one can very well partition it within Windows(if you are new to Linux) using Windows disk partition tool(under computer management). Make sure that you create some space for /boot on SSD and then install remaining Ubuntu Linux into the unused portion of your 1 TB hard drive. You can have both Ubuntu and Window on that 1 TB hard drive. You can very well use gparted to do partitioning in Linux if needed. Hope this helps.


ubuntu 14.04 / 64 bit stucks while using it

I see this at times too, but I usually don't restart the system, rather I just hit Ctrl+Alt+F1-F6 and move to the command line. Without doing a thing there, I return to unity desktop by hitting Ctrl+Alt+F7. This in most cases fixes the hang issue, and gets things working normal again.

If its still stuck its wiser to restart just unity and not the entire system. When stuck, hit Ctrl+Alt+F1, enter credentials and do:

sudo service lightdm restart.

This has saved me a couple of times. Though in the second method you anyways end up losing all opened docs and stuff, but at least you save yourself from rebooting the system.


From such behavior of this distro what I've understood that these Linux distros actually have built a bridge between root and user through some messeging protocol

No. Sudo is a program that can, given appropriate configuration, allow users to run programs as root.  There's no messaging protocol involved, really.

This is basically best practice. Run with least privileges needed, and elevate when you have to. Ubuntu does not have a root user enabled by default.

  and developers of these distros obviously have full control over my laptop via network socket, am I right?

No, you are not correct. There's no networking involved in sudo, and no remote capability. The developers does not have any control over your laptop. man sudo in a terminal will give you more information about sudo.

There's no reason to enable the root account. If you need a root shell, run sudo -i.

  If I'm right, how are these distros different from Windows or Mac in terms of security? Is there any workaround in KDE Neon to log in as root when it prompts to log in?

Linux and OS X is fundamentally different from Windows. Linux and OS X is rather different as well, but both owe a lot to Unix, so they have some similarities.

Anyway, Ubuntu, OS X and Microsoft Windows all have excellent security when patched and configured correctly.


Is using Ubuntu 10.10 still a viable option?

It would be better if you installed Ubuntu 10.04 because Canonical will support it with updates until April 2013. I myself hated Ubuntu 11.10 because of its glitches, but then i did a fresh install with 12.04 and I'm loving it so far.

Installing anything older then 10.04 is completely unnecessary because there is no support along with it. Also if you are a person who likes old versions so much and you wont mind using Ubuntu server edition, you can try Ubuntu 8.04 Server Edition. It will also be supported by Canonical until April 2013. Make your choice, and good luck.


After every kernel update I reinstall the Nvidia drivers and lose the Unity bar

I had the same issue (ubuntu 14.10 updated to latest kernel )recently  and lost all the menu/unity taskbar and what fixed for me was

export DISPLAY=:0
sudo dconf reset -f /org/compiz/
setsid unity

Original answer and more explanations you can seek this


indicator-keylock is in Ubuntu universe starting from 14.10.

For 10.04 to 12.04, you can use this PPA:

https://launchpad.net/~tsbarnes/+archive/indicator-keylock/+packages

There is also a PPA with daily builds containing packages for 12.10

https://launchpad.net/~tsbarnes/+archive/indicator-keylock-daily/+packages

To install it just do

ppa:tsbarnes/indicator-keylock  (Click here for instructions on using PPAs.)

sudo add-apt-repository ppa:tsbarnes/indicator-keylock && sudo apt-get update
sudo apt-get install indicator-keylock

or to install the daily build version (currently needed for Ubuntu 12.10 and later):

ppa:tsbarnes/indicator-keylock-daily  (Click here for instructions on using PPAs.)

sudo add-apt-repository ppa:tsbarnes/indicator-keylock-daily && sudo apt-get update
sudo apt-get install indicator-keylock


The debian/rules file is what drives the building process. It is in fact a Makefile, but it also allows you to also take advantage of various packaging helpers. So your rules file might look something like:

#!/usr/bin/make -f

%:
    dh $@

override_dh_auto_build:
    $(MAKE) -f path/to/first/Makefile
    $(MAKE) -f path/to/second/Makefile

To install the files to the right place, use a debian/install file. See this answer.

I suggest that you take a look at the Ubuntu Packaging Guide.


Start and stop parameters in init script

network-interface, network-manager and networking are other Upstart jobs and are defined in /etc/init/network-interface.conf, /etc/init/network-manager.conf and /etc/init/networking.conf.

Have a look at Upstart Intro, Cookbook and Best Practises if you want to learn more about Upstart.


You can install Remastersys in Ubuntu 12.04

As root - issue

'sudo su'

in the terminal window prior to the following command.

wget -O - http://www.remastersys.com/ubuntu/remastersys.gpg.key | apt-key add -

sudo gedit /etc/apt/sources.list

Add the following line

#Remastersys Precise
deb http://www.remastersys.com/ubuntu precise main

Now open the terminal and type

sudo apt-get update && sudo apt-get install remastersys remastersys-gui

Here is the screenshot

Source: http://www.remastersys.com/ubuntu.html


Lenovo ThinkPad Edge E430 Battery Problem

I turned the computer on using only the battery. Then it gives the message that it is critically low and don't boot. I did it again, but this time I entered the Bios. I waited there until the battery was completely discharged. Then I plugged the AC Adapter and booted normally. Now the battery is charging again.


A ppa repository is simply (approximately) a APT repository that is managed by launchpad server.

As an alternative, if you don't want to set up a launchpad server (that isn't easy), you could simply make an apt repository, that is more easy and permit you to distribute your packages privately.

You can see other questions about that in askubuntu - How to set up an apt repository.

And from that question, you can follow this guide on how to make a repository. See that you have two options, a simple (easy to follow but no so automatic for users) and an advanced (complex but easy to use for users).


Ubuntu is more than likely not the issue.  I have a Lenovo G580 running 14.04 and had the same issue.  I solved it by adding a Netgear usb wifi adapter.  Problem solved for my Lenovo.  The dropped connections occurred on both Windows and Ubuntu, before I added the Netgear adapter.

ADDITIONAL INFO

To check your reception quality you can create a script file running in a continuous loop.
The following script will yield, "Link quality" and "Signal level".  The signal level reads in a negative number mine shows "-36" on the lowest to "-50" highest.  Lowest number is best.  If you are reading -85 to -100 or more, this may be the source of your dropped connection.

You can run this test for yourself with the following script.

Open a terminal window Ctrl-alt-t.

touch  wlan0tst.sh
chmod ugo+x
gedit wlan0tst.sh

Enter the following lines in the gedit window.

#!/bin/bash

while :
do
    /sbin/iwconfig wlan0 | grep Link | tr '\n' '\r'
done

Save the file.  From the terminal.

./wlan0tst.sh

To terminate the loop "ctrl-c" or just close the Terminal window.


It's a bug

There is a ppa with patched GTK code that fixes the issue


Enable bluetooth Lenovo t430s kubuntu 14.04

Try following the instructions of the second post on this Ubuntu Forums thread


Currently, the multi-touch input for right click is not functional. You can however, right click with the aid of the Onboard keyboard. Simply open onboard, click the mouse pointer, and then the right leaning cursor, and the next click will be a right click.

Source: https://wiki.ubuntu.com/Nexus7/UsingTheDevice


Python ImportErrors while trying to get a program (found on Google Code) to work

py2exe can only run on windows so I don't know how you can get round that.  Maybe using wine.

you can get round the ImportError: No module named PyQt4.QtCore by installing python-qt4

sudo apt-get install python-qt4


I use FreeNX for this.

It has, in my opinion, the following advantages:

it is rather quick in the screen refresh and can be adapted to the type of network (56k modem, adsl, lan)
it can create a whole new session independent of what is shown on the server monitor


How can I limit disk access bandwidth for a Virtual Machine guest?

Starting from version 4.0 we are able to limit Virtual Box bandwith for acess to disk images (see Virtual Box Manual for details)

We need to create a bandwith group first (in the example below named "Limit" for 20 MB/s):

VBoxManage bandwidthctl "VM name" add Limit --type disk --limit 20M
VBoxManage storageattach "VM name" --storagectl "SATA" --port 0 --device 0 --type hdd
                                   --medium disk1.vdi --bandwidthgroup Limit
VBoxManage storageattach "VM name" --storagectl "SATA" --port 1 --device 0 --type hdd
                                   --medium disk2.vdi --bandwidthgroup Limit

If you get this error:

VBoxManage: error: Cannot register the hard disk '.../foo.vdi' {...} because a hard disk '.../foo.vdi' with UUID {...} already exists

then replace the path to the disk image with the UUID given in the error (both should be the same) including the {}

To further limit disk access to 10 MB/s we can then issue

VBoxManage bandwidthctl "VM name" set Limit --limit 10M

This can even be done during runtime.


sudo dd if=/path/to/downloaded.img of=/dev/rdiskN bs=1m

The problem is you need to replace N in the above.

From How to create a bootable USB stick on OS X: "Run diskutil unmountDisk /dev/diskN (replace N with the disk number from the last command; in the previous example, N would be 2)."


How to check from command line if audio file has any sound

You might like 'sox' for this

sox myaudio.mp3 stat | grep "Maximum amplitude"

I haven't tested it, since I am away from my Ubu-box.


Can't use nvidia card/driver on optimus notebook

There is no way you can turnoff intel and work with nvidia only because the images are transported through intel card. Aim of most projects in dual graphics card is to turn off nvidia gpu and use it when required using a special command.(like optirun).

Use the bumblebee project (its a fork from bumblebee project by Mrmee. The whole code was rewritten in C for more stability) to install and turn off nvidia card and use it when required.

Alternatively you can use the original package by MrMee - ironhide .But this is no longer maintained and it caused too many problem earlier for me.

I own a dell xps l502 , nvidia gt 540m with optimus. Its working extremely well in 12.04 beta (kernel 3.2.0-21). I got around 2.3 Hrs of battery life with wi-fi on. without bumblebee its 1hr

Linked Questions:

How well will Nvidia Optimus cards be supported in 12.04?

Is a NVIDIA GeForce with Optimus Technology supported by Ubuntu?


How do I create a valid shortcut for Eclipse?

You seem to have incomplete value in Exec key. Exec key require the executable name with its path but you provided only the path. According to Exec key - Desktop Entry Specification

The Exec key must contain a command line. A command line consists of an executable program optionally followed by one or more arguments. The executable program can either be specified with its full path or with the name of the executable only. If no full path is provided the executable is looked up in the $PATH environment variable used by the desktop environment. The name or path of the executable program may not contain the equal sign ("="). Arguments are separated by a space.

To validate the desktop entry, you can always use gtk-launch. To use, run:
gtk-launch desktopEntry.desktop

If you get
gtk-launch: no such application desktopEntry.desktop

you have errors either in Exec path or the desktop entry isn't in /usr/share/applications or ~/.local/share/applications.


Access terminal stdin when it's the source of the bash script itself

Use a process substitution

bash <(curl -Ls example.com/myscript.sh)


Ubuntu 15.04 with GPU tesla k20 and GT610 Graphics card

Open a terminal (Ctrl + Alt + T) and execute:

Tesla K20 :

sudo apt-get update
sudo apt-get install nvidia-346 nvidia-prime

GT610 :

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-352

Refer to this guide for more information.


Printing canceled "Bond Types Inquiry Lab" on MG2200-series, whenever I try to print

I figured it out. In frustration, I tried looking at the configuration available through the terminal command sudo system-config-printer. From there I right-clicked on "MG2200-series" and "Properties". I then noticed that in the "Make and Model" option was labeled "Gerneric text only printer".

I clicked on "Change..." next to the text and chose "Canon". After following and choosing the appropriate options, I clicked apply and all worked well.


Is it possible to keep nm-applet running between invocations of WM startup?

I always thought that if you put that information in your ~/.xsession then you do not get that problem, that way you start nm-applet before xMonad. I know that my nm-applet does not seem to restart when I restart xMonad. (I can paste my startup script here later if you want to take a look)


I circumvented the problem by changing the setting

media.autoplay.enabled to true

(in url: about:config)


I found a work around
http://ubuntuforums.org/showthread.php?t=2221765

It works fine but it is not integrated to the browser.
If you can download the ica launcher file (usually launch.ica) you can run with

./wifca.sh /path/to/launcher/launch.ica

You should run this in the folder where you have installed your ICAClient (in the link $home/ICAClient/linuxx86)


Why am I prompted to accept a Microsoft EULA when I run apt-get install?

Apt is displaying the license agreement for the package that you are installing. I'm guessing that either you are installing the msttcorefonts package or something that requires the installation of that package like wine, playonlinux, etc. Apt is doing a good thing here, making you aware and agree to the license that the software for this particular package is covered by.


Ubuntu Desktop corporate warning splash page

You could try with a zenity warning, something like this:

zenity --warning --title="corporate guidelines" --text="put your rules here"

Will output this:

I don't remember if zenity is installed by default, but it's just:

sudo apt-get install zenity

I'm sure you can improve this to make a little script where the user is loged in, and close the session if the user doesn't accept the guidelines. For that, you can use gnome-session-properties to call zenity directly, or to call an script that contains the warning.


It might not be the best way, but it worked for me.

It needs Crypto.Cipher module. I got it from synaptic  in python-crypto  package, installed and now it works.


Super key and auto hide the taskbar noy working

For your 2 question increase Reveal Sensitivity


i have installed ubuntu 14.04 but unable to update or install any third party software

If you have just installed the System run sudo apt-get update first.
In 14.04 libav is shipped instead of ffmpeg.
If you want to use ffmpeg download it here.


Yes if you install ubuntu along side of windows you can keep both. But this question is a duplicate.

Use this link:
https://help.ubuntu.com/community/WindowsDualBoot


Newly formatted linux filesystems default to their root directory being owned by root and only writable to the owner.  You can change the ownership to yourself if you want access with sudo chown yourname /path/to/drive.


Why isn't gnome color management having any effect at login?

I believe gnome-color-manager is not a part of natty by default, so, maybe you could ask or report the bug to their developers?


What command do I use to find physical disk size?

You can try lsblk.

That should list all disks including size. It will also list partitions and mount points.


Installing new SSD for storage shared among Ubuntu and Windows on dual boot PC

Since Ubuntu can easily and reliably access files on an NTFS volume, but Windows cannot reliably access files on an ext4 or other Linux partition, why not just make one NTFS partition for data on the second drive? You would not need to reinstall either Windows or Ubuntu.

When you attach the second drive, use Windows Disk Management to prepare the new drive, then reboot into Ubuntu and set up the drive to be automatically mounted in Ubuntu. as oldfred noted above.

You can even visit https://superuser.com and find out how to move your swap file, temp files, and page file to the second drive. That shifts some of the drive activity to the second drive and reduces Windows slowness some.


Is it possible to make all files in a dir be always created as symlinks to /dev/null or ignore all writes to them in other way?

This project allows creating such directories:

https://github.com/xrgtn/nullfs