Setting special keys as keyboard shortcuts

Read about Keybindings

dconf-editor

dconf-editor > org > gnome > desktop > wm > keybindings

  Key bindings are now stored in the dconf registry.

You can install dconf-editor to be able to view and edit them:

sudo add-apt-repository universe
sudo apt-get update
sudo apt-get install dconf-tools

or if you have universe repositories already installed get the package from UbuntuUpdates.org PPA's:

dconf-tools trusty package

You can also use gsettings command line tool.
For example, to get key binding on the command line:

gsettings get org.gnome.desktop.wm.keybindings switch-windows

or to set a key binding on the command line:

gsettings set org.gnome.desktop.wm.keybindings switch-windows "['<Alt>Tab']"

org.gnome.desktop.wm.keybindings

Keybindings that are handled by the window manager are persisted in the org.gnome.desktop.wm.keybindings section of dconf. The Navigation, and Windows categories of shortcuts are stored here. In the past, each window manager was responsible for storing its own shortcuts under its own schema. Now both the metacity and compiz window managers use this central, unified set of bindings. There are mapping files in /usr/share/gnome-control-center/keybindings/ that show how these key bindings are used by each window manager.

Multiple Keybindings

The keybindings that are handled by the window manager support multiple keys that will perform the same action. The gnome-control-center GUI does not support it, but you can make it work using dconf-editor. For example, to have Close window use both the traditional Alt+F4 as well as an easier to hit Pause/Break button, change:

org.gnome.desktop.wm.keybindings close to ['Pause', '<Alt>F4']

  org.gnome.settings-daemon.plugins.media-keys

  Shortcuts from the Launchers, Screenshots, Sound and
  media, System, and Custom shortcuts are stored here.

Custom Shortcuts

Custom shortcuts are stored in dconf using a "relocatable schema".
The schema name is org.gnome.settings-daemon.plugins.media-keys.custom-keybinding
Each custom key binding has three properties: name, command, and binding.
Because of the relocatable schema, it is harder to use gsettings with custom shortcuts.

Here is an example of getting the name of the first custom keybinding:

gsettings get org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ name

org.gnome.settings-daemon.plugins.power

Four additional buttons are managed in org.gnome.settings-daemon.plugins.power, they are:

button-hibernate, button-power, button-sleep, and button-suspend.

Possible values are suspend, sleep, hibernate, interactive, and nothing.

  These buttons are NOT currently managed by the gnome-control-center.

If you want to reassign the sleep button on your keyboard,
you MUST currently use dconf-editor to assign the button in this section to nothing.

xbindkeys

Also read about Text Entry Shortcuts with xbindkeys

xmodmap

And Mapping Windows Key with xmodmap

Best wishes,


Simply writing ('burning' is a term reserved for making optical discs such as DVD-R and CD-R) the software folder to a USB stick will not make it bootable. Burning a 'master' type DVD with the ISO file you downloaded will make that DVD bootable. The procedure for USB is different.

Instead, for USB, install UNETBOOTIN or another USB Boot creation program to a Windows machine. That UNETBOOOTIN-type program will extract the files from what you downloaded, and put them in their proper order on the USB flash drive so you may boot from it.

Either way (and thanks to Wilf got mentioning this), please also read Installing Ubuntu on a Pre-Installed Windows 8 (64-bit) System (UEFI Supported).h

Please make sure to also make a backup of your data from Windows first, and for good measure, also please clone the entire Windows installation using Clonezilla or some other cloning program, for easy restoration if something goes wrong.


How to get the java compiler for ubuntu?

Chances are your colleagues are using Java 6. In that case, you have to install openjdk-6-jdk.

Recall that single .java source files are compiled using:

javac hello.java

.class files are executed like:

java Hello

This expects a Hello.class file in the current directory. If you're working in a different directory, you need to set the -classpath (or -cp) option:

java -cp /path/to/classes Hello


Install the package synaptics-dkms and configure in System > Preferences > Mouse, under the Touchpad tab.

Try the touchpad after unchecking the Enable mouse clicks with touchpad check box.

Check operation after Enable horizontal scrolling is checked. This may not have been the default setting.


There is a similar Q&A at superuser.com dealing with that question. A more specific question was asked also here at askubuntu.com.

Your choices are:

Use symlinks. Open the *.deb package with the archive manager. This tells you where the files go. Move those directories to your external harddisc and put a symlink at the origin. Be careful to move only directories from your games and not shared libraries or so!
Mount your external hardrive or some of its folders (a second time) at the game's path. E.g. /usr/share/games might be good candidate for your external harddisc. You can use the bind option, e.g.:

sudo mount --bind /media/external-hardisc/usr-share-games /usr/share/games
Don't use a *.deb package, but install directly from source to a directory of your choice.
Use the dpkg parameter --root to change the install location. The man page says:

--root=dir
      Changing   root  changes  instdir  to  dir  and  admindir  to
      dir/var/lib/dpkg.

There is no guarantee that this will work. The program might not be able to deal with the different location.

(This list of solutions is not exhaustive.)


I can't install "bind9-dnsutils" in ubuntu 20.04

That version of bind9-libs (1:9.16.1-0ubuntu2.4) is not present in ubuntu 20.04 so you have done something strange in order to get it.
You should check that your /etc/apt/sources.list, sources.list.d and PPAs don't include anything unexpected. apt policy bind9-libs may show where you got it from.
Ultimately you'll be wanting to remove it and get bind9-libs version 1:9.16.1-0ubuntu2.3 installed.


Prevent system from augmenting my custom XKB configuration

I presume you’re using GNOME 3; if so, it is not currently possible, see this upstream bug.

In case it is Unity, this may help:

gsettings set org.gnome.settings-daemon.plugins.keyboard active false


What's the proper way to install NVidia drivers now?

You simply need to open the setting menu for ubuntu, Click "Software & Updates".

Select the far right tab "Additional Drivers" and wait a few seconds for Ubuntu to build a list of drivers you can use.

It should looks something like this:

Note: you may see different drivers than me.

Make sure to pick the one that has the message (proprietary, Tested) next to it.

Once Selected click "Apply Changes" let it do its thing and reboot.

This is the safest way I have found to do this without my system losing X11 after an update or upgrade. Some Desktop environments perform better under the opensource driver while others you can see little difference. I have noticed with unity on ubuntu that the minimize animation can sometimes show some artifacts while using the Nvidia Driver, but other than that it performs much better in all other respects.


First of all, make sure that you have connected your screens to the correct ports. For example, if you have a graphic card, make sure that your screen is connected to the graphic card. If this fails then, you this problem might be drivers related:

If you haven't done so already, you need to install additional driver, open on :

System Settings > Additional Drivers.

If this doesn't help then try:

sudo mv /etc/X11/xorg.conf to /etc/X11/xorg.conf.backup

And restart:

reboot

Then Open Settings > Displays > Detect Displays then also unchecked the checkbox labelled Mirror Displays.

Lastly you can try to reinstall the latest nvidia drivers:

Run sudo apt-get purge nvidia-*
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-364

I hope that helps :)


Ubuntu 18.04 LTS : sky2 ethernet stops working after system resume from suspend?

This problem is discussed on the bug reporter at:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1758507

According to the thread, a solution should be coming soon. :)


I am not completely sure what you are asking.

The first step is to give each user a unique account. This way each user will have a personal home directory.

In addition, I think what you are asking about would be "multiseat".

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

http://www.linuxtoys.org/multiubuntu/multiubuntu.html


Where can I specify init service conf for isc-dhcp-server?

The upstart job file (/etc/init/isc-dhcp-server.conf) sets the config file and the start parameters. This is the snippet of estimating the config file:

if [ -f /etc/ltsp/dhcpd.conf ]; then
  CONFIG_FILE=/etc/ltsp/dhcpd.conf
else
  CONFIG_FILE=/etc/dhcp/dhcpd.conf
fi

You can edit this lines to set your config file to your specified file.

And here the execute statement:

exec /usr/sbin/dhcpd -f -q -4 -pf /run/dhcp-server/dhcpd.pid -cf $CONFIG_FILE $INTERFACES

Here, you can edit the parameters of the dhcpd daemon. After saving the file you can restart the dhcp service with the command:

service isc-dhcp-server restart


Can Locate command output only genuine files (not directories)

I'm not aware of any locate implementation that checks file types.

You can use Bash to filter the locate output:

while read -r -d $'\0' f
do
    [ -f "$f" ] && echo "$f"
done < <(locate -0 something)

Or you can use find with the -type f option:

find / -name something -type f


Firefox 'Personas' consists, simply, of two image files.

Once you installed one 'Persona' in Firefox, those two files are saved in ~/.mozilla/firefox/[something].default/lwtheme/; the "[something]" will be different in every system.

However, Firefox is supposed to be connected to the internet for the selected 'Persona' to show, so you either copy those two files elsewhere, or follow the instructions given here to download the image files.

And, when you install one 'Persona' in LibreOffice 4, the files are saved in folder ~/.config/libreoffice/4/user/gallery/personas/.

To reuse 'Personas' in LibreOffice, I've found the following instructions:

Option 1:

Copy the image files in the LibreOffice personas folder
Be very careful about this:

gedit ~/.config/libreoffice/4/user/registrymodifications.xcu

find (Ctrl+F) the line with PersonaSettings and change the names of the current files to the ones you just copied. Be careful to match "header" and "footer" file names.
Close and re-open LibreOffice.

Option 2

Rename the files of the current 'Persona' in the LibreOffice personas folder (but take note of their current names).
Copy the downloaded image files to that folder and rename them to match the previous names.
This way, you avoid having to edit the .xcu file (which, if not done carefully, might bring a lot of problems).


Problems setting up samba and connect with windows, "You can't access this shared folder..."

You need to remove/comment out the following in the smb.conf config file:

map to guest = Bad User

This is because Windows attempts to login with the current users windows credentials as default. If that doesn't work, it gets mapped as guest on the server side, something that the latest Windows versions do not allow.


Ubuntu Touch availability on Windows tablet

There may be a possibility by using a bootable USB drive.

You can make your USB drive bootable so that you can use it to install Ubuntu from that USB. You can do this using unetbootin for instructions on how to do the Unetbootin site will have the information you'd need....


password-shroud -
its new and alpha but you could try:
https://uappexplorer.com/app/password-shroud.rene-so36


How do I add a xserver-xorg-video-dummy display to mirror the physical display?

I found the reference here: video-dummy - The Fake display with/without monitor connected at the same time.
You need to set KMS (Kernel Mode Setting) off.
For ATI graphics:
echo options radeon modeset=0 > /etc/modprobe.d/radeon-kms.conf

For Intel graphics:
echo options i915 modeset=0 > /etc/modprobe.d/i915-kms.conf

Works fine with ubuntu 20.04


The only way forward is to reinstall it on the proper disk since you installed it to the wrong disk.

Or try cloning the USB disk using CloneZilla and restoring the clone onto the required disk.


server wont connect to network; cannot find device eth0

I suggest that you edit the file /etc/network/interfaces to replace the eth0 entry with wlp3s0 and add the SSID and encryption details, like this:

auto lo
iface lo inet loopback

auto wlp3s0
iface wlp3s0 inet dhcp
wpa-ssid <your_router>
wpa-psk <your_wpa_key>

So that you can ssh and ftp into it, I actually recommend a static address, not DHCP, however, let's get connected first and then proceed.

Reboot and tell us if you are connected:

ping -c3 www.ubuntu.com

EDIT:

If you wish to use ethernet as you indicated in your comments, then the sequence is:

auto lo
iface lo inet loopback

auto enp2s0f0
iface enp2s0f0 inet dhcp

Reboot.


How do I enable/disable guest account in Trusty 14.04.1

Own answer to own question:
This ~bug~ was supplied by myself: the workaround was to download my glasses from the shelf to see that white font of users name on the ~white~ greeter from usr/share/backgrounds/Foggy_Forest_by_Jake_Stewart.jpg I choose myself running dconf-editor as lightdm user, is simply of poor contrast....
Sorry for the noise.


The quickest way to manually add a new rule for a different SSH port would be with the following command:

sudo ufw allow <port number>/tcp

inserting your particular port into the command.

While you haven't specifically asked, remember that you need to make your port number change in the file /etc/ssh/sshd_config. Be sure that you also remember to restart the sshd service after making your change(s) to the configuration file with the command: sudo systemctl restart sshd.

Working with ufw application profiles

Optionally, you could choose to either modify the existing ufw OpenSSH application profile directly, or create an entirely new application profile for your new SSH port.

Adapted from the ufw man page:

  APPLICATION INTEGRATION

ufw  supports  application  integration  by  reading  profiles  located  in `/etc/ufw/applications.d`.

   Syntax for the application profiles is a simple .INI format:

    [OpenSSH]
    title=Secure shell server, an rshd replacement
    description=OpenSSH is a free implementation of the Secure Shell protocol.
    ports=22/tcp

   After creating or editing an application profile, users can run:

     sudo ufw app update <name>

See man ufw for additional implementation details.


Prevent device from using static IP not assigned by dnsmasq's DHCP server

I certainly am no expert in using squid, but i think you might benefit not using the ip address in the acl proxy/content filter, but use the MAC instead.

I presume you have something like the following to identify your computer:

acl myPC src 192.168.1.4

Try to change it to the following (where the 00:00:00:00:00:00 is your MAC-address)

acl myPC arp 00:00:00:00:00:00

This way the IP does not really matter, only the MAC is used as a criteria.


First follow the steps HERE to have OpenJDK installed and configured correctly:

MINECRAFT SERVER

To create your own server, first download the executable minecraft server

Direct Link HERE

I recommend creating a folder for it. For example, I always create in my home folder the directory "mc" and put inside of it the minecraft_server.jar file. This is because, when you execute the server it will create several files and folders.

Now go to the folder where the minecraft_server.jar file is and either in the terminal or Nautilus GUI execute the file. in the terminal it would be:

java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui

I recommend using the nogui parameter to avoid an additional window in the GUI. Afterwards just close the server by either pressing CTRL+C in the terminal where you opened the minecraft server or by typing /stop in the minecraft server terminal. The latter will automatically save any progress. I mention the fact that you need to close it since, the first time you run the minecraft server, it will create all needed files, including the minecraft server configuration file which is called server.properties. Open this file with gedit for example and Edit anything you need in it before running the server again. Information about what each server property does can be found HERE


Why does Ubuntu, sometimes, fails to load?

This sounds like a IRQ Conflict Problem. But could also be a kernel Panic Problem. You should try to add some boot parameters and check if they might help. You can add those to the grub menu.

More here:

Boot Options (English)

Boot Parameters (German)

I sometimes had to use the following: (even in combination)

irqpoll
noapic, noagp, noapm
nolapic
pci=noacpi
pci=routeirq


Try this.  Your card is Broadcom based.  Broadcom released an updated Linux wireless driver that supports cards based on the Broadcom 4311, 4312, 4321, and 4322 chipsets, which include the Dell 1490, 1395, 1397, 1505, and 1510 Wireless cards.  The driver can be downloaded Here


What is the difference between an NVIDIA legacy binary proprietary driver and a binary only proprietary driver?

Basically, the difference between the two drivers is that the legacy drivers are intended for the video cards which are no longer supported by Nvidia in the official driver (thankfully, Nvidia's support is just awesome. You're only out of luck with truly ancient hardware that's like more than 8 years old). The legacy driver is not as well maintained as the newest driver and generally only receives important bugfixes. It will no longer receive new features or optimizations for new games or applications as is the case with the normal driver.

So, it is highly advised to always use the normal drivers if they are available. This way you will have the best experience and support. If you are unsure if your card is still supported by the latest driver, here is a link with a list of supported video cards (click on the tab called "Supported Products"):

http://www.nvidia.co.uk/download/driverResults.aspx/75067/en-uk


Hey even I have the same laptop. The problem here is that our laptop contains 2 graphic cards 1.AMD 6630  2.Intel HD 3000
Somehow, by default Ubuntu keeps both of them running, even if only one is used, that leads to overheating.
The solution is to turn off one graphic card.Here I show how to disable ATI card, and just use the Intel HD graphics.
Enter this command in the terminal to check the graphic card status

cat /sys/kernel/debug/vgaswitcheroo/switch

you will get o/p like

 0:DIS: :Pwr:0000:01:00.0
 1:IGD:+:Pwr:0000:00:02.0

here DIS=AMD card, IGD=Intel card.
Pwr on both the lines means that both are powered.To turn the DIS off, enter

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

check the status again. you should get Off on the 0:DIS line.This means only the low-power intel card is running.Use you laptop for an hour or two, and feel the difference.
If it is indeed running cooler, to make the changes persist even after reboot, edit the rc.local file.

sudo gedit /etc/rc.local

and add the following line above exit 0

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


How to activate bluetooth device for RTL8723DE?

Support for this bluetooth device had been just added to the 4.17rc kernel.

The code can be easily backported to kernels 4.4 - 4.15. I made a PPA with DKMS packages for bionic and xenial with the updated btrtl module.

It can be installed by

sudo add-apt-repository ppa:hanipouspilot/bluetooth
sudo apt update
sudo apt install btrtl-rtl8723de-dkms

You may also need firmware for this device if it is not there. Look into your /lib/firmware/rtl_bt directory. If there are no rtl8723d_config.bin and rtl8723d_fw.bin files, clone the latest linux-firmware by

git clone git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git

and get the files from there. It is not that hard. Sorry that I forgot to add the firmware to the package.

The DKMS should survive kernel upgrades.

Important!: Ubuntu 18.04 has the 5.3 HWE kernel now. REMOVE this package if you are on 5.3+ kernels. Otherwise BT won't work.


Ubuntu 20.04 suddenly not working when started connected to external montiors

Start with  everything disconnected, then see if your monitor preferences makes an external monitor the primary one. Make your LCD screen on the Thinkpad your primary one if that's the case. If your docking station is a powered USB type, then you may want to make sure it is powered on before booting.
Do you use DisplayLink to manage your video setup?  You may want to remove and reinstall or fetch the latest Linux release from their website. I have found that DisplayLink using the same equipment has better support on a Mac than Linux, so maybe they are catching up.
Regards,
mondotofu


In your script, the first line should be:

#!/bin/bash


14.04 how can i dualboot and install windows 10 as ubuntu user?

gparted is a partition manager for the disk drives. Once you have partitions, you can put different operating systems on different partitions. Then you use some tool to control the boot process, so you can select which one boots at any given time.

If you have high-end hardware, install VirtualBox and run Windows inside a VirtualBox. That is not dual-boot. Instead you get both at once, and you can fully backup your Win10 system.

Here is a site that explains the steps for Ubuntu and Windows with screenshots:
lifehacker

For a commercial solution, Terabyte Inc offers a well-documented product line to assist with multi-boot systems. Look at BootIT Bare Metal.


How can I see more battery info when using Gnome shell?

Take a look at these three extensions, which may be what you are looking for!

Battery - remaining time and percentage
Battery Power Statistics Shortcut
Battery Percentage Indicator


Copy text file into another new text file as a sequential way

As you are just appending the file contents one after another, use cat maintaining the sequence you want, currently this should do:

cat data_{1..3} >new_data

The shell will expand data_{1..3} into data_1 data_2 data_3, so the operation would eventually be:

cat data_1 data_2 data_3 >new_data


kubuntu 16.04: Sound card "access denied" error, can't play sound

Two-part solution.  The first part I found by trial-and-error:

Removing the oss4 packages:

sudo apt-get remove --purge oss4-base oss4-dev

restored my sound immediately.  I didn't even have to log out, much less reboot.  However, I still had no sound icon.

A search on that problem led me here, which told me to install package kmix.  I tried it.

It didn't restore the sound control panel I had -- it gave me something much superior to what I had!  I really like being able to control event sounds independent of the general device volume.

So I am back in business without having to reinstall. What a relief.

I am marking this as the Answer, but if someone comes forward with a more straightforward explanation or troubleshooting advice when the sound card is truly not seen even at the module level, I'll relocate the answer check mark.


Switching from Ubuntu 16.04 to Ubuntu gnome 16.04

One way to switch to a Ubuntu gnome is installing ubuntu-gnome-desktop metapackage. But, that you give you two DEs aren't much pure. Unity settings sometimes causes problem in Gnome-Shell and vice versa.

To completely remove all components of Ubuntu and install Ubuntu-gnome instead, I suggest using this script. The script was developed by the person who was providing the command for these kinds of Switching till 15.04.

Download the purebuntu.py file from this GitHub repository.
Install the apt-rdepends package using the terminal command

sudo apt-get update && sudo apt-get install apt-rdepends

Run the purebuntu.py file using this syntax:

python purebuntu.py --remove ubuntu-desktop --keep ubuntu-gnome-desktop

This will generate an apt-get command which will remove Ubuntu related packages and install ubuntu-gnome-desktop metapackage.

This will give you a fairly clean Ubuntu gnome desktop. Take note though, You might lost already installed extra packages because of this operation.

P.S.: You can generate the commands to switch back using:

    python purebuntu.py --keep ubuntu-desktop --remove ubuntu-gnome-desktop


To start the PostgreSQL database (on Ubuntu Server, no GUI), normally you would use the pg_ctl command. Become the admin user that PostgreSQL was installed with. You probably will need to set the environment variables for PGDATA and PGPORT.

When the database is up, you should see something like this:

# pg_ctl status
pg_ctl: server is running (PID: 23890)

To start the database:

# pg_ctl start

To run psql and supply the parameters:

# psql -d {dbname} -p {pgport} -U {username} -W {password}

Ignore the # symbols as these are just representing the command line.


What does this zenity mean when it says "Couldn't connect to accessibility bus"?

The second error ("option is not available") appears to be because the step parameter is just --step rather than --step-value:

$ zenity --help-scale
Usage:
  zenity [OPTION...]

Scale options
  --scale                                           Display scale dialogue
  --text=TEXT                                       Set the dialogue text
  --value=VALUE                                     Set initial value
  --min-value=VALUE                                 Set minimum value
  --max-value=VALUE                                 Set maximum value
  --step=VALUE                                      Set step size
  --print-partial                                   Print partial values
  --hide-value                                      Hide value

i.e.

zenity --scale --text="Dim screen" --min-value=1 --max-value=9 --step=1 --value=9

I don't know what is causing the accessibility bus warning: however there are some possibly related bug reports here and here.


Snapcraft - configure - permission denied

I just checked that project in Github. It is an make project not an autotools one. So set:

...
parts:
  synchrorep:
    plugin: make
...

Check use of each plugin in this reference: Snapcraft - Supported plugins


Installing Ubuntu 14.04.2 to a Windows XP machine

Have you tried rebooting the machine?

What usually happens (if it's a dual boot install) is when you reboot your machine, the computer asks which operating system do you want to use.

I'm aware Ubuntu has a possible setting to run itself as a program from inside of Windows, but I haven't tried that myself.


Why does /proc/cpuinfo say "cpu cores: 2" on an AMD FX-4100 Quad-Core Processor

It says that you've 2 CPU cores because you have 2 CPU cores. The AMD FX-4100 has 2 cores and 2 modules.

From answers.yahoo.com

  Your FX is closer to a dual core. To be precise, it's two modules.
  Bulldozer uses modules, and each module consists of one FP scheduler
  and 2 int schedulers.

  This is AMD's answer to "hyperthreading" - it's cheaper to
  manufacture, can potentially result in faster overall performance at a
  marginal manufacturing cost, and it lets them get away with selling
  crappy cpus to people who don't understand or read benchmarks/reviews
  etc.

  In the end, Bulldozer was a flop. The per-core performance is what
  matters and it loses to Intel by a significant margin.  Even when all
  core are loaded, Bulldozer doesn't compare very well to Intel, but can
  pull ahead ever so slightly in some highly-threaded apps.

  Finally, hyperthreading doesn't need to be enabled on the modern CPUs
  that do support it (yours does not).


I had this problem when I updated to 16.04. Somehow the package lxsession-logout wasn't installed, so after sudo apt-get install lxsession-logout the menu and icon for the logout worked


You have an unsupported package installed from somewhere: bt-dw1705-firmware.  You will need to remove it.


How to give shutdown privileges to a user?

I did it like in this answer, works flawlessly for me. Maybe your approach misses the visudo part?

Open a command line and type:

sudo visudo

In the File that opens add the following line at the end:

yourusername ALL=NOPASSWD: /sbin/halt

Then exit the editor and safe it (CTRL+x).

Now you can shut down your computer from the command line, e.g. after you download something:

wget UrlOfTheFileYouWantToDownload ; sudo halt


apt-get update never finishes downloading

I guess this is happening due to repos of both are present in your sources.list file
Just open  vim /etc/apt/sources.list  and comment or remove the repositories belonging to trusty.


How can I repartitioning Ubuntu using "unallocated" spaces at random parts of my hard drive?

You have to create partition table at first and then mount the filesystem to the OS.
If you mean that you want to shrink your root partition you should use something like resize2fs utility.
You can do the same with GParted while booting from liveCD.


I installed R-Linux quite easily on 64bit Ubuntu 18.04 Bionic Beaver and the following directions should allow you to do the same. Open a Terminal window and run the following two commands:

wget https://www.r-studio.com/downloads/RLinux5_x64.deb
sudo dpkg -i RLinux5_x64.deb

This was enough to download and install this application and I attach a gratuitous screenshot showing R-Linux running on my own system:

Should be easy enough to duplicate on your own system? BTW how cool is the command line :)


Ubuntu won't boot after successful installation (Black screen appears and nothing happens)

Try reinstalling your nvidia drivers:

When the low graphics mode window appears, press ctrl+alt+f1
login with your username and password
use sudo apt-get purge nvidia to remove all nvidia drivers
reinstall the proper drivers using sudo apt-get install nvidia-current
reboot you machine using sudo reboot

I hope this helps you solve your problem.


How to enable php5-mysql in ubuntu 16.04 trough cli?

Edit the file:

sudo nano /etc/php5/mods-available/mysql.ini

And make sure it contains an uncommented line like this:

; configuration for php mysql module
; priority=20
extension=mysql.so

Lines starting with ; are comments and are ignored.

Restart apache or nginx or php-fpm after this change.


Change Ubuntu one and one-conf sync account

In Ubuntu One, go to the control panel, the devices tab, then remove the current device.

Before you login with the new account you will have to remove the metadata to avoid a root_mismatch error. This means deleting ~/.cache/ubuntuone

Hope it helps!


Low latency midi and Virtual sound studio

The Linux MultiMedia Studio (open source) and the EnergyXT (closed source, running natively under Linux) mentioned in this answer, is great for Music creators/producers and even performers. Placed here just for your convenience:

  You can use both the Linux MultiMedia Studio (lmss) at  which
  seems to be an alternative or similar software to Fruity Loops, Sony
  Acid, etc. It allows you to sample audio files, insert percussions,
  read/write midi's, etc.

  If you are familiar to Fruity Loops,Sony Acid and these style of
  software you will feel comfortable with LMMS.

  Screenshot provided right here for your convenience:

  Another great sound work station is the Energy XT, which is
  indeed proprietary (closed source), running natively on linux and
  these days they have a "free" version which allows you to do some
  limited things like saving but including only 1 synth, 3 percussions
  and these things. The fancy of this is that it is really easy to use
  and it runs natively on linux.

  Videos can be reached right here:
  http://www.energy-xt.com/index.php?id=0101

  And a screenshot from my desktop for you to see the full version of
  energyXT at work is also here:

  Both these are ready to run, but if you wish try finding alternatives
  to these applications, I suggest you this site:
  http://alternativeto.net/ on which you can perform searching for
  almost any known application.

Additionally, the LMMS Wiki related to Midi, can be helpful for you, reach it right here: http://lmms.sourceforge.net/wiki/index.php/0.4:Using_MIDI

I have tried some midi keyboards in the past, unfortunately I don't have them right now to run a test for you but I experienced some issues the first times and had to patch a few things in order to get the keyboard fully working. And I couldn't fix a major issue with a model, which I can't remember (I don't own it anymore), as the instructions were about to patch the keyboard's firmware itself.

I hope your midi keyboard is more compatible than these that I owned in the past. And if you provide further information about your keyboard's brand name and model it would be really helpful.

Good luck!


Connect to answering machine via Bluetooth

I've discovered a solution that works in my situation, however the solution has nothing to do with Ubuntu, specifically. I'm unsure if that would make this answer (or even original question) off-topic, so I'm going to post it in case it helps someone in the future and leave it up to the mods to delete if they wish. I'm still curious if there's a way to do it as I originally intended (i.e. configuring Ubuntu as a bluetooth "headset")

I discovered that my answering machine supports remote access, allowing access to voicemail playback from an outside caller. See page 40 of manual: ftp://ftp.panasonic.com/telephone/om/kx-tg9381_mul_om.pdf
With this, I was able to connect my cellphone to my computer's Line In, call my answering machine's phone line, playback the voicemails, and capture the audio stream in Audacity.


It looks like your touchpad is not properly detected.
You can disable it by running

xinput disable 11

This should stop this problem, but you will not be able to use touchpad.


deploy JuJu charm on AWS without data storage

See the juju documentation for setting constraints
I don't believe that there is a way to deploy juju without a disk attached, however you can set the size of the node by setting the --constraints root-disk flag.


I need to expand my root partition by deleting another partition apparently not in use

Make sure that you have a good backup of your important Ubuntu files, as this procedure can corrupt or loose data.

Note: because of the size of your HDD, I don't recommend creating a separate /home in sda4.

The use of an extended partition (sda3) makes this a little difficult. I'll outline the easiest way first, and we can add more to the procedure if we have to.

Keep these things in mind:

always start the entire procedure with issuing a swapoff on any mounted swap partitions, and end the entire procedure with issuing a swapon on that same swap partition
a move is done by pointing the mouse pointer at the center of a partition and dragging it left/right with the hand cursor
a resize is done by dragging the left/right side of a partition to the left/right with the directional arrow cursor
if any partition can't be moved/resized graphically, you may have to manually enter the specific required numeric data (don't do this unless I instruct you to)
you begin any move/resize by right-clicking on the partition in the lower part of the main window, and selecting the desired action from the popup menu, then finishing that action in the new move/resize window

boot to a Ubuntu Live DVD/USB
start gparted
right-click on sda4 in the lower pane and delete it
right-click on sda3 in the lower pane and resize it all the way to the right
right-click on the unallocated space in sda3 and create an appropriate swap partition
if need be, right-click on the new swap partition and select swapoff
right-click on the swap partition and move it all way to the right
right-click on sda5 and resize it all the way to the right
reboot
in terminal...

sudo blkid # note the UUID for the swap partition
gksudo gedit /etc/fstab

Add these lines, changing the UUID with the one from the blkid command...

# swap was on /dev/sda6 during installation
UUID=071f8b0e-8e16-4f4d-90ff-a4ae9cc56e2b  none  swap   sw    0    0

still in terminal...

save the file and quit gedit
swapon -a
quit the terminal

reboot and confirm operation with free -h and swapon commands


Ubuntu 12.10 error in select and install software

For whatever it's worth, I ran into this same issue installing Ubuntu Server 12.04.3 LTS (downloaded 8/25/2013). I simply skipped the "Select and Install Software" step and everything seems fine so far. As best as I can tell that step is only there for convenience and isn't actually required for installing Ubuntu.


Solutions for running Dropbox on Ubuntu 16.04 with some kind of encryption?

I contacted Dropbox support about this issue and let them know I'd prefer greater support for encryption and for more filesystems. They responded:

  While we do not support encryption methods like ecryptfs, we do
  support full disk encryption systems such as LUKS for Linux users.
  Dropbox makes the security of your data our highest priority.

Their system requirements page now says:

  Note: ecryptfs is not supported, but Dropbox will continue to sync
  with supported file systems that are encrypted via full disk
  encryption (e.g. LUKS)

So, it seems that they are pretty committed to supporting full disk encryption with LUKS. That may change in the future, of course.

Is it possible to simply tell Dropbox to store its files unencrypted in /var/Dropbox?

That seems likely to work, but...then the files are not encrypted.

Are there any other suggested solutions for us ecryptfs+ext4 users?

I think the solution if you want to encrypt the files is to move to LUKS and full disk encryption.


External USB audio interface has weird noises

try running alsamixer in command line and play with the up and down settings. and check if there's no microphone enabled. this should have been a comment but don't have rights to do that yet.


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

I asked the same question on ubuntuforums.org and was able to get help from many people that seems to have solved the issues I was having with fullscreen flash apps.  Here is a summary for anyone who's interested:

1) Flash-Aid extension for firefox: I'm using x64 version of firefox, java and flash; I removed my previous installation of flash64 and used this extension to install it directly from adobe labs (by lovinglinux)

2) Disable suspension of desktop effects when fullscreen apps are enabled: uncheck "suspend desktop effects for fullscreen windows" in SystemSettings -> Desktop effects -> Advanced tab (by schnelle)

The above two solved my problems but you can also try this if it persists for you:

3) The first post on this page gives a good guide on how to configure window and application specific behavior to disable focus stealing prevention built into KWin: System Settings -> Window Behavior -> Window Rules tab (by Zorael)


Which script loads bash startup scripts?

For the most part Bash loads them itself. The exceptions are:

/etc/profile, which loads /etc/bash.bashrc and /etc/profile.d/*.sh
~/.profile, which loads ~/.bashrc

This applies to Debian as well btw.


How can I tell the update manager to never update my Nvidia drivers?

You just have to put the packages on hold. See this excellent post on how to:

How to prevent updating of a specific package?


need to make the factory recovery after installing windows7

This Notebook was release by HP with Ubuntu 12.04 LTS as an option (along with FreeDOS, or various Windows variants):

chrisjrob (Blog) >> HP 255 G1 Laptop with Ubuntu

Ubuntu hardware >> Ubuntu on HP 255 G1 Notebook PC

While the Notebook is certified to run 12.04.2 (64-bit), you would be better off do a new install of Ubuntu 14.04 LTS (64-bit) instead.

There are known issues with power management (under 12.04):

Ubuntu forums > Laptop HP 255 G1


How do I fix the new snap release of Chromium so that it launches?

This error will go away if you login and logout. Initially I tried solving the Theme parsing error: gtk.css:xxxx:xx: 'font-feature-settings' is not a valid property name error by opening the System Monitor application and killing all Chromium processes one at a time. This caused the Ubuntu 20.04 desktop to be replaced by a black screen. I pressed the Ctrl+Alt+F3 keyboard combination to exit from the black screen to a virtual console. When I logged back in to Ubuntu from the virtual console the usual Ubuntu login screen appeared automatically and I was able to log in. After logging back in Chromium resumed working again as usual.


This is also a shot in the dark, but consider downloading from a different mirror site, checking the checksum of the file, and burning to a new dvd/cd at a slower rate.

Also, never neglect to check your actual hardware ex. http://www.memtest86.com/


How to turn off Sticky Edges in Ubuntu Gnome

Sorry for the late answer, but better late than never?

The setting you are looking for can be done graphically in dconf-editor, navigating to /org/gnome/shell/overrides and toggling the value edge-tiling, as appears below:

To do this using a CLI, enter the command

gsettings set org.gnome.shell.overrides edge-tiling false

to turn off the tiling at the edge of the screen, or

gsettings set org.gnome.shell.overrides edge-tiling true

to set it back on.


How can I launch a specific application bypassing the global menu in Unity?

This should work (thanks @Braiam):

 UBUNTU_MENUPROXY=0 gvim

Running the above command from a terminal will launch a gvim instance with its own menus. So, to create a launcher on your desktop, open a file called ~/Desktop/gvim.desktop with the following contents:

    [Desktop Entry]
    Name=gvim
    Comment=Run gvim with menus
    Exec=env UBUNTU_MENUPROXY=0 gvim
    Type=Application
    Icon=/usr/share/icons/HighContrast/48x48/apps/vim.png
    StartupNotify=true
    Categories=Utility;Editor;

The env command allows you to run a specific command in a temporarily modified environment and is needed to pass the variable when you launch a program using a .desktop file.

If you prefer the command line way, you now make an alias for the command above by adding this line to your ~/.bashrc:

alias gvim="UBUNTU_MENUPROXY=0 gvim"

Now, open a new terminal, run gvim and you'll have it menu free.


Trouble with internal drives accessible from Plex

Permissions were not set on the /media folder to allowed for Plex to see those drives. I updated the permissions and plex was able to read/write to those folders as expected.


Lost Ubuntu 14.04 after Windows 8.1 install at 2nd partition

I had a similar problem with an HP Probook but my problem was that HP had hardwired the computer to always boot into Windows. However, the following fixes might still work for you:
1. My first fix was to use a rEFInd bootable cd, and it should find all of the OS's on your computer and allow you to boot into them. You can download the rEFInd iso image here.
2. My second fix was to press Escape on startup and then F9 to access the Boot Device Options. Then I selected Customize Boot Options to find the OS systems.
3. A permanent fix I used was to go into the Bios menu and change the boot path to the Grub file. If you want to try this, please reply so I can provide more detailed instructions.
These fixes helped me, but you probably have a different problem since your computer had Ubuntu installed by default.


Getting black on team fotress 2 using linux version of steam

I don't have privileges to comment so I'm going to post this as an answer:
What driver is selected when you go to Dash and then type Additional drivers:
one graphics driver should be highlighted.  Also it appears this may help you:
How do I install drivers for an Intel HD Graphics?


Can't change screen resolution after upgrade to 16.04

16.04 has no proprietary AMD drivers, which is most likely why you can't get a QHD resolution. Even if you could, I wouldn't recommend it, since it will probably be very laggy.

If you can, you should just downgrade to 14.04, which is supported by fglrx. If you accidentally take an HWE upgrade, then you can downgrade Xorg to get fglrx back. Messed up updates. Managed to get to desktop, but can't install Fglrx drivers back


virtualbox download and installation error

That is because there is not a package in the standard repositories with such a name, to get the latest in the repositories then run:

sudo apt-get install virtualbox

If you already have the virtualbox .deb file you wish to install it then simply cd into the relevant folder and run (<package-name> being the name of the .deb file you wish to install):

sudo dpkg -i <package-name>

If you do not already have it then you may download it from the official page (there are download links at the top of the page).

If you want it from the official VirtualBox repository though you will need to run:

echo "deb http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib" | sudo tee /etc/apt/sources.list.d/oracle-virtualbox.list

Then add the key (for version 16.04 and above):

wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -

Or this one (for version below 16.04):

wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -

And then run:

sudo apt-get update
sudo apt-get install dkms
sudo apt-get install virtualbox-5.1

Which is currently (at the time of this writing) the latest version, though you may replace the version number with whichever you like the install that version.

Source and further reference.

To answer your second question: the guest addition comes with the VirtualBox version you install. You can install it on a VM by going Devices > Insert Guest Additions Installation CD (though you will have to do this again every time you upgrade your VirtualBox version as the guest additions installation doesn't upgrade by itself on your VMs). Ubuntu will ask you if you wish to run the contents of the inserted CD, say you do and then it will install it.


Gufw doesn't show my current iptables rules

Gufw is a front-end for ufw, which in turn is a simple interface/front-end to iptables.

Gufw does not display your existing iptables rules because it is only designed to interpret the high-level ufw rules; it simply cannot parse the low-level iptables rules.


Computer freezes when playing youtube video in Chrome

It turned out to be a hardware problem - graphic card fan was packed with dust, and graphic-costly operations (like watching videos) caused it to overheat. I found that out when it was already too late and I needed to replace the graphic card. After replacing it the problem was gone.


nvidia-96 drivers causing garbled text, display on Geforce4 Ti 4660

Old video cards often dont like KMS and can result in the garbled video display you have indicated.

I would try adding the boot option "nomodeset" for either the open-source graphics driver or the nvidia-96 driver.

If you are having an issue with "nomodeset" as well, try forcing the use of VESA graphics until you install the nvidia driver i.e. use "xforcevesa" as the boot option or in combination "nomodeset xforcevesa"

Linked Question:

How do I set 'nomodeset' after I've already installed Ubuntu?


Black screen with white text after trying to update to Ubuntu 16.04

Just typing sudo <command> does not actually do anything, as you can see from your error messages.

You need to type in the command you want, preceded by the word sudo. In your case, if you want to complete the upgrade, you need to type:

sudo do-release-upgrade

It will ask you for your password (enter it), and then it will most likely ask you to confirm that you want to do the release upgrade, just type y (for yes).


Is there an alternative to f.lux which runs constantly?

@Youngin  I had tried f.lux with no success , then i found redshift in software center . It autostart during boot system and apply as far as you keep your machine running.


There are a few places where you can define $PATH:

/etc/environment is a plain text file (not a script) that affects all users
~/.pam_environment - the same thing but user-specific

bash also executes some scripts which can be used for modifying $PATH:

~/.profile is executed for a login shell sessions (don't ask me what it means :)
~/.bashrc is executed for non login interactive shell sessions
/etc/profile and /etc/bash.bashrc are system wide alternatives for ~/.profile and ~/.bashrc

I read somewhere that /etc/environment is a recommended place for defining your $PATH.
So I usually use it. But your path is probably modified in one of the other places.

BTW, when you execute a command with sudo, I think it normally uses root user's $PATH (and not the $PATH of your unprivileged user account).
So, ~/.pam_environment, ~/.profile and ~/.bashrc in /root directory may also play a role.


How do I get colors and a correct character set with screen through PuTTY?

Not sure about the colors, but for the characters, you need to set putty to use UTF-8 as the code page.


Password security: Ubuntu Forums Security Breach

Even if the passwords are encrypted the PCs these days have become powerful enough to use bruteforce attack on the hash to find the passwords within reasonable time. I myself don't remember the forum password I used to use. So to be on the safer side, it would be prudent to change the password in websites where you feel that you've used the same password.

Update:
Canonical in its statement on the Ubuntu forums home page, has told:

  The passwords are not stored in plain text, they are stored as salted
  hashes. However, if you were using the same password as your Ubuntu
  Forums one on another service (such as email), you are strongly
  encouraged to change the password on the other service ASAP.

The use of salt will make it more difficult to find the password from the hash, but still it'll be safer to change the password, wherever required. To know more about Salt, please check out: Salt (cryptography)


Undo zcat to Internal HDD and recover the Data

When a drive has been accidentally overwritten you will need Data Recovery Tools to restore the remainders of your data. After unpacking an image on your drive those parts of your drive where data were written are definitely lost and can not be recovered.

By installing testdisk  you may be able to recover parts of your files.

Included in the TestDisk suite you will also find the tool PhotoRec that helps to recover individual files even in the case the partitions can not be restored by testdisk or the drive itself has a hardware defect.

TestDisk/PhotoRec can also be run on a backup image of your drive (strongly recommended).


It looks like you have the new Ubuntu font set as your terminal font. This is not recommended, because the monospace version of the Ubuntu font has not yet been created.

To reset yourself to the default terminal font then run the following in a terminal:

gconftool-2 --unset /desktop/gnome/interface/monospace_font_name

You can also do this graphically, in System->Preferences->Appearance->Fonts. Here change the "Fixed width font" to 'Monospace' size 10. It will look something like this:


Replaced drive in RAID array--now can't boot?

Yes, it sounds like your BIOS is trying to boot from the first drive and not finding a boot record.

If you tell it to try booting from another drive instead, and it works, you can always break into the grub menu well before anything will try writing to any disk (you probably have the menu hidden - hold SHIFT to reach it).

Alternatively, you can boot off a live CD if you have one, and setup the boot record on sda from there.


Messed up swap on clean install of Xubuntu 12.10

Possibly gparted can't resize logical volumes inside a lvm.
However, there is a graphical tool to acomplish that:

sudo apt-get install system-config-lvm
sudo system-config-lvm

Hoping this helps


How to toggle off Caps Lock by Shift key?

First install gnome-tweak-tool by using this command:
$ sudo apt-get install gnome-tweak-tool

Now open 'Tweaks' application, then go to : Keyboard & Mouse → Keyboard → Additional Layout Options → Miscellaneous compatibility options → check 'Shift cancels Caps Lock'. Close window.
Works fine in Ubuntu 20.04.


What is the content of /etc/hostname? Have you tried using hostnamectl --set-hostname B to change the hostname/IP?


Wireless not connecting (Or detecting) before actually installing ubuntu on MacBook Pro

Depending on the exact wireless card in your MacBook, it may require an additional driver or perhaps firmware. You might check 'Additional Drivers' to see if any suggestions are found there.

You can install Ubuntu without wireless perfectly well. Then provide details about your wireless from the terminal:

    lspci -nn

We can then determine the best driver or firmware for your wireless card.

Not all drivers and firmware are included by default because they are not all free and open source software. You are free, however, to install third-party software if you wish.


Upload to PPA succeeded but packages doesn't appear

Packages take a while to process. You just need to wait. You will receive an email soon saying that your package was accepted (or rejected) then the packages will build, which will take some time. You should see the build progress on the right of your PPA page.

Once the packages have built (or failed to build), you will be emailed again.


How can I Change Scroll sensitivity of MX Master 2s's scroll wheel?

first uninstall your current solaar version, then try this:

git clone https://github.com/pwr/Solaar.git
cd Solaar

Update: The following is unnecessary now, as the pull request has been merged:

  unfortunately the support for the MX Master 2s seems not to be in there yet, but there's a pull request with the support, so you could do:
      git pull origin pull/399/head

  to download it into your local repository. If it opens an editor just hit save and exit it.

Continue here

Then you can run

sudo python setup.py install
/usr/local/bin/solaar


Remove close button on specific application

As far as I know, there isn't a way to do this.  The simplest option would be a tiny application that is just runs a transparent window and is set to always on top and not decorated.  Place this window on top of the anticipated location of your skype client.

You could also replace the icon.


How do I run a .JAR file via the terminal

You can run java package using this command on your terminal:

java -jar MyFirstClass.jar

If you don't have Java Runtime Edition (JRE) you'll need to install default-jre package.


Start a terminal on login and show a message

The gnome-terminal manual shows an option to execute a command in the terminal it opens.

   -x, --execute
             Execute  the  remainder  of  the  command  line  inside   the
             terminal.

But the catch is that once the command finishes, the terminal will close. This thread has a solution for that:

gnome-terminal -x bash -c "echo 'hello world' ; bash"

This will open the terminal and run the bash shell, which then runs the echo and then bash. This is essentially the same thing as a script like:

#!/bin/bash

echo 'hello world'
bash

So gnome-terminal -x script.sh should run the echo and leave you with a bash shell. Once you exit that shell, the original (bash -c, or #!/bin/bash) shell will exit, and finally the gnome-terminal will exit.

You can also use the Message of the Day feature, which runs after login on every terminal.


Hide all normal windows shortcut is not working in Ubuntu 13.10

Actually there's a good post on how to make it work again, fairly simply too:
Super+D key shortcut does not show desktop

The trick is to tick the "Add Show Desktop Icon to the Launcher" in the Appearance settings. Once you have it there then you can define your shortcut for the Show Desktop and it should work (at least it worked for me).

Have fun...


Is there any open source software for USB Endoscope Borescope Camera?

https://apps.ubuntu.com/cat/applications/guvcview/

This program worked very well for me.


Position of window titeles in Xubuntu/Compiz 12.04

I have to resolve this issue by:

Open dconf-editor
Navigate to org.gnome.desktop.wm.preferences -> button-layout
Put follow value there: close,maximize,minimize:menu and hit enter

That's all!


Execute following commands in terminal.

id user_name

replace user_name with your user name to get your uid then execute this command

sudo mount -o rw,uid=your_uid_here /dev/sdb1 /mnt

replace your_uid with uid of your user found above.


Chemical Engineering Simulation Software?

There is an open source process simulator called DWSIM. You can also try COCO simulator under Wine.


Stuck in login loop when connected to motherboard HDMI

Have a look at dmesg output and /var/log/xorg.0.log. This will give you valuable information about what is going wrong.

I think in your case the integrated graphics card (UHD Graphics 630) is simply not yet supported.

It seems you need at least kernel 4.13 and mesa 17.2. Just look at this phoronix article for details. Even in 17.10 the support is not marked as stable.

If you want to use newer mesa and kernel with 16.04, you will have to get those over ppas, e.g. the oibaf ppa for mesa and graphics drivers.

I would probably suggest to wait another month for 18.04


Notification not showing up by script run by udev rules

I have this worked for me before:

ACTION=="remove", KERNEL=="sd?", ENV{ID_PART_TABLE_TYPE}!="", RUN+="/usr/bin/sudo -u username DISPLAY=:0 notify-send 'Unsafe Remove' 'Your long message' -i /usr/share/icons/gnome/48x48/emotes/face-worried.png -t 10000"

From: Alert the user when they unsafely unplug an USB thumb drive

So use sudo to run notify-send as same user (Not as root)

/usr/bin/sudo -u username notify-send ...


Booting Linux from external HD connected to USB port on a Mac Mini

You can boot it off a usb drive.

Restart your Mac and press alt/option key while the Mac is restarting to choose the USB stick.

Reference: http://www.ubuntu.com/download/help/create-a-usb-stick-on-mac-osx


Ubuntu can not access other ubuntu hdd which is external

I finally solved.

sudo apt-get install -y ecryptfs-utils

i installed this

then this and it worked

ubuntu@ubuntu:~$ sudo ecryptfs-recover-private

INFO: Searching for encrypted private directories (this might take a while)...
^TINFO: Found [/media/ubuntu/139df09d-a0b5-4567-86c8-ebb26dd88d87/.ecryptfs/caneraydin/.Private].
Try to recover this directory? [Y/n]: y
INFO: Found your wrapped-passphrase
Do you know your LOGIN passphrase? [Y/n] y
INFO: Enter your LOGIN passphrase...
Passphrase:
Inserted auth tok with sig [2c6b7102bf504377] into the user session keyring
INFO: Success!  Private data mounted at [/tmp/ecryptfs.IFHvQShg].

it put all data encrypted inside tmp


"Missing Operating System" when booting with "Live USB"

This is an ongoing bug with UnetBootin, it doesn't automatically add the boot flag.

I am not sure about the other software you have used but I can recommend you to use Rufus. It's free software as well. Also it is the recommended software by the Ubuntu official guide for installing Ubuntu on a Windows PC.

Follow this official tutorial step by step.


Ubuntu 16.04 Server Fresh Install - Can't ping gateway & no wifi network at all

First, your file is faulty in several respects. First, although you say you want to use wireless, your interface, enp2s0, is for ethernet. The correct sequence for wireless is:

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto wlxec086b1eaf1b
iface wlxec086b1eaf1b inet static
address 192.168.1.200
netmask 255.255.255.0
gateway 192.168.1.254
# dns-* options are implemented by the resolvconf package
dns-nameservers 192.168.1.254 8.8.8.8
wpa-ssid ATT548CA
wpa-psk frank777

Next, restart the interface:

sudo ifdown wlxec086b1eaf1b && sudo ifup -v wlxec086b1eaf1b

Check to see if you connected:

ping -c3 192.168.1.254
ping -c3 www.ubuntu.com


Besides the software that Mik mentioned in his answer, I would also recommend that you check out the program AntiMicro. I started developing it as a replacement for QJoyPad but there are some features that AntiMicro has that QJoyPad lacks. Some of the more noteworthy features are that multiple keys can be assigned to one controller button (Shift+Tab), macros allow for conditional button presses, set integration for changing button configurations on the fly, and the program uses a tray icon that works properly under Unity.

The project is hosted on GitHub and the latest deb files can be found at my website.

https://github.com/Ryochan7/antimicro

http://www.ryochan7.com/files/projects/antimicro/antimicro_0.7-1_amd64.deb


How to install the same version of a package on different machines?

You could use apt-get download cppcheck to download the deb-package file and install this on different machines with apt install ./cppcheck_1.72-1_amd64.deb
But this is not always working if (for example) decencies to library-versions or other packages are not met on one of the destination machines.


Can't boot after GRUB Configuration saved new configuration!

Add acpi=off boot parameter.
Press Ctrl+Alt+F1 after unsuccessful boot.
Run sudo apt-get update and sudo apt-get upgrade commands.

Now I can boot but can't login. Also I can't use Ctrl+Alt+F1 anymore. Ubuntu is so buggy! Unbelievable.

Select kernel 33 instead of 35 and it works again.

But what happened? It looks like I just restarted Ubuntu during update in background. And it just stopped to boot because I restarted it after launching Grub Customizer! It's not an operational system. It's garbage.


Poor performance of VNC client with compiz enabled on remote machine

This is a common issue with VNC protocol and Compiz. Most recommendations for this are to add a button to switch between Metacity and Compiz. You may also be interested in the list of best VNC Clients for trying alternatives.


How to make Jetty webserver listen on port 80?

You will need to edit the /etc/jetty/jetty.xml file. Look for a paragraph that says:

<Call name="addConnector">
      <Arg>
          <New class="org.mortbay.jetty.nio.SelectChannelConnector">
            <Set name="host"><SystemProperty name="jetty.host" /></Set>
            <Set name="port"><SystemProperty name="jetty.port" default="8090"/></Set>
            <Set name="maxIdleTime">30000</Set>
            <Set name="Acceptors">2</Set>
            <Set name="statsOn">false</Set>
            <Set name="confidentialPort">8443</Set>
        <Set name="lowResourcesConnections">5000</Set>
        <Set name="lowResourcesMaxIdleTime">5000</Set>
          </New>
      </Arg>
    </Call>

Change the jetty.port Property to 80 as follows:

<Set name="port"><SystemProperty name="jetty.port" default="80"/></Set>

Restart jetty. That should do it.

Since the above method did not work for OP, and running as root is discouraged, there is an alternative method, as mentioned in this document.


Bootstrapping Juju gives ""ERROR could not access file '*-provider-state' gomaasapi: got error back from server: 403 forbidden."

First off, deleting the .jenv file does not destroy the environment, it just makes it impossible to connect to it from you juju client. The .jenv file contains all the necessary information to connect to the environment, including juju API server addresses, SSL certificates, etc.

To destroy a juju environment, use:
$ juju destroy-environment my-maas-env-name -y

This will properly deallocate the MAAS nodes, delete the storage entries, including the provider-state file.

Also, reinstalling juju on your client machine cannot solve your issue, because the environment and its allocated nodes are still there and to MAAS it appears as you're still using the environment.

To solve your specific issue, I'd do the following:

Your environment is no longer accessible because the .jenv file is gone, and since it's auto-generated you cannot regain access to the environment just by creating an empty .jenv file.
Delete the .jenv file if it's still there.
Login as the MAAS administrator in the MAAS web UI, go to "Nodes" and for each allocated node, click on the node and click "Stop node" on the node page. This will deallocate the node and bring it back to Ready.
Using the MAAS CLI, you can list all files in the environment storage: $ maas my-maas-session files list, and delete the provider-storage file: $ maas my-maas-session file delete XXXX-provider-storage (the exact file name you get from the files list, it will look like c4ba50c2-268c-4cf4-8be1-c0903982c8a8-provider-state; and my-maas-session corresponds to your CLI user session - it can be any string, created with e.g. $ maas login my-session-name http://192.168.50.2/MAAS/ <maas-api-key> - use the same key you specify with "maas-oauth" in environments.yaml)
Bootstrap again, once it's done it should work.

Hope this helps,


"Unable to retrieve Server list" error when viewing network shares (internet in browser works)

You may not be on the same WORKGROUP as your other shares - so a list is unable to be generated.

Try connecting directly to the share via it's IP address and protocol to ensure you're still able to see and reach any share.


Godot opens properly, but window wont resize for some reason

Nevermind, changed my desktop environment to GNOME and updated to Bionic Beaver and everything works like a charm.


How to show notification when a usb device is inserted?

It's really surprizing for me that in 2014 we still don't have this feature working by default. It seems there are very little amount of people who needs this feature, but I really need it.

First of all, I found udev-notify package, but unfortunately it almost doesn't work for me: it works for very little time (1-2 minutes), and then, if I connect/disconnect any device, it crashes:

Traceback (most recent call last):
  File "./udev-notify.py", line 319, in <module>
    notification.show()
glib.GError: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name :1.1061 was not provided by any .service files

I haven't found any solution, so I had to remove it. (filed bugreport also)

There're no similar utilities I've found so far. So I had to implement my own solution, it is probably not brilliant, but it works for me: it notifies me with sound and visual notification for any device that I plug/unplug. Title of the device is received via lsusb, so that if I plug some unknown device, at least I see its vendor_id:product_id. I like it.

It looks like this:

Installation details.

Tested on Ubuntu 12.04, Xubuntu 12.04, Xubuntu 13.04, Linux Mint 13. I believe it should work on other Ubuntu derivatives, and I hope it will work on any *nix system with udev.

Go to project page, get sources from there and put them somewhere. There's just one main script in it: my-udev-notify.sh, but archive also contains sounds for plug/unplug notifications, plus some more info, see readme.txt for details.
Create file /etc/udev/rules.d/my-udev-notify.rules with the following contents: (don't forget to modify path to your real path where you unpacked my-udev-notify.sh!)

 ACTION=="add",    RUN+="/bin/bash /path/to/my-udev-notify.sh -a add    -p '%p' -b '$attr{busnum}' -d '$attr{devnum}'"
 ACTION=="remove", RUN+="/bin/bash /path/to/my-udev-notify.sh -a remove -p '%p' -b '$attr{busnum}' -d '$attr{devnum}'"

After this, it should work for newly attached devices. That is, if you unplug
some device, you won't get notification. But when you plug it back, you will.
(yes, for me it works without any udev restarting. If it doesn't for you, try
rebooting)

To make it work for all devices, just reboot your system. NOTE that there might
be many notifications during first boot (see known issues in the readme.txt). On second
boot, there will be no notifications (unless you plug in new device when
system is off)

You can customize it (turn on/off visual and sound notifications, or change sounds), check readme.txt in the archive for details.


Working with text files encoded as Windows-1250 and UTF-8

I prefer to use recode for this. It's not installed by default, but available through the package by the same name. It also changes CRLF line endings to LF.

sudo apt-get install recode
recode cp1250.. file.txt

You can do this for all txt files in an entire dir

recode cp1250.. ./*.txt

And recursively by combining with find

find . -type f -name "*.txt" -exec recode cp1250.. {} +

The standard option is to use the iconv command, which is installed by default, but this does not change the line endings, so you need to do that in another step:

iconv -f cp1250 < file.txt | sed $'s/\r$//' > newfile.txt

In the long run, I'd recommend changing your windows editor's default character set and line ending to UTF-8 and UNIX line endings (LF,\n) to avoid having to do the conversion after the fact.

CR means Carriage Return (\r)
LF means Line feed (\n)

Windows uses both, but unix-like systems uses only LF.


Setting up Icecast2 streaming server on the Internet for live streaming

After we followed

How do I setup an Icecast server for broadcasting audio in my network?

we will be able to create an Icecast2 radio stream from the default pulseaudio output device in our system.

In case we have setup the input source (e.g. here your Behringer UCA 202) to output to this default sink (i.e. we are able to listen to the input on our local machine) this will then be sent as an Icecast stream to our network.

If we want to reach this Icecast server from the Internet we can do so via the following radio URL:

http://<ip_of_server>:<port>/<name_of_stream>

Replace <ip_of_server> with the external IP of the network where the Icecast server runs. Replace <port> with the port Icecast uses for streaming (defaults to 8000 as defined in /etc/icecast2/icecast.xml). Also give the name of your mount point as defined in the ices-alsa.xml or darkice.cfg file you are using (e.g. stream.ogg).

  We need to open and forward the listen port for access to the Icecast server from the Internet.

Listener authentification can be defined in the icecast.xml file as well as we can define another relay server for our stream if needed for bandwith or accessibility.

Further information on settings can be found here: Icecast2 Documentation


How to change monitor position/navigation?

I wasn't able to solve this one in 10.10 with gnome monitor manager. Have since upgraded and distro/wm hopped a bit so can't follow up on this. However I have discovered arandr which i now use for monitor management in the lighter wm's (LXDE and Awesome). Its in the repositories.

sudo apt-get install arandr

After installing, open your terminal and type arandr, then change the position of your devices according to your need.


Cannot Install R Studio on Anaconda Navigator on Ubuntu 18.04

I had the same problem, I used "Stacer" to clean the Application caches. Now Rstudio is installed, but it is in an other environment than the "base(root)" environment.
But I used
conda install -c r r-irkernel
in the base environment, and now I have the R kernel in Jupyter-notebook.


As the output says, MRTG is already installed:

  mrtg is already the newest version.

However, the package pbis-open errored during installation.

One way that might fix this is the command sudo apt install --reinstall pbis-open

Also, you have a lot of orphaned packages installed (dependencies that were installed but are not longer required)

You can remove these with: sudo apt autoremove


No need to do anything: Just ensure the Windows HD is internal and the Ubuntu is in the caddy, go to your BIOS and boot off the external HDD.

Don't try doing the reverse (which you weren't: just making sure!) as Windows 7 cannot just easily boot of an external USB drive.  Just ensure that the external caddy and your PC both support USB 3.0 to make the experience faster.

If you don't mind swapping out your DVD drive for a caddy (whenever you need Ubuntu), have a look at this funny link and you'll see what I'm taking about!  ;-)


Backup without free space in not recognized partition

Clonezilla is the solution which does exactly what you want to achieve, backing up the used data space of partitions. Download Clonezilla Live and create a bootable DVD or USB media from the ISO file. Boot from the media and clone the content of the disk or a partition. I have created two presentations explaining how to do this : Create a partition backup with Clonezilla and Restore a partition backup with Clonezilla. Clonezilla lets you clone the used space of complete disks or of single partitions very reliably.


How to : Fix the problem to upgrade system on Ubuntu 14.04?

I faced a similar issue recently, and this is how it was resolved.

In short, try these things in a sequence:

Just do a sudo apt-get update and see if it resolves.
(optional) If you have meddled with your /etc/apt/sources.list a lot, then generate a new clean one from repogen.
Perform a sudo rm -rf /var/lib/apt/lists/ followed by sudo apt-get update --fix-missing.
No luck? Then problem is most likely with the ubuntu servers, not your configuration. Try switching the servers. Edit the sources.list and change id.archive.ubuntu.com (or whatever your present server is) with any of these:

de.archive.ubuntu.com (Germany)
in.archive.ubuntu.com (India)
us.archive.ubuntu.com (USA)

After you change the above, perform a sudo apt-get update. If not successful, go back to step-4 and pick another server and then repeat the process. Keep switching servers until you find the correct one. There are of course, many other servers too besides these three.


How can I capture keystroke “print screen” in Gnome 3?

If your system is configured so that taking screenshots doesn't give you a dialog box where you see a preview and decide where to save the file, then it is probably saving them to whatever location is set as the default.

The Pictures folder directly inside your home folder is the most likely default location, unless you've changed it.


how to update an individual app through terminal

To only upgrade Firefox on its own do:

sudo apt-get dist-upgrade firefox

or

sudo apt-get upgrade firefox

from man apt-get

upgrade
    upgrade is used to install the newest versions of all packages
    currently installed on the system from the sources enumerated in
    /etc/apt/sources.list. Packages currently installed with new versions
    available are retrieved and upgraded; under no circumstances are
    currently installed packages removed, or packages not already
    installed retrieved and installed. New versions of currently
    installed packages that cannot be upgraded without changing the
    install status of another package will be left at their current
    version. An update must be performed first so that apt-get knows
    that new versions of packages are available.

dist-upgrade
    dist-upgrade in addition to performing the function of upgrade, also
    intelligently handles changing dependencies with new versions of
    packages; apt-get has a "smart" conflict resolution system, and it
    will attempt to upgrade the most important packages at the expense of
    less important ones if necessary. The dist-upgrade command may
    therefore remove some packages. The /etc/apt/sources.list file
    contains a list of locations from which to retrieve desired package
    files. See also apt_preferences(5) for a mechanism for overriding the
    general settings for individual packages.


so when will ubuntu touch come out on samsung galaxy?

I think you won't be meeting the requirements for the Ubuntu touch installation, I know that there are some phones from Meizu that already come with Ubuntu touch as the OS to power their phones because they are partners of Canonical.

At the moment it can only be installed on Google Nexus devices for testing purpose only.

It will have a different store and it will NOT be compatible with Android apps, it will have its own market.


Why is my Ubuntu laptop freezing suddenly?

Allo. I got this problem too, few hours ago, and I solved it.
This is caused by new Linux (here 5.8.0-34) update.
All you should do is to use old version by making it default boot or remove that version.
To remove new version, Boot into old Linux (here 5.4.0-59), through "Advanced Options for Ubuntu" in GRUB Menu.
Use "Synpatic Package Manager" and remove linux-headers-x, linux-image-x, linux-modules-x, linux-modules-extra-x, and any other removable with that version name. (x is your new version)
This will make old linux version as default.
Also, this will remove meta packages, so they won't get updates.
To fix this, install linux-generic or use "sudo apt install linux-generic". It is dummy package and will install meta packages:- linux-headers-generic, linux-image-generic.
I am not a linux professional, this is an easy and temporary solution.


I can't get the colorshemes to work in neovim

I had problems with this too - upgrading gnome-terminal is what did it for me.

How can I upgrade gnome-terminal on Ubuntu 14.04 LTS?

Also, I don't think you'll need t_Co=256 in your init / vimrc.


External monitor not working properly on Ubuntu 16.04

This actually worked for me to solve the blank screen Two displays with different resolution are joint (copied below for convenience).

Install arandr

sudo apt-get install arandr

2. Run xrandr
If your chosen resolution exists (regardless of which monitor it appears by) then skip the next step

If your resolution does not exist, create it by doing the following:
In this example the resolution I want is 1280x1024
cvt 1280 1024

This will create a modeline like this:
"1280x1024_60.00" 109.00 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync

Create the new mode:
xrandr --newmode "1280x1024_60.00" 109.00 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync

Add the mode (resolution) to the desired monitor (VGA-1):
xrandr --addmode VGA-1 "1280x1024_60.00"

Run arandr and position your monitors correctly

Choose 'layout' then 'save as' to save the script

I found the best place to load the script (under Xubuntu) is the settings manager:
xfce4-settings-manager

OR

Menu -> Settings -> Settings Manager -> Session and Startup -> Application Autostart

If you have also take problem must comment me.....:)


Rhythmbox doesn't have audiobook support directly, but it does support multiple, distinct libraries, one of which could be just for your audiobooks. See this post for details. This won't do anything clever, like support chapters etc, but it may be enough.


Problem start up dual boot Linux and Mac OSX El Capitan

I also faced to this situation last day. What I did was, I downlaod OS X El Capitan and Linux. Then I create bootable USB drives in order to install Mac OS and Linux. Then I installed the El Capitan and then I installed Linux. Then both two operating systems are work in order.


You must change VirtualHost configuration

Listen 90.78.56.34:80
Listen 12.34.56.78:80

<VirtualHost 90.78.56.34:80>
ServerName www.example2.com
DocumentRoot /www/website2
</VirtualHost>

<VirtualHost 12.34.56.78:80>
ServerName www.example1.com
DocumentRoot /www/website1
</VirtualHost>

Edit 1

Listen 90.78.56.34:80
Listen 12.34.56.78:80

<VirtualHost 90.78.56.34:80>
ServerName example2.com
ServerAlias www.example2.com
DocumentRoot /var/www/website2
</VirtualHost>

<VirtualHost 12.34.56.78:80>
ServerName example1.com
ServerAlias www.example1.com
DocumentRoot /var/www/website1
</VirtualHost>

I correct path for DocumentRoot and add ServerAlias

Also you change /etc/hosts

sudo nano /etc/hosts

12.34.56.78   example1.com
90.78.56.34   example2.com


Why do Firefox and Thunderbird not use Notify OSD?

I just want to clarify something - notify-osd is just one implementation of the Freedesktop Notification spec. Applications actually use libnotify, which allows them to integrate with the notification system (which could be notify-osd, the legacy notification-daemon or any other implementation of the spec)

Both Thunderbird and Firefox already have native support for libnotify. However, they fall back to XUL notifications when communicating with a notification system which doesn't support actions (ie, notify-osd). This is because the types of notifications provided by Firefox and Thunderbird show information that is only really useful if the actual notification allows the user to interact with it (eg, "download finished" should provide a way for the user to access the downloaded file. A "new mail" notification should provide a way to access the new mail, and be persistent).

Making Thunderbird and Firefox use libnotify when the notification system doesn't support actions would provide a very sub-optimal experience if we made no other UI changes.

There is already ongoing work to integrate Thunderbird in to the messaging menu. Part of this will involve having new-mail alerts via notify-osd. Persistence will be provided by the messaging menu.

In addition to this, I will at some point start work on integrating download notifications in Firefox with notify-osd and the Unity launcher (with the launcher being able to show a progressbar, and use quicklists as a way to access finished downloads). This work hasn't started yet and will be something I do for the 11.10 cycle.


Put ubuntu PC to standby after X minutes

I didn't test it, I could be missing a step.

Use System Setting → Power / Brightness. Set all setting you need and as you want
Create an override file from the current user settings and place it in /usr/share/glib-2.0/schemas/

echo "[org.gnome.settings-daemon.plugins.power]" > 90_mypower.gschema.override
gsettings list-recursively org.gnome.settings-daemon.plugins.power | awk '{ gsub("org.gnome.settings-daemon.plugins.power ","") ; print $1"="$2 }' >> 90_mypower.gschema.override

sudo mv 90_mypower.gschema.override /usr/share/glib-2.0/schemas/
sudo chown root:root /usr/share/glib-2.0/schemas/90_mypower.gschema.override
sudo chmod +r /usr/share/glib-2.0/schemas/90_mypower.gschema.override

Compile the schemas

sudo glib-compile-schemas /usr/share/glib-2.0/schemas

Create a lock file for all org.gnome.settings-daemon.plugins.power keys  and place it in /etc/dconf/db/gdm.d/locks/

gsettings list-keys org.gnome.settings-daemon.plugins.power | xargs -L 1 -I{} echo /org/gnome/settings-daemon/plugins/power/{} > 90-mypower-locks

sudo cp 90-mypower-locks /etc/dconf/db/gdm.d/locks/90-mypower-locks
sudo chown root:root /etc/dconf/db/gdm.d/locks/90-mypower-locks
sudo chmod +r /etc/dconf/db/gdm.d/locks/90-mypower-locks

Update for locks

sudo dconf update

As you are looking for system administration, nice to learn:

Watch dconf for change

dconf watch /

Change power setting from GUI, watch for messages
Open dconf-editor, go through same path, select a key
Look at bottom, it shows its schema name/id: org.gnome.settings-daemon.plugins.power

References:

dconf System Administrator Guide
Shouldn't dconf-editor and gsettings access the same database?
dconf Settings: defaults and locks
man gsetting, man dconf


Screen rotates 90 degrees after shutting lid

Ok, I've reinstalled the iio-sensor-proxy package from apt and restarted my laptop. This seems to have fixed the issue.

Uninstall:
sudo apt-get remove iio-sensor-proxy

Reinstall:
sudo apt-get install iio-sensor-proxy


How to copy an executing script from current folder to another by double click

I'm not sure why you'd want to do this, but you can handle this slightly more elegantly than a raw copy.

mkdir -p $HOME/wow/meow
cp "$(readlink -f $0)" "$HOME/wow/meow"

It's using $HOME so we aren't reliant on a hard-coded path (moderately more reliable than the ~ substitution for scripting).
We check that the target directory exists (and create it if not).
We get the actual script location rather than relying on a hard-coded path.


Utility for entering partitions into fstab

With GNOME Disks Utility:

Usually, it will have Automatic Mount Options enabled. Disable it, and set your options:


Ubuntu distribution upgrades: move all user interaction to the end?

I believe you would be suited by using the non-interactive upgrade features.

For stable releases:

do-release-upgrade -f DistUpgradeViewNonInteractive

For development releases:

do-release-upgrade -d -f DistUpgradeViewNonInteractive

It will go through the process without additional questions asked, which sounds like what you are looking for.

See this question for additional information: https://askubuntu.com/a/250882/173967


Wireless doesn't reconnect after resuming on after the upgrade to Ubuntu 14.04 on my MacBook Pro.

I found a way to restore connectivity, even though I did not understand what the cause of the problem.
However, killing the wpa_supplicant process, it will restart automatically, and the connection is restored:

sudo killall wpa_supplicant

output of dmesg:

[3481.457982] b43 bcma0: 0 wlan0: disabling HT as WMM / QoS is not supported by the AP
[3481.457992] b43 bcma0: 0 wlan0: disabling VHT as WMM / QoS is not supported by the AP
[3481.461214] wlan0: associate with <mac_address> (try 1/3)
[3481.464068] wlan0: RX AssocResp from <mac_address> (capab = 0x431 status = 0 aid = 3)
[3481.464475] wlan0: associated
[3481.464501] IPv6: ADDRCONF (NETDEV_CHANGE): wlan0: link Becomes ready...

I hope it could be useful also to other.


How can I give space on another drive to my Ubuntu partition?

There is a way to redirect what you install to the HDD afterwards by using custom folders for folders in /home in order to span your home directory across multiple hard disks. In your case the multiple hard disks are the 128GB SSD and the 1TB HDD.

Example (xdg-user-dirs-update - Update XDG user dir configuration):

 xdg-user-dirs-update --set DOWNLOAD /media/askubuntu/1TB-HDD/Downloads/

would switch from /home/$USER/Downloads/ to /media/askubuntu/1TB-HDD/Downloads/ and downloaded files would then download to the HDD and not to the SSD. The same applies for all the other directories.

  Both the local ~/.config/user-dirs.dirs and global
  /etc/xdg/user-dirs.defaults configuration files use the following
  environmental variable format to point to user directories:
  XDG_DIRNAME_DIR="$HOME/directory_name" An example configuration file
  looks like this (these are all the template directories):

  Results of cat ~/.config/user-dirs.dirs :

XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_VIDEOS_DIR="$HOME/Videos"

  As xdg-user-dirs will source the local configuration file to point
  to the appropriate user directories, it is therefore possible to
  specify custom folders. For example, if a custom folder for the
  XDG_DOWNLOAD_DIR variable has been named $HOME/Internet in
  ~/.config/user-dirs.dirs any application that uses this variable
  will use this directory.


how to merge / extend unallocated space? (Not dual os)

Based on your screenshot, I take it you are already using a live medium to run gparted. That's the correct first step.

Assuming you want to increase the size of /dev/sdb1 from the unallocated space at the bottom, you need to do the following:

right-click on /dev/sdb5 (the swap partition) and choose swapoff. This will unmount the partition so you can move things around. Otherwise gparted will refuse to take action on a mounted partition.
right-click on /dev/sdb2 (the extended partition) and choose move/resize. Use the dialog to move the huge unused space at the bottom ahead of /dev/sdb2.
right-click on /dev/sdb5 and choose swapon.
right-click on /dev/sdb1, choose move/resize, and grow the partition to the desired space.

gparted allows you to queue several actions before proceeding, or you can take it one step at a time. Personally, I prefer the 2nd option by hitting the apply button (the check mark) after each step.

This is based on the added screenshot. In step 2, instead of moving the space before /dev/sdb2, you moved it inside /sdb2. In restrospect, I should have worded it more clearly.

No problem, just do the following:

if /dev/sdb5 is mounted, then unmount it with swapoff.
right-click /dev/sdb2 to move/resize, this time make sure the free space is before /dev/sdb2. Before clicking apply, visually inspect the updated graphics that the free space is between sdb1 and sdb2.
expand sdb1 (like in the original last step).

GParted 101:

In the move/resize dialog, there are up/down controls beside each text entry box. You can use these to fine-tune where the disk spaces should go. In addition, you can manually type over the text (numbers) with the desired amount of space (in megabytes).

Note: if you type over a number, you have to press enter so the corresponding changes to the other fields are made. Play around with these controls (arrows and text fields) until you get the desired result. When I say "move the space to the top" I meant you as the user must do so, using the controls provided in the dialog.

GParted, whether on an ubuntu live disk or gparted live, will work exactly the same way. You have to specify what you want to happen. It will not automagically know what you want to do.

As a last resort, click Help > Contentson the menu for a detailed documentation on how gparted works. I read it before when I was a newbie and it was fairly exhaustive.


Partition mounting with 750 and not 755?

https://askubuntu.com/a/520990/130518

I was mounting a NTFS and the permissions need to be set explicitly when mounting.


Well, that was faster than expected. Turns out I had to perform a second step after copying the firmware. It has the wrong filename, so renaming BCM4350-0a5c-6412.hcd to BCM-0a5c-6412.hcd solved the problem for the most part.

Reception on my Bluetooth keyboard now seems good (as in it receives the keystrokes and no longer drops any). For the MX 720 Triathlon mouse, however, the Logitech Unifying received still performs a lot better than Bluetooth, which seems to drop a lot of information.

This was solved with a command found at the ArchLinux Forums: https://bbs.archlinux.org/viewtopic.php?pid=1857256#p1857256

Running
sudo /usr/bin/hcitool lecup --handle 64 --min 6 --max 7 --latency 0 made the mouse movements smooth as butter!


Ubuntu 12.10 not completing the full install

I read a post not long ago where a guy was having the same problem you describe, so he turned off his router when it came to that part, Ubuntu gave up downloading the language packs since it had no network connection, the install completed, and he finished the updates afterward from inside his freshly installed Ubuntu. He said it worked for him.


java MainServer gives java.lang.UnsupportedClassVersionError: Unsupported major.minor version 51.0

Seems you compile then run you code with different JDK/JRE versions: if compiling with JDK7, don't run with a JRE6 for example.

See this thread on java.net or this question on Stack Overflow for a detailed answer.


How to remove a package after incorrect installation attempt

The .run file is a binary that installs packages outside of the package manager. apt-get wouldn't be able to remove them since it never installed them (unless the .run file manually adds the repos, and then just pulls down the packages. It might do this, I've never used it.)

Postgres provides their own repos for Ubuntu, and that is the preferred method to use it, so that you get security updates directly from Postgres when they release them.

Instructions to do that can be found at http://www.postgresql.org/download/linux/ubuntu/ which has a handy selector and copy/paste blocks.


What partitions are safe to delete on windows 8 and ubuntu dual boot

You can delete any partition marked as NTFS since those are all Windows.

But I would suggest to always keep the recovery partition if present. You never know if you want to sell that machine. It will be clearly marked as a "recovery" partition.

If you want Ubuntu as a single OS you can use the installer to remove partitions. There is no need to do this from inside the current Ubuntu or Windows.


sudo cp --preserve=all not preserving ownership

It was all down to operator error. The file system I was trying to copy to was not ext2 in the end but FAT32. I did a mount -l and found:

/dev/sdb1 on /media/malapradej/AB6E-FC7F type vfat (rw,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,user_xattr,uhelper=udisks2)


Apache mod_geoip module not Working on Ubuntu 20.04

This probably has more to do with the GeoIP database being incomplete/out-dated than anything. As the IPv4 address space runs out of allocations, companies around the world are buying addresses from organizations in other countries. Amazon, Google, and Microsoft are doing this wherever possible as customers using their cloud services depend on the systems being accessible. ISPs are in the same boat as they pick up new customers. Your IP address may have recently belonged to a French company, and your GeoIP database is too old to know any better.
Most of the GeoIP database providers use whois records to track changes and update their database as fast as possible. Maxmind is quite transparent about the accuracy of their data, which generally hovers around 75% correct for paying customers and less for free database installations.
If you need absolute accuracy of site visitor locations, there are no fool-proof solutions. IP addresses can be reallocated anywhere in the world, spoofed, or obfuscated. GPS locations can be requested and denied, or easily falsified. The same is said about asking people for postal codes, area codes, and the like.
If the GeoIP tool is being used for stats, then it’s best to understand that some of the data will be wrong. If it’s being used to restrict access to a website/service, then it’s good to understand that some legitimate clients may be blocked. If this is being used to customize displayed content, then perhaps people should be given the option to set their location if the stuff they see is incorrect.
Hope this helps.


Switch backlight on and off with one key (script, xbacklight)

Try this. You capture command output in a variable by using Bash's command substitution syntax $( ). To compare integer values, you also use -eq instead of ==.

#!/bin/bash

backlight=$(xbacklight -get)
if [ $backlight -eq 0 ]; then
    xbacklight -set 50
else
    xbacklight -set 0
fi


What is the difference between a desktop environment and a shell?

I assume by "Linux environment" you mean environment variables?

Env vars are local to every shell - so if you set one in one terminal window it will not show up in another. Child processes will inherit a copy of their parent's environment, so if you set particular variables and then start a program, that program will see those variables, too - but neither parent nor child can change the other's variables.

Does that answer your question?


PowerTOP: why sum of "Power est" values is much less than discharge rate?

The battery reports a discharge rate of 38.1 W

That value is read directly from battery/motherboard over ACPI, and should reflect correct power usage relatively well (not on all devices, though). However, if this report from battery is consistently off, estimated power should still match it.

Values in "Power est." column are estimated by PowerTOP, by observing power usage under different loads and display brightnesses. PowerTOP gets baseline power when your display is off and processor (and GPU) is in sleep state. On top of that, there're power estimates.

There is no mechanism to obtain power usage of single component or process. For example, some peripherals could consume remarkable amount of power, but PowerTOP have no way to measure that. It is better to show best possible estimates for impact of each process, and have (relatively large) chunk of unaccounted usage than to scale estimates to match discharge rate.

To improve estimates, you can try (re)calibrating PowerTOP with

powertop --calibrate

From man 8 powertop:

--calibrate
    runs powertop in calibration mode. When running on battery,
    powertop can track power consumption as well as system activity.
    When there are enough measurements, powertop can start to report
    power  estimates.  One can get more accurate estimates by using
    this option to enable a calibration cycle. This will cycle through
    various display levesl (sic) and USB device activities and workloads.

Try running calibration with unplugged charger. There's small chance that either your laptop reports battery charging status incorrectly, or you hit a bug in PowerTOP.


Setting UDEV rule for scheduler setting on USB drives fails

Fixed by making BFQ the default scheduler and defining rules for non default media, so only rotational media uses the default setting now.
# set scheduler for NVMe
ACTION=="add|change", KERNEL=="nvme[0-9]*", ATTR{queue/scheduler}="none"
# set scheduler for SSD and eMMC
ACTION=="add|change", KERNEL=="sd[a-z]|mmcblk[0-9]*", ATTR{removable}=="0", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="none"
# set scheduler for USB flash disks
ACTION=="add|change", KERNEL=="sd[a-z]|mmcblk[0-9]*", ATTR{removable}=="1", ATTR{queue/scheduler}="none"


Bash Script: How to Use Double-Digits as in "p10=$10" or Specify ALL (for File-Roller Script)

You can use "$@" to get all parameters and shift N to remove N arguments.
#!/bin/bash
p1="$1"
p2="$2"
shift 2
if [[ $p2 == *"notify"* ]]; then
        p2=""
fi
/usr/bin/file-roller_orig $p1 $p2 "$@"

Quoting variables with double quotes (such as "$1") is a good idea to ensure bash doesn't try and use one variable as multiple arguments.
Although using $@ is better, it's possible to use ${10} to access the tenth argument.


Is it possible to tell what packages I've installed that aren't in the vanilla install?

After doing a little googling I came up on this link : http://ubuntuforums.org/showthread.php?t=261366

Basically he uses

dpkg --get-selections > installed-software

to list all the installed packages , now if you can get a list from someone who just installed ubuntu or get it from a fresh VM install and compare the list you have the packages that are not in the vanilla install.

Also if you just want to remove unused packages use the janitor  ( System > Administration > Compter Janitor) :-)