Does upgrading Ubuntu risk the loss of important data?

Yes all your files are completely safe when you upgrade, only the Ubuntu system files will change.

But make a backup of your important files so you don't lose them if the upgrade fails. You should always have your important files backup, it doesn't matter if it's on a cloud storage, usb-stick or on a hard drive just back it up somewhere.


If you want Unity 7:

sudo apt install ubuntu-desktop

If you want Unity 8:

sudo apt install unity8-desktop-session-mir


Is it necessary to donate to be able to download vlc media player for ubuntu 14.04?

No, VLC is free.You can download it without any fee.


Figured out the solution myself. First I ran chattr -i on the folders to get rid of any attribute flags that would prevent ownership change. Second I ran sudo chown $USER -R .local/share/Trash/files. I'm not sure if there were any flags, but the change-owner-command worked and I was able to empty the Trash folder. Problem solved.


I am experiencing the exact same problem. Out of 3 computers we upgraded, only one is showing the symptoms.

I found someone with the same problem in 15.04, see solution there:
http://ubuntuforums.org/showthread.php?t=2286043

I will update my system first, then try it.


Dead keys (accents) stopped working after upgrading to Ubuntu 16.04

To fix, I used ibus-setup in a terminal and followed instructions.  It went back to normal.


How to run a program automatically on printing

I would solve this by adding a listener to your application and have it running in the backround.

If you look at the javax.print.PrintService; link to the documention found: here
you will find a method called addPrintServiceAttributeListener which allows you to register a listener for print events.


Running 12.04 LTS as Virtual box on a windows 7 , 64bit OS .Not able to access internet from Ubuntu VM box

In the Virtual Machine Settings:
In the network connection select Bridged:Connect directly to the physical network.
Please tell us if that fixes your problem.


How can I install clang 3.9 on Ubuntu 12.04

It seems you can install clang 3.9 on Ubuntu 12.04.

1 - You need to add these repository to your sources.list file.

deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty main
deb-src http://apt.llvm.org/trusty/ llvm-toolchain-trusty main
# 3.8
deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.8 main
deb-src http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.8 main
# 3.9
deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.9 main
deb-src http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.9 main

2- Then you need to add ubuntu-toolchain-r/test ppa. Because it provides updated libstdc++ required by clang 3.9

sudo add-apt-repository ppa:ubuntu-toolchain-r/test

3 - Now update the repository index

sudo apt-get update

4 - You should now be able to install clang 3.9

sudo apt-get install clang-3.9

Source: http://apt.llvm.org/

If you need help installing package without Internet, use the solutions from this question

How can I install software or packages without Internet (offline)?


Default application for opening files in network folder LTS 20

I am experiencing this problem too. I didn't really use Ubuntu 18.04 but went from 16.04 straight to 20.04 but I thought I had the same problem in 18.04, though it could have been a slightly earlier or later release.
I am also sure that I looked for a solution and found a post which had a solution but it was not trivial. I have looked hard for it just now but I can't find it again.
The only solution I have is to right mouse on the file you want to open, click 'Open With Other Application', then choose the application. The application you choose may well be the one it listed as the default, but I found that I have to go through that whole process to get it to work as you would expect. Currently with my GDrive mapped, Nautilus opens (double left click) all my text files in Chrome (and then says it can't) instead of the default Geany. Right clicking and choosing 'Open with Geany' opens it in Chrome.
Sorry, if you already knew that. If I do come across that other post I will update this.


Setting up a mail server to send mail from IP

You can use gmail as relay.

Ubuntu postfix. Using gmail as SMTP relay

Gmail as SMTP-service.

Install postfix.

sudo apt-get install postfix

Select the settings during installation according to your needs.

If you ever need to redo the configuration run:

sudo dpkg-reconfigure postfix

Edit /etc/postfix/main.cf by adding the following rows:

relayhost = smtp.gmail.com:587

smtp_sasl_auth_enable = yes

smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd

smtp_sasl_security_options = noanonymous

smtp_use_tls = yes

Create the file /etc/postfix/sasl_passwd with the following content:

smtp.gmail.com:587 your_account@gmail.com:password

When done run and restart postfix afterwards:

sudo postmap /etc/postfix/sasl_passwd

sudo service postfix restart

http://www.iasptk.com/ubuntu/20535-ubuntu-postfix-using-gmail-as-smtp-relay


You may reset all Compiz settings to defaults

dconf reset -f /org/compiz/


How do I get my laptop's Line In inlet to output sound?

If you are lucky, you simply open 'alsamixer' in a console.

Hardware 'channels' have volume bars; switches do not. Use the 'm' letter to change settings. Maybe you have a switch to change that input/output behaviour. Use F-keys and left/right arrows to see all your options.

Now having pulseaudio as default in Ubuntu, all these alsa settings are somehow 'hidden'. Following picture shows Alsamixer with some 'F2' option.

2nd chance

If that is not working, you may have the chance to be able to choose some options for your card and set them as system default on boot.

For that you will have to modify /etc/modprobe.d/alsa-base.conf (documentation: http://www.alsa-project.org/main/index.php/Matrix:Module-ca0106 )

To choose an option, add something like this to your /etc/modprobe.d/alsa-base.conf...

    # ALSA portion
    alias char-major-116 snd
    alias snd-card-0 snd-ca0106
    # module options should go here
    options snd-ca0106 foo=bar

I am not a 100% sure about that module ca0106 though... You can verify that with 'lspci | grep audio' and 'lsmod' in a console.


Bash usage in Windows: "Cannot send an empty message" error

The problem in your script is actually shown very clearly by the Ask Ubuntu syntax highlighting - as you can see in your answer, the "x" in your post is colored black, because it is outside of the double-quoted string that is the value for the -c parameter to bash. This problem is repeated throughout your code.

The way strings work in shell is that the double-quotes are a way to get multiple words (i.e. character sequences containing spaces) to appear as a single word for the shell. The shell then passes these words as is - without the enclosing string double-quotes - to the program for running. You can also cause text to be bunched into the same word by just squizzing the text together without spaces.

So the following commands are all the same for the shell, and will show the same output:

echo 123
echo "1"23
echo "1"2"3"
echo "1"'2'"3"

In all cases echo just sees the text "123" (the last one I put in some single quotes, which for a lot of effects behaves the same.

So with that in mind, let's analyze your script line:

bash -c "curl -H "Content-Type:application/json" -X POST -d '{"x": "x", "content": "hello"}' https://discordapp.com/some/path"

We can see that you are passing a lot of code to bash as the -c parameter, which is "the command to run". So bash will be run with two arguments - the first one is -c and the second one is all the text that should be considered "the command". The second argument uses double-quoted strings (yes, plural) to encode some spaces and other shell characters so they will be passed as is to the "command to run"  parameter.

Let us do manually what the shell does to understand the second parameter, by converting all "words" as a classic programming language string array:

var a = [
"-c",
"curl -H " + "Content-Type:application/json" + " -X POST -d '{" + "x" +
  ": " + "x" + ", " + "content" + ": " + "hello" +
  "}' https://discordapp.com/some/path"
]

Then the shell will resolve the list of strings and will execute bash:

execve("bash", "-c", "curl -H Content-Type:application/json -X POST -d '{x: x, content: hello}' https://discordapp.com/some/path");

As you can see there are no more double quotes inside the JSON POST payload: they were removed by the shell trying to understand what strings make up the second argument. This causes the payload to become invalid and the server to think you didn't provide an input.

BTW: from my experience - what you've just demonstrated is the number 1 misunderstanding of how shell escaping work, so don't feel bad about it - everybody's doing it ;-)

What you want to do, if you want to put double quotes inside a double-quoted string is to "escape" them - make the shell not see them as special characters but as just part of the text of the string. There are two major ways to do this:

take advantage of the fact that strings in shell do not actually require quoting and could just be words bunched together without spaces, or multiple quoted string bunched together without spaces. So it could look like this: "curl -H "'"'"Content-Type:application/json"'"'" ...". You can see that instead of just putting a double-quote, we understand that double-quote actually terminates the string started at the beginning and isn't actually part of the input, and before the shell sees the end of the input (due to a space) we immediately start a new string, this one delimited by single quotes - that contain only a double-quote character, and so on - this is actually similar to the last echo command in the first example.
use backslash to cause the internal double-quote characters to not be considered string delimiters - escape them from parsing: "curl -H \"Content-Type:application/json\" -X...

I personally prefer the first method.


How can I stop Gnome Shell's drive pop up notifications?

Per this discussion on the Ubuntu Forums, install dconf-tools and then run the dconf editor (a launcher installed to "System Tools" on my machine).

Navigate to org > gnome > desktop > media-handling and then check the "autorun-never" box. Then simply close the dconf editor.


Old kernel files (initrd.img-4.*-generic) keeps popping up

Did you remove old files through apt or in some other way?

I recommend the following approach:

First of all, check which kernels have been installed overtime:

$ dpkg --list | grep linux-image
$ dpkg --list | grep linux-headers

Once you identified which versions can be removed, purge them (versions listed below shown only as an example):

$ sudo apt-get purge linux-image-3.19.0-{18,20,21,25}
$ sudo apt-get purge linux-headers-3.19.0-{18,20,21,25}

As the last step, update grub configuration:

$ sudo update-grub2


How do I configure Sentry Switch CDU power control for MAAS?

Here is what worked for me. FYI, I'm using Utopic for my MAAS controller. All actions I performed were performed directly from the MAAS controller terminal or via ssh.

Earlier in my problem solving process after asking the question, I downgraded my CDU to firmware 6.0g and have not upgraded it back to 7.0p yet but if I do, I'll comment here on the results.

For whatever reason, fence_cdu (a wonderful little program that lets you manage the cdu from terminal made by Andres Rodriguez of Canonical) did not exist in /usr/sbin after installing MAAS. So I decided to install fence-agents which installed version 4.0.7.1-2.1 (from Utopic's sources). That did place several fence_ programs in /usr/sbin, but not the one I needed "fence_cdu". I downloaded the various fence-agents packages available from https://launchpad.net/ubuntu/+source/fence-agents to examine them and noticed that releases after Precise did not include fence_cdu. So, I removed the Utopic version of fence-agents.

  sudo apt-get --purge remove fence-agents

I followed the information at https://help.ubuntu.com/community/PinningHowto to pin the Precise version of fence-agents so apt-get would install the version that included fence_cdu. In short, I created /etc/apt/apt.conf.d/01ubuntu

  sudo nano /etc/apt/apt.conf.d/01ubuntu

Added the following to the 01ubuntu file:

  APT::Default-Release "utopic";

Edited my sources:

  sudo nano /etc/apt/sources.list

Added the following to sources.list:

  deb http://archive.ubuntu.com/ubuntu precise main restricted universe multiverse

Created /etc/apt/preferences:

  sudo nano /etc/apt/preferences

Added the following to the preferences file:

Package: fence-agents
Pin: release n=precise
Pin-Priority: 991

I ran:

  apt-get update

Then I checked to make sure the version of fence-agents I wanted would install:

  apt-cache policy fence-agents

That showed me it would install version 3.1.5-2ubuntu2 so I installed it:

  sudo apt-get install fence-agents

After the firmware downgrade, the "Control State" of each outlet was "Idle Off". For some reason, MAAS cannot perform power operations on an outlet in this state. My fix is to first perform an operation like power on or off via ssh/telnet or the CDU's built in web gui which changes the control state and subsequent MAAS operations will work. This has to be performed for each outlet.

I tested it from the MAAS controller (it did not work until performing an operation via ssh/telnet or the CDU web gui as mentioned in the previous paragraph):

  fence_cdu -a 10.0.0.10 -n TowerA_Outlet1 -l myCDUusername -p myCDUpassword -o on -v
  fence_cdu -a 10.0.0.10 -n TowerA_Outlet1 -l myCDUusername -p myCDUpassword -o off -v

Line 1 powered on the first outlet on the CDU. Line 2 powered it off. The IP 10.0.0.10 was the IP of my CDU. If you are following this, replace myCDUusername and myCDUpassword accordingly. TowerA_Outlet1 was the outlet name of my first outlet. I didn't get it to work with the outlet ID for some reason. Names are good enough for me.

Then I used the MAAS web gui to edit each node's settings. I selected "Sentry Switch CDU" as the "Power type". Entered my CDU's IP address as the "Power address". Entered the appropriate "Outlet Name" in as the "Power ID". I entered the CDU user and password as the "Power user" and "Power password".

I am very happy that MAAS can now power on and power off nodes accordingly. If I release a node while "Disk Erasing on release" is enabled, nothing happens. My workaround for that is to abort the disk erasure then stop the node. Re-issue the release command should power it on and erase the disks. If you can remember, it's better to just stop the node which powers it off, then issue the release which will power it on and erase the disks.


Whenever I launch Ubuntu my screen of PC starts flashing continuously

From this Bug Report (You should read the entire bug report from start to finish):

Intel 8550U with 620UHD GPU screen flashing

This solution:

Add kernel parameter: drm.debug=0x1e log_buf_len=4M

To add a kernel parameter use sudo -H gedit /etc/default/grub and locate the line:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

change it to:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash drm.debug=0x1e log_buf_len=4M"

Save the file and exit gedit then run
sudo update-grub

Now reboot and see if the flickering is gone.

In my own /etc/default/grub file I keep random notes I've collected over the years about kernel parameters. I've extracted these old notes that may help you:
# i915.enable_rc6=0 Fix screen flickering Kernel's > 4.12 https://bbs.archlinux.org/viewtopic.php?id=211399
# i915.enable_psr=0 screen flickering kernel's > 4.6 https://wiki.archlinux.org/index.php/intel_graphics#Skylake_support


While installing Ubuntu you need to declare your instructions inside the partitions manager. You have to delete your C partition and install Ubuntu inside the free space on your hard drive. After installing you need to mount D into your file system. Another way to keep your data is to backup them on an external drive and copy them on your computer after installing Ubuntu.
Anyway it is strongly recommended that you copy your data on the D drive to an external disk (usb, CD, etc.). As long as you are new to Linux it is possible that you may confuse some things and erase necessary data.


nfs4 permission denied: UID GID numbers shown for owner. I expected strings

I think this is a trap in nfs4 a lot of people were faced, including me.In nfs4 you specify a sec= flavor and when not specified the default is AUTH_SYS which means sending local UIDs and GIDs to the server which are then compared.

As far as I understood it, only when using a security flavor of the krb5* family the client sends the authentication as a string with <username>:<groupname>

Here is a more detailed explanation what happens behind the scenes.

In the manpage of nfs, there is also a section "Using non-privileged source ports" which mentions that if the server accepts non-priviledged ports any user could pretend an identity and sounds like a security issue one could use as a workaround. But I don't know if that is that easy or if it needs some hacks to make it usable. But, in the end it is still an security issue.

Maybe the easiest way is to keep the UIDs and GIDs in sync manually or set up a simple NIS or LDAP. And when using sssd you also could cache the login credentials from NIS or LDAP but the user has to login once connected with the server reachable.


How to run MTS mblaze in Ubuntu 10.04 LTS

Disclaimer: Answer is purely theoretical as i don't own such an hardware.

Open Terminal (ctrl+alt+T)
type: sudo apt-get install wvdial Type your password and Press y when promted
gksu gedit /etc/wvdial.conf
Copy paste text below. Save. Close gedit

[Dialer mts]
Stupid Mode = 1
Inherits = Modem0
Password = MTS
Username = internet@internet.mtsindia.in
Phone = #777
[Modem0]
Init1 = ATZ
SetVolume = 0
Modem = /dev/ttyUSB0
Baud = 115200
FlowControl = Hardware (CRTSCTS)
Dial Command = ATDT

Type sudo wvdial mts in terminal when you want to connect to internet. You could consider making a script file for automatic and easier connection.

Here is a link explaining how to connect using a MTS MBlaze:
http://nikhilbhardwaj.in/2012/05/06/mts-settings-for-ubuntu-12-04/


Broken dependencies while installing redmine using apt on fresh 14.04

Run this command:

sudo apt-get build-dep package_name

or if you have synaptic, there is a filter for broken packages that you can see and then fix.


How can I play a custom sound when my battery is low?

I just wanted to reply as I used the advice on this page for configuring my own crontab -e job.

I'm running Lubuntu (trusty) and the above didn't work for me, but with a little tweaking it did. My level of (in)experience is that I'm relatively capable of reading basic scripts and commands but less able to write them from scratch in linux disto's. I mention that because if I can cobble together a working battery alarm, most of you reading this should be able to as well!

SO.... the script and a basic explanation....

As per the posts above by Glutanimate and Scott Goodgame (thanks guys!), I basically did the following:

To get mpg123 and be able to play audio:

sudo apt-get install acpi mpg123

File to open to write the command:

crontab -e

Command to enter at end of the file:

*/1 * * * * if [ `acpi -b | awk ' { print ( $(NF-2)-0)}'`  -lt "15" ] ; then mpg123 /home/andy/Alarm.mp3 ; fi

Explanation of the above

Asterisks at the start

The five asterisks represent the frequency at which to run the commands.

First star = Minutes: 0-59
Second star = Hours: 0-23
Third star = Day of Month: 0 - 31
Fourth star = Month: 0 - 12
Fifth star = Day of Week: 0 - 6 (0 means Sunday)

*/1 * * * *

means 'run this every minute'.

IF/THEN/FI:

IF [ stuff inside these brackets ] ; THEN do something ; FI

Most of you, I imagine, are very familiar with IF/THEN statements.
The FI at the end concludes the IF statement

Playing the audio:

mpg123 /home/andy/Alarm.mp3

this simply uses mpg123 to play a file called Alarm.mp3 located in my home directory /home/andy/.

Output battery info:

acpi -b

this simply outputs the battery status. On my laptop it yields results such as:

Battery 0: Discharging, 74%, 02:35:18 remaining

Pipe to awk command

 | awk ' { print ( $(NF-2)-0)}'`  -lt "15"

Okay, so we're piping the output of the battery status above and printing the second-from-the-end value (NF-2) which in the above example is '74%'. However, we need to remove the 'percentage' -0. We want to compare the current value with the value 15 -lt "15". So to sum it up in plain English,

  IF the value of the battery is LESS THAN 15% THEN play an audio file

I appreciate I've dumbed it down somewhat and perhaps my explanation could be improved on, but hopefully it'll help someone else understand how to add an alarm for the battery and avoid their laptops from just powering off all of a sudden!

Good luck!

EDIT

Okay... so it turns out that when my laptop is charging, the output of

acpi -b

is:

Battery 0: Charging, 35%, 01:04:08 until charged

whereas on battery is

Battery 0: Discharging, 36%, 01:22:36 remaining

so using the parameter mentioned initially of

print ( $(NF-2)-0)

outputs different results, because remember, the NF-value bit specifies how many items backwards from the end of the output to display, so with the output on battery of

Battery 0: Discharging, 36%, 01:22:36 remaining

$(NF-2) outputs '36%' whereas with the laptop on charge,

Battery 0: Charging, 35%, 01:04:08 until charged

$(NF-2) outputs '00:50:12', i.e. the amount of time remaining until charged.

The -0 after $(NF-2) minuses zero from the value, so when the value is a percent -0 changes it from something like '36%' to '36'. When the output value is perceived as non numerical, such as the time output of '01:04:08' as above, the value -0 returns is '0'. So you can see my issue - when my laptop is on charge, the output value is always '0'. Since I want to play an alarm when the output value is less than 15, it translates to a battery alarm that goes off every one minute when on charge!

I read up a little more on the output of the awk command and it turns out I didn't need to make it read the second value from the end, I could start from the beginning of the output and skip forward. This is much better as my battery status begins the same whether it is on charge or on battery in terms of number of parameters, i.e. the fourth parameter from the beginning is always the value of charge in percent.

SO... to make it read the fourth value, the command changes from

awk ' { print ($(NF-2)-0)}'

to

awk ' { print ($4)-0}'

or in its full glory:

*/1 * * * * if [ `acpi -b | awk ' { print ($4)-0}'`  -lt "15" ] ; then mpg123 /home/andy/Alarm.mp3 ; fi

Again I hope that helps someone! Good luck and thanks for reading!

BONUS EDIT

Okay, so a little additional poking around and I also worked out how to set the volume to 100% and unmute before playing the alarm - because let's face it, what's the point of a battery alarm if you can't hear it because you've set the volume to low or muted it?!

Anyway, the command you need is:

*/1 * * * * if [ `acpi -b | awk ' { print ($4)-0}'`  -lt "15" ] ; then pactl set-sink-volume 0 100% && pactl set-sink-mute 0 0 && mpg123 /home/andy/Alarm.mp3 ; fi

as you can see, all I've done is inserted the command string

pactl set-sink-volume 0 100% && pactl set-sink-mute 0 0 &&

(the &&'s just bind multiple commands together)

Again, good luck all!

LAST EDIT

Okay, So... one final (hopefully!) edit... apparently, the percentage sign is a special sign when running cron tasks. Therefore, you have to 'escape' the percentage sign by putting a backslash (\) in front of each % so it isn't (mis)interpreted by the shell.

So basically replace

100%

with

100\%

Therefore, the command you really REALLY need is:

*/1 * * * * if [ `acpi -b | awk ' { print ($4)-0}'`  -lt "15" ] ; then pactl set-sink-volume 0 100\% && pactl set-sink-mute 0 0 && mpg123 /home/andy/Alarm.mp3 ; fi

phew hope that sorts it for you as it has for me!! (eventually!)


This is the default behaviour for single column files.  The difference is that the standard numbering is to number x=0,1,2,...

Here's my data (in file temp.dat)

12
43
65
76
12
56

Plot with

    gnuplot> plot "temp.dat" with linespoints title "Single column data"

or similar.

To shift the x-axis so that x=1,2,3...

    gnuplot> plot "temp.dat" using ($0+1):1 with linespoints title "Single column data"


How to make Apache 2 stop asking for a password for an SSL certificate?

It appears that the private key for your SSL certificate is password-protected. To test whether this is really the case, examine the beginning of your keyfile using the command head -3 your.key. This private key is encrypted:

-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-128-CBC,C251E8A1254B933D763703EE1C364AB7

This file is not encrypted:

-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAvbeWtO9nQP4cFFuhGrOM/WQ73oTQHU7mzZB9CaA3R2iwjDNz
wwlDtT9tfo0tCC2ib9STfeM6AYrdI3wauzCu7AV4CFGSMP3HLX8DJuk8zzbdQHHv

To remove the password from a RSA private key, use the following command:

umask 077
mv your.key old-with-pass.key
openssl rsa -in old-with-pass.key -out your.key

The umask 077 command is necessary to ensure that the new key is not created with overly relaxed permissions. Alternatively, you can manually change the mode of the file with chmod 400 new.key. Depending on the location of the key, you might have to prefix the openssl, mv and chmod commands with sudo.


Some observations about your setup:

The guide you were following is unfortunately outdated and incorrect in places. It refers using the Python version of juju, not the currently supported and maintained juju-core.
Try removing your environments.yaml from ~/.juju and also make sure you remove any ~/.juju/environments/*.jenv (beware, that if you remove the .jenv' file of a running environment, you are effectively cutting your access to that cloud from Juju). Then, runjuju init, which will generate you a boilerplateenvironments.yaml`, containing the annotated set of most supported provider/cloud-specific configuration settings, commented as needed to indicate their default values, if any.
Here's a very good guide on setting up a Juju OpenStack environment.
You shouldn't need to use EC2-compatible API and credentials, just your OpenStack ones, the same you use to login to horizon or through nova client.
Using a file like the suggested OpenStack RC file, Juju can go with minimal configuration, taking all other settings through the exported environment variables.


pm-utils broke my system and didn't fix it when I purged it and all of its dependencies

I found two configuration options in gnome that should change the default lid close action.

org.gnome.settings-daemon.plugins.power lid-close-ac-action and org.gnome.settings-daemon.plugins.power lid-close-battery-action.

To set your computer to not suspend on close, I believe that you could set both of these settings to black.

gsettings set org.gnome.settings-daemon.plugins.power lid-close-battery-action blank
gsettings set org.gnome.settings-daemon.plugins.power lid-close-ac-action blank

I am not entirely sure that these will work on your system, though they do on mine.

Source: https://help.gnome.org/users/gnome-help/3.5/power-closelid.html.en


How to: automatically restart Ubuntu server every 6 months as a scheduled task?

You can configure a cron job for this task.

00 12 01 */6 * bash -c "reboot"

Will reboot the computer every 6 months at 12:00


The grep command accepts a --color=always option, so you can use

grep 'keyword1' file.log --color=always | grep 'keyword2'

As gertvdijk points out, this command may be inefficient, but it will look for all lines that contain both keyword1 and keyword2. If you want to highlight them in different colors, you can use

grep 'keyword1' file.log --color=always | GREP_COLORS="mt=01;34" grep --color=always 'keyword2'

which will highlight keyword2 in blue. The mt part means that grep will highlight matching text using this CSI code, and 01;34 means "bold blue foreground on normal background".


Uploading apps to the Ubuntu Software Center

As a free/open source app, you essentially have two options:

submit it as a .snap package for Ubuntu Core and Ubuntu Desktop
publish in a PPA


Problem after upgrade to GNOME Shell 3.4 (Ubuntu 11.10)

The gnome shell extensions are out of date, meaning that they support either Gnome 3.2 or Gnome 3.3. Its better to go to https://extensions.gnome.org/ and check which extensions are  compatible with Gnome 3.4. You can also install them directly from the browser if required!
Hope that helps.


PXE Installing Ubuntu 20.04 by way of preseed.cfg doesn't start

Ok, I figured out what I was doing wrong. Rather than using the desktop image for my PXE server, I should have been using Ubuntu Netboot images
Example software here:
Ubuntu Focal Netboot
The files to use are:
ubuntu-installer/amd64/linux
ubuntu-installer/amd64/initrd.gz

Thus, my PXE should look like:
default vesamenu.c32
menu default
label ubuntu2004
kernel ubuntu2004/linux
append vga=normal initrd=ubuntu2004/initrd.gz ip=dhcp netboot=nfs auto=true url=http://192.168.0.155/preseed/preseed.cfg splash fsck.mode=skip --


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


ALT-tab glitch on secondary user-account

Thanks to David Foerster, I resolved it:

I installed the Compiz Config Settings Manager:

sudo apt-get install compizconfig-settings-manager

And then under Window management, I disabled the Application Switcher plugin.
Now it only shows the standard switcher.


Since you mention dedicated server, why don't you start your own server and install Nextcloud on top of it ? You get to decide your own specification— on a plus side it's more private than file hosting service. It makes more sense you'd want to build your own cloud storage if you value your privacy.
You can view comparison between top cloud storage product versus Nextcloud here → https://nextcloud.com/compare/


When the (computer) voices are speaking to you, type sudo lsof -t +D /dev/snd to get the PIDs of the processes using sound,  then, ps -F -p <PID> ... to find out about the processes. Here is an example from my system while I was playing music intentionally, YMMV:

$ sudo lsof -t +D /dev/snd
1195
3713
$ ps -F -p 1195 -p 3713
UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
lightdm   1195  1118  0 89240  2408   1 Mar08 ?        00:00:00 /usr/bin/pulseau
walt      3713  3379  0 110363 4100   0 Mar07 ?        00:01:07 /usr/bin/pulseau

Once lsof tells you which PIDs are using sound, ps, kill, lsof, sudo /bin/ls -l /proc/<PID>, etc will tell you more.

As always, do man <cmd> before you execute a command from Someone Else, especially if it is sudo cmd.


You may refer to the following link to fix this.
https://help.gnome.org/users/evolution/3.3/mail-error-failed-to-append-to-sent-folder.html.en

Also could you please specify which version of Evolution you are using?
Did you also tried configuring Thunderbird?


git authentication with Active Directory user

There is already already this script for group user authentication through AD, within gitolite, in the contrib/ldap directory.
The idea remain to have an intermediate layer (here with gitolite, a ssh-based layer through forced commands), which is able to authorized a git command based on the result of a LDAP query.


Extract (rip) DVD in Chapters and not in Title

There are several applications that allow you to do that, as I listed in a previous answer, see here: What is the best tool for converting and reading video to be played on DVD players?

Of those, I have successfully tested HandBrake for that and other purposes.

Give it a try and let us know how did you manage this situation.

Good luck!


Suspend not working properly on MacBook Pro Retina (10.1)

I too faced the same issue. Seems that the nouveau driver for nvidia is buggy. So all you have to do is switch to integrated intel card and disable the nvidia card.

Make sure xserver-xorg-video-intel package is installed

sudo apt-get install xserver-xorg-video-intel

Switch to the integrated card: I couldn't do that from Linux. [Not sure if there is a simple way in Ubuntu to achieve this]
I booted Mac OSX, installed gfxcardstatus app from http://graphic-card-status.mac.informer.com/2.1/ and then set it to "Integrated Only".

Reboot to ubuntu. Suspend/resume should work like a charm


How do I set Ubuntu as the host grub system?

You could remove the Grub packages from the other distros, since they aren't providing any functionality.Use the appropriate package manager to remove it, then set up a chroot to install Grub from Ubuntu.

To set up a chroot, mount the partition where Ubuntu is installed somewhere (e.g. /mnt) and do:

sudo mount /dev /mnt/dev -o bind
for i in /dev /dev/pts /proc /sys; do
    sudo mount -B $i /mnt/$i;
done
sudo chroot /mnt /bin/bash
# From here on you're in the Ubuntu chroot, logged in as root.
grub-install /dev/sda
update-grub
exit # exit the chroot

Replace sda with the appropriate device, which you can look up with lsblk - it's the device at the top of the tree. If you have a separate boot partition, you'll need to mount that too, before entering the installing Grub. Do not use shutdown or similar commands within the chroot, since /mnt/proc is mounted to the real /proc, you'll shutdown the base system.

Check http://ubuntuforums.org/showthread.php?t=1581099 for a detailed guide on reinstalling Grub.


How to create a bootable system with a squashfs root

To get a working system with a squashfs filesystem:

sudo apt-get install live-boot live-boot-initramfs-tools extlinux
sudo update-initramfs -u

Create a squashfs file from a bootstrapped or running ubuntu filesystem with whatever packages you want available.  https://help.ubuntu.com/community/LiveCDCustomizationFromScratch provides good instructions for creating a debootstrapped system to build on.  Format the target drive with ext2/3/4 and enable the bootable flag.  Create the folder layout on the target drive and install extlinux:

mkdir -p ${TARGET}/boot/extlinux ${TARGET}/live
extlinux -i ${TARGET}/boot/extlinux
dd if=/usr/lib/syslinux/mbr.bin of=/dev/sdX #X is the drive letter
cp /boot/vmlinuz-$(uname -r) ${TARGET}/boot/vmlinuz
cp /boot/initrd.img-$(uname -r) ${TARGET}/boot/initrd
cp filesystem.squashfs ${TARGET}/live

Create ${TARGET}/boot/extlinux/extlinux.conf with the following contents:

DEFAULT Live
LABEL Live
  KERNEL /boot/vmlinuz
  APPEND initrd=/boot/initrd boot=live toram=filesystem.squashfs
TIMEOUT 10
PROMPT 0

Now you should be able to boot from the target drive in to your squashed system.


What causes high CPU usage by mount.ntfs?

Changing the mount options for the NTFS partition changed the application I was using from unusable with 100% mount.ntfs CPU to fully functional. The key one to use is "big_writes", but my full list is:

windows_names,norecover,big_writes,streams_interface=windows,inherit

You'd use it like this:

mount -t ntfs -o windows_names,norecover,big_writes,streams_interface=windows,inherit /dev/disk/by-uuid/DISKUUID /mountpoint

The full list of options and what they mean on the Ubuntu manpage for ntfs-3g: https://manpages.ubuntu.com/manpages/eoan/man8/ntfs-3g.8.html


Paste option disabled in Ubuntu 18.04 along with Windows 8.1

I had the same issue before and i solved it , just simple steps:
1. Open your Windows , Go to Control Panel and search for Battery
2. Click on Power Options

3. From right hand side ,  click on Choose what closing the lid does

4. Click on Change settings that are currently unavailable

5. uncheck this option Turn on fast startup (recommended)
6. Click Save changes and Restart your PC.

Congrats , Now you can copy and paste from Ubuntu.


install ubuntu 12.04 with ati hd radeon 6850

Try running the installation with

nomodeset

when the install is starting up, press Esc and then goto more options (I think... it's the right most option) and press Enter and select nomodeset.  That should let you boot.


How to Install JavaFX with openjdk-11-jdk?

If you installed OpenJDK-11 (and JavaFX) from the bionic-repository try this build instead: https://jdk.java.net/11/ for the Oracle-build of the OpenJDK and https://gluonhq.com/products/javafx/ for JavaFX respectively OpenJFX (https://openjfx.io/).

I also installed OpenJDK with apt first, but the bionic-package versioned with 11 seems to be a 10 build.

After you extracted the OpenJFX-package you can use the lib folder of the SDK or the jmods folder, respectively for the --module-path mentioned in the build.gradle of your demo.


Here's a step-by-step in terminal

$ cd /usr/share/fonts
$ sudo mkdir myfonts
$ cd myfonts
$ sudo wget -O- downloads.sourceforge.net/project/osnapfont/ohsnap-1.7.4.tar.gz?r=http://sourceforge.net/projects/osnapfont/&ts=1336734212&use_mirror=iweb | sudo tar -xz
$ cd ohsnap-1.7.4
$ sudo mkfontdir
$ sudo xset fp+ /usr/share/fonts/myfonts/ohsnap-1.7.4
$ sudo xset fp rehash

That should do the trick!

You can test them out by running, e.g.:
xterm -fn -*-ohsnap-*-*-*-*-17-*-*-*-*-*-*-*

Use xfontsel to come up with the appropriate font string.

Screenshot of xterm running ohsnap font:


Why can't I replace a specific string with sed?

Just use sed -i to change the file in place.


Why is swap being used even if swapiness is set to 1, and a lot of RAM is free?

run this script once per day:

#!/bin/sh

sync
echo 1 >/proc/sys/vm/drop_caches
sync
echo 2 >/proc/sys/vm/drop_caches
sync
echo 3 >/proc/sys/vm/drop_caches

mem=$(LC_ALL=C free  | awk '/Mem:/ {print $4}')
swap=$(LC_ALL=C free | awk '/Swap:/ {print $3}')

echo $mem
echo $swap

if [ $mem -lt $swap ]; then
    echo "ERROR: not enough RAM" >&2
    exit 1
fi

swapoff -a &&
swapon -a


Copy files from recovery-mode via root terminal

Try the following to mount an external in recovery mode:

Plugin the external HDD, then run sudo fdisk -l to know the partition information.
Create a mount point:

sudo mkdir /mnt/usb

Now mount it at the location in step 2:

sudo mount -t <file_type> /dev/sdb1 /mnt/usb -o umask=000

Now you should be able to move the files over.

Note"

/dev/sdb1 is imaginary yours could be /dev/sdc1
umask=000 makes it writable

Source:

https://ubuntuforums.org/showthread.php?t=1165891


How to fetch a particular word from a txt file using grep in Ubuntu terminal

So if you want to print fields of the file as newline separated if starts with $, you can do:

awk '{for(i=1;i<=NF;i++){if($i~/^\$/){printf "%s\n",substr($i,2)}}}' file.txt

Expanded form:

awk '{
    for (i=1;i<=NF;i++)
        { if($i~/^\$/)
                { printf "%s\n",substr($i,2) }
        }
     }' file.txt

Here we are iterating over the fields (for (i=1;i<=NF;i++)), if the field starts with $ (if($i~/^\$/)), then printing it with a trailing newline starting from second character (printf "%s\n",substr($i,2)).

On the other hand, if the number of fields is fixed and not many, then sed is also a viable option, here assuming two fields:

sed -nr 's/^\$([^[:blank:]]+)[[:blank:]]+\$([^[:blank:]]+)$/\1\n\2/p' file.txt

Matching $ at the start of each whitespace separated field, capturing the field (([^[:blank:]]+)), then in the replacement set the fields as newline separated (1\n\2).

Example:

$ cat file.txt
$PILOT_FIRSTNAME $PILOT_LASTNAME
$FOO $BAR
PILOT_FOO PILOT_BAR

$ awk '{for(i=1;i<=NF;i++){if($i~/^\$/){printf "%s\n",substr($i,2)}}}' file.txt
PILOT_FIRSTNAME
PILOT_LASTNAME
FOO
BAR

$ sed -nr 's/^\$([^[:blank:]]+)[[:blank:]]+\$([^[:blank:]]+)$/\1\n\2/p' file.txt
PILOT_FIRSTNAME
PILOT_LASTNAME
FOO
BAR


Middle-button scrolling on Thinkpad W540

I also have a w540 with Ubuntu 14.04 installed. The default Unix behavior is he middle mouse button for pasting the contents of the clipboard.  If you want to set up scrolling check out this webpage on how to configure the trackpoint.

You can enable scrolling with one finger if you go to System Settings -> Mouse & Touchpad and uncheck the "Two finger scroll" option.  This allows you to scroll vertically with one finger on the right edge of the touchpad (as is common from earlier model touchpads).

Two other resources I keep handy are Debian on Thinkpad W540 (github.com), and the W540 page on ThinkWiki.


phpmyadmin is not working after I installed it

Please read this section in Ubuntu wiki. You will need to configure your apache2.conf to make phpMyAdmin works.

gksu gedit /etc/apache2/apache2.conf

Then add the following line to the end of the file.

Include /etc/phpmyadmin/apache.conf

Then restart apache

/etc/init.d/apache2 restart


Ubuntu 18.04: Tomcat 8.5 webapp and lib folder location

You can get to know this by listing all paths installed by apt using

dpkg -L tomcat8 | grep webapp

The result shows

/var/lib/tomcat8/webapps


I was facing a similar issue. Did a sudo apt-get install xserver-xorg-core and then sudo apt-get install xserver-xorg-input-synaptics.


First of all, I'm assuming that you're doing this on a stock, brand-spanking new install of 12.04. Nothing special happening here.

Install nagios:

sudo apt-get install -y nagios3

It will go through, and ask you about what mail server you want to use:

Pick one based upon your needs.

It will then ask you about the domain name you want to have email sent from. Again, fill that out based upon your needs.

It will ask you what password you want to use - put in a secure password. This is for the admin account nagiosadmin.

And then you'll need to verify your password.

Once the install is all done, you can head over to localhost/nagios3 (or whatever the IP address/domain name of the server you installed it on is) and you'll be asked to enter your password:

Once you've done that, you're in!

Little ugly, huh?

Nagios automatically adds in the 'localhost' to the config, and does load, current users, disk space, http and ssh checks.

Now there is one more thing we need to do before nagios is all ready - we need to have it accept external commands so we can acknowledge problems, add comments, etc.

To do that, we need to edit a few files. Start by opening /etc/nagios3/nagios.cfg with the following command:

sudo nano /etc/nagios3/nagios.cfg

Search for check_external_commands, and turn the check_external_commands=0 into check_external_commands=1.

Now, restart apache by running

sudo service apache2 restart

Not done yet! We need to edit /etc/group. There should be a line like this in there:

nagios:x:114

Change it to

nagios:x:114:www-data

Save and close this file.

Now, we need to edit the /var/lib/nagios3/rw files permission with:

sudo chmod g+x /var/lib/nagios3/rw

And then (because of how permissions work) we need to edit the permissions of the directory above that with:

sudo chmod g+x /var/lib/nagios3

Now, restart nagios with:

sudo service nagios3 restart

If you use Apache as your web server, restart that also:

sudo service apache2 restart

And you should be good to go! Happy monitoring!

To have alerts emailed to you, see this question and answer.


Impossible install Packeges or Dependencies

Basically after an update unity crashed everytime we tried to login. The problems seems was related to compiz. we had installed Gnome Desktop but we still have problems to login.

Looking in some forum they had installed some library....and from that moment we cannot use anymore apt-get install....or remove.....


Lubuntu 12.04: unresponsive windows with certain applications

Found the culprit, it's the nouveau driver. After installing the proprietary nvidia driver I don't have any lagging windows anymore. So there is a workaround for this issue. I would prefer using the open source nouveau driver though so I'm going to try and figure out why nouveau is causing these unresponsive windows. Since I've found the cause of my issues I consider this question answered.


Can CUDA and Gnome work together on an optimus laptop?

Getting both cards to work is highly  problematic as stated in this question with 4000 views.  One of the answers to that question references this one which has a bounty attached and over 26000 views.

So I do believe your question is mostly answered as "No, there is no documented way for this to work well at this point." in the previous questions.


You installed the wrong package (that one is a dock, and you are looking for one that is a graphics library). You can get the development files of Cairo using

$ sudo apt-get install libcairo2-dev

In general when you are compiling some software and it asks for package XYZ, you can try if you have any package named XYZ-dev or libXYZ-dev

If you get further errors update your question.


How do I install Ubuntu on /dev/sda and not /dev/sdb?

If the disk has been used in a RAID array you might need to erase the metadata. Open terminal Ctrl+Alt+T and run following command:

sudo dmraid -E -r /dev/sda

See http://ubuntuforums.org/showpost.php?p=12026527&postcount=2

You might also find that you need to create a partition table in GParted (Device > Create Partition Table) before the disk will be available in the Installer.


What were the steps you took for setting up xrdp?

Can you check to make sure xrdp is not only running but enabled by running:

sudo systemctl status xrdp

Based on your output it looks like it isn't yet enabled. To fix that use:

sudo systemctl enable xrdp


Looks like your Python script is trying to use sudo to execute commands as root.

That won't really work out of the box when running your script as a service, since there's no terminal attached to the script, so sudo will not have a way to ask for a password to allow your script to run the command as root.

There are ways to configure sudo to run commands without prompting for a password and without requiring a terminal to be attached... But before we go that route, would you consider running your whole script as root instead and not using sudo inside it? That would simplify things...


How to make GRUB2 detect and boot Ubuntu on a RAID 1?

I was able to fix the issue using boot-repair using live cd.
I followed the following steps

Start ubuntu using live CD
Install mdadm  sudo apt-get install mdadm
Assemble the array sudo mdadm --assemble --scan
Install boot-repair sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair
Using advanced options in boot-repair I was able to select /dev/md1 as my operating system (this is the RAID where my ubuntu was installed earlier)
Reboot and select Ubuntu on RAID 1

This way boot-repair purged the previous installation of grub and installed a new one and I think that's how the problem was solved as this new version was able to detect the RAID 1 drive.


This is a known bug with the overlay-scrollbar package. I fixed it with

sudo apt-get remove overlay-scrollbar


There is more than one way to set the default.  You can set it to a specified number or a name in /etc/default/grub:

There is an entry at the top that says GRUB_DEFAULT=0, or some other number.  Zero means the first menu entry will be the default, usually Ubuntu or whatever distro installed this grub.  You can change that number to a different one.

You can also set it to a specific name, so that the numerical order won't matter - but it needs to be the exact name, such as: GRUB_DEFAULT="Microsoft Windows XP Professional (on /dev/sda1)"

You can set it so the last chosen OS becomes the default until you choose a new one, by adding this line below the GRUB_DEFAULT setting:  GRUB_SAVEDEFAULT=true

From Grub2 - Community Ubuntu Documentation:

Saving an OS can be achieved by running sudo grub-set-default if GRUB_DEFAULT=saved is set in /etc/default/grub. It may also be saved if GRUB_SAVEDEFAULT=true is also set in /etc/default/grub. In this case, the default OS remains until a new OS is manually selected from the GRUB 2 menu or the grub-set-default command is executed.


without using any tool, can one download any package from internet

Go to the package site ( http://packages.ubuntu.com/ ), seach for your the package you want and hit download on the bottom of the page, e.g.: http://packages.ubuntu.com/natty/ghdl


How to scroll to the top of the terminal buffer with a keyboard shortcut?

At least for gnome-terminal, SHIFT+HOME should do it (and SHIFT+END to return to the bottom of the buffer).


Get root access for copying files to /usr/share/...?

First, however tempted you might ever get, never "log in with root". It's far too easy to break things beyond repair. Anyway, this is disabled by default so you'd have to do a whole lot more to get to that point.

/usr/ is owned by the root account so to write files in there you need to write them as root. Two methods (there are undoubtedly more but here are the two main ways for most users):

Press Alt+F2 to get a run dialogue and in that type gksu nautilus. This will open up a file browser window running as root. Copy your files across but be careful, you can nuke the system like this.
A much more direct method is just loading up a terminal and writing:

sudo cp -R /path/to/files/you/want/copied/ /copy/to/this/path/

(the -R is just there to recursively copy directories)

If you ever want to fire off multiple commands as root without prepending them all with sudo you can run sudo -i or sudo su and you'll get a root terminal. But again, be careful what you do.


Edit grub as follows:

sudo gedit /etc/default/grub

Replace the following line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

with

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash loglevel=3 vga=current pcie_aspm=off"

then SAVE & EXIT

sudo update-grub
sudo reboot

** Enjoy this could stop the flood messages.**


Can I uninstall and reinstall Ubuntu Software Center?

Press  CTRL+ALT+T  simultaneously to enter terminal.

To uninstall Software Center:

sudo apt-get remove software-center
sudo apt-get autoremove software-center

To re-install Software Center:

sudo apt-get update
sudo apt-get install software-center


Is my new battery really new and matching my laptop?

The slight voltage differences indicate different (and likely newer) chemistries. The "design" fully charged is what ever was speced out for your model and there are variances in manufacturing as well as aging in warehouses that could affect that. However there's no reason the battery won't just kept charging if you leave it long enough. It is indicating "fully charged" because of the voltage across the cells is high enough its drawing very little current.


how to install guest additions virtual box in 13.04

I'm thinking you've spelled it wrong.

apt-cache search virtualbox-guest-additions
virtualbox-guest-additions-iso - guest additions iso image for VirtualBox

You're missing the "i" in "tions".


Given a package name (e.g. libhdf5-serial-dev_1.8.16+docs-4ubuntu1.1_all.deb), how can I know in which Ubuntu distribution(s) it is available via apt?

The fastest and convenient way to search a package for a supported release is to do a package search. For this particular example, if you search for libhdf5-serial-dev for any distribution a.k.a Ubuntu release and any section, you'll see that it is available in Security repositories of 16.04. And since 19.04, it has become a virtual-package which is being provided by libhdf5-dev.
Related Q&A:

What's a virtual package?


Ubuntu Phone no data network after upgrade OTA-12

This problem is known and resolved but it will release in next OTA-13.

If is not possible to wait, you may upgrade to the latest rc-proposed release.


Ubuntu 13.04 to 13.10 upgrade has made drive inaccesable

Do a sudo e2fsck -c /dev/sda6 from a live dvd (review the answers to the questions before confirming it but it should be safe to answer yes to all).

After that check with sudo e2fsck -c -c -p -v /dev/sda6 if the disk is reporting sane results. Warning: this command will take some time!


How to create bootable USB without administrator rights?

Unfortunately not. Non-administrators can not change the MBR.

Maybe if you have the Virtual box at work. And have access to USB.

It is also possible to write a bootable CD. Use the application Brasero.

You could ask your IT department at work to make a bootable USB for you.


Selenium chromedriver doesn't load javascript in webpage

I had the same issues, sometimes it loaded the page correctly and sometimes it didn't.
I resolved the issue by installing the following version of Chromium and Chromedriver:
https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Win_x64/693951/
My python config is the following:
options = webdriver.ChromeOptions()
options.add_argument("start-maximized")
#options.add_argument('--headless')
options.binary_location = "C:\Chrome-win\chrome.exe"
options.add_experimental_option("excludeSwitches", ["enable-automation"])
options.add_experimental_option('useAutomationExtension', False)
driver = webdriver.Chrome(executable_path='C:\Chrome-win\chromedriver\chromedriver.exe', options=options)
driver.set_window_size(1440, 900)
driver.execute_script("Object.defineProperty(navigator, 'webdriver', {get: () => undefined})")
driver.execute_cdp_cmd('Network.setUserAgentOverride', {"userAgent": 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.53 Safari/537.36'})
timeout = 90
Notice that I've commented the headless line, that was causing the process to be unreliable. Hope it helps.


There is no simple way to install qtstalker_0.32-1_i386 in Vivid. It might work, but after a few steps you're in a hell of unfulfillable dependencies. The reason is, the package is simply too old. Many libraries or packages can not be installed on your system or only with considerable effort.

Sorry to be the harbinger of bad news.


I found it i think...
I had a rogue ifup script in /etc/networkd-dispatcher/routable.d/50-ifup-hooks that was adding a drop route.
I also uninstalled and reinstalled openvpn.


password not accepted on ubuntu login page

Just press Ctrl+Alt+F2 and try to login with no X.  You should login with root account. Then you could change the user password with command like this:
passwd
Press  Ctrl+Alt+F7 or something to get graphic back.


Problems with the colors on my screen. How can I check if it's a hardware problem?

To check if the Netbook screen is at fault, you can try plugging it into an external monitor. If the colors appear fine on the monitor, you may have some screen issues.

To check your video card, I would try a different version of Ubuntu, for starters. You don't have to reinstall to test this out - unetbootin should let you boot into a live session, which will allow you to try one of the more stable versions, like 10.04. I run an EEE Netbook on that version, so I believe it should work. If it does look like there's a software issue with 11.04, please file a bug to help the developers out!

As many folks here have mentioned in the comments, it seems like this would (most likely) be an issue of color depth. Your video card can support a wide variety of color ranges, and it sounds like you might have yours set to one of the lower ones.


How to find the device name of an HDD that won't mount?

Run sudo fdisk -l in a terminal and it will list all connected disk drives and the partitions on them. If that does not work for some reason, see this webpage on how disks and partitions are named in Linux.


If this is a compiz issue then you can use Unity-2D to see if performance increases.  Unity-2D does not use compiz.

If you find that it is a compiz issue, then you are most probably affected by this bug-report.

This has been resolved and is awaiting testing by a larger group of users.  If this is successful the fix will be released into the main repository and you will automatically receive this as part of the Update-Manager process.  This will normally occur in a few-days/weeks after a fix is released into the proposed repository.

If you are feel you wish to contribute to the testing process, you can enable the "Proposed" repository in your software-sources. Refresh your software sources via Update-Manager and you will see new Unity packages available.  You could install these suggested packages.


Uninstalling Ubuntu when it is on the Windows partition

That screen shot is blurry and I can not tell, but from what you describe, did you install wubi ?

If so , see : https://wiki.ubuntu.com/WubiGuide#Uninstallation

To install Ubuntu into it's own partition, you burn the iso to a CD, and then re-boot. A common mistake is to make a Data CD (copy the files to a CD rather then burning an image).

See:

Ubuntu wiki burning iso

Ubuntu Wiki install guide


Problem with executing udev rules for olimex's avr-usb-jtag

If the former works, I suspect the latter should read

SUBSYSTEM=="usb", ATTRS{idProduct}=="6001", ATTRS{idVendor}=="0403", MODE="0666"


df shows mounted filesystems, not hard disks. To see your hard disks, use parted, fdisk or lsblk. Once you have identified

your disks,
their partitions, and
the filesystems in the partitions

you may mount the filesystems somewhere (that is, mount each filesystem on a directory) and then df will show them. It is not usual for a Linux system to mount hard-disk-based filesystems automatically.

Edit: See Mercy Flicker's comment for the complete details of how the problem was solved.


A quick and dirty solution can be to use netcat:

nc -l port-number

-l for listening. May need admin privileges for listening on a port number lesser than 1024. Received data will be sent on stdout, so you may need redirection or piping to another command to use the data.

Also, the command should be active before some remote program connect to the port, otherwise the sending program will fail.

For more information, see netcat man page.


How do I restore a Virtualbox VM from backup? (qcow)

Hi Nickolai I found the same suggestion and got the same result as you:

vboxmanage internalcommands sethduuid gave

Cannot set a new UUID: VERR_NOT_SUPPORTED

If we're restoring a VM, we should first remove the original and its media from inventory.

Select the VM then use Machine -> Remove from the menu. After that select Remove only option if we want to preserve the original VM's files.

After removing the original, there will be no UUID conflict.  Then we can use Machine -> Add and selected the .vbox file of the restored VM.


Can I force wget to use the secondary dns

As a temporary solution, this might work for you.
On the server:
echo 8.8.8.8 | sudo tee /etc/resolve.conf

Then try downloading your file.
You should find what is in charge of setting your DNS servers and use its configurations to change your DNS servers.
From your output I guess you are using Network-Manager. Let's say your main connection is called conn-name.
First ignore auto dns (it should help you get rid of the first line):
nmcli connection modify Home ipv4.ignore-auto-dns yes

Then set your desired DNS:
nmcli connection modify Home ipv4.dns 8.8.8.8

Reload connection (be aware that it might break your SSH session)
nmcli connection down conn-name && nmcli connection up conn-name


SSD + 2 HDD Ubuntu e Windows 10 scratch install

I would consider most of this a matter of opinion, however, one important thing to note is that you should install Windows first. When installing Ubuntu, the Grub2 installer will detect the Windows partition and configure grub to allow you to dual boot. If you install Ubuntu first, then the Windows bootrecord will write over grub during install, and you will have to use a rescue disk to boot back into Ubuntu. I would most likely do like you mentioned, and partition the SSD in half and use half for each OS.
Depending on what kind of space you need for each OS, I would probably dedicated one HDD to each OS. Format one as NTFS for your Windows installation, and format the other EXT4 (or whatever your preference) for Ubuntu. This will ensure that something doesn't get accidentally overwritten when switching between the two OSes.

Windows 10 minimum requirements:

Processor: 1 gigahertz (GHz) or faster processor or SoC
RAM: 1 gigabyte (GB) for 32-bit or 2 GB for 64-
Hard disk space: 16 GB for 32-bit OS 20 GB for 64-bit
Graphics card: DirectX 9 or later with WDDM 1.0
Display: 800x600

Ubuntu Desktop 17.04 minimum requirements:

2 GHz dual core processor.
2 GiB RAM (system memory)
25 GB of hard-drive space (or USB stick, memory card or external drive but see LiveCD for an alternative approach)
VGA capable of 1024x768 screen resolution.


Cups - How to find the status of a particular job

lpstat

is the first tool I would think of to find active and pending print jobs.
If you don't find the particular id in the output, then it has either completed successfully or manually removed with the
lprm

command.


Why is apt checking for updates every 10 minutes?

Urg, this is the Google osconfig-agent. Apparently it polls every 10 minutes and disables automatic apt updates (re: my comment about the surprising apt-get remove -y unattended-upgrades line in the apt history).


Icons appeared alone and I can't delete them

First, install gnome-tweak-tool.

Open a terminal and type:

sudo apt-get update
sudo apt-get install gnome-tweak-tool

Open up gnome-tweak-tool, click on "Desktop"

Un-select each of the "Icons on Desktop" like this:


In SSH to use nvidia-settings you should use:
(set fan for example)

DISPLAY=:0 XAUTHORITY=/var/run/lightdm/root/:0 nvidia-settings -a [gpu:0]/GPUFanControlState=1

DISPLAY=:0 XAUTHORITY=/var/run/lightdm/root/:0 nvidia-settings -a [fan:0]/GPUTargetFanSpeed=75


Poulsbo driver on asus eee, natty narwhal

Driver overview

This page details support for the Intel GMA500 "Poulsbo" video hardware in various Ubuntu releases. Unfortunately the support for this hardware is extremely limited on Linux. There are several drivers, but all lacking certain basic features, future and current maintenance or support for things like suspend.

Please reread the wiki it was updated HardwareSupportComponentsVideoCardsPoulsbo (last edited 2012-03-29 18:27:20 by mikewhatever)

You may have better luck now.

Repository page: https://launchpad.net/~gma500/+archive/emgd-1.8
Instructions for Natty and Oneiric only. Open a terminal and type:

sudo add-apt-repository ppa:gma500/emgd-1.8
sudo apt-get update
sudo apt-get install xorg-emgd emgd-dkms
sudo emgd-xorg-conf

reboot for the changes to take effect.


How to install Ubuntu sdk on ubuntu touch?

Sadly I do not know the full solution to this as some packages seem to be broken (at least when using a xenial container). However, one part of the problem is that the Ubuntu SDK is not in the main/universe repos, but in a ppa, so it is necessary to add the ubuntu-sdk-team/ppa personal package archive to the apt sources ofthe container. This has to be done between the creation of the container and the installation of the package, so the line has to be inserted into the script.
The command to add the ppa should be

libertine-container-manager create -i $NAME -a ppa:ubuntu-sdk-team/ppa

Afterwards in my case apparmor failed at the configuration, so multiple packages remained unconfigured. I could fix it with a mkdir call in the SDK still complained about a missing mir plug in.


Infinite login loop with Nvidia proprietary graphics

I had similar issue with my laptop which was having Nvidia GTX 950M(almost close to what you have).
My advice even if the proprietary Nvidia drivers might perform better - it's better to stick to the opensource versions as they seems to be more compatible(at least in my case for 2 machines during the last 6 months)

Here are the steps

Generally you should use the drivers from the official Ubuntu repositories.
Because you are having problems, using the latest drivers might be better.
Install the latest official stable NVIDIA drivers for the GEFORCE GTX 960M.

Based on this link you should install nvidia-361(which support GTX 960M). M is the mobile varient - on desktops you will find no M at the end of the model.

First uninstall the currently installed NVIDIA drivers.Boot the computer, when the GRUB menu appears ...

Highlight the Ubuntu menu entry and press the E key.Add nouveau.modeset=0 to the end of the linux line. Press F10 to boot the Ubuntu operating system.

When the login screen appears press Ctrl+Alt+F1.Enter your user name and the password, then execute :

sudo apt-get purge nvidia*
sudo reboot

Now install the latest official stable NVIDIA drivers.Boot the computer, when the GRUB menu appears ...

Highlight the Ubuntu menu entry and press the E key.Add nouveau.modeset=0 to the end of the linux line. Press F10 to boot the Ubuntu operating system.

When the login screen appears press Ctrl+Alt+F1.
Enter your user name and the password, then execute :

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

Note :
Maybe it is explicitly necessary to select the NVIDIA adapter in BIOS.
When you want to use drivers 361, adding the PPA is not necessary.
In this case the terminal commands you have to perform are these :

sudo apt-get update
sudo apt-get install nvidia-361
sudo reboot

In case you have installed the nvidia driver from their site then uninstall it as per that instructions.Uninstall that driver by running, as root, sh ./NVIDIA-Linux-x86_64-361.28.run and follow the on screen instructions.

Note : The solution I have provide has been tested on Ubuntu 14.04 LTS and Ubuntu 15.10 for two GPUs.


problem with QuickTime dmuxer in Totem player (.mp4 and .mov files)

Check this bug report: https://bugs.launchpad.net/ubuntu/+source/gstreamer0.10/+bug/856988

Worked for me


Try the setsid command of syntax:

setsid program [arg...]

so in your case:

setsid pycharm

From man setsid

       setsid - run a program in a new session

for example: setsid firefox


Static ip setup breaks internet connection

I was able to fix this by changing the below field in my /etc/network/interfaces file:

address 192.168.0.222

Turns out that the previous value of 192.168.0.111 was in the range reserved for DHCP by my router.


You need to have the intel-microcode package installed, and Hardware acceleration enabled in Chromium (or Google Chrome if using it instead), to improve performance of HTML5 video in the browser, such as when watching on YouTube.


Publish a file fails - cannot access web link (a file is no longer published)

This is a known bug: https://bugs.launchpad.net/ubuntu/+source/ubuntuone-client/+bug/1193274

It has been critical for weeks, yet still no fix.

One should be iminent in the next major update.

Very frustrating bug indeed!


How to add an AD group members to a local group

Issue seemed to be resolved by using setfacl which lets me add the AD groups and grant appropriate permissions. Sudo also seems to be resolved by just adding a config entry into /etc/sudoers.d/


Global menu not showing in Ubuntu 12.10 with Unity

Hate answering my own questions, but here it is: https://answers.launchpad.net/ubuntu/+question/215352


Toggle wireless network settings with a little script

Have you tried running nmcli for configuring NM?

I've just played a bit with nmcli con up id <AP essid> and it seems that with some scripting it could probably work...


Settings schema 'x.dm.slick-greeter' is not installed

lightdm-settings needs slick-greeter (https://github.com/linuxmint/slick-greeter) to be installed, even though it is not listed as a dependency. So just do

sudo apt install slick-greeter


How to get Lubuntu to forget wifi connection when new user logs in

Lubuntu uses NetworkManager. This explaines how to delete a know network.

sudo rm /etc/NetworkManager/system-connections/NETWORK_NAME

If I understand correctly from this source, run-level 5 is for graphical logins:

  Run levels 2 through 5 are full multi-user mode and are the same in a
  default UserLinux (Debian) system. It is a common practise in other
  Linux distributions to use run level 3 for a text console login and
  run level 5 for a graphical login.

You wrap the above command in a executable script and link it to /etc/rc5.d/your_script.
A little more information can be found in this answer


Try this:

As soon as you power on the computer, start pressing each of the following keys about 2-3 times per second.  Do this repeatedly with each key, so for example boot up once and press F2 about 2-3 times per second until you get to Windows boot or a menu that you can boot into the USB.  If F2 doesn't work, try again with F4.  If none of those work, please edit question and include all the information that displays on your screen when you boot, before you get to Windows.

F2, F4, F10, F12, Esc (escape)


it's doing the same on mine machine, the way I got round this was by using two fingers, which acts as a right click, give it a try.


Will encrypting my (huge) home directory slow performance?

There are a few factors to consider here.

In general, home encryption does not have noticible performance impact.
I use AES encrypted home on Natty running off a Persistent USB install :-).
To help firefox, I run its profile off a tmpfs ramdisk.
At this point, one question will be, how much security do you want?
My intention is to just secure my Persistent USB data in case the flash is lost.
While you have lots of data in your hoem, do you really access all of it during a session?
If not, this should not matter -- the filesystem is not decrypted completely; only data being accessed is decrypted.
What is your system configuration?
Specifically your processor power, system RAM and disk performance.
If these are moderate or more you are not likely to see an overhead.


couldnot find other computer on locally connected area

If you can ping other people computers, you should next try to share a folder in your home folder (rigth-click on  it in the file manager). Ubuntu don't come with Windows share fully installed and you will be prompted to install it if needed. Reply yes, or, if you prefer, install the samba packages (client should be there, but you need the server too if you want Windows users to access your files).
Hope this helps...


SSH'ing into ubuntu desktop that uses a VPN

You might be interested in trying a Dynamic DNS solution.  This is where your system updates a DNS entry every time it starts up, or whenever the WAN IP has changed.  This has the benefit of allowing you to use a DNS record instead of a [changing] IP address that can easily be added to your ~/.ssh/config.  Please understand that DNS entries have TTL values that can delay updates to the IP.  This delay is, by default, 300s, or 5m.

Typically, you find a Dynamic DNS provider, create an account, and follow their instructions for setup.  Alternatively, if you use a hosting provider such as Linode, you could write your own script to provide this functionality.  More details on how to easily set up Dynamic DNS with existing solutions are available in the Ubuntu Community - DynamicDNS document.

Be warned!  You are using this VPN service [assumingly] for anonymity.  You are suggesting that you wish to enable your sshd service to listen on your VPN IP.  Do you really want to open your machine up to anonymous access? You probably don't want to do that, for your own security.


According to instructions in https://www.jetbrains.com/phpstorm/download/ PhpStorm.sh should be in the bin subdirectory


headphones problem: internal speakers are working fine,but when heaphones are plugged in Iam only able to hear background sound vocals are not clear

try installing Alsa sound mixer software, it lets you control the master volume as well as headphones and speaker volume configuration

you can download it from here:

https://apps.ubuntu.com/cat/applications/gnome-alsamixer/


Recover an partially(~5%) zero overwritten, external HDD with single partition

Likely the filesytem your external drive came with did not store additional file system details or recovery partition tables to ease recovery. Therefore, once the partition table, or the file allocation tables where overwritten by zeros I see little to no chance to recover these.

Therefore you are faced with the cumbersome task to manually rename files recovered by PhotoRec to be able to use them again.

For some files such as photos, audio, video, or text documents there are tools to mass-rename them according to metatag information but still reconstructing the folder structure, or file dates would have to be done manually, and many file types can not be renamed by this.


How to find a graphics driver that works (faulty with nouveau & nvidia)?

From the looks of your paste, it seems like there shouldn't be any issue booting Windows XP. Nevertheless, a sudo update-grub may help out.

As far as the blank/frozen screen at the login, this seems like a graphics/driver issue. Apparently, Noveau (the open source Nvidia driver) doesn't work well with your card. So, the proprietary drivers may be needed.

By going to Geforce.com, you can determine the specific proprietary driver version for your card by doing a search for your card. In your case, the correct driver is the 304 series. This can be installed from the repositories via the command: sudo apt-get install nvidia-304.

After this has been done, reboot the computer and you should have a fully functioning display.

In the comments of your question, it appears that you're still having issues setting the "primary" monitor that displays the window manager (i.e. Unity, Gnome Shell, etc.) If I understand correctly, you want to use your external monitor as the primary display so that it shows the Unity launcher, Gnome Shell Activities bar, etc.

Luckily, I have a little bit of experience with this and I remember most of it! First though, let me explain the issue that I had.

I would leave my HDMI cable plugged into my laptop. If I started up my laptop with the HDMI cable plugged in, X would always place my external monitor to the right of my laptop's LVDS monitor. This is not what I wanted since my external monitor was physically to the left of my laptop and lead to some confusion. No matter how I configured the monitor in the Gnome Display or Nvidia configurations, it would always default to this behavior if I entered the login screen with the HDMI cabled plugged in. It seemed that the Gnome/Nvidia settings would only apply if the cable were plugged in after X started.

However, I found that if I left the HDMI cable unplugged until I got past the login screen, that my settings from nvidia-settings/GNOME would be applied correctly. At least, I think this was the case (it's been quite a while, honestly). However, I do remember setting something up for OpenBox specifically. In the file ~/.config/openbox/autostart I added the following lines:

xrandr --output HDMI-0 --left-of LVDS-0
xrandr --output HDMI-0 --primary #Make sure the desktop is on the HDMI monitor

Essentially, what this does is force my configuration no matter how it was originally loaded. In order to find your specific monitor names, use the command xrandr -q. I believe you can place the same lines above (modified to your own display names from xrandr -q) into ~/.config/xdg/autostart to have the settings apply to all desktop environments as soon as they are loaded and force your preferred configuration.


How to set Windows bootloader as default bootloader?

Edit that file, from terminal run

 sudo gedit /etc/default/grub

(file has comments to help you).
Find that line and set Windows number (number of Windows line in Grub, starting from 0). In my case that will be

GRUB_DEFAULT=2

Then save file and close gedit. Run that command to update grub:

sudo update-grub


I think I found the problem.  Even if I already uninstalled empathy app, the framework telepathy was still running in the background, so I had 2 connections opened on the xmpp server...


FTP and WWW services don't acknowledge connections

I ended up figuring this out. It wasn't directly a firewall issue. I have two NICs, one for the LAN and another for the DMZ, to which the WAN IP is NAT'ed. The default route was over the LAN. When receiving packets from the internet, the server tried to respond via the default route on the LAN. Disconnecting from the LAN enabled the services to communicate over the internet.

I still need private LAN communication, but I will tackle that later.


Monitor being shown as 'default' in settings with incorrect resolution & refresh rate

How I resolved the issue:

Open UEFI and disable GPU in favor of iGPU
Boot into Linux and change to nVidia driver
Reboot into UEFI
Re-enable GPU
Reboot


You probably want to start here Wiki on Ubuntu Bug Reporting


/usr/bin/java is a symbolic link to whichever is the current system version of java. The error indicates that the link is currently pointing to a file that no longer exists. (Use ls -al /usr/bin/java to see which).

You need to run sudo update-alternatives --config java and select Oracle Java 7 as the desired version, and it should correct all the java related links for you. I would have expected the installation process for this java package to have done this, but evidently something went wrong.


Android Studio not running _ Ubuntu 16.04

In my case I got error

  Unrecognized option: -Xm4g  Error: Could not create the Java Virtual
  Machine.  Error: A fatal exception has occurred. Program will exit.

I solved this spelling error by editing home/.AndroidStudio3.0/studio64.vmoptions file.


Try LXDE I installed LXDE on an older laptop with similar specs. as yours, and it flys. Ubuntu was my 1st choice, but the machine, esp. the graphics wasn't man enough...


How to properly remove kernel modules for RTL88x2BU in Ubuntu MATE 19.04

You can do the reverse steps:

Unload module

sudo modprobe -r 8822bu
sudo modprobe -r rtl88x2bu

Check for all module builds status

sudo dkms status

output

8822bu, 1.1: added
rtl88x2bu, 5.6.1, 5.2.21-050221-generic, x86_64: installed
rtl88x2bu, 5.6.1, 5.3.7-050307-generic, x86_64: installed

Unregister it from DKMS, sudo dkms uninstall .. is optional as we are looking for complete purge.

sudo dkms remove -m 8822bu/1.1
sudo dkms remove -m rtl88x2bu/5.6.1 -k 5.2.21-050221-generic
sudo dkms remove -m rtl88x2bu/5.6.1 -k 5.3.7-050307-generic

Remove source from DKMS

cd /usr/src/

WARNING: Be careful rm -r is a dangerous command!

sudo rm -r rtl88x2bu-*


How to mount the EFI system partition using Ubuntu 16.04 Live CD

To begin, note that deleting the Ubuntu boot loader is not usually necessary. If you plan to re-install Ubuntu, the new installation will take over the old one's location, so deleting the old boot loader won't achieve anything. If you plan to boot some other OS that's already installed, changing the boot order (with efibootmgr in Ubuntu or another Linux, EasyUEFI in Windows, or other similar tools) should be sufficient. The main reason to delete the old boot loader is if you've installed (or plan to install) some other OS or boot manager, and you want to keep Ubuntu's GRUB out of its menu. Beyond that, deleting Ubuntu's GRUB could qualify as "good housekeeping," but it's likely unnecessary.
That said, the most reliable way to mount the EFI System Partition (ESP) from the Ubuntu installer/emergency disk is as follows:

Open a Terminal window. (To do this, click the Ubuntu icon in the top-left corner of the screen, type "terminal", and either hit Enter or select the Terminal option.)
Type sudo fdisk -l. This should produce output that identifies the ESP (among other things), like this:

.
Device        Start      End  Sectors  Size Type
/dev/sda1      2048  1128447  1126400  550M EFI System
/dev/sda2   1128448 79626398 78497951 37.4G Linux filesystem
/dev/sda3  79628288 85917854  6289567    3G Linux swap

Identify your ESP; it should specify EFI System in the Type column. In this example, it's /dev/sda1. (The ESP is usually /dev/sda1 or /dev/sda2, but that's just what's most common.)
With the ESP identified, mount it to /mnt, as in sudo mount /dev/sda1 /mnt. If you prefer, you can create a mount point other than /mnt and mount the ESP there. This might be necessary if you want to mount multiple partitions.

You can then use ls, cp, mv, rm, and other text-mode commands in the Terminal window. Note that, unless you add various mount options, you'll need to use sudo to operate on files on the ESP.


How to write a midpoint with an azerty keyboard on 20.04 LTS?

Probably you had some kind of modification on your 16.04 machine.
If you want to do it in a similar way, you can open /usr/share/X11/xkb/symbols/fr for editing, find this line:
key <AE01>  { [ ampersand,  1          ] };

in the French (AZERTY) section and change it to
key <AE01>  { [ ampersand,  1,  U00B7  ] };

Then you can do: AltGr+& => ·


Running these commands in a Terminal window (Ctrl+Alt+T) should do it for you:

sudo apt-get update
sudo apt-get install bum

When trying to find a package like that, it helps to use the Synaptic Package Manager. When I searched 'boot-manager' in it, the 'bum' package came up.


Cron job bash script to restart desktop sharing?

Script:

#!/bin/bash
if [ "`pgrep vino-server`" = "" ]; then
   DISPLAY=:0.0 /usr/lib/vino/vino-server --sm-client-disable >/dev/null 2>&1 &
fi

Don't forget to give it execute permission: chmod +x /path/to/script. Then run crontab -e and add this line:

* * * * * /path/to/script


Issues installing and using BCM43142 broadcom wireless network

Disable Secure Boot in BIOS and all should work. The driver is installed.


Which Ubuntu version should I install 14.04.2 LTS or 15.04

The difference is basically that 14.04 has a longer support period than 15.04 (April 2019 and January 2016 respectively). 14.04 would be a better choice if you are aiming on installing the system and not reformatting for a long period, for example on a server or with the more conservative desktop users.

On the other hand, if you are looking for slightly more modern software, or are just trying out the system, 15.04 would be a better choice.

If you download both LiveCDs, you can test them both without installing on your hardware, and see which works out better for your own uses.


Ubuntu Server Blinking Cursor after Fresh Install

I fixed the issue, by accessing the command line/terminal and just re-installing GRUB. I am guessing that there was an issue with the install media to where it didn't install GRUB properly. But, I got it to work! :) Thanks for the help all!


I see that you've already uninstalled the JDK (Java Development Kit) and JRE (Java Runtime Environment). The openjdk-*-jre* is actually the JRE (Java Runtime Environment) of OpenJDK, the JDK of OpenJDK is something like openjdk-*-jdk.

When you run java and the system says The program 'java' can be found in the following packages: ..., it means you have not installed any JRE yet. When you run javac and the system says The program 'javac' can be found in the following packages: ..., it means you have not installed any JDK yet.

-or-

Maybe you have installed one, but you have not properly set it up. This happens if you install JRE/JDK without using package manager, i.e. not using apt-get, aptitute, Software Center, Synaptic Package Manager, etc. If you install JRE/JDK by using package manager, I am sure that you can run java or javac, i.e. if you run java -version or javac -version the version you have installed will be printed instead of a suggestion of package you need to install. However, it is not the case. Let's say that you have uninstall any JRE/JDK.

How to uninstall

This is the answer about how to uninstall (because the question is "How to uninstall JDK"), just ignore it if you have uninstalled it.

The simplest way is to use terminal. First, type:

apt-get autoremove <list-of-package-names> -s

It will do a simulation, so you can see what packages will be removed. If you are sure about what you do, just run the command without -s parameter and use sudo. For example:

sudo apt-get autoremove gcj-4.6-jre-headless gcj-4.7-jre-headless openjdk-6-jre-headless openjdk-7-jre-headless

DANGER! Pay attention on the list of package you are about to remove (you will see it before confirming the actual execution), because it will also remove packages that depend on the package in the list (parameters after sudo apt-get). So, any application that needs JRE/JDK to run will also be removed. I have warned you :).


How can I create profile-specific launchers for Chrome in 16.04?

You can use this site
to create chrome apps of your preferred webapps and then install them on the appropriate chrome profile. the first time it will ask for your credentials but then everything will open properly. I've dine that with my Gmail accounts and everything works well.


I would not update. Especially if you currently have packages in a working condition. Never run a partial update or install packages kept-back. They are like so for a reason. Are you running Maverick BETA? If so that would explain it. You should wait for the packages to sort themselves out, and they will.

(I am actually taking a break writing a blog article that explains things like this right now, odd).


Error when starting wiican using ChrUbuntu

I actually got this to work using xwii instead of wiican. It was 1000x easier.


How to update list of installed packages

From Terminal, try:

sudo apt-get update

Your question is not very specific or clear to me.  Is there a reason you have separate partitions for essential directories?  You may find your answer in the man pages for apt-get:

man apt-get

Or search through all the man pages using the -k switch:

man -k installed packages


If you definitely want dash plus command-line editing and history, you can use rlwrap:

rlwrap dash

Suggestion:

rlwrap -cmD2 dash

To use rlwrap, you'll have to:

sudo apt-get install rlwrap


What domains do I need to whitelist for updates?

Just allow the *ubuntu.com domain as well as *.launchpad.net and you will be able to get updates from the official repositories and PPAs.


adobe connect add in not installed error in both chrome and firefox in Ubuntu 12.10

You can go and download Google Chrome from https://www.google.com/intl/en/chrome/browser/

It has built in versions of Adobe products.

Chromium and Firefox still use the Adobe Flash plugin that you install and it doesn't always work right I have found.

If you have Google Chrome installed then just uninstall all the adobe products you installed.


Python: module not found after manual install

After inspecting sys.path I've realized that the interpreter was loaded from a wrong location (/usr/local/bin instead of /usr/bin/), so I did:

sudo rm -rf /usr/local/bin/python*

And now it works! Earlier I tried to build & install python from the source tarball (with success) and it seems it put its binaries to an Ubuntu-unfriendly location. The problem was rooted in the fact that /usr/local/bin precedes /usr/bin in the PATH variable.


How to get original system command after overwriting it with a function?

You are looking for command:

  command [-pVv] command [arg ...]

  Run command with args suppressing the normal shell function lookup. Only builtin commands or commands found in the PATH
  are executed.  If the -p option is  given,  the
                    search  for command is performed using a default value for PATH that is guaranteed to find all of the standard
  utilities.  If either the -V or -v option is supplied, a
                    description of command is printed.  The -v option causes a single word indicating the command or file name used to
  invoke command to be displayed; the -V  option  pro‐
                    duces  a  more verbose description.  If the -V or -v option is supplied, the exit status is 0 if command was found, and 1
  if not.  If neither option is supplied and an
                    error occurred or command cannot be found, the exit status is 127.  Otherwise, the exit status of the command builtin is
  the exit status of command.

Example:

$ pwd() {
> echo 'command test'
> command pwd
> }
$ pwd
command test
/etc

There is also builtin, which is more restrictive:

  builtin shell-builtin [arguments]

  Execute  the  specified  shell  builtin,  passing  it arguments, and return its exit status.  This is useful when defining a
  function whose name is the same as a shell
                builtin, retaining the functionality of the builtin within the function.  The cd builtin is commonly redefined this way.
  The return status is false  if  shell-builtin
                is not a shell builtin command.


How to resolve the "Failed to download repository" error?

I had same issue,
so here what I did to solve it:

Open Software Sources from dash
Switch to other software tab, uncheck the codes that are causing the issue, in my case it's http://ppa.launchpad.net/myunity...

then run the following commands:

sudo apt-get clean
sudo apt-get update

and you should be able to run updater


How can I know what software is provided by Ubuntu Mate's Boutique without downloading Ubuntu Mate itself?

One can get an idea of the software offered by Ubuntu Mate's Software Boutique by downloading the contents of this link as sb.html and then running

grep -n name sb.html

The list has 5782 entries currently. gcolor2 isn't one of them.

However, in gcolor2 package missing in Ubuntu 18.04?, there's an answer describing how gcolor2 can be installed in any 18.04 flavor by using the package from the xenial repository.


Is anyone aware of any progress made in packing updated versions of tracker (desktop search tool)?

Tracker's packages are sync'd from the Debian project as is a lot of the software in the Ubuntu repositories. So getting an updated version depends on the upstream keeping the package updated and getting it updated in Debian. From there it will be sync'd into the Ubuntu repositories every new release.

I'm uncertain of Tracker's life in the Ubuntu project. Zeitgeist has replaced Tracker in Unity for desktop searching and indexing and is already integrated into the Unity interface. Using Dash you can search through files, folders, contacts, applications, and many other aspects of the desktop - all powered through Zeitgeist.


xubuntu and Ubuntu will present the same boot signature and thus refind will not find it.  You can change the name on the boot from ubuntu to something else should work. So depending upon which one was last install you should see two ubuntu entries and one will be xubuntu.


Fixed the issue by doing the following steps
# touch /var/account/pacct
# chown root /var/account/pacct
# chmod 0644 /var/account/pacct
# accton /var/account/pacct

as written in the article


Madwifi Driver Installation Error : "Cannot detect kernel version"

Just install module-assistant and choose the madwifi from the module assistant list, this will allow you to download, compile and install the modules.


Try the a key for the same -- INSERT -- operation. It should work just like i. AFAIK, it works on Ubuntu 12.04 and Raspbian.


In order to get it fixed I had to install:

sudo apt-get install debian-archive-keyring

And then create the chroot with

sudo DIST=sid ARCH=i386 pbuilder create --debootstrapopts \
--keyring=/usr/share/keyrings/debian-archive-keyring.gpg


How to turn my Dell Mini 10v to become a WiFi hot spot?

I am not sure of the hardware associated with a Dell Mini 10v, but take a look at the following: How to set up Ubuntu as wireless accesspoint?


How can I add a Notebook background in Glade?

You can find some examples here, this is the only way I know:
http://erikos.sweettimez.de/2011/11/23/gtk-3-theme-style-your-applications/


Hard drive failing or problem with file system?

Check your disk's SMART data...

boot to a Ubuntu Live DVD/USB
start the Disks application
select the disk in the left pane
click the "hamburger" icon
select SMART Data & Tests
review the data
run the tests

To check the file system on your Ubuntu partition...

boot to the GRUB menu
choose Advanced Options
choose Recovery mode
choose Root access
at the # prompt, type sudo fsck -f /
repeat the fsck command if there were errors
type reboot

Update #1:

In Windows... because you dual-boot...

boot into Windows
important: if you've installed any drivers that allow you to access Ubuntu partitions, uninstall it now!
open the Power control panel
choose change what the power buttons do
choose change options that are unavailable
uncheck fast startup
close the Power control panel
open an administrative command prompt window
type powercfg /h off
type chkdsk /f c:
approve to run chkdsk at next reboot
type chkdsk /f x: (replacing "x" with drive letters of other visible NTFS partitions)
reboot into Windows to let chkdsk run on drive C:


Can I print both side using gutenprint driver in canon ip2770?

Print odd pages. Flip paper stack and return to feeder. Print even pages. That's about the best it gets for such an old printer.


You are using the user ubuntu which doesn't have permission to create/edit files in /var/www. So you're giving it permissions, uploading the new files, and removing permissions. You need to remove permissions back because the server will give you permission denied if your files have too wide permissions.
You have 3 alternatives:

change the server settings to run files with wider permissions. This might be a security problem.
move the website to the 'ubuntu' user dir, and make a link in /var/www. You might need to change further settings for this to work (see FollowSymLinks), but once it's set up all files will have proper permissions and ubuntu will be the owner.
connect to the server with the user that owns the files in /var/www/[project]/public_html. You'll need to allow that user to connect, which might be a security problem.

P.S.: you don't need to run the usermod command multiple times. Once the user is in the group, it's in the group, there shouldn't be any process removing it from the group.


You have to keep the path of that directory in a global variavble. For example:

export DIR="/path/to/directory"

To make the change permanently, add the above line to your ~/.profile file.


Upgrade to Ubuntu 14.04.03LTS : No entry in /run/user

I found the solution here and the reference given therein. Adding the line session optional pam_systemd.so to /etc/pam.d/lightdm solved all the issues I mentioned (I am using the lightdm display manager).


No install Ubuntu 13.10 alongside Windows 8 option available in the installer. Why is that?

Normally Ubuntu installer doesn't see unallocated space.You have to create ext4 partition from that unallocated space.To do this exit the Ubuntu installer and open up Gparted Utility.

Create a new ext4 partition from that free space.Now run the Ubuntu installer, and  it will detects.


Can 64-bit be dual booted with 32-bit Windows?

Yes, should be no problem at all, the OS for the most part are independent of each other


Create a matlab.desktop file in ~/.local/share/applications

[Desktop Entry]
Name=Matlab
Type=Application
Exec=*location to matlab*
Icon=*location to icon (optional)*
Terminal=true

You can use whereis matlab to find the location to matlab.

The last line is optional, either you have to find a suitable icon for matlab on your computer, or download one and store it where appropriate.

Finally, make it executable with sudo chmod +x matlab.desktop, or by right clicking on the file in the file manager, and make it executable under permissions.


Unable to install Apache OpenOffice 4.1 on Ubuntu 14.04

Follow these steps to install OpenOffice 4.1 onto Ubuntu 14.04.  Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo apt-get remove --purge libreoffice* #if installed and you want to remove it.
sudo apt-get autoremove

Download OpenOffice

For 32 bit

wget http://sourceforge.net/projects/openofficeorg.mirror/files/4.1.0/binaries/en-US/Apache_OpenOffice_4.1.0_Linux_x86_install-deb_en-US.tar.gz

For 64 bit

wget http://sourceforge.net/projects/openofficeorg.mirror/files/4.1.0/binaries/en-US/Apache_OpenOffice_4.1.0_Linux_x86-64_install-deb_en-US.tar.gz

Extract the file

tar -xvfz Apache_OpenOffice_4.1.0_Linux_x86_install-deb_en-US.tar.gz (for 32bit)

tar -xvfz Apache_OpenOffice_4.1.0_Linux_x86-64_install-deb_en-US.tar.gz (for 64bit)

cd en-US/DEBS/
sudo dpkg -i *.deb
cd desktop-integration
sudo dpkg -i *.deb

make sure that you have the space between the command dpkg and the -i

For Libreoffice installation do the following:

sudo add-apt-repository ppa:libreoffice/libreoffice-4-3
sudo apt-get update
sudo apt-get install libreoffice

Or you can download the .deb file from Libreoffice, and install it that way.

Note: Both Libreoffice and Open Office can co-exist on the same machine.


Its seems that I have lost permissions to home folder now after rebooting I can't log in?

Problem is fixed with this commands:

chmod -R u=rwX,go=rX /home/user

However I'm not sure if those are the right permissions for the user home folder. frankly it's mostly like that they are not.


Few options in nvidia-settings and stuck on CPUX for Xs on shutdown

I was having similar issues with the Dell 7559 and fixed it by using kernel 4.8.3. It also fixed the soft lock that was happening on suspend. To install a new kernel go to the index of kernels and find the latest one that doesn't have an rc next to it. There are three files that you need:

The “generic” header file for your architecture (in my case, 64-bit or “amd64”)
The header file in the middle that has “all” towards the end of the filename
The “generic” kernel file for your architecture (again, I would pick “amd64” but if you use 32-bit you’ll need “i686”)

You put these files into their own folder. Now open up the Terminal, use the

cd
command to go to your newly-created folder, such as

cd /home/user/Downloads/Kernel
and then run:

sudo dpkg -i *.deb


PHP serve command error in Laravel project

Try this:
php artisan clear-compiled
composer dump-autoload
composer install / composer update


Ubuntu 12.04 LTS doesn't recognize full memory?

This happens when you use 32-bit installation of Ubuntu. It's limited to 3GB of RAM (for technical reasons).
To use full memory upgrade to 64-bit version.