How to delete just the preceding space in a text file?

This should do the job:

sed -e 's/^ //' -e 's/,//g' file.txt

The sed command (stream editor) is passed two commands to execute sequentially, both commands substitute something by nothing, i.e. delete a part of the input.

The first one removes spaces immediately following the beginning of a line, noted ^, the second one is removing the commas, and has the very same effect as your tr -d "," command.

Thanks to minerz029 for indirectly reminding me I was missing the 'g' as my first reply was only removing the first comma found in each line.


Issues Mounting CIFS Share using systemd

More than likely the service is executing before the folder is available and ready to mount

You'd need to specify in the file to wait on and start after (AFTER= ) the service that connects the CIFS share


Unable to use CD/DVD drive after upgrade to 11.10

If you are using kernel 3.1 by a chance - downgarde it (for example to 3.0).
I had similar problem - I couldn't mount cdrom drive anyhow. Downgrading solved my problem and it works just fine!


You'll need two startup commands:

Jupiter

/usr/bin/jupiter

and

Jupiter Restore

/usr/lib/jupiter/scripts/jupiter

Alternatively - just purge jupiter and reinstall it.

sudo apt-get purge jupiter
sudo apt-get install jupiter


After the upgrade to 17.10 I only get a black screen. How do I fix this?

This happened to several users of NVidia or AMD binary drivers (Bug #1705369). You need to re-install the drivers:

Switch to a different terminal (TTY) by pressing CTRL+ALT+F2 and login with your user.
Remove the binary driver by running sudo apt-get purge ^nvidia. AMD users can run amdgpu-pro-uninstall to remove the AMD graphics stack.
If /etc/X11/xorg.conf exists, rename (e.g. sudo mv /etc/X11/xorg.conf{,.bak}).
Disable Wayland completely: edit /etc/gdm3/custom.conf and uncomment the following line
# WaylandEnable=false
Reboot Ubuntu with sudo shutdown -r now and you should see the login screen.

You can now install your binary drivers again, either manually (see How do I install the Nvidia drivers) or with the Software Properties GUI. AMD users should refer to the official installation guide for instructions.

After rebooting everything should work as expected.

  Note: The new Wayland display server doesn't work with binary drivers, yet, which is why we disabled it in step 4. In the future, when Wayland is fully supported by the binary drivers, you should comment this line again.


I found the solution, if anybody cares:

The external NTFS drive mounts with me as owner and with 700 permissions, meaning that only I can access it. I found a tip on the ubuntu forums from Morbius1 that I can force the incoming connection to look like me by adding the following line in /etc/samba/smb.conf, in the shared section:

force user = your-user-name

It works great.


Moving like named files into self-named directories

I made a small bash script to do this, simplified and improved thanks to comments from OP, @dannysauer, @Arronical and @Scott
#!/bin/bash
for file in *
  do mkdir -p "${file%%[.-]*}" 2>/dev/null
    if [[ -d "${file%%[.-]*}" ]]; then
       if [[ -f "$file" ]]; then
         echo mv -v -- "$file" "${file%%[.-]*}"
       fi
    fi
done

Run with echo first and then remove echo to actually move the files. The script must be run from the directory where you want to move the files. If you prefer, here it is as a one-line command:
for file in *; do mkdir -p "${file%%[.-]*}"; if [[ -d "${file%%[.-]*}" ]]; then if [[ -f "$file" ]]; then echo mv -v -- "$file" "${file%%[.-]*}"; fi ; fi ; done

(again, remove echo after testing)
Explanation:

for file in *; do mkdir -p "${file%%[.-]*}" make a directory with the name of the first part of the name of each file (until the first hyphen or dot character) The -p flag is very important here - without it, the script will move only the first matching file (thanks to Arronical for pointing out that -p will stop mkdir from trying to create existing directories and complaining about it)
2>/dev/null the script complains that it cannot create a directory with the same name as itself (but still works) so we throw away the error - this isn't needed when running as a one-liner
if [[ -d "${file%%[.-]*}" ]]; then if there is a directory with that name (if the mkdir was successful) then...
if [[ -f "$file" ]] if we are dealing with a file (not a directory or something else) then...
mv -v -- "$file" "${file%%[.-]*}" move it into the matching directory.


It is a bug in the program, so read Rinzwinds answer.
There is a work around:
install Glade and open the .ui file in that program.
hope it helps a bit until the bug is fixed.


What is the best way to clone the system and backup files in Ubuntu 18.10

I would suggest using clonezilla to clone your OS. youo could also use gparted if you prefer see MovingLinuxPartition.

For backups you can use the  Ubuntu "backups" tool and set the location you want to back up to I would suggest a different harddrive. you could instead use rsync running in a cron job if you prefer. But I would suggest just using the normal backup tool.


How to open a GUI app from Terminal without losing terminal input

Simply add & to your call to start it as background process.

Example:

gedit sometext.txt &


Is ufw loaded at boot before the login screen?

Yes, ufw is a part of multi-user.target while a login manager like lightdm is a part of graphical.target.

$ systemctl cat ufw.service
...
...
WantedBy=multi-user.target

As you should know, all services under multi-user.target will be run before the graphical.target, because it's a dependency of graphical.target.

You can also use:

systemd-analyze plot > 1.html

then check 1.html in your browser, you'll see that ufw has been enabled before your login manager.

The other option is to use:

systemctl list-dependencies

it'll help you find out which services in which order has been run.


What swapfile size to make? I have 4GB RAM

Here's a fairly sensible guide from The Linux Questions Wiki

Almost every Linux system will need swap space. The classic piece of advice is "swap should be double the amount of RAM you have", though this is not a rigid guideline. Another guideline is to have at least 1x your RAM size, but this also isn't a fixed, absolute requirement (this used to be necessary for linux, but not anymore for recent versions). It depends mainly on what applications you want to run. Applications like video/movie editing, 3d rendering, large image editing, database servers and web application servers can use a lot of memory and if you don't have that as RAM, it will need a large swap space.

A good way to decide the size, is to just try and see. Pick a size (it is usually easier to reduce the swap size after-wards, so aim high) and run your 'normal' workload for a while and see how much swap is used (See Memory diagnostic tools). You can then adjust/resize the partitions or re-partition completely.

To optimize for speed, it is advisable to put the swap partition on a different hard disk (if you have one) instead of on the main hard disk with the OS on it. It is also possible to spread the swap space over multiple hard disks, this can also increase the speed. Linux can handle multiple swap spaces, and each swap space can have a priority (pri=somenumber in fstab, also see swapon command).

I'm building a file server with 4G of RAM at the moment, and have started off with 8G swap space as I'm going to use a fair bit of RAM by using a union mount. It can always be adjusted later.


I believe that the laptop uses Hybrid Graphics (AMD + Intel). Hybrid Graphics are problematic in Linux right now, there's nothing that will work 100% for everyone. I recommend disabling the discrete AMD GPU so that it won't chew up your battery life.

To resolve the brightness button issue you're having, follow these steps:

Open up a terminal (Ctrl + Alt + T)
Type in the command:

gksudo gedit /etc/default/grub

In that file you will find a line like this GRUB_CMDLINE_LINUX_DEFAULT="quiet splash". Append the following after splash acpi_backlight=vendor so the line looks like:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor"

And save the file and exit gedit.
Now in the terminal execute the following command:

sudo update-grub

Now reboot and your brightness buttons should work.

You probably have the discrete card running and chewing up your battery. If so, you can disable it via vgaswitcheroo. Type this command in a terminal:

echo OFF > /sys/kernel/debug/vgaswitcheroo/switch

To make the changes to persist after reboot you can put this command in your /etc/rc.local so that it executes at every bootup, in a terminal execute:

gksudo /etc/rc.local

At the end of the file before the exit 0 line, paste the command echo OFF > /sys/kernel/debug/vgaswitcheroo/switch, save and you're good to go now the discrete GPU will be disabled at boot.

For more information see HybridGraphics


How can I recursively copy files without overwriting existing permissions?

Add -p flag

cp -pR /source/dir /dest/dir

From man cp:

-p     same as --preserve=mode,ownership,timestamps


Please help me with instalation of 64bit version

amd64 is used for both AMD and Intel processors, as they have (more or less) the same architecture. Your Core Quad already supports the installer that you downloaded, so you just need to continue!

Anyway, if it's not compatible with your computer, the installer won't be able to start and will show an alert message, so don't worry!


I can't help with the other things but for Java... you are trying to install the JDK which is the Java Development Kit, for programmers. You should only need the JRE, which is the Java Runtime Environment; the kit required to run Java applications and the Java virtual machine itself.

Try installing the latest JRE and see if that helps.


I want to completely replace Ubuntu with Lubuntu

I suggest that you try the Lubuntu 18.04 LTS iso file lubuntu-18.04-desktop-i386.iso, and if it works in your computer, it is a better choice, because it has support for 3 years from now.

Lubuntu 17.10 has support for only 3 more months.

Backup your personal data (files, that you want to keep) to another drive.
When you boot from Lubuntu and start the installer, at the partitioning window, you can select Something else and select the partition, where you have Windows to re-use it (and install alongside Windows).
The installer should install the grub bootloader and find Windows for you automatically. If Windows is hibernated or semi-hibernated (alias fast startup), there are problems, so you should turn that off (in Windows).


How to verify if a repository is already added

You can see all repository enabled in terminal with this command below (It will print all repository line starting with deb or deb-src)

find /etc/apt/ -name *.list | xargs cat | grep  ^[[:space:]]*deb

Explanation: first find find all files with .list extension in /etc/apt directory and feeds xargs the list, which in turn print all text on all of those files to the display device i.e Monitor. Then grep select those lines of which starts with deb. I have used extra step to include those lines also which starts with whitespace characters instead of deb.

If you want to see only the repositories with binary packages not source packages (deb-src), use another grep to exclude entries with deb-src like this one:

find /etc/apt/ -name *.list | xargs cat | grep  ^[[:space:]]*deb | grep -v deb-src

To add the repository using command line, just use this kind of command:

(I am assuming your repository source line is like this deb http://mydomain.com/ubuntu precise main )

echo deb http://mydomain.com/ubuntu precise main | sudo tee -a /etc/apt/sources.list

This command uses tee program which is used to read and write from standard input to standard output. Here, it takes the echoed repo line and put that line at the end of /etc/apt/sources.list file which is the main repository source file.

Please note that without using -a option for tee the entire sources.list will be replaced with the just echoed line.

Alternatively you can use your own file for the custom repo without touching sources.list file. For example,

echo deb http://mydomain.com/ubuntu precise main | sudo tee -a /etc/apt/sources.list.d/teles.list

It will create a file in /etc/apt/sources.list.d directory with name teles.list containing line deb http://mydomain.com/ubuntu precise main.

Note that, to add repository source to the system your script need to be run with root priviledge


You Can, in fact, create a boot disk, called a LiveCD, and run Ubuntu without even installing it on your machine.  This will allow you to test the waters without making the commitment to installing a new OS.  Another option is to boot from a flash drive.

And Yes, you CAN dual boot both OS's.

Just follow the Download and Burning instructions on http://www.ubuntu.com/download/desktop

Hope this helps, and Enjoy!


As you'll read on this answer on SO, this problem is not as hard as people are making it. You can get the sudo command working again without a reinstall by following these simple steps:

Log out as the current user, then log back in as root.
Execute chown root:root /usr/bin/sudo && chmod 4755 /usr/bin/sudo
Log out as root, then log back in as the current user.

This does the trick and is much quicker and less painful than the "nuclear option" recommended in other answers.

If your root password is not set, you can boot in Recovery Mode to set it.

Note that this will resolve the titular error /usr/bin/sudo must be owned by uid 0 and have the setuid bit set but if like the OP you did more than mess up the permissions of the /usr/bin/sudo file, a more "nuclear" option may in fact make more sense.


This question has been asked here before: https://stackoverflow.com/questions/2306972/is-there-any-way-to-decompile-linux-so.

Anyway, you can't get back your original code, or to quote Carlos Gutiérrez: "You can make hamburgers with a cow, but you can't make a cow with hamburgers".

A *.so file is a compiled shared object (roughly equivalent to a dll in windows).  It contains all the information for a function in a language the machine understands.  This is not necessarily the same language as the one it is written in - If the original was not pure assembly, it almost certainly isn't the same language.  So while its possible to get back enough information to produce a function that does the same thing it is not possible to get back to the original source code.


Expand filesystem from command line - sda1-5 already in use

You are running in a Virtual Machine (VM) using lvm: Logical Volume Manager and the only unused physical partition not under its control is /dev/sda3 which is just 1MB, so that won't help you much.

lvm is really great at handling multiple kinds of storage and can combine multiple disks into one Physical Volume (PV) which can then be (re-)assigned  as you need them.

However, you have allocated all (except 1MB) of your physical disks, so now you only have these choices:

add another disk

Don't expand existing mounted disks that you cannot dismount to expand in the future.
never assign 100% of your disks so you can extend your existing Physical Volumes on the free space you now have with your new disk.

Alternatively, mount a gparted live ISO from within grub if your Hyper-V environment gives you access to that.

Take a full snapshot of your VM!!!
Download the gparted live iso
copy it in /opt/LiveISOs

sudo mkdir /opt/LiveISOs
sudo cp ~/Downloads/gparted-live-1.0.0-3-amd64.iso /opt/LiveISOs

edit /etc/grub.d/40_custom to include the following at the end:

menuentry "GParted Live ISO" {
  set ISOFile="/opt/Live-ISOs/gparted-live-1.0.0-3-amd64.iso"
  loopback loop ($root)$ISOFile
  linuxefi (loop)/live/vmlinuz boot=live components config findiso=$ISOFile ip=frommedia toram=filesystem.squashfs union=overlay username=user
  initrdefi (loop)/live/initrd.img
}

set grub's timeout parameter to anything but 0
update the grub config:

sudo update-grub2

Reboot to grub
Take menu option GParted Live ISO

Voilà: a virtual USB key has been inserted in your VM virtually and you can now shrink / expand partitions off-line using gparted or using lvm utilities from the command line!

#2 above will not work if the only thing you have is ssh access to your VM...


This happened to me as I was attempting to run Wireshark after an update and upgrade on Kali rolling system. Wireshark is completely wiped out and I haven't even had a chance to use it or learn anything yet. I have never heard of these files or modules before and know nothing about them or how to get them back.


BURG/grub isn't linux, and so linux solutions won't work for this.
The only practical way I see this working is if you can a remote control that pretends to be a usb keyboard.

Non-practical ways-

BIOS supports remote (open source BIOS?)
Using linux as a bootloader


When the pop up menu automatically appears and I press `Ctrl + S`. It pastes `:w`?

Using <Esc> instead of <C-O> solved the problem.

noremap <C-S> :w!<CR>
vnoremap <C-S> <Esc>:w!<CR>
inoremap <C-S> <Esc>:w!<CR>


Getting UUID of a usb when ejecting using udev

AFAIK, It is not possible to get such info from a live state tree like SYSFS. Those inf are cleared with clean umount.

Best way to me is to keep a copy of such info about the plugged devices, then check them when a device is unplugged.


Not sure if it's the correct way but it works fine for me.

Open the configuration file which can be found at /etc/NetworkManager/system-connections/

Open terminal and use command

sudo nano /etc/NetworkManager/system-connections/eduroam

Look for and remove

system-ca-cert=true

and change

password-flags=1

to

password=YourPassword


See https://twiki.grid.iu.edu/bin/view/Documentation/Release3/KnownProblems#Java_upgrade

Apparently, you can ignore this error.


How to remove mysql-server-core-5.5 even if it has dependencies?

Try the following:

$ apt-get purge --auto-remove mysql-server-core
...<output from apt-get>...

In general, you should use apt-get instead of dpkg directly to install/remove software on a Debian/Ubuntu.

For mysql, you might also want to follow the above up with this:

$ rm -rf /var/lib/mysql


No printer in GIMP 2.10 print dialog in Ubuntu 18.10

Seems you're using the SNAP-Version of Gimp.
If so, you have to add CUPS-support to the SNAP-package.

sudo snap connect gimp:cups-control


in Ubuntu 10.04 - make your i5 processor run all cores

Linux automatically tries to spread each process across the available CPU's as long as Symmetric Multiprocessing is enabled at the kernel level

look in /boot/config-(fill in kernel version here) for the following:

CONFIG_SMP=y

Then at least at the kernel level, processes are attempted to be distributed evenly.

Unfortunately the situation is slightly more complicated at the user level. Unless a program has Multithread support it may only run on one core. Many process intensive programs do have this, but you may need to enable it with a specific option.

For example ffmpeg has the -threads option

Is there a specific processor intensive program you want to be spread out over the cores?

Another thing that may be an issue is the age of the kernel in 10.04 (two years old). With a newer processor, it's possible not all the hooks are in there. You may want to try updating your kernel to the latest version or consider upgrading to a linux distrobution with at 3.0+ version kernel. It looks like there are still significant revisions to how the linux kernel handles the sandy bridge architecture.


Is “Ubuntu Server 14.04.3 LTS + LAMP” production-ready?

You need to do 2 things yourself.

configure Apache to your personal requirements. Apache comes with a webpage that shows "ItWorks!" so you need to set up at least 1 virtual host in ./sites-enabled/
configure MySQL to your personal requirements. MySQL has no user databases so you need to set this up.

Both could be a problem regarding security: if you mess up the virtual host it is possible to exploit your machine.

But when it comes to this setup being secure and stable out of the box the answer is a plain "yes".


Installing Oracle 11g R2 on Ubuntu 14.04 64-bit

It's not impossible to install Oracle on Ubuntu, Oracle is pushing it's own Linux very hard by having the Automatic Storage Management built into its OS.

Some background info:
RedHat is trying very hard to keep up, so those are the two Linux Distributions to watch out for when you install Oracle DBM in a production environment.

As MySQL is part of the Oracle family as well, it's receiving more and more of the common architecture, without receiving the performance boost of the commercial product. Oracle clearly wants MySQL to be and stay the "little" brother of Oracle DBM, but with an easy upgrade path to the commercial product.


can't change partition permissions in linux in a dual boot system

I have a NTFS volume that is automounted when the computer starts. In /etc/fstab there is the following entry:
UUID=BC2E8B1A2E8ACD38 /mnt/win ntfs-3g   defaults,nls=utf8,umask=000,dmask=027,fmask=137,uid=1000,gid=1000,windows_names 0 0

where BC2E8B1A2E8ACD38 is the NTFS Volume Serial Number which can be found (in my case) with blkid /dev/sdc1 which gives the output:
/dev/sdc1: UUID="BC2E8B1A2E8ACD38" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="6dbd7f38-fe9e-4eb5-9769-2803188075b8"

I haven't tried to mount it by the PARTUUID. Also, the umask=000 is not recommended as it gives full read/write permissions to anyone but I'm the only one that can log in to the computer. uid and gid are my user and group ID.
(I will sharpen umask to 002)


Blank screen when booting from USB drive

I recommend you use 1 monitor untill you have completely installed Ubuntu, secondly I would need more details about your computer but you should be disabling UEFI boot from the USB and try to run it legacy mode. Please give as much information as possible, thank you.


Is it possible to shorten a unix terminal command to a shorter one?

Yes, you can create shell alias, which is exactly what you need:

$ alias mycmd="/sbin/ifconfig|grep inet|head -1|sed 's/\:/ /'|awk '{print $3}'"

You probably want to have above alias permanent. To achieve this, add the above alias command to the ~/.bashrc file.


Automate a conversion in Wine with BASH (or Python ..)

I would suggest using a simple for loop:

for i in /file/path/*.ext;
do
 wine /path/to/foobar.exe -convert "$i.ext" "${i%.ext}.newext"
done

It's going to loop into /filepath/ and converts all files with .ext extension to same name with .newext.

Each time it runs wine with for a single file with .ext format.


How to make a tilda screen always on back as part of wallpaper

I have a small bash script for you:

#!/bin/bash

#open tilda
tilda &
#wait a second to make sure tilda is open
sleep 1

wmctrl -r :ACTIVE: -b add,below

copy the code above to a file for example my_tilda

make it excutable

sudo chmod 755 my_tilda

test if it works

./my_tilda

if it works you can move it to /usr/local/bin

mv my_tilda /usr/local/bin/tilda_bg

now you can use start it by:tilda_bg

hope that helps you


File system that supports both Ubuntu and Mac on External HD

HFS
HFS+ without journaling.
FAT.
Ext3 with fuse-Ext2 installed on the Mac.

Here is a list for more operating systems and filesystems.


Joining an Ubuntu 14.04 machine to active directory with realm and sssd

From Redhat's SSSD Guide:

  Setting a default domain name allows users to log in with only their username, not specifying the domain name (which would be required for users outside the primary domain).

So, under the [sssd] section of the configuration file, set the field default_domain_suffix to be blank. Keep in mind that if there is a user on the local system and domain server, the local user will take priority.


Can I secure a webpage with something other than username/password

If you know to program, you can secure a web page with whatever you like. Whether it makes sense it is up to you. Basically, prompt the user on first access to supply whatever you want: a password, a file with a public key, a photo of his mother, a valid credit card number, and so on, and verify it using code afterwards.


Full switch locale: Ubuntu server installed with no locales, how to enable locales systemwide?

I would generate the English (United States) locale.

sudo locale-gen en_US.UTF-8

The system wide locales are stated in /etc/default/locale in Ubuntu, so give that file the contents:

LANG=en_US.UTF-8


dpkg --force-depends --configure --pending
or being six hours ago, dpkg --purge SpaceChem-amd64, dpkg -i --force-depends SpaceChem-amd64.deb


Change keyboard mapping ONLY for Bluetooth Keyboard

As per https://superuser.com/a/869064/140864 - it's possible to use xkbcomp to change the assignment of specific keys.

remote_id=$(
    xinput list |
    sed -n 's/.*AB Shutter 3.*id=\([0-9]*\).*keyboard.*/\1/p'
)
[ "$remote_id" ] || exit

mkdir -p /tmp/xkb/symbols
cat >/tmp/xkb/symbols/custom <<\EOF
xkb_symbols "remote" {
    key <VOL+>  { [ XF86Launch1 ] };
    key <RTRN>  { [ XF86Launch2 ] };
};
EOF

setxkbmap -device $remote_id -print | sed 's/\(xkb_symbols.*\)"/\1+custom(remote)"/' | xkbcomp -I/tmp/xkb -i $remote_id -synch - $DISPLAY 2>/dev/null

This needs to be run every time the device is connected.  The keys can then be assigned to a specific shortcut action in Gnome.


It means that it will erase all files on the virtual disk, and not the host.  It doesn't affect the host Operating System.  I would recommend choosing the first option.  If you would like more help, or information on how to accomplish you task, then See this site


Installing bluez-utils

Recently, bluez-utils has been replaced by bluez... With this being said, to simply install it, you should be able to run something like:

sudo apt udpate && sudo apt install bluez

Best of wishes!


Making the sftp server and still not know the cause of problem

The issue here is that you can only have one default gateway and you have two and enp5s0 is defined first, so that takes all traffic and enp6s0 gets none...

That leaves you with the following possibilities:
(all are mutually exclusive, the higher the number, the more difficult)

You can have one of the two IPs face the internet (default) and the other one internal only. (static routes)
You need to add a 3rd external Internet router (E.G. A Cisco ISR 111x with dual WAN ports) that will bond the 2 external routers you already have and will save state for the external connections and set that router as the default gateway for both (on different IP addresses)
You can bond both NICs together and let the bond save state: you have no control over what goes where: the bond does that for you like the third router would do in hardware.
You can split up the internet in 2 and define half of all Internet address ranges on #5 (Let's say all of the USA; static routes) and all of the rest of the world on #6 (default).


I've just solved the problem.

To locate the photos on the dash, those need to be imported into "Shotwell Photo Manager"


NAT timeout on particular websites. It feels like sites that contain re-direction for content in particular

I believe the problem is with the Zyxel VSG1432-B101 when in Bridge mode.
I'm posting this as informational only.

Solution:
Place Zyxel VSG1432-B101 in router mode
- then place Ubuntu behind the NAT as 192.168.1.2
- then set DMZ to be 192.168.1.2
- use Ubuntu as used in the past.

The problem with this solution is that my VPN is double NATed,
once by the Zyxel, then by my Ubuntu server. It also frustrates me to the highest point that I was unable to get the Zyxel to work in Bridge mode...

I believe that the fact that I'm using the same firewall settings and the same Ubuntu server behind the routed Zyxel with no problem proves that the problem is in the Zyxel when it is in Bridge mode.
The only thing that is different is that I'm not using the PPPoE from Ubuntu, but the one from Zyxel.
The rest stayed identical...

The PPPoE from Ubuntu seem to work properly as I had great scores at the bandwidth tests and with most (simple) websites. The Zyxel did not show ANY problems on the VDSL statistics page even with Ubuntu.

Martin Politick 2015.


2nd and 3rd disks mirrored for backup on Ubuntu Desktop

There are many distributed file systems available for Linux. These are more geared towards server applications like cloud computing, and include the ability to mirror data between computers as well.

Free options include Lustre and GlusterFS.

Using software RAID is probably the most common way to do what you want though.


How to kill KDE screensaver from command line

Sometimes, in KDE 4.13.3 (as shipped with Kubuntu 14.04 LTS), I cannot enter anything into the password field of the locker, nor can I press any buttons with my mouse. I use the following workarounds for this issue:

triggering suspend-to-RAM by closing my laptop's lid (not sure if this the default configuration, maybe you have to set it up first) and then resuming
if the above does not work, I switch to a "real" console with e.g. Ctrl-Alt-F1 (this by itself has to work, of course) and kill the locker process with killall kscreenlocker_greet

The actions mentioned above will not disable the locker but they at least make the input work again.

One might also want to have a look at this KDE bug report for possibly better workarounds (did not have time to evaluate them yet).


VLC player error. When i install it it shows this error

Well I recommend you to try installing the dependencies by entering the cmd ,

sudo apt-get -f install

If this doesn't works out , try installing chromium browser, which will install better libc dep which will be less hectic if you are not much familiar in handling deps.

sudo apt-get install chromium-browser

Now install VLC , now your problem might be sorted out by now.

sudo apt-get install vlc

Thats it.


Is there a way to export and import panel setting for Lubuntu 14.04 or 15.10?

The panel settings are stored in ~/.config/lxpanel/Lubuntu/panels/panel.

However, I'm not aware of any "export" facility. In any case, I would advise caution while using settings from 14.04 in 15.10 in case the newer version is different in some (unknown) way.

While you can use the older file's contents as a guide, the recommended way is to make changes via lxpanel's interface and not by directly editing the file I pointed to.

This is from the beginning of the file at least in 14.04:

# lxpanel <profile> config file. Manually editing is not recommended.
# Use preference dialog in lxpanel to adjust config when you can.


trouble installing qpdf 5.1.3; unable to infer tagged configuration

Your main problem is, that ./autogen.sh had some problems. For interested readers, here is the chat.

Delete the source folder
Install the missing dependencies for ./autogen.sh

sudo apt-get install autoconf

Run the commands below inside the source folder.

./autogen.sh
./configure
make
sudo make install


How do I tell grep after piping from cat to only highlight numerals greater than 720, or perhaps, more than two digtis?

Assuming that by "highlighting numbers greater than 720" you mean that you want to see the full text, but those numbers highlighted with color in the terminal output. I'll further assume that such numbers should also be highlighted if they are part of a word, or otherwise prefixed or suffixed with anything non-numeric (including negation signs or decimal points). However, leading zeroes will not be part of a match.

That said, you can try the regular expression ^|[1-9]\d{3,}|[89]\d{2}|7[2-9]\d after enable PCRE-compatible expressions in grep with the -P switch. Here's an example output, reading from a file example.txt, with the highlighted parts in bold:

$ grep -P '^|[1-9]\d{3,}|[89]\d{2}|7[2-9]\d' example.txt

something
foo 123 42 1111 777 719 720 1000000
321 -6666 bar999 8383m x1425y 52411.0 00013

The used regular expression consists of multiple parts that are joined together with a pipe (|), which means that it matches if any of these parts matches:

^ simply matches at the beginning of each line, without actually consuming any character. This is added to also show all other lines without appropriate numbers in the output, but without highlighting any part of those lines.
[1-9]\d{3,} matches a single digit in the range 1-9 (no leading zero) followed by at least three or more arbitrary digits (\d is equivalent to [0-9]). This rule matches all numbers greater than or equal to 1000.
[89]\d{2} matches a number starting with an 8 or 9 followed by exactly two more arbitrary digits. This matches all numbers from 800 to 999.
7[2-9]\d matches a number starting with a 7 followed by a single digit in the range 2-9 and another single arbitrary digit. That covers all numbers from 720 to 799.


While most of the things you describe probably won't be listed in log files, you may find some errors relating to the login screen in the lightdm logs.  They can be found in /var/log/lightdm/


This is related to mouse integration (that get enabled by default after having installed guest additions).

If you disable mouse integration from Machine menu, hot corners will start to behave correctly, otherwise Virtualbox will kick-in and the corner inside the guest is never really triggered.


"Failed to start session" for main and guest accounts

You can try an older kernel, under the "Advanced ..." grub menu choice.  It might help to run fsck from an install media on the root partition.  Try booting in single user mode, by adding the word "single" after the "quiet splash" on the linux line in the grub boot commands. At the grub menu, type "e" to edit (instructions at bottom of screen), add the word, and then type ctl-x or F10 to boot.  In single user mode, you should be able to try the apt-get install commands to let things complete.  Mid-way thought an update, it's pretty hard to unwind back to a previous state -- I've never tried it, but ...  If you can get past the login hurdle, you can fix things easiest by letting the update proceed.

Another thought, try a/another USB keyboard if you have one around. Run the memory check if grub offers that choice.  After a power failure, who knows what hardware may be fried.


kdenlive unable to show corectly or open folders or files with Unicode names (Ex: Arabic)

Try to change the name of the folder or file to "Test", OR "إختبار" :)


How to configure an Elan fingerprint scanner on an Asus UX430A laptop?

Ubuntu 18.04 is bundled with version 0.82 which doesn't support Elan fingerprint reader.

Version 0.99 supports Elan chip and can be built on Ubuntu 18.04 V1 uses Glib V2.57 when Ubuntu 18.04 latest glib's version is 2.56.

When I tried v0.99, even if the device was supported, one tenth of fingerprint readings were successful. might be a "finger" problem though ;)

iafilatov in his github says that his fork is now behind forked repository and we should use the origin. In order to use compiled version, symlinks needs to be created:

/usr/lib/x86_64-linux-gnu/libfprint.so.0.0.0 -> /usr/local/lib/libfprint.so.0.0.0
/usr/lib/x86_64-linux-gnu/libfprint.so.0 -> /usr/local/lib/libfprint.so.0.0.0

Please adapt according to your system, as it may be different.


Why do the same Wine applications appear in applications list many times? How to fix this?

Launch Menu editor from the dash.

Go to the Other Category.

Remove all the useless or duplicated shortcuts.

Done!


Prevent Hotspot from automatically starting after system startup

I fixed my problem by following these steps:

Run the command nmcli con show.

A list of the known networks will be displayed.

Run the command nmcli con mod <connection-name> connection.autoconnect no.

This will prevent the Hotspot connection from starting automatically.

(Optional) If you want to delete the Hotspot connection permanently, follow these steps:

Run ls /etc/NetworkManager/system-connections.
A list of the known networks will be displayed.
Run sudo rm <connection-name>.


Lampp (xampp) stop after reboot, not work autostart on Ubuntu

Solved:
From upgrading si Operation sistem... from 15.04 version to 15.10 version stable of ubuntu... it overwrite all services os i have modified and up alll services pre required form software added... one of it is Lampp from Xamp stack...


Move apps and configurations from 64-bit to 32-bit

Backup your current apps and config file

 dpkg --get-selections "*" > app   # or use \*
 debconf-get-selections > appconfig.txt

Install your app in new system.

 dselect update
 debconf-set-selections < appconfig.txt
 dpkg --set-selections < app
 apt-get -u dselect-upgrade    # or dselect install


virt-manager bonding: What is "Carrier Type"

KVM networking is not my thing, really bugs me. That's why I had to dig a little deeper and found out that the "Carrier type" translates into the bond_use_carrier parameter in /etc/network/interfaces. Quote from here:

use_carrier

Specifies whether or not miimon should use MII or ETHTOOL
ioctls vs. netif_carrier_ok() to determine the link
status. The MII or ETHTOOL ioctls are less efficient and
utilize a deprecated calling sequence within the kernel.  The
netif_carrier_ok() relies on the device driver to maintain its
state with netif_carrier_on/off; at this writing, most, but
not all, device drivers support this facility.

If bonding insists that the link is up when it should not be,
it may be that your network device driver does not support
netif_carrier_on/off.  The default state for netif_carrier is
"carrier on," so if a driver does not support netif_carrier,
it will appear as if the link is always up.  In this case,
setting use_carrier to 0 will cause bonding to revert to the
MII / ETHTOOL ioctl method to determine the link state.

A value of 1 enables the use of netif_carrier_ok(), a value of
0 will use the deprecated MII / ETHTOOL ioctls.  The default
value is 1.

So, choose "netif" and then take your link offline. If your system doesn't recognize that the link is down, switch back to "ioctl".


File size of [swapfile] is 0, but swapon shows I have swap

You can list the active swap devices with
swapon --show

or with
cat /proc/swaps

If you created your swap file as a sparse file (https://en.wikipedia.org/wiki/Sparse_file), it is possible that it actually has 0 blocks allocated if it never was in active use so far. Check its allocated size with
du -h myswapfile

and compare with
ls -lh myswapfile

(I guess that's what you wanted to achieve with that filefrag -v command which does something similar by coincidence)


Will Ubuntu automatically adjust to the leap second at the end of the year (2016)?

If your Ubuntu machine listens to NTP and synchronizes time with the Internet, the system will automatically adjust itself for the difference in time.

While your computer might not necessarily be aware of the fact that a leap second happened, it will catch and record the event as NTP servers push the change throughout the internet.

If you don't feel like the extra second is being added, you can force an update using the following command:

sudo ntpdate -s pool.ntp.org

This will automatically perform geo-location to give you a nearby server (reducing the latency error) and Ubuntu will adjust for your timezone (so if the server is in a different timezone, it's still all okay). Alternatively, you can use ntp.ubuntu.com.

Note that if you're very unlucky, none of the time servers you're using will handle the leap second correctly. It's unlikely, but possible. Checking manually against a known good source (analogue radio, possibly time.is) is advised.

Alternatively, if you're on a modern version of Ubuntu, there's a built in utility called timedatectl. By default, this runs once automatically on startup. Therefore, a quick reboot can force a sync if necessary.


Partitioning during installation of Ubuntu 18.04.1

It's always better to have backups but the steps needed are low to very low risk for the remaining data. I won't take any personal responsibility though.

  I want to install Ubuntu 18.04.1 replacing Windows 7 (installed on Drive:C).

Prepare and boot from a Ubuntu installation USB stick.
Choose Try Ubuntu
Open GParted software and make sure the internal drive (HDD) is selected, not the installation USB.
From left to right the first two (primary) partitions can be deleted. Those partitions are named as "System Reserved" and "WIN-7 (C:)" in your Windows Disk Manager. Please note they will show up differently in Ubuntu's GParted. Select > right-click > Delete each one.
Click Apply.

Now you should have ~100GB of unallocated space at the beginning of the drive to install Ubuntu and that plenty of space.

Go back to the desktop and double-click the installer. For better results do NOT choose any of the "automatic" options but choose "Something Else" instead. Select the unallocated space and click + to create a new partition (since Ubuntu 18.04 a separated swap partition is no longer required), select the options "EXT4" and use as "/" (root). Confirm and proceed with the installation.

From this point on no other user input is required, other than creating the user account.

Finally, after finishing the installation and rebooting, the "old" data partitions should be mounted (if not, just open the File Manager and click on the ones you want to open).


Download manager with browser integration in chrome

Get used to the terminal. Run the following commands to install ari2.

sudo apt-get update
sudo apt-get install aria2

Now, when you want to download something, just use the command aria2c. Here's an example:

aria2c "https://upload.wikimedia.org/wikipedia/commons/a/a3/Philaethria_hecale_2_Richard_Bartz.jpg"

aria2 will resume failed downloads and makes multiple connections to the server to speed things up. You can specify how many connections to make. Here's an example of using 8 connections to the server to do the download faster:

aria2c -x8 "https://upload.wikimedia.org/wikipedia/commons/a/a3/Philaethria_hecale_2_Richard_Bartz.jpg"

All files will be downloaded to the current directory. To download to the downloads directory, use the cd command to change to that directory before you do the download like in this example:

cd ~/Downloads
aria2c -x8 "https://upload.wikimedia.org/wikipedia/commons/a/a3/Philaethria_hecale_2_Richard_Bartz.jpg"

To change back to your home directory, just cd with no directory specified:

cd

Alternatively, you could use the DownThemAll extension for firefox.

For more info, run the following command:

man aria2c


Ok I found the answer myself

for ubuntu 12.04 this should be done

local0.*    /var/log/myLog.log
& ~

Also this should be put in a filename that has smaller no. than 50 (50-default.conf)

I created mine as 20-my-conf.conf


I have since discovered how to do this. I wrote a blog post to help others accomplish the same task.

http://www.codetunnel.com/blog/post/121/how-to-add-teamspeak-3-to-the-unity-launcher-in-ubuntu

I searched around for quite a while and just couldn't seem to find how to add custom applications to the Unity launcher (side bar) in Ubuntu. After much investigation I have found that applications that show up in the dashboard and on the Unity launcher have corresponding appname.desktop files in /usr/share/applications/.

I created one for TeamSpeak 3 on my machine. Here is what my Teamspeak3-client.desktop file looks like:

[Desktop Entry]
Version=3.0.6
Name=Teamspeak 3 Client
GenericName=Teamspeak
Exec=/home/alex/TeamSpeak3-Client-linux_amd64/ts3client_runscript.sh
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=/home/alex/TeamSpeak3-Client-linux_amd64/pluginsdk/docs/client_html/images/logo.png
StartupWMClass=Teamspeak
StartupNotify=true

Obviously you would modify the version number to reflect the version you have installed. Also double-check the path for the "Exec" and "Icon" options. My installation was located in my home directory.


How to fix “Module ndiswrapper not found"

Based on what you have installed, this may seem silly, but have you installed ndiswrapper-dkms? That should allow you to sudo modprobe ndiswrapper.


Name lookup from secondary DNS server, if primary returns a non-reachable IP address

Try this:

In the file /etc/NetworkManager/NetworkManager.conf change line dns=dnsmasq to # dns=dnsmasq. Then in file /etc/dhcp/dhclient.conf find line # supersede domain-name-servers , and change that to supersede domain-name-servers xxx.xx.xxx.xxx. yyy.yy.yyy.yyy , where x and y are numbers of the ip address for the dns servers you want to use.


Getting Ubuntu on Bootloader after formatting

I am no expert on wubi but your best bet may be to install Ubuntu again. You may want to go for installing Ubuntu alongside Windows 7 it its own sets of partitions.

If you have files under previous Ubuntu installation inside the root.disk, you can copy them to the new /home after mounting the root.disk using these instructions: Can I mount a Wubi .disk image in a new Wubi installation?.

Another approach (This is untested. It may not work and you may lose all the data.) is to:

make a copy of root.disk and keep it in another location
Install Ubuntu using wubi again from Windows 7
Reboot to make sure the new wubi installation works
Reboot back to windows and replace the new root.disk with the copy of
the old root.disk with existing data
Reboot and verify the wubi installation works with the old wubi

If the old root.disk does not work under the new wubi installation:

Reboot to Windows 7, switch back to the new root.disk
Reboot to Ubuntu, mount the old root.disk and copy the data files to
the new installation.

First, wubi installations are problematic as root.disk files can get corrupted. Second, I have no idea what happens if you copy or move the root.disk files while booted to Windows, in terms of the ability of booting back to Ubuntu under wubi installation. Use extreme caution, if you want to try this. You may lose all the data in the Ubuntu wubi installation.

Hope this helps


Ubuntu grub menu add manually Windows entry

This is UUID of partition in which you installed that OS and when you boot system then it will search for bootloader in this device. so you can see that UUID either in /etc/fstab by using command

cat /etc/fstab

or

ll /dev/disk/by-uuid/

or

 sudo blkid

In my system it is like

....
else
  search --no-floppy --fs-uuid --set=root a119cedc-3e53-4c17-8bdc-a6878c29adc9
....

and

 ll /dev/disk/by-uuid/
total 0
drwxr-xr-x 2 root root 100 Oct  3 16:32 ./
drwxr-xr-x 4 root root  80 Oct  3 18:32 ../
lrwxrwxrwx 1 root root  10 Oct  3 16:32 44a67255-60f1-44e6-8c3d-bdfc5a517c29 -> ../../sda1
lrwxrwxrwx 1 root root  10 Oct  3 16:32 a119cedc-3e53-4c17-8bdc-a6878c29adc9 -> ../../dm-0

and /etc/fstab entry is

# /boot was on /dev/sda1 during installation
UUID=44a67255-60f1-44e6-8c3d-bdfc5a517c29 /boot           ext2    defaults        0       2

size of UUID may differ for ntfs partition so don't bother about that thing.


Can a backup created on a 32bit installation be restored onto a 64bit system after upgrade?

That depends on what you have to backed up.
Anything that is just data, i.e. music, pictures, textfiles (configuration files) and movies can be restored without a problem.
Executables (anything in /bin /sbin /usr/bin /usr/sbin and some other places) are not usable from a backup in general. This shouldn't pose a problem, though because the programs you have installed can simply be installed again.


How can I install Ubuntu tweak on Ubuntu 16.04

Although the program is now abandonware (I am sad too) there is a repackaged version which works on 16.04 announced in this article.

There is a ppa here

deb http://archive.getdeb.net/ubuntu xenial-getdeb apps

for which the key is

wget -q -O- http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add -

Or you can just download the .deb from here

http://archive.getdeb.net/ubuntu/pool/apps/u/ubuntu-tweak/ubuntu-tweak_0.8.7-1~getdeb2~xenial_all.deb


Wireless drivers for the newer linux kernels 4.x

/home/devin/Desktop/MT7630E-release linux wireless driver

The command make doesn't like spaces in the name. Please try renaming the folder to:

MT7630E-release

Or to:

/home/devin/Desktop/MT7630E-release_linux_wireless_driver

Or something with no spaces. Then try the make, sudo make install sequence again.


How to search for an exact phrase with ytsearch in youtube-dl

You don't have to double quote ytsearch
youtube-dl ytsearch1:"gardneing"

This shall work.
Or if you really have to, You can use single quotes
youtube-dl 'ytsearch1:"gardneing"'


Dual boot Ubuntu (on HDD)/Windows (on SSD) with GRUB

When you installed Windows, it replaced GRUB with the Windows bootloader.

Try this from Ubuntu LiveCD, or this from Windows.

Another option is to boot from Ubuntu LiveCD, mount the old Linux partition, save your files and then wipe it and reinstall Ubuntu alongside with Windows.


Learn how to program/port through Ubuntu Touch

First: You won't need to buy a new phone to learn programming. There is an emulator for both Ubuntu Touch and Android.

I own a nexus 4. Maybe that is the right device. You can flash Ubuntu Touch and also Android to it. It's also capable of dual-booting, although i did not try that. This way you can easily learn to port Android apps to UT.

Porting UT to an unsupported phone is IMHO too hard when learning to program. You should start small.


What's the difference between .tar.gz and .gz, or .tar.7z and .7z?

If you come from a Windows background, you may be familiar with the zip and rar formats. These are archives of multiple files compressed together.
In Unix and Unix-like systems (like Ubuntu), archiving and compression are separate.

tar puts multiple files into a single (tar) file.
gzip compresses one file (only).

So, to get a compressed archive, you combine the two, first use tar or pax to get all files into a single file (archive.tar), then gzip it (archive.tar.gz).
If you have only one file, you need to compress (notes.txt): there's no need for tar, so you just do gzip notes.txt which will result in notes.txt.gz. There are other types of compression, such as compress, bzip2 and xz which work in the same manner as gzip (apart from using different types of compression of course).


What's the difference between virtual and nonvirtual workspaces?

Official comment from the compiz wiki:

  Horizontal Virtual Size: The number of columns of viewports you want. For the Desktop Cube to look like a cube, this must be set to 4.

  Vertical Virtual Size: The number of rows of viewports you want.

  Number of Desktops: Each desktop contains a completely separate set of viewports, so this value
  specifies how many complete sets of viewports you want.

  Viewports and desktops are not the same concept. For technical reasons, changing the number of "desktops" or "workspaces" in environments such as GNOME, KDE, and Xfce is not the same as changing the number of viewports in Compiz. You can have multiple viewports on one desktop.

IIRC Number of Desktops used to be fixed to 1 in older Ubuntu's.

So... number of desktops can let you can have more than 1 cube on 1 desktop where compiz uses some logic to let you scroll those cubes.

edit: I tried to set Unity up with a cube but cube does not seem to work with Unity. On restart I lost everything except my desktop. Luckily I could start a terminal from a link I had on my desktop (everything else was gone :D) and manually start ccsm.


Add a non-UEFI boot target to an UEFI grub

Because of the way UEFI works (which is probably what is on your system), it isn't possible to get GRUB to boot to non-UEFI-compliant OSes as GRUB has no ability to dictate what boot mode gets used, and UEFI will not load non-UEFI operating systems.


kodi unmet dependencies on new server install

Two options here:

ask PPA maintainers about the problem;
use kodi package from repository (bionic has 17.6):

sudo add-apt-repository universe

sudo apt-get install ppa-purge
sudo ppa-purge ppa:team-xbmc/ppa
sudo add-apt-repository -r ppa:team-xbmc/ppa

sudo apt-get install kodi

Official Kodi site says that 17.6 Krypton is recommended version:


how to mount / with encrypted lvm root during installation?

Assuming you are using the live, desktop CD:

Mount your crypt

This assumes your crypt is called crypt, the physical partition is /dev/sda1 , and the root partition partition in /dev/mapper is called root, adjust accordingly to your setup.

Boot the live (Desktop) CD and install lvm2 and cryptsetup.

sudo apt-get update && sudo apt-get install lvm2 cryptsetup
Load the cryptsetup module.

sudo modprobe dm-crypt
Decrypt your file system.

sudo cryptsetup luksOpen /dev/sda1 crypt
Get the live CD to recognize (activate) your LVM.

sudo vgscan --mknodes
sudo vgchange -ay
You can now access / mount the crypt

sudo mkdir /media/crypt_root
sudo mount /dev/mapper/root /media/crypt_root

Installing into the encrypted partition

I have not done this manually from an Ubuntu live CD and honestly I am not sure it will work, sort of depends on how much you already know, and how much I forget. This is going to be a long post, so I may not cover each and every detail ;).

You can try running the graphical installer and try to use /dev/mapper/root as your root ( / ) partition. You will need to unmount it first.

If that fails , you can install the long way with chroot

Installing into a chroot is fairly easy, you need to make any other partitions you are using , including /boot (you already have), swap, and if you so desire /home

You then install a base system with debootstrap, use /media/crypt_root as the chroot.

Typing all the commands for a chroot is going to be too long for an already long post, but DebootstrapChroot will walk you through how to do this step - by - step

After installing the base with debootstrap, we will chroot in and install / configure the rest.

Note: After following the above link, you should have configured the chroot , /media/crypt_root , including resolv.conf, and you should have proc, sys, and dev mounted in the chroot. All that is covered, but just making sure ;)

sudo -i

#mount your boot partition in the chroot
mount /dev/sda2 /media/chroot_root/boot

#mount home also if you have a separate home
#If you do not have a separate home, skip this
mount /dev/your_home_partition

chroot /media/crypt_root

RUN THESE COMMANDS IN THE CHROOT

apt-get install ubuntu-desktop lvm2 cryptsetup linux-generic grub2

# Add and configure your user
useradd your_user
passwd your_user
usermod usermod -a -G admin,users

Configure the chroot. You will need to edit /etc/fstab , /etc/crypttab

In /etc/crypttab define your crypt

crypt  /dev/sda1  none  luks

In /etc/fstab make sure you define your partitions, swap, etc

/dev/mapper/crypt_root  /  ext4  defaults,errors=remount-ro  0  1

MAKE SURE YOUR FSTAB IS COMPLETE , including swap, proc, home (if you use a separate home, tmpfs, etc. Use the live desktop cd as a template if needed.

Exit the chroot

exit

EXIT Chroot

You now need to install grub, run this command from the live CD

sudo grub-install --root-directory=/media/crypt_root /dev/sda

That is about it, I do not think I forgot anything major. I can not fill in all the details of all your partitions as I do not know your layout and do not know how much or how little you know about /etc/fstab.

If you need further assistance or I forgot something post back or perhaps someone will chime in.

If all the seems overwhelming , well that is why people use the alternate CD, it automates the process.

Additional references:

http://en.gentoo-wiki.com/wiki/DM-Crypt_with_LUKS

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

Those links will have gentoo and arch specific information, which you can ignore as you are on Ubuntu. But they contain more detailed descriptions on how to set up LVM and your crypt, including examples of crypttab and fstab.

Hope that helps.


This seems to have been reported as being fixed in nvidia v280 if you are using a nvidia card. If so, you can try installing those drivers instead of your current ones.


My computer doesn't boot successfully 90% of the time

After all that, it stopped working altogether on 23 January 2016. It turned out that both the Intel W2600CR motherboard, and one of the Intel Xeon E5 2680 processors, had failed.

They were both replaced under warranty, which took just under 6 months. As soon as the computer was returned from the other side of the country to me, and as soon as I had the video card also replaced under warranty (it failed during the couple of days getting my computer ticking over properly again), it was functional again.


Pay you attention command lspci -knn | grep Net -A2 output contains no line Kernel driver in use. Just do

sudo modprobe ath9k

Next check the wireless module for soft and hard block

sudo rfkill list

As your laptop is Acer, try

echo blacklist acer-wmi | sudo tee -a /etc/modprobe.d/blacklist-acer-wmi.conf

Reboot the laptop and try lspci -knn | grep Net -A2 and sudo rfkill list again.

If nothing helps try No Wifi on Acer Aspire E5 573 on any Linux Platform.

And finally try solution from post #22 from here.

ADDENDUM

Do

cd
sudo apt update
sudo apt install git
git clone https://github.com/kvalo/ath10k-firmware.git
sudo rm -rf /lib/firmware/ath10k
sudo cp -r ath10k-firmware/ /lib/firmware/ath10k/
sudo mv /lib/firmware/ath10k/QCA6174/hw2.1/firmware-5.bin_SW_RM.1.1.1-00157-QCARMSWPZ-1 /lib/firmware/ath10k/QCA6174/hw2.1/firmware-5.bin
sudo chmod +x /lib/firmware/ath10k/QCA6174/hw2.1/*
sudo chmod +x /lib/firmware/ath10k/QCA6174/hw2.1/firmware-5.bin

Reboot laptop.

ADDENDUM #2

Try

sudo apt install --reinstall linux-firmware

Reboot laptop.


How to re-install / re-activate the AMD open source drivers (the ones which come with a fresh install)

Check if you have amdgpu in your kernel modules:
$ lsmod | grep amd
amdgpu 4575232 11
amd_iommu_v2 20480 1 amdgpu
gpu_sched 32768 1 amdgpu
ttm 106496 1 amdgpu
drm_kms_helper 184320 1 amdgpu
drm 487424 7 gpu_sched,drm_kms_helper,amdgpu,ttm
i2c_algo_bit 16384 1 amdgpu

If not, check that the module is not blacklisted in /etc/modprobe.d/blacklist-amdgpu.conf. If it is, but comment out or delete the file.
After that perform a reboot.


Prerequisites
To install Angular on your local system, you need the following:

Node.js
Angular requires a current, active LTS, or maintenance LTS version of Node.js. To install Node.js run either sudo apt install nodejs or sudo snap install node --classic. To learn a few commands for the node snap package, for example how to select one of multiple installed Node.js versions see this answer.
For information about specific version requirements, see the engines key in the package.json file.
If you are unsure what version of Node.js runs on your system, run node -v in a terminal window.

npm package manager
Angular, the Angular CLI, and Angular applications depend on npm packages for many features and functions. To download and install npm packages, you need an npm package manager. To install npm run sudo apt install npm. To check that you have the npm client installed, run npm -v in a terminal window.

Install the Angular CLI
➡ You use the Angular CLI to create projects, generate application and library code, and perform a variety of ongoing development tasks such as testing, bundling, and deployment.
To install the Angular CLI, open a terminal window and run the following command:
npm install -g @angular/cli

Create a workspace and initial application
You develop apps in the context of an Angular workspace.
To create a new workspace and initial starter app:

Run the CLI command ng new and provide the name my-app, as shown here:
ng new my-app

The ng new command prompts you for information about features to include in the initial app. Accept the defaults by pressing the Enter  key.

The Angular CLI installs the necessary Angular npm packages and other dependencies. This can take a few minutes.
The CLI creates a new workspace and a simple Welcome app, ready to run.

You also have the option to use Angular's strict mode, which can help you write better, more maintainable code. For more information, see Strict mode.

Source: revised from Angular - Setting up the local environment and workspace


A black screen can sometimes be caused by the LWJGL files being out of date, however if you can play your minecraft online this solution will not help you.

Update your LWJGL Files:

sudo apt-get install liblwjgl-java

Or you can take a look at this link if the above does not work.

You could also consider installing OpenJDK 7

Please note that you have to run minecraft online at least once for it to run offline.


move/clone existing external USB installation to internal partition shared with Windows

I still think clonezilla is the way to go it has option to copy and restore partitions usb/internal dosent matter as long as ubuntu was running just format the partition where you wanna install ubuntu same as where it is installed .Or you can make a custom distro with all your apps and files. There used to be an awesome tool for this called remastersys but they terminated the support after ubuntu 12 boooo .anyways there are similar tools like remastersys you can look into it.


Use Unity Tweak Tool: https://launchpad.net/unity-tweak-tool

Open using starter after installation, choose "Search", and disable all sources you do not want.


Righ click doesn't work on an Elantech touchpad

Normally, Elantech touchpad works out of the box in Ubuntu 12.04 (For kernel 3.3-rc5 on Ubuntu 12.04 LTS Elantech drivers is working very good).

Changes made in 3.2 :

The whole pad is the left button, there is thus no right button. However a revision to the Synaptics driver restores click-pad functionality. See here for the Ubuntu package and instructions.
click and drag is done by clicking anywhere on the pad and moving the finger.
Right mouse is available as two-finger tap.
Middle button is available as three finger tap.

You can also use synclient to setup the touchpad. Here is an example script from Aurélien Jacobs and Marcus Möller. You can save it as ~/bin/touchpad_settings and add it as Unity startup script using gnome-session-properties:

# higher sensitivity
synclient FingerLow=9 FingerHigh=12

# faster speed and acceleration
synclient MinSpeed=1.5 MaxSpeed=3.5 AccelFactor=0.1

# 2 fingers scroll (can be also enabled in System Settings)
synclient VertTwoFingerScroll=1 HorizTwoFingerScroll=1

# faster coasting
synclient CoastingSpeed=10

# enable tap to click (2 fingers for middle click, 3 fingers for right click)
synclient TapButton1=1 TapButton2=3 TapButton3=2

# continue dragging movement when reaching the edge of the touchpad
synclient EdgeMotionMinZ=30 EdgeMotionMaxZ=40 EdgeMotionMinSpeed=100 EdgeMotionMaxSpeed=400


How do you make a button that performs a specific command?

this can be achieved by creating gnome-shell-extension.
Tested in gnome-shell --version 3.38.1
Run below commands one by one to create required files.
mkdir -p $HOME/.local/share/gnome-shell/extensions/KBD
touch $HOME/.local/share/gnome-shell/extensions/KBD/extension.js
touch $HOME/.local/share/gnome-shell/extensions/KBD/metadata.json

extension.js file contents, copy paste in above created extension.js file.
Notice the 11th line, Util.spawnCommandLine("bash /home/admin/mykbd.sh") replace /home/admin/mykbd.sh with path of your script that toggles what you are looking for.
'use strict';

const St = imports.gi.St;

const Main = imports.ui.main;
const Util = imports.misc.util;

let button;

function _myKBD () {
Util.spawnCommandLine("bash /home/admin/mykbd.sh")
}

function init() {
    button = new St.Bin({ style_class: 'panel-button',
                          reactive: true,
                          can_focus: true,
                          track_hover: true });

    let icon = new St.Icon ({ icon_name: 'input-keyboard-symbolic',
                      style_class: 'system-status-icon' });
    button.set_child(icon);
    button.connect('button-press-event', _myKBD);
}

function enable() {
        Main.panel._rightBox.insert_child_at_index(button, 0);
}

function disable() {
        Main.panel._rightBox.remove_child(button);
}

metadata.json file contents, copy paste in above created metadata.json file.
{
  "name": "KBD",
  "description": "KBD",
  "uuid": "KBD",
  "shell-version": [
    "3.36"
  ]
}

once you are done with copy pasting in the two files. Refresh the gnome-shell with Alt+F2 r Enter method or logout and login.
Then to enable the extension, run below command.
gnome-extensions enable KBD

Again Refresh the gnome-shell with Alt+F2 r Enter method or logout and login.
Now you will see the keyboard button at the top right corner. when you click it, it runs the script you prepared.

Please note that, extensions are disabled when screen is locked and enabled once unlocked. So you wont be able to click this button on lock screen.


I have a Toshiba Satellite A205-s6812 and the sound is not working.

An lspci would help... but I'll try.

Open a terminal and type

sudo add-apt-repository ppa:team-iquik/alsa && sudo apt-get update && sudo apt-get upgrade

Restart.


Show Firefox bookmarks button in Firefox navigation bar?

Or you can put this code into your userChrome.css file:

#bookmarks-menu-button-container {display:-moz-box!important;}

In Firefox 23 and newer, the following may work instead:

#bookmarks-menu-button {display:-moz-box!important;}

The button will show up in her place and you don't have to disable the global menu extension.

You can always check for correct CSS selector by navigating to chrome://browser/content/browser.xul and using Firefox's Inspector in Developer Tools.


What Music programs will sync my MP3 player, Sony walkman S?

Banshee is my favorite music app. It can read from exiting tags in music files and offers native support for almost any music device. I highly recommend checking it out. You can look for it in the software center by simply searching 'banshee' without the quotes :D


ubuntu 18.04 connect to login screen over VNC

Ubuntu 18.04 switched from LightDM to GDM3.
Connecting to the login screen with VNC while using GDM3 is currently not possible.
The easiest way to get this VNC functionality back is to simply switch back from GDM3 to LightDM.
LightDM is still being actively developed and used by many Linux distributions including some other flavors of Ubuntu. So no worries there.
Install LightDM
apt install lightdm

Should you for some reason come to regret switching to LightDM:
dpkg-reconfigure gdm3

Once you have LightDM installed and configured as your default greeter..
Install x11vnc from packages
apt install x11vnc

Create the file /etc/systemd/system/x11vnc.service
# Description: Custom Service Unit file
# File: /etc/systemd/system/x11vnc.service
[Unit]
Description="x11vnc"
Requires=display-manager.service
After=display-manager.service

[Service]
ExecStart=/usr/bin/x11vnc -loop -nopw -xkb -repeat -noxrecord -noxfixes -noxdamage -forever -rfbport 5900 -display :0 -auth guess
ExecStop=/usr/bin/killall x11vnc
Restart=on-failure
RestartSec=2

[Install]
WantedBy=multi-user.target

Enable the x11vnc service
 systemctl enable x11vnc.service

This assumes screen :0 represents your monitor and binds x11vnc to that monitor instead of a session.
If you do not have a monitor (headless) you can install the xserver-xorg-video-dummy package and use the dummy driver to configure a virtual :0 screen for you.
Side notes

Incase you are using virt-manager (which also enables VNC on 127.0.0.1:5900) you may want to bind x11vnc to your LAN IP (-listen 10.0.0.1)
The parameters used to start x11vnc tell it not to ask for an additional password (-nopw)


Launching Android Studio under Root every time

While I wouldn't recommend running the IDE as the root user, you could create (or modify) the .desktop file for the app and create a custom launcher script that uses sudo.

For example, I have $HOME/.local/share/applications/jetbrains-studio.desktop with the following content:

[Desktop Entry]
Version=2.1
Type=Application
Name=Android Studio
Icon=/home/ray/.android-studio/bin/studio.png
Exec="/home/ray/.android-studio/bin/studio.sh" %f
Comment=Develop with pleasure!
Categories=Development;IDE;
Terminal=false
StartupWMClass=jetbrains-studio

You can modify the Exec line so that it points to a script of your own making, say, Exec="/home/<yourname>/.studio-launcher.bash"

This script could do something like this:

#!/bin/bash

sudo /home/ray/.android-studio/bin/studio.sh %f

With the .desktop file under the directory mentioned above, you should also get the app to show up in the launcher, as shown in the example below, which is of my laptop using gnome-shell.

This is a better long-term solution because:

It's a one-time setup;
You don't need to run terminal commands every time (e.g. alias);
You don't need to launch it from the terminal every time (e.g. running the astudio command);
You don't need to modify code in $HOME/.bashrc, etc.


Ubuntu 14.04 no ethernet connection, network manager detects only wireless networks

The solution that worked in my case is as follows. As MAC-address of my ethernet card is set to 00:00:00:00:00:00 by manufacturer, I forcibly set it to non-zero unique value (xx:xx:xx:xx:xx:xx) which is white-listed in router. To prevent conflicts between eth0 with forcibly set MAC-address and other network clients I assigned static IP-address (192.168.1.10 in my case) for eth0. In order to prevent any foreseen issues with DNS I've forcibly set it to Google servers (8.8.8.8 and 8.8.4.4). To make all assignments permanent I've changed /etc/network/interfaces as below:

iface eth0 inet static
    hwaddress ether xx:xx:xx:xx:xx:xx
    address 192.168.1.10
    netmask 255.255.255.0
    gateway 192.168.1.1
    dns-nameservers 8.8.8.8 8.8.4.4

Then in console I've entered following commands:

$ sudo ifdown eth0

this is to shut down old settings of eth0

$ sudo stop network-manager

$ echo "manual" | sudo tee /etc/init/network-manager.overrride

this is to bypass network manager settings

$ sudo ifup eth0

this is to bring eth0 up with new settings

After reboot network manager applet still has '?'-mark on it but network via eth0 works as it should .


Ubuntu MATE: show text file contents on its icon in caja

I can confirm your issue on clean Ubuntu MATE 18.04 LTS.

All settings are set as in 16.04 LTS

but Preview is not shown in Icon mode:

So I reported bug 1787368 to LaunchPad and posted a question to the ubuntu-mate.community.

Waiting for developers' reaction. Can't do more today.


some times ubuntu initially drivers will not work so,you need to update your drivers to work wifi in ubuntu , so initially connect pc/laptop with "cable" and it automatically detect your internet connection.

After that you can update the drivers then restart the pc , unplug the cable and now you can search your wifi and give password for connection.

For any query , please add comment.


Ubuntu 15.10 Lenovo Yoga 3 14,no network devices available

I had what seems to have been a similar problem (wireless, ethernet, USB mouse all not working).  I'm not 100% sure what I did that fixed it, but the issue seems to have been that my kernel headers hadn't installed correctly, I think due to some other installation failures.  (I noticed this because lsmod showed a lot fewer modules than I expected.)  I booted to an older kernel, which worked fine, then did sudo apt-get dist-upgrade (which prompted me to fix broken packages, which I did) and sudo apt-get install linux-headers-4.2.0-22-generic (since I had the 4.2.0-22 kernel).  This apparently caused kernel modules to get installed correctly, and then booting to the new kernel worked.


How do I disable an update of a single item?

Another possibility would be to lock the currently installed version of the Crystal Icon Package. Just choose the package in Synaptic and choose "Lock Version..." from the "Package" menu.


Dash picks up its entries from .desktop files placed in /usr/share/applications and ~/.local/share/applications.

Deleting the .desktop file corresponding to your program should remove its entry from Dash.


Touchpad detected as both PS/2 mouse and ALPS Glidepoint...uses PS/2 mouse settings

The psmouse driver is responsible for handling all mice and touchpads that use the PS/2 bus, even though many of them (including most touchpads) support some kind of "extended" protocol. Thus, it's normal to see the PS/2 driver loading and then indicating it found an ALPS touchpad, which it handles internally.

Go look in /lib/modules/3.0.0-16-generic/kernel/drivers/input/mouse and you'll see there is no "alps" driver proper, notice too that psmouse.ko is by far the largest driver, since it handles a lot of PS/2 protocol extensions internally (like ALPS, Elantech, some Synaptics, and others).

This is just an explanation, I'm sorry I don't have a real solution for you, you may want to go have a look at this bug report to see if it applies to you, and if so, to track the status of any possible solutions.

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/550625


I don't know what other proxy servers you have used and of course there are lots of proxy servers for Ubuntu.But i have used Squid and it really works.I have also use Tor Browser that is installed in your Ubuntu by default and it works perfectly for me.I have used another proxy server called uproxy that is an extension for chrome and firefox and it works good too.Let me know if these three don't work for you and what kind of problems you have with them.


Unable to unmount mounted device, not found in mtab

As you can see /dev/sdb1 is mounted at  /media/jviotti/CD8B-7D3E.

Try the command in a terminal: sudo umount /dev/sdb1 -v

sdb points your HDD and different partitions of HDD will be listed as different 'files'. In your case I guess there is only 1 partition i.e sdb1


Is there a driver for a NVIDIA GeForce GT525M?

Most likely but check here to make sure.
http://www.ubuntu.com/certification/catalog


Intel Wireless-AC 9560 Slow on Ubuntu 18.04

On a different Intel Wifi product, I found disabling power management on the device remedied a batch of anomalous events ... perhaps it will work here.

Here's how I did it:

Create: /etc/network/if-up.d/wifi-powerman-off
Enable: chmod +x /etc/network/if-up.d/wifi-powerman-off

Replace interface name

#!/bin/sh

IWCONFIG=/sbin/iwconfig
WLAN_IFACE=<<interface name>>

if [ ! -x $IWCONFIG ]; then
    exit 1
fi

if [ "$IFACE" = $WLAN_IFACE ]; then
    $IWCONFIG $IFACE power off
fi


Turn off spellcheck for cyrillic input in Empathy

Although this question is quite old, I think it could be useful for someone.
There is setting in Empathy preferences dialog, in "Spellchecking" tab. There you can select languages for spellchecing from list of all installed ones.


How to associate hardware volume control to USB speakers?

A cursory google search reveals the Ubuntu team has been working quite a bit on its USB speaker support. It's quite likely this is a 10.10 bug, fixed in Natty. I haven't found your specific bug yet, but if I do I'll come back here and add it to my answer.


Running Ubuntu from a CD doesn't work for me

There may be some problem burning to the CD. Best is use a flash drive and make it bootable using Universal USB Installer.


Backup disk, to be activated and mounted only once a day

I did a little digging and the best solution to your specific problem I found was: Prevent a USB external hard drive from sleeping.

There are four answers but what I like the best is a comment suggesting a cron job that executes:

*/15 * * * * date > /mnt/disk/.date`

Please review all answers though and, as always, if clarification is needed don't hesitate to post a comment below!


How can I resize an LVM partition? (i.e: physical volume)

There seems to be plenty of results on Google where people had similar problems. An example:
Back up all your important data before attempting this. Always assume that you can lose all your data when resizing partitions.
Shrink LVM without dataloss
This forum thread suggests the following procedure, in this example we shrink a partition from 10G to 9G:

First, we unmount.
sudo umount /dev/vg_blah/lv_blah

Check the file system.
sudo e2fsck -f /dev/vg_blah/lv_blah

Resize the file system and the logical volume. Doing this in one step can avoid mistakes which cause dataloss. (Note lvreduce parameter -L interprets G as 2^30 bytes and g as 10^9 bytes.)
sudo lvreduce --resizefs -L 9G /dev/vg_blah/lv_blah

(optional) Remove a physical drive from the volume group if desired (if you now have an unused drive).
sudo vgreduce vg_blah /dev/sdxy

All credit goes to brianmcgee.
Note: vgreduce will fail with cannot resize to xxxxx extents as later ones are allocated if you have another lv at the end of the disk - I had a swap lv, which I deleted. See How to shrink Ubuntu LVM logical and physical volumes? for help on that situation.


Are there any programs running while this is happening, i.e Firefox, Thunderbird, anything?

Also, its possible a cron job could be running in the background?

You might try opening a terminal, and using top to watch processes, see if there are any offending processes?


How to import audio CD as .m4a with album art?

An excellent choice under either Trusty Tahr or Xenial Xerus is to use the command line ripper abcde. Installation is slightly different for each of these versions of Ubuntu:

1. Trusty Tahr Installation:

sudo add-apt-repository ppa:mc3man/trusty-media
sudo apt-get update
sudo apt-get install abcde imagemagick glyrc fdkaac

2. Xenial Xerus Installation:

sudo apt-get install abcde imagemagick glyrc fdkaac

Usage:

Best option then is to use a suitable conf file copied and pasted into the file ~/.abcde.conf and then simply run the following command under either Trusty Tahr or Xenial Xerus:

abcde -o m4a -G

And this should be enough to rip, encode to m4a, tag, find and download album art. Consider as well the use of the MusicBrainz script that comes with abcde for even more accurate album art downloading...

References:

abcde: Command Line Music CD Ripping for Linux
abcde: Downloading Album Art...
How do I produce great quality AAC files under Xenial Xerus?

Full disclosure: I am a former maintainer of abcde.


double click a file to run a specific command

Create a text file for script..
A script should have in its first line the so called shebang:

#!/bin/bash

So your overall script Should look like this

#!/bin/bash
java -jar JavaApplication3.jar

save your file now go to properties->permissions and check the "is Executable" option..
Make sure your file has the permission to be executed.

Now double click .........

its all done have fun


Are there differences between CLI and TUI?

While the two terms are often used interchangeably, they are slightly different, since as RoVo pointed out, command-line is all about successive lines of text, which are commands. Think back to old teletype type of computers, where you could only type in command, and its output would come out on line of teletype paper.

For text user interface, we can reference such tools as Midnight Commander ( and some old folks will also know Norton Commander ) or ncdu or nano. In those you don't necessarily type in lines of commands, but  navigate primitive menu made with ncurses library, and guess what. . . .such program uses text as representation of buttons,borders, etc. Take for instance, htop. The way memory and CPU usage bar represented is simply via # and * symbols.


How to install Ulteo Open Virtual Desktop on Ubuntu 13.10?

Ulteo Open Virtual Desktop v3.0 can be installed as given in its installation guide page of its website.


Microsoft LifeCam Cinema with Ubuntu 12.04: webcam light blinks, and freezes with guvcview

I filed a bug report today here:

https://bugs.launchpad.net/ubuntu/+source/adobe-flashplugin/+bug/1046921

Feel free to add that you are affected by the bug as well so that it hopefully gets fixed sooner rather than later.


Getting Hash sum mismatch while upgrading dpkg

Perhaps your ISP cache all http transfering, so you can try a https mirror...


How to update Oracle Java plugin for Google-chrome?

Download this shell script from here .

Give it Executable permissions. Once you open it will show a list of software. Select Java. It will ask If you want to install openjdk or Sun Java. Select whichever you want. It will work its charm and you're done.


Use awk

$ wget http://www.weatherzone.com.au/sa/adelaide/adelaide
$ awk  -F '[<|>|&]' '/tempnow/ {print $3}' adelaide
20.0

or all-in-one

$ wget -q -O- http://www.weatherzone.com.au/sa/adelaide/adelaide | awk  -F '[<|>|&]' '/tempnow/ {print $3}'
20.1

This works as long as the attribute class with the value tempnow is available in the span tag.

18.6&deg;C

And now I'm blacklisted o_O :P

wget http://www.weatherzone.com.au/sa/adelaide/adelaide
--2015-11-06 08:17:37--  http://www.weatherzone.com.au/sa/adelaide/adelaide
Resolving www.weatherzone.com.au (www.weatherzone.com.au)... 104.101.241.181
Connecting to www.weatherzone.com.au (www.weatherzone.com.au)|104.101.241.181|:80... connected.
HTTP request sent, awaiting response... 403 Forbidden
2015-11-06 08:17:37 ERROR 403: Forbidden.


Change terminal colour based on SSH session

Yes, you can by changing the PS1 value in .bashrc file on every hostname where you are connecting with ssh.

See this answer to view how to costumize as you like the bash changing the PS1 value.

On my machine (radu@Radu) I have in .bashrc:

PS1='${debian_chroot:+($debian_chroot)}\[\033[01;35m\]\u@\h\[\033[00m\]:\[\033[01;34m\] \w\[\033[01;37m\] > '

On the hosted machine (radu@ubuntu) I have:

PS1='${debian_chroot:+($debian_chroot)}\[\033[01;35;40m\]\u@ubuntu\[\033[00;40m\]:\[\033[01;34;40m\] \w\[\033[01;32;40m\] > '


Remounting SMB shares when changing between wifi/wired networks

You can add script in /etc/network/if-up.d/ and when wlan0 go up call script witch will do sudo mount -a.

Make script called script with execute permissions 755

sudo nano /etc/network/if-up.d/script

# Check for specific interface if desired
[ "$IFACE" != "wlan0" ] || exit 0
# Do something
sudo mount -a


I had changed Plymouth theme to text-only, but want it back in Graphical mode

the commands for the new Plymouth configuration are:

sudo plymouth-set-default-theme -l  #this lists installed themes
sudo plymouth-set-default-theme <theme name>  # this sets theme

After setting theme you have to update initramfs:

sudo update-initramfs -u


Cannot locate packages for Citrix install

You do not have multiarch enabled. Do:

sudo dpkg --add-architecture i386
sudo apt-get update


Have you initiated the npm project, using npm init? To be able to install npm packages in a folder, there has to be an npm project present in that folder. (Also read https://developer.mozilla.org/en-US/docs/Learn/Server-side/Express_Nodejs/development_environment to learn more about setting up npm)
Otherwise, could you try running npm -v and see what the output is?


To allow only people in your local network you could add under the share hosts allow = 127.0.0.1, 192.168.1. to allow your machine as well as any device on that subnet of 192.168.1. to access the share.
To allow specific hostnames you should use commas between IPs and hostnames. You can do hosts allow = 127.0.0.1, Z1-B
If this helped please consider voting up


Please try the following:

device > Settings > Manage applications > Ubuntu One Files > Force close, Clear app data
device > Settings > Accounts & sync > remove the Ubuntu account
device > Settings > Date & time > Automatic -- checked
relaunch Ubuntu One Files and try again :)

If you have further issues, please contacts us using this form :)
https://one.ubuntu.com/help/contact/


Installing Bluetooth Driver for EP-AC1661

This bluetooth device is supported by Linux kernel as you can see in drivers/bluetooth/btusb.c.

/* Realtek Bluetooth devices */
    { USB_VENDOR_AND_INTERFACE_INFO(0x0bda, 0xe0, 0x01, 0x01),
      .driver_info = BTUSB_REALTEK },

The meaning of (0x0bda, 0xe0, 0x01, 0x01) is exactly what you have in

Vendor=0bda  Cls=e0(wlcon) Sub=01 Prot=01

You have a combo Wi-Fi + BT device, both parts are visible in usb-devices

I:  If#= 2 Alt= 0 #EPs= 6 Cls=ff(vend.) Sub=ff Prot=ff Driver=rtl8821cu

is the Wi-Fi device. It loads rtl8821cu driver successfully.

I:  If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)

is the BT device. It doesn't load btusb driver for some reason.

The reasons might be:

Kernel doesn't properly handle combo devices. This can be tested by blacklisting rtl8821cu. It should load btusb. If this is the case, it is a kernel bug that should be reported.
You already installed some driver that blacklists btusb, but doesn't work.

If you get btusb loading, you need to make sure there is firmware in lib/firmware/rtl_bt. The file is called rtl8821a_config.bin.

This file hasn't been added to linux-firmware yet, but you can find it in the old driver that you downloaded previuosly, that didn't install.

I see a file there in linux/2017.../BT/2017...BT_ANDROID/rtkbt/system/etc/firmware/rtl8821a_config

Try to rename it to rtl8821a_config.bin and copy to /lib/firmware/rtl_bt.

If this file works, I'll send it upstream.


How to directly open the Desktop in a Live Ubuntu image?

For what I believe, editing the bootloader file will work out, because from there you can choose wether to try or to install.


14.04 Cannot create/delete/manipulate files on my Android device via USB

The conflict is between Banshee and the file manager (Nautilus), both are trying to access the device. So if you want to copy the playlist to the device, you must deactivate all the extensions that access your device, in Banshee's Preferences.

Then open your device's music folder in Nautilus, and copy/paste your playlists from Banshee to the Nautilus' window.

This worked for me with Ubuntu 14.04 + Jolla phone with Sailfish OS.


Kdenlive, how to use the chromakey effect properly?

1) - Right-click your top clip(green screen clip), go to "Add Transition" and select "Composite". This will show up between your clips.

2) - Extend "composite" to the same length as your clips.

3) - Right-click your top clip again, go to "Add Effect" and select "Chroma Key".

4) - When changing the color, manually open the color picker and choose your color instead of using the water droplet tool at the side.

5) - Right-click the next clip to be shown, go to "Crop and transform and select "Crop, Scale & Tilt" to adjust the clip to be shown if necessary.


First, determine how your system recognizes your tablet.
In a terminal enter: xsetwacom --list devices

  Wacom BambooPT 2FG 4x5 Pen stylus id: 10  type: STYLUS
  Wacom BambooPT 2FG 4x5 Finger touch    id: 11  type: TOUCH
  Wacom BambooPT 2FG 4x5 Pad pad     id: 12  type: PAD
  Wacom BambooPT 2FG 4x5 Pen eraser  id: 17  type: ERASER

Next determine which display or "output" to map your tablet to in your systems display settings or in the terminal with xrandr --listactivemonitors
on my system that shows:

  0: +*HDMI-2 1920/521x1080/293+1600+0  HDMI-2
  1: +HDMI-1 1600/443x900/249+0+0  HDMI-1

Finally, using the information you just gathered, use
xsetwacom --set "[YourWacomDevice]" MapToOutput [your display] (repeat for each device listed ).

[YourWacomDevice] = device name or id:#

so, for me that would be

  xsetwacom --set "10" MapToOutput HDMI-2
  xsetwacom --set "11" MapToOutput HDMI-2
  xsetwacom --set "12" MapToOutput HDMI-2
  xsetwacom --set "17" MapToOutput HDMI-2

Since these settings aren't kept after a reboot, you may want to save them in a script that runs on startup.

Using xsetwacom --help lists possible options and commands. With the --list parameters command, we can see a list of all the supported parameters. Near the end of that list is MapToOutput      - Map the device to the given output.

man xsetwacom will display it's manual entry or you can read it here

for more information about identifying and configuring displays with xrandr read this question

Thanks to @RyanWC and @user1355 for pointing me in the right direction.


I used to face similar problem and needed to run sudo alsa force-reload every time I start my computer. Then identified the processes that ALSA stops to reload it from the PIDs shown in the output.

Used sudo pstree -p prior to reloading ALSA so that I can find out the process names corresponding to the PIDs. Started uninstalling the packages related to those possibly problematic processes.

Finally found uninstalling squeezelite-pa solved my problem.


How to make firefox ask for master password only when trying to show passwords

Finally I found a good workaround on this, using the Master Password+ Firefox Add-on.

This add-on provides several options, one of them being "Block master password prompts". In case the master password is required, the Master Password+ icon blinks, but no pop-up is shown.

Note that the websites in which I am already logged-in continue working normally. If I explicitly try to use a saved password, then I have to click the Master Password+ to enter my master password and continue.


How can I copy data from an extended partition?

Clonezilla is an excellent software for data backup and drive cloning.

get the disk image here http://clonezilla.org/downloads.php

burn the image to CD with a disk burning software.

you will need to turn secure boot off to boot the CD.

once booted.
local drive/partition to image. will make a backup image of your device
local drive/partition to local drive/partition will clone your device to the external.

Note: if you are going to clone partition to partition, the destination partition must be created in advance and be the same size or larger than the original.


About the Passwords...

Eventually the image will be just like any other desktop where you are prompted for a user/password, timezone, etc. It's being worked on.

Disabling Autologin

Edit (with sudo) /etc/lightdm/lightdm.conf and comment out (with a #) the line that says

  autologin-user=ubuntu

Like this:

  #autologin-user=ubuntu

Then reboot or restart lightdm.

Also please file a bug on this, I think the behavior should be consistent when you change those system settings.


Just generate a checksum for both DVD's and if they have the same checksum then they contain the same data. If you only want to compare the two disks, then the md5sum /dev/cdrom command is enough, run it for both disks. If you want to compare them to the genuine iso, then you will have to read the more detailed instructions.

Why this method is better than simply cmp-ing the mounted directories:

cmp can only tell whether the 2 disks are identical, it won't help in telling whether they are genuine, whereas md5sum helps in the latter case too.
Comparing the block device files are a much simpler command, than comparing the mounted folders.
Checksum comparison can be done with only 1 optical drive, whereas comparing by cmp needs 2 optical drives.


No Low battery notification on Ubuntu 18.04

Yes, the gsettings are ignored.
I've tested this on Ubuntu 18.04 LTS and 20.04 LTS:

Edit /etc/UPower/UPower.conf (case sensitive)
Follow with: sudo systemctl restart upower


How to update php without breaking dependencies [Lamp]

If you want to make sure everything goes fine then you could use phpfarm

I once did that for a specific application and after setting up php 7.0.0, i encountered some errors with phpmyadmin that were not happening in php5

When it comes to extensive testing of a complex application, it may also prove useful to have both versions available at different ports/hosts. This tutorial describes a way to do that.


Errors processing thinkfan package any time I try to install or run an upgrade

I just solved it , if someone is having the same problem , its related to thinkfan , a software, just run:

 sudo apt-get remove thinkfan

and everything will work as before !!


Is there a global shortcut to access the application preferences of an active application?

That's not really possible since it would require all applications to follow the same guidelines for using shortcuts. And obviously they do not.

Most programs will get you to preferences with alt + e but the next letter is different in various programs.
Some examples ...

You get to preferences for Nautilus and Firefox with alt + e, n (prefereNces). P is for Paste but the letter seems to be different since f looks available)
If you want to reach preferences on Chrome it is alt + e, s (for Settings) and then shows you the inline settings from the icon in Chrome. The P accesses Paste (Preferences does not have a letter and you might even consider this a bug: the text should have been named Settings).
Shutter on the other hand has alt + e, p (Preferences).
Terminal is even more weird: it uses alt + e, o for prOfile preferences.
Preferences in USC is called Software sources.

You might be able to track down all the text segments in the software but that would be time consuming and temporary: the 1st time you update you might overwrite all your changes. The path you can take to get what you want could be to file bugs against alle applications that do not use for instance the method Nautilus and Firefox use. Seems impossible to me to get done.


If you look carefully, can you see the logon dialog on the black screen?  I've had a similar issue with this chipset and is was down to the screen backlight not illuminating.

If this is the case, then at the initial grub boot loader, select the kernel that you intend to boot (probably only one of those if this is an initial install) and press 'e'.  This allows you to edit your boot options.  Scroll down to the line that begins with 'linux' and press the 'End' key (or use the cursor keys to move to the end).  Add a space followed by 'acpi_backlight=vendor' (no quotes, single underscore between acpi and backlight) and boot by pressing F10 or Ctl-X.

Hopefully, that will work.  If so, you need to edit your boot configuration to make this permanent.


This happens to me occasionally.

Running iwlist wlan0 scan solves the problem for me.  Replace wlan0 with whatever your wireless device is.


Somehow your driver installation got screwed up which broke the nvidia kernel/Xorg driver combination:

[    20.437] (II) LoadModule: "nvidia"
[    20.463] (II) Loading /usr/lib/xorg/modules/drivers/nvidia_drv.so
[    21.054] (II) Module nvidia: vendor="NVIDIA Corporation"
[    21.054]    compiled for 4.0.2, module version = 1.0.0
[    21.054]    Module class: X.Org Video Driver
[    21.088] (EE) NVIDIA: Failed to load the NVIDIA kernel module. Please check your
[    21.088] (EE) NVIDIA:     system's kernel log for additional error messages.
[    21.088] (II) UnloadModule: "nvidia"
[    21.088] (II) Unloading nvidia
[    21.088] (EE) Failed to load module "nvidia" (module-specific error, 0)

Try purging the nvidia driver:

sudo apt-get purge nvidia-current

If the file /usr/lib/x86_64-linux-gnu/xorg/x11-extra-modules/nvidia_drv.so and/ or /usr/lib/i386-linux-gnu/xorg/x11-extra-modules/nvidia_drv.so still exist, remove them too.

If you have previously installed nvidia from nvidia.com, follow these If you've installed the driver from nvidia.com instructions. Finally, reinstall the nvidia drivers:

sudo apt-get install nvidia-current

Reboot and everything should be working again.

Your laptop has a Nvidia GT 540M card which is most often an Optimus chip. However, it seems that your manufacturer has disabled the Intel iGPU and thereby disabled Optimus. This was detected by Bumblebee and therefore it refused to start at all. However, since this is not checked at installation of bumblebee and the nvidia driver is disabled, your desktop resolution got screwed up because it falls back to the VESA driver. This situation can be remedied by removing bumblebee:

sudo apt-get purge bumblebee bumblebee-nvidia

As a note to other readers, for machines that do not have the iGPU disabled there might be a BIOS option controlling whether the Intel or Nvidia GPU should be used by default.


You can work around this problem by opening a terminal and running

~/.local/share/Steam/ubuntu12_32/steam

After it completes, press the Super key and search for steam, launching the application like normal.

That might do another round of updates, and finally, the steam login window should now be displayed and it seems to work like normal.


Is it safe to install Ubuntu on Samsung Laptop from 2013

It is NOT safe to install Ubuntu on that kind of laptops in UEFI mode.
I tested it not long ago and got the laptop almost bricked.

I had Ubuntu already installed and just wanted to test if the kernel workaround works OK for the well known firmware bug. So I swithched to UEFI mode.

It works partially. It is possible to revive the laptop, if you can find a relevant firmware and find a way to flash it.

It was not a total brick, because it was possible to reflash firmware from the external DVD using Windows and cleaning NVRAM, but still it is not an easy procedure, because Samsung does not provide download links for the firmware and the utilities do not let to flash firmware the same version as it is installed. I made really lots of efforts to restore booting.

The problem is with bad UEFI software that does not comply any standards.

But if you boot in CSM aka legacy mode, you can safely install Ubuntu.

Samsung firmware developers and other people made two many obvious mistakes:

They made a firmware that can be completely broken in UEFI mode from any OS installed. That is unaceptable for many reasons including security. Malware can brick the laptop easily using Windows too.
It is possible to flash firmware only using a Windows utility that checks the installed virsion and downloads firmware from Samsung sites. No direct download links.
Support of some models has been dropped and even the Windows utility does not find anything to flash now.

It is more funny that I bought a NP300E5X without Windows pre-installed. And it is not possible to restore firmware without having Windows.

But the hardware is good. And it is well suported by Linux.


How do I remove Apache2's default index.html file?

The quickest way is to run the following command from the command-line terminal:

sudo rm /var/www/html/index.html

The default location of that file is /var/www/html/index.html
The rm command is used to delete a file.
sudo is used to give the root permisions to delete this file, as there is a good chance your user is not a member of the correct group.


Did you configre you php.ini to include imagick.so? find the php.ini files thats used and add extension=imagick.so to the end or in your extensions section


How to boot Ubuntu Cloud image using QEMU

The cloud-init config format is a bit more structured than what you used.
And the minimal change to your case is to recognize that the leading #cloud-init isn't optional.

Your question is pretty close to this or this example, so I recommend to get your remaining details there as needed.