GRUB install to wrong partition has broken Windows startup

Choose the MBR (master boot record). That's the default choice, and it's the only choice that makes sense in >99% of installations.

If your system can't boot now, insert the installation CD/USB and repair the bootloader.

Then you'll need to repair the Windows bootloader (the bit at the beginning of the Windows partition) as well. On older versions, the command to run was sys c:; I don't know if that's still true.


I am not sure what is the use case but you could simply do:

cp abc.txt abc.txt.bak && sleep $((60 * 60 * 6)) && rm abc.txt.bak

&& is short-circuit evaluation operator, the command after it will only be run if the preceding one exits with exit status 0
cp abc.txt abc.txt.bak makes a backup of abc.txt with a .bak extension i.e. the backup is named abc.txt.bak (modify this to meet your need)
sleep $((60 * 60 * 6)) sleeps for 6 hours i.e. 21600 seconds
rm abc.txt.bak removes the backup after the slept time

You can leverage brace expansion for brevity, if you want:

cp abc.txt{,.bak} && sleep $((60 * 60 * 6)) && rm abc.txt.bak

Or as (GNU) sleep supports h suffix for indicating hours (thanks @muru for the reminder):

cp abc.txt{,.bak} && sleep 6h && rm abc.txt.bak


How to use Octave from repositories with OpenBLAS compiled on my computer?

I would recommend to start with all the stuff from Ubuntu repository.
First thing to try is to install libopenblas-base package and allow it to provide BLAS and LAPACK alternative, as simple as:
sudo apt-get install octave
sudo apt-get install libopenblas-base

Using our test script we have the following timings for Octave on my i7-3537u:

0.42 s -  with simple default libblas3, liblapack3
0.26 s -  with libopenblas-base from repository

If you want to optimize it even more - compile the OpenBLAS locally by:
sudo apt-get build-dep libopenblas-dev

cd /tmp
apt-get source libopenblas-base
cd openblas-0.2.20+ds
DEB_CFLAGS_SET="-march=native -mtune=native" DEB_CFLAGS_SET="-march=native -mtune=native" dpkg-buildpackage  -uc -us -j8

sudo apt-get install ../libopenblas-base_0.2.20+ds-4_amd64.deb ../libopenblas-dev_0.2.20+ds-4_amd64.deb

And this will change benchmark results to:

0.25 s -  with libopenblas-base self-compiled

So it is not useful to compile the optimized library with additional manual optimization.

Conclusion: I'll recommend to optimize your Octave code first by avoiding for-loops and using vectorized functions as much as possible. This will increase performance tremendously.


Is it possible to still get updates on Ubuntu 12.04?

The only way to still get ongoing (security only) updates to 12.04 is to enroll in the Ubuntu Advantage program for your 12.04 boxes.  (There are minimum numbers of "licenses" you have to purchase, however, which means you need to be willing to pay a lot for these services).

This is the only way to get the Extended Security Maintenance for 12.04.  Details can be found on Canonical's site.

Without Ubuntu Advantage, you will not get 12.04 ESM updates.  (However, 12.04 questions will remain offtopic here on Ask Ubuntu - ESM is a Canonical offering, so support will have to come from them)

In many cases, you're probably just going to want to upgrade rather than pay for the support, as in some cases the cost is prohibitively expensive.


How can I set custom ringtone for a single contact?

Open the Phone app. It's on your phone's home screen, and has a phone icon.
Tap Contacts.
Tap on the contact you want to assign a specific ringtone to.
Tap Edit. It is located in the upper-right corner.
Tap Ringtone.
Tap Add from device storage (optional).
Tap the ringtone you'd like to set,
Tap the back button.

Good luck....


Adding multiple text lines with 'convert'

The problem in the command above is that there is a space after the first continuation character, making it a normal backslash.

You can suspect this noticing that the backslash character is interpreted by convert, when it should not even see any continuation char (the shell take care of it).

You must be sure that the newline is immediately  after the continuation \ to have it working.


I had the same problem once. I think the only solution is to request a data recovery. (At least it was the only one I found!)
You can contact the support team:

https://one.ubuntu.com/help/contact/

Explain to them the same situation. One of the admin. can recover most of your files.

I don't know why this happen, but is a huge bug they should fix soon.

Take care,
Seb.


svn, ssh: Connection refused most of the time; other computers can connect

You might be connecting from the network with port 22 closed. Try for example to connect from 3G network or some kind of.


get current hard disk read write in ubuntu and make log file

You can use iostat.

sudo apt-get install sysstat

Ex:

iostat -d 2 /dev/sda


It seems to me that you do not know how to use git so forget this link http://pastebin.com/gxEcj4wu

Just download this script as keyboard:

curl http://pastebin.com/raw.php?i=PrPYW6SA  > keyboard

Then:

sudo bash ./keyboard
setxkbmap -query -verbose 10


Why does the "monospace" font look great in Terminal and gedit, and terrible in IntelliJ IDEA?

I have the same problem. Apparently its a problem with the "hinting" level of the font, which IntelliJ forces to "full" no matter what the OS selects. This makes the fonts look jagged and thin rather than how its supposed to. There was a workaround I saw on a website, but it didn't work for me.


First, add Y PPA Manager's PPA:

sudo add-apt-repository ppa:webupd8team/y-ppa-manager

Then, install it:

sudo apt-get install y-ppa-manager


To install VLC from the Ubuntu repositories, open your terminal by pressing Ctrl+Alt+T and type:

sudo apt update
sudo apt install vlc


How do I copy files from the windows file system to the Ubuntu file system on Windows 10

Below is a sample Bash script to copy files from my Windows partition to my Ubuntu partition.

#!/bin/bash
# Executed from /etc/anacrontab
# http://www.thegeekstuff.com/2011/05/anacron-examples/

cp -f -R -L -p
"/media/windows/Users/Stephen/My Documents/Access" /home/steve/Computer/ms_windows_backup/

chown -f -R steve:backup /home/steve/Computer/ms_windows_backup

Evidently my code line begging with "cp" is too long to be displayed properly. While it appears as two lines above, it should only be one line. The actual sample had other Windows directories, but they were also truncated so I left them out.


Ubuntu 14.04 loads to purple screen on Lenovo G505s. nomodeset wont work

I happen to own the same model and ran into the same problem.
I have tried everything starting from editing grub, installing different kernels, trying proprietary drivers, converting to efi partition, booting with battery ejected.

After 6 months of trying, I find it weird to say that what solved problem was moving network boot to top of boot order (with BIOS in legacy mode).

Yes it sounds crazy but it works now. Flawlessly. Every time.


I have grub installed twice, what will happen if I remove the 1st install?

The files your current grub uses are on the SUSE partition, so if you remove that partition, grub will fail.  Rather than jump off the cliff, just run Ubuntu, and install grub from there

sudo grub-install /dev/sda

That will then have grub using files on the Ubuntu partition, and you may freely remove the SUSE partition.


Press and hold Alt or Super (depends on window manager) key – then you should be able to drag the window at other points than title bar.


To answer my own question:
I tried rebooting with the card in,and it worked.
I also ran apt-get update && apt-get upgrade -y
Seems to bug in the kernel
Hope it is fixed in next update.


Dual boot ubuntu 14 &16. uninstall 16 and reinstall?

You can boot your 14.04 installation and mount the drives from the 16.04 install to recover your files. Then I would just reinstall 16.04.


Adding IP address to OpenVZ VPS (OpenVZ Web Panel)

OpenVZ is adding a new vmnet0 interface.

If those address are routed to your server IP address as a subnet You just have to enable routing in kernel.

If those address are on the same subnet as your server IP You have to create a bridge of this interfaces (venet0 and eth0).

I wrote that in polish but commands are the same :)

http://www.dobreprogramy.pl/okokok/How-To-Serwer-VPSow-na-OpenVZ-i-SolusVM-w-VMWare-Workstation-cz,37584.html

edit: Those address are in the same subnet as eth0. Don't add those address to eth0. Just create a bridge of eth0 and venet0.

edit2: Sorry, commands in my article are for CentOS :(

It's for Debian and Ubuntu: http://wiki.debian.org/NetworkConfiguration

You would have to install bridge-utils.


Ubuntu 11.10 monitor suspend glitch help?

You are being "helped" by the Power Manager, which runs when you enter or leave Suspend or Hibernate. Run dpkg -L pm-utils to see the files in the Power Manager package. pm-utils has a bunch of files dedicated to "video quirks". Maybe your monitor is listed, maybe you'll get to add it. Since I don't know what kind of monitor you have, I can't say.

When you suspend, the monitor's video signal goes away when your video card is powered off (does the monitor power off, too?) . I guess the picture is a mismatch between what your monitor expects to see when the video signal comes back, and what your video card sends.

What do you have to do to fix the display? Cycle power on it?


Nautilus statusbar visibilty - Quickly check free space

Good ol' right-click an empty area in Nautilus, then select Properties.


I am running Ubuntu on a D610 (1024 MB RAM, 8 GB original HD) which would no longer boot Windows XP, only go to BIOS setup. With Ubuntu it boots perfectly from the USB drive, and I followed the instructions here.

If that doesn't work your problem is beyond my experience.


Why is Disk Utility (Palimpsest) the default and not GParted?

A while back I've read somewhere on the net that Disk Utility (Palimpsest) is a udisks graphical front-end included in the gnome-disk-utility package, that gives the opportunity to set up an encrypted partition easily, with a couple of clicks, whereas with GParted you need to use the cryptsetup command line tool.


How do I configure Grub to boot a 2nd Linux OS on a 2nd hard drive in PC Environment

You are able to login to Ubuntu Server as well as Cent OS. So here are some of the steps:
Login into Ubuntu Server and then configure grub/boot-repair. You need to start the terminal(Ctrl+Alt+T)

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

Essentially this will fix your problem. If not please share the pastebin contents.
Make sure in your Desktop BIOS your first device to boot is your first hard drive which contains Ubuntu Server.

You might need to refer to boot-info also to debug this issue if needed.

sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update
sudo apt-get install -y boot-info && boot-info


Do I also need to set up another iptables rules for ipv6 if I just used iptables?

iptables works for IPv4, but not IPv6.  ip6tables is the equivalent IPv6 firewall, and is installed with iptables.

Ultimately, though, iptables is for IPv4 connections, ip6tables is for IPv6 connections.  If you want your iptables rules to also apply to IPv6, you have to add them to ip6tables as well.

If you try and replicate your iptables ruleset in ip6tables, not all the rules that iptables can do will port over neatly to ip6tables, but most of them will.

Refer to the manpage for ip6tables if you want to make sure the commands that you use in your iptables will neatly port over.

If you'd like, we can help you create equivalent ip6tables rulesets to match your iptables rules, if you provide your firewall rules list (removing any information that could identify the system of coruse).  Otherwise, we can only answer your general question.


init setting error: restore-uuid is wrong

The file is located at /etc/initramfs-tools/conf.d/resume.

In terminal...

sudo blkid | grep -i swap # note the UUID of the swap partition

sudo -H gedit /etc/initramfs-tools/conf.d/resume # edit the file

RESUME=UUID=071f8b0e-8e16-4f4d-90ff-a4ae9cc56e2b

* edit with correct UUID of swap partition from blkid command

sudo update-initramfs -u # update the /boot/initrd.img file


White dialog windows in dark theme, Ubuntu 19.04

The dialog you are seeing is themed according to your current Gnome Shell theme, not according to the current application theme.

By default, the gnome shell theme is dark, black. That you have a white dialog tells me you have a custom Gnome Shell theme active. You will need to change that to a dark theme.

Because you appear to have a custom Gnome Shell theme, I suppose you know how to set and change a Gnome Shell theme.


dependency errors after installing hedgewars

Try running: sudo apt-get clean followed by sudo dpkg --configure -a and then finally sudo apt-get -f install


ubuntu 12.04 acer display not proper 16:9

The final release is April 26th. The kernel freeze is 5th. You might get lucky after the 5th an update. That may take care of your issues.

Currently 12.04 is a beta release. Use it as is.


How to run application under different user

You could try gksu -u rather than gksudo. 'gksudo' implies the need for an 'administative' password.
'gksu' is 'switch user' and will ask for User2's password.
 You'll probably run into permissions issues since the displayed desktop belongs to User1.


As Ubuntu is converting away from sysvinit to upstart, I'd suggest that you convert your script to an upstart job in the /etc/init/ directory instead. The man page is man 5 init.

There are setuid and setgid items to set the user and group under which the upstart job is run.

Assuming your script execs another script, I suppose you can add the su userid command to it to change the effective uid and gid to that of its argument. I'm uncertain whether its safe to run su in the sysvinit script itself without it changing these for subsequent /etc/init.d/ scripts, but perhaps that's OK, too.


For those that have stumbled on this post, my issue ended up being some form of fault with Compiz.

If Compiz was running, performance was greatly reduced in 3D applications such as games. My solution was just to change window manager/desktop environment. I discovered this with the help of TechZilla in a seperate post here


Disabling One-Finger Tap-to-Click But Keep Two-Finger tap Ubuntu 12.04

synclient TapButton1=0

TapButton1 means 1-finger tap.
0 means do nothing.


sudo apt-get remove slack

This can help you by removing slack from your machine and then try re-installing it. Though I think it won't effect you that much!! Correct me if I am wrong.


How to detect duplicates of photos (even if the duplicate is of lower resolution) and how to keep only the higher-res copy?

I had the same use-case, and I wrote up a nifty little script to achieve that end.
Have a look if this Python script helps you too:
https://github.com/AnirudhKishan/DeleteVisuallyRedundant


adb not detecting my device even if USB debugging is enabled and phone is rooted

This may not be the only problem, but you will most likely need to update to version 1.0.32 to succeed.  See this question.


Does this answer work for UEFI computers?

If you have EFI, then there will be an EFI System Partition (ESP) on the disk. This partition has to be mounted on /boot/efi, so that GRUB can use it. The partition:

is formatted FAT32,
is usually small (100MB < size < 500MB)
will have the boot flag enabled
contains an EFI folder
could be labelled EFI by the OEM, but no guarantees

I don't have one on hand, but you can see examples of how such a partition will look:

Super User post about creating one, with parted -l output:

Unix & Linux post, also about creating one, with a GParted screenshot:

So, the task here is, somewhere around steps 3 & 4:

Find the ESP
Mount it:

sudo mount /dev/sdXY /mnt/boot/efi

Then you can proceed with your usual answer. I have done it myself. Consider it similar to mounting a /boot partition if you have one separate.

You can mount it anywhere you like. In that case, just specify the mount directory to GRUB while installing:

grub-install --efi-directory=/foo/bar /dev/sdX


Permanent bind key for Terminal to drop-down

Technically speaking: DROP DOWN TERMINAL

Adds a terminal available from anywhere.

In Ubuntu Software I found 4 apps after typing "drop-down".

Drop Down Terminal as Gnome extension
Yakuake
Tilda
QTerminal

I chose Tilda, because I can configure copy and past shorcuts.

There is some old answer with the same problem:
Focus existing terminal with Ctrl-Alt-T shortcut
How to programmatically switch to a specific window in compiz?


I think what you are looking for is to use nautilus (that's the name of the default file manager in Ubuntu) as a root user. Although it is not advisable (especially for novice users), it is still possible to do it. Open up a terminal (Ctrl+Alt+T) and type

gksudo nautilus

Alternatively, you can type in the following lines in the terminal window

sudo su
nautilus

Enter your password when it asks for it.

This allow you to run Nautilus with root privileges. So you can now freely edit your files using the GUI instead of the terminal. I still don't see the need for it and I cannot emphasize enough on the potential risks involved. Don't blame me if you break your system using this method. You have been warned!


"curl : Depends: libcurl4 (= 7.61.0-1ubuntu2.2) but it is not going to be installed" on Ubuntu 18.10 with PHP 7.2.10

SIMPLE SOLUTION: (worked for me)

sudo apt remove libcurl4
sudo apt install curl


(kubuntu) Can't Remove KaliTools from system

This (the syntax error) is caused by a Python version mismatch, as the syntax has changed between Python 2 and Python 3. Another user with the same problem had manually installed a newer version of python (version 3.2; the version installed through packages is 2.7) and he redirected /usr/bin/python to python3.2 -- a bad idea.

Restoring the original link of /usr/bin/python to /usr/bin/python2 solved that problem.


Open a Terminal by pressing Ctrl+Alt+T and type the following command:

sudo rm -rf /home/YourUsername/.pulse

or

sudo rm -rf /home/YourUsername/.config/pulse

Be careful to check where is the pulse directory in your home folder. This will remove the PulseAudio configuration files. And then restart your system using:

sudo reboot

I had this problem a time ago and this solved my issue. I see that there are many other users who solved the issue this way, because I made some searches over the Internet.

Or check this link – No sound in Ubuntu except at log in


@Cornelius answer will probably solve your WINE problem but:
BIG FAT WARNING
If I understand correctly, you are trying to run a program that updates your BIOS. If that is the case, YOU CAN ONLY DO THAT WITH A NATIVE PROGRAM.

It will definitely not work on a virtual machine (it will try to update the virtual machine's BIOS, not your real machine's one).

Under WINE will probably fail to run, but it could even run and that could be MUCH more dangerous --- it could fail midway updating your BIOS and then you have a very expensive brick instead of a PC.

You can run the BIOS updater only with the operating system you downloaded it for. If it's Windows, so Windows. Sometime the manufacturer offer a MS-DOS version of the updater, that you can run in a bootable Free-DOS (search google) USB. Sometime no, and you have to ask them.
For example, to update the BIOS of my Samsung Chronos laptop, I had to install Windows in it. Sad.
For additional information see:
https://wiki.archlinux.org/index.php/Flashing_BIOS_from_Linux
and
https://wiki.debian.org/FlashBIOS


Turns out it's a flaky USB port. (Especially annoying that it's the double port on the left side of the laptop. It might just be a loose connection; the ports are pretty roomy.) The port next to the power cord—which I guess I didn't use because it's next to the power cord—works fine and nothing gets garbled. :D


How to add large ranges to UFW in Xubuntu 16.04

The /24 decides the range. If you want to allow all from 111.222.X.Y, use /16: 111.222.0.0/16. This is CIDR notation. In an IP address W.X.Y.Z, each of W, X, Y and Z uses 8 bits (an octect). The /24 is the mask, which decides how many bits of the address, starting from W, is to be considered for an operation. So /24 means the first three octects, W, X and Y. /16 is the first two octects, W and X, and so on.


MySQL: Can only login from command line or as root

Finally, it's the reply, (see comments). I put it here to mark the question answered.
Some special  characters in the password may not be forwarded correctly by php. Try with a regular password (ASCII 7 bit set, no control chars).


12.04 does not shows my windows partions nor my DVD ROM and aslo not my flash drive or phone memory card?

I learned this the hard way. Ubuntu needs all disks to be set to the third option, cable select. I had to set all my disks as cable select to get everything to load up correctly.


Got error during installation of Oracle VM VirtualBox Extension Pack

Virtualbox Extension Pack needs to be installed using root powers according to these bug reports:

Extpack "Error creating textual authentication agent"
ExtPack installation failure
Extpack installation fails

Stack Exchange has the latest installation instructions

LatestVirtualBoxVersion=$(wget -qO - http://download.virtualbox.org/virtualbox/LATEST.TXT) && wget "http://download.virtualbox.org/virtualbox/${LatestVirtualBoxVersion}/Oracle_VM_VirtualBox_Extension_Pack-${LatestVirtualBoxVersion}.vbox-extpack"
https://www.virtualbox.org/download/hashes/${LatestVirtualBoxVersion}/SHA256SUMS
sudo VBoxManage extpack install --replace Oracle_VM_VirtualBox_Extension_Pack-${LatestVirtualBoxVersion}.vbox-extpack
VBoxManage list extpacks


Group permissions allow, but still get permission denied

Did you recently add that user to that group, without logging out/in between? Then "groups" will show the group but the user does not have the group permissions yet.

You can show your effective groups using

$ id

As an example, if I add my user ps to the group fax and then type

$ id

it does not show the group fax, but

$ groups ps

shows fax.

Doing su to your own user gives you the new group affiliation:

$ su ps
$ id

The output now also contains fax.


I fixed with using acpid with the following solution

sudo gedit /etc/acpi/events/lidclose

copy, paste & save

event=button[ /]lid
action=/etc/acpi/lidclose.sh

execute

sudo gedit /etc/acpi/lidclose.sh

copy, paste & save

#!/bin/bash
echo "close" > /home/jesse/close.txt
if grep -q closed /proc/acpi/button/lid/*/state

then
     /usr/sbin/pm-suspend
fi

execute

sudo chmod ugo+x /etc/acpi/lidclose.sh

restart acpi service or reboot


Mouse Gestures Aren't Working on Ubuntu 18.04

I fixed the issue by updating to Ubuntu 19.10.


The VM emulates a graphics chipset. That chipset driver likely can't handle the animations very well without CPU climb, and, thus, mouse lag. I have VirtualBox and experience the same problem on MacOS with Lubuntu 19.04.

Sometimes it's hard to notice that it's the animations doing this. In my case, I was using Pluma and moving my mouse around, and it would occasionally stick. At first, I thought it had to do with VM hypervirtualization, mouse polling rate, or screen refresh rate. That's when I realized that it was animating a scrollbar on and off as I moved the mouse in Pluma. It would also occasionally lag when hovering over Pluma toolbar menus and other visual elements. Once it cached, it sped it up slightly, but then would return a few seconds later if I repeated tasks.

This was my bandaid fix.

Probably a better solution would be for someone to fix the chipset driver to work better with these animations, or change the animation API so that it works better with VM chipsets. However, turning off most of the animations seems to really help me for now. Besides, I use my Linux VM to get work done -- not entertain myself with animations.


Wifi doesn't work on Ubuntu 13.10 in ASUS U32U Laptop

How about

rfkill unblock all

This solves often all rfkill issues.


What's the development package for Qt5 in 14.04

List of all Qt5 developement packages, available on Ubuntu.

Qt module           dev package                         lib package
-------------------------------------------------------------------------
bluetooth           qtconnectivity5-dev                 libqt5bluetooth5
concurrent          qtbase5-dev                         libqt5concurrent5
connectivity        qtmobility-dev                      libqtconnectivity1
contacts            qtmobility-dev                      libqt5contacts5
core                qtbase5-dev                         libqt5core5a
dbus                qtbase5-dev                         libqt5dbus5
designer            qttools5-dev                        libqt5designer5
designercomponents  qttools5-dev                        libqt5designercomponents5
feedback            qtmobility-dev                      libqt5feedback5
gallery             qtmobility-dev                      libqtgallery1
gui                 qtbase5-dev                         libqt5gui5
help                qttools5-dev                        libqt5help5
location            qtmobility-dev                      libqt5location5
multimedia          qtmultimedia5-dev                   libqt5multimedia5
multimediakit       qtmobility-dev                      libqtmultimediakit1
network             qtbase5-dev                         libqt5network5
networkauth         libqt5networkauth5-dev              libqt5networkauth5
nfc                 qtconnectivity5-dev                 libqt5nfc5
opengl              libqt5opengl5-dev                   libqt5opengl5
organizer           qtmobility-dev                      libqt5organizer5
positioning         qtpositioning5-dev                  libqt5positioning5
printsupport        qtbase5-dev                         libqt5printsupport5
publishsubscribe    qtmobility-dev                      libqt5publishsubscribe5
qml                 qtdeclarative5-dev                  libqt5qml5
quick               qtdeclarative5-dev                  libqt5quick5
quickparticles      qtdeclarative5-dev                  libqt5quickparticles5
quicktest           qtdeclarative5-dev                  libqt5quicktest5
quickwidgets        qtdeclarative5-dev                  libqt5quickwidgets5
script              qtscript5-dev                       libqt5script5
scripttools         qtscript5-dev                       libqt5scripttools5
sensors             qtmobility-dev, libqt5sensors5-dev  libqt5sensors5
serialport          libqt5serialport5-dev               libqt5serialport5
serviceframework    qtmobility-dev                      libqt5serviceframework5
sql                 qtbase5-dev                         libqt5sql5
svg                 libqt5svg5-dev                      libqt5svg5
systeminfo          qtmobility-dev                      libqt5systeminfo5
test                qtbase5-dev                         libqt5test5
uitools             qttools5-dev                        ?
versit              qtmobility-dev                      libqtversit1
webchannel          ?                                   ?
webkit              libqt5webkit5-dev                   libqt5webkit5
websockets          libqt5websockets5-dev               libqt5websockets5
widgets             qtbase5-dev                         libqt5widgets5
x11extras           libqt5x11extras5-dev                libqt5x11extras5
xml                 qtbase5-dev                         libqt5xml5
xmlpatterns         libqt5xmlpatterns5-dev              libqt5xmlpatterns5


Ctrl + Space is not working in a terminal after installing Cinnamon

Cinnamon is closely related to GNOME, and there Control + Space is commonly used to switch between key maps for different languages, like US and French.
Take a look at the keyboard setup. There should be a section with a large count of special keyboard options. Somewhere there you can choose another hotkey instead of Control + Space to switch keyboard maps/languages.
If you use just one language, you may just deactivate the function.
The following directions are based on plain GNOME, but it will probably work for Cinnamon too:

The current default virtual keyboard app for GNOME runs at startup and captures Control + Space.
Steps to fix:

Right-click the keyboard icon in the GNOME bar.
Select Configure → Global Config.
Change Trigger Input Method from Control + Space.

From this answer https://stackoverflow.com/a/18924670/3405122


Gnome extensions solely rely on GNOME, as long as they do not make use of OS-dependent features, e.g. an extension using pacman does't work on Debian- and RedHat-based systems.

Your other question was closed as off-topic because this Q&A site is about Ubuntu only. If you're having a GNOME-related problem with your Arch system, the Arch forums may be better suited for you, even if the problem could be reproduced on Ubuntu, too. Or you can ask on Unix & Linux

50% of answers I find to problems with my Ubuntu or Mint come from the Arch forums, so there clearly can be an intersection of answers.


Just edit the greeter-session option in /etc/lightdm/lightdm.conf to the desired greeter.

Open up /etc/lightdm/lightdm.conf with any editor as root. For example sudo nano /etc/lightdm/lightdm.conf then change the line

greeter-session=unity-greeter

to

greeter-session=lightdm-webkit-greeter

If the file does not exist, let it contain

[SeatDefaults]
greeter-session=lightdm-webkit-greeter


"Bricked" my Nvidia driver with newer kernels

I ended up installing Linux Mint (really like their GUI). Now I can run kernel 4.19.9 and have Nvidia drivers + Cuda installed without freezes (just like on Ubuntu before my ventures).

So my solution this time was to reinstall.


cron jobs - difference between editing "/etc/crontab" and "crontab -e"

crontab -e:

Usable on a per user basis; opens the cron table for the invoking user for editing (a temporary file in /tmp/ e.g. /tmp/crontab.<RANDOM>/crontab, as you have seen) and upon saving the content, sanity checkings are done. If passed, the file is moved into /var/spool/cron/crontabs/ i.e. the cron spool directory and saved with the filename being same as the invoking user's name. As the cron table is being saved for the invoking username (e.g. /var/spool/cron/crontabs/foobar, assuming username foobar); as all cron jobs are run as that user so no username field is needed, each entry here needs 6 fields (you know these already i presume)

/etc/crontab:

This is the system cron table (crontab file), there is no notion of invoking user here as only superuser can edit this file, do this file needs 7 fields, with an additional username field at space/tab separated 6th field. This is true for all cron files in /etc/cron.d/ too. Another difference with crontab -e is that you need to open the file as an argument to an editor or any program/shell that can do I/O whereas with crontab -e the file would be open with the editor mentioned as VISUAL or EDITOR or /usr/bin/editor -- the first one wins.

Why your command failed inside cron:

Because shutdown can only be run as superuser or capable users, and the invoking user presumably does not fall into that category. You can put the in root's crontab by sudo crontab -e or put it /etc/crontab, i usually always prefer individual user tables.

Notes:

Also cron uses a minimal PATH by default, and also SHELL is set as sh (dash in Ubuntu); these two are common cron pitfalls.

While debugging, always check syslog, and redirect relevant command's STDOUT and STDERR to a file for analyzing later.


Which Version of Ubuntu to Install on old 2008 intel atom netbook (acer)

if you're looking for full performance with up to date, you should select xubuntu.

ubuntu 14.04 would work fine but there might be some lags if you're using hdd as well. for example i have an acer aspire 5710g with coreduo cpu and hd2300 gpu from 2007(i think) however it was just a lag machine with hdd so i got a ssd for $70 and installed 12.04 LTS in that (i love unity gui)

and i assume you're using aspire one, xubuntu 14.04 or ubuntu 12.04 LTS would be best for you. Intel Atom is an slow cpu.


HardDrive Partitions to install Ubuntu together with W7

You should not (usually even can not) create any partitions for Ubuntu in Windows. Just give it a bit of unallocated space and the installer will set it up properly.

Inside the Ubuntu installer, you (or the installer automatically) will create a root partition (format as ext4 and select: "Use as /") and a swap partition (format as linux-swap"). That is enough, you could even omit the swap partition (but it's not recommended to do so!).
You can also create a separate home partition (format usually as ext4 and select: "Use as /home") for the users' personal data and configuration, which makes reinstalls and backups a bit easier. Otherwise that directory is included in your root partition /.

You will be able to mount and access all your NTFS partitions from Ubuntu, but the other way round, accessing Ubuntu's ext4 partitions from Windows, will not work. Note that writing files from both Windows and Ubuntu to the NTFS partitions might lead to permission problems...


Why don't product specifications even mention Ubuntu / Linux?

as far as I understand, they don't add ubuntu / linux to the list mean that they don't officially support it.

By officially supporting ubuntu / linux mean that they will have to answer every support question. This off course will add cost to their operation, given the range of ubuntu / linux configurations.


Ubuntu 12.04 Will Not Use Cloud Archive Packages

I found the solution thanks to this question: Assign highest priority to my local repository

Basically the standard precise-updates repos were getting assigned a priority of 990, which was well beyond the default priority of 10 that the cloud-archive received. So, a quick adjustment to pin the cloud archive with a priority of 1000 and the right package now installs.

In case anyone runs into this again, first check the output of apt-cache policy keystone to see what your version priorities are:

root@cloud:/etc/puppet# apt-cache policy keystone
keystone:
  Installed: 2012.1.3+stable-20130423-f48dd0fc-0ubuntu1.1
  Candidate: 2012.1.3+stable-20130423-f48dd0fc-0ubuntu1.1
  Version table:
     1:2013.1.2-0ubuntu2~cloud0 0
         10 http://ubuntu-cloud.archive.canonical.com/ubuntu/ precise-updates/grizzly/main amd64 Packages
 *** 2012.1.3+stable-20130423-f48dd0fc-0ubuntu1.1 0
        990 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
        990 http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages
        100 /var/lib/dpkg/status
     2012.1-0ubuntu1 0
        990 http://us.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages

After adjusting my pins, the output now looks like this:

root@cloud:/etc/puppet# apt-cache policy keystone
keystone:
  Installed: 1:2013.1.2-0ubuntu2~cloud0
  Candidate: 1:2013.1.2-0ubuntu2~cloud0
  Version table:
 *** 1:2013.1.2-0ubuntu2~cloud0 0
       1000 http://ubuntu-cloud.archive.canonical.com/ubuntu/ precise-updates/grizzly/main amd64 Packages
        100 /var/lib/dpkg/status
     2012.1.3+stable-20130423-f48dd0fc-0ubuntu1.1 0
        990 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
        990 http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages
     2012.1-0ubuntu1 0
        990 http://us.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages


How to switch between tabs with keyboard?

Ctrl+Tab to cycle tabs (also: Ctrl+T = open new tab, Ctrl+W = close tab) is now being implemented in many applications that use tabs:

internet browsers like Chrome, Firefox, Opera,
file managers (Nautilus, Nemo, Dolphin, PCManFM),
also Audacious, Clementine, Adobe Reader, Pidgin, Qbittorrent, WPS Office suite.


I can think of three ways:

LVM. Use LVM-based partitions so that the home partition "spreads" across both hard disks. I haven't used LVM, so I don't know how to do it, but I do know it is capable of doing it.
Make partitions on the second hard disk and mount them on /home/user/Documents etc. This is what I do now. My /etc/fstab contains:

#-> sda6
UUID=... /home/muru/Downloads ntfs-3g   rw,exec,uid=1000,gid=1000,umask=022 0   0
#-> sda2
UUID=... /home/muru/windows ntfs-3g rw,exec,uid=1000,gid=1000,umask=022 0   0
#-> sdb1
UUID=... /home/muru/devel   ext4    defaults    0   0
#-> sdb5
UUID=... /home/muru/downloads   ntfs-3g rw,exec,uid=1000,gid=1000,umask=022 0   0
#-> sdb8
UUID=... /home/muru/var btrfs   compress,defaults   0   0

You'll have to chown the partitions once after you mount them for the first time, but otherwise it's no problem.
Make partitions on the second disk and set your XDG variables to the mount points of these partitions. Put in ~/.config/user-dirs.dirs something like:

XDG_DOWNLOAD_DIR="/media/Downloads"
XDG_DOCUMENTS_DIR="/media/Documents"
XDG_MUSIC_DIR="/media/Music"
XDG_PICTURES_DIR="/media/ictures"


Can I use Ubuntu One Icons for 3rd party thingy?

We (U1) are working on some brand guidelines to provide icons and so on which can be used. Keep an eye on http://one.ubuntu.com/developer for details.


can't find optimal resolution for external screen

Im pretty sure you might or might not need it now, but this is for anyone else having this problem.
This worked for me. Like someone said in in the comments, im using xrandr

xrandr | grep maximum &
sleep 2
gtf 2560 1440 60.0 &
sleep 2
xrandr --newmode "2560x1440_60.00" 311.83  2560 2744 3024 3488  1440 1441 1444 1490  -HSync +Vsync &
sleep 2
xrandr --addmode DP1 2560x1440_60.00 &
sleep 2
xrandr --output DP1 --mode 2560x1440_60.00 &
exit 0


try to run your program with pulseaudio suspended - like this:

pasuspender -- yourprogram

and record a sample.

If it works better, it might be a problem related to the pulseaudio-alsa communication.


This happened because of FreeDB CDDB downing:

freedb.org and its services was scheduled to be shut down on March 31 of 2020. As of May 28, 2020 the site was still operational.
On the 13th of June 2020 it was observed that the URL used for lookups, freedb.freedb.org, no longer resolved to a host name and as a result the service no longer appears to operate.

You have to try switching Asunder to GNUDB:

Open Asunder
Select Preferences
Navigate to Advanced tab
In CDDB area change server from freedb.freedb.org to gnudb.gnudb.org
Retry CDDB Lookup with Audio CD inserted

For RipperX do the following to switch it to other CDDB site:

Open RipperX
Click Config
Navigate to CDDB tab
In CDDB Configuration are change URL from freedb.freedb.org/~cddb/cddb.cgi to freedb.dbpoweramp.com/~cddb/cddb.cgi
Retry CDDB retrieval with Audio CD inserted.

I have checked both above servers with CD disc dated 1994.

Notes: there is 3rd alternative with port 80 - http://us.cddb.com/~cddb/cddb.cgi.


I suggest to do the following:

sudo apt-get install biber texlive-lang-cyrillic \
             fonts-cmu texlive-xetex texlive-fonts-extra \
             font-manager ttf-mscorefonts-installer

Here font-manager and ttf-mscorefonts-installer are not really needed.

With these dependencies I'm able to make LaTeX documents from RMarkdown on Ubuntu 16.04 LTS.

According to Ubuntu packages lassdc10.mf is contained in texlive-lang-cyrillic package on 17.10.

UPDATE 1: I tried to build PDF from RMarkdown from Ubuntu 18.04 LTS (beta of course) and it works as expected.

My LaTeX preamble is

\usepackage[main=russian,english]{babel}
\usepackage{fontspec}
\defaultfontfeatures{Ligatures={TeX},Renderer=Basic}
\setmainfont[Ligatures={TeX,Historic}]{Times New Roman}
\setsansfont{CMU Sans Serif}
\setmonofont{Courier New}
\usepackage[fontsize=14pt]{scrextend}

You can try it on your 17.10.

UPDATE 2: I found nice simple beamer example on this TeX.StackExchange answer with Russian text. It compiles normally on 16.04 LTS, 17.10 and 18.04 LTS.


xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Two-Finger Scrolling" 8 1
xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Scrolling" 8 1 1
xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Pressure" 32 10
xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Width" 32 8

The above work for me. It is not persistent accross reboots, so I set up a script to enable multi touch every time Ubuntu boots


Server tries to connect to other servers

i've discoverd the issue. We were hacked and a user made attempts on other servers.

They used a vulnerability in the Nagios configuration that allows the "nagios" user to make logins. We disabled logins for this user and killed the process that was making the attempts


If you get this error, you likely need a couple of modules, as noted in a comment above. If you want the changes to be permanent, you'll need to load the modules from /etc/pulse/default.pa. Add the following lines to the bottom of the file:
load-module module-equalizer-sink
load-module module-dbus-protocol

You can trigger the changes to take effect immediately with pulseaudio -k.


Ican't update/upgrade with apt or apt-get

Whenever you are unsure what may be the problem with apt or apt-get you can check the log files for the details. This is rather a general answer, but it should provide you the clue.

By default apt-get (apt) logs can be found in /var/log/apt/term.log, if you haven't set otherwise in the apt-get configuration file.

You may also look in other logs files like /var/log/apt/history.log.

File /var/log/dpkg.log is also valid to check because apt-get is based on dpkg.


How can I delete a multi-line record from a text file?

The format of your file has two consecutive newlines (\n\n) between each record:

First Name: Elvis
Last Name: Presley
Phone Number: 123456
Address: 12 lonely street
Email: theking@graceland.com

First Name: BB
Last Name: King
Phone Number: 7891012
Address: 11 blues lane
Email: bbking@lucille.com

You can use this to identify a record and remove it in your script. For example, this perl command will remove Elvis's entry from the above file:

perl -000 -ne 'print unless /Elvis/ && /Presley/' test.txt

Explanation:

The -0 sets the input record separator. Setting this to 00 (with -000) activates 'paragraph mode' where Perl will use consecutive newlines (\n\n) as the record separator. In other words, a "line" is now defined
The -n means "read the input file line, by line and apply the script given with -e.
print unless /Elvis/ will print all lines that contain neither Elvis nor Presley. Since a "line" is now defined as a block of text separated by two newlines (\n\n) because of the -000, this will remove Elvis's entry from the file.
The i in the match operator (//i) makes the match case insensitive so that both Elvis and elvis will work. You can remove it if you don't want that.

Integrate into your script

To make this work with your script, we need another step. Perl has the special %ENV hash which holds the environmental variables currently defined. For example, $ENV{HOME} is your $HOME directory. To add a bash variable to this hash, you need to export it. So, what you can do is edit the b block of your script to export the variables and to use the perl script from above:

"b"|"B")
ok=1
echo -e "[Remove a contact]"
echo -n "First Name: "
read first
echo -n "Last Name: "
read last

## export the variables, to make them available to the `perl` script
export first
export last
## remove the entry from the file and create a backup
perl -000 -i.bak -ne 'print unless /$ENV{first}/i && /$ENV{last}/i' ./contacts_firstname

$ENV{first} will be $first and $ENV{last} will be $last.
The -i.bak means "edit the original file and create a backup copy called filename.bak". In other words, the perl command will delete the entry from contacts_firstname and create a backup of the original file called contacts_firstname.bak.

If you don't want a backup file, just use this instead:

perl -000 -i -ne 'print unless /$ENV{first}/i && /$ENV{last}/i' ./contacts_firstname


vim error_log at 95.5% cpu and 55.0% ram!

A very large file is being opened with vim, a text editor. To stop vim, kill it (PID taken from the second column of ps aux):

kill 11905

When checking log files, I suggest you to use less instead as you do not need fancy editing features:

less error_log


Triple boot OSX, Win7, Linux - broke my Win 7 install

OK I finally figured this out - this is probably just as relevant for Ubuntu users as it is for any Linux distro so I'll give my solution here should anyone else have the same issue.

The fix was simple.

boot into OSX
modify /EFI/refind/refind.conf to enable gptsync (showtools gptsync)
reboot back to the refind boot menu
choose "Start Hybrid MBR tool" and allow it to alter the MBR to what it detects
rejoice that your windows partition now boots once again.

At step (2) you need to uncomment the modify the 'showtools' line (uncomment or add as needed) to list:

showtools gptsync

Now, I just need to work out how to have 1 entry for my Fedora boot item instead of the 5 that rEFInd finds and shows.


How can I avoid maximum brightness settings upon every boot?

I had a problem like this (the brightness was all the way down on startup) and this is how I solved it.

Your brightness settings are just a flat file with a single number in it.
It is probably one of these files, but you might have to do some checking to make sure.

/sys/class/backlight/acpi_video0/brightness

/sys/class/backlight/intel_backlight/brightness

Try running this in the terminal (change file name as appropriate)

echo 3 > /sys/class/backlight/intel_backlight/brightness

What I did was create a cronjob using the special word @REBOOT to run this command whenever the computer started.


Ubuntu 13.10 installer/live fails to boot from USB with exfat partition

I personally find that the best way to create a Ubuntu Live USB is to use Unetbootin. You can download it here:

http://unetbootin.sourceforge.net/

SOURCE: I'm typing this from Ubuntu running on a USB that was created with Unetbootin ;)


Getting dwa 123 Dlink wireless usb adapter working

Type the following code in the console

sudo apt-get install git build-essential
git clone https://github.com/lwfinger/rtl8188eu
cd rtl8188eu
make all
sudo make install

remove previously manual installed modules
 eg:- sudo modprobe -r rtl8192cu

sudo modprobe 8188eu

Unplug , re-plug you should get going.

Tested on Dlink DWA-123  rev D1
Speedtest results : http://www.speedtest.net/my-result/3477686124


why am i getting ' event processing lagging behind' msg in Ubuntu 20.10

That error message is not from the kernel, and is somewhat misleading. It isn't even really an error, more a warning. Some think that it should say:
your compositor is too slow

instead of
your system is too slow

Ignore it.
References:
https://forums.gentoo.org/viewtopic-t-1117556-start-0.html
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=968093


Resize large images with mogrify (ImageMagick) but leave small images unaffected

Try
mogrify -resize '1280x1024>' *.jpg

Do make sure to back up though.


Why is hibernation so complicated on Ubuntu (and other Linux distributions)?

Hibernation is not an easy thing to implement. As a matter of fact, Apple didn't implement hibernation on their Macs until 2005 (source), 5 years after Windows ME officially introduced hibernate in 2000, although Windows 95 and 98 supported it if the manufacturer provided hardware-specific drivers (source).

Basically, the way hibernation works is the kernel puts all process to sleep, dumps the contents of the RAM onto the disk, and then turns off the computer. Then when the computer is turned back on, the contents of the memory dump to disk is reloaded back into the RAM, and then the processes are awakened again.

This whole procedure is fraught with problems. For instance, what happens if the computer is hibernated when the filesystem buffer is not synced with the disk, and then you boot another OS when starting the computer back up? Well, that's how you get the "NTFS partition is in an unsafe state" error when dual booting Linux with a Windows install that was either hibernated or had "fast startup" enabled.

To make matters even more complicated, while the current implementation of hibernate on Windows creates a hiberfile.sys file on your C:\ drive to store the memory dump, the current Ubuntu implementation of hibernate needs a swap partition. However, as the configuration of the swap partition is dependent on the user's choices during install, some users might create a swap partition not large enough to hold the RAM dump, or others might choose to not use a swap partition at all!

Another thing to consider is that hiberation can take a long time. This is especially true if you have a beefy computer with lots of RAM. For instance, I have 24GB of RAM, and assuming a constant dump rate to disk at 120MB/s, it would take over 3 minutes to perform hibernation. Not to mention, resuming would take equally long. At that point, it would take an equal amount of time to shut down and restart.

Now of course, hibernation and resume from hibernation would be a lot faster if you have an SSD. However, dumping 24GB to your SSD repeatedly will not do great things for its life expectancy, as the NAND flash in the SSD can sustain only a limited number of program-erase cycles before it starts to degrade.

Overall, I think the answer as to why hibernation on Ubuntu is so complicated can be summed up as follows:

The actual technical process of hibernation and resume is very complicated and "there be dragons there"
It's not a feature in very high demand (e.g. I think a lot of other people, like myself, would like to see, for instance, Wayland (replacement for X11) finished rather than have hibernation.
I'm guessing a little bit here, but I'm going to go out on a whim and say that the drivers for GPUs and other devices probably have to be specifically written with hibernation in mind.


Touchscreen works for finger BUT it stops working when putting the stylus pen

Update: updating Kernel to 5.8.0-49-generic in Dell 7400 with ubuntu 20.04 solves the problem.


Python doesn't use decimal point separator in 'Region and language'

You need to run locale.setlocale() too.

python3 -c 'import locale; locale.setlocale(locale.LC_ALL, ""); print(locale.localeconv()["decimal_point"])'


Install Brother MFC-465CN as a network scanner

Go to downloads for your printer @ http://support.brother.com/g/b/downloadlist.aspx?c=us&lang=en&prod=mfc465cn_all&os=128.
Download "Scanner Driver" for 32bit or 64bit as per your OS. Install via Software Center ignoring the warning about the driver being poor quality.
Download "Scan-key-tool" for 32bit or 64bit as per your OS. Install via Software Center ingnoring the warning about the briver being poor quality.
Check the IP address of your printer.
Open terminal and run:

  sudo brsaneconfig2 -a name=SCANNER model=[Your Printer Model] ip=[Your Printer IP Address]


Samsung MFP (Multi Function Printer) Driver software, .ppd file

If I were doing this, I would go here https://support.hp.com/us-en/drivers/selfservice/samsung-xpress-sl-m2885-laser-multifunction-printer-series/16462721/model/16462723

and click to download and SAVE what should be uld_v1.00.39_01.17.tar.gz

I would open a terminal; (control and alt and t keys all held down)

and copy each line below; and paste that line into the terminal; and hit the ENTER key

cd Downloads

tar -zxvf uld_v1.00.39_01.17.tar.gz

cd uld

sudo ./install.sh

and that should run the install script; and should set up a working driver

(best go to the PRINTERS folder before doing the above; delete any icons for the 2885; as you say they do not work; before running the above)


Update of snap-store snap caused Ubuntu Software to disappear

If your system still has this problem, the way to fix it is to run snap refresh snap-store --channel=stable/ubuntu-20.04


By now Cassou's PPA offers not only an emacs-snapshot but also an emacs24 package which provides the current stable version of Emacs 24.

ppa:cassou/emacs  (Click here for instructions on using PPAs.)


I'm trying to copy the values of a variable to clipboard from my password generator but it doesn't work

So many things to look at, but assuming your initial question is about saving the output of a command as a variable.

To save the output (STDOUT) of some command or pipeline as a variable, you need to use command substitution ($()):

pass=$(head /dev/urandom | tr -dc 'A-Za-z0-9\!\"#$\@\&\%\?' | head -c "$length")

I have made two changes:

you don't need to be root to read the /dev/urandom file, so I've dropped sudo
always quote variable expansions (unless you know what you're doing);  I've quoted $length

Also, read can show a prompt string (see -p option), you don't need to use echo:

read -p 'How many characters?' length


Configuring MySQL 5.7 on Ubuntu 16.04 LTS

I ended up going about this as I described. As a side effect, I really like how few directives are in the overrides.cnf file.


As of 2016, is there a simple way to produce good looking MS Word documents (.docx)?

WPS Office is currently the best. It will open Doc and Docx accurately with few mistakes, and will save in them as well.

It is available as an App and for the 3 main desktop operating systems.

It looks very much like Word, with the ribbon and the same shortcuts.

This is currently what I use if I need to write in Word on Ubuntu.


Ubuntu 13.10 Gnome - Nvidia 675mx and Intel drivers

Have you tried primus?
According to
http://www.webupd8.org/2012/11/primus-better-performance-and-less.html
this should improve performance a little.


cli_scangpt: detected a non-protective MBR

I'm not a clamav specialist but given the name of the tool showing the warning cli_scangpt, this is tool give you a warning that a GPT partition does not have a protective MBR.

According to this wikipedia article, a protective MBR is used to prevent MBR partitioning tools to overwrite GPT disks by accident.

Since you're using an antivirus, I assume you were asking if there is a security risk related to this warning, and I don't see any security implication with that problem, so you can probably safely ignore it.


Ubuntu 64 bit 16.04 LTS on laptop Hp Pavilion X2 external HDMI monitor stopped working after latest updates

Problem solved: installed windows 10 and the machine did not freeze again.


Why does my laptop shut down unexpectedly?

Most probably your laptop is shutting down unexpectedly because of heat issues. Try this answer in this sense or/and you can buy an external cooler fan and put under your laptop.


Dell Poweredge R410, ubuntu(14.04) running dead slow

Install a lighter desktop environment like lxde or xfce (preferably lxde). Lxde is light on resources and will give you a faster performance than unity gives you.


On Login screen: click on settings(gear) icon and choose "Gonme on XOrg". Not the default "Gnome".

I also disabled "animations" using "Tweaks" tool.


LibreOffice Writer - weird math symbols from .docx files

You can try by double-clicking the formula object, so L.O. Math will open it. Then, just do a single click inside the document page: L.O Math will close and the formula will be displayed with the default options (font, fontsize and everything else) of Math.

Hope this helps.


Can I annotate the screen in Gnome Shell?

Gromit-MPX (GRaphics Over MIscellaneous Things) fits this use case perfectly and works well enough in Gnome 3! I just had this same need on my new Arch Linux system on a ThinkPad X1 Yoga and was sorely missing my lovely Compiz Annotate.

Install:
Ubuntu - sudo apt install gromit
Arch (AUR) - yay --sync gromit

@todo instructions for other distributions like Fedora and Debian.

Caveats:
1) I haven't gotten multi-pointer support to work yet, but not critical for my immediate needs. Would love to get this working though.

2) I haven't yet figured out how to enable palm detection when using a pen. But I suspect I can disable one of the inputs to do that.

3) I am seeing the resulting lines a bit rough/aliased which is what I had with Compiz Annotate. It says in the gromit-mpx readme:

  When there is no compositing manager such as Compiz or xcompmgr running, Gromit-MPX falls back to a legacy drawing mode.

Which it seems is happening in Gnome 3 and I would like to see how to improve this, because in the Wacom Tablet Settings, the test box shows a really nice pressure sensitive non-aliased black and white lines, so I want to know how to pursue adding that compositing backend system to gromit-mpx.


No, it doesn't make any changes and only grabs public details from your system (also available via http://packages.ubuntu.com/ with a browser though not as useful or machine specific as apt-cache provides) so sudo is not required.


Install Ubuntu on Spare 500 GB Hard Drive

You can install Ubuntu onto the empty hard drive without any initial preparation.

Just make sure you know the name of the empty hard drive so that you know which to install Ubuntu onto when going through the installation process.

However the simplest thing would be to remove the failed hard drive from the PC before you install Ubuntu. If you do so, there'll be no preparation to do on the empty disk - just put the Ubuntu disk in the DVD drive and it'll do the formatting and partitioning for you.


squid is a "dummy transitional package from squid to squid3". Probably squid3 is already installed in your system, as squid depends on squid3.

ncsa_auth is located in /usr/lib/squid3/.


Docker on Ubuntu Core - docker.service not found

I had the exactly the same issue with Ubuntu Core 16 (on raspberry pi 2).

Could you please try the following workaround?

Try to run docker with sudo snap run :

<my-user>@localhost:/home/~ sudo snap run docker login
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
Username: <my_user_name>
Password:
Login Succeeded

<my-user>@localhost:/home/~ sudo snap run docker ps
CONTAINER ID        IMAGE                     COMMAND                  CREATED             STATUS              PORTS               NAMES
7992d18555f1        zsoltm/postgresql-armhf   "/entrypoint.sh postg"   13 minutes ago      Up 13 minutes       5432/tcp            db

Root Cause:

The root cause of this issue seems to be that my user is not part of the docker group and i cannot use usermod to add my user to the docker group because it is Read-only FS (!!) :

<my-user>@localhost:~$ sudo usermod -aG docker <my-user>
usermod: /etc/group.1612: Read-only file system
usermod: cannot lock /etc/group; try again later.


Using libreoffice base as GUI for MySQL database (os- ubuntu 14.04)

To create a connexion, this code:

DriverManager.registerDriver (new com.mysql.jdbc.Driver());
m_Connexion = DriverManager.getConnection("jdbc:mysql://localhost:3306/Database_name","root",password);

should work. Maybe yours too if you quote correctly the password (you should have "password" or password, not password").

If it still don't work you should check the url, username and password.


When starting Dropbox IOError: [Errno 13] Permission denied

Simply run this command to correct the access rights (for version 3.6.6 and 64-bit)

sudo chmod +r /var/lib/dropbox/.dropbox-dist/dropbox-lnx.x86_64-3.6.6/futures-2.1.3-py2.7.egg/EGG-INFO/top_level.txt

If the version of Dropbox is different, then adapt the path. (Thx @rauljosepalma)


Clean install of Ubuntu in a laptop running Windows 10

Yes, it will. The installer will assume it can format ALL drives if ONLY Ubuntu is to be installed.

If you want to keep any of the partitions use "something else" and do NOT format the partitions you want to keep. The Ubuntu partitioner will tell you what partition holds the OS by the way.

If you are unsure: check the size of the partitions in Windows first before trying!


The problem occured due to different MTU settings and a probably misconfigured firewall at my internet provider (KabelBW).

I solved the problem by setting the MTU to 576 via

ifconfig wlan0 mtu 576

Note that after setting the MTU, you have to disconnect and reconnect to the network. For further Details have a look at Snailbook MTU Mismatch


AbiWord File says Error and file cannot convert

I would suggest using LibreOffice instead of AbiWord. I do use AbiWord at home only because it can print free barcodes I can use for work and LibreOffice cannot. Other than that AbiWord flickers inexplicably and lags every now and then. AbiWord doesn't even come close to the power of LibreOffice.

The issue of backups is important. As a minimum copying your documents folder to a USB flash drive after 10 or 20 hours of work is a good idea. The advantage is you can take your backup with you if your laptop burns down while you are away from home.

I have a more exotic automatic backup that copies all my writings for five years plus system configuration / settings I've made to tweak Ubuntu. Files are copied into a .tar archive which is compressed and emailed to my gmail account. The advantage of gmail is you can access your backups anywhere in the world and don't have to carry a USB thumb drive around in your pocket/purse. Gmail gives you 15 free GB of space which for me is a couple of years of daily backups before I have to start pruning (deleting) older backups. The setup is described here:

Backup Linux configuration, scripts and documents to Gmail

I've answered other parts of your question in comments and after resolution the comments can be rolled up into this answer.


How to transfer transmission configuration to another machine?

Copy the folder located at /home/your-user-name/.config/transmission/ and place it at the same path location on your new installation.

Simplest way would be to have an Ubuntu One account and mark that folder as a Cloud Folder, syncing the configuration across installations.


What computer architectures are available?

The list is available here: https://wiki.ubuntu.com/SecurityTeam/FAQ#Architectures

Ubuntu's supported architectures change over time, but x86 32-bit ("i386") and x86 64-bit ("amd64") are the most standard architectures, with ARM ("armel") becoming a recent addition.


How do I uninstall Java 11 to be able to install Java 8 for Android Studio?

No need to uninstall your other java version(s) that's already installed on your machine.
Whenever required, you can conveniently use the utility 'update-alternatives' to choose the Java runtime that you wish to activate. It will automagically update the required symbolic links.

You just need to run the below command, and select the version of your choice. That's all!

sudo update-alternatives --config java


Is Buffalo Drivestation DDR compatible with Ubuntu?

It should work, though the software they ship with it won't.  The product sounds like snakeoil though so I suggest not touching it with a 10 foot pole.

It claims it has a 1 GB cache and that this makes it super fast, but the OS already caches files, and typically has access to more than 1 GB for that purpose, so caching the data a second time on the drive is pointless.  Worse yet, it sounds like the drive lies to the OS and claims it has written data when it is still sitting in its cache, in order to get great benchmark scores.  If the power goes out though while it is still holding writes in its cache, your filesystem will be corrupted.


Possible data loss while installing Ubuntu 11.04 over Ubuntu 10.10

You should never do this kind of thing without having a backup. Ever. But what you should be able to do, is to boot a usb session, delete everything on your root file system except /home and resize it. Then you can create a separate partition for /home and move the files onto it and then install. (Please investigate this before you start doing anything)

But in any case, you should not install a different version of Ubuntu without cleaning the root file system first. It's asking for major problems.


How to reinstall Ubuntu, but keep personal files?

BACKUP your data FIRST. If you can't boot your Ubuntu guest any more, you can boot with a Ubuntu Live DVD, select Try Ubuntu, and copying off files to an external disk or flash drive.

You can reinstall Ubuntu and keep your existing /home directory, by booting a Ubuntu 16.04.1 Live DVD, and choosing Something Else, choosing your existing Ubuntu partition to reinstall into, and unselecting format partition.


Will not start after clean install (hangs at disconnected from plymouth) on a Toshiba Satellite

Managed to fix it.  For info this appears to have happened because I use an external monitor.  The process to fix was:

Disconnect Monitor, reboot
Used Ctrl-Alt-F1, logged in as myself, ran startx
Prompted by system to install post-release nvidia driver, did that
Rebooted
Plugged in external monitor, ran nvidia settings tool, enabled the external monitor, saved xorg.conf, all working fine.


Using OVMF on Ubuntu to build a gaming virtual machine

My problem has been solved successfully. The reason you can't boot Windows 7 with OVMF when you installed it with SeaBios is that SeaBios isn't UEFI compliant, while OVMF requeeds a UEFI installation (hence an EFI partition to boot from). In fact, I can now boot successfully both Netrunner - by booting it from an EFI bootloader - and Windows 10 - with its own EFI bootloader -.


Apt-Get Update Failed to fetch; Unable to connect

check the following cases:

check your internet connection.
ping any website (www.google.com),it will help you the packets are received or not.
check any proxy is set or not.
check any website in browsers (chrome/firefox)


How to get left edge scrolling on Ubuntu 14.04?

To enable left-edge scrolling, you can essentially follow @kos's suggestion. In my case i used something like:

synclient LTCornerButton=3 LBCornerButton=2 RTCornerButton=3 RBCornerButton=2 TapButton3=2 ClickFinger2=0 ClickFinger3=0 LockedDrags=0 VertEdgeScroll=1 HorizEdgeScroll=1 VertTwoFingerScroll=1 HorizTwoFingerScroll=1 CircularScrolling=1 CircScrollTrigger=1 PalmDetect=1 CircularPad=0

The left edge scrolling will be enabled in 'natural-mode' by default (I don't know why). But you can reverse this with a bit of effort.

First thing to do is to get the xinput id of the touchpad. The following code will give you that:

xinput list | egrep "slave.*pointer" | grep -v XTEST | sed -e 's/^.*id=//' -e 's/\s.*$//'

Now get the button-map of this device by:

xinput get-button-map <id-num-here>

This should give you something like:

  1 2 3 5 4 6 7 8 9 10 11 12

Now, if the numbers are indeed in order, this means that the scrolling is not reversed. What we need to do to reverse the scrolling, is reverse numbers 4 and 5, which represent the scroll wheel. To do this:

xinput set-button-map <id-num-here> 1 2 3 5 4 6 7 8 9 10 11 12

Now you're left-edge scroll should work properly.

If you want to reverse it to original state, you can use the same command as above by giving the original order of sequence.

As you might notice, this comes with a price - that your right-edge scrolling is now reversed! As the OP notes below, this can be reversed again to normal by enabling natural scrolling on mouse and touchpad settings.

Source: This excellent blog post!


How to add options to unity launcher in Ubuntu 14.04LTS?

This is a bit of a catch22 if referring to the nautilus format option for removable media like flash drives.

The option is there but will only show up if the drive is not mounted. However the default in nautilus is to automount drives when inserted & there is no unmount option once mounted.

Yet again some nonsense from Gnome & ignored by Ubuntu.

old bug that added the now bogus option - https://bugs.launchpad.net/ubuntu/+source/gnome-disk-utility/+bug/1227440

So unmount your drive & you'll get the format option..


Ubuntu 13.10 to 14.04 upgrade: power save blacks screen for 5 minutes

As your problem is power-savings related, please follow these steps:

Go to the monitor settings and turn off anything that reeks of 'sleep', 'power management' etc
Go into the BIOS of your machine and turn off power management there
As all of these machines are desktops, run the following commands one by one:

sudo pm-powersave false
sudo apt-get remove gnome-power-manager
sudo apt-get remove pm-utils
sudo apt-get remove acpi-support

Reboot


WiFi card HardBlocked on HP Pavilion dv6

Wow... It just started working. Not sure why though which is a little concerning...

What I did:
- Reset BIOS settings to default.
- Restarted 3 times
-> after 3rd reboot it started to work

Makes no sense to me but I'll take it.

I additionally downloaded and "installed" the driver (cp into /lib/firmware).
Also disabled the network manager power settings by setting it from 3 to 2.
And lastly set software & update settings to include Canonical Partners & Canonical Partners (Source Code).

Again, not sure why it now works but yayy.
@mchid - Thank you!!

Thank you everyone else that looked at this

-Dungeon4


What it sounds like is you want to take images that are 3MB in file size and store them as smaller file size on disk using an image editing tool on Ubuntu.

You can use Shotwell which comes with Ubuntu Desktop 18.0.4.

Take all your original images and put them in a folder.
Choose File | Import From Folder and navigate to it. Shotwell will bring all the images into its own gallery
Double click on the image you want to downsize
Select File | Export and change properties to:

Format: JPEG
Quality: Choosing a lower quality will reduce the file size but it may not look as good. So you have to experiment. Start off with High (90%).
Scaling constraint:

If the image is in a portrait (longer height than width) choose Height
If the image is in landscape (longer width than height) choose Width

Pixel

If you chose Height in Scaling constraint, this will resize the height to this many pixels. Type in 1/2 the height. It will keep the width in the same proportion to avoid stretching
If you chose Width in Scaling constraint, this will resize the width to this many pixels. Type in 1/2 the width. It will keep the height in the same proportion to avoid stretching.

Making the pixel width (or height) smaller will reduce file size.

Save the file with a different name. Use a naming convention to distinguish original from modified.

Example:

-  Original is: Hello.jpg
-  Modified is: Hello-600.jpg (if you changed pixel parameter to 600 pixels).


Debconf got a corrupted perl script. How to reinstall it?

I tried to download a random deb to install, and the graphical interface said there could be a error with my sources.list. I grep'd the /etc/apt folder instead of the perl scripts and found a PNG disguised as a sources file in sources.list.d. In the end, the problem wasn't the scripts but what they read from :P

Also, there was another of those bad PNGs itself in /etc/debconf.conf, which was probably the root of all problems. I found that by using the same method of outputting the buggy file - but in a healthy machine, so I had text strings to grep, found the complete file and copied it on top of that PNG.


Ok, looks like it is resolved.
For some reason, after following the instruction to install, and then remove Wicd, I had lost the Gnome Control Center.

I've just reinstalled it from the Software Center, and I can now access all the settings.

Not sure how it is related to the install/remove of wicd though.


How does Unity work in multi-monitor configurations?

For 10.10 multi monitor support was rudimentary, as that was focused on netbooks -- if you were giving a presentation and you ran Unity we didn't want the top panel overlaid on your presentation.
For 11.04 and 11.10 the multimonitor support is much better. I'll talk about how my setup works with Nvidia, but I don't have the hardware to comment on ATI and Intel support so hopefully someone will post seperate answers for those.
For 12.04 and 12.10 there is a specification for how to improve multi monitor support in the desktop.
Nvidia Twinview

Each monitor gets a panel with the window controls, the application menu, and then the indicators. When the windows are maximized each window gets integrated into the top panel of each screen. The indicators are cloned so that you're never too far from the system menu.
When the windows are unmaximized the application menu for that app will be displayed on whichever panel the application is on so that you don't have the menu all the way on another screen:

ATI
Using the open source ATI driver with RandR (you setup from Monitor Preferences, see screenshot) then the same result is achieved as with Nvidia Twinview.

Known Issues:
Here is a list of possible combinations of multi monitor setups and their results:

http://people.canonical.com/~bryce/ExternalMonitor/results.html

There are some bugs (other than the first, they are generally small aesthetic details):

Bug #742544: For users with the secondary monitor on the LEFT of the main monitor, the launcher displays in the wrong place and similarly regarding [the main panel's position, Bug #757652]
Bug #769458: Desktop background not correctly rendered on startup
Bug #742020: Indicators being shown as selected on both screens
Bug #743621: Occasional problems with applications that run in fullscreen

There's still the potential to improve support further, for example the suggestion in Bug #755357 to allow two global menus to be active at the same time.
See also What's the right terminology for Unity's UI elements?


I am pretty sure by now you have removed this deployment so I will answer for benefit of other people who come across anything similar. You could try to see what went wrong with:

juju debug-log --replay

And see why this specific machine had problems. Also, it seems that it doesn't have an IP address, Maybe take a look inside the container -in this instance, it would be  lxc exec juju-59a369-11 bash and see if there is anything in the logs of the container. Start with ip a to check for address.

To resolve I would run

juju add-unit neutron-api

This will deploy another machine (lxc) and unit of neutron-api called neutron-api/1 and add all required relationships.
Afterwards its a case of

juju remove-unit neutron-api/0

to clean up.

Hope this will help.
B


How to reinstall accidentally deleted calendar?

If you are referring to the gnome calendar, you can either install it using apt-get or snap:

sudo apt-get install gnome-calendar

or

sudo snap install gnome-calendar

I prefer not to install using snap, since I found that those are slower to start.


Is there any distribution of Ubuntu which can be used to install .rpm packages?

There is no distribution that natively supports RPM as Buntus/debs use different package managers, but you can convert RPM to DEB and try to install from that. The program that will convert the RPM to DEB is called alien. However, this is normally not recommended as there are normally deb files as well. Or, try installing from source if you are having issues with the .deb.

Here is a link to a site on how to do this: https://www.howtoforge.com/converting_rpm_to_deb_with_alien

Pretty simple once your download alien. Just run alien -k someprogram.noarch.rpm and it will create a .deb file for you. Then you can install the .deb with dpkg -i newlycreateddebfromrpm.deb There is a lot of information on this if you search this site.

The IBM links shows some heavy dependencies and it looks a little quarky on how the install needs to run. Make sure that is followed properly.


On recent MacOS versions (10.13 High Sierra and up, September 2017), the filesystem in use is not HFS+ but APFS. This filesystem is not documented and Linux is not currently able to mount it. There is only an experimental FUSE driver to mount it in read-only (haven't tried it yet): https://github.com/sgan81/apfs-fuse


So it turns out this is a duplicate of another question which I couldn't previously find;

Connect/disconnect from VPN from the command line

I would like to add though, to install nmcli on my 10.04 machine I had to;

sudo add-apt-repository ppa:network-manager/trunk
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install network-manager


Accessing Webmin from Ubuntu Server 12.04LTS

Maybe you made a mistake in writing?
Instead of

https//ubuntumyname:1000:

Try

http://ubuntumyname:10000/

or

http://localhost:10000/
http://127.0.0.1:10000/

By default webmin port is 10000, not 1000. Also maybe your computer can not resolve hostname ubuntumyname...


what is the difference between different 'lib' folder in ubuntu

/lib contain "essential" libraries that may be needed even in single-user (admin-only) mode and without /usr mounted

/usr/lib are the libraries for the normal user-programs, that mostly can be found under /usr.

/usr/local/lib are the libraries for locally installed programs and packages ie. things you've compiled and installed from source-packages yourself.

In addition to shared and static libraries which are the lib-directories main purpose, you may also find some hierarchies (with their own lib, bin, include and so on) for some larger packages under them.

lib32 and lib64 are used on 64-bits systems to separate libraries for 32-and 64-bits.


Mirrors are run by third parties. The come & go and move over time. You can see the full list of mirrors here. Simply select a different mirror from the list, or use the "Select the best server" to find the most optimal one for you.


How to mitigate the lack of suspend-to-ram when idle powerdraw is too high

Well, there are other loads you have not accounted for yet, like fans, motherboard stuff, ... But yes, there will be some minimal power consumption for the power supply itself. You need to also watch the power factor, as in my experience it is poor for minimal load and only gets close to 1 for maximum processor package power. Overall, good switching power supplies should be into the 90% area for efficiency, but do require minimal load to work properly (at least they did years ago, when I was more knowledgeable about them).
For my main test computer, idling at 1.3 watts processor package power, the mains are at 35.7 watts, with power factor at about 0.85. For low powers my mains ~= 34 + processor package power. At 87 watts processor package power, the mains draw about 128 watts, or another 41 watts. So, 5.3 watts unaccounted for. Some of that will be extra memory power, but lets us call that 0. So the 5.3 extra waste watts cost of the additional 85.7 processor watts suggests an efficiency of 94%, which is good.


Don't attempt it. Since the installation didn't complete, do it again.


Failed to read ppd file but printer is working well

Basically, you have the same problem as Printer stack on processing - failed to read ppd file
You just need to change the permissions of read / write of the file
$ sudo chmod 644 /etc/cups/ppd/HP-LaserJet-Pro-MFP-m125nw.ppd

I just followed these 2 answers
answer1, answer2
Don't worry so much and give others a headache.


Full disk encrypted while installing Ubuntu 16.04

Since the installation failed and presumably you just need to reinstall, you don't even need to unlock the encrypted partition created by the installer, you can just remove it and then start over:

Select "Try Ubuntu" instead of "Install Ubuntu" when it boots from USB.  This will load a live version of Ubuntu.   From there, you can open "Disks" to manage the partitions on your disks.  Be aware that deleting or formatting partitions will make the data stored there inaccessible and Disks will show all discovered media, so be careful not to delete the wrong thing.

You can delete partitions individually, but if you want to use Ubuntu for the entire disk, the easiest option would be to format the whole disk which will remove all partitions (use the three vertical bars at the top right of the application).  It will ask if you want to use MBR or GPT.  Unless you have old hardware you should select GPT as the partition scheme.

Then you can launch the installer which will be a link on the desktop of the live USB, or you can reboot and select the "Install Ubuntu" option, whichever you prefer.

If for some reason you needed to actually decrypt that disk, you would be also be able to perform this task through the included Disks application by selecting the encrypted partition, hitting the play button to mount it, at which point it would ask for the password.

If you didn't remember what password you used, however, you would be out of luck.


According to the error log

   load_drawing_from_file
    raise SketchLoadError(_("unrecognised file type"))
    app.events.skexceptions.SketchLoadError: unrecognised file type

the CDR file ist not recognized.

What is the version of the CDR files?
UniConvertor supports only the following CDR versions:

CorelDRAW ver.7-X3,X4 (CDR/CDT/CCX/CDRX/CMX)

(Information from here: http://sk1project.org/modules.php?name=Products&product=uniconvertor)


By default, the root account doesn't have a password. You can create one by running:

sudo passwd root

You will then be able to su with the password you just created.


EDIT (16 Aug 2017):
New drivers are released, check them out.

I have both good news, and bad news for you. This question and answer will probably be outdated in a couple weeks because (good news): AMD stated that this is an issue that they are working on. In fact at the following page amd advices not to upgrade to 16.04.3 yet because in such case your screen WILL go black: http://support.amd.com/en-us/kb-articles/Pages/AMDGPU-PRO-Driver-Compatibility-Advisory-with-Ubuntu-16.04.2-and-16.04.3.aspx

The bad news is that there is basically nothing you can do but to wait for AMD to release new drivers, or to downgrade to 16.04.2, which involves messing with packages and stuff. Please go to the website above and send feedback. The drivers are supposed to be released already, they are late.

EDIT:
Actually you can get rid of the black screen by removing the driver temporarily. It might be obvious to you as you can login time to time, but I wasn't able to boot when I upgraded to 16.04.3. In such case going into recovery mode when booting, and then proceeding with resume: resume normal boot let me into terminal, and I was able to remove the driver. After that, tearing, fan noise and performance issues will occur of course, but at least you will be able to login with no other issues


Wifi not connecting at home but connecting everywhere else - Ubuntu 14.04 LTS

I have intermittent wireless issues.  In our last flat, my Mac wouldn't play well with one router, but would with another.  I've had issues where a Windows laptop on the network would somehow interfere with my connectivity on another machine.  When they connected I'd effectively get no access until they turned their P.C. off.  A Windows P.C. at home frequently can't grab an address automatically (dhcp).  Giving it its own fixed IP, and DNS server fixes that.  I have another problem with my current router, another Windows box sometimes doesn't connect, even when others laptops do.  A router reboot seems to fix that.  At work one colleague had lots of problems, when we didn't.  Sometimes the placement of the machine can really matter.  There are many nuances.  Do state your router if possible.

Some ideas:

Try other devices, do they connect okay to the same access point?

Try connecting with just the Lenovo.

Move the laptop.

Try connecting closer to the access point.

Try removing and re-adding the access point connection in Network Connections on the Lenovo.

Try a different protocol.

Scan locally with something like WiFi Radar to make sure your neighbour/s aren't on the same channel.


How do I find the maintenance status of programs in the Software Center?

Open the USC
Find the app in question:
Example Gparted

you can see the installed date. If I were to scrolldown I can now see the add-ons the version and the updates from the source as well as reviews.

If you click on history, you now can view the installation dates as well as any updates


how can i compare data in 2 files to identify common and unique data?

No matter if your file1 and file2 are sorted or not, use awk command as follows:

unique data in file1:

awk 'NR==FNR{a[$0];next}!($0 in a)' file2 file1
4
5
6

unique data in file2:

awk 'NR==FNR{a[$0];next}!($0 in a)' file1 file2
a
b
c

common data:

awk 'NR==FNR{a[$0];next} ($0 in a)' file1 file2
1
2
3

Explanation:

NR==FNR    - Execute next block for 1st file only
a[$0]      - Create an associative array with key as '$0' (whole line) and copy that into it as its content.
next       - move to next row
($0 in a)  - For each line saved in `a` array:
             print the common lines from 1st and 2nd file "($0 in a)' file1 file2"
             or unique lines in 1st file only "!($0 in a)' file2 file1"
             or unique lines in 2nd file only "!($0 in a)' file1 file2"


How do I deploy a specific revision of a charm?

First off, you need to find out which revision you need. The revision of the charm is completely different from the bzr revision. So for https://jujucharms.com/precise/mongodb/

So the charm revision is 26. Now let's say you think something broke in 26, and you want to try version 25 or earlier.

juju deploy cs:mongodb-25

will give you that revision of the charm. However it is always a good idea to be explicit about the series as well to ensure repeatability:

juju deploy cs:precise/mongodb-25


The boot up screen is called GRUB. Boot Ubuntu and try the following from a Terminal.

Select the Linux kernels you want to be displayed by leaving only the kernel files in the /boot folder.

cd /boot

sudo mkdir old_kernels

sudo mv *undesired_kernel* old_kernels   [e.g. sudo mv 0-26 old_kernels]
Modify the grub option editing

sudo gedit /etc/default/grub
sudo update-grub

If you want to know more look here.


What are the knowledge I should have before creating a Debian package? Does it require high knowledge on Shell programming?

No. Without you explaining more, the only thing you need is a control file inside a DEBIAN folder with the right permissions.
Here's everything, from which you can pick and choose what you need: https://www.debian.org/doc/debian-policy/

$ ls -R mypkg
mypkg:
DEBIAN

mypkg/DEBIAN:
control
$ cat mypkg/DEBIAN/control
Package: mypackage
Version: 1.0
Architecture: all
Maintainer: Me
Description: This is a test package which provides nothing.

$ dpkg -b mypkg/ mypackage_1.0_all.deb
dpkg-deb: building package `mypackage' in `mypackage_1.0_all.deb'.

$ sudo dpkg -i mypackage_1.0_all.deb
Selecting previously unselected package mypackage.
(Reading database ... 364918 files and directories currently installed.)
Preparing to unpack mypackage_1.0_all.deb ...
Unpacking mypackage (1.0) ...
Setting up mypackage (1.0) ...


How to re-download unauthenticated packages

You can download and reinstall all packages using --reinstall:

sudo apt-get install --reinstall package1 package2 package3

But, make sure you cleared your cache before. Use

sudo apt-get clean

to clean the cache. Because, if a package is present in cache, apt won't re-download it.

Of course, the best way is nuke the system from orbit and start anew to assure the maximun security.


My Software Center won't open - Ubuntu 16.04

The error message is telling you the problem.  There is a problem on the 7th line of the sources list.

The privileges on that file require that you be root to edit it.  in a terminal window, you can

cd /etc/apt
sudo nano sources.list

The system will ask for your password (unless you've done some magic with sudo) and then dump you into the top of the file in the nano editor. Press the down arrow 6 times.

All comment lines should start with a hash (#).

If the line is not a comment line, it should start with deb or deb-src. Compare it to other lines that are not commented, and you may see the error.  At worst, as a temporary fix, you can add a hash (#) at the beginning of the line to ignore it as a comment.

Ctrl+O (the letter, not the number) to save, Ctrl+X to exit.


How to view a PE EXE/DLL file version information?

I'm working in a tool called pev to retrieve information about PE files on the command line.

It is installable with

sudo apt-get install pev

The file version can be fetched with

peres -v program.exe | awk '{print $3}'


Error while loading drm amdgpu : "ERROR - Unknown firmware load type" amdgpu_ucode_get_load_type -

The message may be treated as a warning only, as it loads the firmware and driver. This is fixed in the patch: https://patchwork.freedesktop.org/patch/246240/

https://www.phoronix.com/forums/forum/linux-graphics-x-org-drivers/open-source-amd-linux/989248-rebranded-gcn-1-0-amd-radeon-520-dgp-in-my-hp-laptop-supported-in-amdgpu?p=1043896#post1043896


You have no bootloader installed on /dev/sda. The bootloader may have been installed on the EFI partition on /dev/sda1 but this partition seems to be not active.
You could try to set the partition active using the cfdisk command in a terminal window.
Hint: as the poster of this question pointed out, one must use parted / gparted to edit GPT partitions.

Attention: it turns out in the comments that this answer was completely misleading.
If you however need some information about installing Ubuntu on an UEFI enabled system, you may read https://help.ubuntu.com/community/UEFI


How to safely upgrade Deja Dup on Ubuntu 12.04?

According to http://packages.ubuntu.com/search?keywords=deja-dup, 22.0 is the current version available for precise. All the newer ones are for newer releases. The Launchpad page for Deja Dup says that there are two options: the official repository, or a daily PPA. I don't recommend a daily PPA for something critical like a backup utility. However, it looks like the daily PPA hasn't been updated in months, so it might be missing bug fixes, or it might be perfectly stable. You can perhaps get the source package for trusty and the relevant dependencies and build your own package. Unfortunately that does not look like an easy task, since v30.0 depends on a much newer version of libc6.


Hotspot Access Point under Ubuntu / LUbuntu 16.04 with DHCP Server

I finally made it with the help of create_ap! Here is what I did:

#Install dependencies:
sudo apt install git && sudo apt-get install make && sudo apt-get install hostapd
#Install create_ap:
git clone https://github.com/oblique/create_ap
cd create_ap
make install
#Make Config File:
sudo create_ap -n wlan0 -g 192.168.0.1  MyAccessPoint MyPassPhrase --mkconfig /etc/create_ap.conf
#Start the systemd service:
sudo systemctl start create_ap
#Enable the service to start on boot:
sudo systemctl enable create_ap


Bit of an off-topic answer but... I think you're doing it all wrong.

Don't use a Raspberry Pi for networking.

As you're realising the networking potential of the Raspi is terminally stunted. The ethernet port on a the Raspi3 is only 100mbps. In perfect conditions you can get ~250mbps over USB Ethernet adaptors and the wifi is pretty pap too. Add in all the CPU time for handling encryption and I'd be surprised if you were getting anything near even 30mbps.

OpenVPN is slow and bloated, use WireGuard.

For a point-to-point VPN where you don't have to corral all the hosts into being compatible, use WireGuard. There's a official PPA. It's just a lot faster, and a lot less resource intensive than OpenVPN.

There's only so far I can walk you with this, test it between your desktop and VPN server.

Get a better router that can do all this for you.

Get rid of the Raspi and get a router that supports OpenWRT. We use VDSL2 here so I got a "BT Home Hub 5" with OpenWRT pre-installed for ~£20. They give these things out to new customers so they're artificially cheap and available.

It uses comparable amounts of power to a Raspi3 (probably less)
You need a router anyway, you're just replacing your current one (saving more power)
It's built for gigabit networking throughput.
You can install Wireguard directly into OpenWRT. It can handle your VPN connection, firewall rules, etc. Forever without any switcheroo.

The hardware you need may vary to mine but don't get pulled into the £300 super-routers that ASUS (et al) make. You can usually spot these a mile off because they look like porcupines with their antennae.

If you need good wifi, buy PoE access points and put them where you actually need them. It's cheaper both initially and when you decide you need 802.11z in two years time.


Shortcut link of any directory is not visible when pasted in shared directory, to client computers

yes it is working now, i added following things in addition to default settings.
[global]
"security = user"
"allow insecure wide links = yes"
[share]
"follow symlinks = yes"
"wide links = yes"
"force user = (username of root user)"
now i can use widelink successfully.
after more than 30 days of struggle, finally symlink and widelink works now.
please suggest if i can make some further amendments. many many thank you.


Restrict OpenVPN user to a specific port on a specific servers

Just by a firewall rule

iptables --append INPUT --match <YourProtocol> --protocol <YourProtocl> --src <Source network/IP> -i <input Interface> --dport 80 --jump ACCEPT

<YourProtocol> is TCP or UDP or ICMP or whatever you need  (in case
of http on port 80 TCP)
as <Source network/IP> after --src specify the IP or network your
Clients gets.  (With openVPN its usually something like 10.0.8.2 if
you didn't change it.)
<Input Interface> is the network interface on which incoming traffic reaches. (For OpenVPN its usually something like tun0 )
And finally provide the port you want to allow acces to after
--dport. (in your case 80)
(Hint if you want to provide acces to more than one port don't setup various rules ... use instead: -m multiport --dports <OnePort,AnotherPort,...>)

For more information about iptables Firewall refer to https://wiki.ubuntuusers.de/iptables2/

I found this iptables generator tool quite handy for easy rules:
https://www.perturb.org/content/iptables-rules.html


Ubuntu 13.04 64-bit - GeForce GT 620 card is not working, always going to minimum graphics mode

The problem is Graphics Driver with Ubuntu is not shifted when kernel is updated or applied update-grub/grub or initramfs. So to fix it what we have done is as below:

Step 1:

vim /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet nomodeset"
update-grub
update-grub2
reboot

now that we are in desktop with minimum graphics, we can move to next step

Step 2:

export DISPLAY=:0.0 && software-properties-gtk
> failed (because it installed nvidia-310 which is old not compatible)

export DISPLAY=:0.0 && nvidia-xconfig
> failed (because xorg.conf file was created)

export DISPLAY=:0.0 && apt-get install --reinstall nvidia-current
> failed (because its installing more older version nvidia-304)

Step 3:

service lightdm restart (basically it restarts the Ubuntu or X windows system on the fly to get the latest changes, but failed - cause there is no latest driver it goes to minimum graphics)

Step 4: the real fix

put it in /etc/modprobe.d/blacklist.conf
> blacklist nouveau
sudo apt-add-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get purge nvidia*
sudo apt-get install nvidia-325

Step 5:

Works now

Optional: check the cat /etc/X11/xorg.conf or use xrandr to set correct resolution


How to open youtube video with youtube-dl

You can specify the directory where the video will be saved using the -o option.

Example:

youtube-dl -o "/home/<User>/Downloads/%(title)s" {URL}

The syntax to open any file in its default application is:

xdg-open $file

If you are using VLC player, you can use so:

cd /path/videos
vlc "Videoname.avi"

If VLC Player is not installed, you can install it so:

sudo add-apt-repository ppa:videolan/stable-daily
sudo apt-get update
sudo apt-get install vlc


Windows 10 option in ubuntu grub not working

Windows 10 does not make it easy to dual boot. It uses fast start up which really is just hibernation and sets hibernation flag. Grub only boots working Windows and hibernation flag cannot be set. And Windows will keep turning on fast start up with updates. Also when Windows breaks or needs chkdsk, grub will not boot it.

And better to use UEFI as then you can always directly boot Windows from UEFI boot menu.

But with BIOS you have to temporarily restore a Windows boot loader, fix Windows, if you can get to internal repair console, and then restore grub. If you still cannot boot Windows, you have to use your Windows repair flash drive or Windows installer that has a repair console.

Fast start up off.

http://askubuntu.com/questions/843153/ubuntu-16-showing-windows-10-partitions &

Unable to mount Windows (NTFS) filesystem due to hibernation

You will need to always have a Windows repair flash drive & your Ubuntu live installer flash drive to make BIOS type repairs. Good to have if UEFI boot, but not required every time Windows turns on fast start up as you can directly boot in UEFI boot menu.

If Boot-Repair sees the Windows boot partition, it may in advanced mode offer to install a Windows type boot loader - syslinux to MBR. See tab on MBR options. Also boot flag must be on Windows primary NTFS partition with boot files, often a small 100MB partition not otherwise seen in Windows.

https://sourceforge.net/p/boot-repair/home/Home/

In Windows it is the fixMBR command to restore Windows boot loader.

Unable to boot into Windows after installing Ubuntu, how to fix?


How to execute commands in gnuplot using shell script?

One way is with -persist:

#!/usr/bin/gnuplot -persist
set title "Walt pedometer" font ",14" textcolor rgbcolor "royalblue"
set timefmt "%y/%m/%d"
set xdata time
set pointsize 1
set terminal wxt  enhanced title "Walt's steps " persist raise
plot "/home/walt/var/Pedometer" using 1:2 with linespoints

another way, if you need to preprocess data, is with a Bash Here Document (see man bash):

#!/bin/bash
minval=0    # the result of some (omitted) calculation
maxval=4219   # ditto
gnuplot -persist <<-EOFMarker
    set title "Walt pedometer" font ",14" textcolor rgbcolor "royalblue"
    set timefmt "%y/%m/%d"
    set yrange $minval:$maxval
    set xdata time
    set pointsize 1
    set terminal wxt  enhanced title "Walt's steps " persist raise
    plot "/home/walt/var/Pedometer" using 1:2 with linespoints
EOFMarker
# rest of script, after gnuplot exits


How can I setup multiple users to connect to an ubuntu server?

If you have configured /etc/samba/smb.conf for shared folders then you must assign group or user to this share.

e.g if you have share:

[share]
    comment = Ubuntu File Server Share
    path = /srv/samba/share
    browsable = yes
    guest ok = yes
    read only = no
    create mask = 0755

Then you can give access to this share to other users multiple ways. You can give access to this folder only for one user e.g:

sudo chown john:john /srv/samba/share/

But you can also give access to this folder to certain group that contains people you need to give access to this folder.

sudo chgrp users /srv/samba/share/

or

sudo chown -R john:users /srv/samba/share/