Is my Ubuntu 18.04 using 8GB ram instead of 4GB?

Your system is recognizing 8 GB of RAM on the system.

From your free -m output, the first column and row of the output ("TOTAL") indicates your total RAM of 7881 MB (which is not atypical when you install 8GB of RAM).

Of that 8GB, your system is using approximately just over 2GB for buffers, cache, shared memory storage, and actually in-use resources (used + shared + buff/cache).

The "Available" column tells you how much RAM is actually available to be allocated, because the "shared" and "caches" aren't actually always "used" space.   This means you have about 5573 MB (just over 5.5GB) of memory available on your system.

So your system is seeing the 8GB of RAM, but is using about 2GB of space already.

You should probably read about how Linux uses RAM and how to interpret free -m output here, on linuxatemyram.com, to better understand what's actually being used in the RAM.


Put the name in doble quotes or add backslash before space like New\ Volume


Install Glassfish 4 on Amazon EC2 Ubuntu instance

Type as below

sudo service glassfish start

Alternative: If you like GUI ,

sudo apt-get install bum

can help you to manage GUI way.


Can Force UEFI installation harm isolated drives?

While as bodhi.zazen has mentioned you don't have to remove the hard drives from your computer to ensure they won't be touched.

However, removing them won't damage your computer.  Some users have recommended removing the hard drives with the most important data to be sure not to make a mistake and install on the wrong drive, or something else to that effect.

As far as the Ubuntu installer damaging your computer, that will not happen.

I have used computers many times that don't have hard drives in them.  I have also seen occasions where some very compact computers are shipped without hard drives with Windows 10 preinstalled on an sdcard.

I'm sure all the computers of today can boot from a USB Drive.  So if you're concerned about interfering with your current installation, you can set it aside while you explore, experiment, and become very familiar with working with your computer in a very safe environment.

Reading and studying all the technical information and steps provided in the installation is good.  If it would ease your mind knowing that during your install, you won't make a mistake and formatted the wrong drive, the experience you gain couldn't hurt.

You would need, of course, two USB drives.  One for your the LiveUSB Ubuntu installer, and one for your target.  The installer could also be a DVD instead of the USB media.

Using the method of disconnecting your internal drive, you can easily explore all the modes of the installer, then when it's time to plug in your internal drive, you can do it with more confidence.

I would recommend that you use the EFI install option.  This way when you decide to plug in your Windows 10 it will be easy to add the boot menu to the Grub, just by running the command sudo update-grub after it's plugged in.  The next time you boot you'll have a choice of which OS to run without having to go into the BIO to make the choice.

I would like to reiterate, that you can also do all this without unplugging your Windows 10 drive.  My answer was addressing the part of your question as to running the Installer damaging your computer, and add that unplugging your drives isn't a problem either.


Ubuntu 16.04 VirtualBox can't autoresize

It works fine for me in with Win 7 host; IIRC it was a bit fiddly at first though. Really choppy UI. Doing the following fixed that for me:

But first: the latest VirtualBox 5.0.20. Perhaps an upgrade is in order? That also then gets you the latest Guest Additions. There is a variety of new stuff in Ubuntu 16.04, so that may make a difference.

Ok, so the issue is likely that guest addition drivers didn't compile correctly.

First, uninstall Guest additions, and purge them from the machine.

sudo sh ./VBoxLinuxAdditions.run uninstall

Second, install dkms. They recommend installing that before the Guest Additions are run.

sudo apt-get install dkms

Finally, install Guest Additions again:

sudo sh ./VBoxLinuxAdditions.run

Note: I've gotten into the habit of moving the VBoxLinuxAdditions.run to home directory, chmodding it to 755, and running it from there. I can't remember why; I think it might have been for a debian thing a while ago. I don't know if it makes any difference, but you might try it that way when you're doing the above steps:
(when you're in the cdrom dir)

cp ./VBoxLinuxAdditions.run ~
cd ~
sudo chmod 744 ./VBoxLinuxAdditions.run

Edit:

Oh, another thing I did: After Guest Additions are installed, you can select its graphics adapter (not enabled by default).

Open Software & Updates, Additional Drivers tab, and under "InnoTek Systemberatung GmbH: BirtualBox Graphics Adapter", select "Using x86 virtualixation solution -X11 guest utilities from virtualbox-guest-x11 (proprietary)". Apply Changes, and reboot.


OK; looks like the xorg.conf.d file was the problem; I dropped into a recovery boot and reverted that file. When it had the line Driver "synaptics" under InputClass the keyboard no longer worked. Reverting this to MatchDriver that was there previously (And I think is in error) meant I've got keyboard again.


Is it possible to move free space from Ubuntu partition to Windows, when Windows is located before Ubuntu?

Yeah GParted should be able to handle that. You'll obviously need to do that from an offline state though (By that I mean from a LiveCD/USB session).

Shrink sda6 (ext4).
Move sda6 (ext4) right.
Shrink sd4 (extended).
Grow sda2 (ntfs).

Gparted should work out most of that for you but that's what I'd expect it to do. Only the move operations will take any significant time.

Oh and you'll need to make sure you've shut Windows down properly or it won't be able to edit the NTFS partition.

It's possible (though a small possibility in this case) that moving the disk partitions will alter their sdax assignment. This shouldn't be an issue these days (with grub and fstab using uuids) but you should be aware that this can be a problem. It's easily fixable from a LiveCD so don't panic if doing this stops Ubuntu from booting.


Guest account - stopping autostart applications

Command line methods:

The autostart applications can be usually can be found in this directories:

~/.config/autostart
/etc/xdg/autostart/

So you can edit included files to prevent autostart applications.

For example I change ~/.config/autostart/print-applet.desktop file to

[Desktop Entry]
Hidden=true

So it be disable at the startup.

Or as another example you can comment out NoDisplay=true line from /etc/xdg/autostart/tracker-store.desktop to disable autostart tracker-store application.

GUI methods:

In this method, type Startup Applications in dash and choose which aplications autostart or not.
The another GUI method is works only on some desktop environments
like xfce;

In this method at the first step run applications that you want to
autostart and then  you can run Session and Startup application so
in the Session tab click on Save Session button, and that
application is autostarts after reboot.

Change guest account settings:

But in your case Startup Applications and the ~/.config/autostart directory may not work because the guest account preferences are reset after reboot.

So this directories is can be helpful, because guest account settings are loaded from these directories:

/etc/xdg/autostart/
/etc/skel
/etc/guest-session

Also these files can be helpful:

/etc/skel/.config/autostart
/etc/guest-session/skel
/etc/guest-session/prefs.sh
/usr/lib/lightdm/guest-session-auto.sh

But if you haven't such files (or directories) you can change the guest session settings by this way

  Using a special user account for setting the guest preferences is the
  most convenient way to customize the guest session feature. Please
  follow these steps:

Add a new user account with the username guest-prefs.

Log in to guest-prefs and change things to what you want your guests encounter at startup.

Open a terminal window and create a symbolic link to the home directory of guest-prefs:

sudo mkdir /etc/guest-session
sudo ln -s /home/guest-prefs /etc/guest-session/skel

  Now, when you launch a guest session, it will have the same
  preferences as you set for guest-prefs.


Sounds like a corrupted image. Try downloading the image again and burning it onto a disc at the slowest possible speed. Also check the MD5 sum of the downloaded image against the image at the site. Maybe that'll help


How to intergate xtreme download manager with flashgot

I had the same problem, and i was not able to solve it using your method, i have found a different method that worked for me :

Firefox > Tools > Flashgot > More options
General tap > Press Add button > XDM2 as name
Executable path : /usr/lib/jvm/java-7-openjdk-amd64/bin/java
Command line :-jar /usr/lib/xdman/xdm.jar [URL]

NOTE : The executable path may differ depending on witch Java version you are using.
Example : the Executable path for sun java 6 is : /usr/lib/jvm/java-6-sun-1.6.0.06/bin/java


You need to install the libusb-1.0-0 development package.
You can install the package using the apt-get package manager:

sudo apt-get install libusb-1.0-0-dev

needed an additional dependency:

# for a additional missing libudev dependent library.
sudo apt-get install libudev-dev


How can I visually find out which programs are running on the current virtual screen in Unity?

By default there's a combination Shift+Alt+Up that will show you all windows from current desktop (unlike Win+w that will show you windows from all desktops).

You can see that (or change that) in CompizConfig manager (Expo plugin).


how to install nvidia GEFORCE 720M driver on ubuntu 12.04 32-bit?

First open terminal and navigate to the directory where your driver is.

Then enter chmod +x name-of-your-driver.run

       enter ./name-of-your-driver.run

And installer will run

NOTE

Please this command chmod +x name-of-your-driver.run run with sudo


How to add Windows 7 to an encrypted Ubuntu installation

You're going to install a Microsoft OS... Any Microsoft OS must be installed on the first primary partition of the hard drive and that partition must be made bootable. (that's what you get from a monopoly: you can dictate what you want and it has been like this since MS-DOS 1.0)

So basically, you've backed yourself into a corner as the first primary partition (sda1) is a Linux partition (ext4 probably, not visible from the output you've provided) and Microsoft will not like that...
To complicate things further, you have no spare partitions and your extended partition (sda2) only contains one partition (sda5) containing all of Ubuntu (system and data but not the boot) which is fully encrypted (which nor Microsoft nor the Ubuntu Live CD like either).

The easiest for you to do is buy an additional hard drive, set that as the primary hard drive in your BIOS and install Windows on there. To switch to Ubuntu, you'll have to go into the BIOS and boot from your secondary hard drive. (Windows cannot be booted from a secondary hard drive)

The more complicated solution is to unencrypt sda5, back up your entire hard drive using something like CloneZilla Disk-to-image, boot Windows from CD, wipe all partitions using the Windows boot loader, create whatever Windows partitions you want and then boot with the Ubuntu Live CD you used for installing your OS a week ago, install it again using the same partitioning scheme you used a week ago (minus the space you allocated to Windows).

You now have a grub2 system allowing you to boot into both OSes.

Only now can you restore the images from your backup into the newly created Linux partitions effectively restoring your work of the entire week...

These new partitions will have different partition numbers though so the sda1 of your backup will have to be restored in sda2 or sda3 or so depending on your new install and sda5 into whatever first partition of your extended partition you now have created...

Now you're finally ready to reboot and boot into your restored Ubuntu partitions from a week ago.  The only thing left now is to re-encrypt your non-boot Ubuntu partition...

There is an even smarter solution that I can see but that is the really complicated solution so drop a comment if you're interested in that one! (No, no additional HD necessary)


This is a simple fix. You just need to navigate to the dspace directory before running the mvn command.

I would assume from the above message it's in /home/becsadspace/dspace.


I made a .deb package with a hack that compels sni-qt:i386 to use images located in /usr/share/pixmaps/skype/ directory for systemtray skype status icons, based on webguruz.ru page.
To install
wget https://www.dropbox.com/s/x91gec5q0uz3hnx/sni-qt_0.2.6-0ubuntu1_i386-modified.deb?dl=0 -O sni-qt_0.2.6-0ubuntu1_i386-modified.deb

sudo dpkg -i sni-qt_0.2.6-0ubuntu1_i386-modified.deb

Then you need to install new icons, for that follow the steps bellow:
wget https://www.dropbox.com/s/wimn53noljv0vbi/skype_systemtray_custom_icons.zip?dl=0 -O skype_systemtray_custom_icons.zip

unzip skype_systemtray_custom_icons.zip

sudo mkdir /usr/share/pixmaps/skype

sudo cp skype/* /usr/share/pixmaps/skype

sudo chmod +r /usr/share/pixmaps/skype/*

The icon set I provide here is based on Faenza-Dark Theme, for change the icons, just replace the images in /usr/share/pixmaps/skype directory.
To remove
sudo dpkg -r sni-qt_0.2.6-0ubuntu1_i386-modified.deb
sudo rm -r /usr/share/pixmaps/skype


What are some of these directories in the Linux kernel src?

I have figured out that the block folder contains source code for block-device drivers, samples is example programming, and tools contains tools for interacting with the kernel.


I couldn't find any official packages either, so I created a PPA. Feel free to use it:

https://launchpad.net/~passy/+archive/vim

apt-add-repository ppa:passy/vim
apt-get update
apt-get upgrade

Reference: How to use PPAs


look for a DLNA or uPNP streaming app. it should recognize the 360. if you are trying to run Ubuntu off a 360, that's an entirely different story.


Why isn't the newly resized virtual disk image(vdi) space showing up and how do I fix it?

You're dealing with disk space on three (and an implied fourth) level of abstraction:

Disk space in the .vdi file -- You've resized this file with VBoxManage, but the space hasn't yet appeared in the next two levels of abstraction. Essentially, what you've done is like installing a larger physical disk in a real computer and copied the contents of the original disk over with dd. You have more (virtual) disk space now, but you can't use it because the data structures used to access the disk have not yet been updated.
Partitions (aka physical volumes, or PVs) in the virtualized disk -- You must either resize your existing PV or create a new one and add it to your volume group (VG). See this question for pointers on this topic.
Logical volumes (filesystems) -- Once you've expanded the PV or created a new one and added it to the VG, you must expand the logical volume (LV) and the filesystem it contains. The question referenced in the previous bullet point describe how to do this.
Disk space in the host system -- This is the fourth/implied level of abstraction, and is actually "above" the preceding ones. Although the VBoxManage command probably resulted in a trivial change to your host system disk space use, once you begin using that space in the virtualized environment, physical disk space use will increase. Assuming you have sufficient real disk space, this shouldn't be a problem, and it doesn't affect what you need to do; I mention it only for completeness.

Olavi Sau's answer seems to be correct, but is presented in the reverse order of what you must actually do, so it could be confusing. (That is, the answer describes filesystem/LV operations before partition/PV operations; but you need to do the partition/PV operations first.) Thus, I thought that presenting a "bird's-eye view" answer would be a helpful supplement.


In 11.10 and before open System Settings from the gear icon in the upper right. Select Keyboard, Shortcuts tab and then Custom Shortcuts on the bottom of the panel. In the bottom of the window you'll see a "+" key, click it. In the Name: field enter what you wish for a label. In the Command: field enter emesene and click the apply button. Select the the new line above with your label and click the word Disabled. New shortcut... will replace the word Disabled. Now enter the key activator and it will replace New shortcut.... "Super+E" will indicate "Mod4+E" and your done. If your keyboard shortcut doesn't work it's because it's already taken by the system. Super+E will work, I tried it.

As of 12.04 you can still create a custom short with the Super key but it won't work. A workable alternative for the example above is Ctrl+Alt+E.


Four monitor setup with two Nvidia graphics cards

Your post is a bit old, but the answer might be useful to others. Since your post, there are even newer NVidia drivers which /kind of/ work for me. Xinerama works, but it's still buggy and I occasionally need to restart X ("service lightdm restart", or "service gdm restart" - depends on distro).

With Xinerama off, you have separate X screens. The mouse can move between them, but that's all. This is normal, and I can't tolerate it myself.

To start an application on the second screen (first screen is ":0.0", second screen is ":0.1"):

$ export DISPLAY=:0.1
$ xterm # or your application.


Login required after resume from black screen

Activates >> Settings >> Privacy >> Screen Lock, Then click on the toggle switch next the text that says "Automatic Screen Lock". Press the button that says Close, and now the item that says "Screen Lock" should have "Off" next to it.


fix ubuntu after inadvertently uninstalling a lot of things (base programs)

Switch to a virtual terminal so you can execute commands by pressing Ctrl + Alt + F2
Become root by running sudo -s
Reinstall the ubuntu-desktop package using apt install ubuntu-desktop --reinstall
If nothing happens and apt says it's already installed, remove the package using apt remove ubuntu-desktop and run the reinstall command (step 3) again.
Once done reboot the system by typing reboot


How to fix windows or dell recovery on vostro after installing Ubuntu

You do not have Windows installed on your computer. You removed it when installed Ubuntu intentionally or not.

But you still have have a Microsoft recovery partition.

You can try to go into UEFI settings and try to find there a recovery option. If that does not work, you will have to re-install Windows.


Xubuntu 12.04: wrong time; change system language

To set the language for menu's and windows, perform the following steps:

Goto XFCE->Settings Manager-> Language Support
It might ask to install a few things, allow this.
Press install / remove languages.
Check the language which you want to use
Drag your language to the top of the list and press Apply System Wide.
Done

To set the time correctly, perform the following steps:

Goto XFCE->Settings Manager-> Time and Date
Press unlock at the bottom of the window
Under configuration choose "Keep Synchronized with Internet servers"
Allow it to install NTP support if it is not already installed
Done


You can change default Octave environment by creating .octaverc file in your home directory and putting your commands there.

create a .octaverc file in your home directory

$ touch ~/.octaverc
put your desired command in that file.

cd ("~/Octave")

or, you can use this one-line command to do the same as above.

$ echo "cd (\"~/Octave\")" > ~/.octaverc


There's two ways of doing this; if you just want a wav file, see the first example, and for an mp3 conversion see the second.

1) Feed espeak your text file using the -f option, then use the --stdout option and redirect its data stream to file to create a valid wav file that plays correctly in any audio player.

espeak -f mytext --stdout > myaudio

Result checked with the file command (file myaudio):

myaudio: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 22050 Hz

2) If you want an mp3 conversion you will have to use a program to convert your file (or simply save it in audacity and export it as mp3). I have used ffmpeg (the git version), but you can use any program and just change the options:

espeak -f myfile --stdout | ffmpeg -i - -ar 44100 -ac 2 -ab 192k -f mp3 final.mp3

Result checked with file final.mp3:

final.mp3: Audio file with ID3 version 2.4.0, contains: MPEG ADTS, layer III, v1, 192 kbps, 44.1 kHz, Stereo


Trouble connecting to my Home SSH connection

Highlighting @steeldriver's answer as I think it was the right one.

Apparently the issue is my routers lack of support for NAT Loopback:
https://en.wikipedia.org/wiki/Network_address_translation#NAT_loopback

This seems to be the case due to the fact that I CAN connect to my computer from other computers in the network if they use the internal LAN IP (e.g. 192.168.0.2) as well as externally, if they use my IPv6 IP.

So the solution is:

1) When connecting from the same network, use the LAN IP (or localhost, if its the same device)
2) When connecting from outside, use the IPv6 address (if your ISP gives you one) or the IPv4 one (provided you set up the port forwarding rules).

Thanks @steeldriver!


I need to reinstall Ubuntu 14.04 after erasing a lot of files and ubuntu won't start anymore

If your photos are in Another partition it is easy to recover via Live USB :) in case of reinstalling Ubuntu. Make sure that you're formatting a correct partition.


Calling script on reboot only after MongoDB has started

In the end I used the upstart /etc/init/mongodb.conf file and it worked well.


xmodmap stopped working in the latest Google Chrome update

I do similar key remappings and have had the same problem. I'm not sure that xmodmap remappings ever really worked properly in Chrome. For example, in Google Sheets, pressing the modifier key (caps lock in my case) would clear the current cell.
I've solved the problem by (a) buying a new USB keyboard that supports QMK firmware and (b) discovering that my System76 laptop makes customizing the keyboard firmware trivial.
I realise that both those options likely involve new hardware and significant expense, so aren't ideal.
I think the fact that Chrome is able to bypass the remapped keys indicates that the remapping is being done at too high a level. Possibly remapping using evdev might work better, but I haven't tried that. Good luck and sorry I don't have a more general solution.


How to install scipy and numpy on Ubuntu 16.04?

You can also use pip (the alternative Python package installer) to install numpy and scipy for the whole system:

sudo apt-get install python-pip
sudo pip install numpy scipy

This could install it regardless of dependency errors in the Ubuntu package manager.


Cannot Read Layers in Unity3d Camera Culling Mask

I have the same problem on Ubuntu and no solution for the check-mark-bug.

However, I'll try to explain the strange integer that you get from the property. It is a bit field, where each layer is assigned a value:

Layer name       | Layer Number | Mask value
Builtin Layer 0  |            0 | 1 << 0 =     1
Builtin Layer 1  |            1 | 1 << 1 =     2
Builtin Layer 2  |            2 | 1 << 2 =     4
Builtin Layer 3  |            3 | 1 << 3 =     8
Builtin Layer 4  |            4 | 1 << 4 =    16
Builtin Layer 5  |            5 | 1 << 5 =    32
Builtin Layer 6  |            6 | 1 << 6 =    64
Builtin Layer 7  |            7 | 1 << 7 =   128
User Layer 1 / 8 |            8 | 1 << 8 =   256
User Layer 2 / 9 |            9 | 1 << 9 =   512
...

(It seems that User Layer names may start at 1 or at 8 depending on the Unity version)

You can combine these values, for example Builtin Layer 5and User Layer 9 would result in 1 << 5 | 1 << 9 = 2^5 | 2^9 = 32 | 512 = 32 + 512 = 544.

Read more about Layer masks in the documentation.


Can't boot --> PXE-M0F: Exiting Intel PXE ROM

Oh man I get it working.

For the record, if anyone has the same problem:

If you get this message (and your BIOS settings are OK):

Switch off your laptop for more than 30 seconds.
Start, and wait until you get to the error screen
press CTRL + ALT + DEL
Wait as it reboots, until you the the same error screen again
Press the power button and wait until it switches off.
Wait no longer than 5 seconds, and then press the power button
It boots to grub selection ! In grub, select "recovery" (because normal startup won't work)
Select "regenerate grub" or whatever it is called.
afterwards, select boot

Edit:
Diagnosis: HD defect


You are using the local provider, which is only suitable for development and testing scenarios. For one, as you discovered, the addresses that these containers get are local only.

If you have only one IPv4 address and that's what you want to use, you will have to play with some iptables NAT rules. You could perhaps get away with https://github.com/cmars/juju-nat but I haven't personally used that.

When using juju, you have to pick a provider. The choices are basically cloud and non-cloud. Among the non-cloud ones:

manual: you install the OS, an ssh server, and tell juju to use that machine. It can be a real machine, or a container, KVM instance, etc.
MAAS: more complex but more powerful, with MAAS you can use real machines to deploy juju services and manage DHCP and DNS.

You can probably give the manual provider a try to get your feet wet, but it's quite a bit, er, manual, as the name implies. But could be what you need if you setup the IP and NAT rules appropriately. It loses its appeal once you start handling more dynamic services, because you have to keep provisioning new machines manually for juju to use.


How to control Graphical programs from terminal?

I'm pretty sure that ldtp can help you to automate Inkscape GUI. First open a terminal and install the python bindings:

sudo apt-get install python-ldtp

Then start the python interpreter:

$ python
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from ldtp import *
>>> launchapp('inkscape')
25362
>>> GTK Accessibility Module initialized
>>> selectmenuitem('*Inkscape', 'mnuExtensions')

or create a dedicated script with the following snippet:

#!/usr/bin/env python2

from ldtp import *
import time

launchapp('inkscape')
waittillguiexist('*-Inkscape')
selectmenuitem('*-Inkscape', 'mnuExtensions')
time.sleep(2)
selectmenuitem('*-Inkscape', 'mnuEdit')
time.sleep(2)
selectmenuitem('*-Inkscape', 'mnuFile')
time.sleep(2)
selectmenuitem('*-Inkscape', 'mnuQuit')
waittillguinotexist('*-Inkscape')

Knowing all the GUI component names is a bit hard since ldtpeditor is deprecated (See the freedesktop page and this thread on the freedesktop-ldtp-dev mailing list).

The best you can do to identify the control to use to automate the application is to rely on getobjectlist)('<window name>').

Example (to set the Restack Horizontal point and the live preview):

$ python
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from ldtp import *
>>> launchapp('inkscape')
11413
>>> GTK Accessibility Module initialized

>>> selectmenuitem('*Inkscape', 'Restack...')
1
>>> getobjectlist('Restack')
['dlgRestack', 'flr8', 'flr9', 'flr4', 'flr5', 'lblHorizontalPoint', 'flr7', 'flr0',
'flr1', 'flr2', 'flr3', 'lblVerticalPoint', 'mnuBottomtoTop(90)', 'mnuTop', 'spr1',
'mnu8', 'flr11', 'mnu0', 'cboLefttoRight(0)', 'mnuRight', 'mnuRadialInward',
'mnuMiddle1', 'mnu12', 'lblLivepreview', 'cboTop', 'flr6', 'mnuLefttoRight(0)',
'btnApply', 'lblAngle', 'chk0', 'mnuRighttoLeft(180)', 'mnuRadialOutward', 'sbtn0',
'mnuArbitraryAngle', 'lblRestackDirection', 'mnuLeft', 'btnClose', 'mnuMiddle',
'mnuBottom', 'flr12', 'flr10', 'spr0', 'mnuToptoBottom(270)', 'cboMiddle']
>>> click('dlgRestack', 'mnuMiddle1')
1
>>> click('dlgRestack', 'mnuMiddle')
1
>>> click('dlgRestack', 'chk0')
1
>>> click('dlgRestack', 'btnApply')
1
>>> click('dlgRestack', 'chk0')
1
>>> click('dlgRestack', 'btnApply')


Logitech H600 wirelss headphones Ubuntu 20

In Linux Mint (Ubuntu based) you can use this device without dongle if your motherboard supports Bluetooth.
To connect: press dongle-connect button and volume-up same time for about 10-20 seconds.
Light will flashing very fast and then connection process will start.
Don't forget to use 'high fidelity' sound in sound properties (standard sound is awful).
Microphone didn't work though, but maybe is possible...


Why do some processes use swap and others don't?

I think your "problem" is with VirtualBox.

According to the VirtualBox Manual

  Base memory

  This sets the amount of RAM that is allocated and given to the VM when it is running. The specified amount of memory will be requested from the host operating system, so it must be available or made available as free memory on the host when attempting to start the VM and will not be available to the host while the VM is running.

I found similar comments on the VirtualBox forums (although they were not as helpful).

See: https://forums.virtualbox.org/viewtopic.php?f=2&t=50179

So I am guessing the virtualbox kernel module allocates free memory to the guest but is not polite enough to inform the host. Thus when you look at free RAM (with tools such as free -m) you appear to have sufficient memory BUT ... because the kernel module does not inform the host OS, the host can not appropriately manage swap, and your applications then crash doe to a lack of memory (free or swap).

I would suggest you file a bug report, but, I am guessing it would be closed as "won't fix"

From the thread on the VirtualBox forums linked in Tim's comment:

  To answer your question as to if VBox can or can not use swap, no, nothing but the operating system can do that. Swap is not memory that is actually usable.


Why does Chrome video performance substantially degrade after waking from suspend in 10.10?

Upgrading to the new Chrome 8 beta fixed my problem with HTML5 video completely, since it added GPU acceleration. Flash is still as slugish as ever, but it runs well enough in Firefox, which isn't a problem for me since I've been using Firefox as my "crap, I need Flash for this" browser for a while anyway (I've had Flash disabled in Chrome 99% of the time for a while).

This isn't really an answer so much as an admission of defeat, but pending an actual solution, I think it's probably the most sensible advice for most people.


How to find and start/stop or hide/display indicators?

This is how to hide/show some of them:

Sound

gsettings set com.canonical.indicator.sound visible false
gsettings set com.canonical.indicator.sound visible true

or

dconf write /com/canonical/indicator/sound/visible false
dconf write /com/canonical/indicator/sound/visible true

Keyboard Layout

gsettings set com.canonical.indicator.keyboard visible false
gsettings set com.canonical.indicator.keyboard visible true

or

dconf write /com/canonical/indicator/keyboard/visible false
dconf write /com/canonical/indicator/keyboard/visible true

Time

gsettings set com.canonical.indicator.datetime show-clock false
gsettings set com.canonical.indicator.datetime show-clock true

or

dconf write /com/canonical/indicator/datetime/show-clock false
dconf write /com/canonical/indicator/datetime/show-clock true

Bluetooth

gsettings set com.canonical.indicator.bluetooth visible false
gsettings set com.canonical.indicator.bluetooth visible true

or

dconf write /com/canonical/indicator/bluetooth/visible false
dconf write /com/canonical/indicator/bluetooth/visible true

Power

gsettings set com.canonical.indicator.power icon-policy 'never'
gsettings set com.canonical.indicator.power icon-policy 'present'

or

dconf write /com/canonical/indicator/power/icon-policy 'never'
dconf write /com/canonical/indicator/power/icon-policy 'present'


In Linux (and Unix in general), there is a SuperUser named root. The Windows equivalent of root is the Administrators group. The SuperUser can do anything and everything, and thus doing daily work as the SuperUser can be dangerous. You could type a command incorrectly and destroy the system. Ideally, you run as a user that has only the privileges needed for the task at hand. In some cases, this is necessarily root, but most of the time it is a regular user.

By default, the root account password is locked in Ubuntu. This means that you cannot login as root directly or use the su command to become the root user. However, since the root account physically exists it is still possible to run programs with root-level privileges. This is where sudo comes in - it allows authorized users (normally "Administrative" users) to run certain programs as root without having to know the root password.

This means that in the terminal you should use sudo for commands that require root privileges; simply prepend sudo to all the commands you need to run as root. For more extensive usage examples, please see below. Similarly, when you run GUI programs that require root privileges (e.g. the network configuration applet), use graphical sudo (gksudo) and you will also be prompted for a password. Just remember, when sudo asks for a password, it needs YOUR USER password, and not the root account password.

Please refer to this link for a tutorial about sudo: https://www.youtube.com/watch?v=jPDrKrDbzys

Source: https://help.ubuntu.com/community/RootSudo


You don't really need to install it a second time.  Just make a copy of the original installation directory.  In fact, you can make as many copies as you like.  When it asks you whether you moved or copied it, say copied.  That way it will give you a different network address.


Problem logging in with an old home account

Finally I got the problem. It was related with user home directory permissions, it was set to "drwx------" and changing it to "drwxr-xr-x" works!!.


Which is exact method to install from source?

Try building with dpkg-buildpackage -uc -us -b to get binaries, dpkg-buildpackage -uc -us -S for a source package without using sudo.


I've worked it out.

Go here to try and set up hibernate for your device.

Once it is set up and if it works for you, at least on Linux Mint, you can go to Power Management and find a When the lid is closed option under the Power tab. You can now change what happens to your device when the lid closes while on A/C power and off.


There is no adobe or reader package.

The package is called acroread. But it is obsolete and not supported any more.


Thing is, when the OS hangs, you reset it manually.
In this, some parts of hard disk go corrupt. so OS will do scan disk or check disk at next start.
You may be seeing the dots running for long time, this is because it is doing scan disk at the background.
When on that screen, click alt + tab. It shows that is going on in the background.

Alternate solution can be, to reinstall the OS. When reinstalling, give same drives for / and swap, but de-select the format option. It sort of repairs the installation.

It should work.


How to integrate Sympa (mail list mgr) with Apache on Ubuntu 12.04 or later?

Addendum: Further in my installation trials I realize that this answer has been incomplete, so I'll edit it. The solution below solves the permission problems with the files in /static-sympa. But you'll probably run in further problems down the line, because the config snippet in /etc/apache2/conf.d/sympa is really incomplete. You can replace the whole contents of this file by the version shown at Debian Wiki. There you also find instructions how to create the necessary wrapper at /var/www/sympa/wwsympa.fcgi. With this, Sympa itself and the web interface WWSympa should be working.

I realize this question is a bit older, but I just run into a similar problem. Maybe the solution I found can help others.

The Sympa package in Ubuntu seems to be a bit bungled, to say the least. One of the problems is that it tells Apache where to find its stuff, but doesn't give it permission to go there ;)

/static-sympa is an Alias that is defined in /etc/apache2/conf.d/sympa, along with the ScriptAlias for /wws. The actual location for the files that are aliase'd to static-sympa is /var/lib/sympa/static_content. That, of course, is miles away from any DocumentRoot Apache knows about. And Apache is wary about integrating stuff from "outside", unless you explicitely tell it it's ok. So the default is, "you no touching anything there", i. e. "403 - Forbidden".

To give Apache the needed permission, you can just extend the configuration snippet, /etc/apache2/conf.d/sympa. Below the existing Alias and ScriptAlias definition, you can do something along the lines of

# For anything below the (URL) location /static-sympa
<Location /static-sympa>
    Order allow,deny # order of permissions: First handle 'allows', then 'denys'
    Allow from All # allow access to anybody
</Location>


How to install Ubuntu without an access to a CD drive or USB ports

If the card slot is connected to that laptop via standard means (usb rail), then I'd say that it probably is possible with a properly (via Unetbootin) flashed card.

It is also possible (on some machines) to install os over the network. Here is how.

If it is not possible on your's, then the only way to do this I can think of, is by getting the hard drive out of the chassis, connecting it to something else, and installing things the natural way.


Why does installing Grub2 give an "ISO9660: filesystem destruction..." warning?

It appears that you somehow got an iso9660 filesystem header written into your hard disk's boot track.  Since your first partition starts at sector 2048, and you are using the conventional msdos partition table, you can eliminate it by writing zeros to sectors 1-2047 with the following command:

sudo dd if=/dev/zero of=/dev/sda bs=512 seek=1 count=2047


If you're using the system-wide crontab, you need to specify the user to be used for executing the command.

If this still doesn't solve the problem, remember that crontab file needs to end with an empty line.


Unable to create .zip files or modify .xpi with file roller in Oneiric

It's possible to do this from the command line successfully with p7zip (which you seem to have installed).

7z a myplugin.zip * ; mv myplugin.zip myplugin.xpi

I think the problem is linked to p7zip because it autodetects the type of archive to use from the filename suffix.


How to export PDFs files with subfolders from Mendeley?

Mendeley app doesn't have this capability, but there is a python tool to do so.

Install Anaconda for python 2 https://www.continuum.io/downloads

Don't forget to add export PATH="/home/vitor/anaconda2/bin:$PATH" to your .bashrc or terminal.

Install PyPDF2 https://pypi.python.org/pypi/PyPDF2/1.26.0

python setup.py install
Download Menotexport https://github.com/Xunius/Menotexport
Install Menotexport

conda create -n menotexport python=2.7
source activate menotexport
conda install -c guangzhi menotexport
python menotexport-gui.py
Choose ~/.local/share/data/Mendeley\ Ltd./Mendeley\ Desktop/your_email@www.mendeley.com.sqlite as Mendeley Data file

More information at https://github.com/Xunius/Menotexport


In your case you have indeed version 1.0.0 of the library.

In general when you want to develop using a library, you have to get the corresponding -dev package which contains the header files. In this case libcv-dev. It will also install the library itself, which may have different version numbers depending on the soname - no need to install it separately.

In this case there is also a opencv-doc package, which contains some example programs, and which is worth installing.

If you want to build the library itself from source, you can run sudo apt-get build-dep opencv to get all the required libraries and header files to build opencv.

Building indeed uses cmake. It is a program which generates makefiles.


The devices on my motherboard stopped working under 16.04

This is sort of sorted.  I went back to kernel 93 and it is all OK again.  I'll post what I did here in case any fellow know-nothings read this
If a device shows as unclaimed under lshw, then it means there is no driver found for it
I found the name of the driver module for my network device after a bit of googling, it was atl1c
I tried to load atl1c using   sudo modprobe atl1c
which returned message
     not found in directory /lib/modules/4.4.0-96-generic
modprobe searches for modules in /lib/modules/vvvv-generic  where vvvv is the kernel version in use.
You can display the current kernel version using uname -a
I found versions of atl1c in
/lib/modules/4.4.0-93-generic/kernel/drivers/net/ethernet/atheros/atl1c/atl1c.ko
/lib/modules/4.4.0-92-generic/kernel/drivers/net/ethernet/atheros/atl1c/atl1c.ko
but none in 96.  Actually /lib/modules/4.4.0-96-generic had way less modules in it compared to 92 and 93
So I think that ubuntu tried to auto-upgrade from kernel 93 to 96 at some point and it failed because /boot was full.  But kernel 96 became the default for reboot, so the next reboot caused a problem.
I would like to know how to rerun the 96 upgrade at some point, but that is probably better done as a separate question


In my case the problem was related to liblzma.so.5 library. Here is how to fix it:

Locate liblzma.so.5

$ find /lib -name "liblzma.so.5
/lib/x86_64-linux-gnu/liblzma.so.5

$ find /usr -name "liblzma.so.5"
/usr/local/lib/liblzma.so.5

I discovered that I had 2 instances of the same library.
Remove the one in /usr/local/lib and any symbolic link

sudo rm /usr/local/lib/liblzma.so
sudo rm /usr/local/lib/liblzma.so.5
sudo rm /usr/local/lib/liblzma.so.5.0.3

sudo ldconfig

Now ./configure did not complain about osgEarth while installing Omnet++


Go inside the /etc/apt/sources.list.d and look for moka-ubuntu-daily-xenial.list and delete it if more than one entry is present.
Perform the following step for noobslab-ubuntu-apps-dependencies-xenial.list as well.
Where the lines are starting with E, it means error. please check whether the URL is correct or not.
For all the lines with W, those are warning. According to the logs we can conclude that the URL which you have put are not reachable.


Ubuntu 12.04 eat a lot of internet bandwidth

There isn't anything special in Ubuntu that eats bandwidth, at least not to that should cause the "whole house network is down".

Let's assume "whole house network is down" actually means "all the other computers can't get on the internet". This can be caused by a lot of things, and debugging is necessary. First I would confirm that it is indeed your computer that eats all the bandwidth. You could do this with nload:

Open a terminal(Ctrl-Alt-T or by menu) and install nload:

sudo apt-get install nload

Open nload:

nload

You could cycle through you interfaces(wifi, ethernet, etc) with arrow keys.

If it indeed is your computer eating bandwidth, you should check if it's inbound or outbound. Inbound could mean that an update is downloading, but a lot of outbound traffic is usually bad if your not uploading anything.


First, generate all random numbers using $RANDOM in a loop and redirect them to the individual files, like that:

for i in {1..100}; do echo $RANDOM > $RANDOM.txt; done;

(There's a slight chance of duplicate numbers, so be aware of that.)

Next, read and sort these files, and tail just that last one. The full script will be something like that:

#!/bin/bash

for i in {1..100}; do
    echo $RANDOM > ${i}.sample;
done;

cat *.sample | sort | tail -n1;


The implementation of systemctl help is basically "if it's a man uri show it, otherwise say you can't show it":

        STRV_FOREACH(p, i->documentation)
                if (startswith(*p, "man:"))
                        show_man_page(*p + 4, false);
                else
                        log_info("Can't show: %s", *p);

(from
https://github.com/systemd/systemd/blob/master/src/systemctl/systemctl.c#L4643
)


How to repair GRUB2 in a system with broken recovery mode?

I've solve it this is the way how todo(same boot partition):

Boot into the Ubuntu 12.04 Live CD and click "Try Ubuntu without installing":

After the desktop is loaded, we need to mount the root partition so that we grant the live cd user read/write permissions on your system files and folders. Let's first identify the partition where Ubuntu is installed with this command:

sudo fdisk -l

Note: The Terminal can be started by pressing   CTRL+ALT+T.

The Ubuntu partition we will work on will be labeled with the word "Linux" as shown in the screenshot given below:

Run now this sequence of commands to mount the root partition:

sudo mkdir -p /media/ubuntu

sudo mount /dev/sda1 /media/ubuntu

Then you need to mount these system folders to use them on your current desktop environment:

sudo mount --bind /dev /media/ubuntu/dev

sudo mount --bind /proc /media/ubuntu/proc

sudo mount --bind /sys /media/ubuntu/sys

Now chroot into your hard drive with this command:

sudo chroot /media/ubuntu

You have now read/write permissions on your root partition. To install GRUB2, you need to use one of these two commands:

grub-install /dev/sda

or

grub-install --root-directory=/media/ubuntu /dev/sda

Note: the "sudo" is not required since you are logged in as root now. Also keep /dev/sda as is.

If the installation is successful, you will get these outputs:

root@ubuntu:/# grub-install /dev/sda

  Installation finished. No error reported.

Update GRUB2 with this command:

update-grub

Now Remove the Ubuntu installation CD and reboot your system to see if the GRUB2 boot menu is restored or not.


unity-panel apps running in the background

Run this in a Terminal window (Ctrl+Alt+T):

gsettings set com.canonical.Unity.Panel systray-whitelist "['all']"


Ubuntu 13.10 doesnt detect my nvidia 635m on my laptop

You might look up bumblebee or optimus for more detail, but you need to supply a Bus ID for the nvidia hardware in a configuration file.


image viewer: mouse wheel to move back and forward

I dumped eog, instead using gthumb .  The mousewheel has, by default, the sensible behaviour I was trying to get eog/shotwell to use, and as an added bonus it is seemingly much faster at rendering images too.


You can do one of these, or both:

Add this PPA:

sudo add-apt-repository ppa:ubuntu-x-swat/x-updates && sudo apt-get update && sudo apt-get upgrade

Or Downgrade Compiz to it's previous version as explained here, by doing this Unity won't be available anymore though.

sudo apt-get purge compiz compiz-plugins-extra compiz-plugins-main && sudo apt-get purge compizconfig-settings-manager

sudo add-apt-repository ppa:guido-iodice/compiz-0.8.6-natty
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install compiz compiz-core compiz-fusion-plugins-main   compiz-fusion-plugins-extra compiz-fusion-plugins-unsupported compiz-gnome compiz-plugins compizconfig-backend-gconf compizconfig-settings-manager  libcompizconfig0 libdecoration0 python-compizconfig


Not getting libglib2.0-dev (updated libraries) even after upgrading from Ubuntu 14.04 to 16.06

try runnning

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libglib2.0-0

this worked for me.


Script: Recursively convert wma files to MP3, then remove WMA files

Elsewhere you're using "$f" without basename, so that path to the file is given. It's only in the lame command that you're using basename. With basename, the directory components will be lost. The output file would be created in which ever directory the command ran in.

If you just want to replace a .wma extension with .mp3, use "${f%.wma}.mp3". That should retain the path.


To run the program, try typing:

sudo sh MPLABX.run

the difference between ./ and sh is explained here.


How to transfer files from remote ubuntu server to remote ubuntu server?

Provided you have ssh access to both machines, try rsync.

scp will probably only work when one of the two machines is local. You could ssh into Server1 and

scp -r /your/source/* username@server2:/your/destination/

(or vice versa).


Procedure:

First: You need to update the system.(You already did)

Open a terminal,Press Ctrl+Alt+T

Run it:

sudo -i
apt-get update
apt-get dist-upgrade

Reboot your system to finish installing updates, and to upgrade to new available version:

Open a terminal,Press Ctrl+Alt+T

Run it:

sudo -i
update-manager -d

Software Updater will show up and search for the new release, after a few seconds, you will see a screen like below that saying:

However, Ubuntu 14.10 is available now (you have 14.04).

Press the button Upgrade to start upgrading to Ubuntu 14.10.

The Software Updater will ask you to confirm still you want to upgrade, press Start Upgrade to begin installing Ubuntu 14.10.

Now, the Software Updater will prepare to start setting up new software channels, and after a few minutes, the software updater will notify you the details the number of packages are going to be removed, and number of packages are going to be installed, press Start upgrade to continue.

Ended the dist-upgrade, reboot your system and:

Open a terminal,Press Ctrl+Alt+T

Run it:

sudo -i
dpkg --configure -a
apt-get -f install
apt-get update
apt-get dist-upgrade
apt-get autoremove
apt-get clean


The simplest solution probably is to install Playonlinux (https://www.playonlinux.com/en/)

Playonlinux installs application in it's own virtual drive where you can set which version of wine you want to use for that application (and easily change it if needed).

How to change wine version in playonlinux: http://www.playonlinux.com/en/topic-11075-Change_wine_version.html


If you modified the NTFS partitions because your Ubuntu install was running out of space, then note that this would have had no beneficial effect. Since Wubi uses a fixed virtual disk. Instead refer to https://help.ubuntu.com/community/ResizeWubiDisk or https://help.ubuntu.com/community/ResizeandDuplicateWubiDisk

It seems that in modifying your NTFS partitions, it generated new UUIDS. As you have an entry in your /etc/fstab that tries to mount /host on the partition with UUID 7802EDF027EA234. And your grub.cfg refers to that same partition.

So that's causing the error because there is no such partition. It would be the same error if you had copied the Wubi install from another computer.

But try this. When you see the grub menu (if it doesn't show, hold down Shift to make it appear), then press E to edit the entry and change it to look like this:

menuentry 'Ubuntu, with Linux 3.5.0-25-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.5.0-25-generic-advanced-d9f4b9a9-784c-4bf7-b1ac-e7f43a731ef7' {
    gfxmode $linux_gfx_mode
    insmod gzio
    insmod ntfs
    set root='hd0,msdos1'
    loopback loop0 /ubuntu/disks/root.disk
    set root=(loop0)
    echo    'Loading Linux 3.5.0-25-generic ...'
    linux   /boot/vmlinuz-3.5.0-25-generic root=/dev/sda1 loop=/ubuntu/disks/root.disk ro   quiet splash $vt_handoff
    echo    'Loading initial ramdisk ...'
    initrd  /boot/initrd.img-3.5.0-25-generic

So, in summary, you deleted a bunch of lines and changed the line starting linux... to refer to the root=/dev/sda1. Now press Ctrl+X to boot.

After booting, drop to a terminal Ctrl+Alt+Tand run sudo update-grub.

Also, for a Wubi install it's completely unnecessary to mount /host as it's done automatically for you at boot time. So delete that line from the /etc/fstab.


Unity 3D, Compiz effects and Intel Sandybridge Mobile Graphics

I'm having a similar problem with HP Pavilion dv7, 8GB RAM, AMD Radeon HD 6700M Series.

While I haven't found a solution, here's what I've learned:

Don't try install the proprietary drivers. You get errors trying to do it, and various screen errors happen, such as blank screens.
You may have power consumption issues with the Radeon card enabled
The integrated Intel display card is fine for 2D graphics.
Many others recommend only using 2D if the video card is ATI.
Many others are experiencing similar issues with laptops that have switchable
graphics

I hope somebody comes out with a good fix for the laptop video driver issues, or at least makes it very clear in the install process "don't try to get the 3D working with your HW configuration" and remove the indicator to install the proprietary ATI drivers if switchable graphics is enabled.


How do I fix my touchpad on my Acer 720 Chromebook

We're just going to skip the semantics and assume you're using the 32 bit version of Ubuntu 14.04, as that's the version most new users download. If you're not using the 32 bit version of Ubuntu 14.04, this may cause a rip in the space-time continuum. Proceed with caution.

You'll have to use a Linux kernel that has compatibility with your touchpad. There are some custom kernels out there that do the trick, but they tend to be less stable than the mainline, official kernels. Starting in version 3.17, the official Linux kernel added basic support for Chromebooks (including the touchpad and wake-from-sleep). However, Ubuntu 14.10 is the only current version of Ubuntu that's built on top of kernel 3.17. Furthermore, the support in kernel 3.17 is only very basic, which means that your touchpad will likely work, but only sporadically. Never fear, though. There are fixes for these issues too.

Start out by hooking up a wireless mouse (and keyboard, if necessary) so you can install Ubuntu on your Chromebook. After that, go ahead and install Ubuntu like you normally would.

Next, install all the updates available. The updater should pop up after a few minutes of using Ubuntu (after the installation). Enter your password and reboot if it asks you to.

After that, install version 3.17 of the Linux kernel. To do this, open up a terminal window. If you don't know where to find the terminal, just click on the Ubuntu logo in the top left of your screen and type "Terminal" in the search box. Once you have a terminal window open, copy and paste these exact commands in the terminal window, one by one. Enter your password if it asks you to.

cd /tmp/

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.17-utopic/linux-headers-3.17.0-031700-generic_3.17.0-031700.201410060605_i386.deb

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.17-utopic/linux-headers-3.17.0-031700_3.17.0-031700.201410060605_all.deb

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.17-utopic/linux-image-3.17.0-031700-generic_3.17.0-031700.201410060605_i386.deb

sudo dpkg -i linux-headers-3.17.0-*.deb linux-image-3.17.0-*.deb

Then you'll need to restart your Chromebook. Once you reboot, you should be able to use your touchpad, and put your Chromebook in sleep mode (close the lid) without completely shutting it down. Your touchpad may not be as sensitive as you want it to be, and you also may not like the way the touchpad right-clicks (by tapping the bottom-right-side of the touchpad). If that's the case, like I said previously, there is a fix.

To apply said fix, first you need to get back into your terminal (if you aren't still there) and copy and paste the following command exactly as it's stated. Enter your password when prompted.

sudo gedit /usr/share/X11/xorg.conf.d/50-synaptics.conf

This will open a text editor, which we will use to edit the script that defines how your system interacts with your touchpad. To change the sensitivity, and remove the annoying right-click area at the bottom of your touchpad, delete everything in the file and copy-and-paste the text below into the file exactly as it's shown. After doing so, make a backup of the file somewhere else on your computer, so that if your computer deletes the file, you will be able to easily recover it.

# Example xorg.conf.d snippet that assigns the touchpad driver
# to all touchpads. See xorg.conf.d(5) for more information on
# InputClass.
# DO NOT EDIT THIS FILE, your distribution will likely overwrite
# it when updating. Copy (and rename) this file into
# /etc/X11/xorg.conf.d first.
# Additional options may be added in the form of
#   Option "OptionName" "value"
#
Section "InputClass"
    Identifier "touchpad catchall"
    Driver "synaptics"
    MatchIsTouchpad "on"
    Option "FingerHigh" "5"
    Option "FingerLow" "5"
# This option is recommend on all Linux systems using evdev, but cannot be
# enabled by default. See the following link for details:
# http://who-t.blogspot.com/2010/11/how-to-ignore-configuration-errors.html
  MatchDevicePath "/dev/input/event*"
EndSection

Section "InputClass"
    Identifier "touchpad ignore duplicates"
    MatchIsTouchpad "on"
    MatchOS "Linux"
    MatchDevicePath "/dev/input/mouse*"
    Option "Ignore" "on"
EndSection

# This option enables the bottom right corner to be a right button on
# non-synaptics clickpads.
# This option is only interpreted by clickpads.
Section "InputClass"
    Identifier "Default clickpad buttons"
    MatchDriver "synaptics"
    Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"
#       To disable the bottom edge area so the buttons only work as buttons,
#       not for movement, set the AreaBottomEdge
#       Option "AreaBottomEdge" "82%"
EndSection

# This option disables software buttons on Apple touchpads.
# This option is only interpreted by clickpads.
Section "InputClass"
    Identifier "Disable clickpad buttons on Apple touchpads"
    MatchProduct "Apple|bcm5974"
    MatchDriver "synaptics"
    Option "SoftButtonAreas" "0 0 0 0 0 0 0 0"
EndSection

# This option disables software buttons on C720 Chromebook touchpads.
# This option is only interpreted by clickpads.
Section "InputClass"
    Identifier "Disable clickpad buttons on Apple touchpads"
    MatchProduct "Cypress|cyapa"
    MatchDriver "synaptics"
    Option "SoftButtonAreas" "0 0 0 0 0 0 0 0"
EndSection

Now just reboot, and you should be all set! Your touchpad should now work just like it did in Chrome OS!

As for your touch screen, I have not had any experience in that area (my Chromebook is just a plain, old C720 running Ubuntu 14.04) so someone else will have to help you with that, unfortunately. Best of luck.


Please open the terminal with Ctrl+Alt+T, and then type/paste:
To remove the packages: sudo apt-get purge yavol scope-youtube
To remove that PPA: sudo apt-add-repository --remove ppa:atareao/lenses
Finally, update so that all traces of the PPA are removed: sudo apt-get update

Close terminal, the end. :)


PDF viewer that can be controlled programmatically (via dbus, pipe, etc)?

Since you mention presentation slides, what about using OpenOffice or LibreOffice Impress? You can add Python scripting bindings to LibreOffice (in Ubuntu install the libreoffice-script-provider-python package) HOWEVER I don't know what LibreOffice can provide for calling it from "outside" processes. Presumably this might be even more "brittle," depending on how it's implemented. The other scripting languages in LibreOffice (or OpenOffice) might be better supported, too -- I mentioned python just because it's there.

If you want to display existing .pdf files, you can import them into Impress (maybe via Draw).


It could be done like this:

Remove the link:

sudo update-alternatives --remove "java" "/usr/lib/jvm/jdk[version]/bin/java"
sudo update-alternatives --remove "javac" "/usr/lib/jvm/jdk[version]/bin/javac"
sudo update-alternatives --remove "javaws" "/usr/lib/jvm/jdk[version]/bin/javaws"

Then, remove the package in the /usr/lib/jvm:

sudo rm -r /usr/lib/jvm/jdk[version]

Note :

Change [version] with any version number that's contained in jdk
folder's name, example: jdk[version] = jdk1.7.0_13.
If you are new  to Linux, you should probably get familiar with the manual page. Lot of good stuff from there. Just go to the terminal and type
man update-alternatives.


installing android tools adb - keep getting error

There only can be one.

dpkg: error processing archive /var/cache/apt/archives/android-tools-adb_4.2.2+git20130218-3ubuntu23_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/adb', which is also in package android-sdk 23.0.2-ubuntu1

First you have to remove the package android-sdk

sudo apt-get remove android-sdk

to install android-tools-adb.

After that execute

sudo apt-get install -f

to repair your package system.


This reeks of a hardware problem. If you had a software issue, and software was causing a reboot, you would have log data of some kind on it. Even in the case of a kernel panic, you would have some log data written somewhere (probably dmesg). There's clearly nothing in the logs, they just end and start with a fresh boot.

Not having log data means your system couldn't write anything to disk. This means one of two things: Your hard disks were unavailable, or your system suddenly lost power.

Check that your servers have adequate power sources. If you have UPSes, make sure they're ok. This is usually the failure point when multiple servers have this problem at the same time.


scan multiple pages using the scan button on DCP-7065DN and xsane

This answer is for xsane 0.999 in Debian, with an Epson Perfection 3200 Photo scanner. It also has a dedicated scan button which I wanted to use for scanning multiple pages.

There should be no changes to this from version 0.998 in Kubuntu 14.04.

The "trick" is to increase the Number of pages to scan, open the Advanced options window, and enable Wait for Button. Setting the number of pages to something much larger than the number you plan to scan should be fine.

The page numbers will be auto-incremented, and xsane will scan N pages, waiting for the button before each page.


How can I enable fast printing from Firefox/CUPS using Dot-Matrix-Printer

I don't think the browser's built-in print command is going to help much. The browser always prints in a graphical manner. You need something like jzebra to send raw data directly to the printer from a webpage.


after Ubuntu Gnome 16.10 => 17.04 upgrade - recurring glitch with autosuspend(?) on 1 min intervals

Apparently this was due to an errant Gnome extension or combination of extensions; I turned them off and the problem was eliminated. I have yet to go through them one by one to trigger the issue.


Pictures missing from odp file when reopening in Impress

It seems to be the following bug:

https://bugs.freedesktop.org/show_bug.cgi?id=50051 and

https://bugs.freedesktop.org/show_bug.cgi?id=46447


Dual Booting Windows and ubuntu, Ubuntu won't load. Grub help

Depending of the Grub version you have installed. (depending of Ubuntu Version).
Let s suppose that you have GRUB2 installed. you are in the GRUB2 shell.
Let s suppose that you see something like : grub:sh>
Then GRUB2 menu file may be corrupted.

Write down each of the following commands on a single line after the prompt  grub:sh> :

search -f --set=Root /boot/grub/core.img
set root=(${Root})
probe -u (${Root}) --set=UUID
linux /vmlinuz root=UUID=${UUID} ro
initrd /initrd.img
boot

After this, Ubuntu will load. To regenerate the GRUB 2 menu, run the following command in a terminal:

sudo update-grub

Hope this helps.
Do not hesitate to provide more details , if needed.


Ubuntu and most Ubuntu distros have an application called usb image writer pre installed. Use that to mount the windows 10 image on to a USB drive.

Next, just insert the USB drive and boot up using the USB drive.

After that, it's a fairly simple straightforward installation process


Switching virtual terminals is hanging X

Which Ubuntu are you using? GDM? LightDM? What Session? Can you provide some logs (Xorg, GDM/LightDM log, journal output at the time you switch).

If you use GDM (on 18.04 at least) on default it uses vt1 for the login screen and vt2 (or the next free vt) for the actual session once you login.

LightDM still uses vt7 for both on default.

You can also do a manually swtich using sudo chvt N.
You may also check (for GDM and maybe LDM):

#Prints the processes together with env and commandline argsq
~$ ps e -a | grep Xorg
...
#or without env
~$ pgrep -a Xorg
1471 /usr/lib/xorg/Xorg vt1 -displayfd 3 -auth /run/user/121/gdm/Xauthority -background none -noreset -keeptty -verbose 3
5337 /usr/lib/xorg/Xorg vt3 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -background none -noreset -keeptty -verbose 3

#Or identify sessions via loginctl (works for LightDM too)
~$ loginctl list-sessions
        c1        121 gdm              seat0            tty1
         4       1000 user             seat0            tty3
         5       1000 user             seat0            tty3
         2       1000 user

~$ loginctl show-session 5
Id=5
User=1000
Name=user
Timestamp=Wed 2020-03-04 10:48:55 CET
TimestampMonotonic=240064915
VTNr=3
Seat=seat0
TTY=tty3
Remote=no
Service=gdm-password
Scope=session-5.scope
Leader=5326
Audit=5
Type=x11
Class=user
Active=yes
State=active
...


See - Change the text for “Applications, Places, System”

get a copy of the PO file for mate-panel for your locale from the source code.

(On GitHub, click on the file, then the Raw button, then Ctrl+S to save)
Install poedit using sudo apt install poedit or from Boutique (under Programming).
Open Poedit and find the "Applications", "Places", "System" lines and change them to what you want. Save the new PO file; this will also create a MO file.
Copy the new MO file to the system locales folder (here using en_GB as an example locale):

sudo cp en_GB.mo /usr/share/locale/en_GB/LC_MESSAGES/mate-panel.mo

Restart the panel -- Press Alt+F2 and type:

mate-panel --replace


autostart application in new workspace in gnome-shell

The following is a program that will start another application and move it to a specified work space.

You should copy this into a file named move-at-start.sh, mark it executable, and put it somewhere in your home directory (i would suggest putting it in the ~/.local folder, but you can put it in your ~/bin or some other place if you prefer, just remember where you put it and what you named it). (pastebin link)

#!/bin/bash

# invocation
# move-at-start.sh <desktop> <prog> <prog args>

if [ $# -lt 2 ]; then
    echo "invocation: move-at-start.sh <desktop> <prog> <prog args>"
    exit 1
fi

desk=$1
prog=$2
args=""
shift
shift

while (( "$#" )); do
    args="$args ""$1"
    shift
done

$prog $args

windows=$(wmctrl -lp | grep -E "($(echo $(ps -C "$prog" -o pid,user | grep "`whoami`" | sed -E "s/^\ *//" | cut -d\  -f 1) | sed "s/\ /|/g"))" | cut -d\  -f 1)

for w in $windows; do
    wmctrl -i -r $w -t $desk
done

exit 0

Once you have done that go to ~/.config/autostart in either your shell or Nautilus.

In this folder you will find some files with names like app-name.desktop find the ones corresponding to the applications you want to launch (most likely <name>.desktop) and open them in your favorite text editor.

For each file find the line that starts exec=<some command and args> and change it to exec=</path/to/above/script>/move-at-start.sh <desktop number> <some command and args>.

The next time you log in the app should be started and moved to the specified desktop.

Notes: Desktops are numbered starting from 0 so the first desktop is 0, the third is 2, etc.

Notes: If the desktop specified does not exist the window will remain in the original desktop.


sudo apt update && sudo apt upgrade && sudo apt dist-upgrade && sudo apt autoremove . i used this command and seems this error

Clean apt cache with sudo apt-get clean
Update package lists with sudo apt-get update
Resume installation with sudo apt-get install -f


How to play DVDs after installing the recommended libraries?

Have you tried other DVD's? It's possible that there was some other "protection" things done to the dvd structure in an attempt to make it not run in computers


bash: syntax error: unexpected end of file

You have not closed two if statements with fi:

one starting at line 36
one starting at line 38

Make the chuck as:

if [[ $1 = "--recover" ]]; then
        if [[ -e ~/TRASH.tar ]]; then
                #create recovered-trash if it doesn't exist.
                if [[ -d ~/recovered-trash ]]; then
                    mkdir ~/recovered-trash
                fi
                cp ~/TRASH.tar recovered-trash
                tar -xf ~/recovered-trash/TRASH.tar
                rm ~/recovered-trash/TRASH.tar #remove the copy
                echo "trash file extracted to ~/recovered-trash"
        else
                echo "no trash file found :("
        fi
fi


libc.so.6: version `GLIBC_2.16' not found

There is a much safer way to run a single app. Problem is: while glibc is meant to be backwards-compatible, it is not 100% accurate. Issues are known. So, do not update the library system-wide. Instead, prepare a whole set of updated libraries. Put them in, say, /catbed. Then just run

   /catbed/ld-linux.so.3 --library-path=/catbed:/whatever-else /usr/bin/python -python-args

Of cause, adapt the filenames to your case. This is much safer way to go, because if you mess up your system ld-linux+libc pair you will not be able to fix it from inside the OS. You will have hard times even chrooting into it then.
I routinely use the trick for old proprietary Linuxes (gcc 3.1, kernel 2.3) on which I want to run Qt5.


Currently I added xrefresh (from x11-xserver-utils) to startup apps:

bash -c 'while true;do xrefresh;sleep 1;done'

and the notebook is at least usable now.


Ubuntu-Kubuntu start-up messed up: how to clean up?

kubuntu-desktop is a meta-package, uninstalling it will not remove its dependencies. Look in your /var/log/apt/history.log for the packages installed with kubuntu-desktop.

It's format is like:

Start-Date: [date and time of installation]
Commandline: apt-get install kubuntu-desktop
Install: package1:arch (version), package2:arch (version)
End-Date: [date and time when finished]

The next command will display the command for removing all packages which where installed with kubuntu-desktop (run it in a terminal):

grep '^Install: .* kubuntu-desktop' /var/log/apt/history.log | head -n1 | sed -E 's/:(amd64|i386) \([^)]+\),?//g;s/Install:/sudo apt-get purge/'

If you're not sure whether it's the right one, paste it on http://paste.ubuntu.com/ and comment on this answer.


adduser --shell=/usr/sbin/nologin disabledUser

can also use --shell=/bin/false

(what's the difference between them? don't know exactly, but you can probably get an answer to that question at https://unix.stackexchange.com/questions/10852/whats-the-difference-between-sbin-nologin-and-bin-false )


What is a  process, and why doesn't it get killed?

From your output we see a "defunct", which means the process has either completed its task or has been corrupted or killed, but its child processes are still running or these parent process is monitoring its child process.
To kill this kind of process, kill -9 PID doesn't work. You can try to kill them with this command but it will show this again and again.
Determine which is the parent process of this defunct process and kill it. To know this run the command:
$ ps -ef | grep defunct
    UID          PID     PPID       C    STIME      TTY          TIME              CMD
    1000       637      27872      0   Oct12      ?        00:00:04 [chrome] <defunct>
    1000      1808      1777       0    Oct04     ?        00:00:00 [zeitgeist-datah] <defunct>

Then kill -9 637 27872, then verify the defunct process is gone by ps -ef | grep defunct.


You can't mount CD/DVD image file via virtual machine settings:

Just mount the Ubuntu iso file there, and restart your virtual machine. If it's still not booting from the Live CD, check the boot order of your virtual machine.


I had the first issue when I downloaded Kubuntu. What I had to do to fix it was to edit the /etc/default/locale file.

    :~$ cat /etc/default/locale
    #  File generated by update-locale
    LANG="en_US.UTF-8"
    LC_NUMERIC="en_US.UTF-8"
    LC_TIME="en_US.UTF-8"
    LC_MONETARY="en_US.UTF-8"
    LC_PAPER="en_US.UTF-8"
    LC_NAME="en_US.UTF-8"
    LC_ADDRESS="en_US.UTF-8"
    LC_TELEPHONE="en_US.UTF-8"
    LC_MEASUREMENT="en_US.UTF-8"
    LC_IDENTIFICATION="en_US.UTF-8"

Edit anything that starts with ar_KW to en_US, and you will be good to go. Please remember that you require root privileges to edit this file.
So, edit it using the command:

:~$ sudo nano /etc/default/locale

If you already have root privileges then:

:~# nano /etc/default/locale

You can also use any other text editor like vi, vim, gedit and so on.

As for the second issue, I am not sure what may be the cause of the problem. You may have to dive through your display settings and find what is wrong as I have never encountered this issue.


I think what I'm trying to do it´s impossible because of how VirtualBox implements bridge networking, here is a post I found that comments on this : https://lists.linuxcontainers.org/pipermail/lxc-users/2013-September/005696.html


Everytime after updating system, i have to reinstall NVIDIA driver to get my unity work properly

Click in the dash, search for software and updates, go to 'install additional drivers' and choose a proprietary driver for your system.


take picture with ffmpeg but wait for focus

I suspect that what you are after is a --delay 5 type option for FFmpeg which at the moment does not exist except as a feature request. However there is an older utility called fswebcam which I have tested comprehensively on my system that will accomplish exactly what you are after. Install with:

sudo apt-get install fswebcam

and run a simple command line something like the following:

fswebcam --delay 5 --skip 200 --png 5 testing.png

A more elaborate command line plus full terminal output can be seen below as it runs on my own system:

andrew@ilium~$ fswebcam --device /dev/video0 \
>          --input "Camera 1" \
>          --resolution 800x600 --delay 5 \
>          --skip 200 --png 5 \
>           testing.png
--- Opening /dev/video0...
Trying source module v4l2...
/dev/video0 opened.
Delaying 5 seconds.
--- Capturing frame...
Skipping 200 frames...
Capturing 1 frames...
Captured 201 frames in 6.64 seconds. (30 fps)
--- Processing captured image...
Setting output format to PNG, quality 5
Writing PNG image to 'testing.png'.
andrew@ilium~$

The option --delay 5 gives the webcam a chance to initialize while the option --skip 200 delays the screen capture after the stream is open for about 6 seconds. You will need to experiment a little with this to allow for your specific camera's autofocus time.

How cool is the Linux command line :)


Bumblebee 16.04: nvidia-375 depends on xserver-xorg-legacy

These instructions appear to be accurate: http://www.webupd8.org/2016/08/how-to-install-and-configure-bumblebee.html
In my case, because I already had a mostly-working setup, I did this:
My Solution

Add the bumblebee/testing PPA
sudo add-apt-repository ppa:bumblebee/testing
sudo apt-get update

Use Synaptic to update Bumblebee, keeping my existing /etc/bumblebee/bumblebee.conf

Add the following lines to /etc/bumblebee/bumblebee.conf
# Xorg binary to run
XorgBinary=/usr/lib/xorg/Xorg

Right after the lines
# Directory with a dummy config file to pass as a -configdir to secondary X
XorgConfDir=/etc/bumblebee/xorg.conf.d

Then save and close

Restart the computer, just in case

Make sure everything is actually working by using
optirun glxinfo

And seeing that it outputs something different from before, even when used twice in a row

Notes
The conclusion of this bug report was what led me to the conclusion that this was the correct solution for now: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815888
The PPA has this rather intimidating warning label:

Unless you're a developer, it's unlikely that you want to use this PPA. Use ppa:bumblebee/stable if you're just a regular user.
Things may break your system in this PPA.

However, there appears to be no Xenial (16.04) in bumblebee/stable, so that isn't an option.


How can I install Filezilla on Linux 18.04 via command line?

FileZilla is not installed by default, To install FileZilla on Ubuntu 18.04, Open the terminal and execute:

sudo apt-get update
sudo apt-get install filezilla

Connecting to the FTP server with FileZilla

To connect to a FTP Server, Open the FileZilla FTP client and type the domain name or IP address of the FTP server in the Host field. Provide the FTP username and password and FTP port( you can leave the port empty if your server use default FTP port 21) and click on Quick connect button.


To prevent suspension change: all settings>power>Suspend when inactive for

To allow screen off, change: change all settings>brightness & lock>turn screen off when inactive for

To lock after a certain period or on screen off, change: all settings>brightness & lock>Lock screen after


See this answer. You can probably rename the .bashrc file to something else for now to get terminal working again and then add back one change at a time to see what is causing the error.


Sounds like you want to start with the Ubuntu Minimal CD. See https://help.ubuntu.com/community/Installation/MinimalCD . Download and install then apt-get the packages you need.


Open Terminal
Type 'sudo apt-get update && sudo apt-get install --no-install-recommends vlc'
Enter password for sudo

Have you tried to use synaptic package manager to install vlc too?

Hope it will help, Thanks


Python 2.7 and Python 3.4 include the pickle and cPickle modules already.  You do not need to take any extra steps to install them.  You can see a list of currently installed modules by typing

help('modules')

from a Python prompt.


What does the @ sign mean after a tunnel interface?

Time to answer my own question again after some lenghty research! So according to this systemd.netdev manual I need the independent flag for my configuration to work.

  Independent= A boolean. When true tunnel does not require .network
  file. Created as "tunnel@NONE". Defaults to "false".

However this isn't available until systemd announcement version 235.

Running command systemd --version it seems I'm running systemd version 234.

Systemd  version 235 isn't available until Ubuntu Bionic Beaver

After switching all the strings in /etc/apt/sources.list from artful to bionic

Running apt-update and sudo apt install --only-upgrade systemd

I switched back again bionic to artful in /etc/apt/sources.list and doing an sudo apt update && sudo reboot.

Then I was finally able to get the Independent flag to work in my [Tunnel] systemd configuration which let me ping ipv6.google.com on every reboot! I'm a happy camper :)


how install XBMC – Kodi Media Center media player on ubuntu?

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:team-xbmc/ppa
sudo apt-get update
sudo apt-get install kodi

All the info you need can be found at https://kodi.tv


Is there any good car diagnostics application?

"Theoretically" yes. There are some videos and tutorials such as this one (notice several comments noting problems of compatibility). Some have succeeded getting the right hardware to work. I had tried this with a cheaper device from Amazon (on two... no, three? versions of Linux), with no useful response. This may be defective device, or it may be that the vehicles I try had a different protocol (it turns out OBDII is actually many different signal protocols, which you may be able to look up or view by pinout). It may be better to buy a dedicated device for OBD reading.


In a terminal type alsamixer, go to Automute via navigation keys, press up or down and set it to disable.
Unfortunately, you will still hear sound from your headphones.


This builtin is so complicated that it deserves its own section.

  set
  allows you to change the values of shell options and set the
  positional parameters, or to display the names and values of shell
  variables.

The -e option

  -e

  Exit immediately if a pipeline (see Pipelines), which may consist of a
  single simple command (see Simple Commands), a subshell command
  enclosed in parentheses (see Command Grouping), or one of the commands
  executed as part of a command list enclosed by braces (see Command
  Grouping) returns a non-zero status. The shell does not exit if the
  command that fails is part of the command list immediately following a
  while or until keyword, part of the test in an if statement, part of
  any command executed in a && or || list except the command following
  the final && or ||, any command in a pipeline but the last, or if the
  command’s return status is being inverted with !. A trap on ERR, if
  set, is executed before the shell exits.

  This option applies to the shell environment and each subshell
  environment separately (see Command Execution Environment), and may
  cause subshells to exit before executing all the commands in the
  subshell.

Source: www.gnu.org

Edited due to @psusi's comment below.

Additionally you can read the bash's manual page

man bash

at the section: SHELL BUILTIN COMMANDS

or issue

help set

for a short help message.


Figured it out after some trial and error.  I had "Flipping" enabled in my NVidia settings.  When I disabled it, all was well.


How to set volume control using a mouse shortcut?

If you want to install btnx, you can use these .deb files:

32 bit: main program / gui
64 bit: main program / gui

EDIT: Convenience.


Virtual Server with no Snappoint function: How do I make a full-backup of the running system?

Make a backup of configuration files

You will probably be interested in keeping a backup of your configuration files. These typically live in /etc. Make a tar of /etc, which you can poke trough when you need it:

ssh user@hostname "sudo tar cvj /etc/" > etcbackup.tar.bz2

Note that you should not restore all of it; you should restore the configuration files you have messed up.

Get list of installed packages

dpkg --get-selections > packagelist.txt

This will create packagelist.txt with all currently installed packages. You can read this to look for specific packages, or you can install according to this list automatically

dpkg --set-selections < packagelist.txt
apt-get -u dselect-upgrade

Additional apps

If you use for instance MariaDB you probably want to back up your databases. This can be done with the mysqldump utility. Similar tools exists for other databases.

If you do web development, look into housing the project in for instance git, so that you don't work live on the remote system, but have a version control system.

Tho, I'd not bother with backing up anything but the user data on a system. Configuration settings should be documented, but fairly easy to restore from documentation. List of installed packages probably follows somewhat from requirements for the applications hosted.


The prompt ~$ means you are currently in your home directory (indicated by ~) and you are a normal user (not super user) indicated by $.

For a normal user:

username@ubuntu:~$ pwd
/home/username
username@ubuntu:~$ whoami
username

For root (check #):

root@ubuntu:~# pwd
/root
root@ubuntu:~# whoami
root

To getting started to using the terminal read this documentation properly.


Try this solution.  It worked for me.

http://www.webupd8.org/2015/05/grive2-grive-fork-with-google-drive.html


A bit late to the party but I found this question when looking for an answer and now I have my own answer to share.

I believe you can do this via the mysterious world of apt_preferences.

Try making a file called /tmp/a_p (or whatever) like so...

Package: *
Pin: release a=*-backports
Pin-Priority: 100

Package: *
Pin: release n=*
Pin-Priority: 1001

Then run:

sudo apt-get -o Dir::Etc::Preferences=/tmp/a_p dist-upgrade

The second section of the file basically does what the OP requested, in that it bumps the priority of all packages in any live repository to make them install even if it means a downgrade.

The first section prevents the second section from triggering the installation of all backports.  You may or may not care about or want this.  I'd suggest tinkering to see what works.  You can use apt-cache -o Dir::Etc::Preferences=/tmp/a_p policy somepkg to see what effect the a_p file is having on specific packages.

TIM


Error when trying to create desktop icons

To create a launcher on the desktop, run this command:

 gnome-desktop-item-edit /home/<username>/Desktop --create-new

this starts the GUI application for creating new launcher.

In the command field, enter the name of the application, such as nautilus, or select executable from /usr/bin or any other directory.


How-to upgrade LXC container after `do-release-upgrade` to Wily?

I also google similar question, and find your question. :)
Before I start testing, I create snapshot for the container, in case I ruin something when I'm trying.
Fortunately, the upgrade is very smooth.

I think container will not be upgrade automatically when host is upgraded.

I've just done an release upgrade from Wily to Xenial for my LXD container. Below is what I'm doing. I think it would be similar for LXC container.

Attach to containter console, you will be root; and you don't need to worry ssh service since you are using console:

$ lxc exec <container name> -- bash

First upgrade your software packages, especially for apt:

# apt-get update
# apt-get dist-upgrade
# reboot (maybe not needed)

if you don't have "do-release-upgrade":

# apt-get install ubuntu-release-upgrader-core

Then you can start upgrade:

# do-release-upgrade -m server

In case “do-release-upgrade” complains "Must be connected to a terminal.", I have no idea why this happens, I think this container bases on Ubuntu cloud image. So have to use a ssh connection and "sudo"s.


Building Unity from Source
In this guide you will build a separated version of Unity trunk (locally installed to your home directory), so you don't need to worry about corrupting the version from the Ubuntu repositories and you also won't need to get root permissions throughout the whole process (except for installing the build dependencies).
0. Installing build dependencies
You'll need to run this once to install all necessary build dependencies:
sudo apt-get install bzr cmake compiz-dev gnome-common libbamf3-dev libboost-dev \
libboost-serialization-dev libgconf2-dev libgdu-dev libglewmx1.6-dev \
libgnome-desktop-3-dev libibus-1.0-dev libindicator3-dev libjson-glib-dev \
libnotify-dev libnux-2.0-dev libpci-dev libsigc++-2.0-dev libunity-dev \
libunity-misc-dev libutouch-geis-dev libxxf86vm-dev libzeitgeist-dev xsltproc

If you have source code repositories (aka deb-src) enabled, you can instead use:
sudo apt-get build-dep unity

1. Preparing the environment
Replace SOURCE and PREFIX with the directories you'd like the source and build files to go. In this example I put both in my home directory:
export SOURCE=$HOME/source/unity
export PREFIX=$HOME/build/unity

export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH"
export LD_LIBRARY_PATH="$PREFIX/lib:$LD_LIBRARY_PATH"
export LD_RUN_PATH="$PREFIX/lib:$LD_RUN_PATH"
export XDG_DATA_DIRS="$PREFIX/share:$XDG_DATA_DIRS"

mkdir -p "$PREFIX"
mkdir -p "$SOURCE"
cd "$SOURCE"

2. Building Nux
You will probably need to grab the latest version of Nux to get Unity trunk to compile:
bzr branch lp:nux
cd nux
./autogen.sh --disable-examples --disable-gputests --disable-tests --prefix="$PREFIX"
make -j4
make install
cd ..

Tip: Most modern desktops and laptops have several cores. You can greatly speed up the compilation by taking advantage of this. The make command has build-in support for this which you can activate using the -jN switch where N is the number of jobs to run in parallel. A good rule of thumb is to run 2 times the number of cores on your processor. Thus, on a normal dual core computer you should run make -j4 to minimize the compilation time.
3. Building Unity
Now grab the latest Unity code and build it:
bzr branch lp:unity
cd unity
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCOMPIZ_PLUGIN_INSTALL_TYPE=local -DGSETTINGS_LOCALINSTALL=ON -DCMAKE_INSTALL_PREFIX="$PREFIX"
make -j4
make install

That's it, log out and back in again and you should be running the latest Unity. Alternatively, you can run
setsid $PREFIX/bin/unity

4. Updating
Make sure to prepare the environment like described in step 1, then simply enter both top-level directories nux and unity, run bzr pull, rebuild, and reinstall.
I suggest removing and recreating the build directory in the unity directory, to make sure no old files are messing with your build.
5. Removing Unity
Remove the three directories $SOURCE, $PREFIX and ~/.compiz-1.

Useful Link:

http://unity.ubuntu.com/getinvolved/development/unity/


messed up with mount and naming a partition - delete a folder in file system

I did :

sudo umount /dev/sda8/ /Documents
sudo umount Documents /dev/sda8/
sudo umount -L Documents /dev/sda8/

and suddenly the device "Documents" appeared!

As for the 'Documents' folder inside my file system that was my mistake.
I chekced the properites and it showed the space of the entire file system.My mistake.

Also, for details you can check here.

I want to thank Eliah Kagan  for his help.


Simplest way to completely remove Xubuntu 14.04

In case you are only using a single root partition and don't need any of your data, you can simply download and boot the installer and re-format your existing root partition.


Epson Scanner, part of XP-310 Printer, not working in Ubuntu GNOME 14.04

I got the printer to work, but not the scanner yet. Go into Synaptic Manager, and try to find XP-310. This video will give you a good start http://www.youtube.com/watch?v=DNbmSjOFrHE


There were several issues that contributed to my problem.

In recovery mode, I realized I had internet connectivity, but DNS was not resolving.
DNS not working in recovery mode

echo "nameserver 8.8.8.8" >/etc/resolv.conf

Next, fixing the systemd-shim error message issue was resolved here: remove systemd-shim reference I made sure I could run the find space and fix broken packages options in recovery mode.

sudo mv /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service.bak

Next, even though I am running on an HP box with an integrated Intel card, I suspect I may have used my Geforce card at one time, so I purged Nvidia drivers, even though I thought it would be futile. purge nvidia drivers

sudo apt-get remove --purge '^nvidia-.*'

Finally, I was able get to a login page (GDM3) and it did not respond to my password. I fixed this after realizing my Home directory was somehow changed to root.

Hope this helps someone, although I am late to the Bionic game.


Try running it from the terminal.

vba --rtc yourromfile.gba

If it works, there must be something wrong with your configuration in the graphical version.  You can play with it more or just start running VBA from the terminal.

If you want a full list of options you can give VBA, type man vba.  There's more stuff in there than in the graphical version.


Different screen resolutions for each work-space?

1. Assuming you are on Unity

The script below should change your resolution, depending on the current viewport in Unity. I tested it on several computers for a while, and it ran without an error.

I'd suggest however to also test it for a while and see if it runs without a single break; repeated wmctrl commands can sometimes exit "non-zero" incidentally. If so, we need to build in a try / except.

Notes

I tested it on a single-monitor setup. multiple monitors would probably need another way of parsing the output of xrandr.
In the head of the script, you need to set the desired resolution for each of your viewports, I set it like mentioned in your comment, but you can change it anytime. Use the format:

resolutions = [[<horizontal>, <vertical], [<horizontal>, <vertical], ......]

like it shows in the script.
No need to say that you should use supported resolutions, as in the output of xrandr for your monitor.

How to use

The script needs wmctrl:

sudo apt-get install wmctrl

copy the script below into an empty file, save it as screen_res.py
Test run it for a while in a terminal window by the command:

python3 screen_res.py

If all works fine, add it to your startup applications: Dash > Startup Applications > Add...

The script

#!/usr/bin/env python3
import subprocess
import time

# list of resolution per viewport, for each viewport a separate [hor, vert]
# I pre- entered your viewports. quite some! listing takes more space than the script :)
resolutions = [
    [3200, 1800],
    [3200, 1800],
    [3200, 1800],
    [3200, 1800],
    [3200, 1800],
    [3200, 1800],
    [3200, 1800],
    [1920, 1080],
    [1920, 1080],
    [1920, 1080],
    ]

def get_xr():
    return subprocess.check_output(["xrandr"]).decode("utf-8").split()

check = get_xr()
plus = 2 if check[check.index("connected")+1] == "primary" else 1

while True:
    # resolution:
    xr = get_xr()
    res = [int(n) for n in xr[xr.index("connected")+plus].split("+")[0].split("x")]
    # get current viewport
    vp_data = subprocess.check_output(["wmctrl", "-d"]).decode("utf-8").split()
    dt = [int(n) for n in vp_data[3].split("x")]
    cols = int(dt[0]/res[0])
    curr_vpdata = [int(n) for n in vp_data[5].split(",")]
    curr_col = int(curr_vpdata[0]/res[0])+1; curr_row = int(curr_vpdata[1]/res[1])
    curr_vp = curr_col+curr_row*cols
    # check and change resolution if needed
    if res != resolutions[curr_vp-1]:
        new_res = ("x").join([str(n) for n in resolutions[curr_vp-1]])
        subprocess.call(["xrandr", "-s", new_res])
    time.sleep(1)

Explanation

In a loop, the script first checks the screen's current resolution from the command:

xrandr

Subsequently, the script checks the total desktop size (all viewports) from the command:

wmctrl -d

Then, from the resolution i.c.w. the total desktop size, it calculates the number of columns, which is equal to the total desktop size, divided by the horizontal resolution.
Also in the output ofwmctrl -d is the position of the current viewport on the spanning desktop: e.g.: VP: 1680,0.
With this information we can conclude on which column & row we are, and check if the currently set resolution matches the resolution as we defined it in the list in the head section of the script.
If not, the script gives the command to change the resolution with the command:

xrandr -s <xres>x<yres>

2. XFCE version

set up like the version above (also needs wmctrl)

#!/usr/bin/env python3
import subprocess
import time

# list of resolution per viewport, for each viewport a separate [hor, vert]
# below just an example! set resolutions for your own screen
resolutions = [
    [1280, 1024],
    [1280, 960],
    [1280, 1024],
    [1280, 1024],
    ]

def get_xr():
    return subprocess.check_output(["xrandr"]).decode("utf-8").split()

check = get_xr()
plus = 2 if check[check.index("connected")+1] == "primary" else 1

while True:
    # resolution:
    xr = get_xr()
    res = [int(n) for n in xr[xr.index("connected")+plus].split("+")[0].split("x")]
    # get current workspace
    vp_data = subprocess.check_output(["wmctrl", "-d"]).decode("utf-8").splitlines()
    curr_ws = int([l.split()[0] for l in vp_data if "*" in l][0])
    # check and change resolution if needed
    if res != resolutions[curr_ws]:
        new_res = ("x").join([str(n) for n in resolutions[curr_ws]])
        subprocess.call(["xrandr", "-s", new_res])
    time.sleep(1)


Radeontop, despite it's name will work for any open source graphics driver.  If you're using proprietary drivers then you'll need to look into nvidia smi (double check, I think that's what it's called).


Is there an alternative to the default lock-screen?

You can also disable the password input if that 'd help - go to system settings > screen > and change "lock". The screen then simply switches on without requiring you to enter your password.


swapon makes Ubuntu to switched to read-only file system

I reformatted my swap partition as swap, then copied the new UID to /etc/fstab replacing the old one, then I ran the command sudo dpkg --configure -a. Finally, I did a reboot


After choosing either 32bit or 64bit when downloading Ubuntu you will be presented with a donation page as seen here http://www.ubuntu.com/download/desktop/questions?distro=desktop&bits=32&release=lts

Click on the  pay with Paypal button and you will be presented with an option to pay via credit or debit  card. You can use this option without actually ever joining paypalal.


That's because you used #!bin/bash/ and this is wrong. The right way is:

#!/bin/bash

This is called a shebang and it tells the shell what program to interpret the script with, when executed.

Another thing: the absolute path for bash interpreter in Ubuntu is /bin/bash, not bin/bash/ or something else. You can check this using which bash command.

And another thing, but probably you know this: the following line:

echo "mv /path/to/source /path/to/destination"

will only display a text message with mv /path/to/source  /path/to/destination. To really move files use the following script:

#!/bin/bash
mv /path/to/source /path/to/destination

That is how your script should look like.


Synologie NAS - Using Symbolic Link with SFTP

The structure that you propose is very well possible with your setup.

Your Synology NAS comes with a GUI that has its limitations - apparently it can't handle links, whereas the underlying file system (Btrfs) can.

However, it is easy to access the NAS through Nautilus. Out of the box, the Synology device provides a SMB share. That means that it will turn up as a shared network folder on Windows systems without any more action from the Windows user. To see a SMB share in Ubuntu, you need to install cifs-utils.


So, do I have to enable the firewall? I hope not, because I'm really dumb and I don't think I will be able to configure the firewall.

Well, if you say so, I would recommend you do not touch any firewall setting. But, hear me well you will be exposed to all kind of threats in the internet. If some time the system start acting weird, or your PC gets filled with spam/advertisement, software you never installed is there, you notice that your bank account is empty, don't get scared. And no, this is not an FUD. Without any kind of layer of protection, his system (and himself) will be vulnerable to all kind of attacks from the internet.

If you don't know how to setup a Firewall and have no router I recommend you to read:

How can a non-geek set up a proper firewall?
A commentary from Eliah Kagan about the dangers of not having NAT/Router and a PC at home
Why is the firewall disabled by default?


Permission denied on mounted nfs folders

I have filed a bug against the freeipa-client package.

The problem was that gssd in Ubuntu 16.04 does not seem to support kernel keyring backed credential caches for kerberos. However, the ipa-client-install script creates /etc/krb5.conf in a way that relies on those.

Deleting the line default_ccache_name = KEYRING:persistent:%{uid} fixed the issue for me.


Having more than 1 system installed on hdd don't affect computer performances.Also With 1gb of ram i would rather install other linux systems like mint,lubuntu or older ubuntu 10.04