How to allow a command to be executed for a particular user without password with sudoers file?

I pretty much stole it from here: Is it possible to give sudo access to only a particular command?

sudo visudo -f /etc/sudoers.d/Username

And add that to the file:

Username ALL = NOPASSWD: /usr/bin/apt* update
Username ALL = NOPASSWD: /usr/bin/apt* install

Don't know how to make this a one-liner, though. Hope that helps.


How do I completely remove the Global menu on Ubuntu 13.10?

I agree, it is so much easier working with many windows if they have the menu in their window.
I found this command to work.
gsettings set org.gnome.settings-daemon.plugins.xsettings overrides '@a{sv} {"Gtk/ShellShowsAppMenu": <int32 0>}'

That I found on Global menu in Ubuntu 13.10 - Ubuntu Forums


How to remove chromium browser which was installed via deb file offline?

You can try to remove it by using a Package Manager like "Ubuntu Software Center" or "Synaptic Package Manager", see the following images for guidance:

Ubuntu Software Center:

Synaptic Package Manager:

If you need a step by step solution, you could check this link.

Hope it helps.


Why does Ubuntu ask to check my hard drives every so often?

A disc check is forced by the system every 30 restarts. If you skip the disc check it will do it the next time you restart (unless you manually remove forcecheck).

You can force this yourself by putting a file forcefsck in / by issuing a

touch /forcecheck

from the terminal.

It is not necessary to always do a check when it's prompted but should be done every now and then. You can cancel it if it is not the right moment for you at that time and let it do the file system check when it is more convenient.

You can also use tune2fs to alter this behaviour.

sudo tune2fs -c 60 /dev/sdXY

will set this to 60 restarts.
You can also change this to a time period with -i:

sudo tune2fs -i 30d /dev/sdXY

for 30 days or 1m for 1 month or 10w for 10 weeks.

(replace /dev/sdXY by the device name for the partition like /dev/sda1. You can get this name by running sudo blkid or ls -lA /dev/disk/by-label if the partition is labelled)

sudo dumpe2fs /dev/sda1

will show loads and loads of information. Part of this includes:

Filesystem created:       Thu Feb 12 09:06:50 2009
Last mount time:          Fri Aug 26 07:19:34 2011
Last write time:          Fri Aug 26 07:19:34 2011
Mount count:              2
Maximum mount count:      25
Last checked:             Fri Aug 12 07:22:16 2011
Check interval:           15552000 (6 months)
Next check after:         Wed Feb  8 06:22:16 2012


Apps open multiple window instances and then the system hangs

vm.swappiness
With only 4G RAM, setting vm.swappiness=10 is totally wrong.
Set vm.swappiness=60 (based on 4G RAM and 4G SWAP), this way...
sudo -H gedit /etc/sysctl.conf # edit this file
Search for an existing vm.swappiness= entry...
CTRL+f vm.swappiness

If found, edit it to say vm.swappiness=60

If not found, add vm.swappiness=60 at the end of the file

Save your edits and quit gedit
sudo sysctl -p
swap
With only 4G RAM, your /swapfile, or swap partition, is too small. We need to increase it to 4G.
Note: Incorrect use of the dd command can cause data loss. Suggest copy/paste.
sudo swapoff -a           # turn off swap
sudo rm -i /swapfile      # remove old /swapfile

sudo dd if=/dev/zero of=/swapfile bs=1M count=4096

sudo chmod 600 /swapfile  # set proper file protections
sudo mkswap /swapfile     # init /swapfile
sudo swapon /swapfile     # turn on swap
free -h                   # confirm 4G RAM and 4G swap
reboot                    # reboot and verify operation

Add this line to /etc/fstab if it doesn't already exist... and remove any other swap lines that may be there... edit with sudo -H gedit /etc/fstab...
/swapfile    none    swap    sw      0   0


Failure to download extra data files: flashplugin-installer (not a duplicate question)

Credit to gunnar-hjalmarsson for this answer.

Adobe once began life making fonts for Microsoft Windows. Later it became the premiere program for playing videos over the internet and live TV broadcasts (which I use it for). However now HTML5 is commonly used for playing videos in Google's YouTube and FlashPlayer is becoming marginalized.

Within Google Chrome web browser PepperFlash support is built in so a separate flash plugin is no longer required for watching flash content. However on my system (perhaps because I deleted Google Chrome Beta) the error in the original question occurred.

The error message:

Err:1 http://archive.canonical.com/pool/partner/a/adobe-flashplugin/adobe-flashplugin_20160913.1.orig.tar.gz

showed up because Canonical partners was not enabled. I don't remember turning it off but the solution is to turn it on.

Enable Canonical Partners

To enable partners in Canonical select System Settings then Software & Updates and then Other Partners. This screen appears:

Check the box to allow partners.

As Gunnar points out flashplugin-installer isn't needed for firefox so adobe-flashplugin is a better option to install. Google chrome has flash player support embedded through a process called Pepper Flash Player and doesn't need flashplugin-installer either.

The final solution is:

sudo apt-get remove flashplugin-installer
sudo apt-get purge flashplugin-installer
sudo apt-get install adobe-flashplugin

Thanks again to Gunnar for his comments to solve the pesky pop-up message.

Although flashplugin-installer is in the title and body, the partner errors could apply to many situations and I welcome recommendations to change the title, question or answer.

PS I realize remove and purge can be combined into a single line. I also realize apt-get is inferior to a solo apt in many respects.

PPS Adobe also gets credit for .PDF files although on Linux platform many free alternatives exist.

PPPS I notice there are other boxes not checked off on the screenshot above and if this answer can be improved by explaining them don't hesitate to comment. I am dpkg challenged as recent down votes have proved.


How do I allow full brightness control on Unity?

You can use a brightness indicator applet to change the brighness:

It can be downloaded from here. It works with 11.04 and 11.10 and is said to work with 12.04.

Update: You can try this but this will change your brightness hot keys:

1. Install compizconfig-settings-manager and xbacklight.

sudo apt-get install compizconfig-settings-manager xbacklight

2. Run it and go to commands. Do as shown:

3. Add key bindings:

4. You should be now able to increase brightness using F7 key and decrease using F6 key.

Note: Do not play with CCSM, if you don't know what you're doing.


Bash script throws "syntax error near unexpected token `}'" when run

A few problems here:

Firstly, that's not how you write if/else statements in bash. Instead, you need something like:

if <condition>
then
    <action>
elif <other-condition>
then
    <other-action>
else
    <another-action>
fi

Secondly, the condition you're checking here will not work; the if statement will check the return value of condition. So, you need the condition to be a command (or pipeline of commands) that will return a zero or non-zero exit status.

So, try something like:

if grep 'present:.*yes' /proc/acpi/battery/BAT0/state
then
    # code to execute if battery is present
else
    # code to execute if battery is not present
fi

In this case, the grep will succeed (ie, return a zero exit status) if the BAT0/state file matches the pattern present:.*yes.

If you need to do string matching, you need to use the [ command with an = operator:

if [ "$somevar" = 'some-string' ]
then
    # code to execute when $somevar equals 'some-string'
fi

For more information on if-statements in bash, see help for if:

help if

Or, see the bash manpage for general bash programming info:

man bash


How to increase screen resolution in Hyper-V

I found that the IP address for Ubuntu on Hyper-V was not 127.0.0.1 (aka localhost) on the Windows machine. On my computer, using the Hyper-V virtual switch to create an External network adapter allowed the Ubuntu VM to get its IP address from my router. I just used ifconfig to see what that address was and after that I was able to connect via PuTTY.


How can I know the display manager it's being used?

You can follow command cat /etc/X11/default-display-manager. You will get response like /usr/sbin/lightdm. It looks like:

$ cat /etc/X11/default-display-manager
/usr/sbin/gdm3


Aria2 is the best solution for this if you want CLI. Aria2 supports multiple connections, multiple threads and multiple sources.

Another benefit of Aria2 is that is works as a plugin for uGet so you can use the power of Aria2 with a nice easy to use GUI.

Aria2 - CLI - http://aria2.sourceforge.net/

by default, Aria2 does 5 connections but can be adjusted with the "-j" parameter.
aria2c -j 10 http://url.com/path/to/file.ext

uGet - GUI - http://ugetdm.com

multiple connections is adjustable in GUI when adding a download.

Update: based on OP's batch needs

uGet supports batch downloads via .txt, .html, clipboard and many more methods. While admittedly not CLI, I think it solves the problem quite well. I created a video tutorial to explain the various methods, the GUI has changed since this recording but the functionality is still relevant.


Why am I getting the error "You need at least 8.5 GB disk space to install Ubuntu. This computer has only 0.0B"?

I also have same issue while making duel boot. there is one option that you can make install is to change your SATA configuration mode

my laptop default is SATA config -> intel
but that one not compatible with installing Ubuntu.

So I changed to AHCI mode, so I can install Ubuntu it will detect your disk.
But only the drawback for this method is that everytime you need to switch back to intel mode if you want to use Windows.

To change the mode : go to Boot -> SATA configuration -> AHCI/Intel

note: disable secure boot and fast boot


Try when booting your computer:

press f2? to get into bios
press f9? to reset to default settings
press f10? to save settings

Check if you're still hard blocked.

[keys are for my laptop which isn't a dell]


What is the program "Additional Drivers" (jockey-gtk) talking me about?

The difference between each proprietary driver is explained in my answer here: https://askubuntu.com/a/218181/7035

Since you are a Geforce 8600M GT then in my answer you can find which one to install.

Along with that, the "No proprietary drivers are in use on this system" message appears since there could be other proprietary drivers apart from the video card. There are other proprietary drivers that the Additional Drivers checks when looking for proprietary drivers, some are:

Video Drivers (Most common reason to use Proprietary Drivers)
Wireless Drivers (Like Broadcom. Second most used Proprietary Driver)
Modem Drivers
Others (Most can be found here: http://archive.ubuntu.com/ubuntu/pool/restricted/)

So the message simply states that it could not find any proprietary drivers IN USE in your system. Which means you have not yet installed any proprietary drivers.

For the mouthful of words when you asked: "What is the difference between activate and remove? and what is the relationship between installed, activated, in use, enabled and removed, disabled, inactive and not-installed?" all I can say is:

Active - When you are using a proprietary driver at that moment
Remove - Remove
Installed - You installed this proprietary driver but you are no using it at the moment.

Since you are asking that part I suggest you read on some proprietary driver installation problems from this question: https://askubuntu.com/a/194628/7035 also as yo mention, you are using 11.04. Going back to 11.04 and checking it out, I figure that, in that time, there was a version difference between both options (Version 173 and Version Current), but since Natty was still receiving updates (Ended on October of this year), both got to a point of having the same version, same description and basically installing the same one, but jockey on the other hand, did not update this so this could mean that:

Bug in Jockey that they forgot to remove the (Version 173) and leave the recommended
Both packages actually install the same package (But this still confuses the end user, since a single option should be made)

For both cases I really suggest upgrading the system, here are the reasons, specifically for your question:

Between 11.10, 12.04 and 12.10 there were many MANY bugs fixed in regards to jockey, so much so that jockey is not used as seen in 11.04 but rather a more friendly approach to installing and configuring proprietary driver.
Jockey is known to have some driver confusion from time to time and it was becoming hard to work with it (Examples like this) so some work was done to simplify jockey into the Update Manager and Software Sources.

My guess is that you are using 11.04 because of Gnome 2, which actually leaves me with little answers if you do not want to upgrade because of Unity/Gnome3 and performance penalties. My suggestion is, since you found a bug, publish it in Launchpad describing this same problem (Because if it confuses you, imagine how many other people will be confused by it also) and to install any of the 2 drivers, or simply go to the terminal and install the nvidia-current package.


Upgraded to Ubuntu 15.04, now terminal won't open

I had the same problem and changing the locale actually fixed it.

You can change the locale in /etc/default/locale.
You can try setting the contents of that file to:

LANG="en_US.UTF-8"
LANGUAGE="en_US"

which should work. If that actually works you can then try your preferred locale.

Be sure you are using a valid locale (I, for instance, was missing the .UTF-8 part).

To apply the changes made I would suggest rebooting, but someone else might be able to give a better alternative.


Driver for NVIDIA Corporation GK107M [GeForce GT 640M]

Follow these steps it will help you

Run the following command in the terminal and type the password for the user when prompted.

sudo apt-add-repository ppa:xorg-edgers/ppa

After adding the PPA, update your system repository by running following command

sudo apt-get update

Now to install the NVIDIA GeForce graphics driver run following in terminal

sudo apt-get install nvidia-current nvidia-settings

if evrything goes fine you will be good to go. Hope it helps


Can I align the desktop icons in a grid fashion, so that they are aligned vertically as well?

No longer an issue for me since I've turned off that the desktop is handled by the file manager. Gives a much cleaner and less distracting experience.


ubuntu-device-flash touch hangs at waiting from VirtualBox

So I found out that the 2012 version of Nexus 7, called "grouper", is no longer supported by Ubuntu Touch.
https://developer.ubuntu.com/en/start/ubuntu-for-devices/devices/

I found a few other posts trying to solve this, by installing the latest Touch supported, but for now (today 21. dec 2015) I have not found a working solution.
Installing Ubuntu Touch on Nexus 7 (2012) now that it is no longer supported

So the bottom line right now is that I "downgraded" to Android 4.3 over the official Google page, using the windows version of fastboot, and skipping to update the bootloader 4.23, as this is not needed and there is a bug covering this.
https://developers.google.com/android/nexus/


Cheapest phone which can plug and play into ubuntu for tethering?

A few options I can think of:

1 - Get a 3G dongle instead.  There is a monthly cost associated, but it is a device for this very purpose.  You will need to look at the compatibility of specific dongles with Ubuntu.

2 - Check ebay for 2nd hand phones, it is possible that you find cheap Android phones there.


Difference between Live CD and Alternate CD?

I came across this term Alternate CD. How it different from a Live CD?

The alternate CD is a text-based installer and does not have a live mode. Here's where/why it's useful, according to the official download page:

The alternate install CD allows you to perform certain specialist installations of Ubuntu. It provides for the following situations:

setting up automated deployments;
upgrading from older installations without network access;
LVM and/or RAID partitioning;
installs on systems with less than about 384MiB of RAM (although note that low-memory systems may not be able to run a full desktop environment reasonably).

Also why cant we upgrade using a live cd while we can using an alternate one as mentioned here?

Because the alternate CD contains an actual repository with the .deb packages necessary to perform an installation/upgrade (see this answer for an example/more info). The Live CD cannot be used in this manner, since it contains a compressed filesystem and not individual packages. It runs in live mode off this filesystem, and when you chose to install, it expands the filesystem onto the target hard disk.


pacat -p some file in backup-skript needs $DISPLAY for X11 why?

Both aplay and pacat are userland programs, so the easiest way for the programmer to get the sound out there is to use the dbus library as no one in their right mind is going to use these in cron, or in a udev rule, or heaven forbid in systemd, right???  :-)

Well, they were right until you came along, and you indeed took the correct solution to solve this issue.

If you would like to be able to make a sound without X running at all (E.G. a headless server), you might echo the ASCII BEL¹ character to a tty.

Note 1: 007: really retro: a beep was more important then a Line Feed (10), Form Feed (12) or Carriage Return (13)...


This has gnome-music. They're not all available unfortunately.


How to create an AutoKey script that pastes from clipboard?

I've found that we can do it by script like this:

content = clipboard.get_clipboard()
keyboard.send_keys("wrapping text %s wrapping text" % content)

Then the script can be used by an abbreviation or a hotkey which you can set on it.


Installed OpenFOAM as root on accident, how can I delete everything from OpenFOAM and reset all of Ubuntu

The OpenFOAM 7 documentation says to install this way. If this is what you did...

sudo sh -c "wget -O - http://dl.openfoam.org/gpg.key | apt-key add -"
sudo add-apt-repository http://dl.openfoam.org/ubuntu
sudo apt-get update
sudo apt-get install openfoam7

...then this is how you uninstall:

sudo apt remove openfoam7
sudo apt autoremove

Since you intend to return to OpenFOAM, this leaves the PPA in place, and uses 'remove' instead of 'purge' to preserve settings in /etc.

(OPTIONAL) If you want to remove the PPA entirely:

sudo add-apt-repository --remove http://dl.openfoam.org/ubuntu
sudo apt update         // Always run update after changing your sources


I'm not even sure if WAVE is capable of storing ID3-Tags. You would convert those files anyway to another format because of their size. Either choose FLAC if you need it to be losless or OGG, MP3 or something else.

For converting I use xcfa and for tagging I use puddletag (which both should be in the Ubuntu repos).


This is easier done if you cd to the root directory of the file system you believe the pictures are in.  You would want to mount the disk to something like /images and then

cd /images

find . -ctime n -name "*.jpg"

Where n = the number for days ago that the picture image was created.

To search the entire system:

sudo find / -ctime n -name "*.jpg"

You don't need sudo to find pictures you own but if you search the entire system you'll get a lot of permission denied errors if you don't.

If you have a lot of image files, you can pipe the output to a file:

find . -ctime n -name "*.jpg" >> $HOME/mypics.txt

There are a other time options, they work backwards in 24 hour increments or in minute increments like -cmin. For more information:

man find

You can also use -newerXY and ! -newerXY:

Example: To find all files modified between June 1, 2017 and July 3, 2017:

find . -newermt 2017-06-01 ! -newermt 2017-07-03 -name "*.jpg"


How do I update mesa 11.2.0 on Ubuntu 16.04 desktop version? E: Unable to locate package mesa

mesa is the source which produces several packages of varying names.
You can,

Wait for 16.04.2 HWE image to release, installing the various ~lts packages from it  would give you mesa 12.x. This will happen in Feb. or so.

(The HWE lts also provides some updated xserver packages & newer kernel

Or use this ppa, noting that it's providing a higher version than 16.04.2 (HWE) mesa, mesa 13.x will likely show in 16.04.3 HWE image release.

https://launchpad.net/~paulo-miguel-dias/+archive/ubuntu/pkppa

Info on the HWE for Ubuntu

https://wiki.ubuntu.com/Kernel/LTSEnablementStack


go to terminal, then,

sudo nano /etc/rc.local

then add

setsid unity

before

exit 0

and you are done.


Lock screen wallpaper shows desktop wallpaper on Ubuntu 18.04 with Gnome Flashback

No. You would need to write patch for gnome-screensaver to use correct wallpaper.
EDIT:
Actually gnome-screensaver already has 33_budgie_support.patch that gives a hackish way to use screensaver wallpaper.
You could try to edit /usr/share/dbus-1/services/org.gnome.ScreenSaver.service file. Open file for editing and change Exec=/usr/bin/gnome-screensaver --no-daemon line to Exec=/bin/sh -c "set env XDG_CURRENT_DESKTOP=Budgie /usr/bin/gnome-screensaver --no-daemon".
Please note that it will affect other things in screensaver, for example, there won't be top bar with clock in lock screen.
This might not always work, there are also two screensaver autostart files in /etc/xdg/autostart that might need similar change. Autostart files can be copied from /etc/xdg/autostart to ~/.config/autostart so you don't need to change system files.


software not installed after successfull apt-get install in ubuntu subsystem on windows 10

copyied from https://serverfault.com/questions/894500/program-go-is-currently-not-installed-on-ubuntu-16-04 like @Panther said:

Go installed to the /usr/lib directory. So on my computer, this sym link fixed the issue

sudo ln -s /usr/lib/go-1.9/bin/go /usr/bin/go


When dual-booting Windows and Linux, you can seamlessly access data in Ubuntu that you can also access in Windows.

You could save your user data on the Windows partition, and access it from within Ubuntu
You could save your user data on a separate partition formatted in ntfs format so you can access it from Windows and Ubuntu. The separate partition needs to be formatted in a file system that Windows also can use, so it has to be ntfs or perhaps extfat.

For a linux system including user configuration data, a 25 GB system partition is confortable.
In your scenario, you would use a separate partition, the drive you know as E: in windows, a your data partition. In that case, it is sufficient to create about 25 GB of free space (preferably deducted from the Windows system partition, because also for Windows, the system only does not need 450 GB).
To have seamless access to your data on the E: drive, you will need to

Mount the E: drive automatically during startup by including that partition in /etc/fstab. You can also use the tool "Disks" (installed by default), to set up that partition that way.
Make sure to set your user as the owner of the mounted partition, so you have read and write access.
Then it is simply a matter of replacing your Ubuntu Documents, Music, etc. folder by symbolic links to the actual data on the E: drive to enjoy seamless access to the data from within your home folder.

If you want to use timeshift, you will need more space than the 25 GB, and preferably on another partition or drive. timeshift is a utility to make "system snapshots" so you can roll back in case "you messed up" with your configuration. As such, it records older versions of the files, and required additional disk space, which must reside on a file system that supports linux permissions.
I do not use timeshift myself. Instead, I focus my efforts on a very good backup of my user data. These are unique and irreplaceable when lost. If my operating system breaks, I just reinstall - it takes less than an hour (half hour on a modern system).


After ssh to the server Just backgrounding your script (./myscript &) will not daemonize it. You must disconnect stdin, stdout, and stderr, and make it ignore the hangup signal (SIGHUP).

nohup ./myscript 0<&- &>/dev/null

will do the job. Or, to capture all output:

nohup ./myscript 0<&- &> my.admin.log.file &

and, this article more helpfull for you!


Yes. Tasks created on evolution, are categorized, Clich on Tasks->click on 'any category ' button, then you have your tasks displayed in categories which you have earlier created the task under specific categories.


How to start a scan with a hotkey and automatically save the result into a directory?

To have access to a scanner we need the permission to do so. This is done by making us member of the group scanner either with the graphical users tool or from the command line with

sudo usermod -aG scanner $USER

Having the scanner buttons work on the Ubuntu desktop is a different story. I do not know how to do that with your scanner or the driver you use. There may be a proprietary software to help you with that.

However it is possible to assign a command line scanning command to a custom keyboard shortcut. If we had installed the scanner with the SANE backend we can use scanimage for this, e.g.:

 scanimage -x 200 -y 300 --format=tiff >image.tiff

For more options see the manpage for scanimage.


If you plan on compiling your own dwm, you should get the source package instead of the binary one.

sudo apt-get install build-essential
sudo apt-get build-dep dwm
cd directory/to/save/source/in
apt-get source dwm   # note that sudo is not required here.

Then, make any changes you want and build a binary package with debuild.


There is nothing much that I am aware of that does this. I have written my own scripts that monitor the second usb serial connection and query for signal strength.

Send a AT+CSQ and you will receive:

+CSQ: n

n is in the range 1 - 31, to convert this to dBm subtract 111

This is detailed in the GSM / 3GPP spec  http://www.3gpp.org/ftp/specs/html-info/27007.htm


can't resize lvm-p2 boot partition, even from live cd

If you have lvm, you need to use lvm tools to manage the Logical Volumes and Volume Groups. Your /dev/sda3 is not mounted but is probably defined as a Physical Volume in your VG. This is why it is in use.

Try using sudo pvs command to see your physical volumes, sudo vgs for volume groups and lvs for logical volumes. (pvdisplay, vgdisplay and lvdisplay also give other details about the volumes).

From the LV list, you need to select the LV you want to resize and resize it using the LV name not the /dev/sda3 physical partition.

Obs: as this is probably the LV with the / filesystem, you will need to resize it booting from a live cd (it's the same as without lvm, you can't unmount the volumes in use).

OBS: from your screenshot, you are using gparted and gparted is not able to work with LVM partitions at least until 12.04 (edit: but on your screenshot of 12.10 it appears to be working...). You need to use fdisk (seems that parted works too but I never used it...)


If I understand the question correctly, you want to access the internet from Ubuntu while using the Windows XP guest OS as your interface to the 3G card?

If so, then you can try this:

1) In VirtualBox, configure a host only ethernet adaptor for Windows XP

2) Turn on ICS (Internet Connection Sharing) in Windows XP, see https://support.microsoft.com/en-us/kb/306126 for info.

3) Set up Ubuntu with the IP settings shown at the URL above.

4) If this indeed works, please let me know, because I don't test out any of my answers like this, and would like to know for future reference.


Java printing with CUPS : printers not found

I had the same problem and just found the solution. I don't think this is the best way to solve the problem, but at least it's working for me.

I first found the problem when trying to set up CUPS service on a headless Ubuntu 16.04 server. On my desktop Ubuntu 16.04 the lookup printer is working even without setting a default printer. After further investigation I found that the problem occured after I changed the CUPS configuration to enable remote administration.

Original configuration from cupsd.conf:

# Only listen for connections from the local machine
Listen localhost:631
Listen /var/run/cups.sock

Modifed configuration to enable remote administration (not working):

# Only listen for connections from the local machine
Listen *:631
Listen /var/run/cups.sock

It seems that Java needs to connect to the CUPS service using localhost, so to enable remote administration and also provide localhost connection for Java:

# Only listen for connections from the local machine
Listen localhost:631
Listen /var/run/cups.sock
Listen 192.168.0.100:631

I still don't understand why using Listen *:631 can't provide localhost connection for Java so my workaround is to add configuration to listen for my server ip address.

Here's my Java code that I used to query the CUPS printer

public class TestPrinter {
    public static void main(String[] args) {
        PrintService[] printServices = PrintServiceLookup.lookupPrintServices(null, null);
        System.out.println("Number of print services: " + printServices.length);

        System.out.println("Available printer: ");
        PrintService mPrintService = null;
        for (PrintService printer : printServices) {
            System.out.println(printer.getName());
        }

        PrintService defaultPrinter = PrintServiceLookup.lookupDefaultPrintService();
        if (defaultPrinter != null) {
            System.out.println("Default printer: " + defaultPrinter.getName());
        }
    }
}


Xubuntu 12.04: replace Thunar with Nautilus in Places plugin

I just installed Xubuntu 12.04 and found that if you install Nautilus and then use Docky as a dock or panel, the Docky Bookmarks applet will open your places in Nautilus instead of Thunar.


How can I reset ssh passwords in nautilus?

I use the seahorse utility to manage the passwords. Under the login search using the filter for the server name and the right click on the server name to change the password.os

To run the utility type at the command prompt

seahorse


Corrupted hard drive - how can I rescue my files?

Boot with the live CD, then access the partition via the file viewer (called nautilus).

Click on XXXGB Volume:

Then navigate to home - <username> then your document, and copy it across to a USB.

Then reinstall from the live CD.


How to change chromium-browser indicator icon?

I found that I didn't need to copy into a theme folder. Try this command:

sudo cp /home/USERNAME/Bilder/Kram/chromium-browser.svg /usr/share/icons/chromium-browser.svg

And it may detect it straight away. If not, press Alt+F2 and type r then Enter.


Updating when running off USB stick makes it unbootable?

You shouldn't have a problem updating your install as normal. So no the ability shouldn't be disabled.

If you are having problems with this I suggest reporting a bug. Whilst running Ubuntu press Alt+F2 and type ubuntu-bug. This will attach harware information to your report.


Can someone point me to a good resource for Ubuntu Studio, Jac, Ardour, LMMS, QTractor, etc?

There are no good video tutorials that i know of yet for setting up JACK using the new Ubuntu Studio Controls settings
Previous ways of starting JACK using qjackctl or similar are a bit more complex
and may confuse more than help

Ubuntu studio has an Audio Handbook guide to most of the basics of using JACK and relevant packages
There is also the AV Linux manual but it is a slightly different distribution to Ubuntu Studio using different packages, but may have some useful general information

There is only one additional step required in your suggested workflow, which is to have JACK audio server running before loading any packages that need it

working out the JACK settings in Ubuntu Studio Controls is the first and least trivial part. once you have everything running it can be set to run from when system is booted, or started and stopped when needed


DMAR: Failed to map dmar0 al boot - "Bios broken" issue

Disable bios Intel virtualization technology. I was having the same problem.
I tried:

Using only one stick of ram;
Externally flashing bios using usb bios flash tool;
Putting hdd in ide and ahci mode in bios.

Always the same problem until I disable Intel virtualization technology.


This is from Dropbox help page:

dropbox stop
dropbox status  # Should report "not running"
rm -rf ~/.dropbox-dist
rm -rf /var/lib/dropbox
rm -rf ~/.dropbox*
sudo apt-get remove nautilus-dropbox
sudo apt-get remove dropbox
rm /etc/apt/source.d/dropbox


If you are not specifying user@host:/var/www as the destination path you're going to run into this issue.  Note that the user you upload as MUST have access to write to the directory.

Assuming that the user has write permissions to /var/www, then make sure your scp command follows this general pattern, with [options] being replaced by whatever options you need:

scp [options] /local/path user@remotehost:/remote/path

Replace the local path and the remote path with the actual paths though.

IF YOU DO NOT WANT TO HAVE THE UPLOAD IN YOUR HOME DIRECTORY, DO NOT USE ~ AT ALL FOR THE BEGINNING OF THE REMOTE PATH!

~ is a shortcut to add /home/$USER to the path if it appears at the beginning of a path, and is the exact reason you're running into this "Uploading to Home Directory" issue, based on your comment on your question.  Just do user@host:/var/www like I specified in my answer here for the remote path.


WiFi Not working in After Installation in ubuntu 16.04

Open terminal and restart network manager
sudo service network-manager restart

There is something wrong with dnsmasq in Mint 18 and 18.1
Just edit /etc/NetworkManager/NetworkManager.conf and change dns=dnsmasq to #dns=dnsmasq.


Press Ctrl + Alt + F1 and log into the terminal.
Unistall all currently installed nvidea drivers:

sudo apt-get remove --purge nvidia-*
Reinstall drivers:

sudo apt-get remove --purge xserver-xorg-video-nouveau xserver-xorg-video-nv
sudo apt-get install nvidia-common
sudo apt-get install xserver-xorg-video-nouveau
sudo apt-get install --reinstall libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core
Finally reconfigure the X server:

sudo dpkg-reconfigure xserver-xorg
Reboot:

sudo restart now


how to encrypt a dual booted Ubuntu and win7 system

If your windows 7 running with Enterprise/Ultimate you can use Bitlocker to encrpyt it and for Ubuntu you can use LUKS,


As you've found out already, the Gwibber API deals only with posting content to social networks.

If you want to host media such as pictures, on an external service, you'll need to find a public hosting service that has an API, get the public URL for the media item and pass it to Gwibber.

There are multiple services that you can use. I would recommend using Ubuntu One, but you can also probably use imgur.com or something else.


Most elegant way to add ppa through script

This isn't exactly Code Review but here we go.

Don't parse the output of ls!

ls /etc/apt/sources.list.d/*.list | xargs ...

Please don't do this. See the link in the section title for an explanation why and possible alternatives. The easiest and most elegant solution here would be to use shell globbing to generate the items to iterate over in a for loop:

for l in /etc/apt/sources.list.d/*.list; do
    uniq "$l" | sudo tee "$l"
done

Transforming files in-place

We all know that reading a file with one program and redirecting the output back into that same file likely results in an empty file. Throwing tee in between helps a little because it buffers input for a while until it writes it to its output, but that's an implementation detail that may fail with different tee implementations and/or different kernels. It also fails as soon as the size of the output exceeds the size of the buffer. Instead you should use something like

uniq "$l" | sudo sponge "$l"

or possibly

sudo sed -i ... "$l"

if you can find an appropriate sed script to do the job.

Both have the added benefit that they don't also write the input to the standard output, but you can suppress that with >/dev/null anyway.

Does uniq really find duplicate Apt source lines?

Looking at sources.list(5), Apt source lines can contain multiple “components”. The following sources files are equivalent but not identical:

single, multi-component line:

deb http://de.archive.ubuntu.com/ubuntu/ trusty-security main restricted

multiple single-component lines:

deb http://de.archive.ubuntu.com/ubuntu/ trusty-security main
deb http://de.archive.ubuntu.com/ubuntu/ trusty-security restricted

It should be obvious that therefore uniq cannot find all duplicate Apt source lines. However, since repositories on ppa.launchpad.net don't support multiple components, you may get along if you only use PPAs from that site. Additionally, duplicates may be spread over multiple files, which breaks this approach entirely unless you rely on the fact that add-apt-repository manages source files somewhat intelligently and puts exactly one PPA in each file.

While it's possible to write a Bash program that takes multi-component lines into account when checking for duplicates, it would be better to use existing software libraries to parse Apt source lines instead of rolling your own solution. One such library is the aptsources module of Python (packaged in python-apt or python3-apt). You can find an example of its use in apt-remove-duplicate-source-entries (originating from the question How can I automatically fix W: Target Packages … is configured multiple times?).


The latest version appears to be 3.8.3 and the Gnome3 PPA currently holds version 3.8.2 while official 13.04 repositories hold 3.6.4. You can add the Gnome3 Team's ppa with:

sudo add-apt-repository ppa:gnome3-team/gnome3

It is likely that you will pull in some other Gnome 3.8 bits as well, so be prepared for the possibility of some clashes.


Constantly occurring dialogue box asking for authentication

This is most likely Gnome rather than core Ubuntu, but you can disable the notification completely with this:
gsettings set com.ubuntu.update-notifier no-show-notifications true

This will not affect your ability to update/upgrade when you choose to do so.


Try:

  sudo apt-get remove libreoffice-gtk

It will remove the global menu bar and replace it with a basic one, but it might give you functionality. That worked for me anyways.

You can also try getting updates - there may have been a bug fix for it:

  sudo apt-get update

Or just use the GUI updater.


Is the tilde, `~` considered to be a relative path?

Bash only expands a ~ if it's the beginning of a word. You can see this between the following commands:

$ echo -extract=~/test
-extract=~/test

oli@bert:~$ echo -extract ~/test
-extract /home/oli/test

Bash looks for standalone ~ characters and ~/ for this substitution. No other combination or quoted version will work.

$HOME works because variable substitutions are more robust (the $ is a special character whereas ~ is very much less so):

$ echo Thisisastring${HOME}awrawr
Thisisastring/home/oliawrawr

While we're talking about ~, it actually has another couple of other substitution uses:

~+ the current working directory (read from $PWD)
~- the previous working directory (read from $OLDPWD)

As with plain ~, these can have additional paths tacked on the end, and again, these have to be the prefix to a word or Bash will ignore them.

You can read more about this in man bash | less -p '   Tilde'


Just installed Ubuntu for first time, booted fine at first but now won't boot

Looks like something may have been corrupted for some reason when it installed.

Try this:

Boot from the Ubuntu Live CD;
Open/Run Terminal.
Type:

sudo fdisk -l

Press Enter. You should get an output like the one below:

What we're looking for here is the device name of your hard drive. If you only have one hard drive, typically it will be /dev/sda. We just need the first letters of the drive, the number isn't as needed for this situation.

Type:

sudo fsck /dev/sda (or your device name)
Then press ENTER.
Restart the system and boot normally.

Read more: http://pinoy-computing-tips.blogspot.com/2010/08/how-to-fix-ubuntu-error-no-init-found.html#ixzz48xV8Q2Nn


nc: Proxy error: "HTTP/1.0 403 Forbidden"

You're trying to proxy the SSH connection over a squid HTTP proxy, see your proxy command:

connect -x 192.168.5.254:3128 162.251.80.25 22

The HTTP proxy is the one refusing your connection. You'd have to look at that server's configuration (or ask the administator) to see why it's rejecting your attempts.


Cannot load Ubuntu image in VirtualPC in Windows 7

Ubuntu runs nicely in all kinds of virtualization tools. If VirtualPC doesn't work, then you should contact Microsoft. This site supports Ubuntu, not Windows. You should probably try VirtualBox instead.


Ubunt 16.04 Cuda 8.deb unmet dependencies error

I hope you have already succeeded. I got the same error and eventually succeeded.

What I did following the commands you cited:

I removed the two packages that I have just installed:

# apt list --installed | grep -i cuda
cuda-repo-ubuntu1604-8-0-local-cublas-performance-update/now 8.0.61-1 amd64 [installed,local]
cuda-repo-ubuntu1604-8-0-local-ga2/now 8.0.61-1 amd64 [installed,local]

# apt remove cuda-repo-ubuntu1604-8-0-local-ga2
# apt remove cuda-repo-ubuntu1604-8-0-local-cublas-performance-update
# rm /etc/apt/sources.list.d/cuda-8-0-local-ga2.list
# rm /etc/apt/sources.list.d/cuda-8-0-local-cublas-performance-update.list

In the CUDA Toolkit 8.0 - Feb 2017 download web page, this time, I choose Linux -> x86_64 -> Ubuntu -> 16.04 -> deb (network), instead of deb (local). Then installed the downloaded deb package (2.6K byte)

# dpkg -i cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
# apt list --installed | grep -i cuda
cuda-repo-ubuntu1604/now 8.0.61-1 amd64 [installed,local]

It installed a file pointing to the CUDA network repository.

# cat /etc/apt/sources.list.d/cuda.list
deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 /

Now, tried again to install CUDA 8:

# aptitude install cuda-8-0
...

# apt list --installed | grep -i cuda
cuda-8-0/unknown,now 8.0.61-1 amd64 [installed]
cuda-command-line-tools-8-0/unknown,now 8.0.61-1 amd64 [installed,automatic]
cuda-core-8-0/unknown,now 8.0.61-1 amd64 [installed,automatic]
...

Installation of CUDA Toolkit 8.0 has succeeded without any dependency error.

What I have learned

It seems that installation of cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64.deb sets up a CUDA local repository in the directory /var/cuda-repo-8-0-local-ga2 and /etc/apt/sources.list.d/cuda-8-0-local-ga2.list points to that repository. apt-get install cuda will then take deb packages from that directory. I guess there seems somewhat missing packages related to the dependency requirements in that repository. In contrast, the CUDA network repository might have more packages compared to such a local repository, which will solve dependency requirements. That is just my guess, though.

As of today, December 2017, aptitude install cuda will install cuda-9.1, so we will need to explicitly specify cuda-8-0 if we use CUDA 8.

Just additional information. I mistakenly removed a signing key for the CUDA repository and faced an error during apt-get update.

# apt-key del 7FA2AF80
# apt-get update
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F60F4B3D7FA2AF80
  ...

Reinstalling it has solved this small problem.

# wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
# apt-key add 7fa2af80.pub
# apt-get update
Reading package lists... Done

I hope this post help those who encounter the same errors. Thank you.


digiKam
Add all the photos to your collection. In the menu, select Tools / Find duplicates. This will look for duplicates across your whole collection.
findimagedupes
A command line tool. Pass all the images you want to compare on the command line.
Geeqie (formerly GQview)
In the menu, select File / Find duplicate. Drag and drop image files do the duplicates window. You can drop directories to add their contents recursively. For visual comparison of images, there are specific, non-default options on a drop-down menu. The "custom" level of similarity allows restricting pairings only to the highest degree of similarity, but it has to be set on Preferences as 99. Even then, it does not work perfectly at least for some kinds of images, like line-art. It unfortunately does not provide an automatic selection mechanism with rational criteria, such as resolution, date or whatever, the automatic selection seems to just randomly just pick the first image found as the reference to preserve. Deleting many images can be extremely slow, as it tries to update the result count at every delete.

All three of these tools find visual duplicates, not just files that are identical byte for byte.


I also had the same problem, it crashed when I answered. You are probably missing a library. This is required, yet only if you run 64-bit Skype you would have to install it manually. Install by doing the following:

Open a Terminal emulator and enter the following command and hit enter.

sudo apt-get install libasound2-plugins:i386

Enter your password and let it install. After this you should be able to receive calls in Skype.


How to edit a backported package before uploading it to a PPA?

Even though there's -w option that tells backportpackage to preserve the working directory, there's still no way to tell it keep the unpacked (and modified) sources as well. So here's what worked for me:

Copy the program locally to modify it:

cp /usr/bin/backportpackage ~
Open the local file and find do_backport function. Its last line should look like

shutil.rmtree(srcdir)
Delete that line, save the file, and run the script as you normally do it, make sure to provide -w option to specify the working directory.
Go to the working directory. There should be sub-directory with the name like <package>-<dist>, e.g. gcc-xenial.
cd to that directory, do whatever changes you want to do.
Make a debian package. Sign and upload the result:

debuild --no-lintian -S -nc -uc -us -sd

debsign ../<package-version>_source.changes

dput -u ppa:<user>/<repo> <package-version>_source.changes


You can try Keep.Awake instead of Caffeine https://launchpad.net/keep.awake

I haven't developed a GUI for it yet so you will need to use the command prompt.

I still haven't gotten around to creating a snap or deb for it. However temporarily you can download the program from Launchpad here

The current version is stable and works on all Ubuntu versions from 14.04 up to 16.04. That said I am continually improving it and will be adding new features.

It works like a proper command. Type --help to see a full listing of what can be done. The examples underneath are only a few:

./keepawake.py --help

To run interactively:

./keepawake.py

To run as a background service:

nohup ./keepawake.py -r > /dev/null 2>&1 &

To run as background service and set 15 min (900 sec) as the user activity idle time before it determines that the user is idle:

nohup ./keepawake.py -u 900 -r > /dev/null 2>&1 &

To run as background service and set minimum CPU load as 13%:

nohup ./keepawake.py -c 13 -r > /dev/null 2>&1 &

To run as background service and set minimum network traffic as 5KB (5120 bytes):

nohup ./keepawake.py -s 5120 -r > /dev/null 2>&1 &

To run all three settings above (network, CPU, User idle) in the one go:

nohup ./keepawake.py -s 5120 -c 13 -u 900 -r > /dev/null 2>&1 &


How to install Ubuntu 15.10 to a new SSD and create an easy dual boot menu?

It seems like duplicate of Installing Ubuntu on a Pre-Installed Windows with UEFI but I think there is a little difference, You are installing to different drives.

Create UEFI ubuntu format media and install to SSD by following the link above. Don't touch anything on your HDD, Grub2 automatically takes priority on bios, it automatically founds other bootable systems on your pc's all drives. If it doesn't, you can find manually after installation.

Or You can set Windows Boot Manager to first boot option on bios, other users can easily start Windows, You can use boot options to start Ubuntu.


Automount problem when mount point in user home directory

I assume (because /dev/mapper/cryptswap1 exists) that you have an Encrypted Home Directory, like I do.

On MY system,

$ df -h | grep /home
df: /run/user/1003/gvfs: Transport endpoint is not connected
/dev/sdb6          289G  243G   31G  89% /home
/home/w3/.Private  289G  243G   31G  89% /home/w3

$ mount|grep /home
/dev/sdb6 on /home type ext4 (rw,relatime,data=ordered)
/home/.ecryptfs/w3/.Private on /home/w3 type ecryptfs (rw,nosuid,nodev,relatime,ecryptfs_fnek_sig=e377cfa845240aa1,ecryptfs_sig=5fa903fe1f605483,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_unlink_sigs)

because I'm logged in, my unencrypted HOME directory is decrypted and mounted on /home/w3.

On your system, at the time that auto mounts are done (in /etc/init.d/mountall.sh), you are NOT logged in, your HOME directory is NOT decrypted nor mounted, and your mount point /home/pete/DataStore does not exist. mount is sad.

Remove the auto, and drop a little script/.desktop file in ~/.config/autostart to do the mount after you log in.


Thanks to @Rinzwind

Goto the link
Find your time zone (in my case it is Asia/Karachi)

Open your php.ini ( sudo gedit /etc/php5/apache2/php.ini
 ) and find( ctrl+f ) "Date"
Add your timezone

And you are done !


Startup disk creator won't add new files

Try

sudo apt-get purge startup-disk-creator

sudo apt-get autoremove

sudo apt-get install startup-disk-creator


I need help installing Openmeeting 3.1.5

No, MATE is not be required. They have instructions on their website on how to install OpenMeetings 3.1.5 on Ubuntu 16.04.

Installation OpenMeetings 3.1.5 on Ubuntu 16.04 LTS

It seem to be very extensive to install.


Try this:

sudo apt-get install gdisk

This works because, while the error message the OP cited says a number of things, the key part is:

  Failed to execute child process "sgdisk" (No such file or directory)

So, assuming the issue is that sgdisk is not installed, it can be installed via the gdisk package. It worked for me.


What is temp sensor pch_wildcat_point-virtual?

The Lenovo x1 carbon has an Intel H97 PCH (Platform Controller Hub), which was codenamed "Wildcat Point" during development. This "system on a chip" performs functions such as I/O (input/output) on the Gigabit LAN, SATA, PCIe & USB port and also contains various timers and controllers.

It has an internal temperature sensor located near its hottest point (the interface to the CPU) and sensors is reporting this. So the temperatures reported on your output (in descending order) are the CPU, the PCH, the CPU again, processor core 1 and processor core 2.

If you are interested its datasheet is here Intel series 9 chipset datasheet


In order to make a live drive, {DVD/USB/memory card}, you start from a downloaded iso file.

You can find official instructions via this link.

Burn from the iso file to a DVD disk with for example k3b. (Do not make a data DVD and copy the file to it. 'Burn' means 'raw copy' so that the content of the iso file, several directories and files, will be 'visible', when you look at the DVD disk.)

Clone from the iso file to a USB pendrive or memory card with

Ubuntu Startup Disk Creator,
Disks (alias gnome-disks) or
mkusb.

Users who have no Ubuntu yet, but start from Windows can use Rufus to create a USB boot drive or memory card.


sudo: /etc/sudoers is world writable sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin

Error message is self explaining.
You should change permissions of /etc/sudoers, but root is needed for that so do from recovery mode:

chown root:root /etc/sudoers
chmod 0440 /etc/sudoers

Check content of file, make sure your username is there, so you allowed to use sudo. Thats all. reboot


Unsupported locale prevents me from starting apps

There is no latin1 locale generated on your system, but still you have assigned LANG such a locale name. You should edit /etc/default/locale. I suppose that it - for some reason - contains the line

LANG=es_ES.ISO-8859-1

Change that line to

LANG=es_ES.UTF-8

and reboot.


How to dual boot Ubuntu 13.04 with Windows 8 on Lenovo Y500 using EasyBCD?

One thing I found is that sometimes when you install from USB, the installer assigns sda to the USB instead of your hard drive.  Subsequently your partition table is all messed up. You may want to check that.  Generally I try to install from the CD to avoid this issue.

When I did install 13.04 (to dual boot with Win8) I had to go into the BIOS settings to change which drive boots first.  Note I am trying to get GRUB to manage the boot, not Windows so we're different here.

What I have right now is that if I boot normally I get the GRUB menu which loads Ubuntu fine, but if I select Windows 8 from GRUB it fails to load Windows.  If I boot the laptop using the menu button on the side I can select the Windows partition (using the Lenovo's boot order option) and Windows 8 will load fine (bypassing GRUB).  So not an ideal situation but it at least works somewhat.

So I can't answer your question directly but hopefully my somewhat similar experiences will help you.

I'd be interested to know how you set Windows to manage the boot process, though.


Edit 50-synaptics.conf file :

sudo nano /usr/share/X11/xorg.conf.d/50-synaptics.conf

Add the following line:

MatchIsTouchpad "on"

Option "TapButton1" "1"

Like this:

Section "InputClass"

Identifier "touchpad catchall"
Driver "synaptics"
MatchIsTouchpad "on"
Option "TapButton1" "1"
Option "VertEdgeScroll" "1"

Save , exit and reboot


Ubuntu upgrade from 16.04 to 18.04 in AWS EC2

So should I upgrade this to Ubuntu 18.04

No. NEVER EVER upgrade a cloud instance. NEVER. Remember: ssh access is the only access you have. If that breaks your instance is gone and you depend on backups and a new instance to get back up running. It is not worth the risk.

or let my server run in 16.04.

Yes. And is is not a server, it is a cloud instance.

You have 2 disks, and if you do not fix your instance by separating system and personal files.
So ...

a system disk holding 16.04
a personal disk holding all your data.

The correct procedure:

detach your personal partition from the 16.04 instance
create a copy of your personal disk
create a new instance using 18.04 or 20.04
attach the copy to this new instance
boot and fix issues regarding software you have installed. Apache is normally not a problem. MySQL in 20.04 will have issues: 20.04 uses MySQL 8 so things changed. You can however install 5.6/5.7 if you want and use that.


Cannot get authorization to run pg_dumpall

All the mentioned failures are expected to happen, given the context, except that one:

malikarumi@Tetuoan2:~$ pg_dumpall > 9-4-backup -U postgres
Password:

Here you report a failure, but in the other situation below:

malikarumi@Tetuoan2:~$ psql -U postgres
Password for user postgres: Note the password works with psql

you report a success.

But that doesn't add up. The same password must work just as well for pg_dumpall in the precise context you mention, that is:

the auth schema is set to md5 in pg_hba.conf (before you change it in the rest of the post).
the target database user is postgres through the -U postgres option.
the command is called the shell from your own unix user malikarumi.

After you successfully change the auth scheme to peer (last part of your question), what goes wrong is that you try su instead of using sudo, the latter being the recommended method on Ubuntu.

Use this command at the shell prompt:

malikarumi@Tetuoan2:~$ sudo -u postgres pg_dumpall >9-4-backup

It will ask for a password, displaying something like:

[sudo] password for malikarumi:

Note that it expects your password, the same you use when opening your session under the malikarumi name, as opposed to the password of postgres, or a database password.

sudo -u postgres somepostgrescommand is just a variant of the sudo someadmincommand you're allowed to do if you're the admin of this Ubuntu workstation.


Pidgin not present in 12.10 repositories, how do i get one?

I suspect something may be wrong with the archive server.

Run sudo software-properties-gtk and select a different server/mirror, preferably the nearest one geographically.
Pidgin is most definitely in Quantal, and should be downloadable from alternative servers.


What is the function of the nohup command?

Let us consider you have opened a  gedit text editor from a terminal and working on it. If you close the terminal before closing gedit, the gedit also gets closed as soon as closing the terminal. So what is going on here? The gedit runs as a child process under the terminal. When you close the terminal a hang up signal (SIGHUP) is sent to the process which kills the child process.

On the other hand if you want your child process (here gedit) to keep on running even after closing the parent terminal, you would want your process immune to hangup signal. So that closing the terminal do not close the child process. nohup does exactly this job.

nohup does not disconnect a command from terminal, it makes your script ignore SIGHUP, and redirects stdout/stderr to a file nohup.out, so that the command can continue running in the background after you log out. If you close the shell/terminal or log off, your command is no longer a child of that shell. It belongs to init process. If you search in pstree you'll see it is now owned by process 1 (init). That cannot be brought back to the foreground because the foreground no longer exists.


Why is Python 3.6 not available via official Ubuntu repositories?

I guess you didn't read that question carefully, The answer to your question is No, it's not going to be available it Ubuntu 16.04 at all.

For 16.04, Python 3.5 is in frozen state, the only updates for python 3 you get is patches for 3.5.

So your final assumes is true:

  Packages are frozen and only bug fixes and security issues results in updates...


Checking HD SMART status on a fresh install

Run (Alt+F2) palimpsest (or start Disk Utility from the desktop) and look for the health check feature.


This answer is a way to fix your problem but the origin of your problem is that you removed the dpkg's file manually.

sudo apt-get purge phpmyadmin

sudo touch /usr/share/dbconfig-common/dpkg/postinst.mysql

(Do it for every file that is missing)

Then sudo apt-get autoremove

sudo apt-get install phpmyadmin


Try to do precisely the opposite :

Put your Ubuntu PC in Bluetooth discoverable mode
Pair it from the other device (your mobile phone) by following its normal procedure

Does that help ?


How to recursively set permissions for files only?


Why do I get this unusual PowerTop readings?

You can instead generate an html report that will give you the basis to optimize your settings. Run:

 sudo powertop --html

It will generate an html inform, which will have an "Tunning" section with all the optimization you could do to your system:


Unity won't load at login, but starts in Classic after running unity --reset

I had to do a clean install from a Live-CD to get a working install. As an online upgrade, both metacity and unity were never started.


Quake-style terminal with splitting in Gnome other than Yakuake

Try Guake with tmux to get the splitting feature.

For Ubuntu 14.04

Terra can be made to run on Ubuntu 14.04. See this answer for details

For Ubuntu 13.04 and older

Alternatively there is a new experimental project called Terra.

  Terra is a GTK+3.0 based terminal emulator with useful user interface,
  it also supports multiple terminals with splitting screen horizontally
  or vertically.

Quick installation:

sudo add-apt-repository ppa:ozcanesen/terra-terminal
sudo apt-get update
sudo apt-get install terra

For more information check out the WebUpd8 article.


Dual boot Windows 10 & Ubuntu 16.04 -- blank purple screen of death when booting Windows!

If you have Windows startup repair cd for Windows 10.Then used it to solve this problem.This already happen to me , I solved this using this method


'locate' command in terminal. Why is it so fast?

The system creates a data base of all the files in the computer. So when you search trough locate the command doesn't really checks the whole file-system but only the database, it does a binary search algorithm which is fast like looking up a word in a dictionary.  That's why it's so fast (and handy).

Such database is updated regularly; you may have seen it work sometimes when you install a new package: updating mlocate.... You can find more information about how it works by executing in a terminal:

man locate

man updatedb


Virt-Manager can't connect to graphical console

In working to try to Merge the latest virt-manager 1.4.0 to Ubuntu I came across this same issue.  It does not appear to be a bug in virt-manager just a change how it sends display data to VMs.

I've opened a bug to add the necessary permissions to libvirt which is where the apparmor profiles are defined - https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1668681

To fix this issue without disabling security append:

# allow connect with openGraphicsFD to work
unix (send, receive) type=stream addr=none peer=(label=/usr/sbin/libvirtd),

to the file /etc/apparmor.d/abstractions/libvirt-qemu but not in the qemu-bridge-helper section. (So right after "owner @{PROC}/0-9*/fd/ r,")

Then reload the profiles with sudo systemctl reload apparmor.

Having said all that, I always do recommend using the packages from our archive for best support.


After installing ubuntu 12.04.2, I can't load windows 8

I also got this problem when I installed Ubuntu 64 bit (12.10) and you also like me messed up the Windows 8 boot partition. So now your only options are:

Re-install winidows 8
Fix the windows 8 boot

See also:

http://www.techspot.com/guides/630-windows-8-boot-fix/
http://www.redmondpie.com/how-to-fix-windows-8-mbr-master-boot-record/


You can make it work under Ubuntu 13.10 and greater.
First You have to manually download the package for Raring version from here:
Terra PPA.

Then, install the package with

sudo dpkg -i terra_0.1.7~raring1_amd64.deb

Then comment the lines 152, 156 and 165-166 in the file

/usr/lib/python2.7/site-packages/terra/VteObject.py

Here is how that portion of VteObject.py looks:

    #self.vte.set_background_saturation(ConfigManager.get_conf('transparency') / 100.0)

    self.vte.set_opacity(int((100 - ConfigManager.get_conf(('transparency'))) / 100.0 * 65535))

    #self.vte.set_background_transparent(ConfigManager.use_fake_transparency)

    self.vte.set_word_chars(ConfigManager.get_conf('select-by-word'))

    self.vte.set_colors(
        Gdk.color_parse(ConfigManager.get_conf('color-text')),
        Gdk.color_parse(ConfigManager.get_conf('color-background')),
        [])

    #self.vte.set_background_image_file(
    #    ConfigManager.get_conf('background-image'))

Terra will work after this, but you will not be able to adjust the transparency or set a custom background.

As per mario947's answer, adding the following to line 473 of /usr/lib/python2.7/dist-packages/terra/terminal.py will allow you to adjust the transparency. You will need to restart the terminal process every time you adjust the transparency to see your change, however.

self.set_opacity((ConfigManager.get_conf('transparency')) / 100.0)

The surrounding part of that file should look like:

def init_transparency(self):
    self.set_app_paintable(True)
    visual = self.screen.get_rgba_visual()
    if visual != None and self.screen.is_composited():
        self.set_opacity((ConfigManager.get_conf('transparency')) / 100.0)
        self.set_visual(visual)
    else:
        ConfigManager.use_fake_transparency = True


Cloning Ubuntu Server: Why is the network card disabled on clones?

Check to see if you have this file:

/etc/udev/rules.d/70-persistent-net.rules

There is probably an entry for the MAC address of the original machine assigned to eth0. When you clone this to another machine, it doesn't see that MAC, so it creates a new entry and calls it eth1.

The solution is to delete this file from the original machine before making the disk image. After cloning, when the new machine first boots, it will create this file if it's missing. Each machine will have a different MAC, but the associated nic will be called eth0 every time.


BigBen wireless gamepad does not connect

tips is a good treat to search google with the id of lsusb with this type of problem exam... 1a34:0801

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


That's not a feature of the GNOME Shell (tour) used as the Ubuntu 18.04 Desktop.  A search of 256 Extensions presented by a search there on lock an icon found none which offers that capability.

I also looked in the GNOME Tweaks AKA GNOME Tweak Tool (more) (and more) (still more)  which did not have that feature.


Samsung netbook N150Plus screen brightness not working

With installing the  Voria-Tools we can overcome limitations of a standard Ubuntu installation on Samsung netbooks. Just add the following ppa to your sources:

ppa:voria/ppa

and install samsung-backlight from there. You may also find other interesting tools ther to control your Samsung netbook.

In case the functions still do not work properly I suggest you contact the Voria team to help them solve the problem.


Problem with wi-fi. Broadcom Corporation BCM4313 802.11bgn Wireless, Ubuntu 14.04

Since you have a Broadcom radio I recommend the following

hook up your laptop to an Ethernet cable to get it online.

Open a terminal and I want you to install this package:

http://packages.ubuntu.com/source/trusty/bcmwl

sudo apt-get update

(updates our package list)

sudo apt-get install bcmwl-kernel-source

(installs the package itself)

This should only take a few minutes. Once done close all open programs and reboot. When your computer comes up wait a good 30 seconds and check the wireless using the network icon in the panel. If you don't see anything you may need to try toggling the wireless with a physical switch located on your laptop somewhere.


What is the difference between running a certain command in terminal and a Thunar action command that opens a terminal and runs the first command?

On my system, the Thunar custom actions seem to call the command with bash and makes the use of xfce4-terminal superfluous.

Try the following action instead:

cd %f && pdftoppm -png *.pdf prefix

You get the I/O Error: Couldn't open file '*.pdf': No such file or directory. message as your selection is now a directory and the current directory is then one level up.

So you need to first cd into the target before running the pdftoppm command.


What Updated Web Cache Servers are available (Caching HTTP Proxy)

The official Ubuntu web proxy caching server is named squid!

Squid is a full-featured web proxy cache server application which provides proxy and cache services for Hyper Text Transport Protocol (HTTP), File Transfer Protocol (FTP), and other popular network protocols. Squid can implement caching and proxying of Secure Sockets Layer (SSL) requests and caching of Domain Name Server (DNS) lookups, and perform transparent caching. Squid also supports a wide variety of caching protocols, such as Internet Cache Protocol, (ICP) the Hyper Text Caching Protocol, (HTCP) the Cache Array Routing Protocol (CARP), and the Web Cache Coordination Protocol. (WCCP)
The Squid proxy cache server is an excellent solution to a variety of proxy and caching server needs, and scales from the branch office to enterprise level networks while providing extensive, granular access control mechanisms and monitoring of critical parameters via the Simple Network Management Protocol (SNMP). When selecting a computer system for use as a dedicated Squid proxy, or caching servers, ensure your system is configured with a large amount of physical memory, as Squid maintains an in-memory cache for increased performance.

Installation is as easy as typing...
sudo apt-get install squid
(then all you need is to configure it ... and that can take care of the rest of your life since it got 1000s of options ;-) )

Ubuntu serverguide
Ubuntu community page
Official website

There is also squidguard that can help with content filtering and access if you also need something like that (best method to lower bandwith consumption is to block access to certain websites ;) )


Why do I get a "volume with software packages has been detected" dialog every time I log in?

This happens because you have:

An Ubuntu install CD (or Live-CD) in your CD drive
or, an Ubuntu LiveUSB plugged into your computer

Please eject and remove all CDs and any USB drives, and then try starting your computer. The message should no longer appear.


Shutdown/suspend/hibernate not working correctly

(comment from OP solved issue)

I compiled a new kernel and the problem disappear :) thanks u all. – eyadof Mar 9 at 15:25


Try first backing up, then editing the plasmavaultrc file in ~/.config/plasmavaultrc and removing the entire section that has the offending vault as the header in brackets, e.g. [/home/user/.local/share/unwanted.enc]
Then log out and in.


Encrypted home folder and programs working while screen is locked?

Your homedrive gets "decrypted" at the time you login. When you lock your screen you're still logged in, so your homedrive is unencrypted and programs wich have the permission to access your homedrive can access it.


The messages are self explanatory.

By design sudo related files and libraries should only be readable (and writable if needed) by root.

The directory /var/lib/sudo contains individual user's sudo related data, which could be easily read/modified if a non-root user have sufficient permission, which is of course a security issue.

The file /etc/sudoers.d/README contains info regarding implementation of sudo. Imagine a rogue user edit the file and add false info (and you follow that).

So, in a nutshell, fix the permissions:

sudo chmod 0400 /etc/sudoers.d/README
sudo chmod -R 0700 /var/lib/sudo  ## Recursively

And of course make sure the owner is root (and group root).


Internet connection monitor with logging

You can run a simple ping command to accomplish this:
ping -i 60 domain.com > ouput.txt

where 60 is the time between pings. To limit the total count of pings use :
ping -i 60 -c 50 domain.com > ouput.txt

where 50 is the number (count) of pings.
There are many more options to read about on the man page of ping. To access it use:
man ping

If you want more in-depth statistics on all traffic of one machine I recommend to use an application such as wireshark. It is open-source and free.
Wireshark can give you exact statistics on each packet of data sent and/or received by your computer. So if you only want to see if general connectivity is available I would consider this a little much. It can also be hard to figure out what to do with all this output from wireshark.
PS. some suggestions to ping (these are very reliable and fast but don't overdo it or they might ban your IP):
1.1.1.1     (cloudflare DNS)
8.8.8.8     (google DNS)
google.com


How to work around keyboard layouts requiring Alt key which are also keyboard shortcuts in LibreOffice?

As I have checked /usr/share/X11/xkb/symbols/in XKB symbols definition for Bolnagri Hindi alternative. It does include level3(ralt_switch)

ie. it uses Right Alt (Alt Gr) to input 3rd position/level char where Left Alt (Alt) is used for shortcuts.

This applies for most keyboard layouts with extended symbols map. No need to remap shortcuts involving Alt key.


To validate that your hardware is supported,
when booting on USB, at boot prompt, choose the desktop session ("Try Ubuntu without installing").

If you manage to finish the boot, open a file manager (the "home folder" icon in the left bar), you should see that your XP partitions are mounted (and could check your files). T

After that start the installer ("Install Ubuntu" icon on desktop).

If it fails you can :

start a terminal and check for system messages with dmesg
look at the /var/log/installer/debug file

(and check in the forums  for a solution)

If you note some message complaining about the disks, there is a "disk check" option at boot, that's worth to be tried.

Good luck

Emman


What can I do to get my `138a:0094` fingerprint scanner working?

I have the same problem and have done too many searches to find the solution.

The direct answer: Unfortunately, until now there is no driver for our fingerPrint hardware model (ID: 138a:0094).

But, there is a group of Git developers, they try to do reverse engineering for this and some other fingerprint models. You can check the following link to get updates:

https://github.com/nmikhailov/Validity90

Good luck,


How can re-use Ubuntu which was installed via Wubi on Windows 7?

Don't uninstall Wubi - it will delete the virtual disk and completely remove your entire Ubuntu install. To safeguard this copy D:\ubuntu\disks\root.disk (and any other virtual disks) completely out of the D:\ubuntu directory.

You have a couple of options:

1.Reinstall Windows 7 and leave D: completely untouched. Then you'll have to use bcdedit or easyBCD to add back an entry for D:\ubuntu\winboot\wubildr.mbr and also copy the D:\ubuntu\winboot\wubildr file to C:\

2.
 Move the *.disk outside of the D:\ubuntu folder before deleting D:\ubuntu. Reinstall Windows 7 and also reinstall the same release of Ubuntu with Wubi again. Then before rebooting to complete the install, copy back the *.disk files back into the D:\ubuntu\disks folder. This works without any tweaking provided your partition numbering hasn't been altered (i.e. you haven't split C: or resized D: etc)
In that case, you'll need to manually tweak the grub menu entry to boot. That's a bit more painful but not too bad if you have someone helping.

However, since you have a dedicated D: partition for Ubuntu, you could just migrate your Wubi install to it. Most likely you had a bad burn on the CD and a bad ISO on the USB if you couldn't install from CD/USB before.

Edit: A bit more info to explain how a Wubi install boots

Wubi installs to the virtual disk - root.disk - and this is a fully contained bootable Ubuntu OS. But it needs to be jump started. So the windows bootloader calls wubildr.mbr (grub4dos) and this finds and transfers control to the first wubildr it finds in the root of any partition (C:\wubildr). Wubildr contains enough of grub2 to locate the root.disk - on any partition provided it is in the /ubuntu/disks/ directory. So that's why adding wubildr.mbr to the windows bootloader, and copying wubildr to C:\ works.

Wubildr will loopmount the root.disk and find it's /boot/grub/grub.cfg and present this as the grub menu. This is where the catch comes in. Up to this point, it doesn't matter which partition or drive anything has been on. The grub.cfg contains explicit drive/partition info and the UUID of the partition as well. If you've copied a root.disk from one partition to another it won't boot. If, as in your case, drive D: was unmodified, it will work fine. If e.g. you moved it to C: you'd need to make some changes.

e.g. if D: is /dev/sda2 and C: is /dev/sda1, then you'd hit 'e' on the first entry of the grub menu and change:

set root=(hd0,2) becomes set root=(hd0,1)

Delete the line - search --no-floppy xxx (as this overrides the previous set root command using the old UUID)

linux /boot/vmlinuz-xxxx root=/dev/sda2 ... becomes linux /boot/vmlinuz-xxx root=/dev/sda1 ...

This is a one-time override - hit CTRL+x to boot, and make sure you run sudo update-grub after booting to fix the grub.cfg menu so it works the next time.

PS there may be some variations. (hd0,2) could be (hd0, msdos2) or (/dev/sda, msdos2) depending on the version of Grub. Also root=/dev/sda2 may be root=UUID=xxxxx


For sure you need to install the latest Alienware 13R3 drivers. Especially flashing the BIOS and Thunderbolt 3. I think there about 10 drivers in total that will be out-of-date from a fresh Windows 10 install.

Secondly, read this ArchLinux setup for Alienware 13 lights and what not.

Thirdly, read this ArchLinux setup for Dell XP13 (9350) which shares the same Thunderbolt technology with Alienware. There is good information for updating Thunderbolt 3.

Unfortunately the TBT3 hotplug fix available since Kernel 4.7 hasn't been compiled into Ubuntu Mainline Kernels (as of 4.14.4). You could compile your own kernel with CONFIG_PCI_HOTPLUG=y.

Dell is now allowing you to update Thunderbolt 3 NVM in Linux starting with Kernel 4.13 and getting even better in Kernel 4.15.

Lastly, I noticed many good comments that couldn't be posted as answers because your question has been protected by the community.


arabic language are displayed as question mark

Not all locale's are available so we must generate them:

sudo locale-gen ar_SA.UTF-8

Change the locale

update-locale LANG=ar_SA.UTF-8 LC_MESSAGES=POSIX

then reboot


Mac Mini A1347 - Oct 2012 , 64 Bit question

it means you have a 64 bit mac, for example you have 8gb RAM, you will need a 64 bit OS for your RAM to work properly, unlike 32 bit where that only supports 4gb RAM and lower. so i have to say that you have a good computer to be 64 bit.


What log files should be examined to troubleshoot shutdown issues in relation to USB devices?

You seem to be assuming that there are a) log files and b) that those log files are persistent, or at the very least, rotated, rather than deleted at reboot or log in time.

Identifying which log file to look for is difficult, because you'd need to know which process or component is actually causing the problem. For example, it could simply be a bug on the client side, and not a system level process. The problem could be in gnome-session, gnome-settings-daemon, or indicator-session on the client side, none of which I think have log files, or necessarily use extensive logging in their code. They seem to just dump any warnings or log messages that occur, to STDERR or STDOUT, so you'd need to look at ~/.xsession-errors to see what they output. However, that file is replaced every time you log in, and I do not know that if it is rotated or not. You can enable more verbose logging by ensuring that G_MESSAGES_DEBUG=all is set in the environment, by exporting in ~/.profile or in a file added in the /etc/profile.d/ directory. It may or may not give you more information where you want it, though.

The best thing you can do in these situations is to first file a bug in the highest level component (where you're making the clicks, in this case, the indicator-session package), and see if the maintainers/developers can perform the same actions to get the same results, and work downward to the lower levels from there, with their help.


Is possible to boot Ubuntu with less than 128MB of RAM?

With those specifications not even the lightest of the Ubuntu GUI-less distributions would work. Ubuntu needs at least 128MB of RAM and 3.5 GB of Hard Disk. You might try use PuppyLinux or DammSmallLinux and see if you have luck. I don't make promises.


Screen flickering in Ubuntu 16.04 and 16.10

There are a few things you can try.

First you can check your video cable. Is it loose? Is it not working properly ? Is the refresh rate too high? This might not be a problem to Windows but it can for Linux.

Second you can check for drivers. Since this had happened recently, the Drivers might be the problem. Maybe you haven't updated it or a new update to the drivers caused this. If you could tell us your Graphics card/ Chipset model, we might be able to help.

Well there might be more things you can try but try this in the meantime. I hope this helps.


Pip is not working - ImportError: No module named 'pip' - but I installed it

You appear to have manually installed pip to /usr/local/bin/pip however the default location for the pip executable file that is installed from the default Ubuntu 17.10 repositories (python-pip) is /usr/bin/pip. The command sudo python -m pip install <package-name> works but sudo pip install <package-name> doesn't work shows that your system's default version of Python recognizes the pip module, but the operating system doesn't recognize pip.

Python 2 is no longer installed by default in Ubuntu 17.10. Open the terminal and type:

sudo apt-get install python-pip

This command will also install Python2.7 as a dependency.

If the above doesn't work create a symbolic link at /usr/local/bin/pip which references to file /usr/bin/pip.

sudo rm /usr/local/bin/pip
sudo ln -s /usr/bin/pip /usr/local/bin/pip


Boot from LiveCD, mount your root partition like this

mount /dev/sda2 /mnt

then do nano /mnt/etc/fstab to add noauto option to this NTFS partition. It should be like ... ntfs defaults,noauto 0 0. Ctrl+X to save, then reboot.


You should edit /etc/hosts and /etc/hostname to make it persistent between boots.


Hiding terminal when executing zenity bash script by double click

To launch a script without the terminal visible, use a .desktop file.

Create a file zen.desktop
Put in the contents of the file using gedit or you favorite text editor(terminal=false will make sure it doesn't show the terminal, although this option should default):

[Desktop Entry]
Type=Application
Terminal=false
Name=zenity-app
Exec=/home/user/zen.sh

Replace Exec with where your script is located.
Make sure to set the permission to execute on the .desktop file (and your script) - How to make a file (e.g. a .sh script) executable, so it can be run from terminal
Double click the desktop file and see if it works.


Fonts other than english are not getting displayed in tty terminals

I think you need to install some additional package.
For begin you can try this one:

sudo apt-get install console-setup

Then you can change the font. You need to chose font with Chinese symbols.


Black screen after plymouth at ubuntu 14.04

FYI I solved this problem by
1. In grub menu I entered to advaced oprions
2. I opened root shell command
3. logged in as root
4. used sudo mount -o remount,rw /
5. used sudo apt-get install --reinstall ubuntu-desktop

That helped


Wow did this take a long time to solve.

As of Linux 3.10 (I now use ArchLinux rather than Ubuntu), the snd-hda-intel driver will automatically work correctly with the headphone jacks (i.e the internal speakers will correctly disable when headphones are plugged in), but the subwoofer is assumed to be plugged into the wrong port.  You can correct this by manually manipulating the port the woofer is plugged into using hdajackretask in alsa-tools-gui (for me it was 0x10).  The tool also provides the means to make this a boot option so that this process does not need to be repeated.


try this:

mount -o loop Setup-1a01.iso /mnt/iso


Where is the official new Ubuntu release feature list?

There is no official features list as of yet for 15.04.
Debian plan to integrate systemd as default in their 8.0 release (codenamed ‘jessie’) and this release has not got a release date yet.
Since work on 15.04 already started I would expect systemd not to be included in 15.04 (for 15.04 to have systemd I would expect 'jessie' to be ready).
For that matter I would expect 15.10 to still have upstart with an extra installer to replace it with systemd where 16.04 would have systemd as default.


Ubuntu 16.10 - only part of the detail tab is shown

This is bugs occurring on 16.10, you can see follow-up at https://bugs.launchpad.net/ubuntu/+source/update-manager/+bug/1623856.

AFAIK there are already a fix for this bugs.


Will updating chrome on ubuntu clear my browser data, cookies, session storage etc?

No.  Your cookies, cache, and site-specific data will remain, as well as all the cached .js files.

In general, it's best to let the system handle your updates, unless you have something special you absolutely, positively, utterly, need the very latest shiny version for.  Chrome's an exception, since you originally installed it by downloading the installer from Google's website (it's not in the list of packages for 18.04).

https://support.google.com/chrome/answer/95414 says Linux users: To update Google Chrome, use your package manager.


Your installation seems trashed and broken

Your best bet now is to completely wipe out and reinstall your system, after booting from a live CD and backing up your files.


The eject command does what you want. Without any arguments provided, it ejects the default (first) 'cdrom' device. If you want to eject a specific device, provide it as an argument.

eject /dev/cdrom1

Quoting from the eject manpage (man eject):

  Eject allows removable media (typically a CD-ROM, floppy disk, tape, or JAZ or ZIP disk) to be ejected under software control. The command can also control some multi-disc CD-ROM changers, the auto-eject feature supported by some devices, and close the disc tray of some CD-ROM drives.

  The  device  corresponding  to  is ejected. The name can be a device file or mount point, either a full path or with the leading "/dev", "/media" or "/mnt" omitted. If no name is specified, the default name "cdrom" is used.


Touchsreen always returns cursor to upper left corner

I simply upgraded to 11.10 on my T901 and the touch screen worked!


Listing an empty folder shows two items . and .. , what are they?

In order, '.' is the current directory, and '..' is the parent of the current directory.  typing cd .. will move you up the directory tree one level.


Why Do I Keep Getting GRUB Command Line on Startup - Dual Booting Wins 8.1 and Ubuntu 14.04

Try this from an Ubuntu Terminal Window:

sudo efibootmgr -o 0

That should fix the problem. Alternatively, you could use EasyUEFI in Windows to move the ubuntu entry to the top of the boot order list.

EDIT:

If it's resetting to boot straight to Windows when you reboot the computer without booting into Windows, then your EFI is badly broken. Check the manufacturer's site for an update (probably called a "BIOS upgrade" or something similar). If that doesn't help, then the best course of action is to return the computer for a refund, assuming you're within the return period. If not, you'll need to employ an ugly hack involving renaming boot loader files. Boot Repair can do this semi-automatically with an option on its Advanced menu, or you can do it manually, as noted here. Either way, if it's a bad EFI, write to the manufacturer to complain! Too many have been delivering junk EFIs for too long!

If this happens only after booting to Windows, then chances are Windows is the culprit. This question covers this variant of the problem.


TTY[1-6]: Lock screen after delay (like a screensaver)

I know this is old, but I found you on google searching for the same question.

If you’re using bash, it’s no problem. Just use the environment-variable 'TMOUT' which is used by bash for a auto-logout (logout! not lock) in the given seconds.

You can just type ''TMOUT=5'' into any bash an see, what happens.

For configuration in my bashrc I’m using

# autologout on tty1-6 after 30 minutes
if [[ $(tty) =~ /dev\/tty[1-6] ]]; then TMOUT=1800; fi

so I don’t get logged out on a terminal-emulator which is normally on /dev/pty/# and already get locked by my screensaver as part of my desktop


Seems to me like this is a documented feature even though it is listed as a bug:

Bug Description
When installing awesome, it does not create an entry to launch the window manager from GDM or LightDM or KDM

Hairong Zhu (hrzhu) wrote on 2013-04-26:

The bug still exists in Xubuntu 13.04 release. And I can confirm that delete NoDisplay=true in /usr/share/xsessions/awesome.desktop solves the problem.

James Crowther (j1aks) wrote on 2013-05-08:

just tried this in Ubuntu 13.4 (x64) and I can confirm that just changing NoDisplay=true to   NoDisplay=false in /usr/share/xsessions/awesome.desktop is sufficient to make it show up in the window manager list on the login screen.

You can edit the file with sudo gedit /usr/share/xsessions/awesome.desktop.


Simple answer:
That's unlikely going to happen in the near future. (~10 years)

More elaborate  answer:
You're asking for "Simply an environment like Wine" or to quote A.H. Weiler: "Nothing is impossible for the man who doesn't have to do it himself …"

What you're asking for is not impossible but a nicely coloured square with lots of even more nicely coloured squares like the Android Runtime Architecture running on ChromeOS looking similar to another nicely coloured square like the Java Architecture running on all OSes doesn't mean that they are even remotely similar or that developing an API emulator is something that's going to happen …

It's so much easier cross-compiling your application on any *nix system and then actually running it on your Android phone / Chromebook in developer mode then going through the daunting task of developing CAINE (ChromeOS/Android Is Not an Emulator).

Sorry to be the harbinger of bad news …


Cannot install oracle-java8-jdk Because java-common cannot be installed

In my case I just selected all radio buttons in

  Software&Updates -> Ubuntu Software -> Downloadable from the internet

and install it with

sudo apt-get install oracle-java8-installer


I had the same issue and after beating my head against it long enough realized that I had an obsolete pgdg.list in my sources. After removing and re-adding it, everything is great.

sudo rm /etc/apt/sources.list.d/pgdg.*
echo "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update -y
sudo apt-get install pgadmin3


sudo apt install steam

thats the command you should have written.


The Ubuntu Server edition isn't managed by the networkmanager. It's managed from the /etc/networks/interfaces. look here to configurate that interfaces:

German wiki (cant find the english one now):
https://wiki.ubuntuusers.de/interfaces/


In this case you can create a shell script or add an alias on your .bashrc
But I'll go with the simplest.
Approach using bash alias
Simply add these lines on your .bashrc or .bash_profile.
# Create year, month and date format (Y-m-d)
# Ex. 20200722
folder_date=$(date +"%Y%m%d")

# Define a dynamic alias using the variable $folder_date
alias $folder_date="cd folder/static/$folder_date"

Then you can simply execute the command using the date today on your terminal.
Example:
$ 20200722

The command will navigate to the directory folder/static/20200722


I solved it! Well, I did not do much myself. I installed Ubuntu version 20.04 LTS (which was released just a month ago), opting for a normal installation (as opposed to minimal installation) and toggling both other options (Download updates and Install third-party software). I don't know which part fixed it, but the second screen is now regularly detected.


Why Chrome always ask for keyring and is it possible to remove it without giving password?

Chrome asks for the password when your account is set for autologin.  Doing this makes it so that the keyring doesn't load when you reset/reboot your system.  This can also happen when the keyring password no longer matches the login password when autologin is not enabled.  Or it is simply a bug between Chrome / Chromium and Seahorse.

Chrome is asking for the password to the keyring so it can access stored information in the keyring.  You can view the keyring on your system by running the command seahorse from a terminal window.  You can also just bypass the asking by closing the window and still get to your sites without a problem.  Some of the security may not load properly.

However, you can use the following command from a terminal window to bypass the keyring asking:

google-chrome-stable --password-store=basic

Hope this helps!


Pgadmin4 wheel installation does not install pgadmin4.py

EDIT Had the exact same problem, managed to solve it like this:

sudo apt-get install virtualenv python-pip libpq-dev python-dev
cd
virtualenv pgadmin4
cd pgadmin4
source bin/activate

bin/pip install https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v2.1/pip/pgadmin4-2.1-py2.py3-none-any.whl


btrfs is considered experimental and unless you're very adventurous, you should avoid using it. There is neither a fsck tool available in case the btrfs filesystem becomes corrupt (after a power failure for example).

An excerpt from the release notes:

  The btrfs filesystem is considered experimental in this release. It can generally be installed and used, but with a number of problems. You should only use it if you are comfortable with dealing with problems and helping us resolve them.

As the btrfs wiki notes: "Note that Btrfs does not yet have a fsck tool that can fix errors. While Btrfs is stable on a stable machine, it is currently possible to corrupt a filesystem irrecoverably if your machine crashes or loses power on disks that don't handle flush requests correctly. This will be fixed when the fsck tool is ready."
GRUB cannot detect a btrfs installation within an encrypted disk, and fails to set up the correct kernel parameters. (757631)

GRUB can actually boot from btrfs filesystems (instructions), but note that Ubuntu still consider btrfs as experimental.


You seem to have postgres-xc installed on your machine, which is a fork of an old version of PostgreSQL that is used for multi-master clustering. The problem is that Postgres-XC is not compatible with PostgreSQL.

Assuming you need PostgreSQL (and not Postgres-XC), I would suggest that you completely uninstall postgres-xc and postgres-xc-client, then try to re-install the postgresql-* packages again.


On Xubuntu, my windows suddenly have no control buttons on the upper right hand corner

Apparently some fault has killed xfwm4, a program that manages windows and draws the decorations around them. If you have a terminal open, type xfwm4 --replace and hit enter. Also, logging off and on might restore it.


Ubuntu 18.04: Keyboard shortcuts for window splitting are reset after reboot

First disable the keybindings that conflict in dconf-editor. Then assign these keybindings in your Shelltile Gnome Shell extension.

For example, the "Maximize window" hotkey Up is defined in the key org.gnome.desktop.wm.keybindings maximize. You can use one of two methods to disable this keybinding: using the graphical tool dconf-editor which is not installed by default, or directly changeing the value using a command.

Using dconf-editor: once you installed dconf-editor, start it up. Navigate to the key "org", then "gnome", "desktop", "wm", "keybindings", "maximize". Turn off "Use default value", and then edit "Custom value" to read [] rather than the default ['Up']
Using the terminal: open a terminal and disable the keybinding with the following command

gsettings set org.gnome.desktop.wm.keybindings maximize []

You can undo (i.e., set to the default value) with the command

gsettings reset org.gnome.desktop.wm.keybindings maximize []


Launcher in 13.04 does not always show when mouse touches the edge of the screen

I think i figured out what was going on. One of the settings in ConfigCompiz was Duration of Sticky Edge Release After Break, which didn't sound relevant at first, so I hadn't tweaked it. It was originally set to 1000, I set it to 0, which I think solved the problem.


How do I make alt + tab cycle through individual windows only in current workspace in GNOME 3?

You might want to use AlternateTab extension. This extension lets you

  Substitute Alt-Tab with a window based switcher that does not group by application.

Also in the extension settings you'll find an option to enable/disable showing windows only from the current workspace.


ACPI open/close lid scripts - xrandr does not execute but other commands do

SOLUTION

It seems that the info on the ubuntu community is not complete. You need to make one more step in order to work. According to this, you additionally need to create /etc/acpi/events/lm_lid and put:

event=button/lid.*
action=/etc/acpi/lid.sh

Now it works fine for me. I have updated the Ubuntu guide so you can safely follow the guide here


Cleaning up after a Wubi uninstallation

Sometimes something can go wrong when uninstalling Wubi, however you can manually remove it by following the instructions below:

This article assumes you are able to boot into Windows, if you are not then boot from your Windows install disk and choose "Repair" and then "Startup Recovery".  Once Startup recovery has run then you can ignore all but the first step in Section 3.

Section 1

First of all, check the uninstall programs sections of the control panel.  You may find that it is still there to uninstall.  If not, that is fine, just continue to the next section (past the horizontal rule)

Trying uninstalling with the default uninstaller again and see if that works.

Section 2

If that fails, there is another tool which can try and automatically remove your Wubi install.  It is called Uninstall-Ubuntu.exe.  Try running that program and see if it can remove the installation. If not, proceed to the next section.

Section 3

Remove C:\ubuntu and C:\wubildr* (If they cannot be found then move on to next step)
Click on the Start Menu, right click on "Computer" and click "Properties".  (You can also goto "Control Panel\System and Security\System" in Windows Explorer.)

Choose "Advanced system settings" from the left.

Switch to the "Boot" tab.
Find the line that says Ubuntu, select it and press "Delete".

Section 4

If "Ubuntu" is still in "Programs and Features", you can remove it by doing the following:
 1. Press Super + R.
 2. Type in "regedit" and press "OK".
 3. Navigate (with the trees along the left) to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall]
 4. Delete the folder "Wubi" from the tree at the left.

Source: https://wiki.ubuntu.com/WubiGuide#Uninstallation


Live USB not booting in Lenovo IdeaPad Z570

I had the same problem like you about a month ago when I purchased this laptop. There's a problem with bios settings or better speaking with the graphic card.

In bios, "Graphic Device" must not be set "Optimus" (Intel VGA+ nVidia VGA) but "UMA only". That way it loads. Otherwise, not.


System settings won't open on Ubuntu 20.04 LTS after adding System76/pop PPA

Finally I found a solution!
The cause of this problem was pop-theme, that I installed once, plus its repository entry, that provided me the broken System settings (gnome-control-center). In order to solve this:

I installed Ubuntu desktop PPA.
sudo add-apt-repository ppa:ubuntu-desktop/ppa

I removed all System76/pop (and other trush) entries, with update-manager, leaving Ubuntu desktop the only one active.

Now that I have the proper repository entry added, I re-install gnome-control-center.
sudo apt install --reinstall gnome-control-center

Enjoy Gnome System settings!