Installed ubuntu on external hardrive, tried to boot got grub rescue?

If you installed from a USB live media, you are probably experiencing bug 384633, where the initial creation of the grub boot config file uses a wrong device instead of a UUID.  If you can boot off the live media, you can reinstall grub to the external usb disk, and that should fix the grub config file.  You can also edit the grub boot commands (commands on screen to edit and boot) to fix the wrong devices.  For the last few years, the fix was to simply reduce the disk letter or number by one, and upon successful boot, immediately run

 sudo update-grub

With 12.10, the wrong device has changed, it may even be sda (which is usualy the internal hard disk).  In 12.10, I have started seeing the disk lettering change, with the internal hard disk sometimes sdb instead of sda -- not even consistent.  But after the update-grub, UUIDs will be used, and the disk letter will no longer matter.  Feel free to add yourself to the bug, and maybe someday it will be fixed.


I suggest you take a look at this article from Ubuntu Help, is very well explained and no data loss is involved. You said you tried Gparted, please note that in order to "play" with partitions you might be using a Live version of Ubuntu, as Ubuntu won't let you shrink any partitions from the system which is being used. Therefore you are going to need the USB you used for installing Ubuntu, or create one from Startup disk creator which is preinstalled in Ubuntu, you will just need to download the Ubuntu image.


Unable to locate package / apt-get command not found

Which isn't found, apt-get or sudo?

If apt-get doesn't work (For whatever reason), you could try sudo apt in place of sudo apt-get instead.

For installing the 32 bit libraries for Steam, try doing

sudo dpkg --add-architecture i386

in the terminal to add support for the :i386 packages first then running

sudo apt-get update

OR

sudo apt update

to update the lists of installable packages. Now, try installing Steam again.


How to mount casper persistent partition in "read only" mode?

Guest User accounts for 16.04 and prior, are controlled by lightdm.conf.

For a grub2 booters with persistent casper-rw partitions, such as mkusb:

Open casper-rw/upper/etc/lightdm/lightdm.conf and change:

allow-guest=true

Now there will be a Guest account.

For Syslinux booters with persistent casper-rw files such as UNetbootin: First mount the casper-rw file:

sudo mkdir /media/casper

sudo mount -o loop casper-rw /media/casper/

Then edit casper/upper/etc/lightdm/lightdm.conf and change:

allow-guest=true

A guest account will be added to boot options.

For 17.04 Gnome, LightDM has been replaced by GDM and GDM does not include a Guest session.

The user can install LightDM in 17.04 Gnome using:

sudo apt install lightdm

The install process will ask to remove GDM.

17.04 Gnome reports as being unconfined when in a guest session, caution applies.


gcc 4.5 is the default version of gcc on Ubuntu 11.04. So just install the default package, gcc or g++, and it will also install gcc 4.5 or g++ 4.5 respectively. If you prefer you can just install gcc-4.5 directly. So either

apt-get install gcc

or

apt-get install gcc-4.5

should work, if you really just want gcc (as opposed to g++ for example).


LAMP and default file permissions when apache2 create files

My solution to this problem, was to set up a viritualhost for my domainname. whit mpm_itk_module Enabled.

My etch/apache2/sites-enabled/domain.conf file looks like this:

ServerAdmin admin@email.com
<VirtualHost *:80>
ServerName domainname.com
ServerAlias domainname.com
DocumentRoot /URL/TO/HOME/username/public_html
<Directory /URL/TO/HOME/username/public_html/>
        AllowOverride All
        Require all granted
</Directory>

<IfModule mpm_itk_module>
AssignUserId username username
</IfModule>

</VirtualHost>

and run

sudo service apache2 reload

and everything worked as intended.


I can't configure my Dell V515w AIO printer

I had this same problem when installing the exact same model printer in Ubuntu 11.04. I was able to find a solution at that time through Google, and wrote it down. Follow these steps:

Open a terminal window by pressing ctrl-alt-t.
Type: sudo passwd root. This will create a superuser account and establish a password.
Type sudo passwd -u root at the next prompt. This will unlock the superuser account.

When I did this, I chose a different password for the root login, and I used it when running the dell software install shell. It worked. In retrospect, I would probably just use the same password you use whenever you authenticate. The main thing is you have to use the above commands to establish a superuser account.

BTW, I have the exact same printer, and have been unable to print since migrating to Ubuntu 11.10. It now tells me the system can't find the printer. I've run the Dell install several times to no avail. Good luck getting it to work!

(I'm thinking of buying an HP printer since I've heard they're more compatible with Linux).


Ubuntu 16.04 (HyperV) very large file in /tmp,keeps growing at about 1GB/h-large CPU and network load while system is idle

This question was solved on Ubuntu Forums
It was related to backups. Logged into Duplicati and stopped the automatic backup. It seemed it was constantly trying to backup my system, but never succeeding, as there are no finished backups.
With Duplicati stopped, the dup files don't grow anymore (well, they do, but nowhere near as fast), so it's definitley related to this. CPU usage percentage dropped from around 30% to about 10%.


Email Client which runs in background and notifies when email arrives

No need to quit Thunderbird. It's got plenty of addons for almost everything and there's a nice one just for your case:

https://addons.mozilla.org/pl/thunderbird/addon/mailbox-alert/

It's got configuration for everything you might need. You can set a number of seconds to display that notification window, even large one for like 12 hours.
Also check MinimizeToTray addon.


How can you change position of a machine in juju?

These are unique identifiers; they cannot be changed once allocated.


Installation - running out of space on the primary hdd can seem the system to find the second hdd?

To mount a Hard Drive, it can be done either using terminal, or GUI.  To use terminal, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo mount /dev/sdax /mntpoint

Just replace the X in /sdax with you drive's ID, and replace /mntpoint with the name that you want.  To find out your ID, type sudo fdisk -l

To use GUI, just type Disks in Dash, and when it open up. click on the little right arrow.

Or look at this Post, to have the drive mount automatically.


How to check using the command line which display manager is running?

Short answer:

As mentioned in this answer on Unix & Linux, you should be able to get that from:

cat /etc/X11/default-display-manager

I tried it on both Unity and XFCE, both worked.


What's wrong with upgrading kernel in this case?

I figured out the problem. It turned out that my grub version was 0.97 which is quite old. I upgraded it and everything's become ok now


Upgrading packages through Terminal and knowing when a restart is then needed

If a package wants you to reboot it creates the file /var/run/reboot-required.


Broadcom STA [4727] Wireless not detecting after driver installation

I have a Broadcom BCM4313 wireless card (the same as you) and I had the very same problem: my WPA router network was not showing up.

You just have to change the wireless channel on your router and that's it!
Try one under 12. For instance, I found that channel 3 and 4 worked great for me.

Hope that works.


Netplan error in network definition bonding

Netplan will refuse to use physical devices which are not defined at all in the config, and will consider it an error.
A correct config would look like:
network:
  version: 2
  renderer: networkd
  ethernets:
    enp0s25: {}
    enp8s0: {}
  bonds:
    bond0:
      dhcp4: yes
      interfaces:
        - enp0s25
        - enp8s0
      parameters:
        mode: active-backup
        primary: enp0s25


Keyboard Shift+2 showing @ not double marks

You need to change your keyboard layout.

To do this just go on System Settings > Text Entry and then put your keyboard layout at the top like in this picture:

You can also quick switch from this icon on the top bar:


Can I toggle a script with a shortcut key?

Assuming your script is executable, you can easily toggle the script with the tiny script below:

#!/bin/bash

scriptpath='/full/path/to/script'

if ! pgrep -f "$scriptpath"
then
    nohup "$scriptpath" &
else
    pkill -f "$scriptpath"
fi

To use

Copy the code into an empty file, safe it as toggle_scrip.sh
In the line scriptpath='/full/path/to/script', enter the full path to your script (between single quotes).
Make it executable and run it from a shortcut.

In case you need to control multiple scripts, make the path(s) an argument to the snippet above.


Add an Electron app to Favorites (Gnome Shell)

I've been able to make a shortcut to Franz by creating a .desktop file and registering it in dconf. There's a problem though that when the app is launched there appears and other icon and the favorite icon isn't the active one. You're stuck with two icons but maybe there's someone out there who can help on this point.
Following the instruction on how to make a .desktop file  I added the following lines to the file:

[Desktop Entry]
Encoding=UTF-8
Name=Franz
Exec=/opt/Franz/Franz
Icon=/opt/Franz/resources/app.asar.unpacked/assets/franz.svg
Type=Application
Categories=Development;

...and then copied it over to /usr/share/applications.

In dconf Editor I navigated to org.gnome.shell and added franz.desktop to the array in the manner described here, like:

, 'franz.desktop'

(mind the space after the comma)


Open console with Ctrl+Alt+T, then type:

shutdown -h now

One more alternative (less safe, but works too):

sudo halt

If that doesn't work too, try to kill X server first, then shutdown after X restarts:

sudo killall -9 Xorg


Can't login after upgrade to Ubuntu 16.04 LTS from Ubuntu 14.04 LTS

Two words : "FRESH INSTALL".
It's the safest thing to do. Upgrading to a newer version of ubuntu always has problems. The best thing to do is to have a separate partition for /home. Follow this guide to do that when installing ubuntu from a scratch:

http://www.psychocats.net/ubuntu/installseparatehome

If you've already installed ubuntu and wanna make a separate partition for home then :

http://psychocats.net/ubuntu/separatehome

Next time a never ubuntu distro comes out but you wanna preserve all your files and settings from the previous installation :

In the type of installation choose "Something else".
Delete the previous / partition and also delete any /boot or swap partition if any.
Next follow the aforementioned guide except do not delete the existing /home partition. Click on the /home partition and click change/edit button. It should be set to "do not use". Change it and set the type as ext4 and mount point as /home.
In the user info page of installation set the username to EXACTLY THE SAME AS YOUR PREVIOUS USERNAME(and don't even change the case).

Once the installation is over you'll have to re-install all of your previous programs BUT your settings and preferences will have been saved so not much hassle. All the apps after re-installation will be they way they were before the new os installation. Oh and if you're an amd64 user, set the boot mode to CSM OS cuz UEFI OS installlation fails for all flavours of ubuntu 16.04.


Is there an Ubuntu developer installation which comes with full C/C++ development envirenment installed?

Check out the package "build-essential", that gets you gcc and make.

I don't know of a flavor with the tools pre-installed. If I did, I'd still probably pick mainstream Ubuntu and install the package, rather than use a less-mainstream distro.


On 18.04 i cannot type @ (symbol) with the screen keyboard

There is a bug that affects the on screen keyboard in 18.04.

A similar bug also affects the on screen keyboard in 17.10. (18.04 and 17.10 use different packages for the on screen keyboard, but they surprisingly have the same problem!)

Both bugs only occur if you are using Xorg; if you use Wayland, the bug is not there.

Therefore, one option for you might be to use Wayland instead of Xorg.

Because 18.04 uses a different package for the on screen keyboard, this fix I had posted for 17.10 no longer works.

You should also up-vote this Gnome bug to let the devs know that you are impacted. The more people that express interest, the more likely they will be inclined to provide a fix.


How to set Clang 3.9 as the default in Zesty?

To build on the accepted answer, If you have multiple versions of clang, it may be in your best interest to make clang++ dependent on clang so that all you need to do is update clang to a different version and the version of clang++ follows suit.

You can do this using the --slave option of update-alternatives. So something like this:

sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.9 100 \
   --slave /usr/bin/clang++ clang++ /usr/bin/clang++-3.9

You can of course do it for other versions:

sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-4.0 100 \
   --slave /usr/bin/clang++ clang++ /usr/bin/clang++-4.0

sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-5.0 100 \
   --slave /usr/bin/clang++ clang++ /usr/bin/clang++-5.0

To switch versions, you just type:

sudo update-alternatives --config clang

Enter a selection and both clang and clang++ will be automatically switched to the same versions.

The same idea applies to GCC if you also have multiple versions of that, you can use this method to configure gcc and g++.

Errors:

  update-alternatives: error: alternative clang++ can't be slave of
  clang: it is a master alternative

You may get this error when you try to run the above commands. No worries, it just means that you already configured clang++ on it's own as an alternative, so you will need to remove that alternative before the above will work. You can do so with the command:

sudo update-alternatives --remove clang++ /usr/bin/clang++-3.9

Do this for each version of clang++, then after removing them all, try again.

Sources:

https://codeyarns.com/2015/02/26/how-to-switch-gcc-version-using-update-alternatives/
How to remove Oracle JDK


Use LUKS and LVM on install to external drive

You could try to set up a virtual machine which has it's CD pointing to the ubuntu install iso, and your pen drive mapped as the hard disk store... At least your internal hard drives can be disconnected in the virtual environment, and it stands a chance of working.


How To Remove Ubuntu Without The Ubuntu Partition

If you have a live-CD or live-USB of Ubuntu, you can boot into that and use GParted to remove the linux partition and extend into the unallocated space, as Nayanna has suggested or follow the same procedure and reformat the linux partition to NTFS or FAT .. something that Windows will recognize, effectively giving you two partitions, one for Win system files and one for storage (my personal choice is 2 partitions).

If you do have the live-medium available but GParted is not included, you can use the Ubuntu Software Center or the terminal command sudo apt-get install gparted to get it.
Here is a link to an informative tutorial on GParted, if you are not familiar: http://www.dedoimedo.com/computers/gparted.html


List installed packages that are no longer installable via repository?

APT refers to these packages as "obsolete".

Evidently there is no direct way to list these, but you could do:

aptitude search '~o'

Or alternatively:

apt-show-versions | grep 'No available version'

Source: How do I get a list of obsolete packages?

If you want a GUI tool you can do this with Synaptic by using the built-in "local or obsolete" filter.


error while loading shared libraries: libqjson.so.0

The file is provided by package libqjson0.

sudo apt install libqjson0

Try again sqlprofiler then.

You can use the https://packages.ubuntu.com/ to search for the package containing a specific file, in your case searching “package contents” for “libqjson.so.0” gives libqjson0 as the result.


script to disconnect from the actual wifi

How to Enable/Disable WI-Fi interface Adapter?

Method-1:

To enable your Wi-Fi, run the following command:

$ nmcli radio wifi on

To disbale your Wi-Fi, run the following command:

$ nmcli radio wifi off

To test the status of Wi-Fi whether enabled or not, issue the following command:

$ nmcli radio wifi
disabled

Method-2:

There is another way. In order to apply this method, first you need to find out the Wi-Fi device, so issue the following command:

$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp4s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
    link/ether 1c:1b:0d:62:cf:95 brd ff:ff:ff:ff:ff:ff
3: enp0s31f6: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000
    link/ether 1c:1b:0d:62:cf:93 brd ff:ff:ff:ff:ff:ff
4: wlp5s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
    link/ether e4:a4:71:58:d5:e5 brd ff:ff:ff:ff:ff:ff

Refer item-4 in the output which displays the Wi-Fi device wlp5s0. Notice that the state of device from output is state UP which means that the Wi-Fi is up and running.

To enable Wi-Fi, run the following command:

$ sudo ip link set wlp5s0 up

To disable Wi-Fi, issue the following command:

$ sudo ip link set wlp5s0 down

To know the status of Wi-Fi, issue the following command:

$ ip link show wlp5s0
4: wlp5s0: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN mode DORMANT group default qlen 1000
    link/ether e4:a4:71:58:d5:e5 brd ff:ff:ff:ff:ff:ff

From the above output, one can observe that the state of device is state DOWN which means that the Wi-Fi is disabled.

Turn on and off using aliases.

You can create alias to turn on Wi-Fi as follows:

alias wifion='nmcli radio wifi on'

Similarly, to turn off create another alias as follows:

alias wifioff='nmcli radio wifi off'

To check the status of Wi-Fi whether it is diabled or not, create another alias as follows:

alias wifi='nmcli radio wifi'

Desktop Shortcut Launcher to turn off Wi-Fi.

Create a file ~/wifi/wifioff.desktop and copy the following contents into the file:

[Desktop Entry]
Name=WiFi-Off
Type=Application
Exec=/home/krishna/wifi/wifioff.sh
Icon=/home/krishna/wifi/wifioff.png
Comment=WiFi Off Script
Terminal=true
Categories=Utility;Application;

Now, run the following command to install shortcut file in /usr/share/applications/ directory:

$ sudo desktop-file-install wifioff.desktop

Now create ~/wifi/wifioff.sh file having the following command:

$ gnome-terminal -e "/bin/bash -c 'nmcli radio wifi off;nmcli radio wifi;$SHELL'"

Now make the script file executable by the following command:

$ chmod +x ~/wifi/wifioff.sh

You may download a suitable icon file.

The ~/wifi/wifioff.png file represents as the icon of the desktop launcher wifioff.desktop.

If you click icon WiFi-Off on Dash, then your Wi-Fi interface will be disabled and you will also see message Disabled displayed on the command terminal.

Desktop Shortcut Launcher to turn on Wi-Fi.

You can also install another Desktop Shortcut Launcher to turn on Wi-Fi. You need three files similar to Wi-Fi Off which are wifion.desktop, wifion.sh and wifion.png respectively.

Create a file ~/wifi/wifion.desktop and copy the following contents into the file:

[Desktop Entry]
Name=WiFi-On
Type=Application
Exec=/home/krishna/wifi/wifion.sh
Icon=/home/krishna/wifi/wifion.png
Comment=WiFi On Script
Terminal=true
Categories=Utility;Application;

Now, run the following command to install shortcut file in /usr/share/applications/ directory:

$ sudo desktop-file-install wifion.desktop

Now create ~/wifi/wifion.sh file having the following command:

$ gnome-terminal -e "/bin/bash -c 'nmcli radio wifi on;nmcli radio wifi;$SHELL'"

Now make the script file executable by the following command:

$ chmod +x ~/wifi/wifion.sh

You may download a suitable icon file.

The ~/wifi/wifion.png file represents as the icon of the desktop launcher wifion.desktop.

If you click icon WiFi-On on Dash, then your Wi-Fi interface will be enabled and you will also see message Enabled displayed on the command terminal.

Desktop Shortcut Launcher to display Enable/Disable Status of Wi-Fi.

You can also install a third Desktop Shortcut Launcher to find out the status of Wi-Fi whether it is enabled or not. To accomplish this, just follow the procedure.

Create a file ~/wifi/wifistatus.desktop and copy the following contents into the file:

[Desktop Entry]
Name=WiFi-Status
Type=Application
Exec=/home/krishna/wifi/wifistatus.sh
Icon=/home/krishna/wifi/wifistatus.png
Comment=WiFi Status On Script
Terminal=true
Categories=Utility;Application;

Now, run the following command to install shortcut file in /usr/share/applications/ directory:

$ sudo desktop-file-install wifistatus.desktop

Now create ~/wifi/wifistatus.sh file having the following command:

$ gnome-terminal -e "/bin/bash -c 'nmcli radio wifi;$SHELL'"

Now make the script file executable by the following command:

$ chmod +x ~/wifi/wifistatus.sh

You may download a suitable icon file.

The ~/wifi/wifistatus.png file represents as the icon of the desktop launcher wifistatus.desktop.

If you click icon WiFi-Status on Dash, then the status of your Wi-Fi interface will be displayed either as Enabled or Disabled on the command terminal.

Desktop Shortcut Launchers for Wi-Fi on Dash.

Dash displays the presence of all three icons regarding Wi-Fi installed on the system as shown in the screenshot below.


What happened to php-5.4.11 from Ondrej PPA?

PPA indeed does delete older packages when new version is uploaded.

For further reading about this, see:

Packaging/PPA ("Packages...in your PPA...until...superseded by another package")
Bug 215661 ("it would be nice if launchpad allowed multiple versions of a package to be present in PPA" and the bug is triaged)


Permission denied error while using wget

System32 is a protected Windows directory and is probably the reason for your error.
Please download and install Anaconda (without sudo) in another directory for which you have proper access, such as the Windows Documents or your Ubuntu Home directory.


What new games are available for Ubuntu in 2011?

Oil Rush
Proprietary, beta preorder for $19.95

OilRush is a real-time strategy game based on group control. It offers mechanics of a classical RTS combined with a Tower Wars genre: control the upgrade of production platforms as well as their defence forces, and send battle groups of naval and air units to capture enemy platforms and oil rigs.

Phoronix have been harking on about this for months like they're getting a dollar every time they mention it (they probably are), but it does look like a genuinely pretty game. It's made by Unigine, a company that sells a closed source graphics engine and hardware benchmarks based around the tech-demos they've made with it.
This could be good.


No: Free memory is unused memory: you're not going out of memory at all.
It's possible, but a bad idea: the kernel knows better than you when to use swap...  ;-)

For more information on how the kernel uses memory, have a look here.


What happens if I tell Software Updater : [y] Restart services during package upgrade without asking?

Two options. If the question is asked ...

in a GUI/desktop it will be permanent (there tends to be an "apply" button then). There are a few exceptions: when you start something that shows a graphical guide it could be 1 time (but the examples I can think of are the installer and gparted).
during a terminal action (ie. server, a tty login or a terminal prompt in a desktop) it will be 1 time only. For the option to be permanent you would need to alter a configuration file yourself.


bash script to open a terminal tab error gnome-terminal

I just had to make a

  sudo apt-get install gnome-terminal

and thats it.
Thanks


Prevent (xfce) terminal from scrolling with output

Open Xfce Terminal preferences: Edit > Preferences...
On the Scrolling section of the General tab uncheck the Scroll on output checkbox

With this option the terminal still scrolls automatically on new output, but if you scroll upwards it'll stop scrolling automatically.


How can I change system font values for specific applications?

One possible solution is to make it look for the configuration in a different location than the usual place.
With a reasonably well-behaved modern tool, configuration should be in $XDG_CONFIG_HOME (defaults to $HOME/.config), so setting XDG_CONFIG_HOME to some other directory and keeping a copy of your desired configuration there should work (this should be true of GNOME Tweaks itself). However, not everything supports the XDG specification yet, and especially in the case of proprietary applications, you might need to be more blunt and set HOME instead. (Particularly bad applications may even try to get HOME from NSS, and ignore the HOME environment variable.)
The GSettings/DConf configuration is stored in $XDG_CONFIG_HOME/dconf (~/.config/dconf by default). You can change the font, then copy that directory somewhere else, and run the offending application with XDG_CONFIG_HOME (or HOME, if it's not well-behaved) set to point there.


How to sync two folders on my machine, in one directional syncing?

Warning: this is for bidirectional syncing, but given that you are ok in doing things manually... I do not know if there is an option for unidirectional behavior in unison --- if anyone knows please feel free to edit this answer.

Install unison:

 sudo apt-get install unison unison-gtk

Create this file in the directory $HOME/.unison, call it test.prf (or whatever)

label = sync folders A and B
root = /home/romano/tmp/folderA
root = /home/romano/tmp/folderB

Run unison from the dash, choose your profile above and do a first synchronization. You'll have a graphic interface to choose what to copy and where.

After that, do changes and when you want to keep in sync, use unison again. It will let you decide what to do:


No bootsplash screen shown when starting Ubuntu on HP laptop

Well after seeing the video all I can say is:

Ubuntu loaded without any problems (Not even video problems)
Intel drivers, including for your mobile version are already installed automatically once you install Ubuntu. If they had any problems, you would not be able to even load the Desktop, the Unity Launcher or any other GUI parts that need video.
The video for me basically proved that you do have video. There is no need to install it (at least for Intel). This is not windows where you need to install every driver for every hardware part that exists in your PC/Laptop or device.


Wine 1.4 and Office 2010 installation tutorial - Ubuntu 12.04

You may consider viewing http://appdb.winehq.org/objectManager.php?sClass=application&iId=31 about the installer and searching various programs(Excel/Word/Publisher) here.  You should be able to install following these steps(from this page)

Run http://winetricks.googlecode.com/svn/trunk/src/install-gecko.sh by downloading, setting to executable permissions, and running in terminal.
Use the Wine config tool to create a new wine prefix somewhere where you will install. In this prefix, under DLL overrides, set riched20 to the native version.
Before the installation, if your Ubuntu and Wine is 64-bit, add export WINEARCH=win32 on a new line in ~/.profile(It will be hidden, press Ctrl+H while viewing your home folder to see it)
Install as usual.

Unfortunately, the 64-bit version of Microsoft Office is reported to be garbage, while the 32-bit version ranks bronze, requiring installing wine-mono if it is not installed. Here are some of the 32-bit test results, paraphrased from the WineHQ AppDB:

Excel: Silver, with some UI issues for objects over cells.
Powerpoint: Gold, if you set riched20 to native in step 2.
Access: Bronze:

  Failures:Form and reports constructor can't save changes. Templates. Visual Basic. Most of macroses. UI elements with tables list.
  Word: Mixed results: some report garbage, while others state only charts and clipart don't work.


If there are thousands of files in the folder, it will take some time to pack them all up, even without compression. If the target machine you are using has linux on it as well, you may be able to use rsync to transfer the whole folder with files as is (https://help.ubuntu.com/community/rsync).


VirtualBox Error : The character device /dev/vboxdrv does not exist

Not sure whether you have meanwhile resolved this issue, but I just struck the same problem.  For me the key lay in:

  ┌────────────────────────────────────────────┤ Configuring Secure Boot
  ├────────────────────────────────────────────┐  │
  │  │ Your system has UEFI Secure Boot enabled.
  │  │
  │  │ UEFI Secure Boot is not compatible with the use of third-party
  drivers.                                           │  │
  │  │ The system will assist you in toggling UEFI Secure Boot. To
  ensure that this change is being made by you as an    │  │ authorized
  user, and not by an attacker, you must choose a password now and then
  use the same password after      │  │ reboot to confirm the change.
  │  │
  │  │ If you choose to proceed but do not confirm the password upon
  reboot, Ubuntu will still be able to boot on your   │  │ system but
  the Secure Boot state will not be changed.
  │  │
  │  │ If Secure Boot remains enabled on your system, your system may
  still boot but any hardware that requires          │  │ third-party
  drivers to work correctly may not be usable.
  │  │
  │  │
  │  │
  │
  └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

Once UEFI Secure Boot was disabled DKMS built & loaded the driver just fine.


'ls' shows more files in directory than nautilus

Nautilus has an option you can toggle by clicking on View to toggle Show Hidden Files files to on or off.

If you click the Show Hidden Files option you will see the hidden bakup files in Nautilus.

Files that end with the tilde (~) or begin with the dot (.) are hidden files.

Examples of hidden files:

2.1.cpp~
2.2.cpp~
.bashrc
.history

Your ls command would show even more files if you used the -a argument.

Type in this:

$ ls -a

You will then see substantially more files.


plain text can be enctypted like password in vi editor?

It's not entirely clear to me what you really want to achieve

If you want to encrypt the whole file with vim, you can simply run vim -x myfile.txt and vim will ask you for a passphrase to encrypt your file. On next opening of the file, you don't even need to use -x as vim will find out that it is encrypted and will ask you for the passphrase.
If you want to encrypt only a string in a file with vim, you can run an external command, or you use this help from the Vim Wikia.
If you want to replace all characters of a word with *, you can use vegr* with the cursor on the first character of a word.


Lubuntu updated to 20.04 - Volume and brightness controls stopped working

Installing Lubuntu 20.04 from scratch fixed the main problem, except the irq error but that seems to be not related.


"Documents on XXXX's iPhone " folder opens up when I plug in my iPhone

Have you tried:

sudo apt-get install libimobiledevice-utils;idevicepair unpair && idevicepair pair


No permission to delete file, no space to have permission

If you boot from a live cd you can do a backup because then you don't need to store the permissions on a disk. This is also better because then you don't use the disk you are trying to backup.

Also you can find large files on your system using the find command. Look here for details.

EDIT: or use

du -ma / | sort -nr | head -n 20

to quickly find the 20 largest files.


Want to restore to my default DNS server settings

First 2 lines of /etc/resolv.conf:

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)

#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN

Change your DNS setting in your network manager or if you don't use GUI in /etc/network/interfaces, so they won't be overwitten.


I would guess that restarting notify-osd would solve the problem. I haven't tried this, as I can't reproduce your problem, but as far as I can understand, it should work.


Grass 7.2.1 error in Ubuntu 17.04 "failed to connect to session manager"

SESSION_MANAGER is an environment variable set up when you login via the GUI. grass is a GUI app. You cannot run grass from a Ctrl F1 non-graphic terminal.

For examply my SESSION_MANAGER variable (on a GUI terminal) is:

SESSION_MANAGER=local/aardvark:@/tmp/.ICE-unix/9452,unix/aardvark:/tmp/.ICE-unix/9452

The number ("9452") is the PID of /usr/lib/gnome-session/gnome-session-binary, which owns the GUI session.


Adjusting mouse Sensitivity/DPI in Ubuntu

From the comments...

The Logitech Gaming Mouse G302 has a DPI Cycle button that allows the user to change the DPI setting of the mouse on the fly. This must be set using the Logitech Gaming Software for Windows. Once set, the DPI Cycle switch can be used in Ubuntu to select the desired mouse speed.


How can I rebuild the faac package to get mp4/m4a support and higher bitrates?

It is possible to rebuild the Trusty faac package and solve both of these issues as follows:

Support mp4/m4a by building against an external libmp4v2
Use higher bitrates by patching faac

Use the following steps:

First install the required build dependencies, some build tools and the new dependency of libmp4v2:

sudo apt-get build-dep faac
sudo apt-get install build-essential fakeroot devscripts libmp4v2-dev

Then make a build directory, get a patch to allow higher bitrates with faac and apply that patch:

mkdir $HOME/Desktop/faac_build && cd $HOME/Desktop/faac_build
apt-get source faac
wget http://www.andrews-corner.org/patches/A00-bitrates.patch
cd faac-1.28
patch -p1 < ../A00-bitrates.patch

Appropriately change the packaging information:

debchange -i

My own editing of this file is as follows:

 faac (1.28-7) unstable; urgency=low

   * Patch to allow higher bitrates
   * Compile against external libmp4v2-dev

  -- andrew <andrew@corinth>  Sat, 27 Feb 2016 20:21:02 +1100

It is important to make the version number incrementally greater than the repository version or your next update might overwrite your new package!
Make proper documentation of the patch:

  dpkg-source --commit

Add a brief description of the purpose of the patch in the dialogue box that opens with this command.
And finally rebuild and install the package:

debuild -us -uc -i -I
sudo debi

And now you have access to higher bitrates with faac and you can output to an appropriately tagged m4a/mp4 container!

References:

Updating A Deb


Deleting empty while keeping non empty 4KB files in Ubuntu

I think I found a partial answer. If we suppose that a txt file with an empty content has at least one hidden character, then someone can find all files with size under a specific number of bytes and delete these. If for example we would like to delete all files of size 1 byte we can issue:

find . -type f -size -2c -delete


'apt-get update' gets stuck for hours at "100% [Working]" for specific PPA

After having waited for the command to complete for hours, I saw that it hangs on all tox repositories.

I checked their main page and found out, that the whole infrastructure including repositories, wiki and main site moved to a different domain. That's why the old URL is not alive any more and why apt-get update is timing out.

On their new wiki, they gave the following (slightly modified) script to install the actualized repository:

#!/bin/bash
sudo apt-key del 0C2E03A0
sudo sh -c 'echo "deb https://pkg.tox.chat/debian nightly main" > /etc/apt/sources.list.d/tox.list'
wget -qO - https://pkg.tox.chat/debian/pub.gpg.key | sudo apt-key add -
sudo apt-get install apt-transport-https
sudo apt-get update
echo "Tox Repository Installed. You can now install qtox"

I executed those lines and now all problems with apt-get update are gone!

Unfortunately, the new repository does only contain 64bit builds of qTox yet, so I will have to live with that package being hold back for a while, until they also compile it for 32bit machines!

WARNING: If you have 32bit qTox installed, do not install the new repository! It contains a 32bit qtox package with higher version number than the last one available, so apt-get upgrade will install it and replace your current qTox installation with that one, as soon as you run updates. But it is not a 32bit package, it just looks like one! Inside it contains 64bit executables!

For more information and a script to verify the package's true architecture without having to install it, see my Q&A here!

The last repository update fixed this and qTox is now available for both architectures again! :)


Your command for detecting Firefox processes is horrible, it also includes processes with "firefox" in their command line (e.g. directory name). Use pidof firefox instead.

You can first save the PIDs, check for whether it's (non)empty and adjust the behavior:

pids=$(pidof firefox)
if [ -n "$pids" ]; then
    kill -9 $pids
else
    echo "No Firefox processes found"
fi

Or use killall instead if you do not need an error message:

killall firefox


How to Sync OneDrive Business (Office 365) on Linux (Ubuntu)?

Here's what I did to get it working very quickly:

Used a Windows machine to set up a sync using the Windows version of Goodsync.  This includes setting up the (browser-based) authorization with Office 365.
Used the "Export" option in the Windows version of Goodsync to create a jobs.tix file.
Created a ~/.goodsync folder on the Linux machine.
Placed the jobs.tix file in that folder.
This is a NEW STEP I had to discover on my own: RENAMED the jobs.tix file to jobs-groups-options.tix — this allowed the entire configuration to be used.
Applied the following changes, as shown by the diff output from the original Windows jobs.tix file:
$ diff ~/Downloads/jobs.tix ~/.goodsync/jobs-groups-options.tix
51c51
<     Url = "file://"
–––
>     Url = "file:///home/tomh/onedrive"
54c54
<   Url = "file:///~tomh-a/od"
–––
>   Url = "file:///home/tomh/onedrive"
68c68
<  } Bookmarks = { }   TimeStamp = 013061702176
–––
>  } Bookmarks = { }   TimeStamp = 013061705503
84c84
<     Url = "file:///~tomh-a/od"
–––
>     Url = "file:///home/tomh/onedrive"
87c87
<   AcctUrl = "file:///~tomh-a/od"
–––
>   AcctUrl = "file:///home/tomh/onedrive"

Where tomh-a is my Windows username, od was my local Windows OneDrive folder, tomh is my Linux username, and onedrive is my local Linux OneDrive folder. You can safely ignore the TimeStamp lines, I just left them in for completeness. Note that this diff output was not sanitized or changed in any way except to replace certain characters with the corresponding HTML entities. So yes, you all now know my Windows and Linux user names and OneDrive sync folders. Can't see how that compromises my security, and it improves the chances that it is typo-free.
One obscure thing I changed that make it work: You'll find these two lines in the file: Side2 = <SideOptions>
Conn = <Connect>  I changed the second line as follows: Side2 = <SideOptions>
Dir = <Connect> and it immediately started working. Disclaimer: After I ran the sync (next step) Goodsync changed the line back to Conn = <Connect>. So I could be wrong. Maybe I could have left it as-was (and is again). But that's the last change I made before it started working. It's entirely possible that I changed something else at the same time that made it work.  But at least making that change didn't break it for me :)
Run the sync with gsync sync "Onedrive" substituting "Onedrive" with whatever appears in the lines that look like:Jobs = { <Job>
Name = "Onedrive"

It is my belief that the API v2.0 requirement of using OAuth has made it impossible to simply take someone else's jobs-groups-options.tix file and make it work for yourself simply using Linux. That is, until they decide to make a GUI version for Linux — or at least add the OAuth code that launches your browser to establish the authorization.


Don't do install alongside windows instead install seperately on another Partition using a live USB this will install a grub menu first then you will be able to get the windows and Ubuntu both working because windwos 8 overwrites the MBR make partitions with windows as you will know exactly what are you doing...


Touchpad tab is missing but ubuntu detects

There might be something wrong with your driver.

Check if xserver-xorg-input-synaptics is installed.

or do the following:

Enable SHMConfig

Change the value for SHMConfig to true by editing the 50-synaptics.conf file.
/usr/share/X11/xorg.conf.d/50-synaptics.conf
// It might look like this:
Section "InputClass"
     Identifier "touchpad catchall"
     Driver "synaptics"
     MatchIsTouchpad "on"
     MatchDevicePath "/dev/input/event*"
           Option "TapButton1" "1"
           Option "TapButton2" "2"
           Option "TapButton3" "3"
           Option "SHMConfig"  "true"
EndSection
or
Open a terminal and type:
synclient SHMConfig=1
Install gsynaptics from the universe repository.


Why does x-terminal-emulator sometimes exit on launch and sometimes not?

/usr/bin/x-terminal-emulator is a symbolic link that can point to many different implementations of a terminal such as gnome-terminal or konsole among others. Each terminal may have it's own logic, but it's common for some programs to open a "master" process the first time then on subsequent opens simply tell the already running process to spawn another terminal or open another tab.


How to use USB 3.0 speeds with the Samsung Galaxy S5

Answer to original question:

You should continue to use USB 2 with MTP until Linux libraries are updated, or you can use something like Wifi File Transfer (web based) or ES File Manager (supports SFTP for file transfers over SSH) and Samba, etc.

However, please consider that USB 2 is faster than what many external hard drives can provide, is faster than almost all insertable SD cards, and the bus of the Samsung is totally saturated by USB 3 transfer speeds (its a phone, not a PC) and it can't do transfers to the SD Card and the USB 3 at the same time.   Basically, you won't get any additional speed.  Try it under Windows with USB 3 and then try it again under Ubuntu with USB 2 ... and you tell me if there is an appreciable speed difference.

You can try USB 3 and then tether the phone to enable USB networking.  You can then attempt a file transfer via one of the above methods, such as ES File Manager and SFTP (uses your SSH server).  However, for the reasons above, you likely won't get speeds much above USB 2.   Basically, USB 3 support on a phone is more of a marketing gimmick.


Windows all disapeared but are still running

I'm fairly new to Ubuntu but maybe you switched workspaces? I don't know how to switch back unless you have the switch workspace button on the taskbar though... Good luck!


How to solve problems with the installation of Virtual-Box?

Do you have enabled virtualization in your BIOS settings? If not try doing that.

Intel page about how to do this

Some time ago I had similar issue and it solved it.


The main difference between moving up a directory, and moving down a directory, in the directory tree is:

Moving up - there is only one option, hence the command doesn't need to mention the folder name:

cd ..
Moving down - there might be several sub-directories, hence you first need to choose sub-directory, to change directory down into example-dir the command is:

cd example-dir


How can I remove the Trash icon from the Unity launcher?

In the desktop interface, the Dash icon and the Trash icon use the top and bottom slots of the launcher, always. We have not allowed the removal of the Trash so that we can enable developers to trust that it will always be there, which means "drag to the trash" is always possible.

It might be worth considering relaxing the requirement that the trash always be on the bottom corner, allowing other icons to take that spot. A blueprint to that effect, discussing the consequences and solutions to issues that might arise, would be welcome.


Have you tried to let apt fix this issue? What I mean by this is simply running:

sudo apt install -f

Alternative solution

Have you tried manually installing each of these missing dependencies??? To get a list you can run something like:

apt-cache depends libgnomeui-0

And then you could manually try installing each one, with:

sudo apt install dependency_here

Last Option

Have you tried just deleting libgnomeui-0?


Hiding File and folders, and harddisk partition

In the world of Linux, any file or directory that's name starts with a . is considered hidden.

Note that hiding a file or directory is not a measure of security, it's just for convenience, so that unnecessary files such as configuration files don't bother your daily routine. They can be listed easily if you wanted, e.g. ls -lA.

As for hiding partitions, you can use gparted to set a "hidden" flag on partitions. This will hide the partition from operating systems. Note that this can be easily reverted, so don't use this for hiding sensitive data.

If you want to operate on the same disk you're booting from, you might need a live CD/DVD or (preferably) a live USB stick.

If you are looking for security, search this site (or Google) for encrypted folders and partitions.


Ubuntu is asking for sudo password on startup

Sudo isn't needed to launch /bin/sh so your permissions may have changed. Use this to check:

$ ll /bin/sh
lrwxrwxrwx 1 root root 4 Aug  2  2018 /bin/sh -> dash*

$ ll /bin/dash
-rwxr-xr-x 1 root root 154072 Feb 17  2016 /bin/dash*

Here /bin/sh is a link that all users have read/write/execute permissions to. The link points to dash so run ll on it as well to see that all users have read & execute permissions.

If your permissions are setup correctly, then there is something amiss with the program you are running on startup.


cannot build Java programs in Geany Editor?

Press F8 or Build -> Compile instead of Shift-F9 or Build -> Make.

After that F5 or Build -> Execute


Downloading OS when computer has been stripped

You will need to download a Ubuntu ISO file from here http://www.ubuntu.com/download/desktop and burn it to ether a USB drive or DVD you can use this guide to burn your ISO image http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-windows

You will probably need to go in to your BIOS and configure your machine to boot from the USB or DVD.Then insert the USB into your machine and hit F12 to select the USB device

Just follow the directions you will then be able to try Ubuntu even before you can install it. I would try it just to make sure it's the OS you want and see how it preforms


How do I get Ubuntu to stop hanging periodically?

The eCryptfs errors were caused by a regression.

It was fixed in Oneiric kernel version 3.0.0-15.25.

I'm not sure that the eCryptfs bug is what caused all of the problems you listed, but upgrading your kernel will remove one more variable while tracking down your issues.


Notetaking Software that supports Mathematics, code, and pictures?

Joplin is probably what you're looking for. It supports Markdown, and thus can be used to store code snippets. It also supports Math expressions using the Katex notation. Notes can be exported to PDF directly from Joplin. And of course, it supports images too.

  Joplin is a free and open source note taking and to-do application available for Linux, Windows, macOS, Android and iOS. Its key features include end-to-end encryption, Markdown support, and synchronization via third-party services like NextCloud, Dropbox, OneDrive or WebDAV.

For me, Joplin is the perfect Evernote alternative, and more, since it supports encryption, is open source and supports synchronization using a cloud sync service of your choice.


Strange bug when booting legacy bios and efi/uefi compatible usb grub drive

So I spent about an hour testing everything I could of think of and seem to have solved the issue.

When i try to test the drive on my bios based system, the bios won't
post if the drive is installed.

If I put the drive in any other port, same issue.
If I blow partition table away with dd, the bios successfully posts.
If I recreate the partition table without a grub install the issue returns.
If I use this drive on any uefi system, this issue doesn't exist.
If I remove the unusual offset of the first partition the issue persists.
If I move the efi partition behind the bios_grub, and main grub partition, the issue persists.
If I make the whole drive a single partition with a efi attribute flag the issue persists.
If I make the whole drive a single partition with a BIOS_grub attribute flag the issue persists.
If I test the drive with a single blank partition without any flags, the issue persists.
If I do any of the previous tests of 2 other drives from different manufacturers the issue persists.
If I create hybrid mbr by converting the boot partitions from gpt to hybrid mbr after creation, this solved the issue.

Googled my issue with hybrid mbr as a search criteria. I found this article of someone doing what I attempted to do.
https://www.slivermetal.org/2016/09/18/how-to-create-an-hybrid-uefi-gpt-bios-gptmbr-boot-usb-disk/

I hope this helps others trying to do weird stuff with their bootloaders.


Not all windows frames displayed in fvms' windows in vnc4server in Ubuntu

Try putting the DecorateTransient Style in your .fvwm/config (or FVWM Console):

Style * DecorateTransient


I've written a tool that automates this chore, in case it helps anyone else: https://github.com/erichs/bootnukem. It removes unused kernel and kernel header packages, and is intended to be run periodically. If, when upgrading, you only need the currently running kernel (as a fallback) plus the latest available kernel, this tool might be for you.


netstat or alternative in docker ubuntu server 16.04 container

As you can see from https://packages.ubuntu.com/xenial/amd64/net-tools/filelist, netstat is provided by the net-tools package. Therefore, you can get netstat by running:

sudo apt update
sudo apt install net-tools

net-tools is probably not installed by default in the Docker image for Ubuntu 16.04 to keep the image size as small as possible.


Install Samba 3.0.24 on Ubuntu Server 10.04 from Source

Edit the source file client/mount.cifs.c and add

#ifndef PATH_MAX
#define PATH_MAX 256
#endif

I added it under

#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif

not sure if it matters, but that made that error go away and finish making.

Note. I found references to that value beeing 256 and others of it beeing 1024, unsure of what the difference is, i tried 256 and it installed


Is compiz embedded in Unity 3D by default in 11.04?

Unity 3D is a Compiz plugin, so it needs Compiz to run. CCSM is installed by default, too.


I would recommend Thunderbird.  It has these features:

  Supports multiple POP and IMAP accounts for all your email addresses
  Easy account setup with the account wizard
  Powerful, yet simple-to-use search and filtering
  Saved searches
  Multiple viewing options, including vertical columns
  Message threading and conversation views
  One-click address book adding
  Attachment reminders
  Tabbed message viewing
  Message archiving, perfect for Gmail users
  Built-in junk filtering
  A migration assistant that helps you move your accounts from other    email clients like Outlook
  An open source add-on infrastructure that lets you customize    Thunderbird for your needs
  Integration with the GNOME desktop on many distributions, including    Ubuntu 1

You can use Thunderbird as client for Microsoft Exchange 2010 server on Ubuntu.  To be able to connect to Microsoft Exchange 2010 server from Thunderbird you may have to install an Exchange gateway called DavMail.  For more info on DavMail, installation instructions, and to download it Visit DavMail

1Source: lifehacker


Adding h264ify addon to Firefox slowes down full screen 4K video playing

First, let me point out, that there is no Hardware acceleration for video in Firefox for Linux at all, so there is no point to install any add-on offering such features.

Second, its not obvious that changes made add-on you installed in your Firefox setting, so most easy solution will be to reset your profile.

You can go at about:support address in adressbar and click on Refresh Firefox button which should reset your preferences to default and revert any pref changes you or add-on made.


Remove the server_name directive. There is no such thing for the stream module as you can see at https://nginx.org/en/docs/stream/ngx_stream_core_module.html

Think about it, the stream module provides generic TCP proxy functionality. TCP has no concept of host names for virtual hosting, unlike the HTTP Host header, or TLS Server Name Indication (SNI) extension.

If you meant to bind to the public IP address of bbb.flossir.org as opposed to the wildcard address, use:

listen bbb.flossir.org:22;

See https://nginx.org/en/docs/stream/ngx_stream_core_module.html#listen


Ubuntu 12.10 Unity wont start when I activate Xinerama with 6 screens

Well I did a lot of search and it seems that Unity doesn't work with ATI Drivers for the moment.

So I went to KDE...
I have downloaded kUbuntu and installed.

After, I went to terminal by typing Ctrl+Alt+F1 and downloaded the files needed:

sudo apt-get install module-assistant
sudo m-a prepare

I have stopped lightkdm

sudo /etc/init.d/lightdm stop

Than I installed the .run Driver file from ATI. Of course you need to unzip first

unzip filedriver.zip
sudo chmod +x filedriver.run
sudo ./fildriver.run

Follow the installation and answer questions.

And voilà.... you'll have to reboot by doing,

sudo reboot

When you will be back in the desktop... you'll have to configure all your monitors in AMD Catalyst Control Center (admin mode) wich takes few restart to be setup.

For me it's working.

You will also notice that there is AMD Testing use only if you have installed the 12.11 Beta Driver from AMD website.

You can get rid of it by doing this:

sudo gedit /etc/ati/signature

You will see in big letters UNSIGNED.
Highlight that and delete it. Now paste this into there:

  b67d452b67e1e4baee18b65de7643cc0:8e537c1d56ccd588de2c866886490df38148761a24cca5eea7388168d3560bf9:8e1870185082d5dedb2ed53e835104f8d21877485fd7d282d62e8264d7005af38e4c711350d7d5dbdc2cd53e865159a5d74a76135fd0d2828a2b836bd7065af9

Save and close that text editor. Now log out of Ubuntu. Log back in. There should be no watermark anymore.

You're done with the installation.

Part of my search is from those website:

http://ubuntuforums.org/showthread.php?p=12315997&posted=1#post12315997

http://debianandi.blogspot.ca/2012/09/how-to-install-ati-proprietary-driver.html

Yeah, you will see it is not so funny when mouse is stuck in desktop in another window... you'll have to activate Xinerama to get rid of this.


Ubuntu 18.10 does not wake up from hibernate

Run the following:

cd /etc/default/
sudo gedit grub

modify this two lines:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi"
GRUB_CMDLINE_LINUX=""

then run:

sudo update-grub

finally: reboot


Goes to grub rescue after removing the partition with linux

I had a similar issue in the past where I messed with my partition scheme.

What worked for me was reinstalling Ubuntu on one of the partitions. Doing this created a fresh install of grub which in turn recognized all my partitions normally.

You might also want to try using a Boot-Repair:
Getting Boot-Repair instrucions


Try to remove them both and install LAMP with tasksel:

sudo apt-get install tasksel
sudo tasksel

Check the LAMP server and click "ok".

After that install phpmyadmin and copy-paste your WordPress directory into
/var/www/html
folder and run it.


WOL ethtool systemd service not starting

ANSWERED!
you need to enable WOL in netplan, and configure a service that applies ethtool setting on reboot to specify wich (pubmg) network types wake your computer,
Ubuntu 18.04 does not use etc/network/interfaces/, but /etc/netplan/.
I didn't knew that you need to add a line in your netplan/yaml file, wakeonlan :true
      ethernets:
          enp3s0:
                  addresses: [192.168.0.99/24]
                  gateway4: 192.168.0.1
                  wakeonlan: true
                  nameservers:
                    addresses: [192.168.0.1]

I found you need to use ethtool command in combination with the netplan
wakeonlan: true setting. and you need to have a service to make the ethtool command persist

in systemd/system you can add a script to specify types of WOL
I highly recommend only using g (magic packet) because if you specify pumbg you are likely to get immediate reboots after shutdown, becuase you accept ping,arp,etc... for waking!

script:
etc/systemd/system/wol.service
[Unit]
Description=Configure Wake-up on LAN

[Service]
Type=oneshot
ExecStart=/sbin/ethtool -s enp3s0 wol g

[Install]
WantedBy=basic.target


monitor goes blank opening google chrome download page

Experienced the same issue. In a duplicate of this question (Whenever I go to the google chrome download page my laptop screen turns off), NickT suggested to check in /var/log/syslog, where a GPU crash is noticed. Apparently, the user filed a bug report on https://bugs.freedesktop.org/, but I couldn't find it.

Jan 26 22:24:57 zaczyn kernel: [  146.804089] [drm] stuck on render ring
Jan 26 22:24:57 zaczyn kernel: [  146.804099] [drm] GPU crash dump saved to /sys/class/drm/card0/error
Jan 26 22:24:57 zaczyn kernel: [  146.804101] [drm] GPU hangs can indicate a bug anywhere in the entire gfx stack, including userspace.
Jan 26 22:24:57 zaczyn kernel: [  146.804102] [drm] Please file a _new_ bug report on bugs.freedesktop.org against DRI -> DRM/Intel
Jan 26 22:24:57 zaczyn kernel: [  146.804104] [drm] drm/i915 developers can then reassign to the right component if it's not a kernel issue.
Jan 26 22:24:57 zaczyn kernel: [  146.804105] [drm] The gpu crash dump is required to analyze gpu hangs, so please always attach it.
Jan 26 22:24:57 zaczyn kernel: [  146.805115] [drm:i915_set_reset_status] *ERROR* render ring hung inside bo (0x55c8000 ctx 0) at 0x55c81cc
Jan 26 22:24:57 zaczyn kernel: [  146.864080] [drm] GMBUS [i915 gmbus vga] timed out, falling back to bit banging on pin 2
Jan 26 22:24:57 zaczyn kernel: [  147.312076] [drm:i915_reset] *ERROR* Failed to reset chip.

Trying too look into /sys/class/drm/card0/error (as sudo), I get no error state collected. Reproduced the error, switch to a cmd with Alt+Tab unseen and dumped the file right after the error. Still the same content.

Workaround

Google support described a workaround (i.e. installing google-chrome from the command line) under https://productforums.google.com/forum/#!topic/chrome/hOUs6FH35tg, which allowed me at least to install google chrome (and open the chrome download page :P).

Edit
Tried to disable the hardware acceleration in Firefox, considering the apparent GPU involvement. But it did not help.

Edit
Other possible solutions can found searching for stuck on render ring, mainly concerning changing accelmethod back to uxa.


How to get quarter-window snapping for Ubunt18.04 Metacity

You have to use X-Tile for custom window tiling.
cd ~/Downloads
wget http://www.giuspen.com/software/x-tile_3.3-0_all.deb
sudo apt-get install ./x-tile_3.3-0_all.deb

and you will get something like:

Or better - install MATE desktop to use its preinstalled tiling features:


Is there any version of Vim which uses the libxft library to render fonts?


Ubuntu 14.04 - Suspend only locks screen

Open your command line (terminal) and enter this command to edit the config file:

sudo -H gedit /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla

Copy and paste below lines into the file and save it.

[Re-enable hibernate by default in upower]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes

[Re-enable hibernate by default in logind]
Identity=unix-user:
Action=org.freedesktop.login1.hibernate
ResultActive=yes

After reboot it will work. (I too have same bug but in my case for hibernate too)


How can I remove the landscape.canonical.com greeting from motd?

To remove the landscape.canonical.com line, create or edit (as root) the file /etc/landscape/client.conf.

In /etc/landscape/client.conf, add these lines:

[sysinfo]
exclude_sysinfo_plugins = LandscapeLink

This works for all default plugins:

 Load, Disk, Memory, Temperature, Processes, LoggedInUsers, LandscapeLink, Network

So, to have your motd look more like this :

  System load:  0.83                Swap usage:          0%
  Usage of /:   59.5% of 117.38GB   Users logged in:     3
  Memory usage: 7%                  IP address for eth0: 10.10.30.70

...you would want to remove Temperature, LandscapeLink, Processes from the landscape-sysinfo process.

These can be added in the client.conf file as before, comma separated:

[sysinfo]
exclude_sysinfo_plugins = LandscapeLink,Temperature,Processes

This can be tested one the command line with:

landscape-sysinfo  --exclude-sysinfo-plugins=Temperature,LandscapeLink,Processes

See landscape-sysinfo --help for some additional information.


Trying to use dd to write an iso to a usb stick to be used in Windows 7

I figured this out.  Followed the instructions here on ServerFault for creating a bootable windows USB drive in Linux

I had ignored this until now, since I didn't think I needed a bootable USB drive.  But this method seemed to preserve the partition information on the USB drive in such a manner that Windows was able to read it.

The answer is by jthurner

  Install ms-sys - if it is not in your repositories, get it
  here. Or alternatively, make sure lilo is installed (but do
  not run the liloconfig step on your local box if e.g. Grub is
  installed there!)

  Check what device your USB media is assigned - here we will assume it
  is /dev/sdb. Delete all partitions, create a new one taking up all
  the space, set type to NTFS (7), and remember to set it bootable:

  sudo cfdisk /dev/sdb   or sudo fdisk /dev/sdb  (partition
  type 7, and bootable flag)

  Create an NTFS filesystem:

sudo mkfs.ntfs -f /dev/sdb1`

  Write Windows 7 MBR on the USB stick (also works for windows 8),
  multiple options here:

  sudo ms-sys -7 /dev/sdb
  or (e.g. on newer Ubuntu installs) sudo lilo -M  /dev/sdb mbr (info)
  or (if syslinux is installed), you can run sudo dd if=/usr/lib/syslinux/mbr/mbr.bin of=/dev/sdb

  Mount ISO and USB media:

sudo mount -o loop win7.iso /mnt/iso
sudo mount /dev/sdb1 /mnt/usb

  Copy over all files:

sudo cp -r /mnt/iso/* /mnt/usb/

  (or use the standard GUI file-browser of your system)

  Call sync to make sure all files are written.


Illogical GTK theme behaviour on Ubuntu 18.04

It seems those are applications installed as snap packages. You may verify it by running

snap list

The snap execution environment doesn't see any of the themes on your system (local or system-wide). So this is somewhat an expected behaviour.

As a workaround you may remove those snap applications by running

snap remove <package-name>

and install their apt versions by running

sudo apt install <package-name>


Compiz live wallpaper plug-ins, where and how for 12.04

The answer to your question is No i havent used them.

The Compiz wikipedia is a good place to start for up to date references to what your looking for


Copying data from server to PC on the same network

It's very unlikely that you have write access to /home (you'll need to specify something like /home/user instead).


Problem with Adroid SDK of Android Studio

The current direct link for SDK Tools package is (2018-12-31): https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip. But, as others have already said in other responses to similar questions on SO, the best way is to let Android Studio handle the installation, because it will install other useful apps, too (emulator, platform tools, etc). In my case, I wasn't connected to the internet when I first started Android Studio, so I got stuck at the same error. After removing the ~/.AndroidStudio3.2 folder and a ./studio.sh restart, it asked me to download all the necessary apps (note: the dowload has ~1GB!) and then Android Studio started flawlessly!


How to use inotifywait in a non-blocking way and mail the results?

If you'd like to send a mail everytime a file has been moved from the watched directory, you'll need to set up a different process monitoring this and sending the mail.

For the reasons you have just described, it doesn't matter where you put the inotifywait command, since the mv command does not happen at the same time, you won't catch the required event.

But if you watched the directory from another process, the moving takes place while you're watching and you can detect any changes.

By building on the previous example, you can start with the following sample script.

while true
do
    fileName=$(inotifywait -e moved_from /home/posto-11v/Documents/Processo/CONCLUIDO | sed -r 's/^.*MOVED_FROM(,ISDIR)*\s+(.*)$/\2/g')
    mail -s "$fileName" USER@MAIL.HOST < ~/Documents/personaproject/Programa/scripts/mail.txt
done

Please fill in the required details, it works basically the same as the previous example.

Note:
There are a few caveats, for example it might miss some moves while the mail is sent. It depends on the quantity and frequency of moves.


ubuntu 18.04.3 LTS does not recognise my macbook onboard camera

From @simon-shields's edited question:

This is how I fixed it.

(Note that this requires curl to be installed, which can be done with sudo apt install curl.)

1) Clone, the bcwc_pcie driver from https://github.com/patjak/bcwc_pcie.git

$ cd /usr/local/src
$ sudo git clone https://github.com/patjak/bcwc_pcie.git
Cloning into 'bcwc_pcie'...
remote: Enumerating objects: 8, done.
remote: Counting objects: 100% (8/8), done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 1057 (delta 2), reused 4 (delta 0), pack-reused 1049
Receiving objects: 100% (1057/1057), 352.48 KiB | 537.00 KiB/s, done.
Resolving deltas: 100% (709/709), done.

2) Clone the facetimehd-firmware from https://github.com/patjak/facetimehd-firmware into the bcwc_pcie folder

$ cd /usr/local/src/bcwc_pcie
$ sudo git clone https://github.com/patjak/facetimehd-firmware
Cloning into 'facetimehd-firmware'...
remote: Enumerating objects: 1, done.
remote: Counting objects: 100% (1/1), done.
remote: Total 886 (delta 0), reused 0 (delta 0), pack-reused 885
Receiving objects: 100% (886/886), 290.76 KiB | 294.00 KiB/s, done.
Resolving deltas: 100% (585/585), done.

3) Build and install the facetimehd-firmware

$ cd /usr/local/src/bcwc_pcie/facetimehd-firmware
$ sudo make

Checking dependencies for driver download...
/usr/bin/curl
/usr/bin/xzcat
/bin/cpio

Downloading the driver, please wait...

Found matching hash from OS X, El Capitan 10.11.5
==> Extracting firmware...
 --> Decompressing the firmware using gzip...
 --> Deleting temporary files...
 --> Extracted firmware version 1.43.0

$ sudo make install
Copying firmware into '//lib/firmware/facetimehd'

4) Make and install the bcwc_pcie driver

$ cd /usr/local/src/bcwc_pcie
$ sudo make
make -C /lib/modules/5.0.0-23-generic/build M=/usr/local/src/bcwc_pcie modules
make[1]: Entering directory '/usr/src/linux-headers-5.0.0-23-generic'
  CC [M]  /usr/local/src/bcwc_pcie/fthd_ddr.o
  CC [M]  /usr/local/src/bcwc_pcie/fthd_hw.o
  CC [M]  /usr/local/src/bcwc_pcie/fthd_drv.o
  CC [M]  /usr/local/src/bcwc_pcie/fthd_ringbuf.o
  CC [M]  /usr/local/src/bcwc_pcie/fthd_isp.o
  CC [M]  /usr/local/src/bcwc_pcie/fthd_v4l2.o
  CC [M]  /usr/local/src/bcwc_pcie/fthd_buffer.o
  CC [M]  /usr/local/src/bcwc_pcie/fthd_debugfs.o
  LD [M]  /usr/local/src/bcwc_pcie/facetimehd.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /usr/local/src/bcwc_pcie/facetimehd.mod.o
  LD [M]  /usr/local/src/bcwc_pcie/facetimehd.ko
make[1]: Leaving directory '/usr/src/linux-headers-5.0.0-23-generic'

$ sudo make install
make -C /lib/modules/5.0.0-23-generic/build M=/usr/local/src/bcwc_pcie modules_install
make[1]: Entering directory '/usr/src/linux-headers-5.0.0-23-generic'
  INSTALL /usr/local/src/bcwc_pcie/facetimehd.ko
At main.c:160:
- SSL error:02001002:system library:fopen:No such file or directory: ../crypto/bio/bss_file.c:72
- SSL error:2006D080:BIO routines:BIO_new_file:no such file: ../crypto/bio/bss_file.c:79
sign-file: certs/signing_key.pem: No such file or directory
  DEPMOD  5.0.0-23-generic
Warning: modules_install: missing 'System.map' file. Skipping depmod.
make[1]: Leaving directory '/usr/src/linux-headers-5.0.0-23-generic'

5) Enable the drivers

$ sudo depmod
$ sudo modprobe -r bdc_pci
$ sudo modprobe facetimehd

Now Skype uses the facetimehd driver for video.

But, for some reason the camera does not come on until used by another native application, e.g. cheese.

$ sudo apt install cheese

**6) To ensure facetimehd starts on reboot append a line to
/etc/modules by running the command
sudo echo facetimehd >> /etc/modules


Packaging library-only software with snap

You can publish libraries as a shared part, or you can push a snap that offers the library as a content interface.

shared part

Snaps are composed of parts. If a snap depends on a library, it can be defined as a part. And parts can be shared, for now in a wiki, but with plans to build a fancier parts registry.

So, instead of publishing libraries as snaps in the Ubuntu Store, they should be published in the shared parts wiki. Then when a snap wants to use that library, let's say lapack, it just needs the following in a part in the snapcraft.yaml file:

after: [lapack]

The library will be bundled in the snap, and after installing the snap it will live somewhere around /snap/my-snap/current/usr/lib.

content interface

There's also another way to make your libraries available to other snaps. You can write your library as a snap that offers the content interface. Then other snaps can consume that content, which means that they will be able to access the libraries shared by the provider. With the caveat that the interface will be auto-connected only for snaps from the same publisher, if you want to consume something provided by a third-party it will need manual intervention.

This is how the ubuntu-app-platform libraries are shared with the default Ubuntu Personal apps: https://insights.ubuntu.com/2017/01/26/using-the-ubuntu-app-platform-content-interface-in-app-snaps-2/

To answer your final question, snaps can't install files in /usr/lib.


How to set up Ubuntu 15.04 for professional CSGO

1) Depend on your type of card and how much effort valve put in to optimize the game, results may vary, but from my experience nvidia card give pretty good performance with cs go, just search additional driver in the dash and install nvidia driver from there and you're good to go

2) To turn off mouse acceleration completely, search startup application and add new entry there

  Name: Disable mouse accel
  Command: xset m 1 0 (1: base speed of your mouse - equivalent 6/11 on windows , you can lower it if you like; 0: turn off mouse accel)

3) Once you installed nvidia driver, just search nvidia in the dash, open nvidia then navigate to CRT-1, it's just below Powermizer, on control tab in CRT -1 you can set Digital Vibrance, gamma and brightness on color correction tab


Lost partitions after accidently selecting "Erase entire disk" on Ubuntu install (but did not proceed with installation)?

Boot Ubuntu 14.04 using a live media like USB stick or DVD then open terminal and execute following commands one by one :

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

Then use recommended repair and see if problem is solved, if it does not solve you problem, then upload boot-info summary result into your question.


Is there any way ffmpeg send video to /dev/video0 on Ubuntu?

You can do this with v4l2loopback. First you need to install it:
Install v4l2loopback
Method 1: Install v4l2loopback from the repository
sudo apt install v4l2loopback-dkms
sudo modprobe v4l2loopback

This is easy but older versions of v4l2loopback have some known bugs, so consider compiling it instead if you encounter any issues.
Method 2: Compile v4l2loopback
If it's not in the repository for your Ubuntu version, or you want the latest version, you can compile it:
sudo apt-get install build-essential checkinstall
wget https://github.com/umlaeute/v4l2loopback/archive/main.zip
unzip main.zip
cd v4l2loopback-main
make
sudo checkinstall --pkgname=v4l2loopback --pkgversion="$(date +%Y%m%d%H%M)-git" --default
sudo modprobe v4l2loopback

Uninstalling
If you want to remove the package you compiled:
sudo apt-get remove v4l2loopback

Examples
Note that the actual video number may vary depending if an existing device is already using /dev/video0. Check output of ls /dev/video* or v4l2-ctl --list-devices.
Desktop to virtual camera
Now run ffmpeg. Example for desktop using x11grab:
ffmpeg -f x11grab -framerate 15 -video_size 1280x720 -i :0.0 -f v4l2 /dev/video0

Video file (MP4) to virtual camera
ffmpeg -re -i input.mp4 -map 0:v -f v4l2 /dev/video0

Image to virtual camera
ffmpeg -re -loop 1 -i input.jpg -vf format=yuv420p -f v4l2 /dev/video0

Webcam → ffmpeg → Virtual webcam
Add text
With drawtext filter:
ffmpeg -f v4l2 -i /dev/video0 -vf "drawtext=text='Hello World':fontsize=12:fontcolor=white:font=Arial:x=w-tw-10:y=h-th-10,format=yuv420p" -f v4l2 /dev/video1

See How to position drawtext text?
Greenscreen / chroma key / replace background
Using chromakey, overlay, and format filters:
ffmpeg -re -i background.jpg -f v4l2 -i /dev/video0 -filter_complex "[1]chromakey=color=#326964:similarity=0.07:blend=0.02[fg];[0][fg]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2:format=auto,format=yuv420p" -f v4l2 /dev/video1

See How to position overlay?
Preview with ffplay
ffplay /dev/video0

Common errors

Unable to open V4L2 device '/dev/video0'
Failed to open /dev/video0: No such file or directory
Unknown V4L2 pixel format equivalent for yuvj422p

See this answer for solutions.


Ready-to-use time and/or datetime selection widgets for GTK3?

For the calendar you can use Gtk.Calendar which is part of GTK itself (and available to embed in your app in Glade. I am not aware of a slider for selecting the time, but you could add this easily with some Gtk.SpinButton widgets.


I can't install window games I get an error writing resource (6)

If you would like to install games that are based on Windows, you should check the developer's or game's website to check whether the game is available on Linux. If yes, then you can install it according to the method listed on the website. Keep in mind that Windows WIN32 executables (EXE files) cannot be run on Linux.


What are the "complex legal concerns" negated by Ubuntu Advantage?

The "IP" here means: intellectual property. I'm not lawyer but given the context:

  We take care of intellectual property (IP) infringement legal claims brought against customers in their use of Ubuntu.

Continue reading:

  Throughout the open-source world, all possible care is taken to respect intellectual property rights. In the unlikely event of an intellectual property issue in Ubuntu, Canonical will replace or modify the infringing portion of the software so that it becomes non-infringing, or obtain the rights for you to continue using the software.

If for some reason you get a claim for using any package/software that comes with the usage of Ubuntu, they will replace that piece of software and assume all the costs/damages that the claim could cause:

  In order to allow our support customers to deploy Ubuntu without complicated legal concerns, Canonical will assume the legal defence, pay all legal defence costs, and pay any resulting damages judgement or settlement, for any claim brought against our support customers worldwide by any third party for alleged infringement of patents, copyrights, trademarks, or trade secrets due to our support customer's use of the Ubuntu software during the term of their support services contract.

Reference:

Ubuntu Assurance | Ubuntu Advantage | Ubuntu


Prepend nameserver to resolv.conf in Ubuntu 19.10

Remove /etc/NetworkManager/conf.d/10-dhcp.conf.

Edit /etc/systemd/resolved.conf and change:

sudo -H gedit /etc/systemd/resolved.conf # edit file

This:

[Resolve]
#DNS=
#FallbackDNS=
#Domains=
#LLMNR=no
#MulticastDNS=no
#DNSSEC=no
#DNSOverTLS=no
#Cache=yes
#DNSStubListener=yes
#ReadEtcHosts=yes

To this:

[Resolve]
DNS=127.0.0.1
#FallbackDNS=
#Domains=
#LLMNR=no
#MulticastDNS=no
#DNSSEC=no
#DNSOverTLS=no
#Cache=yes
DNSStubListener=no
#ReadEtcHosts=yes

reboot # reboot computer

systemd-resolv --status # check DNS servers

Correctly now shows 127.0.0.1 as the default DNS servers, so it should now work with your dnsmasq installation.


How to remove duplicate tracks from Rhythmbox?

It's happened to me a few times...

The easy way to solve this issue is:

Open "Home"
Press Ctrl+h (this will show your hidden files and folders)
Navigate to .local/share/rhythmbox
Delete rhythmdb.xml
Restart Rhythmbox

The rhythmdb.xml file contains the music library info for Rhythmbox, by deleting it, you'll be forcing rhythmbox to re-check the library, thus getting rid of the repeated entries.


Using apt-get partially through a proxy server

Does this make sense - Disable proxy and update-upgrade to get the repository upgrades, and then enable proxy for the PPAs - you can script this by using the $http_proxy env var.

Edit: this method is still not good enough. This post
suggests another idea. Perhaps you can setup a proxy of your own locally, and that proxy can redirect to the university for all URLs except for your local server.


What creates /tmp/fileRandomName log files and how do I disable it or redirect to /dev/null?

These files are created by /etc/X11/Xsession:

ERRFILE=$HOME/.xsession-errors

# attempt to create an error file; abort if we cannot
if (umask 077 && touch "$ERRFILE") 2> /dev/null && [ -w "$ERRFILE" ] &&
  [ ! -L "$ERRFILE" ]; then
  chmod 600 "$ERRFILE"
elif ERRFILE=$(tempfile 2> /dev/null); then
  if ! ln -sf "$ERRFILE" "${TMPDIR:=/tmp}/xsession-$USER"; then
    message "warning: unable to symlink \"$TMPDIR/xsession-$USER\" to" \
             "\"$ERRFILE\"; look for session log/errors in" \
             "\"$TMPDIR/xsession-$USER\"."
  fi
else
  errormsg "unable to create X session log/error file; aborting."
fi

And the only way is to patch it. It spefically includes check for ~/.xsession-errors being symlink. I've made a patch that adds checking for env var $NOXSESSIONERRORS. You can define it in /etc/environment.


Terminal: sudo: apt-get: command not found

The short answer:

Re-install Ubuntu from a Live CD or USB.

The long version:

The long version would be a waste of your time: your system will never be clean, but if you insist you could try:

copying everything (missing) except for the /home folder from the Live CD/USB to your HDD.

OR

do a re-install/repair over the broken system again with the Live CD / USB stick.

OR

download the deb file for apt-get and install as explained on above posts.

I would definitely go for a fresh new install as there are so many things to do and so little time.


goto the terminal and type in

    $ ssh <username>@<computer name or IP address>

more information at https://help.ubuntu.com/community/SSH/OpenSSH/ConnectingTo


Is there such a thing as a restore point in Ubuntu?

You can try Back in Time:

sudo add-apt-repository ppa:bit-team/stable
sudo apt-get update
sudo apt-get install backintime-qt4

Note: GNOME/KDE UI has been deprecated, hence -qt4 now. See here.


How fix ATI fglrx driver after kernel upgrade

Got it! :-)

sudo gedit /usr/src/fglrx-13.251/kcl_acpi.c

Delete these last 3 lines in the file:

     ((acpi_table_handler)handler)(hdr);
     return KCL_ACPI_OK;
}

replace them with:

#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,1)
    ((acpi_tbl_table_handler)handler)(hdr);
#else
    ((acpi_table_handler)handler)(hdr);
#endif
    return KCL_ACPI_OK;
}

Then run:

sudo dkms install -m fglrx -v 13.251 -k 3.11.0-17-generic

Then reboot. Worked for me - working kernel 3.11 and fglrx now!

(I worked this out from this page: https://gist.github.com/moldcraft/8116528)


Add a custom keybinding with gsettings in ubuntu

Additionally to setting name, command and binding do you also need to change the custom-keybindings array assigning all paths you have assigned keybindings too.

The path in your example would be /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ and following command would assign this path to the custom-keybindings key:

gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/']"


since I had similar issues with no discernible answer from the Ubuntu community (official or otherwise) I raised a bounty on your question.

However since then, I did install tlp which has fixed my problem, it is an advanced power management tool for Linux. I start tlp in battery or ac mode depending on what my power source is.

I would strongly suggest giving it a go.

In the terminal:

sudo add-apt-repository ppa:linrunner/tlp
sudo apt-get update
sudo apt-get install tlp tlp-rdw

sudo tlp ac start #or bat instead of ac


Try the command sudo apt-get remove network-manager*

This might work, since it removes the network manager. Also turn off the WiFi and unplug the network cable and plug it back ,try vice versa too. hope this will work.


'zeitgeist-fts' always using a lot of memory!

What zeitgeist is

  Zeitgeist is a service which logs the users’s activities and events, anywhere from
  files opened to websites visited and
  conversations. It makes this information readily available for other
  applications to use in form of timelines and statistics. It is able to
  establish relationships between items based on similarity and usage
  patterns by applying data association algorithms such as “Winepi” and
  “A Priori”

  Zeitgeist is the main engine and logic behind GNOME Activity Journal which is
  currently seen to become one of the main means of
  viewing and managing activities in GNOME version 3.0

Source: Wikipedia

How to quick-fix it

As zeitgeist is a journal, it'll grow bigger day after day, leading to ram consummation problem.

The easiest way to solve this is to make some clean by removing the current journal to let a new one take its place. It's not dangerous and can be done with a single command-line :

rm -r ~/.local/share/zeitgeist/

Or with your your file browser (ctrl + h to display .hidden file) :

in your Home folder (~/) > .local > share, and remove zeitgeist

Your Ram consummation should be back to normal after a reboot. You can stay with this solution and wait until the next zeitgeist problem (probably in some years), or try one of the following solution.

How to disable it

(without remove it)

Better would be to disable it instead of removing it.

First open startup applications and UN-tick zeitgeist from startup automatically.

If you don't see zeitgeist in startup applications, open a terminal (CTRL+ALT+T) and issue the following command

sudo sed 's/NoDisplay=true/NoDisplay=false/g' -i /etc/xdg/autostart/zeitgeist-datahub.desktop

Turn off Record Activity

Open Privacy settings and turn off Record Activity.

Last but not least, remove the execution bits to prevent application from running.

From a terminal (CTRL+ALT+T)

sudo chmod -x /usr/bin/zeitgeist-daemon
sudo chmod -x /usr/bin/zeitgeist-datahub
sudo chmod -x /usr/lib/zeitgeist/zeitgeist-fts

The zeitgeist-fts could be in an different location from what is specified here. If you cannot find it, issue the following commands one-by-one to locate the correct path.

sudo updatedb
locate zeitgeist-fts

How to remove it

Following might be dangerous and remove also some important packages for Dash functionality.

  Run sudo apt-get remove zeitgeist* in a terminal. It might remove a
  few related packages, but so long as you don't see anything suggested
  for removal that you don't want, you should be fine.

  As per comments: you will lose unity functionality (I was not sure how
  much when I first wrote the answer) if you remove zeitgeist. So, I
  suggest you just disable logging.

  If you don't need unity to function correctly, you can go ahead and
  remove zeitgeist, and just use the classic session (from the login
  screen).

  You can also blacklist everything or turn off logging altogether.

Source: AskUbuntu


Bash script, cannote replace string in a file with escaped $ and &

You have to escape $ and & multiple times, because when using the sed -i command they need to be escaped as well. If not escaped multiple times they will be interpreted as single & and $ signs.

#!/bin/bash
dothis(){
    rootpass=$(echo "$1" | sed -r 's/\$/\\\\\\\$/g');
    rootpass=$(echo "$rootpass" | sed -r 's/\&/\\\\\\\&/g');
    echo $rootpass;
    sed -i "s/root/$rootpass/g" test.txt
}
dothis 'my&rootpa$$';

This worked for me. The output is:

my\\\&rootpa\\\$\\\$

And test looks like this after execution:

user@host:~# cat test.txt
hello my my\&rootpa\$\$ password is my\&rootpa\$\$.


How to create daily job without write access to /etc?

Unless you're actively blocked from doing cron jobs (i.e., not on /etc/cron.allow or on /etc/cron.deny), then you should be able to run your own cron jobs.

Run crontab -e to open the cron job editor. If it's your first time you'll be asked to select a command line editor. You should probably choose nano unless you're familiar with one of the other choices.

Cron entries have the format

m h d mon wkday command

So putting in the entry

00 04 * * * bash script.sh

will execute your script at 4:00 am every day.

Save the file and cron will automatically implement it if there are not syntax errors.

See here for more information about cron.


Getting prompted for a password via SSH even after setting up authorized_keys

K, turned out the solution was to add the username to the

AllowUsers

line of the

/etc/ssh/sshd_config

file.


You can use Disks (a.k.a. gnome-disks).

If you cannot find it in your menu, you need to go to a terminal by pressing Ctrl+Alt+T and type:

sudo apt-get install gnome-disk-utility

This is a tool to manage disk drives and media:

Format and partition drives.
Mount and unmount partitions.
Query S.M.A.R.T. attributes. It utilizes udisks.

It provides two options:

Formatting the entire disk:

and

Formatting each separate partition


Solution:

https://github.com/neovim/neovim/wiki/FAQ#nvim-shows-weird-symbols-2-q-when-changing-modes

Seems when changing sessions to a different user or SSHing into a remote box the TERM get's unsupported


Skype uses proprietary protocol and there are no opensource application which can make use of this protocol. However skype is planning to opensource the skype application (protocol will still remain proprietary) however they havent specified a time frame yet.


Permanent

Right click the window border > More actions > Special Window/Application Settings > Arrangement & Access tab

or/and

KDE System Settings > Window Behavior > Window Rules


I got rid of Matlab, so cannot work all of this out for you.  But you will figure this out. Matlab is trying to complete its install and until all of its pieces find each other, it is going to keep launching that crud.

The key thing is that the Matlab installer fiddles with your PATH and also it looks like it changes your shell configuration.  If the installer works correctly and finishes all of its work, it will put its own directory at the front of your PATH.  However, something wrong happened in your install so one part of matlab cannot find the other.  In your ~/.bashrc, did you insert something that tries to launch Matlab every single time you open a session?

So, figure out why that matlab configurator launches when you open a terminal.  Correct that.  (I would get a different terminal program and see if problem happens there too.  Probably will.)  I suspect matlab install has inserted something in your home folder startup settings, such as "~/.bashrc" or .profile or simiar. It is going to keep happening until you either remove that bit from your config or fix your matlab install.

I'm curious to know what happens if you launch other shell sessions. For example, in Emacs, if you run M-x eshell, does that Matlab harassment still preset itself.


Grub repair unsuccessful, boot to grub rescue>. Trying to boot from sda4 (ubuntu 14.04), sda2 has broken kernel ubuntu 16.04

Problem when updated to Ubuntu 16.04 on sda2 (where all our working directories are). The update resulted in a broken desktop where we couldn't sign in users (put password in and then screen flash and went back to user login). The partition was almost full, so it's possible the update wasn't complete, however, there was no error message.

This problem was not a boot problem. Your comment about the almost-full partition suggests that this may in fact have been the cause. If so, deleting unnecessary files, perhaps in conjunction with resolving APT update issues, might have resolved the problem. You might still be able to do this with the help of an emergency disk and chroot procedures, but I make no promises of this and I don't have a step-by-step procedure handy.

If you want more help on this, you should begin by providing information on the disk space used and available on all your partitions. Typing df in a Terminal while all partitions are mounted will display this information, so you should post that output. If you do so, be sure to edit your original question, adding four spaces to the start of each line of the df output to keep it legible.

  Made new boot partition (sda4) with Ubuntu 14.04 and tried to delete Ubuntu 16.04

...

  Tried boot repair after removal. It boots to grub rescue>

GRUB relies on files scattered about here and there. It sounds like, in your effort to resolve the problem, you accidentally deleted the grub.cfg file. Running Boot Repair again should fix this problem, but your configuration is now complex enough (with two Ubuntu installations) that I can make no promises of that. Even if you get the system booting again, you'll be back to your original problem.

  I noticed that for sda4 there is no "boot sector" information, is this the issue?

No. In most BIOS-mode Ubuntu boot configurations, GRUB goes in the MBR of the hard disk, in either post-MBR unallocated sectors (on MBR disks) or in the BIOS Boot Partition (on GPT disks, like yours), and in files in the /boot/grub directory. GRUB goes in a partition's partition boot record (PBR) only if you install GRUB there and use something else (like the Windows boot loader) in the MBR, which you are not doing.

Incidentally, you're doing a BIOS-mode boot on a GPT disk. This was working fine for you, but if your computer has an EFI (as do most sold since late 2011), you might want to consider switching to EFI-mode booting. This will require some reconfiguration, but it's often a little bit faster and, once you understand how it works, it can be a little more flexible and less flaky. The drawback is that "once you understand how it works" caveat; there's still a lot of misinformation about EFI-mode booting floating around, and if you're well-versed in BIOS-mode booting, you'll need to re-learn a lot of fiddly little details. See Adam Williamson's blog entry on how EFI works and my page on installing Linux on EFI systems for more on EFI-mode booting generally. There are also flaky EFIs still available, and the worst of these can be worse than BIOS-mode booting, even for experts. Note that switching to EFI-mode booting will not fix your initial login problem; but you could implement such a switch as a way to fix the more fundamental boot problem you've created for yourself. Switching from BIOS-mode to EFI-mode booting while fixing a problem like yours may be too much effort, so you may just want to keep this in mind as a future project. (OTOH, maybe you'll find a way to fix your immediate boot problems in EFI mode.)

EDIT:

So are you still getting the grub> prompt after clearing off some space and running Boot Repair again? If so, I'm not sure what the problem is. I have two shot-in-the-dark suggestions, though:

If your computer uses EFI (as do most sold since late 2011), you could download the CD-R or USB flash drive version of my rEFInd boot manager, prepare a boot medium, and boot with it. rEFInd should enable you to boot either of your installations, assuming their kernels and boot files are intact. You could then fix things up, add an EFI System Partition (ESP), and install rEFInd on your hard disk. This is the safest approach at this point, but it will work only if your computer uses an EFI.
Delete one of your two Ubuntu partitions (/dev/sda2 or /dev/sda4) and run Boot Repair again. The idea here is that Boot Repair may be getting confused by the presence of two Ubuntu installations, and therefore creating an invalid GRUB setup. Eliminating one of the Ubuntu installations should then make it easier for Boot Repair to do its job. This approach is risky, though, especially if you accidentally delete the wrong installation. Even if you delete the right Ubuntu, the remaining one might be damaged in some fundamental way or something else might be causing Boot Repair to mess up.

If neither of these approaches work, you may need to either become quite the expert on GRUB, so as to fix it manually; or back up your personal files, re-install Ubuntu from scratch, and restore your personal files.


Why is 70% of my harddrive full when contents only constitue 45% of storage?

Your main problem is that macOS uses a different directory, .Trashes, to store trashed files.  It would also seem that the Properties window didn't count . directories
Ubuntu only uses .Trash, and .Trash-(user number).  Emptying the Trashcan will empty .Trash-1000.
You will need to manually clear .Trashes, if that is what you also want.  If you are sure there is nothing you want to keep in .Trashes, then you can delete it with:
rm -r "/media/peterhunter/PNY 1TB SSD/.Trashes/"

or if that complains about permissions (be careful here):
sudo rm -r "/media/peterhunter/PNY 1TB SSD/.Trashes/"


How to connect a nokia phone in ubuntu to backup contacts?

You can try Wammu.

Wammu is a program to manage data in your cell phone such as contacts, calendar or messages. It is built on Gammu library, which provides abstraction layer to work with different cell phones from different vendors (including Nokia, Sony-Ericsson, Motorola, Samsung, Siemens, Huawei and others).Wammu

To download, and more info see the website.  For a list of supported phones, see the Gammu Phone Database


open with mplayer not available for video files

I had a similar problem with gnome. I used mimeopen to solve it, but the command was a little different :

mimeopen -d myfile.mp4

With this I could associate mp4 files with the mplayer command again.

Without "-d" it would use totem without asking.


Postfix won't transfer WordPress contact form emails to my Gmail account

The problem seems to come from WordPress, form the configuration of the contact form in particular, as the problem also happened with sSMTP which some consider a simpler tool than Postfix:

When I deleted the original form and created a new one, I got a green message saying that the message was sent in a test email.

Here also, I didn't get a message even to the Spam dir, but at least the response was different and the original problem had nothing to do with Postfix.


It is normal. You probably could not find Chrome icon not in Dash but in Launcher.

In Dash it could by found by typing first letters of it.

Then you could drag & drop the icon from Dash to Launcher or start Chrome and lock it in Launcher.

When you install software not using Software Center, it does not automatically add icons to Launcher.

P.S. You look for the .desktop file in a wrong place. It should be in /usr/share/applications.

Update: It looks like there is some bug in Ubuntu 15.10 that does not show the icon properly.


I found a driver that I was able to change the DPI. https://github.com/openrazer/openrazer
Still would be nice to be able to do from the operating system instead of mouse firmware.