Ubuntu 15.04, pm-utils do not look into /etc/pm/power.d/ anymore, what instead?

Ok, found an answer in Arch Wiki. They give the next solution:

  There is just one thing systemd cannot do (as of systemd-204): power
  management depending on whether the system is running on AC or
  battery. To fill this gap, you can create a single udev rule that runs
  a script when the AC adapter is plugged and unplugged:

/etc/udev/rules.d/powersave.rules
SUBSYSTEM=="power_supply", ATTR{online}=="0", RUN+="/path/to/your/script true"
SUBSYSTEM=="power_supply", ATTR{online}=="1", RUN+="/path/to/your/script false"

For my Sony Vaio, I have this as my personal setup:

/etc/udev/rules.d/99-laptopac.rules

SUBSYSTEM=="power_supply", ATTR{online}=="0", RUN+="/usr/local/bin/sony-thermal.sh true"
SUBSYSTEM=="power_supply", ATTR{online}=="1", RUN+="/usr/local/bin/sony-thermal.sh false"

/usr/local/bin/sony-thermal.sh

#!/bin/sh

help() {
    cat <&ltEOF
$0: SONY laptop thermal profile management

This script selects between "performance" and "silent" modes depending
on whether laptop runs on AC power or battery power.

EOF
}

set_sony_thermal_profile() {
    [ ! -d /sys/devices/platform/sony-laptop ] && exit $NA
    [ ! -f /sys/devices/platform/sony-laptop/thermal_control ] && exit $NA
    case $1 in
    performance)
        printf "Setting SONY thermal control to performace mode."
        thermal_control=performance ;;
    silent)
        printf "Setting SONY thermal control to silent mode."
        thermal_control=silent ;;
    *)
        printf "Setting SONY thermal control to balanced mode."
        thermal_control=balanced ;;
    esac
    echo "$thermal_control" > /sys/devices/platform/sony-laptop/thermal_control && echo Done. || \
    echo Failed.
}

case $1 in
    true) set_sony_thermal_profile silent ;;
    false) set_sony_thermal_profile performance ;;
    help) help ;;
    *) exit $NA ;;
esac

exit 0

This prevents CPU in my notebook to go into "throttling" continuously even at light loading conditions with great performance and user experience losses.


Dual Boot ( Windows 7 32bit and Ubuntu 14.04LTS 64bit )

There is no cross-effect with dual-boot, where the other OS is 32-bit.

Generally you should use 64-bit if you have at least 2GB RAM, and your PC/laptop is reasonably modern. Ubuntu 64-bit includes full 32-bit support.

Possible exceptions would be: need to support UEFI (avoid 32-bit), or (laptop with) Intel Atom graphics (needs 32-bit driver).


Webapp installation incomplete in ubuntu touch

the package name needs to contain the official developer name.
Change applicationName: "appname" to applicationName: "appname.developer"


It's difficult to provide a step-by-step guide for Windows (7/8) installation, but I guess it should be possible to tell Windows to use only the first partition.

You will then lose the Grub menu which you can restore IMHO more easily if you use Clonezilla (e.g. in Parted Magic Live) to clone your Ubuntu partition. See also: https://askubuntu.com/questions/260280/comparing-disk-partition-os-cloning-tools

In that case you'll simply need to update grub (using sudo update-grub command in Terminal) to have the newly installed Windows added to the boot menu. See also: How can I repair grub? (How to get Ubuntu back after installing Windows?)

So I suggest the following:

Save your 2nd (Ubuntu) partition using Clonezilla (e.g. in Parted Magic
Live CD/USB)
Install Windows in your 1st partition
Restore your Ubuntu partition using Clonezilla (e.g. in Parted Magic
Live CD/USB)
Start your computer, go to Ubuntu desktop, open Terminal, and enter sudo update-grub to add Windows to the Grub menu


Apt-get not working after removing gnupg

You have to use livecd to chroot to your system and reinstall gnupg from that.
There is an article on help.ubuntu.com on how to do that.

Steps taken from that article:

Boot the Ubuntu Live CD.
Press Ctrl-Alt-F1
sudo mount /dev/sda1 /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo chroot /mnt
apt-get update
apt-get upgrade

But instead of step 9 above - you will use apt-get install gnupg


I had the same problem! Installing Bumblebee really worked for me!

  sudo add-apt-repository ppa:bumblebee/stable

  sudo add-apt-repository ppa:ubuntu-x-swat/x-updates

  sudo apt-get update

  sudo apt-get install bumblebee bumblebee-nvidia linux-headers-generic


Ubuntu 12.04 freezes after login with 3 screens not mirrored. ATI Radeon HD 6870

I found a way to setup the 3 monitors. I reinstalled ubuntu and used it's default open source drivers and created the /etc/X11/xorg.conf file

sudo nano /etc/X11/xorg.conf

and added the following:

Section "Device"
        Identifier      "Configured Video Device"
EndSection

Section "Monitor"
        Identifier      "Configured Monitor"
EndSection

Section "Screen"
        Identifier      "Default Screen"
        Monitor         "Configured Monitor"
        Device          "Configured Video Device"
        SubSection "Display"
                Viewport   0 0
                Virtual   4800 900
                Depth     24
        EndSubSection
EndSection

the virtual 4800 900 must be the total of your screens resolution eg. (1600 * 3 = 4800)

Then I went to display... and turned of the mirrored display option.
Just don't rearange the screens. That makes it crash as soon as you apply it.

Another thing I noticed is after I applied the updates the 2nd screen had strange shadows and windows would leave ghosts. The 3rd screen would flicker every now and then.

To fix that go to display and turn the mirror mode on and off again.

*EDIT

I found a way that works better. Install the 3.5 kernel and xorg-edgers

http://www.ubuntuupdates.org/ppa/xorg-edgers

http://www.ubuntuupdates.org/package/xorg-edgers/precise/main/base/xserver-xorg-video-ati


17.10 After upgrade, System BootOrder not found

For people still finding this question: It was answered in a later thread: system bootOrder not found


Display specific characters in specific time from a text file

The sleep command make delay for a specified amount of time (in seconds). With sleep 1 delay would be for 1 second (one word per second). You can change for more time delay by incrementing the second parameter or for delaying less than 1 second divide it to low units; Like sleep .1 for 1/10 second delay or sleep .001 for 1/1000 second delay and etc.

So if you want to display 120 words per minute you can use sleep .5 (that means display each word in 0.5 second which also means 120 words in a minute)

And your final script would be as following:

#!/bin/bash

for word in $(< "$2");
do
    echo "$word";
    sleep  $1;
    clear;
done

Save the script named scriptname.sh and make it as executable by chmod +x scriptname.sh and then run the script with ./scriptname.sh .5 infile


It turns out it was a graphics card driver issue. I am using the GF119M [NVS 4200M]. I installed and switched to the NVIDIA legacy binary driver version 304.117 and now everything works flawlessly.


Try this:

sudo nano /etc/default/grub

And add/edit to /etc/default/grub in the variable "GRUB_CMDLINE_LINUX_DEFAULT":

acpi_osi=\"!Windows 2012\"

e.g:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=\"!Windows 2012\""

Then run:

sudo update-grub

For me, works flowless for Lenovo G480.


Byobu: Create new window does not maintain pwd

Unfortunately, this behavior was changed in version 1.9 and seems like not going to get fixed.
My request just left with no answer: https://github.com/tmux/tmux/issues/371

That means: the directory for all new processes will be the current server's dir. i.e. if you start tmux from your home dir, all new shells will start there as well.

Currently, the solution is to change all your key bindings for new-window and split-pane and add -c #{pane_current_path} to explicitly use the current pane's CWD as starting directory for the new one.

Another solution can be this.
There's a mod of tmux (I'm the author) to add a proper scripting language to tmux to allow using aliases, binding multiple commands in 'mode', variables, loops, etc...
And also, it brings back the that behavior: new windows and panes are opened in the current directory.

The sources are here: http://ershov.github.io/tmux/


Asus Zenbook: how do I apply the bluetooth patch for 11.10?

Replace Step 4 in the howto with the below:

cd into the uncompressed kernel directory, e.g. cd linux-3.3-rc5
Then paste the following to download and directly apply the patch:

wget -q -O- http://fenski.pl/zenbook/bluetooth.patch | \
sed -e 's#linux-3.2.5/##g' -e 's#linux-3.2.5.orig/##g' | patch -p0

Continue with the howto and compile the kernel!


I'm sorry for bad news but Gnome3 will not work with Compiz as it has its own windows manager compositor called Mutter/Clutter.
However, if you will use Gnome 2 you will be able to run Compiz and enjoy its effects.


How to get gsettings-desktop-schemas >= 3.23.3 on Ubuntu 16.04?

You did it wrong.

You should download xenial's version:

Get its build-dependencies with
sudo apt-get build-dep gnome-settings-daemon
Get its source sudo apt-get source gnome-settings-daemon
Patch the source (yours "applied the change")
Change configure options and run ./configure ...
Create custom deb-package with these options.
Install self-compiled custom package.

I hope you got idea.


How can I fix this problem with drop down menus?

I updated plasma to 5.8.5, seems to fix the problem.


How do I filter a script's arguments and save them to a new file?

Writing output to a file whose name was provided interactively by the user
You've said you're having trouble saving to a particular file whose name is provided by the user of the script, and you've emphasized wanting help with that specifically. But you didn't mention any trouble prompting the user to enter the filename. So I assume you have that working, and that you're doing something along the lines of IFS= read -r outfile, where outfile is the name of the variable that will hold the user-provided output filename.
If writing output to the file whose name is held in outfile is all you have left to do, then you already be very near to your goal. Replacing outfile with whatever variable name you chose...

As with other parameters in the shell, the variable you read into can be expanded as $outfile, and you can and should prevent undesired splitting and globbing by enclosing that in double quotes, i.e., by writing "$outfile".
As with other filenames, you can use output redirection to write to this file. So, just as you could use >out.txt to write to a file whose name is literally out.txt, you can write to the file whose name is held in your outfile variable by writing >"$outfile".

That might be all you need. But there are some other modifications you might consider.
You can use find and do most of what you need without -exec.
As steeldriver says, from your stated goals it looks like you don't want your script to consider all the files in the current directory, as find . -maxdepth 1 ... does, but instead only consider the arguments passed to your script.
Still, it may well be reasonable to use find for this, and one benefit of doing so is that if you do need to modify it to operate recursively later, that will be very easy. (On the other hand, it's often unwise to undertake extra effort to prepare for features you might need to add later, since it's hard to predict what features those will actually be.)
In the rest of this answer, I'll explore that possibility. I'll give what might be a full solution, but you may or may not decide it's acceptable for your needs. You'll likely want to modify it in some way. My goal isn't to provide a polished script, but instead to demonstrate techniques you can use. (You'll likely get other answers that demonstrate approaches like shell loops and checking each file with [ -d filename ] as steeldriver suggested.)
If you want to use find, you can pass on the arguments your script received to find as roots for its search in place of where you currently wrote ., and use -maxdepth 0 so it doesn't actually descend into them. This would do the wrong thing if some of the filename arguments to your script start with -, since they could be interpreted specially by find (as options, predicates, or actions). But most commands treat arguments with leading - characters specially; usually it is sufficient to document this behavior for other users and to ensure you don't accidentally pass such paths to your script. (If you really want to consider an entry in the current directory named like -foo, you can pass its name as ./-foo instead.)
For simplicity, I will first consider how to solve the easier problem of outputting lines for all arguments passed to the script that are names of directories, no matter how many entries they contain (i.e., ignoring the "no more than 20 files" requirement).
find "$@" -maxdepth 0 -type d -printf '%M %p\n' 2>/dev/null >"$outfile"

Here's how that works:

"$@" expands to a list of all the script's positional parameters. (The command-line arguments passed to your script become the values of its positional parameters $1, $2, $3, and so forth.) Each will be passed to find as a separate argument. This works even if some of the names contain spaces.
-maxdepth 0 tells find not to look any deeper than the paths you explicitly passed it. Therefore it will only consider the command-line arguments passed to your script.
-type d finds only directories, just as you used it in your command.
-printf '%M %p\n' prints an ls-style symbolic permissions string (%M), a space, the filename (%p), and ends the line (\n). See the documentation of the -printf action in man find.
I'm not sure, from your description, whether or not your script should consider it normal for the user to pass arguments that don't even identify any kind file at all, directory or otherwise. So, rather than make up requirements that might not apply to you, I've gone with the quick and dirty approach of suppressing all error messages from find with 2>/dev/null. This redirects standard error (file descriptor 2) to /dev/null (a special "device" that throws away its input). If you want to see error messages when arguments passed to your script don't name anything at all, just omit this part. (The script will still do its job, even though error messages are displayed. So they're effectively warnings rather than errors.) If you want some other behavior, you can work on this and/or give more information about your requirements. I call this a "quick and dirty" approach because it is possible for find to issue other error and warning messages, and they too would be suppressed.
>"$outfile" writes to the output file whose name is held in the outfile variable, as described above.

One thing to consider is what happens if the user doesn't pass any arguments. Then find sees no roots to start with. When this happens, it behaves as if you passed .. (Not all find implementations treat the absence of roots as an implied ., but GNU find, the find implementation in Ubuntu, does.) You should handle this... if you don't want that behavior.
Filtering directories containing more than 20 files
It's reasonable to use -exec to call another command that will count the files in each directory, and your approach to that is on the right track. But this should go before the -printf action (or whatever other action you use to cause find to output filenames), so that this action only happens for directories that pass the test.
If you choose to count the files by counting how many lines of output an ls command produces, then that ls command should be invoked with the -q option. This is because filenames can contain weird characters you might not expect, including newline characters. -q replaces such characters with ?s, which for many purposes would be inadequate, but since you're not actually looking at the names, it's fine. (You may also want to use the -1 option, because although it is redundant when ls outputs to a pipe (as here), it clearly documents your intent that ls emit one line per file.) In general you should avoid parsing ls, but since you don't care about the actual filenames and -q ensures you get one line per file, it is okay.
But I'll show a different technique instead. You can put this test after -type d but before -printf:
-exec bash -c 'a=("$1"/*); ((${#a[@]} <= 20))' _ {} \;

bash -c ... uses a bash shell. I've written bash instead of sh because there's a bash feature I want to use: arrays. The shell runs a=("$1"/*); ((${#a[@]} <= 20)). In the first command, a=("$1"/*):

"$1" expands to the first positional parameter, which corresponds to the filename find passes in place of {}. This is the name of the directory being processed.
Writing "$1"/* expands to the paths of the files contained in that directory, omitting those whose names start with ., like ls command did. (If you want to count those too, you can write shopt -s dotglob; before a=....)
Parenthesizing it on the right-hand side of a variable assignment causes it to be stored in an array variable.

The array is called a and its size can later be obtained by writing ${#a[@]}. The second command, ((${#a[@]} <= 20)), takes advantage of that:

(( )) evaluates arithmetic expressions and returns true/success if they are nonzero, false/failure if they are zero.
As mentioned above, ${#a[@]} expands to the size of the array, which is the number of entries in the directory find passed in place of {}. This is what you need to compare to 20.
<= 20 compares it to 20.

You can try experimenting with other values than 20 to ensure it's working properly.
Putting it all together
A full script could look something like this (but please remember, I don't know all your requirements, and this is intended much more as a demonstration than as a solution):
#!/bin/sh

if [ "$#" -eq 0 ]; then
    printf '%s: warning: no arguments, behaving as "%s ."\n' "$0" "$0"
fi

printf 'Output filename> '
IFS= read -r outfile

find "$@" -maxdepth 0 -type d \
         -exec bash -c 'a=("$1"/*); ((${#a[@]} <= 20))' _ {} \; \
         -printf '%M %p\n' 2>/dev/null >"$outfile"

A few considerations:

The user who runs the script must be careful what they enter as the output filename. If that file exists, it will be overwritten.
I went ahead and demonstrated one possible way to deal with the case of no arguments: proceeding, but warning the user that it is as though they ran the script and passed ..
Although the shell command run from find's -exec action relies on bash for the array, the larger script that reads user input and calls find doesn't use any such features. You can run it with bash if you like and you can change the hashbang to #!/bin/bash. But I've gone head and written it as #!/bin/sh, as that should be sufficient.

I named my script file lt20. You can call it whatever you like, but you should make it executable by running chmod +x lt20 (but with whatever name you did give it). Here's what it looks like to use the script, with text entered by the user shown in italics:
$ ./lt20 /usr/*
Output filename> out
$ cat out
drwxr-xr-x /usr/arm-linux-gnueabi
drwxr-xr-x /usr/arm-linux-gnueabihf
drwxr-xr-x /usr/games
drwxr-xr-x /usr/lib32
drwxr-xr-x /usr/libexec
drwxr-xr-x /usr/local
drwxr-xr-x /usr/src
My machine has twelve subdirectories of /usr, and they were all passed as arguments to the script, but only those with 20 or fewer entries (other that entries that started with .) were listed. All of them happened to have the same permissions, drwxr-xr-x, but the script only shows the same permission string for each entry when they actually have the same permissions.


loopback module for grub with secure boot

I'm trying to work around this at the moment.

It looks like ubuntu's grub has been explicitly patched to prevent loading of modules during secure boot. The error message is slightly unhelpful: it confusingly references the filename, when the error occurs regardless of what module is being loaded:

apt-get source grub-common
   ...
grep -C 10 "Secure Boot forbids" -r .
   ...
#ifdef GRUB_MACHINE_EFI
  if (grub_efi_secure_boot ())
    {
      grub_error (GRUB_ERR_ACCESS_DENIED,
                  "Secure Boot forbids loading module from %s", filename);
      return 0;
    }
#endif
...

The patch that adds this is ./debian/patches/no_insmod_on_sb.patch

Your best bet is probably to rebuild grub either hardcoding loopback support or allowing the loading of modules, or maybe you can just disable secure boot when booting from usb (since this tends to be quite a rare activity).

The security implications of allowing grub to load modules are rather complicated, so I'm going to avoid commenting on them because someone will instantly tell me I'm wrong, and we'll have to have an argument.


In Ubuntu, there is the Ubuntu repository which you can find most of popular apps and you only need to write:

sudo apt-get install app

However some apps needs to be downloaded and manually updated such as Eclipse(If you wish there is an old version of eclipse in Ubuntu Store)

There are two ways of download these apps. Either you find a PPA(Personal Package Archives) that includes this app and its update, or you can download the tar file, extract it to install and manually update from apps menu(such as Eclipse)

You can find PPA's related to your apps(f.e Oracle Java JDK by Webupd8). Searching with "app PPA" will find you related PPA's often.


Cannot shutdown or restart using Ubuntu 12.10

Try using the command reboot or shutdown -h now with root login. Give more detail about what error you get.


Trying to install lightshot but there's no ./config or ./configure file or *.sh to intall the program

The .cpp files suggest to me you have downloaded the source package, which you would have to build.

Assuming we are talking about the same tool, i.e. a screen capture program, then the way to install it on Ubuntu would be this

sudo apt-get install wine
wget http://app.prntscr.com/build/setup-lightshot.exe
wine ./setup-lightshot.exe


How to avoid "trying to overwrite X which is also in package Y"

Divert the other packages' files as part of your preinst. This is exactly what dpkg-divert is for. Don't forget to remove the diversion in your postrm. See the man page and the Debian wiki for examples.


If I chose "Replace Windows with Ubuntu", do I lose the other partition too?

Update for Ubuntu 18.04 and above
New installations of recent versions of Ubuntu does not use a separate swap partition any more. They use a swap file by default.
Original Answer
If you choose "Replace Windows 8 with Ubuntu" it will format the whole physical drive and you will lose your data partition! See: How do I recover my accidentally lost Windows partitions after installing Ubuntu? for an example of someone who made this mistake.
To do what you want, you have to take matters in your own hand and choose "Something Else..."
This choice will let you choose which partition to delete and reformat. A slip of your finger may cost your data. Make two backups in external media before going any farther.
The partition structure used by Ubuntu is different from Windows. You will need at least two partitions, the root (also known as /) and the swap, to run Ubuntu properly. The root is to be ext4 format with mount point / and the swap has its own format and requires no mount point. Creating a separate partition in ext4 format with mount point /home is also a good idea. This is the rough equivalent to Windows data partition. It needs to be in ext4 format as it keeps your personal configuration files as well, and those need specific permissions.
See partitioning suggestions for some details on Ubuntu specific partitions.
See Does it make sense to create swap partitions for new installations nowadways?
Also see https://help.ubuntu.com/community/PartitioningSchemes
Hope this helps


It may be too late to answer but I bumped into the same problem just now.

You posted your problem here so I assume that you might have ran Dovecot on Ubuntu. The problem is that pipe instead of mailtrain should be used for backend under Debian.

plugin {
  #setting_name = value
  antispam_backend = pipe
  antispam_mail_spam = --spam
  antispam_mail_notspam = --ham
  antispam_mail_sendmail = /usr/bin/sa-learn-pipe.sh
  antispam_spam = Junk
  antispam_trash = Trash
}

What's more, if you were following the tutorial from http://wiki2.dovecot.org/Plugins/Antispam , the pipe script there lacks several link breaks. So it should be:

#!/bin/bash

echo /usr/bin/sa-learn $* /tmp/sendmail-msg-$$.txt
echo "$$-start ($*)" >> /tmp/sa-learn-pipe.log

#echo $* > /tmp/sendmail-parms.txt
cat<&0 >> /tmp/sendmail-msg-$$.txt

/usr/bin/sa-learn $* /tmp/sendmail-msg-$$.txt && rm -f /tmp/sendmail-msg-$$.txt &

echo "$$-end" >> /tmp/sa-learn-pipe.log

exit 0


ddrescue backuped files from broken hdd on a larger HDD -> Partition not enlargeable

Yes it did fix that ubuntu could not mount. But it did not fix that Windows  allows enlarging the partition.


Some font characters show up as boxes with numbers and letters inside of them

The boxes contain the hexadecimal Unicode numbers, and they are a common (and recommended) way of indicating that there is a character that cannot be rendered, because it is not present in the font(s) being used. So this is a font problem.

In situations like this, it is often useful to check font information at Fileformat.info. In this case, font support to U+0F3C (one of the characters of the case) appears to be rather limited. In closer look, using other sources to check for additional fonts, the situation appears to be that the following fonts contain it:

Arial Unicode MS, a proprietary product shipped with Microsoft Office, also purchaseable separately.
GNU Unifont, free, but a coarse bitmap font.
Jomolhari, a free font for Tibetan.
Windows Himalaya, proprietary, shipped with Windows Vista and newer.
SunExt-A, a large font of Chinese origin, mentioned to be free.

To see the characters in an editor, you would need to install one of the fonts containing it and instruct the editor to use it, via the editor’s font settings or otherwise.

To use them on a web page, you could declare a font-family list that mentions all of those fonts, in preference order. But this would only work for users that have at least one of them installed. To get wider coverage, you would need to use one of the fonts as a downloadable font (web font) via @font-face, see my Guide to using special characters in HTML.


Restrict SSH Access to Specific IP for User

I would do

AllowUsers jim@11.22.33.56 jim@141.212.133.36

OR

AllowUsers jim@11.22.33.*

should work, that is if you are internal and he has a dynamic ip.


Hi I'll comment on this as I'm the developer and maintainer of libvirt-php.

libvirt_image_create($conn, $name, $size, $format)

This API is only for creation of the virtual machine image (the virtual disk for the virtual machine). It doesn't do kind of domain (virtual machine) creation. You don't need it if you use PXE/network boot and similar.

libvirt_domain_new($conn, $name, $arch, $memMB, $maxmemMB, $vcpus,
    $iso_image, $disks, $networks, $flags)

This is for installation of the new virtual machine. First of all, you need to connect to libvirt daemon instance using libvirt_connect(). The return value of libvirt_connect() is the pointer/resource you need to pass as the first argument of this function. Then, you have to provide a virtual machine name, architecture (i686 or x86_64), initial and maximum memory in Megabytes (see the system specifications for operating system you want to install there first), number of VCPUs, ISO image to install this from (for PXE boot you don't require this and you can pass 'false' there), array of disk information (may be false too) and network cards.

The flags are optional and you don't have to pass them. Please refer to examples directory of the libvirt-php installation for real-world example - this is better than something written in here. Installation itself is a complex task so that's why it requires too many information

libvirt_domain_create($res)

This creates the domain identified by a resource. The resource is basically already existing domain found by libvirt_domain_lookup_*() API functions.

libvirt_domain_create_xml($conn, $xml)

This creates one time domain that's not persistent. This domain is just run once as based on the libvirt XML file.

For format of libvirt XML files please refer to libvirt documentation, not libvirt-php.


The 'proper' way to get ONLY my eth0 netmask via CLI in Ubuntu 18.04 on VPS?

Probably this is what you need (note this will not work on Ubuntu 16.04):

#!/bin/bash
IFACE='eth0'
ifconfig | grep -A 7 "$IFACE" | sed -nr 's/^.*netmask\s([0-9\.]+)\s\sbroadcast.*$/\1/p'

In the first line the name of the network interface is assigned as value of the variable $IFACE - this is useful for scripting, otherwise you can use grep -A 7 'eth0'.

On the second line the output of the command ifconfig will be piped to the grep command, where the option -A 7 will output the following 7 lines after the line with the matched string/regexp. The output of that command will be piped to sed.

Within the sed command:

the regular expression ^.*netmask\s(.*)\s\sbroadcast.*$ will match to the whole line, from the beginning ^ to the end $, that contains some characters .* and the "keywords" netmask\space, [0-9\.]+ and \s\sbroadcast in that exact order;
that line will be substituted (s/old/new/) with the content of the first capture group [(.*)->\1], where the regexp [0-9\.]+ will match to the strings that are consisted of digits end dots;
the option -r (or -E) will enable the extended regular expressions, which, in this case, will allow us to use the round brackets freely;
the option -n with combination of the flag p with output only the matched line and will preserve the rest output of sed.

Here is an extended example that will parse the names of all network interfaces and will do similar as the above command for each of them:

for IFACE in $(ifconfig | sed -nr 's/(^[a-z0-9]+):.*/\1/p'); do \
    echo -en "${IFACE}:\t"; ifconfig | \
    grep -A 7 "$IFACE" | \
    sed 's/  broadcast.*$//' | \
    sed -rn 's/^.*netmask (.*)$/\1/p'; \
done

Sample output of the above command executed on a virtual machine with Ubuntu 18.04:

$ for IFACE in $(ifconfig | sed -nr 's/(^[a-z0-9]+):.*/\1/p'); do echo -en "${IFACE}:\t"; ifconfig | grep -A 7 "$IFACE" | sed 's/..broadcast.*$//' | sed -rn 's/^.*netmask (.*)$/\1/p'; done
ens33:  255.255.255.0
lo:     255.0.0.0


How to add a server to update servers in ubuntu?

you can update the sources.list file with the URL of your update sever as below

Open Terminal

sudo nano /etc/apt/sources.list

Hash all lines and then input the update sever URL as below

dep http://www.ir.archive.ubuntu.com


Is there a way to set transparent background image in XFCE4 terminal?

Should be possible.
Open a terminal, open the menu "Edit>Preferences". Select the "Appearance tab". Change the background box to "Transparent Background". Move the "Opacity slider to 0.50"

(Theme is mine, I don't like flat ;-)


can the directory structure for this folder be cached in the RAM? Can the most used files be cached into the RAM as well?

Yes.  That is how the system normally operates; you don't have to do anything special.  The kernel automatically caches recently accessed files in unused ram.


I used to have a similar issue with my VPN what I did is reset the network configuration, sometimes they just get messed up, don't ask me idk why, try this link here:

https://linuxconfig.org/how-to-restart-network-on-ubuntu-18-04-bionic-beaver-linux


How do I get my (UBUNTU certified) Dell N5050's webcam to work with google video chat and Skype using version 12.04?

You may also need a preloaded command to get your webcam working which others have mentioned here:

fixing your webcam in ubuntu 12.04

There is also a guide on the page that someone has written so that you do not need to keep entering the command above.

Basically you need to preload this command in order to get your webcam to work. It does not work with all external webcams but give it a whirl.

Let us know if it works


How to mount a network drive in Ubuntu 14.04?

To make sure your drives/partitions are mounted properly create a new folder in your ~/media directory like this:

         sudo mkdir /media/windowsshare

or

         sudo mkdir /media/servername/myshare

and input your password when prompted. Next you can visit Ubuntu Guide for Network Shares and follow the instructions present in there.

You can use the mount umount commands to be able to temporarily mount whatever you want to share until the next reboot when you have to issue the same commands again. To do that follow the next tutorial listed on this page.

Make sure you find out how all your partitions and/or directories to be shared are listed and it would be much easier if you'd decide to install a file manager with full network sharing capabilities like Dolphin which is very useful (usually it comes preinstalled in Kubuntu, that is in a KDE environment, but it works on all Ubuntu based distros. No matter the distro version that you are running (Ubuntu, Xubuntu etc) you can install Dolphin as a separate software package with a 'few' extra dependencies :). It will work fine and make your like easier:

        sudo apt-get install dolphin

or install it via Synaptic Package Manager where you can specifically look for and install all the other dependencies that Dolphin needs to help you share your files.


Solved ! Install the right one of these image for Raspberry Pi 4 :

http://cdimage.ubuntu.com/ubuntu-core/18/stable/current/ubuntu-core-18-arm64+raspi.img.xz
http://cdimage.ubuntu.com/ubuntu-core/18/stable/current/ubuntu-core-18-armhf+raspi.img.xz


How can I cache specific web pages for offline viewing?

For this I think you should give the Scrapbook extension for Firefox a try.

http://amb.vis.ne.jp/mozilla/scrapbook/


Wired connection problem Ubuntu 12.04 LTS

this is because your network configuration file sets for the default settings.

such as eth0 settings i think they are in the manual mode.

please check you interfaces settings and DNS settings

sudo gedit /etc/network/interfaces

change the eth0 from manual/static to DHCP

before editing the interface conf file, i suggest you read more about it plus DNS conf file too


Does Forcing UEFI Installation of Ubuntu risk making Windows 10 unbootable?

If Windows is booting in BIOS/CSM/legacy mode, then the relevant firmware options are already set appropriately. Don't change them. What's required is to boot the Ubuntu installation medium in the same mode. This is usually done by selecting the correct option in the firmware's boot menu -- namely, the entry for the medium that lacks the string "UEFI" to boot in BIOS mode, or the one that includes that string to boot in EFI mode. Your message should only appear in an EFI-mode boot when the installer thinks that Windows is booting in BIOS mode.

Note that the installer might have been thrown off by something and be mis-reporting the boot mode. I recommend you check the partition table type code of the Windows boot disk with parted, as in:

sudo parted /dev/sda print

Look for the line that begins Partition Table -- it will be identified as gpt (GPT) or msdos (MBR). A GPT disk denotes an EFI-mode boot of Windows and an MBR disk denotes a BIOS-mode boot of Windows. If your computer has multiple disks, check them all, and if they vary, figure out from which one Windows is booting.


Have you tried the instructions at http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-windows ?

These should create a bootable USB stick.


Installing both Windows and Linux on one RAID set is probably the hardest installation method you can try with many pitfalls, negligible performance improvement on HDDs compared to SSDs and questionable reliability in some cases.

There are at least 3 kinds of RAID:

Software RAID, the previously preferred way to RAID on Linux. You can find a simple RAID setup that doesn't consider UEFI or dual booting here.

RAID capabilities provided by the filesystem like in btrfs and zfs.

"Fake RAID" on motherboards, the option you chose.
Actual RAID cards with cache batteries.

Write performance with RAID1/mirrored on 2 drives is limited to the slowest individual drive. Read performance depends on the implementation of the RAID level, but typically won't outperform current performance SSDs in actual work loads. Reliability also depends on the implementation (Can an individual drive be read from a different "RAID" controller, SATA port or USB enclosure?), but since you are using two very similar drives that you probably bought at the same time from one supplier, you already have a risk that both drives may fail at the same time. Administering RAID including evaluation of risk and performance is sadly a bit more difficult.

In addition to that, you use 3 TB drives and want to dual boot Windows 10 on modern hardware. The best advice is to avoid legacy booting, which is traditionally limited to 2.2 TB drives. EasyBCD is not recommended on UEFI installations here and Boot-Repair also has some problems on simple UEFI setups.

If Windows is kind of happy with this RAID setup and you don't mind the risks, complexity and performance outcome than do it, but for your Linux installation you should consider less complexity and good backup strategies and disaster recovery, one RAID1 set is only one copy of an important file, but you should have at least 3.

N.B.: You're lucky if the latest graphics card is already detected in the latest release.


Cannot install Ubuntu after uninstalling

Okay, so I solved the problem and posting it here for future reference. I wiped all the partitions I could and merged them with Windows partitions. After that I did a clean dual-boot installation and it worked.


Ubuntu runs in Low Graphics mode after modifying Lightdm.conf

Create bootable USB Drive with Ubuntu using Startup Disk Creator software (which is pre-installed with stock ubbuntu) on another PC/Laptop.

Boot from this USB drive and select 1st option "Try Ubuntu without installing".

Then Ubuntu Desktop loads up, go to System Settings >> User Accounts.

Create an Administrative account Enable it (by clicking on Account Disabled. You may have to choose a password for this account).

Then log in to this account (by clicking on Wheel icon in the Top-Right of screen then clicking on New Account).

After logging into Administrative account you created on Live Ubuntu on USB Drive, open terminal and type

sudo nautilus

and from there go to Computer>>etc>>lightdm

Open lightdm.conf file in the lightdm folder and add following lines:

[SeatDefaults]

greeter-session=unity-greeter

Now Save the file and Restart the system.

If your problem is due to driver related problems check answers to this question:
How to fix “The system is running in low-graphics mode” error?


Show all installed packages which are not dependencies

A really great way to list "orphans" (packages that nothing depends on, and you have not explicitly installed) is deborphans.

You can list the installed packages for which no installed package depends on with:

aptitude search '~i ! ~R ~i'

Source


Using a 4Tb Maxell e-series external HDD

You need to use Gparted and create a new GPT partition table (menu "Device").

Then you will be able to create partitions larger than 1TB.


When you change your avatar via your KDE settings a hidden image called .face.icon is stored in your /home folder. Unfortunately lightdm looks for an image called .face, which doesn't exist and that's the reason why Login screen doesn't match with user settings.

An easy workaround is to copy your .face.icon and rename it to .face

In my opinion this is, however, something that should be fixed in near future.


How to uninstall specific versions of Postgres?

Different versions of PostgreSQL are located in the packages postgresql-9.*.

So you should remove your two packages:

sudo apt-get purge postgresql-9.3 postgresql-9.5

Then you should remove unnecessary config folders:

rm -r /etc/postgresql/9.3/ /etc/postgresql/9.5

And from /var/lib/ folder if you have:

/var/lib/postgresql/*

I hope it will help you.


upgrading ubuntu 16 to 18 : how to keep a specific version of a library?

You want to

Get details about opencv package in Bionic
prevent updating of a specific package
Keep the Ubuntu package version you're using now


This fairly depends on the os your installing , if you go for windows you would need to install grub again .
Most linux distros will recognise the already installed os and give you an option to install grub again or not to do so . Either way grub will later on scan for available os's .


I had the same issues. Upgrading to 20.10 fixed them.
Alternatively you might want to try the solutions mentioned under this reddit post

Set gfx.webrender.force-disabled to true in about:config and restart Firefox.

or

Set the environment variables MOZ_X11_EGL=1


Why my network connection profile doesnt contain the MAC address?

Not sure where you got the idea that Network Manager is "supposed to" have the MAC address of the WiFi base station that the computer is connecting to in the .nmconnection file, but you can certainly specify a MAC address in that file if you want to reduce the risk of falling prey to SSID spoofing.
Network Manager will, however, record the MAC address of the WiFi base station in /var/log/syslog. This is what one record looks like from my syslog file:
Jan 19 13:09:11 Carbon wpa_supplicant[789]: wlp4s0: WPA: Group rekeying completed with a4:12:42:e7:f6:66 [GTK=CCMP]

This is not particularly useful, given the amount of "noise" that you would have to parse, as syslog can get quite busy. That said, you can build a mechanism yourself if you're so inclined. Here is a one-liner that will give you the MAC address of the WiFi base station you are connected to:
ip neigh|grep "$(ip -4 route list 0/0|head -1|cut -d' ' -f3) "|cut -d' ' -f5|tr '[a-f]' '[A-F]'

For me, this returns:
A4:12:42:E7:F6:64

NOTE: If you are connected to both wired and wireless networks when running this command, you will receive multiple addresses.
This can be put into a regular monitoring script where the data is recorded to any place that you'd like in whatever format you would like. This should make it much easier for you to organise and use the information you're looking for.
While this isn't exactly an answer to your question, I hope it gives you something to consider.


We use Libreoffice. It basically is OpenOffice but with a license that is suited. OpenOffice has a license that is too restrictive for Ubuntu to be of use (see below).
Besides that: Ubuntu is not about using the latest version but the most stable version at the release of the OS. Security wise it is better to stick with the versions Ubuntu supplies. Security related fixes are provided when those are found and fixed.

Nevertheless ...

You need to remove LibreOffice 1st and since there is no personal archive for Openoffice you need to download it from their website (pick 64-bit DEB). Software is provided by a DEB so you can download it and use our Software Center to install it by doubleclicking the finished download; or you can pick the tar.gz download and it will have installation instructions inside the installer on how to install it (see the readme regarding installation inside the package).

But why go through this trouble?  Since there is a licensing issue I would always opt for LibreOffice.

  This isn’t an accident. OpenOffice’s sidebar code was copied and incorporated into LibreOffice. The Apache OpenOffice project uses the Apache License, while the LibreOffice uses a dual LGPLv3 / MPL license. The practical result is LibreOffice can take OpenOffice’s code and incorporate it into LibreOffice — the licenses are compatible.

  On the other hand, LibreOffice has some features — like font embedding — that don’t appear in OpenOffice. This is because the two different licenses only allow a one-way transfer of code. LibreOffice can incorporate OpenOffice’s code, but OpenOffice can’t incorporate LibreOffice’s code. This is the result of the different licenses the projects chose.

Basically: LibeOffice will always have more features than OpenOffice.

Regarding LibeOffice

LibreOffice provides a native Debian installer so you can use Software Center to install it. And there is also a personal archive for the really bleeding edge ...

sudo add-apt-repository ppa:libreoffice/ppa
sudo apt update

You can also install specific versions newer than what Ubuntu provides by replacing the 1st command with ...

sudo apt-add-repository ppa:libreoffice/libreoffice-4-2

and replacing the 4-2 by the version you want.

By the way: you do NOT need to remove LibreOffice or OpenOffice if you want to install a newer version of Libreoffice or of OpenOffice. You do need to remove the other one if you want to switch between them or need to remove a version that as higher than the one you want to install (and disable the newer version when installing the older version).


It has been mentioned in man pages for ages. No idea how to use it past the Red Hat documentation.

I'm not sure it's actually a finalised spec yet so tread carefully.


Microsoft Surface Pro 3 camera not working with Ubuntu 14.04

OK, so after a lot of hit and trial, I narrowed down the problem to the native uvc driver not supporting the integrated webcams. The solution is to build the updated drivers from source. Open a terminal and do the following:

git clone git://linuxtv.org/media_build.git
cd media_build
./build
sudo make install

Restart and you are done :)

Ref:

http://www.ideasonboard.org/uvc/

https://git.linuxtv.org/media_build.git/about/


Delete cookies in Firefox after a specified time frame

"network.cookie.lifetimePolicyto" and "network.cookie.lifetime.days are what you are looking for. Kudos to Echo419@superuser.


VPN works on some site but not on some others

After searching the web as much as possible, I found some other posts by other people having similar problems. And there were also all different sorts of answers given.
Among all those answers, I was introduced to the concept of MTU. I decided to give it a try changing the contents of /etc/network/interfaces by adding

  MTU 9000

to the end of my enp3s0 configurations, saving it and restarting Ubuntu to check if it has started working properly, and yes: it did start to work like a charm.
In case anyone out there is eager to know more about MTU he can find more here on wikipedia page:
Maximum Transmission Unit


While I realize that I am late for the party, I am putting my 2 cents for future readers. If I was in your shoes, I would opt for the Intel Core i3 processor. Sandy Bridge has been a magnificent line of processors, all of which where great all around performers.

As for the performance of the two, it may look like the i3 is crippled with only 2 physical cores and 2 logical via Hyperthreading, however you have to note that the i3 2100 was (in many) benchmarks surpassing the amd fx 4100 performance, which is a chip from the bulldozer architecture, known to be superior to Llano architecture, unless you take into account the integrated graphics of the Llano architecture.

Some discussion on this:

http://www.tomshardware.co.uk/forum/329695-10-intel-core-2100-fx4100
http://www.tomshardware.com/reviews/fx-4100-core-i3-2100-gaming-benchmark,3136-9.html
http://www.overclock.net/t/1266084/amd-fx-4100-vs-core-i3-2100


Login screen on Ubuntu fails to go into full screen or to fill window

In order to install Virtual Machine's Guest Additions you have to run:

sudo apt-get install dkms build-essential linux-headers-generic -y

Once you have done that restart the VM and then once it boots back up go to Selecting Devices -> Install Guest Additions and then restart the VM once more. After that it should work perfectly fine.


Two separate screens with NVIDIA drivers

Nvidia "Legacy" device.

If you installed a driver, try hopping down a kernel version.

Theres recovery boot option "failsafe X" or my method....

ctrl + alt + f2

login

  sudo su

  killall -HUP lightdm

  apt-get install fluxbox synaptic && xinit && DISPLAY=:0.1 xterm

and use the blackbox to install drivers.


How to set default speaker to hdmi device? Ubuntu 17.10

To set default for pulseaudio playback

Use command:

pactl list sinks | grep Name

to get Pulseaudio names of playback sinks

Use the name of your HDMI sink in this command to set it as default:

pacmd set-default-sink <Name>

To check Pulseaudio default sink setting:

cat ~/.config/pulse/*default-sink


Getting memory test option alongside Ubuntu and Windows 10 boot options

When running memory tests (or any other for that matter) and no negative results of interest are posted, simply shut off your machine (if there is no elegant method of exiting).

To remove memory tests from the menu (which probably 20% of people do), flag them as non-executable and they won't appear in grub menu: How can I remove memtest from boot menu

sudo chmod -x /etc/grub.d/20_memtest86+
sudo update-grub


Lock screen is crashing the UI in 20.04 after an update

I had the same issue.
It's a bug between Gnome-shell 3.36.2 and the extension Dash to panel.
Solution 1 : turn off dash to panel and wait for Gnome shell 3.36.3
Solution 2 : activate focal-proposed, and install Gnome-shell 3.36.3 (with Synaptic for example, in order to install easily  only gnome-shell)


How to **single boot** **not dual boot** ubuntu linux without pendrive?

You can try to install Ubuntu, I suggest Xubuntu, which you could install from your .iso file using grb2win.
https://sourceforge.net/projects/grub2win/
Grub2Win is completely free, open source software. All modules are digitally signed for your security.
Safely boot multiple Windows and Linux systems on both GPT and MBR disks.
Supports both 64 and 32 bit EFI firmware as well as BIOS. Installs to Windows 10, 8, 7 and XP.
Grub2Win boots native GNU Grub version 2.04 code. Everything is installed to a single 20 MB directory on your Windows C: drive. The install also copies five boot modules to your EFI partition.
Automatically generates config files for PhoenixOS, Android, Ubuntu, Debian, Suse, Fedora, Manjaro, Mint, Clover and Windows. You can import Linux config files for all other distributions.


Grub corrupted and etc directory missing

you can reinstall your grub from rescue mode..
you went in the rescue mode of your HDD os using another os.
now # chroot /mnt/sysimage/ enter
now # grub-install /dev/sda
now your grub will be restore now the next problem of etc dir missing can be recover from tar or fronm other same os you can copy from it..


Getting all available packages to install

After 1 day of searching it I found:

aptitude search ^

Quite a big list though.


How can I restore Network Indicator in Unity Panel?

It can be reinstalled!

Hit Alt+Ctrl+T to open terminal and run following commands one by one:

sudo apt-get purge network-manager-gnome
sudo apt-get install network-manager-gnome

Restart your system for the change to take effect.

That's it!


Testing the driver
To look for boot messages/errors, check

dmesg | egrep 'drm|radeon'

To see your OpenGL information, you can run the commands below. Make sure your OpenGL renderer string does not say "software rasterizer" or "llvmpipe" because that would mean you have no 3D hardware acceleration:

sudo apt-get install mesa-utils

LIBGL_DEBUG=verbose glxinfo

Removing the proprietary fglrx driver
If you've previously installed the ATI binary/proprietary driver (a.k.a Catalyst/fglrx), you need to make sure it's fully purged before trying to use the open-source ati/radeon driver.
See this page
https://wiki.ubuntu.com/X/Troubleshooting/VideoDriverDetection#Problem:_Need_to_purge_-fglrx


Creating backup of existing ubuntu 16.04 system on external usb

Cloning with Clonezilla

I suggest that you download the current stable iso file of Clonezilla from

www.clonezilla.org/

Read the documents about it and try. Create a CD/DVD/USB boot drive from the iso file and boot into Clonezilla when you have connected both the original source drive and the new target drive (intended to become a cloned copy).

It is not too difficult, I would say much easier than to use pinguy bullder.

If your internal drive is easy to remove

"... so i really need the second external drive to be a replica of the laptop drive ..."

In this case you can use Clonezilla to clone the whole drive, which is one option. Other options are cloning one or more partitions and creating an image (a directory with a number of files, where the big files are compressed).

If you clone the whole drive, for example /dev/sda with Clonezilla into a target drive of the same kind and at least the same size as the source drive, the target drive will work, when it is replacing the original  drive. But do not boot the system from one of these drives, when both are connected.

Testing

It is straightforward to test that you really have a working cloned copy - a replica. Replace the original drive with the cloned copy, boot and test that important things work correctly.

If your internal drive is difficult or impossible to remove

"On this family of laptop you have to remove the optical drive, remove the base panel, disconect speaker cable and battery cables plus one mother board ribon cable. Too much just to test :-) probably do more damage."

In this case you can use Clonezilla to create an image, a directory with a number of files, where the big files are compressed.

If you make an image of the whole drive, for example /dev/sda with Clonezilla, you can restore it into the original drive or a target drive of the same kind and at least the same size as the source drive. The target drive will work, just like the original  drive. But do not boot the system from one of these drives, when both the original drive and a cloned copy are connected.

Testing

It is important to test that the backup is really working. Otherwise you cannot rely on it. In this case it is not straightforward.

'Everything' in the drive is new and you have no personal files in it, for example a single boot Ubuntu system:

Take the risk of overwriting the original internal drive - Use Clonezilla to restore from the backup image to the original internal drive.

Boot and test that important things work correctly.
There are important personal files in your single boot Ubuntu system:

Copy (backup) your important personal files to another drive, where you can see that the files are there and that you can use them. Use some backup program, or simply copy with the command line or {copy and paste/drag and drop} in your file browser.

After that you can take the risk of overwriting the original internal drive - Use Clonezilla to restore from the backup image to the original internal drive.

Boot and test that important things work correctly.
You have a dual boot system with Ubuntu and another operating system, for example Windows or MacOS in the internal drive:

In this case I think there is no really safe way to test that the Clonezilla image can be used to restore a working system. So I would recommend that you copy your important personal files to another drive, where you can see that the files are there and that you can use them. Use some backup program, or simply copy with the command line or {copy and paste/drag and drop} in your file browser.

Comment

Clonezilla does not make a complete cloned copy like for example dd (or mkusb, which wraps a safety belt around dd). Instead Clonezilla copies only the used blocks (where the bootloader, partition table, file system overhead, the files and directories are stored), and skips the free blocks. This makes Clonezilla much faster than dd, particularly when there is a lot of free space in the partitions.


Sub-process /usr/bin/dpkg returned an error code(1). Trying to upgrade

I was facing the same issue and did some more debugging. On my machine, this is the last part of content of /usr/share/initramfs-tools/hooks/fixrtc:

# We use date, hwclock and dumpe2fs
copy_exec /bin/date /bin
copy_exec /sbin/hwclock /sbin
copy_exec /sbin/dumpe2fs /sbin

It seems that the task of this hook is to add those three tools to the initramfs. When you run update-initramfs -u -k all -v, it gives you verbose output what it does and when it fails. For me, it processed date and hwclock and then failed. So obviously, it was unable to add dumpe2fs.

To fix this, I installed dumpe2fs with the following command: sudo apt install e2fsprogs. Afterwards, it worked fine.


Problem with battery indicator in Lubuntu 15.04

There is a bug with lubuntu vivid in bug https://bugs.launchpad.net/ubuntu/+source/xfce4-power-manager/+bug/1446247

That it does not show in the panel but there is another indicator with right clicking on the panel panel settings click on the panel applets tab  click the add button and add battery monitor is the easiest workaround. If you don't want to right click on the panel you can also use lxpanelctl config. Then add the panel applet. It should show your battery.

If you launch xfce4 power manager from the menu you can also see the charge but this could be a little less convenient.


Wireless internet connection wont work on dell n4010 on ubuntu 12.04.3

Like Seth said in his comment above. Open a terminal (Ctrl + Alt + T) and type in the following at the prompt:

$ lspci | grep Network

That will tell you what wireless adapter you're running, at which point you can do a quick Google search to find the Linux drivers (assuming you have another machine capable of connecting to the internet).


How to configure Multiple Mult-Headed GPU Cards?

Yes, it's possible
You will need Xorg to configure your system.

Section "Monitor"
    Identifier "monitor1"
EndSection

Section "Monitor"
Identifier "monitor2"
EndSection

Section "Monitor"
    Identifier "monitor3"
EndSection

Section "Monitor"
    Identifier "monitor4"
EndSection

Section "Device"
    Identifier  "Card1"
    Driver "radeon"
    BusID "PCI:2:0:0"
    Option "DRI" "off"
    Screen 0
EndSection

Section "Device"
    Identifier  "Card1_2"
    Driver "radeon"
    BusID "PCI:2:0:0"
    Option "DRI" "off"
    Screen 1
EndSection

Section "Device"
    Option "ZaphodHeads"   "DVI-0"
    Identifier  "Card2"
    Driver "radeon"
    BusID "PCI:1:0:0"
    Option "DRI" "off"
    Screen 0
EndSection

Section "Device"
    Option "ZaphodHeads"   "VGA-0"
    Identifier  "Card2_2"
    Driver "radeon"
    BusID "PCI:1:0:0"
    Option "DRI" "off"
    Screen 1
    Option "Rotate" "left"
EndSection

Section "Screen"
    Identifier "left"
    Device "Card1"
    Monitor "monitor1"
EndSection

Section "Screen"
    Identifier "middle"
    Device "Card1_2"
    Monitor "monitor2"
EndSection

Section "Screen"
    Identifier "right"
    Device "Card2"
    Monitor "monitor3"
EndSection

Section "Screen"
    Identifier "farright"
    Device "Card2_2"
Monitor "monitor4"
EndSection

Section "ServerFlags"
    Option  "Xinerama"  "True"
    Option  "AIGLX" "False"
EndSection

Section "ServerLayout"
    Identifier "layout1"
    Screen 0 "left" 0 0
    Screen "middle" RightOf "left"
    Screen "right" RightOf "middle"
    Screen "farright" RightOf "right"
    Option        "Xinerama" "On"
EndSection

Hope this help.


disable "empty" in caja file manager when showing last folder

If you have looked and cannot find a way from within Caja to alter this behavior, then the answer is going to be slightly more complicated.  However, Caja is an open source project, so you do have two options:

Here is the Caja project on Github.  Fork it, take a look at it, and write a patch for this issue.
Create an issue for this behavior in the Caja GitHub Issues page.  At the very least, you should do this, because it will bring this issue to the attention of the developers.

It looks like the latest activity in the Issues page was 6 days ago, so at least you know it's being actively developed.  Good luck!


How do I make the menu bar opaque when invoking the Dash?

Currently, this is not possible. Once the Dash is open, Unity is programmed to make the panel transparent and the icons white.

You could suggest an alternative behavior in a bug report.


On the sizes:

1 GB  = 109 B = 10003 B = 1,000,000,000 B
1 GiB = 230 B = 10243 B = 1,073,741,824 B

931 GiB is 999 GB
698 GiB is 750 GB

Disks report in GB.
GParted report in GiB.
df -H report in GB.
df -h report in GiB.
df -BG report in GiB.
lsblk report in GiB.

Also; when it comes to df versus the other mentioned.

GParted, Disks, lsblk reports size calculated from core HDD.

df, Nautilus etc. reports actual usable space within the file system. First off the file system has to have N bytes that match up with various calculations. I.e. divisible by X. Second space is used to keep the file system in order. Etc.

When it comes to your biggest issue:

What is your output from lsblk ?


Be sure you have followed this guide to correctly install the proprietary driver http://wiki.cchtml.com/index.php/Ubuntu_Oneiric_Installation_Guide

Also notice that there is a section of FAQ about problems and solutions, take a look at "Problems Starting Xserver"


Live USB "Check disk for defects” finds defects but doesn't list them

“Check disk for defects” will compare the checksums of the files on the USB drive against a known good list. The result means there was an error transferring the Xubuntu live system to the USB drive.

Did you follow the official instructions to create a bootable USB drive?
Did you check the integrity of the downloaded ISO image? In case of an error here, re-download the image.


The Likewise-Open package is only available for Ubuntu 12.04, as shown in this package repository search. The Ubuntu community wiki, which can be found here, states that the Likewise project appears to be discontinued, but seems to have been moved to an application called PowerBroker. The open edition is available from the PowerBroker website, installation instructions are included in the Resources section of their website.


Here's an excerpt based on https://help.ubuntu.com/community/AndroidSDK

Modifying the PATH Environment Variable

In the days before Android 2.2, a good number of people used to place their various projects and applications in the directories where the necessary tools they used existed. This was in itself a very flawed method because it cluttered up the directories, and while cleaning up the SDK, one might accidentally delete a crucial file, which will cause the SDK to fail and having to completely reinstall everything.

Modifying the PATH Environment Variable will help out immensely when it comes down to making use of SDK tools like ADB. Doing this will also allow you to execute certain protocols like ADB from ANY location. So if you're operating from the Desktop, you don't have to redirect to the SDK's platform-tools folder to make use of ADB if you need to make use of it.

As you know, To modify the PATH variable of your system, you need to edit your .bashrc file. To do so, in a terminal, execute the following command:

$ nano ~/.bashrc

You will now have the Nano text editor enabled on the terminal. Now, at the very top of the file, enter the following:

# AndroidDev PATH

export PATH=${PATH}:~/android-sdk-linux/tools

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

Once you're finished, press CTRL+X, Y, and then hit Enter to save your changes and exit the nano text editor.

Edit: you may have to login and back out again in order for your changes to take effect (~/.bashrc reloaded). For more on bash startup files see this

I believe this will solve your problem.


What is a security update? How are they different from other updates?

Usually they are security-related bugs rather than new features or bug fixes. For example, it might fix a buffer overflow a developer found.

If I don't install them, is my system insecure?

Not necessarily, but there are exploits. If someone could manage to exploit them (which might not even be possible unless they have another exploit), it isn't totally compromised. However, you should assume that it is insecure, because if theres a slight chance that it is, for all purposes it is.

How can there be very frequent security updates? Does it mean my ubuntu is very unstable or insecure?

This comes into the differences between Linux and closed-source operating systems.

In Linux, security flaws are found much easier when they exist due to the code being open. Then the patch is immediately put upstream and onto your computer through the package update.

Whereas in a closed source system, often such flaws aren't found until exploitation. Its just a matter of when the security flaw is found, not the existence itself.


Only certain resolutions combined with certain formats seem to work.

The AVI-formats seem to be work less often. Instead, both VP8(WEBM) and H264(MP4) work so far with the resolutions I used. (Thus Preferences -> Screencast -> Record with).

Ah, and do not use Wayland (this records only the cursor movements, otherwise all is black). At the login prompt there is Wayland and "nothing" which I assume to be classical X.


How to install CUDA 8 on Ubuntu 18.04 LTS?

I have solved the issue using the following procedure:

unpack .run file using the command: ./cuda*.run --tar mxvf (or sh ./cuda*.run --tar mxvf)
copy unpacked file InstallUtils.pm to /usr/lib/x86_64-linux-gnu/perl-base
enter command in terminal: export $PERL5LIB


sudo -H gedit /etc/wpa_supplicant.conf

Inside the file add the following for WPA2

ctrl_interface=/var/run/wpa_supplicant
network={
        ssid="ESSID_IN_QUOTES"
        psk="ASCII PSK Password in Quotes"
        key_mgmt=WPA-PSK
        proto=RSN WPA
        pairwise=CCMP TKIP
        group=CCMP TKIP
}

My Example : ssid="A-B-C-D"  & Password is  = psk="abc12345"

Then Remove network-manager-gnome

sudo apt-get purge network-manager-gnome

Setting the Wireless Interface to Connect at Boot

sudo -H gedit /etc/rc.local

Add the following lines

ifconfig eth0 down
ifconfig wlan0 down
dhclient -r wlan0
iwconfig wlan0 essid "A-B-C-D"
iwconfig wlan0 mode Managed
ifconfig wlan0 up
dhclient wlan0

Then restart networking... I did a reboot

Note: I have already configured my router for Static IP (Reserved IP from Router) &  DNS

For more help see this post on Ubuntu Forums


Cannot connect to Samba share from Nautilus

I found a simple answer in this ubuntuforums.org thread
The newer versions of samba are not supporting anymore by default the LANMAN authentication scheme that is used by the DLink DNS323. To correct this issues, the only thing to do is:

Edit /etc/samba/smb.conf
Find the [global] section, and insert this line:
client lanman auth = yes

You don't even have to reboot and you will be able to mount your shared folders with Gnome Nautilus.
This is also required to connect to the samba shares of another Lucid box (if they're password protected). Ironic, isn't it?


How to update libpango and install Cairo in Ubuntu?

You can install cairo by typing:

sudo apt-get install cairo-dock

For other part I am working myself. Just read INSTALL. I have found pango-1.34.1 package from web and I try to install myself.


While the kernel can be cross-compiled, the easiest way is to create a 32bit (i386) chroot and build it in there.

Install ubuntu-dev-tools:

$ sudo apt-get install ubuntu-dev-tools

Create an i386 chroot:

$ mk-sbuild --arch=i386 precise

(You will probably have to run that twice. The first time, it installs schroot etc. and sets up mk-sbuild)

Then enter the chroot:

$ schroot -c precise-i386

And build the kernel, as you would, normally.


Terminal error output RE: editing .conf file in Xbuntu [owned by uid 1000 istead of 0]

Uid 1000 is you. Uid 0 is root. Take a loot at output of ls -l /var/tmp . There's some folders that you have ownership of, and some that root owns. If you're not owner of a file and permissions are drwx------, you can't open it, simple as that. When you called kate with root privileges, kate needed to access folders that are owned by you, but the program was executed from root's perspective. Hence the errors


14.04.1 report "zero" kilobytes of disk space

Today, the filesystem looks very different than a week ago, when I had the warnings. Here it is today:

$ df
Filesystem     1K-blocks      Used Available Use% Mounted on
/dev/sda1       20026236  12591856   6394048  67% /
none                   4         0         4   0% /sys/fs/cgroup
udev             1980460         4   1980456   1% /dev
tmpfs             404844      1204    403640   1% /run
none                5120         0      5120   0% /run/lock
none             2024216     30016   1994200   2% /run/shm
none              102400        64    102336   1% /run/user
/dev/sda2      933082296 152679220 732982148  18% /home

/ is now only 67% used. This is the mostly likely "truth". The original partition was set at about 20 gig. It's about two-thirds in use now. That is what I remember from months ago, when I last had occasion to review space used/available.

This is what I believe happened, as I powered up the external SATA drive, the OS, which doesn't care where the boot drive is, sees that drive as the boot drive, because at one time that now external backup drive was the boot drive with / and /home and /usr and /var, etc. While the external drive was re-formatted and had a new EXT4 set, it must have some location where it continues to see the boot partition or some such. I'm not expert enough to fix this, but as the error messages are gone, I believe this was a false alarm. When the external drive is powered up before the OS is powered up, the OS believes the external drive is the bootable device. This is probably due to the external drive being connected via a pci-e card mounted on the motherboard. The card has its own mini BIOS.


How to use same drive to access files from Windows and Ubuntu

Yes, so long as you understand the differences.

Linux (and therefore Ubuntu) don't use drive letters. Instead, they name drives, and name partitions and volumes of storage made from drives.

When you run sudo gparted -l in a Ubuntu terminal window, you will see each drive and how it is subdivided for storage for Windows, Linux, and other OS.

Ubuntu can access files and folders on a Windows NTFS drive like D: and it will appear under its Linux name in the Ubuntu file manager, GNOME Files AKA Nautilus. Just use it when you need it.

It doesn't work the other way; you can't automagically access files on an Ubuntu ext4 formatted drive from Windows, or other Linux formatted drives using other types of drive partitions. There are drivers which can be added to Windows to enable that, but every time I have tried them, the Ubuntu drive gets corrupted and I lose date.


Is there any way to install 2 XAMPP versions in Ubuntu 18.04?

Download the versions from their site, versions 7.1.18 and 7.2.6, extract them into /opt/xampp/7.1.18/lampp and /opt/xampp/7.2.6/lampp. You can even install a 3rd, 4th or 5th version if you want.

Create a symlink from /opt/lampp to  /opt/xampp/7.2.6/ to use 7.2.6. You will need to shutdown the current running xampp and then recreate the symlink to 7.1.18 to use the older version.

If you want to use both at the same time you need to edit the configuration of 1 of the 2 to Listen to another port. You can then use http://localhost and http://localhost:port to use them both at the same time (that URL will open the respective XAMPP config website for that installation). You do that by editing (for the 2nd of the installations, you can do the same for a 3rd, 4th, 5th installtion):

/opt/*/etc/my.cnf
/opt/*/etc/php.ini
/opt/*/etc/httpd.conf

Please consider using our native LAMPP and an installation from source in /opt/ of our native LAMPP. The 2nd install is the same as above but support from AU will be a lot better than from XAMPP. Plus our version is made for production systems, XAMPP is not.


How to set Service mssql-server to start on boot?

If you are using Ubuntu 16.04, as reported in the question tag, you should use systemctl instead. To enable the service at startup:

systemctl enable mssql

To disable the service at startup:

systemctl disable mssql

Maybe the service name would be mssql-server, so try first with mysql then with mysqld


Random freezes, Radeon mentioned in the console

I also faced a single instance after the upgrade where the freeze happened, but could not reproduce it. You may like to read this link https://wiki.ubuntu.com/X/Troubleshooting/Freeze. You can file a bug by providing more information about it to the developers.


Improve sound (not voice) quality of Pico2Wave text-to-speech

I just run into the same issue and at the moment I'm end with something like

pico2wave -l $LANGUAGE -w $WAV "$*" && play -qV0 $WAV treble 24 gain -l 6

which sounds much more "crisp".


Switching from Unity to Gnome -- lost top bar programs

That is correct. Gnome puts your notifications on the bottom. Maybe you can find a shell extension at http://extensions.gnome.org that would satisfy your needs.


Was TRIM support backported into the 2.6.32 kernel that is in 10.04?

No; only critical bug fixes are added to stable releases, not new features.  See StableReleaseUpdates.  10.04 is quite old now, so you should upgrade to 12.04 if you want to stay with an LTS release, or 12.10 if you don't.


Changing password from US Keyboard to Norwegian Keyboard

To change your password, do not use the sudo with the command. Simply use passwd and change the password. This should solve your problem. Another way would be the following command.

sudo passwd USERNAME


How do I remove duplicate entries from Dash on 18.04?

As you indicate, the two icons you see are connected to two versions of the software, one installed as a regular package, and one installed as a snap, the new software packaging system of Canonical, the company behind Ubuntu.

In principle, it would mean that both versions are installed on your system. It would then be sufficient to remove either the regular version or the snap version using Ubuntu Software. Removing software also takes away the icon. It should do so immediately, but to be sure, log out and log back in to verify whether the icon is gone.

If you are sure you did remove the software, but the icon stays in place, then either you have an icon defined in your user home folder, or something erroneous has happened at some time during the removal. Thus, first check your home folder (see next part in the answer) and if no icon is found there, try to reinstall the software using Ubuntu software, then removing it again hoping the removal is complete this time. If the icon is still not gone, you will have to remove it manually with administration privileges.

At a more technical level

If icons remain even after correctly uninstalling the software, you may want to remove them manually. The icons in the Dash are sourced from program launcher files. These are text files with a .desktop extension that describe how the program should be launched and what icon to use, among other things.

.desktop files can live under the user's home directory in the folder .local/share/applications. These items are only visible for the current user. Such icons are never removed automatically. Thus, if you keep having an icon after removal of software, it is quite likely there is a .desktop file remainng there.

The system wide location for regular application icons is /usr/share/applications. .desktop files for snap applications are maintained under /var/lib/snapd/desktop/applications/. Remove any of the .desktop files there to remove the corresponding icon in the Dash.


software center installing slowly and failures on upgrades

Change your update manager server to best server from settings of update manager.

and add this in your terminal:

sudo apt-get install -f
sudo apt-get update

This may not completely fix the problem, as some packages come the from main server no matter what mirrors you're using.

2nd :::

Make sure that you have enabled the all PPA in settings of update manager at other TAB& try again .
what ever the process you are doing just try to do it from the terminal , then it will ask you yes/no . by giving yes you can get those things with out any errors .


Ubuntu 12.04 cannot not shutdown and reboot automatically

from the terminal sudo gedit /etc/default/grub
change GRUB_CMDLINE_LINUX="" to GRUB_CMDLINE_LINUX="reboot=efi"
save the file, close, and run in terminal sudo update-grub

Source: Ubuntu 12.04 - Most Common Problems and Solutions


How to try out OpenStack on 4 servers instead of 7?

This should be possible with the currently released Autopilot.  If you select Ceph for both object and block storage then 4 machines should be sufficient.  Be aware that you'll need at least one machine with two NICs for the network gateway in your cloud (one NIC on the same Network as the other machines as the cloud, and one for external access).

You'll also need to limit the overhead of MAAS and Landscape to one machine, for example:

Install MAAS on a machine
Install Landscape in a VM on the MAAS machine
Register the MAAS server in Landscape
Navigate to Landscape's OpenStack tab and follow the instructions


Computer has locked up, will it recover?

I would say it probably won't recover and you should power cycle it...


Ubuntu default terminal missing on 13.04

Using your xterm write those commands:

sudo apt-get remove gnome-terminal
sudo apt-get install gnome-terminal

The password is your account password and those commands will reinstall gnome-terminal, which should be the "default" terminal.
I hope it will fix.


You need to change the configuration of i3, copying /etc/i3/config file to ~/.config/i3/config and then editing/adding your font configuration:

cp /etc/i3/config ~/.config/i3/config

Now you need to edit the file and add your preferences using the following syntax:

font <X core font description>
font pango:[family list] [style options] [size]

The first line describes the font description using the X core format, the second line describes it as space separated variables in the following order: font family  (Arial, Mono, Sans, etc.); style options such Bold, Italic, Underscore, etc.; and the last the size. Pango is the layout engine used.

You can look at all the entries and modify what you like, example:

font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
font pango:DejaVu Sans Mono 10
font pango:DejaVu Sans Mono, Terminus Bold Semi-Condensed 11
font pango:Terminus 11px

Source:

http://i3wm.org/docs/userguide.html#fonts


Update Manager not working and Software center crashes

Open a terminal by pressing Ctrl+Alt+T and type the following commands one by one:

 sudo dpkg --configure -a
 sudo aptitude update
 sudo aptitude upgrade

If that doesn't fix your problem use the following commands:

sudo rm -rvf /var/lib/apt/lists/*
sudo apt-get update


Is it safe to install the nvidia-current driver and then have this HDD in another pc that has nvidia graphics

If the second computer doesn't have an Nvidia card, I think you should remove the driver. Otherwise, it will auto-load, and prevent the integrated GPU from working properly.

If both computers have Nvidia cards, then it should work. I've done it before with two notebooks. The original had Geforce 7400go, and the other one Geforce 9300m. Both cards worked well with the nvidia-current driver - 270.41 at the time.


Packaging my Qt-Binary Application as a Snap

Just use the dump plugin for this case: http://snapcraft.io/docs/reference/plugins/dump

It should be put it all into one directory and you can use filesets to specify which bits exactly you want copied over. Use organize for renaming things.

Find more examples here.


Try to specify only the relevant authentication options in /etc/hostapd/hostapd.conf:

wpa_key_mgmt=WPA-PSK WPA-PSK-SHA256

If this doesn't work, run the daemon by hand in debug mode to see where isn't working:

hostapd -dd /etc/hostapd/hostapd.conf


Click the All Settings icon from the top left launcher.  From there, click on the Panel icon.  On the Display tab, you'll see a Measurements section.  Just increase the Row Size (pixels) setting to the size that you want.


How to remotely enable connecting to the main desktop

I'm thinking you want to do something like this..

Use trusted X11 forwarding, otherwise you can't run startx. ssh -Y gman@remote
Make sure you aren't on display zero. export DISPLAY=:8
Start X on a local display (ie, definitely not 8 (because of the previous step)) startx -- :0
Connect via VNC or NX or whatever.

You'll prolly want a snazzy .xinitrc file. Also, this should bypass [GKX]DM.


In a terminal type:

sudo nano /etc/NetworkManager/NetworkManager.conf

and change the line that says managed=false to managed=true

save the file and exit. Reboot your computer or just restart the network manager by:

sudo service network-manager restart

Let me know if this solves the problem.


how to make connection between windows 10 and ubuntu

A very good way to do this is by configuring Samba to share a common folder, I am using a Windows 8.1 guest VM and my host is Ubuntu 17.10.

Verify if the samba package is installed:

sudo dpkg --list | grep samba

if it's not you can install it

sudo apt-get install samba samba-common samba-common-bin

Don't run it yet, you need to edit its configuration file first.

But before that, make a directory in Ubuntu that will be the folder to be shared to other Windows OS

mkdir /home/$USER/TEST

Edit samba config file located in /etc/samba/smb.conf.

Browse at the end of the line in smb.conf file and add this:

[TEST]
comment = Shared Directory
path = /path/to/directory in this example say /home/yien/TEST
read only = no
write list = @sambashare
directory mask = 0775

After this, add your current user (say, yien) to sambashare group:

sudo gpasswd -a yien sambashare

Then create a samba password to it:

sudo smbpasswd yien

Also change the folder ownership:

 chown yien:sambashare /home/yien/TEST

Here you need to run Samba:

sudo systemctl start smbd

Enable it at boot:

sudo systemctl enable smbd

Now in your Windows VM just enable first network discovery and you will see your UBUNTU network. Simply login to it then you will see the folder TEST or the one you created.


Dell laptop screen brightness is not working after upgrade from 12.04 to 13.10

take a look at: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1273234

The answer from Antonio worked for me. I have a dell vostro laptop as well.

Rafa


Gtk-Message: Failed to load module "unity-gtk-module" Ubuntu 14.04

To get rid of the "murrine" messages, the following worked for me:

sudo apt-get install --reinstall gtk2-engines-murrine:i386

The other two messages seem more complicated to remove manually, and at least the first one is due to a bug - see How do I install 32-bit libraries when they keep having uninstallable dependencies? and bug report at https://bugs.launchpad.net/ubuntu/+source/overlay-scrollbar/+bug/1134202 .


Yes, it is very safe. You will have to dual boot your system.
Visit this for how to install it.
This video can help you in this.


Revert Alt+Tab to switch between applications only

This behaviour has not changed. I keep on using it to move about applications. The only time where this changes is if you have your applications in different desktops, then you have to use ctrl+alt+tab.


Do I have too many partitions? I have 4 primary partitions and I'm trying to install Ubuntu alongside windows 10 (pics included)

You could delete the partition without problems. But if you ever need to recover your windows you need a usb drive or dvd with windows install.

This will also cause you to lose all your specific HP software. And also you might need to search for your drivers yourself.

No biggy if you know what you're doing.

About dual installing: This is the tutorial that I used.

http://linuxbsdos.com/2012/05/17/how-to-dual-boot-ubuntu-12-04-and-windows-7/

It is written for Ubuntu 12.04 but the install process remains the same. Small tip ahead: give your boot partition more room than the advised 500MB.


chown + chmod 700, still cant paste files in /opt/lampp/htdocs

Try recursively chown
sudo chown -R tama:tama /opt/lampp/htdocs


failure, error when running office 2007 under wine

I have seen alot of assertion failed errors over the years (mainly in native Windows) and they are quite hard to pin point. I recommend that you uninstall Office then upgrade your Wine version as per the instruction below and lastly try installing Office again.

First add the add the PPA.

sudo add-apt-repository ppa:ubuntu-wine/ppa

Then update your system.

sudo apt-get update

Then try installing Wine 1.5

sudo apt-get install wine1.5

That should get you up and running.

References

Adding the WineHQ PPA Repository


i don't think that you can do that.

To adjust brightness in ubuntu Open a terminal window, and execute this command to edit /etc/rc.local

sudo nano /etc/rc.local

Add this before the last line “exit 0″:

echo 10 > /sys/class/backlight/acpi_video0/brightness

number 10 is the value of your screen brightness of your choice, range from 1 to 10 or 15. With this command check the maximum:

cat /sys/class/backlight/acpi_video0/max_brightness

source

And also one more way we have to do this is with another new program named as xbacklight open your terminal and type this

sudo apt-get install xbacklight

then type this xbacklight -set 100

there 100 stands for brightness range we can get it upto 100 from 0 .

But i didn't try it.


efibootmgr  is  a  userspace  application  used  to  modify  the  Intel
       Extensible Firmware Interface (EFI) Boot Manager.  This application can
       create and destroy boot entries, change the boot order, change the next
       running boot option, and more.

It is available for all currently supported versions of Ubuntu.

You can check to see if it's installed with which efibootmgr which on my system returns:

/bin/efibootmgr

sudo efibootmgr will list the current entries.

You should get results similar to this:

 BootCurrent: 0004
       BootNext: 0003
       BootOrder: 0004,0000,0001,0002,0003
       Timeout: 30 seconds
       Boot0000* Diskette Drive(device:0)
       Boot0001* CD-ROM Drive(device:FF)
       Boot0002* Hard Drive(Device:80)/HD(Part1,Sig00112233)
       Boot0003* PXE Boot: MAC(00D0B7C15D91)
       Boot0004* Linux

You can modify your non-default boot entries with the -b switch and delete them with the -B switch.

Assuming the output above, efibootmgr -b 4 -B could be
       called to delete entry 4 and remove it from the BootOrder.
Of course you'll have to adjust accordingly for your circumstances.

For more detail on efibootmgr see the man page.


How can I change out the LXDE panel/menu for a better one?

One possibility is to install the Whisker menu. This is part of Xubuntu but if you install it, you'll have the necessary dependencies pulled in. Then, you'll need to use the xfce4 panel instead of the lxde one. In my opinion, there shouldn't be much of an additional burden. To install the Whisker menu, run this:

sudo apt-get install xfce4-whiskermenu-plugin xfce4-panel

There's a video on Xubuntu which shows you a bit about the Whisker menu to help you decide.

And the developer's blog is here: Whisker Menu 1.3.0 released!


777 permissions on NTFS-3G Windows mount

sudo mount -t ntfs-3g /dev/sdb1 /media/elements/ -o fmask=0000,dmask=0000,umask=0000


Is it possible to use Ifconfig to switch an interface to DHCP and if not, what is the best way?

Change from static to dynamic

ifconfig eth0 0.0.0.0 0.0.0.0 && dhclient

Change back

killall dhclient && ifconfig eth0 10.0.1.22 netmask 255.255.255.0


Yes, it's possible. Just create a .fonts folder in your home directory.

$ mkdir .fonts

And copy the fonts into that directory. Then run font cache command.

$ fc-cache -f -v


Hard to say without more information, but my instincts say this is probably caused by Secure Boot. Basically, Secure Boot incorrectly identifies Ubuntu as malware and prevents it from booting. You can disable this by entering your BIOS settings and setting Boot Mode (sometimes "UEFI Mode") to Legacy Boot instead, and then rebooting. If you want to use the Secure Boot feature (not my recommendation), then you can try booting to Ubuntu in recovery mode and install the Microsoft signed bootloader:
sudo apt install shim-signed

Which should allow Secure Boot to trust your Ubuntu install. If neither of those solve the problem, can you update your original post with model your device is, BIOS, Windows and Ubuntu version?


Question about ssh on 14.04 with Nautilus

Just to be clear, have you tried syntax like this?

sftp://azendale@10.0.0.1/

sftp stands for "SSH File Transfer Protocol" which is designed for handling files over SSH.

Or you could go to a subfolder, and then try hitting Ctrl-L. Then remove the trailing folder. That's what I usually do.


How do I get docker-engine dependency libsystemd-journal0 installed on Xenial (16.04.1 LTS)?

Apparently this is the solution.

https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04


Problem booting in text mode Ubuntu 12.04

I did find a solution - I booted into single mode and then enabled networking. This allowed me to access the disks as r/w and to run the install script.

This also solved my problem with booting into console since the graphic drivers can no longer be initialized (API mismatch - kernel is 295.40 and client is 295.49 - whatever that means) :D

...all in a day's work...


Can I download Ubuntu for Android to my mobile device?

No, its not possible now. But you can buy Android tablet and write Ubuntu to the tablet. Also one company selling ubuntu tablet. I already tested Ubuntu in Samsung Galaxy S2 - it works but screen is small. Another way, why not to use Android itself for this?
I'm using Polaris office and Google Drive for documents. Connect your tablet to the monitor using HDMI and enjoy it. I think Ubuntu for Android will be available in Ubuntu 14.04 version. Mark Shuttleworth (CEO of Canonical) sayed that Ubuntu for TV,Tablet and Android will be available in Ubuntu 14.04 (Next LTS version)

For Example There Official Ubuntu for SmartQ T20: http://www.omgubuntu.co.uk/2012/06/ubuntu-12-04-firmware-released-for-smartq-t20-tablet


Is there a privacy risk with gedit on Ubuntu?

Hidden temporary tilde-suffixed files will normally exist by default after your first save, and of course they will remain if gedit (or your OS) crashes: Recover files from gedit
The tilde-suffixed file is in the same directory as the original file.
Creation of these files is optional and it can be changed in the preferences as follows: in the gedit menu follow the sequence Edit > Preferences > Editor > find the option that says 'Create a backup of files before saving' > uncheck that option.
There should not be any other temporary files or crash files in other directories.


how to solve Canon Pixma G2000 driver problems on Ubuntu 16.04?

The options for a person trying to install Canon's G1000 and G2000 are limited to the following:

Compile and install gutenprint. Gutenprint, formerly named Gimp-Print, is a suite of printer drivers for linux. It works just like native drivers and supports cups based printing.
Buy a third party linux printing driver and utility, called Turboprint. It too has excellent support. An added bonus is a GUI for checking printer spooling, and configuring varied options like Paper type, resolution etc. The cost of an individual license is upwards of $34.

If you decide to go with the first solution, the steps include the following. My system is a Ubuntu Xenial 64bit.

First you need some developmental headers. So add to your /etc/apt/sources.list, the following lines if you dont have them. Modify these according to your version of Linux(Debian/Ubuntu):

deb http://jp.archive.ubuntu.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb-src http://jp.archive.ubuntu.com/ubuntu/ xenial-proposed main restricted universe multiverse

Update your sources and install the build dependencies:

sudo apt update
sudo apt-get build-dep cups-common gimp-gutenprint libgutenprint-dev
sudo apt-get install build-essential

Now download the source release package for gutenberg (version >=5.2.13) from Sourceforge.

wget https://sourceforge.net/projects/gimp-print/files/gutenprint-5.2/5.2.13/gutenprint-5.2.13.tar.bz2/download
tar xvf download
cd gutenprint-5.2.13

Alternately clone the git repo.

git clone https://git.code.sf.net/p/gimp-print/source gimp-print-source
cd gimp-print-source

Now configure, make and install.

./configure
make
sudo make install

Source: My blog post


Is there any application like catia or at least able to open catpart

The obvious choice is OpenSCAD, that focuses precisely on 3D modelling for industrial purposes:

  OpenSCAD is a software for creating solid 3D CAD models. It is free
  software and available for Linux/UNIX, Windows and Mac OS X. Unlike
  most free software for creating 3D models (such as Blender) it does
  not focus on the artistic aspects of 3D modelling but instead on the
  CAD aspects. Thus it might be the application you are looking for when
  you are planning to create 3D models of machine parts [...].

Then you have a few commercial alternatives:

BRL-CAD - "a powerful cross-platform Open Source combinatorial Constructive Solid Geometry (CSG) solid modeling system that includes interactive 3D solid geometry editing".
AutoQ3D - a cross-platform 3D CAD conceived with beginners with mind.
VariCAD - "compact, fast, easy to use, and provides everything necessary for mechanical design".

Apart from these you may also check FreeCAD, a parametric 3D modeller; as I understand this philosophy has been loosing followers.

Regarding CATPart, there are very few programmes out there able to read it. And those that do apparently use libraries licenced for the purpose. You are advised to opt for a more portable format.


How do I install the latest NVIDIA drivers from the .run file?

here I got a very good answer on how to install latest drivers. Works like a charm.


Will swap space auto-adjust when I upgrade my physical memory?

No, it will not change it's size because of upgrading/changing the physical memory.

The swap system in linux is a separate partition type "Linux swap" (82). To change this it would be the easiest way to boot from a GParted live system. With this you can decrease the size of your root partition and increase the size of the swap partition. GPArted is very easy to use and self-explanatory.

But notice, when you upgraded your systems physical memory (I assume you increased it) it is not neccessary to increase the swap partition. Swap is only needed when your physical memory is full or when your hibernate the system (must be at least as big as your ram size)


How to move from dual boot to full installation?

Delete the Windows Partition. Extend the Linux partition provided that will not damage what's there already, and there's a risk with a mix of a Linux partition and an NTFS partition.  If in doubt, you could reformat the Windows partition and them mount it independently, perhaps as /opt or /mystuff, or replacing an existing partition like /usr or /home, but you'd need to copy everything across to do that, which itself carries risks.

Afterwards, you should also run:

sudo grub-mkconfig -o /boot/grub/grub.cfg
sudo grub-install

which should remove the Windows entries from the grub menu.


You could also try booting into "Recovery Mode" when you see the Grub menu. From there you could try to boot with failsafe graphics and see if that works.

Also, what graphics card do you have? If you have a relatively modern ATI card, you might have success by installing the fglrx driver. Boot again into "Recovery Mode" and then choose root shell with networking. Then type

sudo apt-get update && sudo apt-get install fglrx

Reboot and see if that helps.


How to copy the entire contents of an Android device incuding empty space

Just use dd, where /dev/sdX is your android device, and /home/username/backup.img is where you want to save the backup:

sudo dd if=/dev/sdX of=/home/username/backup.img bs=64K conv=noerror,sync

NOTE: The file has to be a .img file.

If you want a progress bar you can add status=progress to the end:

sudo dd if=/dev/sda of=/dev/sdb1 bs=64K conv=noerror,sync status=progress

To copy the files back, use dd again:

 sudo dd if=/home/username/backup.img of=/dev/sdX


How to auto mount disk drives in gnome-shell?

No.  The system assumes that sata disks are internal, and therefore, does not auto mount them if they don't have an fstab entry.  Is there a reason you don't want to add an fstab entry?


Well... I figured it out. After I couldn't get Lubuntu to boot properly, I tried Puppy Linux. It came up with a message about pup-xxx.sfs not found. So I tried it on another computer, and it worked just fine. O_o. So I searched that error message on Google, and found a thread where someone said that error can occur if Puppy can't find the install medium. Then I remembered that the laptop  in question uses a Firewire DVD drive. On a hunch, I used the PLOP boot manager to boot from a USB drive instead of a DVD, and what do you know? It worked!

TL;DR The Linux kernel didn't like the Firewire DVD drive I guess.


How do I install the latest version of Prometheus on 16.04?

The following unit file worked for me when installing the prometheus server version 1.x (as opposed to an exporter).

# /etc/systemd/system/prometheus.service
[Unit]
Description=Prometheus Server
Documentation=https://prometheus.io/docs/introduction/overview/
After=network-online.target

[Service]
User=prometheus
Restart=on-failure
ExecStart=/usr/local/bin/prometheus-1.1.2.linux-amd64/prometheus \
                                -config.file=/etc/prometheus/prometheus.yml \
                                -storage.local.path=/var/lib/prometheus/data

[Install]
WantedBy=multi-user.target

This assumes, of course, that you've created a prometheus user and granted necessary permissions.

Then use the commands mentioned by WInfly.

$ sudo systemctl daemon-reload
$ sudo systemctl enable prometheus
$ sudo systemctl start prometheus
$ sudo systemctl status prometheus

I have found the following helpful:

Prometheus: https://blog.svedr.in/posts/prometheus-quick-start.html

Man pages for unit file directives: https://www.freedesktop.org/software/systemd/man/systemd.directives.html


Try to install .net 4.0 framework using winetricks. You can do the install much easier in Playonlinux. Which is third party wine wrapper and contains the necessary install scripts.


ubuntu software center crashes after fail install

You probably need to purge libboost-system1.42-dev first (sudo dpkg -P libboost-system1.42-dev), then try again. If that works out, then reinstall and go from there.