Permission problem when uploading file via FTP to Apache webserver

This may be too simple of an answer, but you can give it a try:
Change the permissions on the parent directory to the ones that work when you manually change them on the file. In theory, when the file is uploaded, they should inherit those permissions? I could be wrong though!
sudo chmod -R <perms> <directory> or sudo chown -R <user> <directory>
Let me know if this works.
Edit: Found a link here if it is useful (https://unix.stackexchange.com/questions/287664/can-directories-and-file-inherit-same-permissions-as-parent-directory)


The FileZilla server is a Windows only program.


Terminals shuts down when launced by specific user

It was impossible to find the specific error that caused the shutdown, so this was the aternative way.

The workaround to solve this is:

Back up files in users(the one that causes error) home folder
Create a new user with admin privileges
delete old user
rename the new user with old users username
paste old users files to new users home folder and change ownership to new user (sudo chown -R NEWUSER: /home/NEWUSER)
reboot


Installing Ubuntu with the Windows installer?

You should know this about Wubi: Wubi - Pros and Cons...

Pros

If a computer needs to have Linux installed temporarily, Wubi is easier to remove without leaving obvious traces. Without Wubi, you need to re-enlarge the Windows partition and restore the Windows bootloader. With Wubi, you just use the supplied uninstaller. You can even temporarily hide the Ubuntu entry from the Windows bootloader.
For someone who wants to try out Linux but is afraid of harming Windows, Wubi is less scary.

Cons

Suppose a user has a computer with Wubi, has upgraded something but isn't sure what, is thousands of kilometers away, and phones you because his computer won't get past the bootloader stage. What next? There are far fewer resources about troubleshooting Wubi than with traditional Grub-based dual boot.
Similarly, if you need to troubleshooting or rescue the system with a live CD, Wubi reduces your options.
Increasing the size of the Wubi partition image wasn't supported last time I looked.
Wubi induces a small performance loss. (But if you're even considering Wubi, you probably don't care.)
If Windows screws up its filesystem, you lose Linux as well. (Though I get the feeling NTFS is reliable these days.)
Doesn't work with UEFI and if Windows 8 or above is preinstalled.

Related links:

Ubuntu Wiki: Wubi Guide
AskUbuntu post: Can I install Ubuntu inside Windows?
AskUbuntu post: How to boot WUBI installed Ubuntu within Windows 8?


Blank screen when booting after editing the Startup settings

I think you messed up the boot settings by using startupmanager. Use the steps mentioned above and trying booting into the rescue mode.


Why don't "echo -e" commands seem to produce the right output?

Backslashes are treated specially by echo -e, but first they are sometimes treated specially by the shell (which in this case is bash), according to the shell's quoting rules.

The argument echo actually sees is Hello\\n. Because you have passed -e to echo, it treats backslash escapes specially, and \\ is collapsed to a single \. The final n is not escaped, so it appears literally.

The reason for this is that, prior to and separately from the operation of echo itself, the shell treats \ specially in some contexts but not others. Unquoted \ characters are always treated specially, single-quoted \ are never treated specially, but the treatment of double-quoted \ characters, as in the command you ran, is more subtle and complicated.

When the shell encounters double-quoted text in a command, as with "Hello\\\n", it treats \ as an escape character when it precedes a character that can itself have special meaning inside double quotes and not otherwise.

Because \ sometimes has a special meaning inside "", a \ that immediately precedes another \ has the effect of quoting that second \. So inside double quotes, the first \\ are collapsed into \.
After those first two \ characters, there is a third \ character which is unaffected by those first two and which precedes an n. But n is not a character that is ever treated specially inside double quotes, so the \ before it is not treated specially in this situation. Thus \n stays \n.

The effect is that, in double quotes, \\\n is interpreted as \\n.

When echo -e sees \\n, the first \ removes special meaning from the second, so echo prints \n literally for that text.

If your goal is to print Hello with an extra newline but no backslashes (the question was originally ambiguous about this, plus I think it is a useful example), then one solution is to remove a \. Running echo -e "Hello\\n" outputs Hello with an extra newline at the end.

A better solution is to use single quotes and write echo -e 'Hello\n'. Single quotes are the strongest form of quoting. An even better solution is usually to use printf instead of echo, which in this case would be printf 'Hello\n\n'.

If your goal is to print Hello\ including the backslash, followed by an extra newline, then the double-quoted approach is possible but cumbersome. To figure it out, work backwards: echo -e converts \\ to \ and \n to a newline, and double-quoting converts \\ to \, so you can do it with six backslashes (echo -e "Hello\\\\\\n"), because \\n turns into \n due to one backslash escaping another. You can also do it with five, because double-quoting retains \n when the \ is not escaped.

This illustrates the benefit of single quoting: just put whatever you want echo -e to see inside the single quotes (echo -e 'Hello\\\n'). printf is also good here. One option is printf 'Hello\\\n\n'. But where printf really shines is that you can plug in additional arguments. You can use printf '%s\n\n' 'Hello\', which inserts the second argument (literally Hello\ because single quotes don't change anything) in place of %s.


Lubuntu USB full install but all changes to external harddrive

If the pc boots off usb you can install directly to the external hard drive and boot entirely off that. However acessing everything off a usb drive will work but will be slightly slow compared to new sata drives. If you have a usb flash drive you could use live session and save everything to to the hard drive but this would not get latest security updates. You could make a /home partition on the usb hard drive but you will not get security updates on the usb flash drive without persitance. Also usb flash drives as flash memory are limited in the number of writes and do not get the speed of say a sata solid state drive because at there low price point and to use only enough power to run of usb they do not have the best controller to get the data stored electrictally in the nand cells.

What I would do is just run everything off the external hard drive. Running a / partition on the a smaller flash drive will probably result in wearing the flash drive out over prolonged use. https://en.wikipedia.org/wiki/Wear_leveling is minimal on these usb drives as they are generally to like save photos to transfer files not designed to run an operating system on but they are inexpensive and small.

With that in mind I would end up booting the live installer to the external hard drive removing other disks as this can make things more complicated if the installer. However most extenral hard drives purchased from stores come ntfs formatted for windows or sometimes there are ones for mac os X with hfs + with one partiton for the entire drive. I would still want another backup copy of my data. I think taking out the broken hard drive may make things easier if you can open the case of the machine. And if it detects the install on the internal it might try to dual boot the internal drive and external drive which leads to a more complicated setup and is more error prone. Then I would physically remove the bad hard drive as it will only waste power or make things trikier by trying to save the disk. I recommend selecting something else at the installer at this step. If you do not have any data kept on the external hard drive and you had say another backup say on another external hard drive you could delete the entire ntfs partition and replace it with ext4 the defualt. Or you could leave the ntfs partition if you interface with windows computers a lot and want to still be able to tranfer files to it normally. Over usb resizing the partitions can take quite a while. When selecting manual partitioning you will also get to choose the bootloader. You do not want to select the small usb flash normally unless you have problems booting from the external hard disk.

enter your information and install like you normally would and then reboot press enter remove the usb. In bios or uefi you want to set the machine to boot from usb as defualt. However sometimes external hard disks that are the small 2.5 inch laptop drives booting off usb can cause situations where the drive is not initalized at startup and it does not load the bootloader properly from the hard disk. On my 1 tb seagate expansion drives I find sometimes it has enough power to initlize the drives on reboot but not from booting when powered off. However if you keep the usb flash drive as the live session and then reboot remove that you can get it to boot of this external laptop drive. If you had say an desktop external hard drive with a power cord that plugged into the wall then it would gets its power through that and not be complicated. Once you boot from the hard disk you should be good to go.


If you installed it from the PPA like this:

sudo add-apt-repository ppa:fyrmir/livewallpaper-daily
sudo apt-get update && sudo apt-get install livewallpaper livewallpaper-config livewallpaper-indicator

You should be able to remove it with:

sudo apt-get remove livewallpaper livewallpaper-config livewallpaper-indicator

Alternate method:

Use ppa-purge to uninstall livewallpaper. First you need to install ppa-purge:

sudo apt-get install ppa-purge

Then run the following command if you installed livewallpaper from the daily ppa:

sudo ppa-purge ppa:fyrmir/livewallpaper-daily

Or if you are using the stable version, run this:

sudo ppa-purge ppa:fyrmir/livewallpaper-stable

Source Alternate method: https://answers.launchpad.net/livewallpaper/+question/214781


Using LaTeX!

0) Install LaTeX if necessary

1) In the following latex document replace x.pdf by your file.pdf

\documentclass{article}
\RequirePackage[a4paper,top=3cm,left=3cm,right=3cm,bottom=3cm]{geometry}

\usepackage{pdfpages}
\usepackage{fancyhdr}
\begin{document}

\fancyfoot[RO]{Braga}
\fancyfoot[LO]{2015}
\fancyfoot[CO]{===}

\fancyhead[LO]{Lecture notes of askubuntu}
\fancyhead[RO]{\thepage}

  \includepdf[pagecommand={\thispagestyle{empty}},pages=1 ]{x.pdf}
  \includepdf[pagecommand={\thispagestyle{fancy}},pages=2-]{x.pdf}

\end{document}

3) run pdflatex addfooter.tex and a addfooter.pdf will be created.

4) adapt the headers, footer (left,center, right), tune margin's sizes, etc.

Update:

Although LaTeX version give us more control over the details,
as @steeldriver, pointed out,
in some situations a pdfjam command line is the best choice. Typical use:

pdfjam --outfile newfile.pdf --pagecommand '{}' oldfile.pdf


When your laptop obtains an IP address from a dhcp server in the past it used to update file /etc/resolv.conf.

These days it is not that simple. Ubuntu runs dnsmasq by default. This is a caching nameserver which accelerates your web browsing. So the answer to your first question is "From dnsmasq".

The sequence is:

NetworkManager obtains an IP address and a DNS server and stores the IP address of the DNS server in DBus
dnsmasq grabs that IP address from DBus and uses it for upstream queries when there is no cache hit.

You can find out what is your upstream DNS server with the command sudo grep dnsmasq /var/log/syslog (or syslog.1 or any of the other rotated syslogs if you booted long time ago).

The "proper" approach would be with the command:

sudo qdbus --system --literal org.freedesktop.NetworkManager /org/freedesktop/NetworkManager/IP4Config/0 org.freedesktop.NetworkManager.IP4Config.Nameservers

It will spit out an array of decimal numbers like 17249034. You convert that to hex: 0107330a read it backwards separating the bytes: 0a.33.07.01 and convert back to decimal: 10.51.7.1 which is your upstream DNS server.


Is there a place or software in ubuntu like controol panel add/remove programs

The analogue to Add/Remove porgrams in Ubuntu is USC - Ubuntu software center, which You can start from Your "main Ubuntu" menu. Which is dash in 12.04 and Gnome panel in previous versions. Also in previous versions there was Synaptic package manager, which was something like install/remove utilities and libraries from windows.

Also there is apt (Advanced Package ... something :p) which is very advanced command-line tool for installing applications and other software. (In previous versions also aptitude and dpkg are present)

So if You need to uninstall some package or app, that You know by name, try:

sudo apt-get remove packagename
or try to find it in Ubuntu Software Center, and click uninstall.

You can also install Synaptic pagckage manager to list all the packages present on your system and you can modify them.


Duplex printing settings ignored when printing on Kyosera network printers via ipptool / cups

The problem has been solved in the following way:

Properly installed manufacturer drivers with dependencies using gdebi
Configured these drivers in CUPS, adding them via ipp using network ip address of the printers
Using lp tool for printing using printer name from CUPS, instead of ipptool

It seems ipptool bypassed the CUPS configuration and used default driverless printer while printing via ipptool and printer address ipp://
The problem has been show up in CUPS after printing since there were no active jobs appearing there when used ipptool. After swithcing to lp and proper printer setup via CUPS jobs start appearing there.


First of all, don't use $USER. That's a default environmental variable that holds the current user's username. If the username is the same in all servers and the machine you're running the script on, then fine. But if not, use a different name. In general, avoid using UPPER CASE variable names in bash since the default reserved ones are all capitalized.

That said, you could do something like this:

#!/bin/sh
case $1 in
    1)
        user="user1"
        servername="server1"
        remotemount="remote1"
        localmount="local1"
        portnumber="port1"
        ;;
    2)
        user="user2"
        servername="server2"
        remotemount="remote2"
        localmount="local2"
        portnumber="port2"
        ;;
    3)
        user="user3"
        servername="server3"
        remotemount="remote3"
        localmount="local3"
        portnumber="port3"
        ;;
    *)
        echo "Please use 1, 2 or 3"
        exit 1
        ;;
esac

echo sshfs -o allow_other,defer_permissions -o volname=$user@$servername $user@$servername:$remotemount $localmount -p$portnumber

Then, you run your script giving 1, 2 or 3 as a parameter:

foo.sh 2


How to install 32 bit Ubuntu on 64 bit machine

32 bit operating systems should work fine on 64 bit systems. I think you did something wrong when creating your bootable pen drive.

Maybe this link can help you:
http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-ubuntu


Can I have a live Ubuntu USB with a partition for persistent mode, AND have a partition that allows me to store windows files, on the same drive?

You can store Windows files on the (Live), FAT32 partition, which should be the first partition.

Windows can only see the first partition on a Flash drive.

You can make the Fat32 partition as large as you like.

Edit 2017
mkusb will make such a drive with persistence and data partitions automatically.


"Invalid argument" error when trying to back up to a Windows share

Please send us more information.

How do you have configure deja-dup? Paste some screenshots
What version of deja-dup do you use?
Can you access Windows's Share? try with smb://ip__win_share/share Is
it mounted correctly? Do you use the same credentials?
"Invalid argument" is a poor log error, can you paste all the
text from deja-dup window?
What do you see with this command? sudo deja-dup


How can I create keyboard shortcuts for my nautilus scripts?

Open gconf-editor and set /desktop/gnome/interface/can_change_accels to true. This lets you edit menu shortcuts.
With Nautilus open, go to File menu, then Scripts, then hover over the Script you want to make a shortcut for.
Press the key combination you want to assign to this Script. You should see it appear on the menu.
Navigate off the menu and test it out.

You need to do this from the File menu of Nautilus...simply right-clicking in a Window to obtain the Scripts list does not allow adding shortcuts.

If you want to remove the shortcut, repeat steps 1 and 2, then press Backspace when your Script is highlighted on the menu. This should remove the shortcut.

Note: you might have to do a "nautilus -q" from Terminal before the gconf change takes effect.


Makefile:448: *** missing separator. Stop. error

You likely made an error when copying and pasting the text for Makefile.am and src/Makefile.am from the website

~/amhello % cat src/Makefile.am
bin_PROGRAMS = hello
hello_SOURCES = main.c
~/amhello % cat Makefile.am
SUBDIRS = src
dist_doc_DATA = README

Specifically there are TWO DIFFERENT files here -

src/Makefile.am should contain the two lines

bin_PROGRAMS = hello
hello_SOURCES = main.c

Makefile.am should contain the two lines

SUBDIRS = src
dist_doc_DATA = README

You probably pasted everything (including the line ~/amhello % cat Makefile.am) into your src/Makefile.am file


Package x11 was not found in search path?

You probably haven't installed the X11 libraries:

sudo apt-get install libx11-dev

Looking at your other error, you should also install libpng12-dev, which provides png.h.


Why is bzip2 needed in the kernel patch instructions?

Correct, there does appear to be an extra space character in web100/ web100 that should not be there and will break the command.
I agree, there appears to be no obvious reason for using bzip2 in the example.  Normally one would just do  patch -p1 < ../my.patch.

Have you considered getting in contact with the authors of that webpage and letting them know that they can simplify the instructions?


If you have an AMD GPU in your laptop then this problem can't be solved until the release of Ubuntu 16.04.1 on July 21st. Since Ubuntu 16.04 doesn't support the propriety AMD driver "fglrx". And this is a GPU driver problem.

On the other hand, if you have an nVidia GPU inside. Just go to System Settings -> Software and Updates -> Additional Drivers. Then check the driver of your GPU and install it.


To test, try using using :bwipeout.

If that works, set bufhidden=wipe is what you need. In the vim :help file windows.txt it describes the differences between delete, unload and wipe values for bufhidden as:

  Like :bdelete, but really delete the buffer. Everything related to the buffer is lost. All marks in this buffer become invalid, option settings are lost, etc. Don't use this unless you know what you are doing.


After Ubuntu crash, can't open Audacity as "already running"

Try this:

Open a terminal,Press Ctrl+Alt+T

Run it:

exec sudo -i
rm -f /var/tmp/audacity-$USER/audacity-lock-$USER

And try to open Audacity.


How can I move a Ubuntu installation to a new drive if it has other partitions?

Yes, as suggested by Charles Green, this could have worked, but what's the point.
I did go for a fresh install on the SSD and got everything I needed back up and running in a couple of hours. It has been running very well ever since, good suggestion.


Redshift CLI - how do I prevent redshift from dimming the screen?

Add this to the ~/.config/redshift.conf
If the file isn't there:
cd ~/.config/
touch redshift.conf

Add these:
[redshift]
gamma=0.9

A lower gamma means a dimmer screen.


I've tried installing ubuntu to my mac with rEFIT but it doesnt boot up with it and I dont have the "Install ubuntu alongside osx" button

@Burak

I also had considerable difficulty getting ubuntu to install for different reasons (first of which I am running OS X 10.7, Lion), however I did succeed in getting the amd64 image to install 'alongside'.

There are a few things that are inconsistent with your post.

First thing, is rEFIt is the older (non-supported EFI loader). You need to use rEFInd (rodsbooks.com/refind), especially if you are trying to make a dual boot on Yosemite or Maverick or any number of cat names back to v10.4

The second issue, I had with 10.7 was the instructions to convert the ubuntu-14.04-desktop-amd64.iso into a dmg on a USB stick for rEFInd to load.

I first did this using the ubuntu instructions for building dmg on USB.

The only caveat to the above being that you should use 'unmountDisk' and target /dev/disk'N's1 where 'N' is the number of the device. At last success but no dice with rEFInd. When I booted into any of the bootloaders (oh yea, 3 of which were visible). One of which gave me the error: "No boot device" and two of which took me to the backup grub bootloader. If I chose 'Install ubuntu' I would hear the drums for ubuntu start (as if the OS had loaded), but I would not see anything load at all.

I then tried the same process with the ubuntu-desktop-i386.iso (the 32bit version). Note: I was at first confused because I know my mac has an Intel i7, that was 64bit... but it turns out that there's a long history as to why ubuntu chose 'amd64' as the name for the 64bit version... in any case, no dice with the i386 dmg either and rEFInd.

Then I tried using the really handy tool UNetbootin (unetbootin.sourceforge.net) - thinking maybe I was doing something wrong in building the dmg? But apparently not.

At this point I was getting discouraged. But I thought, well, let's try the old fashioned way. So, I dusted off a 4.7G dvd and burned the ubuntu-14.04-desktop-amd64.iso to disk and then I restarted. Again no dice with rEFInd... but alas! there is a solution.

If you leave the dvd in the drive and boot while holding the 'alt/option' key. You will get another boot menu (one that's stock to mac). You should see your HD, your Recovery HD, and probably two CDs (one that says 'WINDOWS' and one that says 'EFI boot'). In my case if I choose the EFI boot, it will behave the same way as it did in the rEFInd description above.

However, if you choose the 'WINDOWS' cd (contrary to popular belief) it will probably load ubuntu desktop right off the disk and you will be able to choose 'Install Alongside Mac OS X' in about the third or forth option into the install.

Be sure that you followed the instructions for making space with Disk Utility before you attempt to install from the CD. Just leave the space unallocated, and don't make a partition for ubuntu - let 'alongside' option do the work. A fairly good overview of this partition process is here.


Bluetooth "falsely" connecting to device

Simply powering off the pc and turning off and on the power supply did the trick!


How to ping between two machines in VirtualBox?

Change The Network adapter of two Virtual Machine to VirtualBox Host Only Adapter and Reboot The Guest Machines And Try To Ping

Mostly Virtual Machines are connected to NAT network

You cant access the internet in this adapter l. You may use the NAT or Bridged Adapter

Thanks


This is not about the particular bugs you've filed, but general good practice for getting bugs dealt with in a timely manner:

Make sure you've filed the bug report in the correct source package. Bug triagers and developers tend to be subscribed to the bug mail of packages they're interested in or responsible from, so for the relevant people to look into your bug in a timely manner, it needs to be filed with a package specified, and the correct one. If you have trouble determining what the right package is, this wiki page may help.
Make sure your bug contains relevant debugging information. In most cases, filing your report using ubuntu-bug will ensure this, but there's a wealth of information on debugging procedures on the wiki that will also come in handy.
If your report looks all fine, but there's no response for a long time, try announcing it on #ubuntu-bugs on Freenode by citing the bug number to see if any bug triagers around can push it in the right direction. Remember that most triagers and developers are volunteers with constrained time and energy, and being too assertive can discourage people from helping you. If nobody around seems to be able to help, try another time of the day.
If you know the particular people whom you think should be looking into your bug, give them a ping on IRC (you can see people's IRC nicknames in their Launchpad profiles), or subscribe them to the bug explaining why you subscribed them with a polite and concise comment immediately afterwards. Don't assign them; just subscribe them, don't subscribe teams unless specifically instructed to do so, and don't mass-subscribe anyone to multiple bugs at the same time.


what do I need to unzip after downloading ubuntu-13.10-amd64.iso

It is an iso or image file. If you do not have CD / DVD burning software installed, windows defaults to (mis) identifying the file as a .zip file.

You do not extract anything, you either burn a DVD or make a live flash drive. Live flash is more modern (I have not burned a DVD in more then 4 years).

See:

http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-windows

and

https://help.ubuntu.com/community/BurningIsoHowto


How long does it take to finish xfs_repair?

No one can tell. It depends on many factors like drive speed, file system usage, the severity of the damage and such things.


Lubuntu keyboard layout toggle hotkey combination

OK; I finally figured out what the (more user-friendly?) input widget from v14 was called: ibus. IBUS accepts super+space as language toggle, as well as seems to generally just ... well, work. You define control key combinations and it listens and actually acts upon them (which is more than I can say for fcitx). It's available for v15. See https://code.google.com/p/ibus/wiki/Ubuntu for various installation tactics.


How can I install the Electrum bitcoin wallet?

I just tried it on 12.10, and it worked.  Try running this:  just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the commands below.

sudo apt-get update && sudo apt-get upgrade

Then run the steps below in Terminal in the exact order:

sudo apt-get install python-qt4 python-pip
sudo pip install http://download.electrum.org/download/Electrum-1.7.3.tar.gz#md5=22a35b0816f7c6c59fbeddb50e832ada
electrum

Once I ran electrum from terminal, I got a window that opened, and I clicked on create, and took me through the steps of creating a wallet.


Fan going full blast on laptop after suspend

I found a viable solution in this question: Fan runs full speed forever after waking from suspend

The tl;dr is that there was a bit of a bug in v4.10 of the kernel.  The solution is to manually update to the latest version of the Kernel (v4.13 at the time of writing this).  Following the guide from here: https://www.tecmint.com/upgrade-kernel-in-ubuntu/

You'll need to:

Go here: http://kernel.ubuntu.com/~kernel-ppa/mainline/, Scroll to the bottom to find the latest release (I don't recommend getting one marked with RC)
Grab the headers and image for your architecture (You'll probably want the ones marked generic.  I my case I used:

linux-headers-4.13.0-041300_4.13.0-041300.201709031731_all.deb
linux-headers-4.13.0-041300-generic_4.13.0-041300.201709031731_amd64.deb
linux-image-4.13.0-041300-generic_4.13.0-041300.201709031731_amd64.deb

Where you save them to, run sudo dpkg -i *.deb
Reboot your system.

You should be good to go after that.  This issue will probably go away when more up to date versions of the kernel make their way into the Ubuntu repos, but this is what you'll have to do in the meantime.


Wifi disconnecting while downloading file

Real Time throttling means there is a real-time task(s) that are consuming significant amounts of network bandwidth. At some point the system will throttle the connection down in an attempt to keep the system functioning.  In this case, the culprit is likely the app you are using to transfer files with.  Could just need a little tweaking in preferences.

This could be why you are dropping your wifi connection.

Your second question on how to connect and disconnect wifi has many very good answers already in the knowledge base.


Help with triple boot on Macbook Air with external SSD

To install Windows 10 and Linux on a empty external drive (with EFI):

With the bootable USB start your Linux distribution and start the Gparted software.

On the external drive (and make sure it's the right drive and not something else !) reformate the partition table to GPT

make a fat32 partition of 512MiB with the flag "esp"

make a Linux swap partition of the size of your RAM. (Usefull for hibernation. If you want a smaller partition make it at least 2GiB in case your RAM would be full.)

Make a ext4 partition wich leave the half of the disk empty for windows 10. This partition will be used to install Linux.

Before running the installer of Linux, install Windows 10 first to avoid boot problems.

Boot to windows 10 with a bootable USB.

When it ask for installation select "Custom: Install Windows only (advanced)"

You should see the empty part of the drive. Select it and click on "Next"

Windows 10 will be installed.

Reboot to Linux bootable USB

Then run the installer of your ditro. When it ask for installation, select the option named something like "custom partitions" or "something else". Make sure it use the fat32 esp partition for /boot/efi (GRUB 2 will be installed here), the Linux swap partition for the swap and the ext4 partition for / (Linux).

Linux will be installed.

Add a comment to this post if you have questions :)


Very slow internet connection on ubuntu 16.04

I had a similar issue with my system preferring IPv6 over IPv4. To change to preferring IPv4 over IPv6.

Open a terminal

sudo nano /etc/gai.conf

Locate #precedence ::ffff:0:0/96 100 and and remove the #.

You may have to reboot. Should notice the difference quickly


Ubuntu 16.04 fail to launch the upstart script that works in Ubuntu 14.04

I would create a systemd service to /etc/systemd/system/uwsgi.service. And disable the upstart script.

Maybe you will need to tweak the service script it a little bit, like the full path, user and After :

[Unit]
Description=uwsgi
After=network.target

[Service]
PIDFile=/run/uwsgi.pid
ExecStart=/usr/bin/uwsgi --master --processes 4 --die-on-term --socket :3031 --wsgi-file /var/www/myapp.wsgi
User=www-data
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID
PrivateTmp=true

[Install]
WantedBy=multi-user.target


Warning while running lammps-daily on ubuntu 12.04 lts

I got it..
We need to just include at the end of .bashrc
export OMP_NUM_THREADS=4

After this, the warning disappears.
Here, 4 corresponds to no. of cores in the system.


Terminal acts weired while downloading some software

Enabling the  progress bar.

Why it is giving you a step by step install progress is beyond me unless you are hitting enter during the update/install.

You can check for package error, install a new progress bar,or try reinstall the terminal. I would recommend enabling Progress Fancy this should fix the issue and has a great progress bar.

Enable it by using:

echo 'Dpkg::Progress-Fancy "1";' > /etc/apt/apt.conf.d/99progressbar


How to generate a MOV-file from PNG images?

I'd do it with avconv (or ffmpeg),  but you have to do it on the command line.

Install required program

Open the terminal application and install the required programs:

sudo apt-get install libav-tools libavcodec-extra-53 libavdevice-extra-53 libavformat-extra-53 libavutil-extra-51 libpostproc-extra-52 libswscale-extra-2

Go to the directory containing the image sequence:

cd /path/to/images/

Convert:

avconv -i "img%d.png" -r 25 -c:v libx264 -crf 20  -pix_fmt yuv420p img.mov

-i "img%d.png" uses these files as the input, %d is a placeholder for the number
-r 25 the desired frame rate, 25 FPS in this case
-c:v libx264 use the h264 codec x264
-crf 20 the video quality, 20 is pretty high, the default is 23
-pix_fmt yuv420p a compatible pixel format

Note that in contrast to e.g. VLC, older quicktime players are pretty picky about what they play. Be sure to test it in quick time, you may have to adapt the codec options / output format (For example, you could replace img.mov with img.mkv to get a Matroska video)

avconv doc


mysql service starts during boot before its file system is mounted

How can I fix this?

Restore the system like it was before you did ..

  /var/lib/mysql is a mount point for a logical volume

System directories need to be on the same disk for this very reason. The system expects these directories to be available on boot. What you did only works when your logical volume is mounted before the system partition. And that hardly ever is the case.

What you should do, after you fixed this, is edit the setting (the datadir option) for wher MySQL needs to look for the databases. That can be set to another volume as the database is only needed when MySQL is up and running and that happens a lot later in the chain.


Can I use a 12.04 kernel (v3.2) with Ubuntu 14.04 LTS instead of v3.13/4.2?

Note: Changing from r8169 to r8168 may not work in all cases, considering my case and from some other similar posts on older ubuntu versions, it seems like changing the kernel to an old stable version is the best option one has unless it is not fixed in the latest updates.

Finally I installed an older kernel version 3.2.0-83-generic in 14.04 LTS (32bit) manually. It solved my ethernet problem and it seems to be stable enough.

Download the following .deb packages from 1, 2, 3, 4 and install it:

sudo dpkg -i linux-headers-3.2.0-83_3.2.0-83.120_all.deb
sudo dpkg -i linux-headers-3.2.0-83-generic_3.2.0-83.120_i386.deb
sudo dpkg -i linux-image-3.2.0-83-generic_3.2.0-83.120_i386.deb

Change the boot order by editing GRUB_DEFAULT=0 in /etc/default/grub as given here. Then:

sudo update-grub
sudo reboot


Make sure that the disk image exists. I think the space in your command is the issue
-drive file=2020-02-13- raspbian-buster-lite.img,

Should be
-drive file=2020-02-13-raspbian-buster-lite.img

Hope this is it


How do I configure multiple keyboard layouts in Xubuntu 14.04

I'm not sure what all the technical details behind all of this, but here's the method you can use to configure multiple keyboard layouts in latest Xubuntu 14.04.

Open Settings Manager
Launch Input Method
Hit OK and/or Yes
Select None from the list of input methods and click OK probably several times
Open Keyboard Input Methods
In the Keyboard Shortcuts section remove all the keys associated with Next input method command
Open Keyboard, select Layout tab and configure your layouts and shortcuts

In case there is no "Keyboard Input Methods"

Open All Settings
Choose Input Method
Hit OK and/or Yes if you asked (probably several times)
Chose REMOVE
Hit OK and/or Yes until window is closed
Open Keyboard, select Layout tab and configure your layouts and shortcuts

It should work fine now.


How do I share files between a VirtualBox Windows 95 Guest and Ubuntu 18.04 Host?

Windows 95 has SMBv1 file sharing, so:

Enable a private "host" network adapter on VirtualBox.
Power down Windows 95 and add a new or change an existing network adapter on your guest.  (From memory, Windows 95c had an NE2000 network driver, but Google an NE2000 adapter and follow my other answer if this isn't in your version.)
Power up your Windows 95 guest and install Windows File Sharing.
Enable/install samba on your host and create a share.
Edit the samba config to enable SMBv1, while being aware to make it listen only on the private "host-only" VirtualBox network.

Then you should be able to see your host in the "Browse" section of the Windows 95 guest network.

The reason you have to limit this to a private network is because SMBv1 is vulnerable to a ransomware attack which, while not affecting your Linux box, may offer an opportunity for other Windows machines on your network.


How to install WordPress on Linux without root privileges?

First of all, var/www/html is not /var/www/html:

var/www/html will be your current folder + var/www/html like /home/myuser/var/www/html
/var/www/html will be really this folder

Probably it's just a mistypo, but wanted to check this with you cause it's easy to do this kind of failure.

Are you able to find an error number? Like 500? It could be related to a missing apache module. Can you check apache error logs (probably in /var/log/apache2)?


My guess as to what you did wrong is you installed wicd and then after the installation was finished, you didn't completely remove the old network manager by running this command:

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

Therefore you've got two different conflicting network managers, and you can't connect to the internet.


List by "artist" in a folder? How to view meta data of songs in Nautilus?

There is a python script (here) by jmdsdf that adds some extra columns to nautilus that analyzes the Meta data of the MP3s and creates extra columns for viewing.

This is the script:

#!/usr/bin/python

# this script can installed to the current user account by running the following commands:

# sudo apt-get install python-nautilus python-mutagen python-pyexiv2 python-kaa-metadata  python-pypdf
# mkdir ~/.nautilus/python-extensions
# cp bsc-v2.py ~/.nautilus/python-extensions
# chmod a+x ~/.nautilus/python-extensions/bsc-v2.py

# alternatively, you can be able to place the script in:
# /usr/lib/nautilus/extensions-2.0/python/

# change log:
# geb666: original bsc.py, based on work by Giacomo Bordiga
# jmdsdf: version 2 adds extra ID3 and EXIF tag support
# jmdsdf: added better error handling for ID3 tags, added mp3 length support, distinguished
#         between exif image size and true image size
# SabreWolfy: set consistent hh:mm:ss format, fixed bug with no ID3 information
#             throwing an unhandled exception
# jmdsdf: fixed closing file handles with mpinfo (thanks gueba)
# jmdsdf: fixed closing file handles when there's an exception (thanks Pitxyoki)
# jmdsdf: added video parsing (work based on enbeto, thanks!)
# jmdsdf: added FLAC audio parsing through kaa.metadata (thanks for the idea l-x-l)
# jmdsdf: added trackno, added mkv file support (thanks ENigma885)
# jmdsdf: added date/album for flac/video (thanks eldon.t)
# jmdsdf: added wav file support thru pyexiv2
# jmdsdf: added sample rate file support thru mutagen and kaa (thanks for the idea N'ko)
# jmdsdf: fix with tracknumber for FLAC, thanks l-x-l
# draxus: support for pdf files
# jmdsdf: added more error handling for imports (thanks for the idea draxus)

import os
import urllib
import nautilus

# for id3 support
try:
    from mutagen.easyid3 import EasyID3
    from mutagen.mp3 import MPEGInfo
except: print "Python Mutagen library not found?"
# for exif support
try: import pyexiv2
except: print "Python pyexiv2 library not found?"
# for reading videos. for future improvement, this can also read mp3!
try: import kaa.metadata
except: print "Python KAA library not found?"
# for reading image dimensions
try: from PIL import Image
except: print "Python Image library not found?"
# for reading pdf
try: from pyPdf import PdfFileReader
except: print "Python pyPDF library not found?"

class ColumnExtension(nautilus.ColumnProvider, nautilus.InfoProvider):
    def __init__(self):
        pass

    def get_columns(self):
        return (
            nautilus.Column("NautilusPython::title_column","title","Title","Song title"),
            nautilus.Column("NautilusPython::album_column","album","Album","Album"),
            nautilus.Column("NautilusPython::artist_column","artist","Artist","Artist"),
            nautilus.Column("NautilusPython::tracknumber_column","tracknumber","Track","Track number"),
            nautilus.Column("NautilusPython::genre_column","genre","Genre","Genre"),
            nautilus.Column("NautilusPython::date_column","date","Date","Date"),
            nautilus.Column("NautilusPython::bitrate_column","bitrate","Bitrate","Audio Bitrate in kilo bits per second"),
            nautilus.Column("NautilusPython::samplerate_column","samplerate","Sample rate","Sample rate in Hz"),
            nautilus.Column("NautilusPython::length_column","length","Length","Length of audio"),
            nautilus.Column("NautilusPython::exif_datetime_original_column","exif_datetime_original","EXIF Dateshot ","Get the photo capture date from EXIF data"),
            nautilus.Column("NautilusPython::exif_software_column","exif_software","EXIF Software","EXIF - software used to save image"),
            nautilus.Column("NautilusPython::exif_flash_column","exif_flash","EXIF flash","EXIF - flash mode"),
            nautilus.Column("NautilusPython::exif_pixeldimensions_column","exif_pixeldimensions","EXIF Image Size","Image size - pixel dimensions as reported by EXIF data"),
            nautilus.Column("NautilusPython::pixeldimensions_column","pixeldimensions","Image Size","Image/video size - actual pixel dimensions"),
        )

    def update_file_info(self, file):
        # set defaults to blank
        file.add_string_attribute('title', '')
        file.add_string_attribute('album', '')
        file.add_string_attribute('artist', '')
        file.add_string_attribute('tracknumber', '')
        file.add_string_attribute('genre', '')
        file.add_string_attribute('date', '')
        file.add_string_attribute('bitrate', '')
        file.add_string_attribute('samplerate', '')
        file.add_string_attribute('length', '')
        file.add_string_attribute('exif_datetime_original', '')
        file.add_string_attribute('exif_software', '')
        file.add_string_attribute('exif_flash', '')
        file.add_string_attribute('exif_pixeldimensions', '')
        file.add_string_attribute('pixeldimensions', '')

        if file.get_uri_scheme() != 'file':
            return

        # strip file:// to get absolute path
        filename = urllib.unquote(file.get_uri()[7:])

        # mp3 handling
        if file.is_mime_type('audio/mpeg'):
            # attempt to read ID3 tag
            try:
                audio = EasyID3(filename)
                # sometimes the audio variable will not have one of these items defined, that's why
                # there is this long try / except attempt
                try: file.add_string_attribute('title', audio["title"][0])
                except: file.add_string_attribute('title', "[n/a]")
                try: file.add_string_attribute('album', audio["album"][0])
                except: file.add_string_attribute('album', "[n/a]")
                try: file.add_string_attribute('artist', audio["artist"][0])
                except: file.add_string_attribute('artist', "[n/a]")
                try: file.add_string_attribute('tracknumber', audio["tracknumber"][0])
                except: file.add_string_attribute('tracknumber', "[n/a]")
                try: file.add_string_attribute('genre', audio["genre"][0])
                except: file.add_string_attribute('genre', "[n/a]")
                try: file.add_string_attribute('date', audio["date"][0])
                except: file.add_string_attribute('date', "[n/a]")
            except:
                # [SabreWolfy] some files have no ID3 tag and will throw this exception:
                file.add_string_attribute('title', "[no ID3]")
                file.add_string_attribute('album', "[no ID3]")
                file.add_string_attribute('artist', "[no ID3]")
                file.add_string_attribute('tracknumber', "[no ID3]")
                file.add_string_attribute('genre', "[no ID3]")
                file.add_string_attribute('date', "[no ID3]")

            # try to read MP3 information (bitrate, length, samplerate)
            try:
                mpfile = open (filename)
                mpinfo = MPEGInfo (mpfile)
                file.add_string_attribute('bitrate', str(mpinfo.bitrate/1000) + " Kbps")
                file.add_string_attribute('samplerate', str(mpinfo.sample_rate) + " Hz")
                # [SabreWolfy] added consistent formatting of times in format hh:mm:ss
                # [SabreWolfy[ to allow for correct column sorting by length
                mp3length = "%02i:%02i:%02i" % ((int(mpinfo.length/3600)), (int(mpinfo.length/60%60)), (int(mpinfo.length%60)))
                mpfile.close()
                file.add_string_attribute('length', mp3length)
            except:
                file.add_string_attribute('bitrate', "[n/a]")
                file.add_string_attribute('length', "[n/a]")
                file.add_string_attribute('samplerate', "[n/a]")
                try:
                    mpfile.close()
                except: pass

        # image handling
        if file.is_mime_type('image/jpeg') or file.is_mime_type('image/png') or file.is_mime_type('image/gif') or file.is_mime_type('image/bmp'):
            # EXIF handling routines
            try:
                img = pyexiv2.Image(filename)
                img.readMetadata()
                file.add_string_attribute('exif_datetime_original',str(img['Exif.Photo.DateTimeOriginal']))
                file.add_string_attribute('exif_software',str(img['Exif.Image.Software']))
                file.add_string_attribute('exif_flash',str(img['Exif.Photo.Flash']))
                file.add_string_attribute('exif_pixeldimensions',str(img['Exif.Photo.PixelXDimension'])+'x'+str(img['Exif.Photo.PixelYDimension']))
            except:
                # no exif data?
                file.add_string_attribute('exif_datetime_original',"")
                file.add_string_attribute('exif_software',"")
                file.add_string_attribute('exif_flash',"")
                file.add_string_attribute('exif_pixeldimensions',"")
            # try read image info directly
            try:
                im = Image.open(filename)
                file.add_string_attribute('pixeldimensions',str(im.size[0])+'x'+str(im.size[1]))
            except:
                file.add_string_attribute('pixeldimensions',"[image read error]")

        # video/flac handling
        if file.is_mime_type('video/x-msvideo') | file.is_mime_type('video/mpeg') | file.is_mime_type('video/x-ms-wmv') | file.is_mime_type('video/mp4') | file.is_mime_type('audio/x-flac') | file.is_mime_type('video/x-flv') | file.is_mime_type('video/x-matroska') | file.is_mime_type('audio/x-wav'):
            try:
                info=kaa.metadata.parse(filename)
                try: file.add_string_attribute('length',"%02i:%02i:%02i" % ((int(info.length/3600)), (int(info.length/60%60)), (int(info.length%60))))
                except: file.add_string_attribute('length','[n/a]')
                try: file.add_string_attribute('pixeldimensions', str(info.video[0].width) + 'x'+ str(info.video[0].height))
                except: file.add_string_attribute('pixeldimensions','[n/a]')
                try: file.add_string_attribute('bitrate',str(round(info.audio[0].bitrate/1000)))
                except: file.add_string_attribute('bitrate','[n/a]')
                try: file.add_string_attribute('samplerate',str(int(info.audio[0].samplerate))+' Hz')
                except: file.add_string_attribute('samplerate','[n/a]')
                try: file.add_string_attribute('title', info.title)
                except: file.add_string_attribute('title', '[n/a]')
                try: file.add_string_attribute('artist', info.artist)
                except: file.add_string_attribute('artist', '[n/a]')
                try: file.add_string_attribute('genre', info.genre)
                except: file.add_string_attribute('genre', '[n/a]')
                try: file.add_string_attribute('tracknumber',info.trackno)
                except: file.add_string_attribute('tracknumber', '[n/a]')
                try: file.add_string_attribute('date',info.userdate)
                except: file.add_string_attribute('date', '[n/a]')
                try: file.add_string_attribute('album',info.album)
                except: file.add_string_attribute('album', '[n/a]')
            except:
                file.add_string_attribute('length','error')
                file.add_string_attribute('pixeldimensions','error')
                file.add_string_attribute('bitrate','error')
                file.add_string_attribute('samplerate','error')
                file.add_string_attribute('title','error')
                file.add_string_attribute('artist','error')
                file.add_string_attribute('genre','error')
                file.add_string_attribute('track','error')
                file.add_string_attribute('date','error')
                file.add_string_attribute('album','error')

        # pdf handling
        if file.is_mime_type('application/pdf'):
            try:
                f = open(filename, "rb")
                pdf = PdfFileReader(f)
                try: file.add_string_attribute('title', pdf.getDocumentInfo().title)
                except: file.add_string_attribute('title', "[n/a]")
                try: file.add_string_attribute('artist', pdf.getDocumentInfo().author)
                except: file.add_string_attribute('artist', "[n/a]")
                f.close()
            except:
                file.add_string_attribute('title', "[no info]")
                file.add_string_attribute('artist', "[no info]")

        self.get_columns()


Yay, found the solution.

For some odd reason the Ubuntu SDK is installed in an unusable state. The IDE does not know the Qt version to use. To remedy the problem you have to follow the steps described in following answer:
Steps to set the right Qt version

Thanks for that well explained answer, to Majster-pl


I know this question is very old but the behaviour still remains in Ubuntu 16.04

There is a bug report / feature request which sheds light on what is going on here

To summarise:

The deluser --remove-all-files USER command scans for files owned by USER and deletes them.

  /usr/sbin/deluser: Cannot handle special file /proc/767/task/767/fd/2

  ...

  /usr/sbin/deluser: Cannot handle special file /lib/systemd/system/halt.service

  ...

  /usr/sbin/deluser: Cannot handle special file /dev/input/by-path/platform-i8042-serio-1-event-mouse

Are WARNINGS ONLY saying that the command can't handle this particular file because its a special file. IT HAS NOT TRIED TO DELETE THIS FILE It just can't run it's checks on it. ;-)

If you look back at the warnings you should find that they are all for file in /dev, /proc, /run or special system files like mountnfs.service which aren't normal files.

You should be able to safely ignore these warnings.


How can I list all packages I've installed from a particular repository?

There seems to be no record of the origin of an installed package.

If you are fine with getting the location from whence a package of the
same name would be downloaded from, this is available through
apt-cache policy. The following (rather ugly) script does the trick
for me:

LC_ALL=C dpkg-query --showformat='${Package}:${Status}\n' -W '*' \
  | fgrep ':install ok installed' \
  | cut -d: -f1 \
  | (while read pkg; do
       inst_version=$(apt-cache policy $pkg \
                                | fgrep Installed: \
                                | awk '{ print $2 }');
       origin=$(apt-cache policy "$pkg" \
                          | fgrep " *** ${inst_version}" -C1 \
                          | tail -n 1 \
                          | cut -c12-);
       echo $pkg $origin;
     done)

Note that it's quite fragile, as it makes assumptions about the output
of apt-cache policy, which might change across versions...


How do I solve Unmet dependencies error with apt

If you do not use Emacs27, you can purge its PPA by
sudo apt-get install ppa-purge
sudo ppa-purge ppa:kelleyk/emacs

and then install upgrades and interrupted packages by
sudo apt-get -f install
sudo apt-get upgrade


meson error: Native dependency mtdev' not found / pkg-config problem?

You need to install the libmtdev-dev package:

$> sudo apt-get install libmtdev-dev

Meson and pkg-config are typically looking for the development files of libraries and systems (the header files *.h and the development libraries lib*.so and lib*.a).

In Ubuntu (and Debian, and distros derived from these two), development files are typically stored in packages with the -dev suffix. So you usually want to search for those packages when fixing build dependencies on Ubuntu.


Procedure: How to create mirror RAID via ZFS on a fresh install of Ubuntu 20.10?

I may be wrong but i don't think you can convert installed system like that into zfs mirror and use the entire disk. The install is divided into few steps, this was for the Ubuntu 18 but this is probably very similar to 20.04.
EFI check
Preparations
Install the ZFS module in the live (loaded) kernel
Find the disks
Prepare the disk(s)
Install Ubuntu
Chroot and prepare the jail
Install ZFS 0.8 packages
Install and configure the bootloader
Cloning the EFI partition
Configure the boot pool import, and remaining settings
Found a very detailed guide which follows the steps in a copy paste setup.  https://saveriomiroddi.github.io/Installing-Ubuntu-on-a-ZFS-root-with-encryption-and-mirroring/.
I hope this helps you. I don't think that the setup is trivial.


You can use your ubuntu computer to create a wireless hotspot.
This allows other devices to connect to you without a separate network, and allows you to share an internet connection you've made with another interface, such as to a wired network or over the cellular network.

Click the icon at the very right of the menu bar and select System Settings.

Open Network and select Wireless on the left.

Click the Use as Hotspot button.

If you are already connected to a wireless network, you will be asked if you want to disconnect from that network. A single wireless adapter can only connect to or create one network at a time. Click Create Hotspot to confirm.
 Refer this link:
https://help.ubuntu.com/stable/ubuntu-help/net-wireless-adhoc.html


You deleted the Ubuntu partition, in turn deleting /boot which is where GRUB lives. The simple way is to reinstall Ubuntu and all shall be peaceful...


Check write permissions in your mounts :

Type cat /etc/mtab and find your ecrypt device
Remount the partition with read/write permissions : sudo mount -i -o remount,rw /path/to/your/Device/or/.Private


Download psmouse-alps-1.3: http://www.dahetral.com/public-download/alps-psmouse-dlkm-for-3-2-and-3-5/view Then (using sudo / root):

Extract the folder psmouse-alps-1.3 to /usr/source
cd to /usr/source
dkms add psmouse-alps-1.3
dkms autoinstall
rmmod psmouse && modprobe psmouse

Bam! Working multitouch! :-)

(See also https://bugs.launchpad.net/ubuntu/+source/linux/+bug/606238/)
 - Tested on Dell M4700, Xubuntu 12.04


How do I get the SD card slot to work on my Dell Latitude 2120?

It's not the same model, but I have a realtek in my HP (RTS5229) and the Realtek drivers from here work perfectly.


Why am I unable to make/use custom resolutions?

I think I just found a way.The final error message implies that you  had already set the resolution earlier.

Despite the fact that you cannot see your desired resolution on the display panel, the OS has it somewhere.

If the resolution was 1600x900, set it using the following command;

xrandr --size 1600x900

This becomes your new resolution and will be visible from the display panel.


Bluetooth fix for Ubuntu 12.04, lenovo G580

0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
1: ideapad_wlan: Wireless LAN
Soft blocked: no
Hard blocked: no
2: ideapad_bluetooth: Bluetooth
Soft blocked: no
Hard blocked: no


setting a display scale of second monitor large than primary monitor

Just go to Settings > Display > Select specific monitor and set scale.


Ubuntu 13.10 broken login-box on login-screen

I have solved the problem. I got into tty via Ctrl+Alt+F1 and repeared the lightdm config file:

sudo /usr/lib/lightdm/lightdm-set-defaults -m true
sudo /usr/lib/lightdm/lightdm-set-defaults -l true
sudo /usr/lib/lightdm/lightdm-set-defaults -R true


I found out.

It's now Ctrl+Tab and Ctrl+Shift+Tab.


How can I hide dock in application menu from GNOME Shell?

You may use a GNOME shell extension called "Hide Dash X" to achieve your goal.

Other alternative extensions:

Remove Dash
No Dash in Overview

Simply removing gnome-shell-extension-ubuntu-dock would not get rid of the GNOME dash. The dash is a default feature of GNOME shell. It only in appears Activities overview or Applications overview ("Show Applications" screen).
The gnome-shell-extension-ubuntu-dock package is an Ubuntu-only modification (a fork of the Dash to Dock extension), which converts the dash into a customisable dock. The dock appears anywhere, not just in Activities or Applications overview, and also has some other extra features.
So removing the package would only remove the dock-like feature, but the dash will stay as it is since it's an inbuilt feature of GNOME shell.


Copy files of same name into same directory

Shell script and its usage

This can be done with a simple shell script which makes use of find ...|while read var ; do ... done structure ( very common in dealing with filenames ). The bash script below operates on current (top-most) directory and takes single argument for destination.

#!/bin/bash
find -name "genome.txt" -print0 | while IFS= read -r -d '' path
do
    base=$(basename --suffix=".txt"  "$path")
    new_path="${1%/}"/"$base"$counter".txt"
    echo "$path" "$new_path"
    counter=$(( $counter +1 ))
done

>>>NOTE<<<: script uses echo just for testing purposes. When you are satisfied with resulting paths, replace echo with mv to move all filenames or cp to copy all filenames.

Example:

bash-4.3$ tree
.
├── destination
├── dir1
│   └── genome.txt
├── dir2
│   └── genome.txt
├── dir3
│   └── genome.txt
└── move_enumerated.sh

4 directories, 4 files
bash-4.3$ ./move_enumerated.sh  ./destination
./dir2/genome.txt ./destination/genome.txt
./dir3/genome.txt ./destination/genome1.txt
./dir1/genome.txt ./destination/genome2.txt

Improving the script for more flexibility

This script can be further improved to make it more general, where user can specify filename , top directory to traverse, and destination all as command-line arguments:

#!/bin/bash
find "$2"  -name "$1" -print0 | while IFS= read -r -d '' path
do
    base=$(basename --suffix=".txt"  "$path")
    new_path="${3%/}"/"$base"$counter".txt"
    echo "$path" "$new_path"
    counter=$(( $counter +1 ))
done

Test run:

bash-4.3$ ./move_enumerated.sh "genome.txt"  "./testdir" "./testdir/destination"
./testdir/dir2/genome.txt ./testdir/destination/genome.txt
./testdir/dir3/genome.txt ./testdir/destination/genome1.txt
./testdir/dir1/genome.txt ./testdir/destination/genome2.txt

Syntax and theory of operation

Over all the script makes use of command | while read variable ; do ... done structure. This is a very common approach, and it is frequently used to avoid dealing with ls and difficult filenames that can break scripts.

On the left side of the pipe we have find command, which takes directory as argument ( and if that's not given, GNU find which is used in Linux assumes . - the current working directory ). The other options include -name which is the specific filename that we are searching, and -print0 which is used to output results as delimited via non-printable \0 character. It is frequently used to avoid splitting on newline or other characters, because those characters can potentially appear within the filename itself and as a result break the script.

On the right side of the pipe we have while IFS= read -r -d '' ; do . . . done structure. The while loop with read shell built-in is frequently used to real stdin input, which in this case comes from the pipe. IFS= -r and -d '' are necessary to ensure that  we receive filenames safely and recognize that each item is delimited with \0.

The rest of the script is fairly easy. We extract basename of the file using basename command. Since in this case we're dealing specifically with known extension and expect to have single dot in the filename, we can use --suffix=".txt" to strip that part out , leaving genome part. We then build new path to file via joining destination , basename, and counter variable. Notice that we use parameter expansion with "${3%/}"
argument (destination folder) in our improved script. This is done to ensure that regardless of whether or not user added / character at the command-line ( ./destination or ./destination/ ),  we extract only bare directory name, and join it via different / with basename. Notice also that counter variable is not set initially, so the first filename that we receive, will be plain genome.txt After than, counter variable will be incremented and thus created and will show up when we deal with other filenames.

For more info , please read Filenames and Pathnames in Shell: How to do it Correctly.


Install Ubuntu 14.04 alongside with windows7

It sometimes can happen that certain partitions/OS's aren't detected, due to various reasons. But the installer always offers you the option to do "Something else".

When you select the "Something else" option, you're being presented with a partitioning screen. Now do the following:

If you want to use swap memory (recommended, hard drive memory reserved for RAM outsourcing, e.g. when the RAM is full or when you hibernate), delete the new 130GB partition. In the new space, create a partition with the size of your RAM, and format it as swap.
If you followed the instructions in step 1, create a new EXT4 partition filling the remaining space. Else, simply reformat the new 130GB partition as EXT4. Give this partition the mount point /.
In the drop down menu at the bottom, select where the boot loader is going to be installed. If you're using UEFI, select the EFI partition (ca. 500MB, FAT32). If you're using Legacy BIOS, select the hard drive itself, e.g. /dev/sda, to install the bootloader in the drive's MBR.
Click the installation button.

After the installation, reboot the computer. You should then see a menu which asks you which OS to boot. If this menu doesn't appear, or Windows 7 isn't listed there, boot into Ubuntu, and open the file /etc/default/grub with a root text editor: sudo nano /etc/default/grub.

Change the line

GRUB_TIMEOUT=0 #Time the os selection menu is being shown

to

GRUB_TIMEOUT=10 #Or any other number of seconds you prefer

Save with Ctrl+O and exit with Ctrl+X. Now run sudo update-grub to apply the changes to the boot loader. At the next boot, Windows should appear in the selection menu.


First, boot into recovery mode.
Second, drop to root shell
Third, run mount -o remount,rw /
Fourth, nano /etc/fstab and remove the offending entries.
Fifth, reboot; we are done here.


Laptop Shut down during installation of Ubuntu 12.04

If you were going to delete Windows anyway than nothing bad has happened. You just need to go into BIOS setup (by pressing F2 or Del while on the "Gateway startup screen") and make sure your CD drive or USB stick comes first in the list of boot devices. Then you reboot and the machine should start booting from the Ubuntu media.


Ubuntu 10.04 cannot detect the monitor, low resolution produced, does this guide work?

I would guess that guide is likely be helpful.

More to the point, if you are careful, you wouldn't need to reformat even if it doesn't work.  By careful I mean:

Taking good notes about what changes you're making
Making backups of all files you change
Type carefully, or copy/paste commands

If you do these things and something goes wrong, worst case, you would need to use a liveCD to change the settings back to the way they were.


press ctrl+alt+F1 to login into virtual console,and run the below commands on it,

sudo apt-get install --reinstall ubuntu-desktop
sudo apt-get install --reinstall unity
sudo shutdown -r now

After restarted,you will get back to your default desktop.


apt error while using boot-repair in a live session

Get rid of the failing package it is useless in the state it is in. apt remove yaru-theme-gnome-shell This should allow it to complete the install of the packages the boot-repair wants installed. Then repeat the command it told you to do.


If a PPA application crashes Unity on exit, do I file a bug against the app or Unity?

Note: In general, PPA applications are not supported by Ubuntu/Canonical in any official way. (They are personal package archives, after all :-)

In your case, since it appears that only one particular PPA application is causing this problem, I highly recommend filing a bug with them first. After following their instructions for troubleshooting (if any), if the developers recommend filing a bug against Unity, certainly do so.

If you had more than a few different applications crashing Unity, you could consider filing a bug directly against it, but not in this situation.


These are instructions for getting xfinity to work in Linux, without a VM or Playonlinux. Playonlinux was slow and crashed for me. I am sharing these instructions since setting this back up after I upgraded my system took too long.

The solution for xfinity on Linux is Firefox + Pipelight + UA override.

Assume Firefox is installed. No Silverlight in Chromium or Chrome, so that will not work.
Install Pipelight (pipelight.net/cms/installation.html)
Install x64 Flash (assuming you're using a 64 bit machine)

sudo pipelight-plugin --unlock x64-flash
sudo pipelight-plugin --enable x64-flash

Install Silverlight

sudo pipelight-plugin --unlock silverlight
sudo pipelight-plugin --enable silverlight

Change to Windows user agent

Since this is all I will use Firefox for, make the change for everything and permanant. See How to Change Your Browser’s User Agent Without Installing Any Extensions on How-To Geek.

  Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1

Verify Windows user agent, Silverlight version, Flash version. OS does not matter. Visit this address:
http://xfinitytv.comcast.net/computer
Enjoy xfinity on Linux!


How to install OpenGL 4.0 or 4.5 for developing?

Mesa is the GL library used. Ubuntu 16.04 includes Mesa 11.2 which supports OpenGL 4.1. Just install the libgl1-mesa-dev and mesa-common-dev packages to install the development files for it.

If you really need 4.5, you will likely need to develop against the propreitary AMD or NVidia drivers, and you will need a card which actually supports 4.5 to run any software you create using that version of the API.


Unable to login after deleting my home partition?

You'll need to do two things
1 Recreate /home and update /etc/fstab to mount it in the proper place
2 Recreate your /home/username folder by copying /etc/skel
Step 1
Boot a live disk (or your OS if you can) and create a filesystem where your /home partition used to be. Find the UUID of this partition by matching up it's entry in ls -l /dev/disk/by-uuid or by using blkid. Update the entry in /etc/fstab to match this new number.
Step 2
Also from the live environment, copy /etc/skel to your new home partition (after mounting it on say, /mnt) and rename it to your user's shortname. E.g., cp -R /etc/skel /mnt/username. Lastly, take ownership of everything in your homedir. This will be tricky as you don't know your numeric UID. Easy way is to make it all chmod -R 777 /home/username/ and then chown -R root:root /home/username and then reboot to your resotred user account and do the same but with your username. You will have to redo all of your settings, but it is better than nothing.


Many thanks to @Lety for pointing me where to look for the answer. Nested loops worked perfectly.

#!/bin/bash

outer=1
for x in *.hmm
do
    mkdir $x.dir
    inner=1
    for i in *.emitcons
    do
        program --different_output $i.$x.1mtblout $x $i> $i.$x.1mout
        rm $i.$x.1mout
        let "inner+=1"
    done
    for f in *.1mtblout
    do
        [[ -n $(awk 'NF{i++} END {if (i<14) print FILENAME}' "$f") ]] && rm "$f"
    done
    for i in *.1mtblout
    do
        grep -v '^#' $i >> $i.trim
    done
    for i in *.trim
    do
        echo $i >> $x\_trim_table
        sed -i -e '$a\' $x\_trim_table
        cat $i >> $x\_trim_table
        sed -i -e '$a\' $x\_trim_table
    done
    let "outer+=1"
echo
done
exit 0

...and much more, but it all works perfect.


rsa ssh public key fails ubuntu 12.04 desktop edition, works when logged into GUI

Sounds like you probably used ecryptfs to encrypt your home directory. It's the "Encrypt your home directory?" option during the installation.

With this option enabled, your home directory (including .ssh/authorized_keys) can't be read until you've logged in once (either into Unity or via SSH with a password). This triggers the ecryptfs to be decrypted and mounted, making authorized_keys readable again.

Workaround:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/362427/comments/12


How to remap “ctrl+w+shift+f” to “gf” in vim to go to line of file under cursor in split window?

You can use a normal mode map:

nnoremap <leader>f <c-w>F

I have used Leader instead of g, since Leader is typically used for defining such custom shortcuts. It has the default value of \, so you would type \f in normal mode. <c-w> is Vim's notation for CtrlW, and Shiftf is, well, F.


Sure, the ubuntu installer will handle both questions automatically. You only will have to select the partition to install ubuntu. One thing: Drive D, will probably be sda2 in ubuntu but you will be able to see which partition is what by the different sizes.

Regarding question1, installing on a separate partition is the only good way to install it in my opinion. Anyways, this is the default way, if you have only 1 partition with windows, the installer will split it and install ubuntu on the 2nd one.


How to boot from CD / DVD and install from USB?

I came across this article that suggested to burn a cd with PLoP. that should work, however when you are burning a new cd I don't really see a reason not to bur Xubuntu to a cd directly. although while writing I can imagine that Xubuntu does not fit on a cd and a old computer might not have a dvd drive.


chrome download interrupted leaving ".crdownload" temporary file

It seems like apparmor is blocking Chromium to save files to non standard directories.
I expected adjusting the /etc/apparmor.d/abstractions/user-download file would do the trick, but it only fixed the same issue I had with Firefox.  In Chromium I'm still getting the same interrupted downloads when saving to external media.

I added owner /media/** rwl, to /etc/apparmor.d/abstractions/user-download.

There seem to be issues with the current Chromium build related to this, causing the error when saving to NTFS / FAT file systems as these don't support chmod.
Link to issue on Chromium codebase

I just tested with a daily stable build from their ppa but this doesn't help.. Version is  16.0.912.75 (Developer Build 116452 Linux) Ubuntu 11.10


I did this:

sudo aptitude install printer-driver-escpr

and after that, this driver appeared: EPSON XP-530 Series , Epson Inkjet Printer Driver (ESC/P-R) for Linux — which seems to work fine, although I have an XP-540 not XP-530.

(Before that, I also installed imagescan-bundle-ubuntu-16.04-1.3.20.x64.deb.tar.gz, which I downloaded from here: http://support.epson.net/linux/en/imagescanv3.php?version=1.3.20#ubuntu, and I also: sudo aptitude install lsb — not sure which (if any) of these things were actually needed. They did not make the printer work.)


audio problems Ubuntu 20.04 intel nuc 8i7hvk

I have a similar nuc, but the 8i7hnk variety. The built-in audio should be the regular line-out headphone jack, you should get sound output to that jack when you select that as the output.
For the crackling problem going out of HDMI, I found the solution was to edit a line in /etc/pulse/default.pa from
load-module module-udev-detect

to
load-module module-udev-detect tsched=0

Then, restart your machine or just restart pulseaudio:
systemctl --user restart pulseaudio

For some details about what this setting does, see For pulseaudio what does tsched do (and what are the defaults)?


printer OKI B430dn worked on Ubuntu 12.04, doesn't on 14.04

Have you tried what is in the readme of the Oki package?

3.0 INSTALLATION
 a) login as root
    # su - root
 b) execute install.sh
    # ./install.sh

5.0 CREATE QUEUE(S)
 a) start a browser
 b) populate location bar with 'http://localhost:631'
 c) follow prompts to create queue
 d) select Make - 'OKI'
 e) select Model - 'OKI B4000 / B400 / MB400 PS'
 f) follow remaining prompts until queue is created

Contents of package is:
     COPYING
     OK400PS.ppd
     install.sh
     okijobaccounting
     readme.pdf
     uninstall.sh


ubuntu acts as if shift key is being pressed

Sometimes this type of thing can be caused by low battery power in keyboard/mouse HID devices  (bluetooth or RF).
They send corrupted data stream to the host, which then causes the rather random behaviour you experience.
It can seem intermittent, so worth checking batteries.
There can be other causes but since this one has an easy diagnostic it can be checked easily.


When terminal is opened can I get current calendar and time displayed?

Improved Version
You can see the improved version here: https://askubuntu.com/a/1020693/307523
It looks like this:

Original Version

You can print an introduction banner when the terminal is opened using the ~/.bashrc script. If you have figlet (sudo apt install figlet) you can take advantage of large letters to display the time:

In the first instance figlet is used to display the time and in the second a regular font is used.
Additional screen examples using toilet

This screen uses fonts from the toilet package. The last example uses future font and is used in the code below. Additionally, the calendar is set to cyan color in the code below.
The toilet package allows additional font types and formatting styles over the figlet package which it is forked from. To install the package use sudo apt install toilet after installing figlet as described above.
The code
Here is the code you need to make it all work. It's recommended to place this script in your /home/user/bin directory as it is automatically added to your path. This script is named now but you can use any unique name you like.
#!/bin/bash

# NAME: now
# PATH: $HOME/bin
# DESC: Display current calendar and time
# CALL: Called from terminal or ~/.bashrc
# DATE: Apr 6, 2017. Modified: Apr 10, 2017.

# NOTE: To display all available toilet fonts use this one-liner:
#       for i in ${TOILET_FONT_PATH:=/usr/share/figlet}/*.{t,f}lf; do j=${i##*/}; toilet -d "${i%/*}" -f "$j" "${j%.*}"; done

# calendar current month with today higlighted.
# colors 00=bright white, 31=red, 32=green, 33=yellow, 34=blue, 35=purple,
#        36=cyan, 37=white
printf "\033[36m"       # color 36=cyan
echo ""; cal;
printf "\033[00m"       # color bright white (default)
echo ""

tput sc                 # Save cursor position.
# Move up 9 lines
while [ $((++i)) -lt 10 ]; do tput cuu1; done
tput cuf 25             # Move 25 columns right

# Do we have the toilet package?
if hash toilet 2>/dev/null; then
    echo " "$(date +"%I:%M %P")" " | \
        toilet -f future --filter border > /tmp/terminal
# Do we have the figlet package?
elif hash figlet 2>/dev/null; then
    echo $(date +"%I:%M %P") | figlet > /tmp/terminal
# else use standard font
else
    echo $(date +"%I:%M %P") > /tmp/terminal
fi

while IFS= read -r Time; do
    printf "\033[01;32m" # color green
    printf "$Time"
    tput cud1           # Up one line
    tput cuf 25         # Move 25 columns right
done < /tmp/terminal

tput rc                 # Restore saved cursor position.

exit 0

Mark script as executable
Copy this code into your editor and save it to the file now. Next mark it as executable using:
sudo chmod +x now

Add script to ~./bashrc
Once this is completed you can type now in the terminal and you will see the calendar and time. To wrap it all up and have it automatically displayed each time you open the terminal:

Edit the file ~/.bashrc
Go to the end and insert a new line containing now
Save the file

Now when opening the terminal you will be greeted with the current day highlighted on current month's calendar followed by the current time.
Dissecting the code
Here we'll briefly look at how the code works without discussing every line.
figlet and toilet packages
The script first checks if toilet is installed with the hash command. If so that is used to display time. If not figlet is used if installed. If neither are installed a regular font is used.
In the code above a comment can be copied to your command line and executed to show available figlet and toilet fonts on your terminal:
for i in ${TOILET_FONT_PATH:=/usr/share/figlet}/*.{t,f}lf; do j=${i##*/}; toilet -d "${i%/*}" -f "$j" "${j%.*}"; done

To change the font used for time display search the code for this line:
toilet -f future --filter border > /tmp/terminal

and change the font name future to the font name you choose. Keep in mind some fonts are too large to fit on the display.
Selecting colors
Set the color you want for the calendar and the time separately. In the above code, notice the command:
printf "\033[36m"       # color 36=cyan

Change the last two digits to the color code you want to use. From tinkering with the code I found these values:

00=bright white, 31=red, 32=green, 33=yellow, 34=blue, 35=purple, 36=cyan, 37=white

If you find additional color codes please post a comment below or update this answer.


What is colord-sane and why does it show up on lsof internet watch?

colord is a system service that makes it easy to manage, install and generate color profiles to accurately color manage input and output devices.

It does a lot of things and is deep integrated into the system, see http://www.freedesktop.org/software/colord/intro.html


Install DWA-131 WiFi dongle driver under Ubuntu 14.04.4

Please open a terminal and, with a temporary working internet connection, do:

sudo apt-get install git
git clone https://github.com/Mange/rtl8192eu-linux-driver.git
cd rtl8192eu-linux-driver
make
sudo make install
sudo modprobe 8192eu

Your wireless should now be working.

You will have installed the driver for your current kernel version only. After Update Manager installs a later kernel version, also known as linux-image, after the requested reboot, you must recompile:

cd rtl8192eu-linux-driver
make clean
make
sudo make install
sudo modprobe 8192eu

Please retain the file and these instructions for that time.


How can I find the executable path of php?

The default executable can be found with:

which php

which, on my system, results in /etc/bin/php. However, if I list this file, it turns out that it is a symbolic link to /etc/alternatives/php:

$ ls -l /usr/bin/php
lrwxrwxrwx 1 root root 21 mei 10  2016 /usr/bin/php -> /etc/alternatives/php

This, in turn, is (on my system) a symbolic link to /etc/bin/php7.2:

$ ls -l /etc/alternatives/php
lrwxrwxrwx 1 root root 15 jun 20  2018 /etc/alternatives/php -> /usr/bin/php7.2

And this is the actual executable:

$ file /usr/bin/php7.2
/usr/bin/php7.2: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/l, for GNU/Linux 3.2.0, BuildID[sha1]=1b669fd85cfcca25b9733cacf7e7ebaafc0ce17e, stripped


My boot screen for Lubuntu doesn't load correctly. How can I fix that? Thanks!

Ensuring that you have the correct graphic drivers for your hardware should fix the boot splash animation.


I never did figure out why folders were not ignoring properly.  However, I went back and selectively chose which folders to backup, rather than select which ones to ignore.  In other words, I setup a whitelist to backup rather than a blacklist to ignore.

This isn't really an answer, but a work around that gets the job done.


Ubuntu 16.04: Dual monitor will not change resolution

I somehow fixed this issue but I'm not sure why it worked.

This is what happened:

1) Change monitor resolution to 1600x900, click 'apply'

2) Dual monitor loses connection.

3) click "keep configuration"

4) Change monitor resolution to 1920 x 1080 16:9, click 'apply'

5) click "keep configuration"

6) Screen still has no connection

7) Toggle the second monitor from 'on' to 'off', click 'apply'

8) Hit 'restore to previous configuration'

9) The monitor shows the display again in 1920 x 1080 16:9

10) Change resolution to 1600x900

For whatever reason, this time the resolution changes without losing the signal. I think step 7 and 8 is what fixed it.


How to change "Global Dark Theme" on and off through Terminal?

To set the global dark theme from the command line, first navigate to a Terminal of your choice and then from within the shell emulator ...

Navigate to your home directory:

 cd ~

Create a new file called settings.ini inside of the GTK 4 directory:

 nano ~/.config/gtk-4.0/settings.ini

Enter the following fields into the configuration file:

[Settings]
gtk-application-prefer-dark-theme=1

Write the changes to disk by pressing control + x, then press y, then enter.


Assigning 2 Permanent IP Addresses In 18.04 Desktop

Add another IP-address via a GUI:

Open the network settings / connection details (the exact steps depend on the desktop environment you are using)
select the IPv4 tab

click on the Add button
fill the values you want into the fields
click on Save


Bash script with smaller scripts internally

The correct solution for you depends on what you want:

Combining the scripts with && will only execute the second if the first exits successfully
Combining the scripts with || will only execute the second if the first doesn't exit successfully

If you want the second command to be executed after the first no matter whether it exits successfully or not, you can use either ; or & wait:

bash script1.sh ;
bash script2.sh & wait
bash script3.sh


Is it possible to set a defined area for multitouch gestures on an Synaptics touchpad?

You can specify edges for touchpad as well as manipulate them. There are much more options.

First of all list your configurations.

synclient  -l | awk '/=/{printf "Option \"%s\" \"%s\"\n",$1,$3}'

and try changing them to your need. Here is the sample. I think you should look into this as well.

First test temporarily with synclient command

E.g.

synclient LeftEdge=####

After you are satisfied with your test make it permanent in the /usr/share/X11/xorg.conf.d/50-synaptics.conf with options you require.


Ubuntu 15.10 freezes a lot usually while playing any media through web

First thing to do, is check if Adobe Flash, is the latest version. Read through this question (and answers) for instructions on how to do that.

How to update Flash? (version numbers don't match)


How do I get my HP laptop to boot into grub from my new efi file?

I had this same problem with my HP Pavilion g6 when trying to dual boot Ubuntu 12.04.3 LTS and Windows 8. That is, even after "successfully" running Boot-Repair, I still had the notebook booting directly into Windows 8. If I pressed F9 before the HP symbol showed up, I was able to get into a Boot Menu (HP's menu? I don't know...) and from there, to select the "Ubuntu" entry, which in turn took me to GRUB 2 and finally to my Ubuntu installation.

Still, I wanted to be able to have the computer boot directly to Linux, without the need for any user intervention.

In the end, Rod Smith's answer above, combined with the information that I found in another forum, did the trick for me. I have Secure Boot disabled and Legacy Boot also disabled.

This is what I did:

I booted into my Ubuntu installation using the trick of the F9 key in the start up to be able to choose the boot loader.
Once in Ubuntu, I opened a terminal.
Using the command below, I checked where Windows boot loader was located:

$ sudo efibootmgr -v

In my case, the original boot loader was in here: /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi . Please note that in your computer it might be in a different place. If so, you will need to adjust the commands below.
As per Rod's recommendation in his answer (the one about how to repair the boot loader manually), I made a backup of that file by moving it one level up:

$ sudo cp /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi /boot/efi/EFI/Microsoft/bootmgfw.efi

Finally, I copied GRUB2's boot loader in that place, "tricking" the system into loading the boot loader I wanted instead of Windows' original boot loader.

$ sudo cp /boot/efi/EFI/ubuntu/grubx64.efi /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi

So finally I had my dual boot working with GRUB2. In case Windows overwrites the boot loader again after an update (as it did with me), I already know the steps to get grub back to its place.

Hope this helps someone. Please let me know if there are any issues with my solution.


Setting gnome window-switching to Hyper doesn't work

The suggestion to look at the keyboard with xev led me to identifying the likely issue (see https://unix.stackexchange.com/questions/552680/why-does-hypertab-not-work-tested-in-ubuntu-gnome-and-xfce). In particular,

xmodmap -pm

showed that mod5 was overcrowded, where my modifications had been included with the default map (for the xkb US keyboard layout) of:

mod4        Super_L (0x25),  Super_R (0x86),  Super_L (0xce),  Hyper_L (0xcf)
mod5        ISO_Level3_Shift (0x5c),  Mode_switch (0xcb)

to give

mod4        Super_L (0x25),  Super_R (0x86),  Super_L (0xce),  Hyper_L (0xcf)
mod5        <OTHER_KEYS, inc. Hyper_R> ISO_Level3_Shift (0x5c),  Mode_switch (0xcb)

So ISO_Level3_Shift was triggered along Hyper, and thus didn't work.

However, by setting  to Super, and then using different mod numbers, Hyper works as advertised. For details, see writeup here: https://github.com/bjohas/Ubuntu-keyboard-map-like-OS-X/blob/master/Hyper%20key.md


Boot up windows. Go to Control Panel > Hardware and Sound > Power Options > System Settings > Choose what the power buttons do and uncheck the Turn on fast startup box
Next, Disable secureboot in Windows from the BIOS Menu. Since it is different for every system, you can check out the laptop manual  to find how to get the BIOS Menu.
Then, boot from USB and check if you can get the option 'Something else' after 'Install Ubuntu'


If you were not able to run the live cd you may have created it wrong.  How did you make it?  Did you run the checksum on the iso file before burning the cd?


I found that the pre-installed packages where broken. The solution was to reinstall all of the packages with:
sudo apt-get --reinstall install packagename


Is there a command that detects if the CD drawer is open or closed?

I found a nice little solution here. The C code below, minimally changed from the linked site, will return an exit code of 0 if the tray is open and 1 if it is not.

So, save this code as something (e.g. foo.c) and compile it with this command:

gcc -o trayopen foo.c

Then, copy the compiled executable, trayopen to /usr/bin:

sudo cp trayopen /usr/bin

You should no be able to do things like

trayopen /dev/sr0 && echo closed

Or, more complete:

#!/bin/sh
if trayopen /dev/sr0
then
    echo "Tray is open."
else
    echo "Tray is closed."
fi

The code:

#include <stdio.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <linux/cdrom.h>

int main(int argc,char **argv) {
  int cdrom;
  int status=1;

  if (! argv[1] ){
    printf("Usage : trayopen [device]\n");
    printf("Result: Returns a 0 if the tray was open and 1 if it was closed\n");
    exit(2);
  }

  if ((cdrom = open(argv[1],O_RDONLY | O_NONBLOCK)) < 0) {
    printf("Unable to open device %s. Provide a device name (/dev/sr0, /dev/cdrom) as a parameter.\n",argv[1]);
    exit(2);
  }
  /* Check CD tray status */
  if (ioctl(cdrom,CDROM_DRIVE_STATUS) == CDS_TRAY_OPEN) {
    status=0;
  }

  close(cdrom);
  exit(status);
}


No internet access to apache home webserver

With Nginx it is easy to change ports per vhost, but with Apache, my impression is that you need to also edit the ports.conf file, for example :

sudo nano /etc/apache2/ports.conf

and then restart Apache.


Ubuntu 14.04,32 or 64 bits with 2 gb of ram?

I'd recommend 32 bit. Ubuntu suggests that you use 32 bit if you have 2GB ram or less even with a 64 bit processor, so I'd choose 32 bit just to stay safe.


Extremely slow transfer speed ubuntu -> Windows

I have had similar problems with Ubuntu to Linux - using some of the tips here https://calomel.org/samba_optimize.html I managed to get up to 1.5MBps but it's still painful.  This is using both WiFi and a HomePlug connection.

Until I started transferring files sized in gigs, this was (of course) never a problem!


I'm parsing the output of `ls` and something went wrong

This illustrates why you should NEVER rely on parsing the output of the ls command to iterate over directory contents - use a simple shell glob instead e.g. to match any filename ending in a digit

for f in $mydir/*[0-9]
do
    if [ -e $mydir/$1 ]
    .
    .
done

As to how it is producing the line cp -i driver.sh 32/, you can see that when you grep for digits in the output of ls -la, it is matching the total: 32K line as well as the wanted directory names.


Ok, after many searches, I was able to get this working. Here are some links for those having similar issues that helped me:

http://ubuntuforums.org/showthread.php?t=2167968
Unity webapp is not working in Ubuntu 14.04
How to create a local webapp userscript


Ruby select! method missing after latest update

Okay, I figured out what went wrong.  I have both ruby1.8 and ruby1.9.1 installed on my machine, and when update-manager did its thing, it reverted all the links in /etc/alternatives back to 1.8. The select! method doesn't exist in 1.8.  I put my links back (ruby, irb, rdoc, ri) and everything works the way it's supposed to again.


Why do the interfaces show ipv6 address along with ipv4

The IPv6 address shown is link-local - this means that it is not publically accessible outside of your LAN, but is an automatic address assigned for communicating within your local network. For people to be able to access your computer via IPv6, there would need to be a public address on the interface & for it to be routed.


You should press Ctrl+Alt+F1 which brings you to a black terminal screen.  Log in there with your normal user name and password.

Then you should follow this procedure: How can I uninstall a nvidia driver completely ?

:)


In the Git official Eclipse Plugin repo, developers indicate:
"This plugin code was removed from the main Randoop repository in October 2015, and Randoop no longer supports communication with the plugin."

Since the Eclipse plugin is not currently supported from within Randoop, you can clone Randoop source code, build and import in Eclipse, but i guess is convenient use it from CLI


Why does wineprefixcreate create an empty directory?

According to the Wine Wiki, wineprefixcreate is now deprecated and there is no need to run it anymore.

  Just run wine and everything happens automatically. It was for [a]
  manual update of a WINE prefix. Now it is automatic and therefore it
  isn't needed anymore.

Also take a look at the screenshot in the article linked in the Question:

It also displays a Notice:

wineprefixcreate is deprecated and shouldn't be needed anymore.
WINEPREFIX creation and updates now happen automatically when needed.

Thus all you should do is to set the WINEPREFIX variable and run your game with wine.

You should run something similar:

WINEPREFIX="/home/zach/Neverwinter" wine /path/to/your-neverwinter-setup.exe

Just to make sure I've just run a test case:

WINEPREFIX="/home/user/WINETEST" wine regedit.exe

A window opened stating the wine environment is getting refreshed and then the registry editor started up.

NOTE
As soulsource has pointed out, the prefix directory should not be created beforehand. It can cause issues when it already exists. Just run wine with the appropriate prefix set and it will be created properly. As the comment states:

  Small sidenote: If you want to create a new WINEPREFIX, do not create
  the directory beforehand. Wine will create it on the first run with
  the appropriate WINEPREFIX automatically. If the directory already
  exists, numerous issues can arise, the most prominent is that the
  WINEARCH setting is ignored. "Note: During prefix creation, the 64-bit
  version of wine treats all folders as 64-bit prefixes and will not
  create a 32-bit in any existing folder. To create a 32-bit prefix you
  have to let wine create the folder specified in WINEPREFIX."
  Source: ArchWiki - Using WINEARCH


When using windows 10 on sda3
and you install and boot ubuntu 18.04

sudo blkid
 (read uuid from /dev/sda3, used below as uuid_read_above)

sudo nano /etc/default/grub
 (add line to the end of the file:)
    GRUB_PRELOAD_MODULES="part_msdos"
sudo update-grub

sudo nano /etc/grub.d/40_custom
 (add these lines to the end of the file:)
    menuentry "Windows 10" {
     insmod ntfs
     set root='(hd0,3)'
     search --no-floppy --fs-uuid --set uuid_read_above
     ntldr /bootmgr
     chainloader +1
    }
sudo update-grub

sudo grub-install /dev/sda
sudo update-grub

exit and boot from hdd, should see menu with "Windows 10"

boot dual-boot grub2 uefi 18.04 grub-efi grub-pc windows-10 ntfs


Try this first:

sudo ppa-purge ppa:ubuntu-audio-dev/ppa
killall pulseaudio; rm -r ~/.config/pulse/* ; rm -r ~/.pulse*; ~/.config/pulse

wait ten seconds, then run this:

pulseaudio -k

Should the approach above fail to correct the problem, you can try this next.

killall pulseaudio; rm -r ~/.config/pulse/* ; rm -r ~/.pulse*; ~/.config/pulse

wait 10 seconds, then reboot.

If that still did not help, please proceed...

Execute this command and reboot:

sudo apt-get update;sudo apt-get dist-upgrade; sudo apt-get install pavucontrol linux-sound-base alsa-base alsa-utils lightdm ubuntu-desktop  linux-image-`uname -r` libasound2; sudo apt-get -y --reinstall install linux-sound-base alsa-base alsa-utils lightdm ubuntu-desktop  linux-image-`uname -r` libasound2; killall pulseaudio; rm -r ~/.pulse*; ubuntu-support-status; sudo usermod -aG `cat /etc/group | grep -e '^pulse:' -e '^audio:' -e '^pulse-access:' -e '^pulse-rt:' -e '^video:' | awk -F: '{print $1}' | tr '\n' ',' | sed 's:,$::g'` `whoami`


'Evernote 4.5.7 'Could not connect to server' error

I have solved my problem. I uninstalled and purged Wine and any associated apps from my system (including winetricks), and instead installed playonlinux. With this, a default Wine system is installed, but you can also install other Wine versions. I chose to install Wine 1.4, and then I installed Evernote 4.5.7 using the Wine 1.4 version. Evernote installed quickly, and now runs perfectly.


Yes, certainly that's not a normal use case :-)  So there are a couple of ways to do things.  What the Chrome developers have done is create the menu bar but leave it hidden, it gets picked up by appmenu-gtk but isn't shown.

Another option is to just look for the UBUNTU_MENUPROXY environment variable.  If it is set, then you can build the menu bar, if not, don't build it.

Hope that helps,


Cannot install Epson WF-2010 on Ubuntu 12.04

The driver/setup do not work correctly if /opt is a symlink. By changing my layout of my disk and making /opt a normal folder the install and printer worked without problem.


There is a display link driver for linux built into the kernel; however, due to the complexity of the dl3000 series chips in the new displaylink usb 3.0 docking stations, there is still no driver available for linux.


GPT partition table problem: Windows 7 and Ubuntu dual boot

The windows 7 installer does not install to EFI/GPT as default.

You need to put your Win7 installer disk's files onto a FAT32 formatted USB thumbdrive and copy an EFI bootloader into a specific location in order to get it to boot into the EFI-mode installer.

Follow this link:

http://community.spiceworks.com/how_to/show/1840-installing-windows-from-usb-stick-to-a-gpt-drive

Also; this might help:

How do I create a multiboot environment using LVM for your *buntu operating systems on a GPT formatted system drive, in a UEFI based system?


Will Ubuntu go faster with Ubuntu 2D instead of Ubuntu 3D?

I agree Unity 2d is faster. But essencially depends on how much memory do you have. I have solved an issue with my keyboard by switching to unity 2d. I had my keyboard taking up to four seconds before it showed what I typed, at first use - subsequently everything was fine.


Can startup applications be run on the login screen stack without logging in?

Global cron runs regardless of login.  Per user crontab only runs after login.

Transmission can be run as a service like someone already asked here.

It sounds to me like you're trying to run a seedbox off of Ubuntu mainline.  Don't.  Just use a seedbox VM image like this.


Why I cannot create pipenv shell in ubuntu 20.04 LTS with python3.8?

I was facing the same problem on Ubuntu 20.04, but since you are on heroku i am not sure, you can execute this:
Go in your terminal:
sudo apt-get remove python3-pipenv
sudo pip3 install pipenv (or sudo pip install pipenv)

After that i had another problem with the version of virtualenv. For that i removed python3-virtualenv and the version of virtualenv installed by pip
sudo apt-get remove python3-virtualenv
sudo pip3 install virtualenv.

You can check, if pipenv works:
/home/[your_username]/.local/bin/pipenv
If you still face a problem with virtualenv, look here:
https://github.com/pypa/pipenv/issues
After it works, add /home/[your_user]/.local/bin/ to your PATH:
export PATH=$PATH:/home/[your_user]/.local/bin/


How do I return to default wallpaper on login screen in LightDM?

If you're using one of the stock wallpapers I don't know of a way to do it, but I don't see why you'd want to hide any of those, as they're pretty innocuous :)

If it's an image in a user's home directory, you could try changing it so it can only be read by that particular user: right-click on the file, select Properties, then Permissions, and set "Access" for both Group and World to "None". The login manager should then be unable to read the image and will show a default image instead.