Without parameter, a ping runs forever, but you can restrict it, to wait maximal 10 seconds and do just one ping this way:

ping -W10 -c1 askubuntu.com

to suppress the output, and issue your warning

ping -W10 -c1 askubuntu.com || warning.sh

to handle a list of domains

urls=(abc.de xy.org jkl.net)
for url in ${urls[@]} ;
do
   ping -W10 -c1 $url || warning.sh
   sleep 10
done

To pop up a warning, you need to either start the script by hand, or do some gymnastics with crontab - common errors there: call programs without path. Using x11-programs without specifying the DISPLAY.


I solved the problem by running this command:

~$ sudo apt install --reinstall libudev1

As the result:

~$ ls /lib/x86_64-linux-gnu/ -l | grep libudev
lrwxrwxrwx 1 root root      16 May  5 22:25 libudev.so.1 -> libudev.so.1.6.4
-rw-r--r-- 1 root root  126840 May  5 22:25 libudev.so.1.6.4


My bittorrent client doesn't load by default

The Transmission binary (or link to the binary) is probably located in /usr/bin with the name transmission-gtk.


You seem to be using a HTTP proxy. You can disable it -- see how here.

It might be worth the time to find out why you are using a proxy.


If you download the live CD installer and burn it to CD or install it to USB, it will allow you to boot the system and install Ubuntu regardless of the operating system initially installed thereupon.  There does not need to be any OS at all installed, in fact.

Download the live CD .iso here http://www.ubuntu.com/download


How can I test  an app in Unity without installing Ubuntu?

Running Unity in a VM is a current limitation. Installing it to a USB stick should work better for you:

How do I install Ubuntu to a USB key? (without using Startup Disk Creator)


How to configure an app to run on all desktop automatically

I don't use hangouts, so I can't comment on the specifics, but there are alternative ways to match windows in the "Special Window Settings" (in English). If you use the window's menu to access this dialogue, it should automatically populate these fields. You can try matching by window class or window role, if either has a generic enough match.

If the window in question doesn't have the window decorations for you to access the menu and window settings, you can still access the popup menu by pressing Alt+F3 by default.

If this doesn't work, then you might have changed the key binding. You can check the keybinding at System Settings > Common Appearance and Behaviour > Shortcuts and Gestures > Global Keyboard Shortcuts > KWin > Window Operations Menu.


I think it's likely you ended up on a TTY.

To return, just press Ctrl+Alt+F7 and you should be back to Ubuntu.


You should turn off UEFI secure boot when installing Ubuntu and turn on it later.

You can just mount on some partitions (/dev/sdaN) and check which partition contain Windows.

For partitioning for Ubuntu, execute GParted in your Terminal window and make partiton and some space for Ubuntu.


As the output suggests the script was converted to an upstart job. So the best option right now is to open the file /etc/init/rsyslog.conf. You'll find a line start on there. Change this to

start on runlevel [35]

and save the file.

The command initctl list shows a list of of all init jobs and initctl show-config rsyslog will print out the status of rsyslog.


AttributeError: 'tuple' object has no attribute 'translate'

This error indicates that value is a tuple, and not a string as you might expect. This indicates a problem with your application.

Here the problem is that fetchone() returns a one-tuple. You should change from this line:

value = results.fetchone()

to this (notice the comma after value):

value, = results.fetchone()

or this (not recommended):

value = results.fetchone()[0]

But why is fetchone() returning a tuple instead of a string? Because you can SELECT multiple columns. Consider for example the following SQL statement:

SELECT a, b, c FROM my_table;

In this case, fetchone() will return a three-tuple.

Writing value, = fetchone() you are telling Python that you are expecting a one-tuple and you want that single item placed into value. If you were expecting the three-tuple, you'd have used column_a, column_b, column_c = resulsts.fetchone().

This is the reason why you should prefer value, over fetchone()[0].

Bonus tip: I noticed you are using Python 3. In this case, you can write:

translation_table = dict.fromkeys(b'+-(),', None)

Speeding up your code and making it more clean.


Installing Ubuntu 15.04 with windows 8.1 problem

If you installed Ubuntu first and than Windows, Windows has overwritten grub bootloader, so it will go directly to Windows. When you are trying install Ubuntu and you get error grub-install/dev/sda it's probably caused because issues like EFI vs. Legacy installation. Try to use Ubuntu Live CD and install on Live CD https://help.ubuntu.com/community/Boot-Repair and try to repair boot loader, that is if you have not corrupt partitions yet.


Can I install on 2 separate storage devices?

Probably, yes, using LVM, that will allow you to create a logical volume that uses your two physical volumes.

https://help.ubuntu.com/community/Installation#LVM%20Installation%20Guides


I have the solution :

  sudo update-locale LANG=fr_FR.UTF-8 LC_NUMERIC=C

or by editing /etc/default/locale

  sudoedit /etc/default/locale

the line LC_NUMERIC=C must be added.

The problem comes from the fact that LANG=fr_FR.UTF-8 with Ubuntu 18.04 and that numbers are badly represented by some applications.


How to install -mysql -curl -gd -intl -pear -imagick -imap -mcrypt -memcache -ming -ps -pspell -recode -snmp -sqlite -tidy -xmlrpc -xsl on php7

You can search it by this command:

apt-cache search php7.0

After the search, you can install anything you need, for example:

apt-get install php7.0-mysql

If the first command isn't help, you need to run apt-get update as well.


Remove the printer from the window System - Printers.
Uninstall cndrvcups-capt and cndrvcups-common with Ubuntu Sofware Center.
Go to this page:
http://radu.cotescu.com/how-to-install-canon-lbp-printers-in-ubuntu/ (archived copy)
Find the link to download the script, unzip and run it.
The printer is not working.
The wrong way signal on the top of the screen tells us that something was wrong with the dependencies and that we have to type on the terminal:
sudo apt-get install -f cndrvcups-common

and
sudo apt-get install -f cndrvcups-capt

Dependencies are all right, but the printer is still silent.
Open the printer window and look at the properties: the URI is
ccp://localhost:59687.

Correct it in
ccp://localhost:59787.

The printer is still silent.
Type on the terminal
sudo /etc/init.d/ccpd status

The answer is one number, not two: too bad.
Type on the terminal
sudo /etc/init.d/ccpd restart

and then
sudo /etc/init.d/ccpd status

The answer is two numbers. OK.
Try printing the test page, no paper on the printer, the printer stops and does not restart.
We have to start the printer monitor at bootstrap.
On the system setting - startup applications
click the Add button
Name: Canon printing status monitor
Command: captstatusui -e -P LBP2900
Description: Hidden until an error occurs
The printer now is working properly.


How to access "/dev/mem" from unprivileged lxc container?

Accessing hardware or memory directly is always a privileged operation. What you can do: "virtualize" it by substituting your own driver for /dev/mem and implement whatever needed for that game, in isolated and secure way.


Chrome (?) hard crash - where do I start to diagnose?

In my case, installing unity-2d and using that as the desktop environment seems to have done the trick. I'll update this question if anything changes my view on that.


What Controls the System's Save Dialogue Box, and File Selector Dialogue Box?

I guess that you use some application that uses GTK as GUI library. (You can check that by running xprop in a terminal and then clicking on the save dialog)
Now what controls the save dialogs?
It's the GTK library. So it has nothing to do with your file manager.
Look at this screenshot that I took in Linux Mint:

Nautilus isn't even installed but you get that nautilus like looking dialog. It's only because nautilus and the GTK dialog are designed to look similar.
What can you change about the look of those save dialogs?
You can only change the theming AFAIK.


Xorg is merely the name for the project managing the suite of software for running an X11R6 server. Xorg is not part of the kernel though. It is a separate suite of libraries and applications, and can be built and run on not only the Linux kernel, but also runs on BSD, Darwin, Windows, and other platforms as well.


Have you installed the gnome tweaks tool?
$ sudo apt install gnome-tweak-tool

This offers more options when dealing with all mouse and touchpad related issues.
I have a Thinkpad T480, but I use the trackpoint, which is recognized by the system as a mouse instead of the touchpad. I just keep the touchpad disabled and haven't used it at all.
If you have that option, I would recommend doing that. Otherwise, I have seen other issues surrounding the P series and Ubuntu.
This thread may be of some assistance to you.
https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/1868474


Firefox Widevine plugin crashes immediately after upgrade to Ubuntu 16.10

Seems like to be a problem in firefox: In Firefox 50.0beta2 the plugin doesn't crash any more.


Help, I broke my desktop. How do I reset it?

I fixed the problem. After some more searching around I discovered Nautilus was removed from my system. I discovered this because I could not launch Nautilus from a terminal window (command not found).

After installing Nautilus using

sudo apt-get install nautilus

and doing a reboot everything worked again.

I have no idea how I managed to get Nautilus removed from my system.


127.0.0.53 is the address used by systemd-resolved.service

tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      1224/systemd-resolv
udp        0      0 127.0.0.53:53           0.0.0.0:*                           1224/systemd-resolv

Hostnames of other computers will not be resolved trough the DNS service.

You need to specify them in /etc/hosts statically.

Example:

127.0.0.1 localhost
127.0.1.1 mypc

192.168.1.100 ubuntudesktop

You can edit this file trough sudo

sudo editor /etc/hosts


Is there a gui application for managing multiple mice/keyboards?

9.04 only
Roland, regarding your query Its was very much possible using a tool called
gnome-device-setup

I used it myself on 9.04

You can see it in action
http://www.youtube.com/watch?v=nS06QjHlrwk&feature=related
Sadly, the links are broken
http://people.freedesktop.org/~whot/gnome-device-setup

This has been taken from http://who-t.blogspot.com/2008/07/gnome-device-setup.html


How to uninstall the vi text editor preinstalled in Ubuntu?

Try to remove vim-tiny in the terminal:

sudo apt-get remove vim.tiny


Firefox does not allow selection of URL bar autocomplete with mouse anymore

Turns out this was caused by an old/deprecated extension, Delicious Bookmarks, which apparently was left over in the profile folder I migrated. Disabled that, now everything works again. :-)


Enable Picture in Picture on Ubuntu
To get set up and enable a floating window on Ubuntu you will need to be running the GNOME Shell desktop:
apt:gnome-shell
You then need to install the Window Preview extension from the GNOME Extensions website:
https://extensions.gnome.org/extension/1227/window-corner-preview/
When installed and enabled you will see a small ‘monkey’ icon in the status area. Click on this monkey icon and set the in-menu toggle switch for window preview from ‘off’ to ‘on’.
Finally, select a window or workspace to preview.
To preview a YouTube video simply drag the tab out of your browser, move it to another workspace, and enter full-screen. Then switch to another workspace to continue working with the video on show.


How to install Cassandra on Ubuntu 16.04

Cassandra is written in Java, so it could be used with different distributions that have correct version of Java (Java 8 - oracle or openjdk).  If you're just starting, then you need to take latest released version: 3.11.3 (see this article for full instructions on setup) - add following source:

deb http://www.apache.org/dist/cassandra/debian 311x main

and then install cassandra package, plus you need to install Python 2.7 - that's standard python package.


This question is answered here. Remount root with read/write privileges.

Authentication token manipulation error


You can use KDE Plasma Widget (Plasmoids)
This is screenshot my desktop using Plasmoids

For catch that, just follow this steps

Install Plasma Desktop and dependencies

    sudo apt-get install plasma-desktop, plasma-scriptengine-python

Make launcher for launch the Plasma Desktop.

If you want to use it from startup just add it in "Startup Applications"

And then, make things look right. First enable GTK+ for Qt Application via :

  System Settings (for KDE) -> Appliaction Appearance -> Widget Style -> GTK+

Next, install Ambiance theme style for the Plasma

  System Settings (for KDE) -> Workspace Appearance -> Desktop Theme -> Get new theme

Finally, improve your new desktop with Unity+Plasma. For Launching and adding Widget, same like in KDE ^_^
If you want the Widget work in behind Desktop (like Dashboard in OSX)

And you will get like this in Ubuntu!!

Ok.. I get that things all from Install Plasma in Unity

I hope you look for like this


Install ffmpeg

sudo apt-get install ffmpeg

Convert files like this

ffmpeg -i input.wmv -s size output.mp4

Following size abbreviations are recognized (from man page)

   -s size
       Set frame size. The format is wxh (avserver default = 160x128, ffmpeg default = same as source).  The following abbreviations are recognized:

       sqcif
           128x96

       qcif
           176x144

       cif 352x288

       4cif
           704x576

       16cif
           1408x1152

       qqvga
           160x120

       qvga
           320x240

       vga 640x480

       svga
           800x600

       xga 1024x768

       uxga
           1600x1200

       qxga
           2048x1536

       sxga
           1280x1024

       qsxga
           2560x2048

       hsxga
           5120x4096

       wvga
           852x480

       wxga
           1366x768

       wsxga
           1600x1024

       wuxga
           1920x1200

       woxga
           2560x1600

       wqsxga
           3200x2048

       wquxga
           3840x2400

       whsxga
           6400x4096

       whuxga
           7680x4800

       cga 320x200

       ega 640x350

       hd480
           852x480

       hd720
           1280x720

       hd1080
           1920x1080


can't rearrange multiple rotated displays

I use ARandR (a front-end to XRandR) for this.  ARandR is independent of your graphical environment; it is not a part of GNOME but should work fine if you are running GNOME or whatever else.  (I prefer a minimalist setup and run Xfce.)

To enable a display that is not currently on, go to the Outputs menu, hover your mouse over the connection type, and check the Active box.

Once you have your desired layout, save it to a file (e.g. ~/.screenlayout/triple-head.sh).  You can set this to load automatically by making the file executable (chmod +x ~/.screenlayout/triple-head.sh) and then adding it to Startup Applications Preferences in your Control Center (the saved layout is the Command, the Name is what you see in the menus, and the Comment is a description of what this does).  In certain(?) circumstances, the configuration is loaded automatically upon launching your X session.

You can also switch between saved layouts in the same kind of manner; just execute the saved layout, perhaps with a keyboard shortcut or even a script to recognize the different monitors as they are plugged in.


Adding apt-get packages to a usb boot drive (and storing them on the drive)?

The majority of the time the dependencies are only needed at compile time, and not usually after the application is compiled. If there are libraries that it is looking for, and is not on the usb drive, and hang with me for this one I know it sounds crazy, but I create a replica of the directory structure for the install, and move the libraries into it. IE: /usr/local/{bin,include,lib,sbin,share} Depending on what you set the prefix of the application to be (./configure --prefix=$usbMountPoint/usr/local )or if your past that point, you can do the good old DESTDIR reference. (make install DESTDIR=$usbMountPoint )


bower install does nothing, not even throw an error

This work for me:

bower install --force

where the --force to install forcefully


According to the xorg-server package page, version 1.16 will be shipped in 14.10 Utopic.

I don't think it will be available in Trusty, you might encounter some dependency issue if you try to install it on Trusty.

However, it's still possible to upgrade it. Please refer to this article:
How to upgrade from xserver-xorg-lts-saucy to xserver-xorg-lts-trusty

It's similar, as you're trying to upgrade from trusty to utopic.

Another solution is to install 14.10.


Terminal opens on different manchine when trying to login from xrdp

I had to download xfce4-terminal to fix this problem.


Lubuntu 16.04 no audio after installing OSS

OSS is no longer supported by Ubuntu/Canonical. From the wiki page:

Canonical/Ubuntu has chosen to disable OSS support in their kernels and ignore any bugs filed against OSS4 packages. If you're considering using OSS4, you should probably use another Linux distro like Arch Linux.

In Lubuntu at the moment, there are problems with Firefox having no sound due to ALSA support being disabled by upstream, so until this is fixed, you would be safe completely removing OSS4 from your system and reinstalling PulseAudio.


how to prevent people from using ssh from a machine, but allow ssh in

The simplest way would be remove openssh-clients package. Second possibility is to block the outgoing traffic to port 22 as proposed in comments in iptables.

But none of that will solve the issue if the users want to ssh to different port or they will download/install/create ssh client binary in their home directory (which is probably writable for them).

Without clarifying what you really want, it is too broad to answer properly.


ERROR 1698 (28000): Access denied for user 'root'@'localhost' at Ubuntu 18.04

I found a solution at here link, by following this solution I have solved my problem.

Short steps are:

sudo mysql -u root
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'test';

Note: here test is a new password for the root user. Also, remember to run the command sudo service mysql restart after altering the user.


Startup Applications, as far as I know, adds a .desktop file to /etc/xdg/autostart/ directory. This directory is not exclusive to Ubuntu.  I run Fedora 20 on my other laptop, and it's the same method. Another way is to place a .desktop file into your ~/.config/autostart/ directory. Again , this is not exclusive to Ubuntu.

In both cases, though, the scripts/programs open on particular user login.

As for rc.local, it's part of System V init tools, and it can be specified to run on boot, specific runlevel, reboot, or shutdown. You can learn about it slightly more here and here


Have you considered looking into your BIOS settings? There is usually an "Intel VT" or "Virtualization" option that isn't enabled by default, even on many servers.


Additional source directories using Geany

As far as I know, we can specify additional libraries in the Project Properties (Project -> Properties) as shown in the picture


15.10 hangs on loading on Lenovo thinkpad tablet 2

This is missing functionaltiy in grub2 / ubuntu  for UEFI 32-bit BIOS

https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1341944

It might be a good idea to  copy  latest debian EFI loader to Ubuntu 15.10 64-bit boot , as the the last comment in the bug report suggests, and not the EFI loader which is mentioned in the instruction , as it refers to older 14.10 ubuntu installation .

Update -  the Atom processor  in this tablet does not support 64-bit instructions, so we must use 32-bit Ubuntu installer, which in turn not support UEFI at all.
So better to try multi-arch Debian instead, according to Intel blogs.

http://blogs.intel.com/evangelists/2015/08/11/update-on-ia32-uefi-and-linux-support/


After digging around for a while under System Settings > Software & Updates I remembered once upon a time that I disabled the install updates from the following sources because I got a little annoyed with the frequent interrupting pop-ups to upgrade. I prefer to manage my upgrades manually from apt on the terminal and I didn't want it to automatically upgrade me from 16.04 to 16.10 or some other release. What I didn't realize is that these checkboxes stripped the deb package sources from /etc/apt/sources.list so it would never fetch the package updates and always report my system was up-to-date. After checking those boxes and then running apt update and upgrade I was able to successfully install ldap-utils


Dual-boot. Windows 10 and Ubuntu 18.04 on different drives

Which system are you going to use the most? The NVMe drive is faster than the SSD.

If in UEFI settings, you can turn off (disable) a drive it will not matter which you install first, but be sure to install both in UEFI boot mode. My motherboard would only boot in UEFI mode with UEFI only and CSM/Legacy off. But different brands vary.

Shows installer with screen shots. Both BIOS purple accessibility screen & UEFI black grub menu screen

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

Microsoft so far has required vendors to allow users to turn UEFI Secure boot on/off.

If only installing Ubuntu with encryption it will use entire drive using LVM an advanced volume system.

https://wiki.ubuntu.com/Lvm


Which software use the package sessioninstaller?

The sessioninstaller package was removed from new releases of Debian in 2014 because nothing used it anymore. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=755504

The package was removed from new releases of Ubuntu after 19.10.


compile and run Android apps from the console

I had the same problem until I found a memory error. If you can't upgrade your memory here's what you can do:

Install dependencies:

sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev openjdk-6-jdk ant gcc-multilib g++-multilib
sudo apt-get install ia32-libs ## if applicable
sudo apt-get install ant1.7 ant-optional

Export paths:

Open .bashrc file using an editor. If you use VI then vi ~/.bashrc and add the following 2 lines in your .bashrc file.

JAVA_HOME=/usr/lib/jvm/jdk1.7.0_04/
export JAVA_HOME

Also, you can add these to compile from anywhere:

open: .profile

export PATH=$PATH:~/development/android-sdk-linux/tools
export PATH=$PATH:~/development/android-sdk-linux/platform-tools

if [ -d "$JAVA_HOME/bin" ] ; then
  PATH="$HOME/bin:$PATH"
fi

Configure the android simulator:

android avd

And you can setup your simulator there
Build:

ant debug

or

ant clean debug

You might need to run:

android update project --target <your build target> --path <path to LunarLander example>

if you get:

Buildfile: build.xml does not exist!
Build failed

Install the app:

adb install ./bin/app-debug.apk

Sources:

Updating A Project
Running On Emulator
http://developer.android.com/tools/building/building-cmdline.html


Can I run a command WITHIN another command?

You can try escaping the command like so

twidge update "$(date)"

Which will execute date and concatenate the output of the command into the twidge command.

According to the twidge help info

  You can also omit the status, in which case a single line will be read
  from stdin and taken as your update.  Example:

  date | twidge update

Just pipe the command to twidge via stdin.


I will (ab)use already answered question:
How do I install PHP 5.4.0?

You could use a ppa to stay up-to-date with php. I use :

https://launchpad.net/~ondrej/+archive/php5

It's now on 5.4. If you want use this ppa do this:

ppa:ondrej/php5  (Click here for instructions on using PPAs.)

sudo add-apt-repository ppa:ondrej/php5
sudo apt-get update
sudo apt-get upgrade

If you don't have add-apt-repository binary do the following:

sudo apt-get install python-software-properties

For more, see the already answered question mentioned in the top.


How to remove and reset everything about burg, grub and plymouth

When you remove a package, its configuration files usually stay behind. Use sudo apt-get purge <name-of-package> to remove configuration files along with the package.

This may still leave behind configuration files in your home directory, or files you created yourself. You may need to remove those files manually.


Help! I can't login after upgrading from 12.04 to 14.04

From command line

sudo apt-get update
sudo apt-get install --reinstall ubuntu-desktop
sudo apt-get install --reinstall unity


How can I run exe files in Dolphin on Kubuntu

When you right-click on the .exe file, you go to "Open with application with", then you select WINE.


The message

  " 53358740 str2entry: invalid value for attributeType objectClass #0
  (syntax 1.3.6.1.4.1.1466.115.121.1.38)"

seems to be essential to finding a solution to your problem.

I believe you have a malformed objectClass definition.
When ldap is installed it adds some default objectClass definitions to your ldap tree.
Possibly one of these have been corrupted or modified so it fails when attempting to add it.

Fix the objectClass

grep -R str2entry /etc/

should help you find the file

Or perhaps the simplest solution is to purge your ldap installation completely so that you start from scratch with your installation process.


Are default automatic created partitions too small? Ubuntu 17.04

These small partitions are boot partitions. As you can see they only use 4,4 Mebibyte or rather 152,2 MiB, around 500 MiB of size is totally fine for them.

So: No, the automatically created partitions are perfectly good the way they are.


There's an app for that! The newusers tool which is part of the passwd package is designed to batch create users:

DESCRIPTION
   The newusers command reads a file (or the standard input by default)
   and uses this information to update a set of existing users or to
   create new users. Each line is in the same format as the standard
   password file (see passwd(5)) with the exceptions explained below:

You will need to create a file with this format:

username:passwd:UID:GID:full name,room number,work phone,home phone,other:directory:shell

Many of these can be ignored and the default values will be used. You only need to specify the username and password. For example:

tom:password1:::::
danny:password2:::::

If I save that as users.txt and run this command:

sudo newusers < users.txt

The users are created:

$ grep -E 'tom|danny' /etc/passwd
tom:x:1005:1006:::
danny:x:1006:1007:::


Blinking moon of death since SSD upgrade on standby

It seems like this solution is working:

install uswsusp using: sudo apt-get install uswsusp
start standby using sudo s2ram -f -a 1

Solution found here (similar problem): https://unix.stackexchange.com/questions/94735/linuxmint15-suspend-to-ram-not-working

Disk encryption is also in use here, so perhaps this is the crucial thing.

I am interested in making this my default suspend application on all shortcuts (closing the lid, fn + f4 etc) - still searching on a solution for this one (the /etc/pm/config.d/anything-stuff doesn't work)

edit: even this solution won't work in any case :-( I am frustrated.


Try removing the lock file and run.

To remove the lock:
sudo rm /var/lib/dpkg/lock

Then run sudo dpkg --configure -a


In the old days, you used to press Ctrl+Alt+F1 to display the /dev/tty0 "terminal" which was the same as /dev/console. Nowadays, there seems to be no method to display the contents of /dev/console. The closest I have found is to run the xconsole command. Note that this command will not "switch" to /dev/console; it will only display data sent to /dev/console.
After the xconsole window is started (using sudo xconsole command), any data send to /dev/console will be displayed by it. For example, after the following command is run by root user:
# echo "This is a text sent to /dev/console" >/dev/console

the text

This is a text sent to /dev/console

will be dislayed on the xconsole window.


Server 11.10 to be used as a DHCP server

The answers to your querstions:

It is possible to have two ip addresses on the same interface, and
use dhcp-server with it. You will have to install the DHCP server using the command: sudo apt-get install dhcp3-server then configure using the steps given here: https://help.ubuntu.com/community/dhcp3-server.
It will have no practical impact on your internet speed, as you're on a small home network.

Also note that you will have to set the routes and ip addresses for your ethernet interface using the network manager, or using the ip command. Hope this solves your query.


It's in Menu -> Preference -> Software & Updates in 13.10.

Though I never use that option anymore.  I've had problems with "additional drivers" because it doesn't resolve dependencies properly

Now I just find the name for the package it would install and install it myself using the terminal or synaptic.


Installing openJDK along with java oracle

openjdk-7-jdk is a installable package. There is no problem with a parallel installation.

sudo apt-get install openjdk-7-jdk

And maybe you should install Oracle Java via PPA:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer


Unable to connect to Canon scanner. Trying from 'sudo simple scan'

Use gscan2pdf instead downloaded from the Ubuntu Software Centre.


San Disk Cruzer Glide 32 GB and 8Gb can't be copied to.

Try the following command in terminal,to copy files from source to destination,

sudo cp -Ri /path/to/source/folder1 /path/to/destination/folder2/

folder1-   folder consists of files in which you are going to copy
folder2-  folder where you are going to paste folder1


Error while update package lists via apt-get update

Had the same issue, but had to combine things from above.

Step 1: Remove Opera

sudo apt-get purge opera-stable

Step 2:

sudo apt-get update
sudo apt-get clean
sudo apt-get update
sudo apt-get upgrade

Step 3: Install Opera

sudo apt-get install opera-stable


The problem is purely related to DNS. As there was no DNS nameserver entries in the /etc/resolv.conf file so the name resolution was failing while pinging by hostname to hosts outside your /etc/hosts entries.

In Ubuntu 12.04 the Network Manager package provides the network related functionality (rather than the old networking program), with the resolvconf (and dnsmasq to some extent) program providing the mass DNS functionality. But surprisingly in your case the resolvconf is not installed so we have to manually update the /etc/resolv.conf file.

So by running the command

  echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf

we are basically setting the Google's free DNS server (8.8.8.8) as the nameserver.

This command will insert the text "nameserver 8.8.8.8" into the "/etc/resolv.conf" file and display the text on the screen too. In this way we have a working name resolver that will resolve the hostnames we give into IP addresses.

One very important thing to note here, we are using google's DNS which is not ideal, you should use your ISP's DNS here. Ask your ISP to give you their DNS address (can be multiple) and add the address as the nameserver. Although you can keep the Google's DNS as the backup in case your ISP's one fails for some reason. Let's assume that your ISP's DNS is vv.xx.yy.zz , so you need to run the following commands to make it as the primary DNS and keeping the Google's DNS as a backup.

echo "nameserver vv.xx.yy.zz" | sudo tee /etc/resolv.conf && echo -e "nameserver 8.8.8.8" "\nnameserver 8.8.4.4" | sudo tee -a /etc/resolv.conf

See the -a switch in tee command, that is used to append rather than overwrite. Here 8.8.4.4 is also Google's DNS.

You can add as many nameservers as you want in /etc/resolv.conf but that would be overkill. Just keep it simple yet compact.


Windows Subsystem for Linux desktop shortcut to GUI

Why didn't I think of that?
This is one of those solutions where you look at it and think "Why didn't I think of that?". Unfortunately I had to look at many websites with wrong suggestions or over-kill such as "how to use regedit to run shortcut as admin".
Having the right parameters
Right click on your Windows 10 desktop and setup your shortcut to look like this:

The full line for the Target field should look like this:
C:\Windows\System32\bash.exe -c "cd && DISPLAY=:0 /mnt/e/bin/lock-screen-timer"

NOTE: Most users will use /mnt/c/.... as their path but I'm dual-booting and the same script is shared by WSL and Ubuntu 16.04 so must be on a separate NTFS partition I've called /mnt/e. WSL cannot write to a Linux ext4 drive and Linux nor Windows Apps can write to a WSL sub-directory. It's complicated...
Also note the DISPLAY=:0 parameter accommodates calling a bash GUI script but the same is likely true if calling gedit or nautilus which are my next desktop shortcut projects. If not, I'll revise this answer..
Click the Change Icon button to get a default list of icons to choose from. This is where the clock icon came from.


Cannot download the metalink and therefore the ISO

There is no Wubi anymore for 13.10 and will not be for future versions.

Also, Wubi it was not used to install Ubuntu to replace Windows, but to coexist for people that want to test and not alter their partiction scheme / filesystems.

You need to boot the normal installation/live version and choose to remove Windows and install Ubuntu (it will be one of the choices).

To install Ubuntu (the way you mentioned and the official way) please download Ubuntu from the official link, burn it on a DVD or make an USB stick with Pen Drive as the official docs recommend for USB install.

Reboot your computer and start from DVD/USB and follow the install procedure which is only a few simple questions asked.

Also the documentation has everything covered about the installation, it's not useful to reproduce them on other sites. Ubuntu Desktop Installation Documentation.


What is the best practice of customizing the Bash prompt (aka the PS1 environment variable)?

According to the following HOWTO, your .bashrc is actually the best place to tweak $PS1:

  the PS1 string should be set in .bashrc. this is because non-interactive bashes go out of their way to unset PS1. the bash man
  page tells how the presence or absence of PS1 is a good way of knowing
  whether one is in an interactive vs non-interactive (ie script) bash
  session.

  [...]

  therefore it should be stressed that PS1=..blah.. should be in .bashrc and not .profile.

Source: http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/setps.html


I ended up downloading apache2 from archives.  Did not know you could do that.  I felt like I was missing some file but could be wrong.  I also needed to change the permissions on /etc/network/interfaces to 666 and was able to get it working.


Ubuntu base 18.04 network doesn't work until you type dhclient

If it works perfectly well as long as you run dhcclient maybe you should just add that to the startup applications?

just type "startup" into the dash and gui allowing you to specify programs should be the first suggestion, then you can simply add dhcclient.


Shortcut to display the preview of all workspaces in unity

Use Super+S. You can find (and change) the shortcut using the CompizConfig Settings Manager (ccsm), under Desktop > Expo > Expo Key.


Disabling mouse movement from left joystick on PS3 controller?

So many people have had this issue and I finally figure it out!

Type xinput into a terminal and find the id for the controller
Type xinput disable ID into the terminal, but replace ID with the actual ID

The controller will no longer control the mouse cursor, but should work just fine for normal usage. I have only tested this method with Steam, but it worked fine there and I have no reason to believe it would be any different elsewhere.


Why is useradd -p option not recommended?

Will be visible by users listing the processes?

When someone on another terminal can do a
ps -ef

it will show the password.

Plus, if all that'll be visible is the encrypted password, why should I care?

Simple: we do not compromise when it concerns basic security.
On a single user system the problem is minute. Or even less. But it is good practice: Linux is a multi user system. What you do on your own system is not good when you do it on a system with more users... it is just plain bad.

why should I care

That is asking for opinions. You decided on that. As mentioned in the text: it is not -recommended-. Even the person that wrote that line does not care if you do use it. Otherwise you would not be able to use -p as an option. The same with mysql: it is not recommended to use -p{password} and those maintainers have actually been removing that option. Same will happen here: a couple of releases you get this as a warning and at some moment in time the option is actually disabled and then removed.


Can I restore a /Home from a 32 bit 11.10 backup to a new 64 bit 12.04 install

You should be fine in most regards. The configuration files stored in your ~/ directory are mostly bit-width independent. They generally store settings related to programs that don't deal with that level of detail.

If you have compiled any programs of your own under ~/ then you'd have to recompile them for 64-bit (if you wanted to use larger bit-width, that is)


You can upgrade relatively painlessly to Aisleriot 3.16.2 by following these steps:

Activate Sources:

You need to allow Trusty to retrieve the development files used to build the newer version of Aisleriot. Follow this train:

Dash > Software & Updates > Ubuntu Software > Downloadable from The Internet > Source Code

Click on the 'Source Code' check box to activate it and then close the 'Software & Updates' box; you will be prompted to reload your Software Sources, allow this to happen.

Then open a Terminal screen and run the following:

sudo apt-get build-dep aisleriot

This will download about 40 mb or so of development files.

Build Aisleriot:

Copy and paste the entire following code box into a Terminal screen and a semi-automated download, compile and install will take place:

sudo apt-get install checkinstall && \
mkdir -v $HOME/Desktop/aisleriot_build && cd $HOME/Desktop/aisleriot_build && \
wget https://download.gnome.org/sources/aisleriot/3.16/aisleriot-3.16.2.tar.xz && \
tar xvf aisleriot-3.16.2.tar.xz && cd aisleriot-3.16.2 && \
./configure && make && \
sudo checkinstall --pakdir "$HOME/Desktop/aisleriot_build" \
     --backup=no --deldoc=yes --pkgname aisleriot --pkgversion 3.16.2 \
     --fstrans=no --deldesc=yes --delspec=yes --default

I found when I built this that I had to log out and back in for Dash to find Aisleriot and then all was well.

A bonus of using checkinstall in this way is that the Aisleriot package is integrated into the Ubuntu package management system. Not as good as a formal Debian package but perfectly good for our purposes...

Cleaning Up:

If you would like to remove the build directory $HOME/Desktop/aisleriot_build simply delete it from your Desktop, it is no longer required...

Play the game:

Well, it is running fine here:

Hopefully running well on your system too :)


could not find PyAudio, check installation

The message tells you Could not find PyAudio; check installation

This list of command in your "tutorial" is wrong, you first install libraries, then compile python module:

git clone http://people.csail.mit.edu/hubert/git/pyaudio.git
cd pyaudio
sudo python setup.py install
sudo apt-get installl libportaudio-dev
sudo apt-get install python-dev
sudo apt-get install libportaudio0 libportaudio2 libportaudiocpp0 portaudio19-dev
sudo pip3 install SpeechRecognition

The correct sequence is:

sudo apt-get install libportaudio-dev
sudo apt-get install python-dev
sudo apt-get install libportaudio0 libportaudio2 libportaudiocpp0 portaudio19-dev
git clone http://people.csail.mit.edu/hubert/git/pyaudio.git
cd pyaudio
sudo python setup.py install
sudo pip3 install SpeechRecognition

The error is mostly caused by errors in the step sudo python setup.py install, which is supposed to install pyaudio. You need to repeat this step. You need to analyze and report errors occurring on this step first before proceeding further.


That is an existing bug: Wubi fails to detect 12.04.2 and 13.04 AMD64 ISO. There is no workaround other than waiting for my patch to be accepted - basically you cannot install a 64-bit version of Ubuntu using Wubi with the ISO (online or offline).

If you run wubi.exe 12.04.2 standalone (no ISO) it will work by downloading the disk image or if you download the disk image yourself you can then install it offline provided you pass the --dimagepath=<path to disk image> argument to wubi.exe as described here


Why does my program not execute a perl file

As the module is called PDF::API2, PDF will be a directory searched by Perl under one of the directories contained in @INC.

In other words and considering the information you give, if you have /home/lib-11/Downloads/mirdeep2/lib/PDF in your @INC, it will search the PDF directory ( and possibly a PDF.pm module file) below this directory.

You have to remove the PDF part from your path and it should find your library:

/home/lib-11/Downloads/mirdeep2/lib/


Can I continue working when backup is in progress?

While this is possible, I would certainly not recommend doing so. The most important reasons is that you're creating an inconsistent backup on two levels:

Volume inconsistency
File inconsistency

The only viable solutions to this are:

Use snapshots. This can be achieved using LVM or a newer generation filesystem such as BtrFS. This will snapshot the whole volume as if you were taking a picture of it. Changes/writes are still possible, but the backup process is being run from the read-only snapshot taken earlier.
Mount the filesystem as read-only and backup from there. Important downside: you won't be able to run your system during the time your root filesystem is being mounted read-only.

Volume inconsistency

The volume on itself consists of the thousands of files which are in the process of being copied while you are still writing to it. Some application will get confused if the state of the individual files are inconsistent.

Let's say an application stores the preferences in ~/.config/appname/theprefs.xml and the contents refer to an external file somewhere else on the system, let's say ~/Pictures/myface.png. If the preferences settings file is being backed up after the folder ~/Pictures is, then the backup might not work after you need to restore it some day later.

File inconsistency

Similar to how individual files can be in an inconsistent state, so can files in itself be as well. The contents of the file may change while you are taking the backup. Rsync and most other tools used under water for backup applications such as Deja Dup will not lock the file for reading. See also: How does rsync behave for concurrent file access?.

This may lead to disastrous results as the whole structure of the file could be corrupted. The chance of this actually happening depends mostly on the size of the file and the amount of write operations being performed on it.

Examples on what not to do.

Copy or back up...

a virtual machine disk image while the machine is running.
database files (e.g. MySQL /var/lib/mysql) while the tables aren't read-locked. (For this example fancy tools like the Percona Toolkit solve this for you.)


From the Ubuntu Forums

Step 1:- Install NDISWrapper and Blacklist Native Driver

echo -e 'blacklist rtl8190\nblacklist wl' | sudo tee -a /etc/modprobe.d/blacklist
sudo apt-get install ndiswrapper-utils-1.9
mkdir ~/rtl8190; cd ~/rtl8190

Note bodhi.zazen - You probably need to reboot after blacklisting wl ;)

Step 2: Copy (the windows drivers) "rtl8190p.sys" and "net8190.inf" to ~/rtl8190

Step 3: Configure NDISWrapper (and WPA Supplicant)

sudo ndiswrapper -i net8190.inf
ndiswrapper -l
sudo depmod -a
sudo modprobe ndiswrapper
sudo cp /etc/network/interfaces /etc/network/interfaces.orig
echo -e 'auto lo\niface lo inet loopback\n' | sudo tee /etc/network/interfaces
sudo ndiswrapper -m
echo 'ndiswrapper' | sudo tee -a /etc/modules
echo 'ENABLED=0' | sudo tee -a /etc/default/wpasupplicant


Is there a way to improve Super+ reliability?

Simply holding down the Super key until the numbers show up on the icons as shown below works fine under Ubuntu 14.04:

Another possibility is that you may have modifications that are impacting the speed at which the number choices appear when you hold down the Super key. These can be reset to defaults. dconf reset -f /org/compiz/&&setsid unity Or more drastically as a last resort reset all your dconf settings back to defaults with mv .config/dconf/user .config/dconf/user.bak&&sudo reboot

the Super key is used for several things (bringing in the launcher if it's hidden, opening the dash, bringing up the keyboard shortcuts, and in combination with other keys a long list of functionality and so this is almost certainly a timing play.


How can I start a program minimised, and restore maximised?

You can achieve a minimized maximized window using Python:

import wnck
import gtk
import subprocess
import time

chrome = subprocess.Popen(["google-chrome"])

b = True
while b:
    screen = wnck.screen_get_default()
    while gtk.events_pending():
        gtk.main_iteration()
    windows = screen.get_windows()
    for w in windows:
        if w.get_pid() == chrome.pid:
            w.maximize()
            w.minimize()
            b = False
    time.sleep(1)

chrome.wait()

google-chrome in this case will maximize then minimize. After this you just create a .desktop that can launch the script like the example shown below:

[Desktop Entry]
Version=1.0
Type=Application
Name=Application Name
Comment=Application Comment
Exec=python /exact/path/to/python/script.py
Icon=icon
Categories=valid categories;

Make sure to set the desktop as a executable file or it will not function.

The script should be edited on line 6 where google-chrome should be replaced with whatever command you wish to execute. If the program have parameters they can be passed as following: "google-chrome", "para1", "para2".

Cred to this question for the python script (changed to chrome in my testing).


I think that this thread may help you. I don't know if this will re-detect your display but at least it will restore the config files to default.


How can I select a certain version of Java?

Use this command:

$ sudo update-alternatives --config java

You'll get a result similar to:

There are 3 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                            Priority   Status
------------------------------------------------------------
* 0            /usr/lib/jvm/java-8-oracle/jre/bin/java          1093      auto mode
  1            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081      manual mode
  2            /usr/lib/jvm/java-8-oracle/jre/bin/java          1093      manual mode
  3            /usr/lib/jvm/java-9-openjdk-amd64/bin/java       1091      manual mode

Answer the prompt for the version you wish to run.

You can remove the versions that don't work then ensure a good install of the one you want to use:

Look at: Problem changing Java version using alternatives

The user in the accepted answer in the link resolved this problem by removing ALL the installed java versions and installing the ones he wanted to use.  After this the `sudo update-alternatives --config java` command worked.

After you have removed the problem versions, you can install the version you want to run with:

$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo install oracle-jdk7-installer


Upgraded Ubuntu 15.04 and its going into login loop after that

Try accessing the recovery options from the grub menu.

First, choose the "with networking" option. Then, choose the option to fix broken packages. This should mount the drive in read write mode. Then, choose a root prompt and execute the following command:

do-release-upgrade


I don't know if it build correctly, but I was able to build TAUCS 2.2 on 32-bit Ubuntu 12.04 using gfortran as follows

Download the Version 2.2 of the code, with external libraries, tgz format

wget http://www.tau.ac.il/~stoledo/taucs/2.2/taucs_full.tgz

Unpack it in your chosen location

mkdir taucs_full

tar xvf taucs_full.tgz -C taucs_full

cd taucs_full

If you didn't already do so, install libf2c2-dev (for libf2c)

sudo apt-get install libf2c2-dev
Remove the -Werror flag from the global compiler options file (there are going to be warnings, so it will never build if we treat them as errors)

sed -i 's/-Werror//g' config/linux.mk

Now run the configure script

./configure

Finally we need to  do some command and library wrangling for the actual make

make "CC=gcc" "FC=gfortran -ff2c" "LIBF77=-Wl,-Bdynamic -lgfortran"

You should get a binary executable in ./bin/linux - I don't have any means to test it functionally but it at least runs:

$ bin/linux/taucs_run
taucs_run: there is no matrix!


What is the name of the package that allows you to connect to a windows machine over RDP (Remote Desktop Protocol)

The package is rdesktop, you need to run it from the terminal "rdesktop remote_hostname". If you need a GUI install gnome-rdp .


In Ubuntu 14.04 you can find your wifi password in the file:

sudo cat /etc/NetworkManager/system-connections/YOUR-SSID

Under the [802-11-wireless-security] section:

key-mgmt=TYPE
psk=YOUR_wifi_PASSWORD

reference: post #4 by
thefasterblueone


What is the difference between the -f and -l options of secure-delete srm?

-f fast (and insecure mode): no /dev/urandom, no synchronize mode.

  -l lessens the security. Only two passes are written: one mode with 0xff and a final mode random values.Ubuntu Manuals


ufw iptables-nat module not found after update to linux-images-5.8.0-12-generic Ubuntu 20.04

I've built the kernel by myself. They excluded iptables modules from their builds due to the migration on nft firewall subsytem. Mine libvirt setup doesn't support nftables yet, so i decided to add modules and rebuild 5.8 kernel, now it's ok.


Problem with game-data-packager and Quake 2 mission packs

After further flailing about, it looks like running game-data-packager isn't required for the mission packs, at least in my setup. I copied the mission pack folders to usr/share/games/quake2.  Then they run just fine if you issue quake2 +set game [mission-pack].

I'm still a bit perplexed why game-data-packager has these options for the mission packs if they aren't needed, but perhaps my config is nonstandard (i.e. I am able to copy the data over directly from a Windows installation.)


Can't install correct graphics driver - Intel Integrated HD Graphics

Your CPU is Westmere architecture and not SandyBridge and does not support OpenGL 3.0.

There are no additional drivers you need to install for this GPU with Ubuntu. The drivers included in Ubuntu provide full support.


How to permute various icons in indicator-applet?

check this out if this may help you.
ubuntu4beginners.blogspot.com/2011/06/re-arrange-appindicators-in-ubuntu.html


sudo apt-get install indicator-datetime indicator-messages indicator-power indicator-session

or

sudo apt-get install --reinstall indicator-datetime indicator-messages indicator-power indicator-session

or

sudo dpkg-reconfigure indicator-datetime indicator-messages indicator-power indicator-session

If none of these solve it then please provide more information.


I don't think there is a way to reboot a system without sudo or physical access. However, I think you can reboot from a GUI. If you are using x11 on the server, first enable x11 forwarding in your ssh config file. Then you can follow this guide on your windows machine and it should work. You might need to install the xauth package so that might be a problem if you don't have sudo access.


Asus K52F laptop web camera shows upside-down picture in Skype

Quoting Hans de Goede:

  Hi,

  Try using the latest libv4l which has a (constantly updated) list of know to have an upside down webcam laptop models. Installation instructions are here:
  http://radu.cotescu.com/2009/11/05/flipped-images-ubuntu-webcam/

  If that does not work your laptop model is not in the list of libv4l, please do (as root):

lsusb > lsusb.log
dmidecode > dmi.log

  And send me <hdegoede@redhat.com>, a mail with the 2 generated files attached. Do NOT copy and paste them I need them 100% unmodified.

  I'll then add your laptop to libv4l's upside down table and get back to you with testing instructions.

  Regards,

  Hans

You can see here, that your laptop model has been added to the the latest version of libv4l.

Now you either need to test it (instructions in above link), or wait for Ubuntu to update that package (which, I guess, won't happen for Ubuntu 10.10).


Ubuntu 16.04 LTS crashes when I click on the launcher icon for a window that is already open

Install compizconfig-settings-manager and run it
Change the settings as follows:

General → OpenGL → Texture Filter = Fast
Sync To Vblank = uncheck
Effects &rightarr; Animations = uncheck
Effects → Fading Windows = uncheck

Reboot

Hope this helps.
(Sorry for the raw text as writing on phone.)


This sed command will return anything (.*) from the beginning of the line (^), until and including the first occurence of false excluding the rest (.*$).

sed -r 's/^(.*\<false\>).*$/\1/'


Enabling window decorations made me disable unity plugin. No borders

Open a Virtual Console. Ctrl+Alt+F1 to open it.

rm ~/.gconf ~/.gconfd ~/.metacity ~/.compiz-1 ~/.config/compiz-1 ~/.config/dconf -rf

And then reboot. It will remove all the settings and start Ubuntu in vanilla state.


lsb_release is a Python script that simply reads from the file /etc/lsb-release and dumps output to the screen. You can edit the file using:

sudo -H gedit /etc/lsb-release

Then change the contents to suit your platform. Mine contains:

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.5 LTS"


How do I get past the EULA screen in the terminal when trying to install Pipelight?

Use Tab and Enter to accept the EULA agreement.


Can you make a bootable recovery partition for Ubuntu?

There is a wiki page about this and it is old. No progress on it since 2009.
On brainstorm people have strong opposing opinions about this. Look at the related topics and you can see it is asked alot but there is also alot of discussion about why we would (not) need it.

Basically the anwser is... no, because there are better ways. Or more like ways Unix/Linux users have been using for years and years.

Besides regular backups of home, data partitions and conf files (mysql conf and apache conf if you have them) if you want a plain and simple method have a look at the dd command. It can clone a complete disc onto another disc and you can use dd again to put it back on that disc. More info and info on dd.

In general: if you have a copy of your home and important files you can always re-install and put those files back.

Just found https://askubuntu.com/questions/99626/what-are-the-benefits-to-use-dd-command on dd. It's a great reference.

You can create a bootable liveCD/USB for recovery instead.


Ubuntu 17.04 — bash: cd: too many arguments

I couldn't test this on a real 17.04 system yet (only verified that it works on 16.04), but you should be able to override the cd Bash built-in command with your own custom function, which discards any additional arguments except the first one:

cd(){ command cd "$1" ; }

Update: As suggested in @muru's comment, this version below might work better and support calling cd without arguments though:

cd(){ builtin cd "${@:1:1}"; }

After you have entered this line above in your terminal, please verify whether cd now behaves in the way you want. If this is the case, you can make this function definition persistent by appending that line to the end of your ~/.bashrc file. Otherwise it will vanish as soon as you end your current shell session.

Note that if for whatever reason you temporarily need to use the real cd Bash built-in command instead of this custom function, you can simply call it with command cd instead of plain cd.


gvfs mount onto Ubuntu desktop of Nexus 4 running Touch doesn't show dot files

I think you can not see them because you are useing an mtp protocol when you connect the phone..
That's how it is..
You can modify those file from the terminal with nano.
Hope this help.


Can't install ubuntu by USB or from Windows

Try using Unetbootin and selecting ubuntu 12.04 LTS from the list and making a bootable USB Flash drive that way...  Also, if your laptop has UEFI enabled then either disable it for Ubuntu or make sure you are installing the 64-bit edition so it works with your hardware...

http://unetbootin.sourceforge.net/


How can I check dependency list for a deb package

This will show you all the information about the package:

dpkg -I package.deb


How do I download Windows 10 from my USB to my Ubuntu 16.4 PC?

Yes! It is possible because that software which is using to download is the .exe file for windows. You could download iso though VMbox with Windows or on Ubuntu with Wine.
An alternative way is to download from somewhere else.


How can change my Ubuntu One profile and Ubuntu developer profile email address?

You should be able to add a new email, and change the default on your Ubuntu One Single Sign On.

Go to https://login.ubuntu.com/ and login with your current e-mail and password.

Under Personal Details click on Manage email address:

Enter in a new email address in this field:

Verify your new email address, by following the instructions they send to that email.

Under "Preferred email address" you should now be able to select your new email.

Since your developer account uses the same Ubuntu One SSO, It should pick up on the settings, otherwise the field is unchangeable from there:

However you can change the e-mail you use for receiving pay-pal payments under "My Account":


Yes, and it is one of the feature of Linux: you can get to a console by pressing ControlAltF1

Use cd to go to the directory where you edited the file and restore the backup profile you created before you editted it ( ;) ) or just edit the file if you did not make a backup.

nano .profile

When you're done, ControlX to save and exit and then just run sudo restart lightdm to restart the graphical server. If that didn't work, back to TTY1 and edit your .profile again.

Alternatively you can so the same using the live CD: boot from it and mount the disc that has your .profile and edit it.


TL;DR It is possible, but very difficult.
The method below is presented without any warranty. Use it on your own risk.
LinuxMint MATE 18.3 (Sylvia) -> Ubuntu Xenial Xerus 16.04 LTS
I have had installed LinuxMint MATE 18.3 (Sylvia). I asked myself a question - is it possible to convert it to normal Ubuntu Xenial Xerus 16.04 LTS without reinstallation?
I found great answer with script for listing packages from known repository. I adapted it to my situation:
cat > find_origin.sh << \EOF
LC_ALL=C dpkg-query --showformat='${Package}:${Status}\n' -W '*' | \
fgrep ':install ok installed' | cut -d: -f1 | \
(while read pkg; do inst_version=$(apt-cache policy $pkg \
| fgrep Installed: \
| awk '{ print $2 }'); origin=$(apt-cache policy "$pkg" \
| fgrep " *** ${inst_version}" -C1 \
| tail -n 1 \
| cut -c12-); echo $pkg $origin; done)
EOF

Then ran it to find Mint packages and remove them:
sh find_origin.sh | grep packages.linuxmint.com > mint-packages-all.txt

cat mint-packages-all.txt | grep -v "E:" | grep -v ^bash | grep -v ^base-files | grep -v ^mintsources | grep -v grub > mint-packages-remove.txt

sudo apt-get install aptitude
sudo aptitude purge $(cat mint-packages-remove.txt | awk '{print $1}')

sudo sed -i 's/^deb http:\/\/packages.linuxmint.com/#deb http:\/\/packages.linuxmint.com/g' /etc/apt/sources.list.d/official-package-repositories.list
sudo rm /etc/apt/preferences.d/official-package-repositories.pref

Then rebooted and launched Aptitude with sudo aptitude.
Set all packages from Obsolete and Locally Created Packages section to purge.
And checked locally installed package with:
sh find_origin.sh | grep /var

So I reinstalled two packages listed here - bash and base-files from xenial-updates repository from terminal:
sudo apt-get install bash=4.3-14ubuntu1.2 base-files=9.4ubuntu4.7

Then purged all packages that does not have ii state (such as rc) with:
sudo apt-get purge $(dpkg -l | grep -v ^ii | tail -n +6 | awk '{print $2}')
sudo apt-get install linux-image-generic linux-headers-generic
sudo apt-get purge linux-image-4.10.0-*-generic linux-headers-4.10.0-*-generic
sudo locale-gen en_US.UTF-8

Remove Mint files from home directory:
rm -rf ~/.linuxmint/

Check system integrity with debsums:
sudo apt-get install debsums
sudo debsums_init
sudo debsums -a -c # carefully check all files listed here with `dpkg -S filepath`

sudo apt-get install --reinstall cups-filters gnome-accessibility-themes im-config imagemagick sound-theme-freedesktop imagemagick-6.q16 libreoffice-draw libreoffice-math gnome-colors-common vino gnome-orca
sudo apt-get -o Dpkg::Options::="--force-confask" install --reinstall acpid libcompizconfig0 mate-menus systemd xdg-user-dirs-gtk vino # select Y

Then I checked system for files, that are not from Ubuntu repositories:
sudo find /bin /etc /lib /lib64 /opt /sbin /srv /usr /var -type f -exec dpkg -S {} \; 2> ~/Desktop/results.out

Removed the following objects:
sudo rm -rf /etc/linuxmint
sudo rm /usr/lib/python2.7/dist-packages/oneconf/distributor/LinuxMint.pyc

And finally installed Ubuntu MATE desktop:
sudo apt-get install ubuntu-mate-desktop^

Reboot and I have nearly normal Ubuntu Xenial 16.04 LTS :)
LinuxMint MATE 19 (Tara) -> Ubuntu Bionic Beaver 18.04 LTS
Warning: this method was not tested. Based on 18.3 -> 16.04 LTS above.
Let's do a listing of packages from known repository:
cat > find_origin.sh << \EOF
LC_ALL=C dpkg-query --showformat='${Package}:${Status}\n' -W '*' | \
fgrep ':install ok installed' | cut -d: -f1 | \
(while read pkg; do inst_version=$(apt-cache policy $pkg \
| fgrep Installed: \
| awk '{ print $2 }'); origin=$(apt-cache policy "$pkg" \
| fgrep " *** ${inst_version}" -C1 \
| tail -n 1 \
| cut -c12-); echo $pkg $origin; done)
EOF

Find Mint packages and remove them:
sh find_origin.sh | grep packages.linuxmint.com > mint-packages-all.txt

cat mint-packages-all.txt | grep -v "E:" | grep -v ^bash | grep -v ^base-files | grep -v ^mintsources | grep -v grub > mint-packages-remove.txt

sudo apt-get install aptitude
sudo aptitude purge $(cat mint-packages-remove.txt | awk '{print $1}')

sudo sed -i 's/^deb http:\/\/packages.linuxmint.com/#deb http:\/\/packages.linuxmint.com/g' /etc/apt/sources.list.d/official-package-repositories.list
sudo rm /etc/apt/preferences.d/official-package-repositories.pref

Launch Aptitude with sudo aptitude.
Set all packages from Obsolete and Locally Created Packages section to purge.
Check locally installed packages with:
sh find_origin.sh | grep /var

Reinstall two (maybe more!) packages listed here - bash and base-files from bionic-updates repository from terminal:
sudo apt-get install bash=4.4.18-2ubuntu1 base-files=10.1ubuntu2.1 desktop-file-utils=0.23-1ubuntu3.18.04

Then purge all packages that does not have ii state (such as rc) with:
sudo apt-get purge $(dpkg -l | grep -v ^ii | tail -n +6 | awk '{print $2}')
sudo apt-get install linux-image-generic linux-headers-generic
sudo locale-gen en_US.UTF-8

Remove Mint files from home directory:
rm -rf ~/.linuxmint/

Check system integrity with debsums:
sudo apt-get install debsums
sudo debsums_init
sudo debsums -a -c # carefully check all files listed here with `dpkg -S filepath`

sudo apt-get install --reinstall caja casper compton cups-filters engrampa gnome-icon-theme gnome-accessibility-themes im-config imagemagick libgs9 mate-desktop mate-icon-theme mate-screensaver mate-screensaver-common mate-system-monitor mate-utils openjdk-11-jre sound-theme-freedesktop imagemagick-6.q16 libreoffice-draw libreoffice-math gnome-colors-common vino gnome-orca
sudo apt-get -o Dpkg::Options::="--force-confask" install --reinstall acpid libcompizconfig0 mate-menus systemd xdg-user-dirs-gtk vino # select Y

Then check system for files, that are not from Ubuntu repositories:
sudo find /bin /etc /lib /lib64 /opt /sbin /srv /usr /var -type f -exec dpkg -S {} \; 2> ~/Desktop/results.out

Remove the following objects (may be other!):
sudo rm -rf /etc/linuxmint
sudo rm -rf /usr/lib/linuxmint
sudo rm /usr/lib/python2.7/dist-packages/oneconf/distributor/LinuxMint.pyc

And finally install Ubuntu MATE desktop:
sudo apt-get install lightdm-gtk-greeter ubuntu-mate-lightdm-theme ubuntu-mate-themes ubuntu-mate-wallpapers* ubuntu-mate-core ubuntu-mate-default-settings ubuntu-mate-artwork ubuntu-mate-icon-themes plymouth-theme-ubuntu-mate-logo plymouth-theme-ubuntu-mate-text grub2-themes-ubuntu-mate mate-tweak ubuntu-mate-guide caja-eiciel compiz-mate eom mate-accessibility-profiles mate-applet-appmenu mate-applet-brisk-menu mate-calc mate-dock-applet mate-hud mate-menu mate-netbook mate-optimus mate-user-guide mate-window-applets-common mate-window-buttons-applet mate-window-menu-applet mate-window-title-applet folder-color-caja deja-dup-caja gsettings-ubuntu-schemas indicator-messages indicator-power indicator-session indicator-sound brasero shotwell simple-scan smbclient ubuntu-standard vlc gdebi gdebi-core plank seahorse tilda sessioninstaller

Reset MATE desktop settings to the defaults:
dconf reset -f /org/mate
gsettings set org.mate.panel default-layout "'default'"

Install MATE Welcome and Software Boutique as Snaps:
snap install software-boutique --classic
snap install ubuntu-mate-welcome --classic

Reboot and have nearly normal Ubuntu Bionic 18.04 LTS :)
LinuxMint MATE 20 (Ulyana) -> Ubuntu Focal Fossa 20.04 LTS
Let's do a listing of packages from known repository:
cat > find_origin.sh << \EOF
LC_ALL=C dpkg-query --showformat='${Package}:${Status}\n' -W '*' | \
fgrep ':install ok installed' | cut -d: -f1 | \
(while read pkg; do inst_version=$(apt-cache policy $pkg \
| fgrep Installed: \
| awk '{ print $2 }'); origin=$(apt-cache policy "$pkg" \
| fgrep " *** ${inst_version}" -C1 \
| tail -n 1 \
| cut -c12-); echo $pkg $origin; done)
EOF

Find Mint packages and remove them:
sh find_origin.sh | grep packages.linuxmint.com > mint-packages-all.txt

cat mint-packages-all.txt | grep -v "E:" | grep -v ^bash | grep -v ^base-files | grep -v ^mintsources | grep -v grub > mint-packages-remove.txt

sudo apt-get install aptitude
sudo aptitude purge $(cat mint-packages-remove.txt | awk '{print $1}')

sudo sed -i 's/^deb http:\/\/packages.linuxmint.com/#deb http:\/\/packages.linuxmint.com/g' /etc/apt/sources.list.d/official-package-repositories.list
sudo rm /etc/apt/preferences.d/official-package-repositories.pref

Launch Aptitude with sudo aptitude.
Set all packages from Obsolete and Locally Created Packages section to purge.
Check locally installed packages with:
sh find_origin.sh | grep /var

Reinstall two (maybe more!) packages listed here - bash and base-files from focal-updates repository from terminal:
sudo apt-get install base-files=11ubuntu5 xapps-common=1.6.10-2

Then purge all packages that does not have ii state (such as rc) with:
sudo apt-get purge $(dpkg -l | grep -v ^ii | tail -n +6 | awk '{print $2}')
sudo apt-get install linux-image-generic linux-headers-generic
sudo locale-gen en_US.UTF-8

Remove Mint files from home directory:
rm -rf ~/.linuxmint/

Check system integrity with debsums:
sudo apt-get install debsums
sudo debsums_init
sudo debsums -a -c # carefully check all files listed here with `dpkg -S filepath`

sudo apt-get install --reinstall caja casper compton cups-filters engrampa gnome-icon-theme gnome-accessibility-themes im-config imagemagick libgs9 mate-desktop mate-icon-theme mate-screensaver mate-screensaver-common mate-system-monitor mate-utils openjdk-11-jre sound-theme-freedesktop imagemagick-6.q16 libreoffice-draw libreoffice-math gnome-colors-common vino gnome-orca adwaita-icon-theme-full info
sudo apt-get -o Dpkg::Options::="--force-confask" install --reinstall acpid libcompizconfig0 mate-menus systemd xdg-user-dirs-gtk vino casper # select Y

Then check system for files, that are not from Ubuntu repositories:
sudo find /bin /etc /lib /lib64 /opt /sbin /srv /usr /var -type f -exec dpkg -S {} \; 2> ~/Desktop/results.out

Remove the following objects (may be others!):
sudo rm -rf /etc/linuxmint
sudo rm -rf /usr/lib/linuxmint
sudo rm /usr/lib/python3/dist-packages/__pycache__/mintreport.cpython-38.pyc

And finally install Ubuntu MATE desktop on first login:
sudo apt-get install lightdm-gtk-greeter ubuntu-mate-lightdm-theme ubuntu-mate-themes ubuntu-mate-wallpapers* ubuntu-mate-core ubuntu-mate-default-settings ubuntu-mate-artwork ubuntu-mate-icon-themes plymouth-theme-ubuntu-mate-logo plymouth-theme-ubuntu-mate-text grub2-themes-ubuntu-mate mate-tweak ubuntu-mate-guide caja-eiciel compiz-mate eom mate-accessibility-profiles mate-applet-appmenu mate-applet-brisk-menu mate-calc mate-dock-applet mate-hud mate-menu mate-netbook mate-optimus mate-user-guide mate-window-applets-common mate-window-buttons-applet mate-window-menu-applet mate-window-title-applet folder-color-caja deja-dup-caja gsettings-ubuntu-schemas indicator-messages indicator-power indicator-session indicator-sound brasero shotwell simple-scan smbclient ubuntu-standard vlc gdebi gdebi-core plank seahorse tilda

Reset MATE desktop settings to the defaults:
dconf reset -f /org/mate
gsettings set org.mate.panel default-layout "'default'"

Install MATE Welcome and Software Boutique as Snaps:
sudo snap install software-boutique --classic
sudo snap install ubuntu-mate-welcome --classic

Reboot and have nearly normal Ubuntu Focal 20.04 LTS :)


Onboard HDMI audio stopped working after upgrade

This solution worked*! Step-by-step in case anyone who runs into this isn't familiar with the operations:

Edit /etc/default/grub as root.
On the line starting with "GRUB_CMDLINE_LINUX_DEFAULT=", remove the word "nomodeset".
Save & quit.
Run sudo update-grub
Reboot

* Almost everything in that question is different, but the answer was so well researched I decided to just give it a try. I can't recall whether I set "nomodeset" myself at some point (and if so, why), but at least now there's a record.


/boot full. Updates can't install. Can I delete things?

Running apt-get purge linux-image-4.4.0-**xx**-generic may help. Deleting by hand may cause some unexpected issues as you have no experience before. The /boot/grub/grub.cfg file contains the bootup menu list which may call the image you just deleted.


Why bash history is corrupted and how to recover it?

How you go about rescuing this really depends on what you mean by corrupted.

If it's just got a few weird characters in there on a few lines, sanitise it in your favourite editor and you should be fine.
If it's completely junked, that's that I'm afraid. Delete it and move on. The only recourse here is restoring from a backup.

The strange thing is the window for this stuff to happen should be pretty tiny these days. The default filesystems are journalled to minimise loss like this... But unless you have a battery-backed write cache (some enterprise drives and RAID cards do) there's always the possibility the system will be in the middle of writing something when you shut the power off.


Size 1280x800 not found in available modes?

After switching to the virtual terminals at Control+Alt+F1 to F6 you can always switch back by pressing Control+Alt+F8.

It's very weird that your configuration changed permanently just by changing to the virtual terminal. Are you sure you didn't do anything else?

If you installed the proprietary Nvidia driver, you will probably stop using it if you move /etc/X11/xorg.conf to i.e. /etc/X11/xorg.conf.nvidia.old . Ubuntu should use autodetect and use the nouveau driver (which I guess works, since it worked in the beginning).

You could alternatively try to configure your nvidia card using nvidia-xsettings, it's a tool that comes with the driver.

You could also try inserting a ModeLine into your x.org. I'd suggest the other options first. Here's an example of a modeline that might work with your monitor:

# 1280x800 59.81 Hz (CVT 1.02MA) hsync: 49.70 kHz; pclk: 83.50 MHz
Modeline "1280x800_60.00"   83.50  1280 1352 1480 1680  800 803 809 831 -hsync +vsync

Try reading this section first: https://wiki.archlinux.org/index.php/Xrandr#Adding_undetected_resolutions

If it works, you can add the modeline permanently like described in the next section in the link.


If you want to use Openoffice then you have to remove Libreoffice from your system. Open a terminal and then type

sudo apt-get remove --purge libreoffice*

It will remove LibreOffice completely. Then download the latest version of OpenOffice from here.
Extract it in your desktop. Then open a terminal and type

cd ~/Desktop

cd en-US

cd DEBS

sudo dpkg -i *.deb

After finished instaling type

cd desktop-integration

sudo dpkg -i *.deb

Now it is ready to go. It set default for your office files.

Enjoy. :)


You should be able to restore XP by performing a "Chkdsk -f" from a Windows command prompt. Now of coarse since you are unable to open XP itself, you will need to get to the cp using a Windows installation disk, or a boot disk like Active@ Boot Disk by lsoft. Unfortunately you cannot perform a Chkdsk from Linux.


xkbcommon: ERROR: xkb_x11_keymap_new_from_device: illegal device ID: -1

Workaround: Install xfce4 (sudo apt-get install xfce4) and use this ~/.vnc/xstartup file:

#!/bin/bash
xrdb $HOME/.Xresources
startxfce4 &

Don't forget to make it executable. Check ~/.vnc/*.log for errors.


Gillson font is displaying as Times new roman

The font in question doesn't come installed with libreoffice. To install the font, you can download it Here or you can search for it .  Once you download the font, just click it, and when the windows open, click on install.  That's it.  Open Libreoffice and enjoy.


Add separator icon to quick launch panel

To add a separator right click on your panel and select Add to Panel.... There you can choose a separator from a list of items:


Some CPUs of the Intel Pentium M series are a bit strange when it comes to PAE (Physical Address Extension). They don't report their PAE support to the kernel, so the installer may ask you to install the non-PAE version of Ubuntu.

This can be "fixed" (circumvented) by telling the kernel to assume that PAE is supported, even if it can't see it. To do so, you need to add the forcepae argument to the boot parameters, which forces the kernel to assume PAE is present and use it.

Open the file /etc/default/grub in a root text editor and change the line

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" # May contain other values

to

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash forcepae"

Then save, exit and run sudo update-grub to include this into the boot loader. Afterwards reboot.

After a reboot, you should be able to install the kernel update, since the current kernel now reports the presence of PAE, and thus APT now allows the installation of the kernel update.


Try installing the development version of randr:

sudo apt-get install libxrandr-dev


You are using those libdrm* packages from a PPA that doesn't provide the matching -dev packages (probaly ppa:oibaf/graphics-drivers).

Ask the owner of the PPA to provide the missing -dev packages or remove the PPA and downgrade to the official libdrm* packages.


Can't log out/restart/shutdown via Top menu bar

Try restarting your computer with the power button or letting your battery die. Now once restarted try it again and see if it works. If it doesnt work then try to use your other OS or if you arent dual booting just try it again


How to install drivers for iogear smart card reader?

Just follow EXACTLY/EACH the instruction given by manufacturer,
in terminal,

command cd Desktop
in terminal to change the working directory where your .zip file is to desktop

OR you can just download again in default location in terminal and you don't have to change directory cd

in terminal, type

wget http://www.iogear.com/support/driver/GSR202_Linux_Driver.zip

follow the instruction given,
tar zxvf  libusb-0.1.12.tar.gz --- this to extract
cd libusb-0.1.12---change the directory to the extracted folder
./configure---configuration file is ready for 'make'
sudo make install---enter your root password
Follow the same step for other installation

During make, make sure there is no error in this stage then you can proceed with make install please fix any error that you encounter first, install manually packages that required if needed (it's dependencies), do search in Software Center for needed packages and install them first! then try make again.

-------------------cut from the driver installation instruction--------------

=====================================================
=                                                   =
=      Alcormicro Smart card reader                 =
=    Linux TARBALL Package Release Note             =
=                               =
=====================================================

If the version of  libusb is under 0.1.9 , it need to update to latest one.
Otherwise skip  step1.

=========================================
[Optional]
Step1. Install  libusb

 # tar zxvf  libusb-0.1.12.tar.gz
 # cd libusb-0.1.12
 # ./configure
 # make
 # make install          ( Login as a root to install driver )
=========================================

Step2. Install  pcsc-lite

 # PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig;export PKG_CONFIG_PATH
 # LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib; export LD_LIBRARY_PATH

 # tar xjf pcsc-lite-1.5.5.tar.bz2
 # cd pcsc-lite-1.5.5
 # ./configure --disable-libhal
 # make
 # make install          (Login as a root to install driver)

Step3. Install ccid driver

 # tar zxvf ccid-1.3.12_alcormicro.tar.gz
 # cd ccid-1.3.12_alcormicro
 # PCSC_LIBS="-L/usr/local/lib -lpcsclite" ./configure --enable-usbdropdir=/usr/local/pcsc/drivers --disable-pcsclite
 # make
 # make install          (Login as a root to install driver)

 Note:
    Make sure pkg-config already installed.
    ./pcscd
    Add PATH=$PATH:/usr/local/sbin

-----------------------cut from the driver installation instruction------------

Hope it help!


Install Ubuntu on a separate hard-drive in dualboot

You have to select the correct hard drive. Windows is almost certainly on sda and you will want to install on sdb. Install grub into the first hard drive.

If you do not know which drive has windows, use gparted.


Editing gsettings; add icon to launcher by command

You can act on dconf also with gsettings tool.

gsettings set com.canonical.Unity.Launcher favorites "$(gsettings get com.canonical.Unity.Launcher favorites | sed "s/, *'yourapp' *//g" | sed "s/'yourapp' *, *//g" | sed -e "s/]$/, 'yourapp']/")"


No internet connection while installing ubuntu 12.04

I had the same problem with my hp dv6. After a lot of playing around with things and making sure the right drivers were installed, I tried checking my Bios settings and reset to default. Apparently that did the trick for me I guess when they install windows on laptops it changes something in the Bios.


12.04: How do I change background color of Main Menu in Gnome Fallback?

Hold Alt + Super/Win key, and right click on the Gnome panel. Then choose Properties from the menu, to customize the colour!


It appears that that there is a bug report filed for this which might or might not be related to Skype.

The problem

The error message mentions that there's a problem with a PulseAudio module.

Solution 1: disabling the module

If you'd like to try disabling the module, which might make Bluetooth audio not work, open a terminal (press Ctrl+Alt+T), and run the following:

sudo sed -i 's/^load-module module-bluetooth-policy/#load-module module-bluetooth-policy/' /etc/pulse/default.pa
sudo service pulseaudio restart
sleep 15
pulseaudio -k
pulseaudio --start
pavucontrol

If the PulseAudio volume control shows up properly, you should have sound.

Reenabling the module

If that doesn't fix it, open a terminal and run:

sudo sed -i 's/^#load-module module-bluetooth-policy/load-module module-bluetooth-policy/' /etc/pulse/default.pa
sudo service pulseaudio restart
sleep 15
pulseaudio -k
pulseaudio --start

Solution 2: reinstalling the Bluetooth module

If you'd like to try reinstalling Ubuntu's version of the module, which might make Skype not work, open a terminal (press Ctrl+Alt+T) and run:

sudo apt update
sudo apt install --reinstall pulseaudio-module-bluetooth
sudo service pulseaudio restart
sleep 15
pulseaudio -k
pulseaudio --start
pavucontrol

If the PulseAudio volume control shows up properly, you should have sound.


I have the same model of computer and the text was also small on my screen.

Version 14.04 of Ubuntu has some things that make this experience better.  Go to: System Settings -> Displays.  In the Scale all window contents to match: select "Display with largest controls" for bigger controls.  You can also increase the Scale for menu and title bars (my setting is 1.12).

I have also had success with the Unity Tweak tool.  This is as separate free program that you can install from the Ubuntu Software Center.  Go to Unity Tweak Tool -> Fonts to change the sizes of the default fonts in Ubuntu.  My settings are Default font: Ubuntu 13, Monospace font: Ubuntu Mono 15, Document font: Sans 13, Window title font: Ubuntu bold 13. Also notice that my text scaling factor is set to 1.12.

With those settings you should be able to find a configuration that works for you.  Post the settings that you find work better.  I would like to see that!


Failed to load session "gnome" after system crash

Try:

sudo apt-get remove ubuntu-desktop
sudo apt-get remove ubuntu-gnome-desktop

Do not restart. This could effectively leave your system without GUI.

sudo apt-get install ubuntu-gnome-desktop
sudo apt-get autoremove

This will install all the missing GNOME dependencies.


How to make a script in init.d run later

When your computer starts up, it doesn't run the init.d scripts directly.  Instead, depending on what's called the "runlevel", it runs the scripts in /etc/rcN.d (where N is the runlevel).  You can determine the current runlevel with the runlevel command; mine returns 2 in normal operation.  That means that when the computer started up, it ran the scripts in /etc/rc2.d.  The contents of rc2.d are just symlinks to scripts in /etc/init.d, named according to whether they should be started or stopped, and the order they should be run.

Use the runlevel command to find out what runlevel your computer is at (probably 2), then look in /etc/rc2.d for a link named SNNccpd, which will be a symlink to /etc/init.d/ccpd, and rename it to S99zzzccpd - or whatever it takes to get it to sort after the other entries - that will cause it to run last.

There's more information about init.d scripts and runlevels at https://www.linux.com/news/enterprise/systems-management/8116-an-introduction-to-services-runlevels-and-rcd-scripts


Can't install Skype in Cinnamon 19.3 , 32bit

Your only option to use Skype on a 32-bit machine (regardless of the operating system), is to use Skype for Web. The older versions are no longer compatible with the current protocols and Microsoft has deprecated all the old ones.
Note: Linux Mint is not supported here, but you can certainly ask the people at the Mint Forums any questions you may have.


How to restore grub after deleting it from Windows 8 disk manager?

You can use Boot Repair

Just boot from the Ubunut LiveCD, and once it boots up, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

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

Run Boot Repair once the installation is done.

Source:Boot Repair


Desktop icon's won't show until I open folder in file manager

I think the problem is that Nemo doesn't start automatically.
To check this, as soon as you log in open "system monitor" and control if "Nemo" is one of the active processes.
If not you should go to "Applications boot", or something similar, and add an entry, call it "Nemo" and fill in as a command "nemo".


How can I disable workspaces for external monitor?

Some advanced window managers (eg. xmonad) make it possible to assign workspaces to individual screens independently. But if you prefer to stick to Unity and Compiz, just right-click on the top bar of a window and select "Always on Visible Workspace". (You have to unmaximize the window first.)


You should be fine, as long as the downloads had not finished when the lid was shut. Ubuntu downloads all of the updated packages before installing the packages, since it sometimes has to use dependencies that are included in the update.


How to install the latest version of codelite?

DOWNLOAD

Add CodeLite public key to avoid warnings from apt/aptitude

sudo apt-key adv --fetch-keys http://repos.codelite.org/CodeLite.asc

Add appropriate repository. As you mentioned you use Ubuntu 14.04.02- Trusty Tahr

sudo apt-add-repository 'deb http://repos.codelite.org/ubuntu/ trusty universe'

Now you need to update your repositories

sudo apt-get update

INSTALL

Install Codelite

sudo apt-get install codelite wxcrafter


How to get ALT+B and ALT+L to work in the terminal?

There's another way around this: you have to turn off "Menu Access Keys".

Open the terminal window, go to "edit->keyboard shortcuts" and unselect the first check box "Enable menu access keys (Such as Alt+F to open the File menu)".

After you unselect this, close and reopen Terminal and you should be able to use Alt+F/Alt+L/Alt+B to move by word.


How to run code on Android Tablet from Ubuntu connected via USB?

You could do this with adb.

adb is run from the terminal, and allows you to run shell commands on the phone. You could write C code which executes adb via system().

It might be easier to just write a shell script.


If you want to retry the SSH connection without retyping the command try something like a loop command

until ssh command here; do sleep 5; done

This should retry your SSH command until it succeeds with 5 seconds delays between each attempt.


Why do I get the error message "Failed to load session Ubuntu-2D"?

It could be a Ubuntu bug.

See bug reports:

https://bugs.launchpad.net/ubuntu/+source/unity-2d/+bug/934365

Similar questions:

What could cause "normal" Ubuntu not to work but Ubuntu-2d to work? 11.10
https://askubuntu.com/questions/142184/12-04-failed-to-load-session-gnome-classic


USB-C to DisplayPort not recognized on Ubuntu 18.04

Seems there is a list of Asus to state whether a laptop supports Video output or not: https://www.asus.com/support/FAQ/1031591/

When looking at the logo's of the port, it seems my laptop does not support video output.

Wish there was a command to verify this.


Where is /etc/sysconfig/iptables-config in 14.04

Figured this out on my own. To allow FTP on Ubuntu 14.04, in addition to allowing the port in iptables you need to...

sudo nano /etc/modules

and add the following to the end of the file

ip_conntrack_ftp


Ubuntu Partition Got Wiped and Cannot Install Ubuntu Again

I solved the problem myself. I ran a chkdsk on my EFI partition from Windows and it fixed the installation issue.


sudo ssh-add /root/.ssh/id_rsa return error

From the following link:

Fortunately, there is a way to solve this problem. Sudo has a configuration option that allows to keep given environmental variables from the user issuing the sudo command. The options is called env_keep and can be configured by changing the settings in /etc/sudoers files as follows (always use visudo to edit the file):

visudo

Defaults    env_reset
Defaults>root    env_keep+=SSH_AUTH_SOCK

In other words,  add the line keeping the SSH_AUTH_SOCK variable below the Defaults     env_reset line. Then save the file and run

ssh-agent bash
ssh-add

and you should be able to execute a sudo command that accesses your server using the non-sudo user’s key without being asked for the key passphrase.


Edit your ~/.config/user-dirs.dirs file and change the value of XDG_DESKTOP_DIR

e.g. XDG_DESKTOP_DIR ="$HOME/Desktop"


Can I use NetworkManager without a tray/dock/bar?

If you're running on Ubuntu Maverick (and thus have network-manager 0.8.1), try the nmcli tool:

$ nmcli

Usage: nmcli [OPTIONS] OBJECT { COMMAND | help }

OPTIONS
  -t[erse]                                   terse output
  -p[retty]                                  pretty output
  -m[ode] tabular|multiline                  output mode
  -f[ields] <field1,field2,...>|all|common   specify fields to output
  -e[scape] yes|no                           escape columns separators in values
  -v[ersion]                                 show program version
  -h[elp]                                    print this help

OBJECT
  nm          NetworkManager status
  con         NetworkManager connections
  dev         devices managed by NetworkManager

As above, it's just one file, and comes with NM 0.8.1.


Firefox shows numbers and symbols as emoji, how to disable this?

I found the problem - emojione. I was tipped off by a suggested question in the sidebar of this question: EmojiOne Color font doesn't replace black and white emoji font in Firefox or Chrome

While the demo page doesn't show these number emoji, I did notice some of the other symbols were there. Removing the emojione package has returned my numbers to normal.


OEM Installation problem (OEM option missing)

Try booting to UEFI mode on boot of the computer (not the so) press the specific key to open the boot menu. From here select UEFI mode. That should get the options you need.


No internet connection when getting out of hibernation

I would say that hibernation performs a software lock on your network interfaces, making them unavailable. Resuming after suspension may reverse this lock.

Go into hibernation, and once you're back with no connections available, type :

rfkill unblock all

This should remove any lock applied on your interfaces. If you want to be more specific (not unlock all interfaces), use :

rfkill list

You'll get numbers associated to your interfaces, which you can use in the unblock command afterwards, instead of all.

Edit : maybe have a look here ?
http://oleeekchoff.blogspot.ie/2012/05/restart-modulesservices-after.html


The tutorial you refer to is outdated insofar as it tells you to edit /etc/resolv.conf by hand. In Ubuntu 12.04 and later you don't edit /etc/resolv.conf by hand but configure resolvconf to put the correct content in that file. If you have followed the other steps in the tutorial and want to use the locally running BIND 9 named to resolve DNS names then the right thing to do is (1) make sure that /etc/resolv.conf is (still) a symbolic link to ../run/resolvconf/resolv.conf and (2) set RESOLVCONF=yes in /etc/default/bind9 to cause BIND 9 named to register its local listen address 127.0.0.1 with resolvconf when it starts; (3) do /etc/init.d/bind9 restart.

If you would like to add search domain names to the resolver configuration then add a dns-search line to the iface lo stanza in /etc/network/interfaces.

iface lo inet loopback
    dns-search name1 name2

After doing this you have to ifdown lo and ifup lo to cause the information to be added to resolv.conf.


Where to unpack the android studio file?

The key parts of the question as I see them: user is new to Ubuntu/Linux, user wants a recommendation based off of best practices and basic user experience.

@luis-de-sousa was correct in pointing out the Ubuntu directory structure, but I used this reference from Official Sources.

If you want android-studio to be available to all users (based on the above) you should be unpacking the tar/tgz/zip to /opt rather than the /usr/local or /usr/bin (with the latter being preferred for specific-user installations).  Setup properly, we shouldn't need to change user group permissions or any other high-level administration.

Unpack the downloaded tar/tgz/zip file where it lays
Using a Terminal window, navigate to that folder location (probably cd ~/Downloads), invoke sudo -i (You will need administrator/su permissions for the next few steps)
mv android-studio /opt moves the files you unpacked (requires permissions)
gedit android-studio.desktop this opens a text editor so that we may create a shortcut icon to open your new program.  Insert the following code, then save the .desktop file.

[Desktop Entry]
 Name=Android Studio
 Comment=Integerated Development Environment for Android
 Exec=/opt/android-studio/bin/studio.sh
 Icon=/opt/android-studio/bin/studio.png
 Terminal=false
 Type=Application
 Categories=Development;IDE

To finish up, desktop-file-install android-studio.desktop

We are done with the terminal window, you can close it or exit  That .desktop file now allows you to search for and find android-studio within Ubuntu's Unity interface (or whatever DE menu/dash you are using).  In other words, click that icon in the upper-left to search for android-studio  You may also right-click on the icon while it is running and "lock it to the launcher."

You can also create menu options to appear for your application launcher, see the Ubuntu Documentation on Unity Launchers.

Besides the in-text citations, I also referenced the following pages extensively:

http://naveensnayak.wordpress.com/2013/05/15/ubuntu-13-04-adding-launchers-to-unity-panel/

How to install Eclipse?

http://developer.android.com/sdk/installing/studio.html#Installing


Who is Mark Shuttleworth, and how is he related to Ubuntu?

Mark Shuttleworth is an entrepreneur from South Africa who founded the Ubuntu operating system through his company, Canonical.

Before founding Canonical, he was the founder of Thawte, a company he founded in 1995 to provide digital certificates and internet security.  Thawte has since been sold to Verisign.
Shuttleworth was a Debian Developer in the 1990s.
Shuttleworth founded his company Canonical LTD in 2004, a company dedicated to supporting free software.
Through his company Canonical LTD, he founded the Ubuntu operating system in 2004.  Ubuntu is a derivative software product of Debian.  Canonical still governs and supports the Ubuntu operating system to this day and Ubuntu continues to be a product based on Debian.
He set up the Ubuntu Foundation in 2005 with an initial donation of $10 million USD of his own funds.
He remained the CEO of Canonical LTD until 2010, when he stepped down to focus on other responsibilities within Canonical and Ubuntu.
Shuttleworth is also famous for being the second ever self-funded space tourist (funded a trip to space with his own money) and the first ever South African in space.


Installation instructions for golang 1.9 into Ubuntu 16.04

Nothing better than to follow the source of the project
Ubuntu install for Go - GitHub

just replace 1.8 with 1.9


Broadcom BCM4331: "device not ready firmware missing" error

You need to manually install the b43 driver.

Open Ubuntu Software Centre and search for b43 and click to install it.
Then reboot and the wifi should be working.


You can try my Sane GUI,
I named it ScanJet (I have a HP ScanJet 2300C),
it should also work with other Sane Scanner.

Download Linux Version


Lenovo ideapad 110 - Cannot Detect Wireless Network Adapter

Did you try your wireless before on Ubuntu 14.04 or 18.04 LTS?

As your BIOS is from June 2017, you might need to try Ubuntu 18.04.2 LTS. Perhaps this new release might support your wireless card, if Ubuntu people did not backport the driver into 16.04.5.


Open a terminal window (alt+ctrl+t) and enter the following commands.

sudo update-alternatives --remove "java" "/usr/lib/jvm/jdk1.7.0_10/bin/java"

sudo update-alternatives --remove "javac" "/usr/lib/jvm/jdk1.7.0_10/bin/java"

sudo update-alternatives --remove "javaws" "/usr/lib/jvm/jdk1.7.0_10/bin/javaws"

Then remove the package in the /usr/lib/jvm

This should work!! :)


How can find out the device Id of my unmounted DVD?

So here it is my comment as an answer finally: if you think about those entries in /dev as "device ids" then you have already the answer: it's maybe /dev/scd0 as you wrote. You may want to examine entires like /dev/dvd, usually udev (which manages /dev entries) creates it as a symlink for the proper device of your dvd drive. You can use than /dev/dvd with growisofs (or other tools) but for sure you can also use the entry symlink of /dev/dvd points to. As you noted too, it's nice to examine the output of command mount when your media is mounted, so you know the device name from it then!


Can sudo command only be used in ubuntu?

No, sudo is not Ubuntu specific command/package.

By default, many distros come with sudo package preinstalled, if not it should be available in the repository so that the user can install it later easily.


Does the file exist:

/boot/vmlinuz-4.10.0-19-generic

Exist?

Can you provide the output from?:

$ dkms status
ls -l /var/lib/dpkg/info/linux-image-4.10.0-19-generic*

It looks like the package failed to compile some dkms (Dynamic Kernel Module Support) on install, and it wants to fully configure it before removing the package.

There is the nuclear option but you want to make sure that you are not running on the older kernel or it will break on reboot.

sudo dpkg --remove --force-remove-reinstreq <package_name>


landscape alert - script with issues : update_security_db.sh

That script has its own log file in /var/log/landscape-server. It downloads a file from the Ubuntu servers using curl(1) and parses it locally. I suspect you may have a proxy and are hitting https://bugs.launchpad.net/landscape/+bug/1523950 (landscape cron jobs don't get proxy setting).

The logs will tell you what is going on.


Create a .desktop file: cannot find the icon on my desktop

Just log out and then log back in…  That should do the trick!

Low-quality queue reviewers: That's it as per comments...