computer won't shutdown because of power management

man shutdown:

   -P     Requests that the system  be  powered  off  after  it  has  been
          brought down.
    ...

   -h     Requests  that  the system be either halted or powered off after
          it has been brought down, with the choice as to which left up to
          the system.

Seeing that -P works for you. Now it's a question of why not? The usual cmd to shutdown is shutdown -h now. In old school init based systems there was a config file that tweaks shutdown when entered from this point. From my initial investigation it turns out upstart falls back to init.d scripts to handle this. With global configuration living in /etc/default/halt and the actual script is /etc/init.d/halt.

It looks like "POWEROFF" is the default action, so  if you just did halt or shutdown -h or telinit 0, it should also power off.

[/etc/init.d/halt]

    # If INIT_HALT=HALT don't poweroff.
    poweroff="-p"
    if [ "$INIT_HALT" = "HALT" ]
    then
            poweroff=""
    fi

Since INIT_HALT=POWEROFF (defined in /etc/default/halt), that poweroff='-p' stays set. To debug this it should be as simple as adding the vars populated at the end of the script like so.

 log_action_msg "Will now halt:  $netdown $poweroff $hddown"

I wonder if your shutdown cmds are simply overriding the init configuration? In which case telinit 0should also shutdown the server and should become the first choice in performing this action.


What application is good for note taking using tablets (printable in A4)?

You have Xournal

http://xournal.sourceforge.net/

sudo apt-get install xournal

and Gournal

http://www.adebenham.com/old-stuff/gournal/

Debian package available from developer page.

Good luck!


You can save a folder's settings by opening the folder, and choosing View->Preserve This Folder's Settings.

The settings are going to be saved in ~/.config/libfm/dir-settings.conf or ~/.config/pcmanfm/dir-settings.conf.


Where is the downloaded package files directory?

The .deb packages that you have already downloaded in apt-get are stored in /var/cache/apt/archives/.


Low sound volume with Sunrise Point-LP HD Audio (ALC3227) in HP 15-BS576TX laptop

Try this:

Edit the file below:

/etc/pulse/default.pa

And make sure that the load-module module udev-detect line looks like this:

load-module module-udev-detect ignore_dB=1

and restart the PulseAudio server:

pulseaudio -k

Then retest.

Links:

The Arch Linux wiki on pulseaudio troubleshooting on no sound below specific thresholds.


Permissions of www-data on an addtional drive on Ubuntu 14.04

What worked on my end:

sudo chown -R www-data:www-data /path/to/ownCloud
sudo chmod -R 775 /path/to/ownCloud
sudo adduser YOURNAME www-data

Voila!

for ownCloud to work well, www-data must be the one that own all of that folders with both Read and Write.  It's just that how it works.

That application running so smoothly with that approach I used.


Are windows compatible components compatible with Ubuntu?

Windows and Linux are not comparable.

"Windows compatible" tells you nothing about "Ubuntu compatible" and the other way round.


Any downside to using rEFInd instead of GRUB?

I maintain rEFInd, so I understand how it works and interacts with Ubuntu pretty well; but I'm also not without my own biases and preferences. (I forked rEFIt into rEFInd because I dislike GRUB 2 and I thought much of what rEFIt did was elegant, but not quite what I needed.)

In most cases, rEFInd works. It's rare to experience post-boot problems with any boot loader; once the kernel boots, it either works completely or not at all. (There are occasional exceptions to this rule, but as I said, they're rare.) Thus, if rEFInd boots your system, you needn't worry too much about follow-on problems. That said, there are advantages and disadvantages to any piece of software, including boot loaders. Compared to GRUB, these points spring to mind concerning rEFInd:

rEFInd advantages/GRUB disadvantages

Because it scans for kernels on every boot, rEFInd is more adaptive and is less reliant on configuration files. This is most important if you're booting multiple Linux distributions, since in such a setup, you need to take care that the main GRUB's configuration file knows about changes to the other distribution's kernels.
GRUB's configuration file format is very complex. It usually works OK because its configuration scripts do the right thing most of the time; but when the scripts get it wrong, fixing it can be a nightmare. Because rEFInd's configuration files are simpler, it tends to be easier to fix and tweak its configuration.
rEFInd has more eye candy, as you point out.
rEFInd is more reliable at booting Windows with Secure Boot active. (See this bug report for information on a moderately common problem with GRUB that doesn't affect rEFInd.)
rEFInd can launch BIOS-mode boot loaders; GRUB can't. For most people, and particularly people with UEFI-based PCs, this isn't a big deal. Some Mac users need BIOS-mode compatibility to dual-boot with Windows 7, though.
rEFInd on a USB flash drive or CD-R can boot an Ubuntu installation that's become unbootable. There are some caveats and limitations, but even if you don't use rEFInd on your hard disk, having it on a USB flash drive or CD-R can be a useful emergency tool.
GRUB's configuration scripts can be slow to run. On a complex setup, installing a new kernel can take a minute or more just because these scripts are triggered and they take a ridiculous amount of time to scan the system for kernels and an assortment of boot loaders and to rebuild the configuration file with what's found. Note that you'll experience this problem even if you use rEFInd unless you uninstall GRUB (or don't install it to begin with).
When working with Secure Boot, rEFInd always enforces Secure Boot policies. GRUB might or might not do so when launching Linux kernels, depending on the GRUB version in use. (Prior to Ubuntu 16.04, Ubuntu's GRUB would launch even unsigned kernels. I think that 16.04 tightens that a bit, but I haven't yet looked into it in detail.)

rEFInd disadvantages/GRUB advantages

GRUB is available as an officially-maintained package in Ubuntu, whereas rEFInd is (for now) available as a third-party package and PPA.
If I get hit by a bus, development of rEFInd is likely to stop; but GRUB has many more developers, and will not become abandonware in the near future.
GRUB supports more platforms (CPUs and firmware types).
GRUB is easier to use in a network-boot environment.
GRUB can (in theory) load a kernel from within an LVM or RAID setup or on an encrypted partition; rEFInd can't do this. (rEFInd can still be used with LVM, RAID, and encrypted setups, but the /boot partition must be separate and unencrypted in such configurations.) Note that I said "in theory" because I know of no distribution that takes advantage of this feature, so it is, to the best of my knowledge, poorly tested.
rEFInd's scans for kernels and boot loaders can take a couple of seconds on each boot, so it may be a bit slower than GRUB to appear. (You can minimize this scanning time by installing only those filesystem drivers you actually need and by keeping the partitions that are scanned uncluttered.)
Shim was designed to work with GRUB. Although rEFInd also works with Shim, it's not Shim's primary target, so there's the bizarre naming convention of calling rEFInd grubx64.efi to get Shim to launch it; and you'll need to add at least one entry to the MOK list to get rEFInd to work with Shim.

In addition to these points, there are occasional system-specific incompatibilities and quirks. Such problems can strike either program, so they aren't really advantages of one or the other.

It's possible to set your system up so that rEFInd launches GRUB (or vice-versa), but in most cases you'll end up getting the worst of both programs, not the best, when you do this. On occasion, though, chainloading in this way is desirable -- say, if you want the eye candy of rEFInd and the ability to load a kernel from an LVM, RAID, or encrypted partition.

As to the installation instructions to which you link, they're overly complex. The simplest way to install rEFInd in Ubuntu is to use the PPA after you install Ubuntu:

sudo apt-add-repository ppa:rodsmith/refind
sudo apt-get update
sudo apt-get install refind

The drawback to this approach is that it's one big leap. If you prefer to test rEFInd before fully installing it, by all means use the USB flash drive, which will let you see how rEFInd works before making any changes to your hard disk.


For new user and Tweaking purpose, unity-tweak-tool is very helpful to change such settings.

Can be installed by following command:

sudo apt-get install unity-tweak-tool

Goto Appearance>Font :

In you can customize following:

Default font : Ubuntu 11
Text scaling factor : 1.00
Or Restore Defaults to set default settings


The instructions you found are good. You should just know basics of the generic “configure, make, make install” process. You may read e.g. https://robots.thoughtbot.com/the-magic-behind-configure-make-make-install or try to google the terms yourself.

  But I have no idea where i have to install the Netatalk files that I downloaded.

You can build them anywhere you want, a subfolder of your home folder is a good choice. Then the command sudo make install copies the results into the right place.


Did you unmount the USB drive before removing it? In Unix systems it's important to unmount removables otherwise the changes will not be written to it successfully.


Updates on Ubuntu after changing Desktop Environment

Changing your desktop system does not prevent your computer from getting updates.

You may no longer see notifications about updates, as they are targeted at displaying on the default desktop system.  You also may find it harder to run graphical programs to perform updates, as they are built for Gnome.

You can always use the command line to do updates:

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


Solution to:

First problem: Because the proper drivers are not installed.
Drivers can be installed in two ways:

First method is via Software Sources.
Second method is relevant if you want the latest driver (even if it is in beta/alpha).

Third problem: You need to check if the vendor even supports linux or not.

Link to get your driver for NVIDIA GeForce GTX 1050 (NOT 1050Ti).


If you do not move your mouse in the meanwhile, there should not be any "menu item under cursor". The context menu opens such that its left upper corner is at the cursor, and there is a margin below to the next menu item.

However, if on mouse-button-release there is a menu item under the cursor, the desired behavior is to launch that menu item. This his how you (or at least many people) normally proceed: mouse-button-down, move the cursor to the desired menu item, mouse-button-release to activate that item.

If there is no menu-item under cursor after mouse-button-down, then the behavior is as you described: mouse-button-release does not destroy the context menu.

So maybe your mouse is very sensitive, and a button-down event is accompanied by a cursor move?


How to ensure matplotlib in a Python 3 virtualenv uses the TkAgg backend?

You need to install the tk-dev package by running:

sudo apt install tk-dev

Then, reinstall matplotlib in the virtualenv by running:

pip --no-cache-dir install -U --force-reinstall matplotlib

Verify the TkAgg backend is used by checking if the following code returns TkAgg:

python -c 'import matplotlib as mpl; print(mpl.get_backend())'


Try this blog on fixing monitor resolution with xrandr. I hope this can fix it .


Yes, according to http://www.notebookcheck.net/AMD-E-Series-E2-1800-Notebook-Processor.73564.0.html (and also in the other E2 models listed). The AMD page itself is of not much use in this regard.


How to uninstall Amazon app in 17.10, 18.04?

sudo apt purge ubuntu-web-launchers

does the trick.


No sound after updating from 11.10 to 12.04

After searching around the forums found this answer

Append

/etc/modprobe.d/alsa-base.conf

with the following line:

options snd-hda-intel model=generic

rebooted and all sound worked


How to change the about:config shortcut in unity?

You can't, it's hardcoded in Unity. See the source (scroll to the bottom).

But it's just as quick to press the Super key to bring up the dash, and then type Gunity.


accidentally deleted a partition which resulted into a initramfs to be booted

Have you tried running boot-repair?  It's saved me several times, and at least one was an intramfs symptom.

https://help.ubuntu.com/community/Boot-Repair

However, you will need to be able to boot from the USB.  Try looking through the options in your computer's BIOS and make sure that booting from USB is the first choice.


Installing one package offline on a currently supported Ubuntu release

In your Ubuntu machine run:

apt-get install build-essential  --print-uris -y | grep -Po "http.*?deb"

it gives you a list of links to deb package (build-essential and its dependecies).

Download them using Windows and finally move them into:

/var/cache/apt/archive

then again run:

sudo apt install build-essential

to install it.


Need Help Fixing Grub after Installing Ubuntu 13.04 x64 Alongside Windows 8 on a Lenovo IdeaPad Y400 with UEFI

First, activating "legacy support" was the wrong thing to do. On a computer with Windows 8 pre-installed, activating legacy support in the firmware makes it possible to go down paths that will create new problems, and in fact that's precisely what you've done. (That said, sometimes it really is necessary to activate this support, but it's more likely to cause problems than to solve them.)

Second, the "boot files... are far from the start of the disk" message is almost certainly a red herring. This can be a factor with certain disk sizes and certain BIOSes, but you've got an EFI implementation, not a BIOS. An EFI should be able to boot from kernels located anywhere on any disk currently available. Certainly your 1TB disk should pose no problems. Thus, everything you did from that point on was unnecessary at best and problem-producing at worst.

Despite your activation of legacy support in the firmware, it's conceivable that your system would have booted Windows after you ran Boot Repair. You don't say whether you tried to do so at that point, though, so it's unclear if it would have worked or if you just tried to fix the "far from the start of the disk" non-problem without testing it.

Somewhere along the line you seem to have installed the BIOS (legacy) version of GRUB, which may be what you're booting by default (to get the grub rescue> prompt). It's conceivable that disabling legacy support in your firmware will cause the system to boot straight to Windows or straight to GRUB's EFI-mode installation. If it boots to Windows, you should still be able to get to GRUB by hitting F12. If it boots to GRUB, then you should be able to boot Linux, and possibly Windows. (I recommend trying the first two Windows options. The final three Windows options are unlikely to do anything useful.)

If you try this and get GRUB working as the default, you can try using GRUB Customizer to clean up the GRUB menu a bit. I'm not very familiar with this software, though, so I can't be more specific about how to use it.

Another thing you could try is to install my rEFInd boot manager. If you install the Debian package and if everything works perfectly, this will give you a menu with options for Windows, for Ubuntu via GRUB, and for Ubuntu directly. You can then remove extra boot entries by deleting unnecessary .efi files in the /boot/efi/EFI directory tree or by editing /boot/efi/EFI/refind/refind.conf and uncommenting and adjusting the dont_scan_files or dont_scan_dirs options.

You may also want to review your partitions. Your Boot Repair output indicates that you've got four NTFS partitions, and I suspect at least one of those is unwanted/unnecessary, but I can't really be sure of that. You also shouldn't need /dev/sda6 or /dev/sda11 once you've fixed everything.


No wifi connection with Atheros wifi card ar2143, gui only works in wired connection

just install the wireless driver. to install it you have to connetc with wired connection and then go to "Additional Driver" let the Additional driver searching for your wifi driver then check the wifi driver and click activated.
wait until your driver downloaded and installed.


gnome-terminal change tab color ubuntu 19.04

I already tried to change ~/.config/gtk-3.0 but gnome-terminal didn't change a bit.
I have konsole in which is very easy to change the tabs problem you got.

I have made these changes:

In which konsole.css is:

QTabBar::tab:selected {
background: lightblue;
color: black;
font: bold;   }

And konsole looks like:

And you can play around settings and find out what you like the most :)


Recover lost deleted json files on ubuntu 12.04 server?

You can try extundelete. If the data is important then create a disk image and a copy of that image and work on the imagecopy only. The more you try to recover data on a running system, the higher the chances are that you destroy the data that is left on the disk.


Opening all .smi files from subdirectories into one file

Your commands, e.g. [...] xdg-open > one_file will open the files one by one and send the output of xdg-open to one_file.

But I think you first want to merge the files, and then open the merged file.
You can use cat to concatenate text files:

find . -name "*.smi" -exec cat {} + > one_file.smi
xdg-open one_file.smi


Why can't I change the keyboard layout? Only one step

Did you try to manually change it via Preferences?

Can you give it a try? - http://www.wikihow.com/Change-Keyboard-Layout-in-Ubuntu
Can you try to set a different Keyboard Shortcut?


I have this model and I'm running Ubuntu 16.04. Most things work fine except there are some minor issues with using the hotkeys (not all of them will work properly).


No possible way to install Ubuntu on Asus Zenbook UX433FN

I just solved this problem on my Zenbook UX533FD with Ubuntu 18.04.

It turns out update/upgrade will update the Intel related stuff and then crush the system

This is what I did:

In grub, choose Ubuntu, DON'T PRESS ENTER, press 'e', add dis_ucode_ldr after the line start with Linux, then boot (press F10), should be bootable now.

Once booted, in terminal:

sudo apt install intel-microcode=3.20180312.0~ubuntu18.04.1

Then hold the package:

sudo apt-mark hold intel-microcode=3.20180312.0~ubuntu18.04.1

I have written a readme about the problems I have with this laptop.
Hope it helps.


Where in Ubuntu can I locate the files to edit the css to create my own theme?

To edit the *.css files of your installed themes, browse to this folder

/usr/share/themes/nameofyourtheme/*

and look for the *.css files in the folders. But it is recommended to backup your themes before doing anything.

You might need root permision to edit the files.

Also, as muru said, it is better that you copy the files from the above location to ~/.themes, then type the following command to change the permission of the folder, and finally edit the files:

cp -R /usr/share/themes/some-theme ~/.themes


To help anyone else who stumbles into this problem.

I read a recent post with a near identical problem with my laptop (XPS 15) and they were told by dell that they're aware of the bug and there currently is no fix other than re-installing the os from scratch. I'm not sure what causes it, as I just spent the day backing up and re-installing, and now even with the 430 driver everything is working. I'd just recommend not updating to 430 if you have this laptop and haven't updated in a while, and don't require the update. Wait for the issue to be fixed (hopefully) in the next update.


indicator-datetime stops the disk from spinning down

I've investigated even further before posting this, and the culprit seems to be the date/time indicator.
I had configured the indicator to display the seconds.
If I remove that setting, the unity-panel-service.log file no longer is updated every second (but, maybe, every minute), and the disk spins down successfully.

So, the workaround seems to be: don't display the seconds in the date/time indicator, or remove it.

I think I'll report this bug.
I'll leave this here in case this could be useful to someone.


How can I add wine programs to the right click context menu?

If you have a previous version of Ubuntu (not 11.10) you can right click the file, select Properties and in the Open With tab you can search the option to write you custom application. For example, if you know Microsoft Word can open a doc using this line (I don't use msword so I don't really know if the follow command will work, it's just an example):

wine msword mydoc

then, you put that line in the custom application box.

If you're using 11.10 that's not possible (why?), so you should look this. That way you can add any application to the Open With option, including wine.

Hope it helps.

Best regards,


GRUB not loading after Windows 10 reinstall

sorry for my bad english! :) it is because when you install windows after linux(ubuntu) the windows loader takes places on the hard disk, to do: It consists of booting thanks to Super Grub2 Disk. Once in your system you will recover GRUB with a simple command. http://www.supergrubdisk.org/ download this file and then boot then in a usb or disk,  then boot this from the boot options or bios then in the super grub2 select:

Detect any os
your Ubuntu (you have to select it from the list of detected OS)
Once you have started in your distribution you will open a console and load the Grub in the MBR by executing the following command:

Grub-install / dev / sda when sda is your hard disk!

if you want to read this in spanish and more detailed, http://www.guia-ubuntu.com/index.php/Recuperar_GRUB


Ubuntu 12.04 touch-pad and keyboard problems asus q500a

I suggest you to install following packages if they are not already installed:

xserver-xorg-input-multitouch
xserver-xorg-input-synaptics

If you are not able to write in terminal, it is possible that you you will be able to
type in CLI Mode. Press CTRL+ALT+F1 to go to command
line interface. Login using your username and password.
Execute following commands to install above mentioned packages if not already installed:

$ sudo apt-get update
$ sudo apt-get install xserver-xorg-input-multitouch
$ sudo apt-get install xserver-xorg-input-synpatics

Restart your system:

$ sudo reboot now

I hope your problem will be solved after login.
If it still exists, you can give a try to Jockey, a package which scans & installs all proprietary drives. You can find it in /usr/share/applications directory. No need to go through command line. Just browse the folder. Run it and wait for sometime till it finishes scanning your available drivers. Restart again and notice the difference.

More information about Synaptic Touchpad:

Synaptic Touchpad Configuration


I can't locate a folder in my duplicity backup

If a backup occurred, and the drive was not plugged in, the files on the drive would have been marked as deleted in the backup. The files are still in the backup. But you'll only recover them if you restore from a backup date when the drive was actually plugged in.

I recommend that you plug in some other drive named D. Then navigate to /media/D/ in the Files app. Right click on the white background and choose 'Recover missing files' or some such. It will search your backup for files at that path from any time in the past. It should show the 'data' folder from the last time it was backed up.


Wifi will not connect after upgrade to 15.04

This issue seems only to apply to the Intel® Wireless 3160.

This workaround solved my problem and it seems as though it worked for a few others as well. It basically rolls back the driver to the previous version. While it's not the preferable solution, it works until they patch the kernel.

For those who are much more technically able than I, here is the complete bug report including links to the kernel revision that fixes this problem.


Ubuntu 15.04 not working with Broadcom B4311

Correction:

Actually, the correct file to edit on gedit is /etc/modprobe.d/blacklist-bcm43.conf since this file is for the Broadcom 43xx series wifi chipsets. Don't forget to reboot the PC once these changes are made to take into effect.

So to put it into steps (for some people who don't get what I'm talking about):

Open Terminal by pressing Ctrl+Alt+T

Type

sudo apt-get install firmware-b43-installer
gksudo gedit /etc/modprobe.d/blacklist-bcm43.conf

Comment out (by putting a # at the start of the line) any items with the words bcm43 or bcm43xxx in them. Save the file and close gedit once you're done with these changes.

Reboot the PC.

NOTE: some PCs may require you to activate the wifi card through either a combo key press (FN + F# or an unknown side/front switch) before you can see your wifi networks on the Network Connections.


If it were me I would probably boot a live CD/USB and

  grub-install /dev/sda   (or whatever your boot partition is)

This should re-install grub.

You may also want to check BIOS to see that USB is enabled, which is probably why "Brandon" is asking the question.

Good Luck
Mal


Step 6 Installing Canonical’s OpenStack Autopilot

I suppose you could do either.  However, depending on the size of your intended cloud, running MAAS separately from where you run openstack-install might make sense.  Most deployments I would expect you to run openstack-install on your MAAS server, infact, the instructions intend on you doing exactly that.

The first step of the installer is to install Landscape to one of the nodes listed in MAAS.  After that process is done and some services are deployed, then you'll load up Landscape to actual deploy openstack to the remaining nodes.  Then the services like Neutron, Compute, Cinder, etc, etc... Will be spread over the network.


How to install eigen 3.3 in Ubuntu 14.04?

For those simply requiring a reasonably recent version of Eigen 3 on Ubuntu and similar Debian-based distros (...which is the common case), installing the existing libeigen3-dev package suffices: e.g.,

sudo apt install libeigen3-dev

Manually downloading and installing Eigen 3 is probably overkill for most use cases.


Is there a tool to reliably solve or troubleshoot graphics and hybrid-graphics acceleration?

Is there a distro/hardware combo that has none of these problems?
No: If there were, everybody would be using it.
Hardware compatibility is handled by the Linux kernel. All Linux distros use the same kernel source. The problem is that a few hardware vendors don't provide kernel modules (drivers) for their hardware, or provide poor-quality (buggy) modules. There's little the kernel developers can do about that; the kernel developer rarely have access to the OEM source code for the hardware.

Would it be viable and/or desirable by the community to have a tool that can detect various common issues and fix/suggestAFix to get graphics acceleration working?
No: You're asking for an ongoing software development project that identifies common bugs and their fixes (if any). If you can fix a bug in the proposed application, that means you can also simply fix the original bug in the kernel module and skip all the overhead of an entire additional project. The hurdle is generally not telling users that they have a bug (the user already knows that their hardware does not work well) -- the hurdle is getting users to test the software and to report the bug in the first place and then to follow up and help developers test the bugfixes.
"Windows detects and installs drivers" because legions of OEM and Windows engineers are paid make X fit into Y. That doesn't mean the compatibility was easy; it just means that "somebody else" did that integration work for you already so it's easy for you. You're the customer -- you paid for all that Windows effort; it was baked into the price of your hardware.
But this is not Windows, and here the process is much more transparent -- you can see those developers (both paid and volunteer) hard at work, often asking for testing help from the community and getting limited response. Remember, you're not an Ubuntu or Linux customer -- there's no revenue from your use of Ubuntu.

Would it be viable and/or desirable to have a website showing what can/can't be done with specific distros/graphicStacks on specific hardware configurations?
Perhaps: Canonical does already employ a team of engineers in Taiwan who do hardware certification testing, and maintains a searchable database of the result.
The problem with a website is that somebody must maintain it in an environment of constant change. Kernels update every couple weeks. Entire software stacks are replaced every six months. Older hardware must be tested with newer releases of software. Somebody must do all the testing. Somebody must investigate when two testers get differing results.
If somebody wants to create such a website, go right ahead. You don't need anybody's permission.


Can I program an external numpad to do certain keystrokes?

While you can use tools like xmodmap and xkb to modify the actual behavior of your keyboard, it's sort of like using a constant in a formula when what you really wanted was a variable.

Instead of approaching the problem that way, take a look at using a desktop automation tool which can add layers of power and flexibility to your to workflow.

AutoKey is probably exactly what what you're looking for.

AutoKey allows you to create phrases which are triggered when you type an abbreviation or press a hotkey. For instance, you could create a phrase with the contents of $<cursor>$ and trigger it with an abbreviation of $$.

When you type $$ followed by white space, AutoKey would replace it with $$ and leave the cursor positioned between the two dollar signs.

While this is a very trivial example, the replacement phrases can be arbitrarily large and complex and you can also use hotkeys such as Alt+$ to trigger them.

You can do all of this using the AutoKey GUI to set it up with no programming required.

If you require more selective application, you can define a window filter so that this particular abbreviation or hotkey only works when the current window is running a particular program such as a math editor. In any other window, the abbreviation would not be recognized and would be passed literally to the application running in that window.

AutoKey can also trigger scripts written in Python3 which can do most of the things you can do with a keyboard and a mouse to automate repetitive tasks. For that, you need to have or learn some very basic Python3 programming skills.

AutoKey has many powerful and advanced options and features, but they won't get in the way of defining a bunch of shortcuts for common math notations.
When AutoKey issues mouse and keyboard events, most programs and desktop environments  can't tell it's not you doing them manually, so it works with almost all programs and Linux desktops.

For now, if you want to try AutoKey, don't install it using your Ubuntu package manager. Ubuntu offers an ancient version which has a lot of bugs. Here are instructions for installing the current version.

Once Ubuntu 20.04 comes out, the new version will be available through your package manager again.

AutoKey is largely independent of specific distributions, so the new version will probably work with Ubuntu 16.04. If it doesn't, you can install the version that comes with 16.04 using your package manager or ask us for help.

You can visit our support forum here.


You can download the packages, both usb-modeswitch and data files from the website.

Extract the archive.

Open terminal, and change directories to the extracted folder

To install, run

sudo make install

Run

sudo usb-modeswitch -e

to see the version installed.


Unable to run Studio-3T 2018.1.0 In Ubuntu Mate 16.04

On my 64-bit system I can install and launch it with:

cd ~/Downloads
wget https://download.studio3t.com/studio-3t/linux/2020.1.2/studio-3t-linux-x64.tar.gz
tar -xzf studio-3t-linux-x64.tar.gz
sh studio-3t-linux-x64-no-shell.sh
# then it starts when installer is finished

If you have 64-bit system you can try this way.

On 32-bit I get the same error as you wrote. I recommend to contact Studio-3T directly.


How can I run a script after a specific package is upgraded?

AFAIK apt does not have package-specific hooks (i.e., there's no way to tell it to run a command when a given package is modified). What it does have is DPkg::Pre-Install-Pkgs:

Pre-Install-Pkgs
   This is a list of shell commands to run before invoking dpkg(1).
   Like options this must be specified in list notation. The commands
   are invoked in order using /bin/sh; should any fail APT will abort.

Note that this is run before anything is done with the packages.

You can specify a version for the information passed to the command via stdin; the level of information increases with the version:

Version 1 just sends the paths to the package files being installed
Version 2 additionally dumps

VERSION 2 as the first line, then
the current Apt configuration, followed by a blank line

and for each package,

the versions of the package before and after the operation,
as well as the operation itself, so, unlike Version 2,

Version 3 in addition to the information in (2) adds architecture information (and has VERSION 3 as the first line)

For a simple case, you could have a script like (in, say /usr/local/bin/restart-foo):

#! /bin/bash

if grep -q my-package
then
    # schedule an at job to restart it
    at now + 30 min <<<"service restart foo"
fi

And apt configuration in /etc/apt/apt.conf.d/99-foo-hook:

DPkg::Pre-Install-Pkgs {"/usr/local/bin/restart-foo";};
DPkg::Tools::Options::/usr/local/bin/restart-foo::Version "1";

For a more complex case, you can request more information and parse it, by setting DPkg::Tools::Options::/usr/local/bin/restart-foo::Version to "2" or "3", like so:

#! /bin/bash
declare -gA version action ver_index
ver_index["VERSION 2"]=3
ver_index["VERSION 3"]=5
skip_options ()
{
    while IFS= read -r line && [[ -n "$line" ]]
    do
        :
    done
}

IFS= read line
case $line in
    "VERSION "[23])
        ver_index="${ver_index[$line]}"
        skip_options
        while read -ra pack
        do
            echo "${pack[@]}"
            version["${pack[0]}"]="${pack[$ver_index]}"
            action["${pack[0]}"]="${pack[-1]}"
        done
        ;;
    *)
        while read pack ver
        do
            version["$pack"]="$ver"
            action["$pack"]="**CONFIGURE**"
        done < <( (echo "$line"; cat ) | xargs -d '\n' dpkg-deb --show --showformat='${Package} ${Version}\n')
        ;;
esac

for i in "${!version[@]}"
do
    echo "$i" "${version[$i]}" "${action[$i]}"
done

Of course, instead of echoing the data, you'd use it to decide what to do.

Examples of input provided:

V1:

/var/cache/apt/archives/tcsh_6.18.01-5_amd64.deb

V2:

VERSION 2
APT::Architecture=amd64
APT::Build-Essential::=build-essential
APT::Install-Recommends=true
[...]
DPkg::Progress-Fancy=1
Binary=apt
CommandLine::AsString=apt%20install%20--reinstall%20tcsh

tcsh - < 6.18.01-5 /var/cache/apt/archives/tcsh_6.18.01-5_amd64.deb
tcsh - < 6.18.01-5 **CONFIGURE**

Version 3:

VERSION 3
APT::Architecture=amd64
APT::Build-Essential::=build-essential
APT::Install-Recommends=true
[...]
DPkg::Progress-Fancy=1
Binary=apt
CommandLine::AsString=apt%20install%20--reinstall%20tcsh
tcsh 6.18.01-5 amd64 none = 6.18.01-5 amd64 none /var/cache/apt/archives/tcsh_6.18.01-5_amd64.deb
tcsh 6.18.01-5 amd64 none = 6.18.01-5 amd64 none **CONFIGURE**

The other way around is to use dpkg triggers. For this, however, you will need to create a package which installs a trigger for something from the package you want to watch, but the triggers are executed after the package is configured, so this is better for restarting services. This Stack Overflow post has a good guide to that.


You need to either shrink the swap partition or make more room for the other partition from somewhere else. 15gb is really small for a full install, though. If you never use hibernate and you have plenty of ram you can delete the swap partition and enlarge the other partition to fill the extra space if you want.


It turns out that this is a known issue, and supposedly fixed in the rc-proposed channel (meaning that the fix will be available in OTA-11 in a few weeks). See https://plus.google.com/+OliverGrawert/posts/aZi13q1bcWw and https://plus.google.com/u/0/+MikeKelly87/posts/32EUgtorgWJ

I have tried it using the default browser after switching the tablet to rc-proposed and can confirm that it does work (albeit with some problems selecting the camera): https://plus.google.com/+JensGrivolla/posts/JyrN4sJSqst


Connect two Ubuntu systems over USB with each other

The following describes Ethernet over USB

RNDIS

  The Remote Network Driver Interface Specification (RNDIS) is a
  Microsoft proprietary protocol used mostly on top of USB. It provides
  a virtual Ethernet link to most versions of the Windows, Linux, and
  FreeBSD operating systems. A partial RNDIS specification is available
  from Microsoft, but Windows implementations have been observed to
  issue requests not included in that specification, and to have
  undocumented constraints.1

  The protocol is tightly coupled to Microsoft's programming interfaces
  and models, most notably the Network Driver Interface Specification
  (NDIS), which are alien to operating systems other than Windows. This
  complicates implementing RNDIS on non-Microsoft operating systems, but
  Linux,2 FreeBSD,3 NetBSD4 and OpenBSD[5] implement RNDIS
  natively.

  The USB Implementers Forum (USB-IF) defines at least three
  non-proprietary USB communications device class (CDC) protocols with
  comparable "virtual Ethernet" functionality; one of them (CDC-ECM)
  predates RNDIS and is widely used for interoperability with
  non-Microsoft operating systems, but does not work with Windows.

[PATCH] USB: usbnet (8/9) module for RNDIS devices

Ethernet_over_USB Wikipedia

There are numerous protocols for Ethernet-style networking over USB. The main motivation for these protocols is to allow application-independent exchange of data with USB devices, instead of specialized protocols such as video or MTP. Even though USB is not a physical Ethernet, the networking stacks of all major operating systems are set up to transport IEEE 802.3 frames, without caring much what the underlying transport really is.

The main industry protocols are (in chronological order): Remote NDIS (RNDIS, a Microsoft vendor protocol), Ethernet Control Model (ECM), Ethernet Emulation Model (EEM), and Network Control Model (NCM). The latter three are part of the larger Communications Device Class (CDC) group of protocols of the USB Implementers Forum (USB-IF). They are available for download from the USB-IF (see below). The RNDIS specification is available from Microsoft's web site. Regarding de facto standards, some standards, such as ECM, specify use of USB resources that early systems did not have. However, minor modifications of the standard, so-called subsets, make practical implementations possible on such platforms. Remarkably, even some of the most modern platforms need minor accommodations and therefore support for these subsets is still needed.

Of these protocols ECM is by far the simplest—frames are simply sent and received without modification one at a time. This was a good strategy for USB 1.1 systems (current when the protocol was issued) with 64 byte packets but not for USB 2.0 systems which use 512 byte packets.

The problem is that Ethernet frames are about 1500 bytes in size—about 3 USB 2.0 packets, and 23 USB 1.1 packets. According how the USB system works, each packet is sent as a transfer, a series of maximum-length packets terminated by a short packet or a special ZLP (zero-length packet). After this, there is bus latency, where nothing is sent until another transfer can be initiated. This reduces bus occupancy, meaning that nothing is sent for considerable fractions of bus time. A gap every 23 frames is not noticeable, but a gap every three frames can be very costly to throughput.

The following were answered superuser

  Ethernet over USB drivers are included into Linux. The relevant
  host-size drivers are CDC_ETHER and RNDIS. Their slave-size
  counterparts (that essentially emulate an USB-Ethernet bridge in
  software) are USB_ETH, USB_ETH_RNDIS. USB_G_ANDROID also supports
  RNDIS protocol, which is great in my case, since the devices in
  question use Android kernel, so the driver is enabled by default.

  The measured bandwidth of the USB bridge using the USB_G_ANDROID
  driver is ~130Mbps from host to slave and ~90Mbps the other way round.


Connecting Asus USB-N13 Wireless Adapter

I think you may be confused by what you read on forums, AU, etc. because there are two revisions of the USB-N13: A1 (with a Ralink chipset), and B1 (with a Realtek chipset).
Based on the lsmod output you included (rtl8192...), and the WikiDevi page linked above, you have the B1 revision with the RTL8192CU chipset.

A. Downloading, compiling and installing the latest drivers for the USB-N13:

Try installing the latest driver from Realtek, released on July 4, 2012:

The first step to troubleshoot your problem is to install the latest Linux drivers from the chipset manufacturer, Realtek.

Download them from the website here, as shown in the screenshot; choose the location closest to you (US, UK or HK=HongKong):

Go with the "Open With..." option given when you click on the download:

Once the downloaded zip opens in Archive Manager, click the Extract button on top, select All Files, select your Downloads folder, and click on Extract as shown below:

Since the downloaded drivers are in source code form, we'll need to compile (build) them before we can install and use them. Open a terminal with Ctrl+Alt+T, and:
;

First, we'll install the Linux headers necessary to build the drivers. Type/paste in the terminal, entering your password when asked:

sudo apt-get install linux-headers-`uname -r`
Then, we'll install the software tools necessary to build the drivers. Type/paste:

sudo apt-get install build-essential

Now, let's build the drivers!

Paste the below:

 cd ~/Downloads/RTL8188C_8192C_USB_linux_v3.4.3_4369.20120622
Then type/paste:

sudo bash install.sh
You will see lines of text scroll by, pause, and scroll by again, as the driver is built and installed. You will know it's done when the prompt returns, preceded by this message:

install -p -m 644 8192cu.ko  /lib/modules/3.2.0-27-generic/kernel/drivers/net/wireless/
/sbin/depmod -a 3.2.0-27-generic
##################################################
The Setup Script is completed !
##################################################

At this point, please close the terminal and reboot.

B. Hopefully this is the end, but it may not...

After reboot, please try connecting to wireless again, and this time it should hopefully work. If not, please do the following to help us help you troubleshoot this further:

Read this question/answer: How can I easily share the output of a command or a text file with others?
And then edit your question with pastebin links to the files  /var/log/syslog, /var/log/kern.log and to the output of the command dmesg.


You could try using a combination of something like the following to disable strips on the sides, top and bottom of the touchpad.

synclient AreaLeftEdge=w AreaRightEdge=x AreaTopEdge=y AreaBottomEdge=z

To figure out what w,x,y and z would be, you'll need to know the range, or boundaries of the touchpad, which might show in the Xorg log, as in my case. I don't have a Macbook, but an example will do to illustrate the method.

To find out the touchpad boundaries, run less /var/log/Xorg.0.log | grep -i range.
Here is the output I get:

(II) ETPS/2 Elantech Touchpad: x-axis range 8 - 1144
(II) ETPS/2 Elantech Touchpad: y-axis range 8 - 760

UPDATE:

If for some reason, the above command no longer works because Xorg.0.log has changed location, you would also be able to get edge coordinates from synclient directly.

synclient

gives:

LeftEdge                = 8
RightEdge               = 1144
TopEdge                 = 8
BottomEdge              = 760

UPDATE-END

Now, to disable strips on both sides and at the bottom, I've added the following to autostart applications:

synclient AreaLeftEdge=50 AreaRightEdge=1100 AreaBottomEdge=670

It took some trial and error to adjust the widths to comfortable levels, so you might what to experiment in a terminal window first, before adding it to autostart. The changes are applied instantly.


You can recover these files using testdisk:

Run testdisk
Select No Log
Select the disk where Ubuntu is installed
Select the partition table (usually Intel or GPT)
Select Analyse
Select Quick Search
Highlight the root partition (usually Linux)
Press p key
Navigate to /var/cache/apt/archives
Highlight the first entry (the entry that has . as name)
Press c key
Select a location to copy these files (i.e. your home)
Press c key again to copy files.
Exit the program.
Move all the .deb files recovered to /var/cache/apt/archives


I'm not sure I understand your last sentence but the first part sounds like auto-play is turned off. From the Launcher select System Settings then Details and Removable Media. The screen below appears:

When the last option is checked nothing will auto-play when inserted. Uncheck this option and set the others as desired depending on type of media.


How to get date&time using curl command?

First, curl makes http(s) requests. Assuming that you have a webserver listening on the machine, so you have 2 options:

Create a script (php/asp/node) that gives you the date and time as response to the request.
Get the time from server response headers.

curl -v https://google.com/

this will give you among other things, a line like this

...
< Date: Wed, 02 Mar 2016 18:39:13 GMT
...

With that result, you can parse and transform to the format that you want.

dateFromServer=$(curl -v --silent https://google.com/ 2>&1 \
   | grep Date | sed -e 's/< Date: //'); date +"%d%m%Y%H%M%S" -d "$dateFromServer"

You must note the difference of GMT vs. local time, and adapt it to your needs.

Update 2018-11-26:
As @SopalajodeArrierez noted, it's not possible to run this when the Certificates are not updated or the time is way off the correct value, so the --insecure options is needed on curl command.

    dateFromServer=$(curl -v --insecure --silent https://google.com/ 2>&1 \
       | grep Date | sed -e 's/< Date: //'); date +"%d%m%Y%H%M%S" -d "$dateFromServer"


Stop display from fading & consequently shutting monitors off when screen is locked on 14.04

Above steps and uninstalling gnome-screensaver seemed to do the trick. The fade out still takes place, but the monitors no longer turn off, which does the trick for me.


I have that same camera and have had no problems with the microphone and video, yes it works fine with Skype as well.


How can I get Places > Connect to server... to default to SSH rather then FTP

I don't see any relevant parameter, config file or gconf setting available in order to change the default options, so i guess you'll have to recompile the nautilus package.

You should download the source package first and probably edit /src/nautilus-connect-server-dialog.c.

More info on how to compile nautilus can be found on the following links:

http://ubuntuforums.org/showthread.php?t=1049716

http://ubuntuforums.org/showthread.php?t=1678656


Wifi won't turn on during startup after upgrading from kernel 3.2 to 3.5, 3.8 and etc

Try this commands in terminal.
sudo apt-get install linux-headers-generic
sudo apt-get install --reinstall bcmwl-kernel-source
sudo modprobe wl


Teamviewer controlling Ubuntu, need to confirm access?

Well it just so happened I was having the SAME EXACT issue. My solution (Done with Teamviewer 12 as of the time of this answer) relied mostly on the server (The one I wanted to control) and very little with the guest (The one that will have all the mighty power of the universe!).

It also changed radically on Teamviewer 12. The steps using Teamviewer 12 (And I will guess future versions) are the following assuming that:

You have a teamviewer account. Does not matter if it's free or paid. You need a teamviewer account for this to work correctly.
You have signed in with your teamviewer account on the GUEST PC.

On the SERVER (The one you will control) you will need to enable Grant Easy Access and Setup Unattended Access. So first on the SERVER click on Grant Easy Access:

And input your GUEST Email and Password for your Teamviewer account. You will get an email saying that you have been granted access to Teamviewer ID XXX-XXX-XXX

At this moment you can now join with the normal random password. The next step is the one that solves the other half of the problem. Click on Connection and then on Setup Unattended Access..

Input the name (Any name or nickname will do) of the PC you will be controlling (This helps when you are handling several PCs at once) and then add the fixed password you will be using to control the SERVER PC.

After this, using the GUEST PC, you can simply input the Teamviewer ID, then typing in the password and you are done.

To Enable Teamviewer at Startup, on Both, Windows and Linux you can go to:

Extras -> Options -> General

and you will enable the option:

Start TeamViewer with Windows (Windows version of TeamViewer)
Start TeamViewer with System (Linux version of TeamViewer)


Gnome shell network manager notification missing icon

At least for Ubuntu 12.04, the broken icon results from network-manager-gnome requesting an icon named notification-network-disconnected when disconnecting from a network, which is missing. In case of a wired network network-manager-gnome would prefer notification-network-ethernet-disconnected and in case of a wireless notification-network-wireless-disconnected (network-manager-applet-0.9.4.1/src/applet.c from the line 2396 on).

An easy workaround when using the GNOME icon theme would be to symlink each occurrence of nm-no-connection.png to notification-network-{,ethernet-,wireless-}disconnected.png. Then rebuild the icon cache for /usr/share/icons/gnome/, e.g.:

export iconTheme=/usr/share/icons/gnome

for px in 16 22 24 32 48 256 ; do sudo ln -s ${iconTheme}/${px}x${px}/status/nm-no-connection.png ${iconTheme}/${px}x${px}/status/notification-network-disconnected.png ; done

for px in 16 22 24 32 48 256 ; do sudo ln -s ${iconTheme}/${px}x${px}/status/nm-no-connection.png ${iconTheme}/${px}x${px}/status/notification-network-ethernet-disconnected.png ; done

for px in 16 22 24 32 48 256 ; do sudo ln -s ${iconTheme}/${px}x${px}/status/nm-no-connection.png ${iconTheme}/${px}x${px}/status/notification-network-wireless-disconnected.png ; done

sudo update-icon-caches ${iconTheme}

Please note that these commands fix only the GNOME icon theme, but you can easily modify them to fit your favourite theme if it provides suitable icons.


Resume after Hibernate with Ubuntu 18.04 with HP Probook

Since I have installed the package hibernate, I can hibernate/resume, even though I have to wait some minutes before being able to use my computer after resuming.

 apt install hibernate

Apart from having modified /etc/default/grub.

Other people have solved hibernation like this.


Is there a working version of Paint.mono for 11.04?

I've never heard about paint.mono, but I suppose it's a clone of Microsoft's Paint.Net application.
There is a graphics editor called Pinta, and it's inspired by Paint.Net. Moreover, it's written in C# and uses Mono library. It is in Ubuntu repositories.
Update: from Wikipedia:

As of December 2010, paint-mono is no longer maintained and hasn't
been updated since March 2009. There is also a project called Pinta
which is described as a clone of Paint.NET for Mono and GTK


I'm working on diskless cluster too. There is two ways to backup your whole OS system.

   1- You can use Remastersys(stopped development) or Relinux(implement of remastersys, still developing) to bakcup then copy it to NFS.
   2- You can copy whole OS system as a backup to NFS.

There are some advantages and disadvantages of both. Yout have to make new iso file when you want to update system, change some configurations etc. or you can use Aufs if you choose first option. I choose second option. One time I copy whole OS to NFS then I can change any files on it without do some extra works.

For second option, I highly recommended to you this site. HyRax explains all steps you have to do.


Why does matlab installs to / directory when another install destination is specified?

I have MATLAB R2015 installed in a custom location and it installed without any problems-however, the only difference is that I do not have it installed in a mount point. First of all, I would suggest that you check if root has enough space (a complete installation with all the components need about 11GB, IIRC) since the mount point is created inside the root folder and therefore, the root folder should have the requisite space.  Also, I would suggest that you first install it in a simple folder, for example /home/user/MATLAB. After the installation completes succesfully, copy the entire MATLAB folder to your mount point (/myfiles), with superuser permissions. Try if it works.


Upgraded to Chrome 61.0.3163 via ppa on Ubuntu 16.04 but it won't launch because NSS out of date

Your computer is not running with the xenial-updates or xenial-security repositories enabled.

Enable the repositories (uncomment the lines for those repositories), and then run sudo apt-get update and sudo apt-get dist-upgrade and upgrade all your packages to the latest package versions.


sudo apt-get install cnijfilter-mp210 series

can't be correct. It would install two packages, one named "series".

To install Canon printer driver support for ubuntu you need to add a personal archive. You do that with ...

sudo add-apt-repository ppa:michael-gruz/canon
sudo apt-get update

Disconnect your Canon printer from your computer or turn it off. Then, install the driver. For mp210 this would be:

sudo apt-get install cnijfilter-mp210series

This also works for lots of other canon printers.

The PPA contains drivers for ip100, iP1800, iP1880, iP1890, ip1000, ip1500, ip1900, ip2200, ip2500, ip2]00, ip3300, ip3500, ip4200, ip4500, ip4700, ip4800, ip5200, ip6600, i7500, mg5200, mg5500, mg6100, mg8100, mp140, mp160, mp190, mp210,mp240, mp500, mp510, mp520, mp540, mp550, mp560, mp600, mp630, mp640, mx320, mx330, mx350, mx360, mx410, mx420, mx860, mx870, mx880, Pixus 550, 560, 580, 860, 865, 950, 990, ip4100, ip8600. (in case someone else is looking for a Canon driver).


Upgrade all packages except MySQL, via aptitude

Looks like you figured out the answer already. However you asked another with the edit.

  I'm still not sure whether it's enough to hold only these packages in order to prevent MySQL upgrade (maybe other MySQL-specific packages should be held out as well?).

The answer is No. You don't need to hold every packages, given you hold the core package upon which other package depends. For example, mysql-server, mysql-client packages depends on mysql-common (as far as I know) so, only holding this package is sufficient.

And aptitude is more intelligent than apt generally and it should understand what you wanted by the hold.

Updated with verification

To verify the answer, I actually ran a test with libgtk-3-0 package which is the core package for almost all gtk-3 application. I had the version of 3.18 something. Then I enabled a repository which offers version 3.20. nautilus depends on this package and the repo also offers higher version of nautilus.

When tried with aptitude upgrade -s (-s for simulation), it lists the packages it was going to update. nautilus wasn't there, because libgtk-3-0 wasn't going to be updated which was required by new version.

Another option is pinning packages by creating files in /etc/apt/preferences.d directory which offers more options and flexibility. It's not needed in your simple case, but doesn't hurt knowing :) Apt Pinning Howto


Dell XPS 13 2015, Ubuntu 15.10 touchpad freezes after suspend

I had the same problem on my XPS12.

In case it's useful, /var/log/kern.log said:

Jun  3 13:53:49 oli-xps12 kernel: [23462.982691] i2c_hid i2c-DLL05E3:01: failed to reset device.
Jun  3 13:53:49 oli-xps12 kernel: [23462.983130] dpm_run_callback(): i2c_hid_resume+0x0/0xc0 [i2c_hid] returns -61
Jun  3 13:53:49 oli-xps12 kernel: [23462.983134] PM: Device i2c-DLL05E3:01 failed to resume: error -61

I could wake up the touchpad with:

sudo modprobe -r i2c_hid
sudo modprobe i2c_hid

I haven't tried without the first command yet as I just found the trick but it might work too...


delete files from FTP servers with linux terminal

To delete files/folders from an FTP server, follow these steps:

Type ftp and enter to continue.
Type open and enter to continue.
Type  the ftp server IP address and enter to connect to ftp server.
If connected, type login name and enter.
Type user password and enter. If the username and password are valid, then you'll be in.
Type help to list all available commands that you can run on an ftp server.
Type ls to list all files and directories.
Type cd <folder_name> to get into a specified folder.
type mdelete <filename> to delete a file or multiple files or rmdir -r <folder_name> to delete a folder.
Type y and enter to confirm the delete.

EDIT:
For some security reasons, you have to type y everytime you want to delete a file. To avoid that, you need to run ftp -i in the beginning (instead of ftp). After that, you can delete files directly without typing y for every file (exp: mdelete folder_name/* will delete all files in folder_name).
Also, you can not delete a folder unless it is empty, so you have to delete all its content using mdelete folder_name/*, then run rmdir folder_name to delete a folder.

Credits:  Mass delete files in FTP server


Restore php.ini to original setting in apache2 php7.0

Just run this into your terminal

sudo cp /usr/lib/php/7.0/php.ini-production /etc/php/7.0/apache2/php.ini
sudo service apache2 restart


Right-click on the .xz file and select Open with Archive Manager. Review the contents and extract only the single file that you desire.


notification for new mail in ubuntu 18.04 with thunderbird and pop3 accounts

I recommend to try MailNag.

  An extensible mail notification daemon

  Mailnag is a daemon program that checks POP3 and IMAP servers for new mail.
  On mail arrival it performs various actions provided by plugins.
  Mailnag comes with a set of desktop-independent default plugins for
  visual/sound notifications, script execution etc. and can be extended
  with additional plugins easily.

You can install it from official PPA with:

sudo add-apt-repository ppa:pulb/mailnag
sudo apt-get update
sudo apt-get install mailnag

If you need intergration with desktop then

for GNOME Shell install gnome-shell-mailnag

sudo apt-get install gnome-shell-mailnag

if you use GNOME Online Accounts in GNOME Shell then install mailnag-goa-plugin

sudo apt-get install mailnag-goa-plugin

for modern Unity, MATE, Xfce, Pantheon Elementary install mailnag-messagingmenu-plugin

sudo apt-get install mailnag-messagingmenu-plugin

for Cinnamon use instruction from mailnagapplet.

Note: Some packages are currently not available for 18.04 LTS, but I have contacted the developer to fix this problem.


How to find `.desktop` file location for a particular application

A much faster and more universal search is with locate command:

$ locate *image*desktop
/usr/share/app-install/desktop/gimagereader:gimagereader-gtk.desktop
/usr/share/app-install/desktop/gnome-disk-utility:gnome-disk-image-mounter.desktop
/usr/share/app-install/desktop/gnome-disk-utility:gnome-disk-image-writer.desktop
/usr/share/app-install/desktop/imagej:imagej.desktop
/usr/share/app-install/desktop/imagemagick-6.q16:display-im6.q16.desktop
/usr/share/app-install/desktop/imagemagick:display-im6.desktop
/usr/share/app-install/desktop/imagevis3d:imagevis3d.desktop
/usr/share/app-install/desktop/kimagemapeditor:kde4__kimagemapeditor.desktop
/usr/share/app-install/desktop/simple-image-reducer:simple-image-reducer.desktop
/usr/share/app-install/desktop/trimage:trimage.desktop
/usr/share/applications/gnome-disk-image-mounter.desktop
/usr/share/applications/gnome-disk-image-writer.desktop
/usr/share/applications/screensavers/tessellimage.desktop

locate can search millions of files in a few seconds where it would take find many many minutes:

$ time find / -name '*image*.desktop'
real    0m52.563s
user    0m6.271s
sys     0m9.002s

$ time locate *image*desktop
real    0m0.705s
user    0m0.693s
sys     0m0.012s

Notice how grep was eliminated from original method and find command was ammended.

The disadvantage of locate is the database is updated daily. If you just installed the application you are searching for today, you will first need to run:

sudo updatedb


The current file system, NTFS, is good because it can be accessed for reading and writing from both Ubuntu and Windows. This means that you can use it from both operating systems for backups.

I think you can start using it directly without tampering with partitions and file systems.

Edit:

One of the first things would be to check the drive in Windows (check that the NTFS file system is working correctly in Windows.)

Then try to read and write some small file in both operating systems. Come back with questions in comments (or if more details by editing your original question).


Do I need any extra drivers for the Realtek waves maxx audio on my Dell XPS 17?

I have found something. There are indeed drivers on the Realtek website. I think they work for all or many of their sound cards. I have a wifi card with a Realtek chip in it, and I had to get something from their website to get it to even work... let me tell you, the native Linux support for Realtek stuff is terrible.

Anyway, the first thing you want to do is download their "Audio Codec Drivers" (Misleadingly named, I believe) from their website (direct link to the page you want.) Scroll all the way down to the bottom, look under the section labeled "Unix (Linux)" and click on one of the links next to "Linux driver (3.0)". Any link will work but you probably want the one that says "US1" or "US2".

Before you do any of this, make sure that the build-essential package is installed.

The next steps: After each command, press the Enter key.

Open your trusty Terminal and "cd" to the directory where you have downloaded the .tar.bz2 file. For example, if you put it on your desktop, you want to type cd ~/Desktop, or if, say, you put it in your Downloads folder in your Home directory you want to type cd ~/Downloads.
Then you want to extract it with tar -xvf LinuxPkg_5.17rc13.tar.bz2.
"cd" into the directory it creates with cd ./realtek-linux-audiopack-5.17/.
Run the automatic installer script with sudo ./install. Type your password and press enter.
Now, according to the documentation, everything should run correctly with your sound after you reboot, but just be aware that everything will be muted by default. You can unmute things with your sound management thing on your desktop, but they recommend using the alsamixer command (and I also find it to be a very handy utility, especially for fancy sound cards).

I hope that this procedure gets things working for you.


upstart job doesn't stop on "service something stop"

Syntax to stop Upstart job is

stop jobname

You might want to check the Cookbook section Run a Java Application in addition.


Remove documentation to save hard drive space

According to the Ubuntu wiki, you can instruct dpkg not to install any documentation. This should prevent any documentation (except copyright info) from being installed by apt.

  Create a file /etc/dpkg/dpkg.cfg.d/01_nodoc which specifies the
  desired filters. Example:

path-exclude /usr/share/doc/*
# we need to keep copyright files for legal reasons
path-include /usr/share/doc/*/copyright
# if you also want to remove the man pages uncomment the next line
#path-exclude /usr/share/man/*
path-exclude /usr/share/groff/*
path-exclude /usr/share/info/*
# lintian stuff is small, but really unnecessary
path-exclude /usr/share/lintian/*
path-exclude /usr/share/linda/*

Then you can manually remove any documentation already installed:

find /usr/share/doc -depth -type f ! -name copyright|xargs rm || true
find /usr/share/doc -empty|xargs rmdir || true
rm -rf /usr/share/groff/* /usr/share/info/*
rm -rf /usr/share/lintian/* /usr/share/linda/* /var/cache/man/*

If you also want to remove the man pages do:

rm -rf /usr/share/man/*

The example is written for OEMs, but it worked just as well for me. Took my /usr/share/doc/ directory down from ~150MB to ~20MB.


I am using a Samsung EVO850 1TB under Windows 10 and native Ubuntu 14.04, and I did not experience any performance degradation neither on Linux nor under Windows with Magician turned off. Which means there is no really any benefit using it (I just haven't uninstalled it yet).

I checked sequential, random read-write and IOPS.

According to the help/documentation, Magician does some caching wizardry and this is probably already done by Win10 or Linux, hence the zero benefit.


How to activate PHP7.0 PDO in 16.04 LTS?

Installing php7.0-mysql should be enough:

sudo apt-get install php7.0-mysql

You will then need to ensure the module is enabled:

sudo phpenmod pdo_mysql

Then restart Apache to load the new modules:

sudo service apache2 restart


Ignoring file 'google.list’' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension

sudo mv /etc/apt/sources.list.d/google.list’ /etc/apt/sources.list.d/google.list

I thinks this should work as the file currently has the name google.list’, but it needs to end in *.list to work - the above command should move/rename it to  a file with the appropriate extension.


How to copy source files into stage/snap with snapcraft

There is a copy plugin. So you can add a part that copies files into /bin

   <part-name>:
      plugin: copy
      source: <your source directory>
      files:
         <source path 1>: <destination path 1>
         <source path 2>: <destination path 2>

You can play around with that and check the result in the directories ./parts, ./stage and ./snap .


SMB2.0 won't mount using CIFS, works on smbclient

I had to use Linux 4.11.0 on Xenial to get SMB2 and DFS to work with automount/cifs-utils (we're using MIT krb5 for auth). 4.10.0, 4.8.0 and 4.4.0 gave "Function not implemented" IIRC.


How do I do a screenshot of the desktop cube?

Applications > Accessories > Take Screenshot

Where it says "Grab after a delay of [0    ] seconds"
Change the delay to say 5 seconds, then go into the cube mode. Ctrl + Alt + Left Mouse Button, then hold it for 5 seconds.

When you return to a workspace you will see the screenshot window offering to save.


How to configure NetPlan as a wired 802.1X Authenticator?

In my personal opinion, I never understood why one wants to configure the network via metplan, when both supported renderers (systemd-networkd and NetworkManager) have their documented (and sensible?) ways to allow users to configure them. Meaning, why would you write a netplan yaml, when you could use nmcli and keyfiles in /etc/NetworkManager/system-connections directly?
So my answer would be: just configure the profile in NetworkManager. NetworkManager supports 802.1x port authentication. For example use nmcli. Create a profile of type ethernet and add 802-1x settings. See man nm-settings.


Is there an application to identify the configuration driving a system-global keypress

Fn× handled by BIOS/Firmware or driver.

Some vendors provide a way to customize them with limited options. If you are comparing with MS Windows, some vendors supplies tools with their binary drivers that can talk to BIOS some how.

If it's handled by driver, See How do Fn keys work? or precisely Linux And Samsung Series 9 Laptop Fn Keys. Dell laptops uses dell_wmi kernel module. Look for other driver in the same folder.
CtrlAltF× are console keys that need to be handled in the early boot stage. Try January's answer in Change Default TTY shortcut.
General Window Manager shortcuts like CtrlAltDel and Media keys Print. Most are handled by media-keys plugin from unity-setting-daemon package. They are stored in dconf database.

gsettings list-recursively org.gnome.desktop.wm.keybindings
gsettings list-recursively org.gnome.settings-daemon.plugins.media-keys

or

dconf dump /org/gnome/desktop/wm/keybindings/
dconf dump /org/gnome/settings-daemon/plugins/media-keys/

I used to search dconf blindly, example looking for Print key:

gsettings list-recursively | grep -i -e print

Unity shortcuts Super and other window management key. Currently, Ubuntu using Unity as a Compiz plugin. So its key bindings are stored within Compiz settings.

ccsm → Advanced Search → Check Settings value: key name ex. super


Wireless keyboard Logitech K330 doesn't work

i have the same problem on Ubuntu 15.04. Bios is working (F11, F12, DEL), then ubuntu is starting and i have to enter my disk encryption password -> keyword does not work.

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

Workaround: I use a cable based keyboard to enter the disk encryption password. After entering the disk encryption password the wireless keyboard works and i can logon with it.


Found a dos partition table in /dev/nvme1n1

The problem is that you have asked mke2fs to create a filesystem on the disk device itself (i.e. /dev/nvme1n1), where the partition table resides, rather than inside one of its partitions (i.e. /dev/nvme1n1p1). If you change the /dev/nvme1n1 to  /dev/nvme1n1p1, it won't complain, and it should do what you want.


Ubuntu 18.04 apt install keystone fails because of dependency errors "this may mean that you have requested an impossible situation

Ok, thanks to user535733 for advice! The solution was to comment out the first line in /etc/apt/sources.list.d/cloudarchive-rocky.list

# deb http://ubuntu-cloud.archive.canonical.com/ubuntu bionic-updates/rocky main
# deb-src http://ubuntu-cloud.archive.canonical.com/ubuntu bionic-updates/rocky main
# deb-src http://ubuntu-cloud.archive.canonical.com/ubuntu bionic-updates/rocky main


Press alt + arrow to skip full line? (Or is there an existing shortcut already..? )

There is a lot of questions like this from MAC users but the sad truth is that you can not do it in Ubuntu.

The only way is to use AutoKey (see my question):

How to bind Ctrl+arrows to Home and End keys? xmodmap does not work

but this method is barely usable because it is damn slow and you still won't be able to use combinations for selecting like ctrl(alt) + shift + arrow


Seems like setting window type to desktop is not enough sometimes.

Try:

own_window_type desktop
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

Got it from here.

Works for me in XFCE. I'm guessing it'll be fine for lxde/openbox as well.


Resizing partitions : give memory to root from home partition

Shrinking your home partition would leave free space to the left of your root partition.  To grow your root partition, you first have to move it to the left so that the free space is on the right, and then you can grow it into that free space.  This is a time consuming and risky process.  You would be better off reinstalling and not bothering with a separate /home partition so that you don't run into this problem again in the future.


Rename multiple .txt files changing some characters in specific positions

With the perl rename, you can remove zeroes that occur between a non-digit and a digit.

$ touch a01_s01_e01_skeleton.txt a01_s01_e02_skeleton.txt a01_s01_e03_skeleton.txt a01_s02_e01_skeleton.txt a20_s10_e02_skeleton.txt
$ rename -n 's/(?<=\D)0+(?=\d)//g' *.txt
rename(a01_s01_e01_skeleton.txt, a1_s1_e1_skeleton.txt)
rename(a01_s01_e02_skeleton.txt, a1_s1_e2_skeleton.txt)
rename(a01_s01_e03_skeleton.txt, a1_s1_e3_skeleton.txt)
rename(a01_s02_e01_skeleton.txt, a1_s2_e1_skeleton.txt)
rename(a20_s10_e02_skeleton.txt, a20_s10_e2_skeleton.txt)

rename may or may not be the perl version. On my system it is called file-rename and it has an alternatives symlink as /usr/bin/rename


Is there any Ubuntu 12.04-compatible, open-source 3D modeling software capable of creating a 2D cross-section?

Take a look at OpenVSP (Open Vehicle Sketch Pad).  You can slice up your solid and get cross sections. Image is of a Cessna 182 with 21 slices, along with some control panels.


How do I make notifications that don't get saved?

You can send a transient notification with notify-send using the -h (hint) option like this:

notify-send -h int:transient:1 "Hello" "World"

Hints are a way to provide extra data to a notification server that the server may be able to make use of. From man notify-send

-h, --hint=TYPE:NAME:VALUE
       Specifies basic extra data to pass. Valid types are int, double, string and byte.

Check this out (external link to developer.gnome.org) for some standard hints. The transient hint is described as follows:

  When set the server will treat the notification as transient and by-pass the server's persistence capability, if it should exist.


apt-get can't overwrite file of already existing file of another package

I had the same problem.  I have a System76 laptop where I had installed the Kubuntu desktop.

The problem with apt-get is it tries to be a little too magical here.  You need something more low-level to remove the Ubuntu packages that rely on the package that provides the conflict.  I don't use Unity, so this works for me:

sudo dpkg -r \
  account-plugin-google unity-scope-gdrive unity-scope-gdocs
sudo apt-get -f install
sudo apt-get update && sudo apt-get ugrade

Please let me know if this works for you!


Ubuntu One says that my account is full, but it's not

Could it be that your UbuntuOne account's disk space is full, and not your local disk space?


[Desktop: command not found error when trying to run .desktop file in terminal

To create a desktop file in Ubuntu you should use the following pattern:
create a file in home/.local/share/applications/mydesktopfile.desktop or as sudo in /usr/share/applications.
The "mydesktopfile.desktop" (name it as you like,but keep the .desktop) should contain the following elements:
#!/usr/bin/env xdg-open
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Exec=/home/arielm123/Desktop/mira/start_terminal_and_run.sh
Name=Start Terminal and Run
Comment=My Terminal Program
Icon=gnome-terminal
Categories=GTK;GNOME


You can try this solution. Although it was for beats audio subwoofer issue.
 And add yourself to audio group and restart or relogin.

adduser <myself> audio


A "tinkered" PC can ping by IP, not by hostname. How to fix?

For Ubuntu releases prior to 12.04 you can put nameserver information in /etc/resolv.conf provided it is not automatically generated by NetworkManager or another utility.

Type the following command.

echo 'nameserver 8.8.8.8' | sudo tee -a /etc/resolv.conf

To add the gateway to /etc/network/interfaces, open that file in an editor and add a line

gateway 192.168.0.1

to the appropriate iface stanza.


xorg.conf is not found by default .

you can boot into recovery mode and select Root Shell.

run :

  X -configure

Then:

cp /root/xorg.conf.new /etc/X11/xorg.conf

Reboot and you can edit the new Xorg.conf.


How can I add favorites in Kubuntu Network Release Maverick?

Click on the cashew in the bottom left.  Click "Unlock Page".  Do what you want.


resume from Suspend causes graphics failure

I had something similar. I changed the graphics driver to a proprietory NVIDIA one. Seemed to do the trick. However when I resume, my desktop background image is corrupt and I have to reload this. [GeForce 9600 GT]


Cannot access internet from my Ubuntu 16.04 AWS EC2 Server after some security updates using Webmin interface

The Internet and Email Problem has been solved by Updating Ubuntu OS 16 to 18 and all it's packages using the command
sudo apt-get upgrade.
To update OS first I needed internet access so I followed @Lewis Smith comments:

  comment: Edit resolve.conf as root and add nameserver 8.8.8.8
  nameserver 8.8.4.4 on separate lines.

My Comment:

  adding nameserver does fix internet access problem but still, email service does not work. using Roundcube, Postfix, Amazon SES previously mail was working perfectly but now no mail is being sent to the destination(no error is showing in Roundcube).

Although I couldn't find resolve.conf file in etc folder so edited resolv.conf.
and then some hours later I thought to try updating the OS and its packages. and this try has worked!

The command I used: sudo apt-get upgrade

I have figured out the problem or mistake I have made:

  While I was using Ubuntu xenial version 16 I updated security updates of bionic that is Ubuntu 18, that was my mistake and so foolish I didn't know the Ubuntu version nickname. So the bionic security updates wasn't compatible with Ubuntu xenial 16 that was the main reason of all problems happened to me.


Fixed it with:

apt-get install gnome

Apparently one of the many packages that that pulls is needed to fix the issue.


Troubles compiling a program from source

You need to just extract the tar.gz

$tar xzf <archive>
$cd <extracted directory>
$./code


Ubuntu 11.10 does not see all the memory

This is likely caused by your computer using main RAM for your graphics card. Based on the amounts reported, I would guess your graphics card is using 384MB specifically.   You can usually check and adjust the allocation in your BIOS config - it can't be adjusted from within Ubuntu.

Here's a similar question:
How to check graphics card details?


A huge apt log file from failed upgrade - what went wrong & how do I fix it?

Apparently there might have been too many kernels in /boot solving this problem (as documented in my answer here: how do I "rebuild" or "repair" APTD?) appears to have gotten to the bottom of things.


Is there a better (closer to home row on keyboard) shortcut for the home directory in bash than tilde?

You cannot eliminate ~ completely, but at least there are some workarounds available.

These workarounds may not always be usable, but for other cases, it can be really helpful:

Before doing the command, change your directory using cd (without arguments). This changes your working directory to ~.
If you frequently need to change the working directory to a folder within your home folder, use the CDPATH variable in bash. Run the next command to minimize cd ~/folder to cd folder, but still allow to change to a directory folder in the current directory if exist.

CDPATH=.:~

To make this change persistent, add the line to ~/.bashrc. As its name may suggest, it only works for the cd command in bash.
Use the $HOME variable if you really want to avoid ~, in case the key would give you an electrical shock for example. This is especially useful in cases where tilde-expansion would not occur, between quotes for example ("~")
Create a function for a command. If you frequently need to copy files to a directory in your home directory as in cp file ~/archive, you can run the next code to create a function:

cph(){ cp "$1" "$HOME/$2";}

and use it as:

cph file archive

Note that you cannot pass arguments or multiple files to this function, that needs additional tweaking. As with the CDPATH hack, you can put it in your ~/.bashrc file to make it persistent.


Suspend fails, GPU has fallen off the bus (Nvidia)

As was said in nvidia backlight brightness problem, it seems your solution would lie in upgrading to at least 381 as there was a critical bug in the previous versions regarding suspending.

Wish I could do more, but I think you will be solved with that.


You can change the installed plymouth themes by typing the following command on Terminal:

sudo update-alternatives --config default.plymouth

You’re supposed to select your desired plymouth theme by typing its number and then press [Enter]. After choosing and activating your desired plymouth theme, you have to “save” the changes by typing the following command:
sudo update-initramfs -u


First,

It might be to your advantage to find how the guest account is to be used.

Some important points are:

According to the outdated documentation for Guest user accounts for Ubuntu: 'A guest account allows visitors to use the computer system without login credentials.' So the whole point of the user is to have no password.
Ask far as I know, the guest account purges documents or files written into its home directory (which is actually in /tmp) after the session is terminated. This is shown in this comment by @andol.
Taking these things into accounts, primarily, the guest account should be used for:

Persons with no registered account on your computer
If you need to quickly access the internet or do something that will not need to be permanently stored.
To restrict use of your account and files by unknown user, but still allowing limited use.

So, now I think you can see that the Guest Account should not be used as a legitimate account for your computer, but like a Library or public computer: unless you have a USB or similar, you're files are as good as gone. Therefore, you should have no need to password-protect the guest account at all.

What should you do?

If I were you I would make a whole new account, depending on your intentions. If you were looking for an account that wouldn't show your files but could still be used by others (like a young sister) I would just create a new account.

Additionally, you could also make your own Guest Account and disable the one that came with Ubuntu 12.04 and later.

You can do this by following the steps on the Technology Windows & Linux website.

Alternatively, in theory, you could use the passwd command. I haven't tried this before, so its just a guess: but you would type either sudo passwd guest or passwd guest. It may not work, and I don't think it's a great idea because of the reasons I have listed above.

Good luck!


How big is this disk, and do I actually have an additional 250Gb I'm not using?

The disk has just 250GB, if you look at the start and end cylinders, you'll see that they are the same.

/dev/sda2 is just an extended partition, which is a fancy way of saying 'a container for other partitions'. Contained in that extended partition is an LVM volume (/dev/sda5), which in turn holds your data.

Extended partitions are a workaround for the inability of hard disks with MS-DOS type partition tables to hold more than 4 partition entries. With GPT, there's no need for them anymore.


Rollback to Windows 8.1 From Ubuntu 13.04

There is a program that will burn Win 8 to a flash drive that may be better than Unetbootin for you. It is called Win2flash. It is free and it should run under wine easily.
Because you have an iso you will need to mount the iso with a program such as AcetoneISO, Furius ISO Mount, Gmountiso or gISOMount. Acetone may be the easiest for you. you can find them in Ubuntu Software Manager.  You will mount the iso and it will appear as a CD and you can point Win2flash right to it and then it will create an installable windows 8 on your flash drive.


Got permission denied while trying to connect to the Docker daemon socket

This problem can arise in two situations:

Running the convenience script without superuser mode.
Running the commands as a user which is not in the docker group.

Solutions:

Quick fix: Run the commands like sudo docker version. Solution: It is recommended to run the script with superuser privileges to avoid permission issues during usage:

sudo sh get-docker.sh

Add the user to the docker group to avoid permission issues:

sudo usermod -aG docker your-user

Note: Adding a user to the “docker” group grants them the ability to
run containers which can be used to obtain root privileges on the Docker host. Refer to Docker Daemon Attack Surface for more information.


Cant connect to my website from the outside

The first line of webhub.network.conf file says, who can go to your webiste. Therefore I recommend you to repace it with:
<VirtualHost *:80>

That means you allow every client to connect with your webserver, if they can reach your port 80.
You can only have one ServerName. The other one you can use as ServerAlias. Src

Make sure, there is a link to webhub.network.conf in the sites-enabled folder (you can add the link automatically with a2ensite webhub.network.conf)
Make sure you set the portforwarding up in your router, so that everybody from the outside can connect to your prot 80.
If it does not work, you also may check that apache has the right to read and send the folder. For example add this code before </VirtualHost>. Src
<Directory /home/chris/Documents/homeserver/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
</Directory>


Difference between booting from a CD/DVD and from a USB drive

No, there will be no problem, as long as your machine supports USB booting, the process is more or less the same.

Long version:

Before USB drives were used, software was installed through CD drives, and the BIOS had hooks for booting (El Torito, etc).

With the rise of USB, USB drives are now "hard disks" from the BIOS standpoint. This changes how they are booted, and makes them harder to boot on some machines.


The minimum memory requirement for Ubuntu 12.10 is 768 MB of memory(RAM) ,

5 GB of HARD disk space for Ubuntu and Pentinum 4 processor

but for 12.10 you need highly graphic supported motherboad that may not support "ZXI945LM4".

so you can use external graphic card or use ubuntu 11.10 that can work.


One Way Communication Problem in Ubuntu Network

The computer that was blocking others was automatically obtaining its IP. While it wasn't a problem before, somehow this became an issue that wouldn't go away.

I changed the IP settings to manual (all other computers are manual), rebooted the computer, and that fixed the issue.


How to fix fstab samba mounts not loading

I didn't quite get the answer to my (2) question so let's do it this way:

** sec=ntlm is very much a legitimate option that still works but since you can mount the share manually without it I don't think you need it. Remove it from your fstab statement.

** Reboot your machine.

** Verify that it did not mount by going to /mnt/NAS1HD

** Then run this command:

sudo mount -a

Did it mount now?

If it did mount after runningsudo mount -a then it's likely your fstab is being read before the network stack is up during the boot process. One way to "fix" this is:

[1] Create a new file at: /etc/network/if-up.d/fstab

[2] Add this content:

#!/bin/sh
mount -a

[3] Make the file executable:

sudo chmod +x /etc/network/if-up.d/fstab

Any script placed in if-up.d will run only after the network is up and operational so this should fix the timing issue if fstab is read too early in the boot process.


How to restore drive icon on Unity Launcher?

Start dconf Editor
Go to com > canonical > unity > devices
Remove your driver specified as UUID-Label from the blacklist


Thinkpad does not wake from sleep - 14.04

I have this model and had this issue.

As far as I know, it isn't solved  yet, but suspend/wake works as expected if you disable USB 3.0 in the BIOS.

See the bug page at https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1340376.

The ports still work as USB 2.0 ports. Haven't thought about the issue in two months.


Add a user with an already existing home directory

I solved it by the following:

# adduser --home /home/bob bob
# chown -R bob:bob /home/bob

Since the new user does not automatically own the old home directory, they are initially unable to login. So I had to use the second line.

Finally, there are still some glitches in the new account. I assume I will have to clear all of the cache and config files from the old home directory (~/.config, ~/.cache, and ~/.local/share it seems).


AMD RX480 Screen flicker after update to 18.04

I solved it myself by using amdgpu.dc=0 as a boot parameter.

To do this, edit the file /etc/default/grub, for example using

sudoedit /etc/default/grub

Find the line beginning GRUB_CMDLINE_LINUX_DEFAULT and add the text amdgpu.dc=0 between the double quotes (""). Leave any other parameters as they are. For example, you may end up with a line like this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash amdgpu.dc=0"

Save the file and exit, and then run

sudo update-grub

to write the configuration, and reboot.


Not able to change ssh port on Ubuntu 18.04.1 LTS

The file that you edited, /etc/ssh/ssh_config is the global ssh client configuration file - changing the port there will change the port which the ssh (and scp) programs try to connect to.

To change the port that the server listens on, you need to modify /etc/ssh/sshd_config :

# Package generated configuration file
# See the sshd_config(5) manpage for details

# What ports, IPs and protocols we listen for
Port 22


First let's update mlocate database, run:

sudo updatedb

now we should find mimeapps.list file:

locate mimeapps.list

it should return something similar to:

/home/ravexina/.config/mimeapps.list

Now open the above file using an editor, if it didn't had any result then create it yourself:

nano ~/.config/mimeapps.list

Under [Default Applications] look for a line which starts with:

application/vnd.debian.binary-package

change it to:

application/vnd.debian.binary-package=gnome-software-local-file.desktop;

use Ctrl+O to save the file, close and reopen your file manager.

Now deb files are going to be open using "gnome softwares" and you are able to install them.

If you don't have "Gnome softwares", then install gdebi:

sudo apt install gdbi

it's a tools to install deb files, it should add itself as default application, however if it didn't add it's line to mimeapps:

application/vnd.debian.binary-package=gdebi.desktop;


Twice the amount of drives show up when setting up a RAID array

try this as root (sudo -i):

first fdisk -l

then hdparm -i /dev/sd* | grep -i serial

 Model=WDC WD3200BPVT-22ZEST0, FwRev=01.01A01, SerialNo=WD-WX71A61P7681

that's another way to know about your drives info.


Set a shortcut to toggle bluetooth on or off

You can control whether your bluetooth signal is enabled with rfkill. Wrapping this in a little Bash conditional allows you to toggle the state easily:

#!/bin/bash
if rfkill list bluetooth | grep -q 'yes$' ; then
    rfkill unblock bluetooth
else
    rfkill block bluetooth
fi

You could save the above in a script file anywhere (e.g. ~/bin/toggle-bluetooth) and make it executable (chmod +x FILENAME) to be able to bind that command to a keyboard shortcut in the system settings.

Alternatively, you can put it in a single line bash command and directly paste that into the shortcut:

bash -c "if rfkill list bluetooth|grep -q 'yes$';then rfkill unblock bluetooth;else rfkill block bluetooth;fi"


Failed to download repository information in update manager

jonls/redshift-ppa looks to be removed. run:

sudo add-apt-repository -r ppa:jonls/redshift-ppa to remove it.


Thanks @kanehekili. I am using wayland only right now. I searched for switching to xorg from wayland and there I found the solution.
I simply ran xhost +si:localuser:root and got the permissions back. Don`t know why I did not find any one use this command.
.


Unable to Install Windows Programs using Wine in Ubuntu 12.04 - Program Error

I found the solution. Just gave it a bit of thought, then right clicked the .exe file, went to properties, and Permission, and under Others, changed the permission from READ ONLY to Read and Write. Installed Perfectly.

Thanks all for your help, especially Ashish.


Why do I get "Documents: No such file or directory" on Ubuntu Server?

This comment by steeldriver explains this

The Documents, Downloads etc. directories are not populated in Ubuntu server installs.

You said you are using the server version, so these directories being absent is expected.

you can create any directories you wish manually using the mkdir command

For example
mkdir ~/Documents


First check if everything is OK with your USB ports are listed?

lsusb

for more details you can use -v or -vv.

After, check you more information:

sudo dmesg | grep -i usb
sudo dmidecode | grep -i usb


The target directory of the file redirection in your last command is owned by root and your current user account doesn't appears to have super-user privileges to create files in it. Hence you need to use sudo to decompress the file.

To decompress the file without extracting the archive:

sudo gunzip -k SOFTWARE-yyyymmdd.linux.tar.gz

The option -k prevents the deletion of the source file just like -c. Otherwise gunzip deletes SOFTWARE-yyyymmdd.linux.tar.gz after its successful decrompression.
To decompress and extract the archive:

sudo tar -xf SOFTWARE-yyyymmdd.linux.tar.gz

If you really want to use file redirection to decompress the file you need to perform the redirection as super-user. A common way to achieve that is the “abuse” of tee:

gunzip -c SOFTWARE-yyyymmdd.linux.tar.gz | sudo tee SOFTWARE-yyyymmdd.linux.tar > /dev/null

For alternative approaches see When using sudo with redirection, I get 'permission denied'.


Why does Ubuntu Download recommend 64-bit install?

Most modern computers come with more than 4GiB of RAM, so you'd need a 64bit OS to use all of this. (Or 32bit with PAE, which is slower) Also, most new machines are using UEFI, and Ubuntu 32bit ISO's aren't UEFI-capable, so here you'd have to go with 64bit

On older hardware, which doesn't use UEFI and/or has less then 4GiB of RAM, it doesn't matter, as long as the CPU is 64bit-capable, which most are.

Other than that, 64bit may be recommended for various reasons:

You can run 32bit software on a 64bit CPU (multiarch), but not vice verca. So you may be better off with 64bit when talking about software compatibility.
If people don't know the difference between 32bit and 64bit, the should choose the one that will run on the most systems with less problems, which probably is 64bit. Although someone might say that people should know the difference when installing an OS by themselves, I've met at least one person who wanted to install Ubuntu and had barely any clue of CPU architecture ("64bit is better, because it's the greater number" should indicate his knowledge)

There may be other reasons, but these are the ones I can think of now.


Evolution calendar notification with sound?

This site contains a python script to make audible notifications work.
https://bazile.org/writing/2019/audible_gnome_notifications.html
The filters in this script may need tweaking (was the case for me).
Also contains a link to the github page with an installer script and systemd unit files.
Best regards


Ubuntu freezes during boot after upgrade to 18.04 LTS from 17.10

My machines were able to boot normally after disabling 3D Acceleration in VirtualBox.

Settings > Display > Screen > Acceleration > Enable 3D Acceleration (Uncheck)

An alternative fix is welcome because I had been using 3D Acceleration fine since forever so I do not understand why it has to be disabled, or if it is really the culprit. Since the feature was working before 18.04 I suspect it to be a new bug unrelated to previous issues.


I would check my hard disc. It probably does not have to do with your processor (because LiveCD worked perfectly).


Error: You don't have enough free space in /var/cache/apt/archives/

You can clean the apt cache using:
 sudo apt-get clean


This Solr package has been orphaned, but someone intends to maintain it. Please see bug number #652729 for more information.

The latest version of Solr is 3.5.0, Fortunately, I published solr packages for Ubuntu Oneiric to my own PPA repository last week, You can easily add source repository and install package as following instructions:

sudo add-apt-repository ppa:gasol-wu/oneiric
sudo apt-get update
sudo apt-get install solr-jetty

then open your browser go to 'http://localhost:8080/solr', you will see what you want.


Use this command:

sudo npm cache clean --force --unsafe-perm

Then after that repeat the process.


Why is apache running in the background?

Apache does not install by default (But it could be installed with another program if apache is a depedency). If apache is running anyone can connect to it (If you have not blocked)

If you don't want apache, run sudo apt-get remove apache2 to uninstall it.

If you want to stop apache from starting at boot time, run sudo update-rc.d apache2 remove


What is the default Audacious bit depth for PulseAudio output?

You won't hear any difference when your music is still mastered with CD quality (PCM with 44,1 kHz samplerate and 16 bit audio bit depth) for mainstream consumption (loudness war).

Changing the PulseAudio defaults - which are set to CD quality - and setting higher values while still playing the same material from mainstream equipment will only result in computational overhead.

Questions on audio quality are often confused with questions on music taste or general preference.

Going beyond mainstream audio equipment and music formats (lossless CD rips are still mainstream) is rather off-topic for this site, but Monty Montgomery's lengthy article on Why 24-bit/192kHz music downloads make no sense is worth a read.


how to make 3G USB Modem work with ubuntu?

It appears that you need to use usb-modeswitch, see this previous question Help with implementing usb_modeswitch


Wrong memory info for ATI Radeon video card with `lspci -v`  command?

I wouldn't worry about this in that it happens to the best of us. My card has 1536 MB of onboard video RAM yet this is what lspci shows:

03:00.0 VGA compatible controller: nVidia Corporation GF110 [GeForce GTX 580] (rev a1) (prog-if 00 [VGA controller])
        Flags: bus master, fast devsel, latency 0, IRQ 16
        Memory at f9000000 (32-bit, non-prefetchable) [size=16M]
        Memory at e0000000 (64-bit, prefetchable) [size=128M]
        Memory at ee000000 (64-bit, prefetchable) [size=32M]
        I/O ports at 7f00 [size=128]
        [virtual] Expansion ROM at e8000000 [disabled] [size=512K]
        Capabilities: <access denied>
        Kernel driver in use: nvidia
        Kernel modules: nvidia_current, nvidia_current_updates, nouveau, nvidiafb

There are filed bugs and a billion and five forum threads (all around the internet, not just Ubuntu) about this.

I'm personally of the opinion that this is a lspci bug (or feature omission) and that it doesn't actaully effect anything negatively. For nvidia users, I trust nvidia-settings (or Catalyst for the AMD/ATI users) when it reports the value correctly:

X also knows:

oli@bert:~$ grep -i memory /var/log/Xorg.0.log
[    26.504] (--) NVIDIA(0): Memory: 1572864 kBytes
[    26.585] (II) NVIDIA: Using 3072.00 MB of virtual memory for indirect memory
[    26.777] (==) NVIDIA(0): Disabling shared memory pixmaps