How do I hibernate with swap file without swapping?

First of all: a warning as you're saying:

the stick is a bit of bottle neck since it only have one chip.

Which makes me suppose you're using an MLC USB stick.  These sticks are slow and prone to errors, so one day in the near future, you're going to wake up and find that you've got no system at all and all of your data is lost, as HDDs die a slow, painful death like cancer, whereas SSDs just suddenly stop working like a heart attack!
Therefore:

Install your stick for the moment like here
Buy an SLC USB stick ASAHP and re-install on that one
Make back-ups of your data from the SLC stick onto the MLC stick...

Data isn't data until it's backed up!


How can I get unformatted ip address information in the shell?

The ip command supercedes the ifconfig command and supports the -o option for easier automatic parsing.

For example:

ip -o addr show dev wlan0|awk '$3=="inet"{print $4}'

will produce something like:

192.168.0.2/24


Cisco PrecisionHD USB Camera (Detected but no video)

Cheese webcam booth is not working at the moment. They said that they are trying to upgrade it. Try and use a different webcam viewer.


Wireless hotspot configuration and internet browsing

This is wrong - iptables -t nat -A POSTROUTING -s 10.10.0.0/16 -o wlan0 -j MASQUERADE

It should not be wlan0. It should be the interface has the internet connection. It should be

iptables -t nat -A POSTROUTING -s 10.10.0.0/16 -o eth0 -j MASQUERADE

See How to setup an Access Point mode Wi-Fi Hotspot? for more details.


You can use git-fs for updates like some other OSes has. automatic, safe, ...
some reference for starting


sudo apt-get update failes with an Hash Sum mismatch error

This solution finally worked out for me:

sudo rm -rf /var/lib/apt/lists/*
sudo apt-get update -o Acquire::CompressionTypes::Order::=gz
sudo apt-get update && sudo apt-get upgrade

Source: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1785778


Yes, for sudo or su. log in /var/log/auth.log

tail -f /var/log/auth.log | egrep -i "(sudo|su)"

If you would like colorized logs install ccze then pipe the output to ccze

tail -f /var/log/auth.log | ccze


Ubuntu 18.04 Apache2 Virtual Host is showing main website

After doing some more research I have found out that my virtual host was setup wrong below is the virtual host that worked for me.

<VirtualHost *:80>

        ServerAdmin me@mydomain.com
        #referring the user to the recipes application
        DocumentRoot /var/www/subdomain
        ServerName subdomain.mydomain.com

        <Directory /var/www/subdomain>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
                # Uncomment this directive is you want to see apache2's
                # default start page (in /apache2-default) when you go to /
                #RedirectMatch ^/$ /apache2-default/
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>


Running Firefox as root in a regular user's session is not supported. ($XAUTHORITY is /run/user/1000/gdm/Xauthority which is owned by radix.)

earthmeLon's warning is very important, and you should try to solve your problem without having to run Firefox as root.

However, if for some reason you really need to do that (I won't judge you), you can do this:

sudo -i

To start a root shell, then make a backup of root's .Xauthority if needed

test -f .Xauthority && mv .Xauthority .Xauthority.bak

Copy the file from your home to root's

cp -a /home/youruser/.Xauthority .Xauthority
chown root: .Xauthority

Then you can start Firefox with:

XAUTHORITY=/root/.Xauthority sudo firefox

Remember to exit the root shell when you've finished with it.

Also remember to unroll your .Xauthority backup when done:

sudo -i
test -f .Xauthority.bak && mv .Xauthority.bak .Xauthority
exit


I ran:

rm ~/.kde/share/config/ksmserverrc
sudo reboot now

on reboot, was able to log off again

Thanks to this post on Kubuntu Forums


Open a terminal and run:

sudo apt-get install -f


You could reset unity Icons:

unity --reset-icons

And Install MyUnity and choose the desired theme:

sudo add-apt-repository ppa:myunity/ppa
sudo apt-get update
sudo apt-get install myunity


Right-click on the eclipse_java.desktop file that is located on your ~/Desktop, and select Allow Launching. Assuming that your Icon and Exec lines are correct, the icon should flip immediately.


Why Byobu custom status notification code fail to show in color?

If using the tmux backend for byobu, you will need to use a different format for color codes. Luckily, it's less complicated than the screen format.

To set colors, use #[<color and attribute codes>]. Examples:

#[default]: restore default colors (use at the end of your custom status).
#[fg=red]: set the foreground color to red.
#[fg=#ff0000]: set the foreground color to #ff0000. Only accepts lowercase -- FF0000 won't work.
#[bg=black]: makes the background black.
#[fg=bold]: makes text bold. See below for more.
#[reverse]: swaps foreground/background colors.

You can combine them, e.g. #[fg=white,bold,bg=black].

Named colors: black, red, green, yellow, blue, magenta, cyan, white, black, brightblack, brightred, brightgreen, brightyellow, brightblue, brightmagenta, brightcyan, brightwhite

Attributes: dim, underscore, bold, reverse, standout, blinking, hidden, italics

You can also use the environment variables $BYOBU_LIGHT, $BYOBU_DARK, $BYOBU_ACCENT, and $BYOBU_HIGHLIGHT as colors.

To play with this, create a file, ~/.byobu/bin/1_hello with the following contents, and make it executable.

#!/bin/sh
echo "#[reverse]Hello world#[default]"

This should create a black-on-white status notification that says "Hello world".

Here are two example custom status bar components, and the codes that produce them:

#[fg=#aa77cc,bg=#222222] @XXX.XX #[default]
#[fg=white,bg=black] ✉ X #[default]

This information will probably only work if you're using tmux and a color-enabled shell, though :)

(Sources: /usr/lib/byobu/include/colors, /usr/lib/byobu/include/shutil)


How do I find and replace in file1 with values from file2

That's a job for join:

join -t, -j1 -o 2.2,1.2,1.3 <(sort file1) <(sort file2)

-t specifies the input and ouput separator
-j1 is the join field (in both files the first one)
-o ... the format of the output as desired in the question


You should blacklist the acer_wmi kernel module as explained in this answer here. There is already a bug report for this problem for the kernel here.


Stable Ubuntu build for Sony Ericssion NEO-V MT11i

You have to install Ubuntu Touch specially designed for mobile devices. According to the wiki site your phone is supported. Go here for instructions and more info: https://wiki.ubuntu.com/Touch/Devices/haida


I will not go in detail about this since there are already too many resources online on this (what you're trying to do is setup a dual boot system) and I don't have much time.

In short, the "unallocated space" (formatting it will turn it into free space which will happen automatically during the installation) is the space that was created from shrinking the C partition. It is this space that you will need to select (during the Ubuntu installation). You can further partition this partition to / and /home (& maybe swap for suspending your system).

I didn't quite understand what you meant by

  that unallocated portion was shown with other partitions that while 'C' was separate only 2GB was free.

The "other drive" is called a partition; it's the one you created (unallocated). It lives next to C on the same drive.

As a resource refer to: http://www.psychocats.net/ubuntu/installing


What version of Mono is included by default?

mono-complete package in Ubuntu Trusty is version 3.2.8+dfsg-4ubuntu1.

http://packages.ubuntu.com/mono-complete

All the packages has the same version number.


Everyday Ubuntu system reboots at fixed time

Check the following and ensure nothing configured

Check gnome-schedule (UI) installed or not, if then open it and look into that
Run sudo service crond stop this command in terminal to ensure there is no cron job running


Is there a way to have a right edge scroll function on Ubuntu?

This command works on Ubuntu 14.04. I'm not sure about Budgie 17.10.

synclient VertEdgeScroll=1

To disable:

synclient VertEdgeScroll=0


Can't shrink Windows Boot NTFS disk: ERROR(5): Could not map attribute 0x80 in inode, Input/output error

I had similar error to this while trying to shrink a 931GB partition to about 600GB when the partition had 555TB used.

The attempt to shrink directly to 600GB failed as did an attempt to shrink to 610GB.

I then chose the mid point between 610GB and 931GB = 731GB and was able to get past the simulation check. If this works, I will keep trying mid points until I get to the size I need to get to.


The first time you try to run a snap on 14.04, you might experience the error “The command cannot be found”. This is due to the fact that “/snap/bin” has not been added to the $PATH environment variable. To do so, a script called “apps-bin-path.sh” has been added to /etc/profile.d. It will automatically run after you reboot or re-login and add snaps launchers to your path.

https://blog.ubuntu.com/2017/03/30/snaps-are-now-available-for-ubuntu-14-04-lts-desktop-and-server


Seems like that you have added some extra repositories that no longer exit.

Remove this repositories:

sudo vim /etc/apt/sources.list

Look for all lines containing a url to ppa.launchpad.net and comment them out by adding a '#' infront of the line.

Then try again.

Edit if you do not like vim and want to use you can use any other editor, maybe you'd like kedit for example:

sudo kedit /etc/apt/sources.list


Flashing screen in Acer, Intel HD Graphics

I don't know how to mark it as duplicate, but check the answer I have given here:

Screen flickering Ubuntu 16.04 Intel graphics 620


Ubuntu software center is not opening, it just freezes and then closes itself

These terminal commands should solve your problem:

First remove the Merge List by opening a terminal and type this,

sudo rm /var/lib/apt/lists/* -vf

Next, generate a new one by running a simple update:

sudo apt-get update


While I tried the command

sudo opt/intel/openvino_2019.1.144/openvino_toolkit_uninstaller/uninstall_GUI.sh

[setupvars.sh] OpenVINO environment initialized disappeared.

However, the ubuntu terminal has the following popup each time when I open the terminal.

bash: /opt/intel/openvino/bin/setupvars.sh: No such file or directory

I use the following to solve the problem:

gedit ~/.bashrc

and then delete intel openvino code and save the .bashrc file.

After that, the Ubuntu terminal goes back to normal.


Unable to run Ubuntu 17.10 live (cannot open /dev/sda)

During the initial boot from the USB, you may need to use a kernel parameter "nomodeset" to get past the point you are freezing at.  The procedure is listed at https://help.ubuntu.com/community/BootOptions and basically

When you see the screen that says "Try Ubuntu..." press F6
Scroll down using the arrow keys until "nomodeset" is highlighted
Press Enter
Press ESC
Press Enter again to continue the "Try Ubuntu..."


Ubuntu doesn't detect my Bluetooth receiver, how to fix it?

You may want to try loading the btusb module before starting the daemon:

sudo modprobe btusb

To make it happen on reboots put this into /etc/modules:

btusb

The above fixed my case, which was: sudo service bluetooth start did not start the daemon and dmesg showed

[   72.468338] init: bluetooth main process (4028) terminated with status 1
[   72.468401] init: bluetooth respawning too fast, stopped

because /usr/sbin/bluetoothd -n -d failed with

bluetoothd[4054]: opening L2CAP socket: Address family not supported by protocol


How can I get the GRUB menu to appear only when I press shift on a dual boot system to give me the option of booting Windows?

You need to edit as root the file /etc/default/grub and modify a few lines at the top to the hidden timeout. In my case it looks as follows:

GRUB_DEFAULT=0
#GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux 3.13.0-101-generic"
#GRUB_HIDDEN_TIMEOUT=0
#GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10


How to run two XMPP clients and exchange messages on the same machine

Start empathy and you will see the Contact List

Click Account Settings or select Accounts in the menu

Use the + to add accounts, select Jabber for XMPP


Upstart does not satisfy resources usage requirements set by "limit" stanza

Just for the record, OP solved his problem by using bytes, not kilobytes.


(strictly speaking not an answer to the question, but a suggestion how to install eclipse manually)

You should not change files in directories maintained by the package manager. The package manager keeps records about the files it installed. If the files are no longer there, or changed, then the package manager might refuse to continue working. Another problem might be when the package manager tries to upgrade the eclipse package, it might overwrite your files.

I suggest you install your own eclipse to /opt, or ~/opt, or any other directory not maintained by the package manager. You can then place a symlink in ~/bin pointing to your-eclipse-dir/eclipse.

Example:

$ mkdir -p ~/opt
$ cd ~/opt
# download or copy the eclipse tarball here
$ tar xzf eclipse-something.tar.gz
$ cd eclipse
$ ./eclipse # verify that eclipse works
$ cd ~/bin
$ ln -s ~/opt/eclipse/eclipse

Now you can start eclipse by typing eclipse. The symlink in ~/bin should shadow the eclipse executable /usr/bin/eclipse. If not, make sure that ~/bin is in $PATH and located before /usr/bin.

You can check which eclipse you are executing by using which:

$ which eclipse
/home/lesmana/bin/eclipse


Append specific output from ubuntu terminal in a csv file


What's the best way to get a file from one computer on my network to another?

Found the answer:

Just as all modern Unix-like systems have an SSH client, they also have SCP and SFTP clients. To copy a file from your computer to another computer with ssh, go to a command-line and type:
scp thefile username@IP address or hostname:Destination

Source: https://help.ubuntu.com/community/SSH/TransferFiles


Is there any way to install Ubuntu on NTFS ? Dual boot

Easiest is way is to install via WUBI, refer to Installing ubuntu with windows 8

Otherwise, it is possible for ubuntu to be installed on its own partition, while sparing your NTFS partition(as long as you have the space) and even access it from ubuntu if needed.


Routing between 2 wired interfaces without using NAT features

Don't run

sudo iptables -A FORWARD  -i eth0 -o eth1 -j ACCEPT
sudo iptables -A FORWARD  -i eth1 -o eth0 -j ACCEPT
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

Simply turn on IP forwarding as you have done, with net.ipv4.ip_forward = 1 in /etc/sysctl.conf.


Prevent duplicate wireless authentication windows

As @devav2 said this is a bug. I found it here

Workaround for not nm-applet asking for the keyring all the time is to go to NetworkManager (nm-connection-editor) & remove wireless networks that are not currently in use or those wireless networks one doesn't have access to.


Uninstall libav packages after re-installing from source

You don't need to "rebind" those applications; if your libraries are properly installed (even in /usr/local), the applications should be able to find them.

What you need is to build and install a fake package that pretends to provide those libraries, in order to satisfy the dependencies from the package manager's perspective. Take a look at the equivspackage.


I think the issue is on /dev/sda1.
This is the extended partition ... AS A WHOLE ...
So therefore it looks like the boot flag should be on /dev/sda5 not /dev/sda1


The stats are written to stderr, you need to redirect it as well with 2>&1:

fping -c5 -t50 192.168.10.1 >>/etc/scripts/ping-results.txt 2>&1

Why are you first coping /dev/null to the file and then using the append redirect >>? Just use > and it will overwrite the file if it previously existed:

fping -c5 -t50 192.168.10.1 >/etc/scripts/ping-results.txt 2>&1


Show photo/video slideshow with photo captions

Install ffDiaporama from stable repository. It's working.

sudo add-apt-repository ppa:ffdiaporamateam/stable
sudo apt-get update
sudo apt-get install ffdiaporama


error "pulseaudio no process found" means pulseaudio is not running so the "killall pulseaudio" command  is not needed (and report an error)
as pulseaudio not running, use qjackctl command ( or its  menu icon)   instead of pasuspender qjackctl
for midi and jack, it don't know but look in qjackctl settings for midi driver selection.


As a beginner, just press enter to use the defaults recommended by your OS. It will automatically use the values recommended in the parentheses.
No, the system will automatically create the necessary files and folders for you.


Cannot reboot after upgrade to Ubuntu 14.04 from 12.04 sometimes

Sharing my solution for anybody who meets the same problem.

Under 12.04, I installed bumblebee to switch graphic cards.
It seems that bumblebee causes Ubuntu 14.04 to have this issue.

I removed it sudo apt-get remove bumblebee* and my problem is solved.


Fix bash_profile to Develop Ruby on Rails Apps

Most likely your terminal is not invoking the shell as login shell. This inhibits the sourcing of your ~./bash_profile.

To fix this issue fix the terminal configuration.

For gnome-terminal e.g. look at this screenshot:


The GRUB Bootloader is missing.  Follow these steps to reinstall GRUB.

Make a new Ubuntu live CD and boot from it.
Install boot-repair using these commands:

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

Click "Recommended repair". This will reinstall GRUB in the adequate disk(s). Then reboot.


Unable to install php5-tidy on Ubuntu 16.04

I would think this command apt search php.*tidy would be more helpful in identifying the correct package name. So run that and pick from the results to install.


How do I get an XBOX 360 controller working?

If you find difficulties running your XBOX 360 controller, then this will help you install it on a computer running Ubuntu, and also show you how to configure it. These instructions are workable for both wired or wireless X-Box 360 controllers.

Getting Started

To be able to use your Xbox 360 wired/wireless controller under Ubuntu 12.04 (Precise Pangolin), you need first to install some required packages.

Open the terminal and run this command:

sudo apt-get install --install-recommends jstest* joystick xboxdrv

You also need to ensure that xpad is not getting loaded:

echo "blacklist xpad" | sudo tee -a /etc/modprobe.d/blacklist.conf
sudo rmmod xpad  # unload module if already loaded

Then run the xboxdrv:

xboxdrv --silent

Configuring the pad

Connect now your game controller to your PC via USB (wired) or connect your XBOX 360 PC wireless gaming receiver for your wireless controller, then run this command to start the configuration:

jstest-gtk

In the window that shows up, select your controller (Microsoft X-Box 360 pad, Generic X-Box pad, etc.) and click Properties:

Note If your controller is not listed, try to click the "Refresh" button.

A new window will pop-up which will help you calibrate your gaming controller, remap the buttons of your game controller (changing the order of axis and buttons), etc.

After you finish your configuration, save your new settings and close the window. You will be able now to use your Xbox 360 controller to play games under Ubuntu.

Configure xboxdrv to start at boot

If you're making a dedicated machine or want to ensure that xboxdrv is loaded on startup you can do this:

First create an upstart job:

sudoedit /etc/init/xboxdrv.conf

and in there add the following contents:

start on filesystem
exec xboxdrv -D
expect fork

This will ensure xboxdrv is started on boot.

Sources:

upubuntu.com
Jonas Wagner


Is there any way to fix what happened?

If you mean the black/purple screen, you should read this: My computer boots to a black screen, what options do I have to fix it?

  Or at least a way I can edit the xsessions file?

When your system finished booting, you press Ctrl + Alt + F2. This will bring up the tty or console. Use your credentials to log in. Then edit your file using nano .xsession. To save the changes, hit Ctrl + O then close it with Ctrl + X.

If you want to remove/deactivate the scripts, you can also move them:

mv ~/.xsession ~/xsession.bk


folder and app page dot indicator bug on ubuntu 20.04

This bug has been reported here Gnome Shell completely freezes in Ubuntu 20.04 when clicking outside of app icon folders. The cause of the problem is the Ubuntu Dock extension. I solved the problem by changing an extension setting.

How to solve:

Install dconf

sudo apt install dconf-editor

Go to /org/gnome/shell/extensions/dash-to-dock/extend-height
Deselect the "Use default value". And set "Custom value" to "False".

There's a video here showing how I did it bug: application's icon folders.


Hanging around for the solution pip installation solved the issue

sudo pip install --upgrade youtube-dl


This is how you can install gedit 3.14.3 in ubuntu 15.04. Run the following commands in the terminal:

sudo apt-add-repository ppa:gnome3-team/gnome3
sudo apt-get update
sudo apt-get remove gedit && sudo apt-get install gedit

Type gedit --version to see the version.

This is how it looks in my computer:


ubuntu gnome Fails to install grub-efi to /target/

I have seen this with many computers, it is not the grub install that actually fails but the update-grub that makes the first config file that fails.
the problem is that the if/then statement in 30_uefi-firmware errors.

the easiest fix is after it error, choose the command line prompt at the bottom of the installer menu. and use nano to edit the file /etc/grub.d/30_uefi-firmware.
I have changed mine to read:

gettext_printf "Adding boot menu entry for EFI firmware configuration\n" >&2
cat << EOF
menuentry 'uefi-firmware' {
fwsetup
}
EOF

after editing rerun install grub.
note: on some systems the print command needs to be commented out temporarily for the installer


How to connect Datagrip on Ubuntu (WSL) inside Windows

To connect to datagrip you need enable connection by TCP/IP to postgres database . To enable that open /etc/postgres/../postgresql.conf and change the line:#listen_addreses = "" to listen_addreses = "*" (remove #, and put * symbol) and save it.
Then open pg_hba.conf (that is located in the same path that contains postgresql.conf) WITH sudo and the end of file add next lines to allow all connections (be careful):
host    all             all             0.0.0.0/0               md5
host    all             all             ::/0               md5

Save it and restart the service: sudo service postgrestql restart.
Finally, run netstat -t and copy the localaddress(not the foreign address), example: 172.17.125.13 BUT WITHOUT the port, because you will use the port of postgres database.
Finally use the IP copied in datagrip with the info of database such as username, password, port and database.
Be careful with the port of database that you use, because if you are running postgres on Windows the port 532 is busy and you get an error. If it ocurrs you need use another port, for example 5433 in WSL that you can modify in postgres.conf in the line mention the port 5432 by default.
Hope this can help you!!


I had similar a problem with a K2000M on my laptop and using Linux Mint Cinnamon 17.2.

Expecially using a second monitor, video tearing appeared on my primary display.

The solution was to use ForceFullCompositionPipeline together with TripleBuffer

First do sudo nvidia-xconfig if the X11 configuration file xorg.conf is absent, then

sudo nano /etc/X11/xorg.conf

and add the line Option "TripleBuffer" "On" under the Section "Screen":

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "TripleBuffer" "On"
    Option         "nvidiaXineramaInfoOrder" "DFP-0"
    Option         "metamodes" "LVDS-0: 1920x1080_60 +0+840, DP-4: 1920x1080_60 +1920+0 {rotation=left}"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

In order to be able to use ForceFullCompositionPipeline = On, one could modify the line Option         "metamodes" in xorg.conf, but the problem was that when using a secondary monitor, the monitors.xml file (for the display manager) in ~/.config was overriding any modification issued by X11 reading xorg.conf at login (see here).

The solution for me was to run a script at login (using System -> Preferences -> Startup Applications) with the following command:

nvidia-settings --assign="CurrentMetaMode=LVDS-0: 1920x1080_60 +0+840 { ForceFullCompositionPipeline = On }, DP-4: 1920x1080_60 +1920+0 { ForceFullCompositionPipeline = On, rotation=left }"

where LVDS-0 is my primary display and DP-4 my secondary display (use xrandr -q for the display names)

The last lines of /var/log/Xorg.0.log now shows:

...
[   136.640] (II) NVIDIA(0): Setting mode "LVDS-0:1920x1080_60+0+840{ForceFullCompositionPipeline=On},DP-4:1920x1080_60+1920+0{ForceFullCompositionPipeline=On,rotation=left}"
...

and the video tearing disappeared...

Hope this helps on Ubuntu


Banshee: how to customize folder hierarchy?

Ops! Asking for a hidden setting, I've remembered about the existence of gconf-editor. So:

sudo apt-get install gconf-editor
gconf-editor

And changed the settings below:


Touchpad keeps working while typing even after disabling the option in configuration

Disabling the touchpad while typing can be achieved through "syndaemon." Here are the instructions from the Arch Linux Wiki, which I assume will almost certainly work on Ubuntu:

To start syndaemon you need to use Gnome's Startup Applications Preferences program. Login to Gnome and go to System > Preferences > Startup Applications. In the Startup Programs tab click the Add button. Name the Startup Program whatever you like and input any comments you like (or leave this field blank). In the command field add:

syndaemon -t -k -i 2 -d &


Can I transfer installation directory of a particular package to another computer to avoid the installation step?

Considering software installed with APT/DPKG
On most Linux systems, including Ubuntu, there's no single installation directory for a package, although sometimes 3rd party software might have all its files in a single directory.
Instead, a package contains a set of files which are placed in multiple filesystem locations. Running whereis on a package shows the directories that contain its main parts:
$ whereis gimp
gimp: /usr/bin/gimp /usr/lib/gimp /etc/gimp /usr/share/gimp /usr/share/man/man1/gimp.1.gz

We can see gimp has files in at least /usr/bin, /usr/lib, /etc and /usr/share, all of which contain many files belonging to other packages.
You can use dpkg-query -L or the --listfiles option to read the file list of a package known to dpkg:
$ dpkg --listfiles g++
/.
/usr
/usr/bin
/usr/share
/usr/share/doc
/usr/share/man
/usr/share/man/man1
/usr/bin/g++
/usr/bin/x86_64-linux-gnu-g++
/usr/share/doc/g++
/usr/share/man/man1/g++.1.gz
/usr/share/man/man1/x86_64-linux-gnu-g++.1.gz

Note that the listing includes all the parent directories, even though the g++ package obviously did not provide them (to get only files you can do something like for i in $(dpkg --listfiles g++); do [[ -f "$i" ]] && echo "$i"; done, but some package installations do create directories).
The one for g++ is a very small file listing...
$ dpkg --listfiles gimp | wc -l
254
$ dpkg --listfiles xkb-data | wc -l
331
$ dpkg --listfiles linux-image-4.10.0-24-generic | wc -l
1312

Also consider that if you simply copied all the relevant files to all the relevant locations on another system, the package manager would know nothing about it, so the package would not be updated and its dependencies would not be installed, so it probably would not work at all for hard-to-debug reasons.
What this boils down to is that for software that is installable with APT, by far the easiest way to install it is with APT. If you want to save on downloading on each system, see How can I install software or packages without Internet (offline)?.
Some people consider this distributed style of installation to be... a bug. And many of them are doing something about it, for example creating distros that install packages discretely, or inventing cross-platform packaging solutions like snaps that allow discrete installation including all dependencies.


Gnome keyring daemon not starting up properly

I could work around this problem by uninstalling dbus-user-session (and its dependendants xdg-desktop-portal and xdg-desktop-portal-gtk). Those packages came in through installing flatpak.

Thanks to Olaf who brought me on the right track (https://forum.ubuntuusers.de/topic/gnome-keyring-daemon-doppelt/)


In my case, when I had correctly chown'd the directories, somehow I ended up having the this happen when doing an ls -la of /

lrwxrwxrwx   1 root root    11 Jun 13 01:44 tools -> tools/

Once I completed the following, I was able to unpack bin-utils and go on my way to making the LFS.

sudo su
cd /
rm tools
ln -s /mnt/tools/ tools


How do I install Ubuntu Touch on a touch screen enabled laptop?

Ubuntu Touch is a mobile operating system and it works very different form traditional computer OSs. That means, that it's (currently) impossible to install it on x86 hardware. Ubuntu Touch actually uses an Android environment and hardware enablement stack to load all the proprietary firmware that is needed on the supported devices.

But that is not really a problem, because the goal with Ubuntu Touch is, to achieve Convergence, so that phones, tablets and PCs offer the same user experience and run (at some point in the future) the same software. They will become the same as soon as snaps, the new portable software packaging format, hits the shelves.

For now, you can just use Ubuntu with a touchscreen as it is. And if you want to see all the latest and greatest in Unity 8 (the next generation desktop environment that is used on Ubuntu Touch and will be default on Ubuntu soon) you can upgrade to 16.04 and set it up. Or you could install 17.04 beta or wait until 17.04 is released and check it out there.


Is there any advantage in using propietary video drivers over the open source ones?

The proprietary drivers typically enable or enhance 3D support on some cards, as well as potentially providing enhanced 2D. They are also said to allow the card to operate at a lower temperature. They might, I suppose, also enable fan control if the open driver doesn't.

In practical terms, it comes down to the combination of driver and your particular set of hardware and the programs you use. Adding the drivers, and falling back to the open driver, is easy using Additional Drivers.

In my case, during the 12.04 beta period, I found that using ATM's Radeon driver corresponded with frequent crashe of a few of the applets I was using. Since I don't need to push my machine's 3D capabilities, I opted for the open driver.


How to update Google Chrome 70 after change in 'Origin' value?

This issue has existed for some time:

  The error message clearly shows that this has to do with Google changing its name from Google, Inc to Google LLC. The error message shows what's wrong, but does not tell us what command to run to fix this problem.

  How can I accept this change explicitly as the message says?

As stated in the question linked to above from June 2018, the issue related to chrome-remote-desktop and the solution is simply to run sudo apt update and to respond with y at the prompt.

This is what I see when I run just sudo apt update without chaining it with sudo apt upgrade:

E: Repository 'http://dl.google.com/linux/chrome/deb stable Release' changed its 'Origin' value from 'Google, Inc.' to 'Google LLC'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
Do you want to accept these changes and continue updating from this repository? [y/N] y
Get:8 http://dl.google.com/linux/chrome/deb stable/main amd64 Packages [1,130 B]

Running just sudo apt update provides the [y/N] prompt.


Errors after update Lubuntu 18.04 to 18.10

Exact same thing happened to me.
You can restore the panel temporarily through these steps:
1. Press Ctrl+Alt+T to open a terminal
2. Type "lxpanel" without the quotes.

If the first step doesn't work, you need to do this first:
1. Right-click on your desktop, start a terminal.
2. sudo apt remove pcmanfm
3. sudo apt install pcmanfm-qt
4. Reboot.


How to make bootable pendrive in Ubuntu with the same Ubuntu version?

A copy of the ubuntu-19.04-desktop-amd64.iso file that you are using needs to be in a place where it can be accessed by Ubuntu that is running in live mode. Copy the ubuntu-19.04-desktop-amd64.iso file that you already downloaded to your phone so that an Ubuntu live session can browse to it and access it on your phone.
Connect a USB flash drive to your phone.
Make a bootable USB flash drive using the built-in Startup Disk Creator application. Use the built-in Disks application to find the device name of the USB flash drive, and then check in Startup Disk Creator that you are creating a bootable Ubuntu stick on that flash drive so that you don't accidentally overwrite anything on your phone.
In order to boot the Ubuntu live USB that you created on your computer, you must change the boot priority of your computer's BIOS/UEFI so that it boots to the USB flash drive first instead of booting to the OS that is installed on the hard drive. See How to change boot priority?.


Best solution to connect 3 external monitors to Dell XPS 15 9550

Was making experiments for a while and got the answer ready.

USB dongle will use a lot of CPU especially for FHD and above resolutions. As said, if there is a lot of moving\changing objects (letters, video, diagrams etc) that should be displayed through USB adapter this is not a solution in case of more than one display.
Matrox TrippleHead2Go DP edition will relay on your hardware (video adapter) and will not cost you anything in terms of performance (thus it will heat up some chips). As said if your internal video processor is able to handle needed resolution (do not forget of notebook's own display) you will be ok.
There are tow ways of slightly other approach:

3.a Use external video card connected by DisplayLink

3.b Use external video card connected by PCI-express
I will not go through both of those ways as it is out of scope for this question.


Move Chrome notifications or use system notification

So here's the problem. Like you mentioned, NPAPI is on its way out and Webkit applications are going to make heavy use of their own in-built notification system instead of respecting the one provided by a desktop environment [1]. Unless someone comes up with a way with intercepting the notification requests for the browser and have it to speak at a local daemon that can in turn speak with notify-osd; we're out of luck.

Expanding on this, KDE allows for button manipulation in its notification service whereas Ubuntu does not. If they've unified this one action as a generic feature, it might be even more feasible to implement the above. But alas.

[1]: More likely, they want to make it as rich as possible but without worrying too much about cross platform support.


I believe that I have had this problem before as well.

What you should try: Delete the network connection (from your history, so that it cannot reconnect automatically), turn off your wireless card, restart the system, turn back on your wireless card, and reconnect to your network.

Hope it works.


Ubuntu Touch apt error The repository does not have a Release file

The supported method of installing applications on Ubuntu Touch is via click packages from the Open Store, and installing via apt is not supported.

Ubuntu 16.04 is also not EOL, so would not be on old-releases host.

If you want to use apt to install development tools or such, the supported ways to do this are with Libertine or with a traditional chroot as described in my answer here.


I did figure out what the problem was in the end and I posted some updates on the Windows 8 forums in this thread here:

http://www.eightforums.com/general-support/39343-windows-8-automatic-repair-loop-issue.html

This was the solution that I gave in that thread:

  Ok, so I've marked the problem as 'solved', because I've figured out
  what was going on. Basically, almost ALL the files on my HDD
  (including the Windows system files) had been crammed into a found.000
  folder on the top level, so it's no wonder the OS couldn't boot up!
  What seems to have happened is that the HDD was damaged during the
  sudden power down and it must have unfortunately hit just the right
  part of the disk to wreck the filesystem. Then, scandisk found all the
  'orphaned' files and put them into found.000.

  It took me a while to figure out where all the files had gone, but
  it's all ok now and I've recovered 95% of my data, which is a relief!
  I've also re-installed Windows from the disk that Dell gave me - it
  was pretty straightforward.

  Thanks very much to everyone who posted with advice - I really
  appreciate your help. Also, that HIRENs boot disk is an amazing tool -
  I highly recommend it for PC maintenance. I'll definitely learn my
  lesson and create backups and restore points from now on. :-)

Since then I've been running Ubuntu & Windows 8 dual-boot on my machine with some success, although I have the occasional issue with WIndows overwriting my bootloader  :-( .

So, what exactly is the problem you are having?


I had the same problem (but could boot with resolution 1024x768, nvidia was simply not loaded) dependig on the nvidia driver for my Geforce GTX 960 and the current mainline kernel.

The problem is the following: The nvidia driver version 390 (used in Ubuntu 18.10) does not support kernel version >= 4.19.

The solution is, that you must install the current version of the driver. The easiest solution for me was to install the package from the graphic driver team:

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt install nvidia-dkms-410 xserver-xorg-video-nvidia-410
sudo reboot

After that I had Full HD again, using the current nvidia driver. The caveat is, that you must check yourself for new driver versions.


Black screen after clicking "Install Ubuntu"

May be your graphics card not detected by ubuntu. Try to install after connecting external monitor.


Ubuntu 20.04 LTS: Editing the user for a service run by a snap package

Snaps come with a number of limitations with regards to accessing locations outside of a user's home directory. If you're looking to have Sonarr run with very specific configuration settings, you might want to go with the non-Snap version.
Here's the basic installation directions:

Open a Terminal (if one is not open already)
Remove the existing Sonarr snap:
sudo snap remove sonarr

Note: Use snap list to list installed snaps to find the exact name for Sonarr if it's different to the one above.
Add Sonarr's repository to your software sources list:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0xA236C58F409091A18ACA53CBEBFF6B99D9B78493
echo "deb http://apt.sonarr.tv/ master main" | sudo tee /etc/apt/sources.list.d/sonarr.list

Update apt:
sudo apt update

Install Sonarr, which is called nzbdrone:
sudo apt install nzbdrone

Start the service:
mono --debug /opt/NzbDrone/NzbDrone.exe

Be sure to confirm that UFW is configured to allow Sonarr access to the dedicated mount location.
Source: Sonarr's Installation Wiki


Ubuntu 19.04 can not install winehq-staging

You can easily use the version for bionic (18.04.2) for the time until they have a release for it. To do so, you need to change the source list file accordingly.

I assume here you followed every other step mentioned on the winehq page you can do the following:

sudo sed -i.bak 's/disco/bionic/g' /etc/apt/sources.list.d/wine-staging.list

This will change the the source list file for wine-staging and creates a copy of the original file now ending with .bak. This should you enable to

sudo apt update
sudo apt install wine-staging

on your computer. When they have released the version for wine on 19.04 (disco) you can simply remove the changed file, rename the old one back and then do an upgrade to the package:

sudo rm /etc/apt/sources.list.d/wine-staging.list
sudo mv /etc/apt/sources.list.d/wine-staging.list.bak /etc/apt/sources.list.d/wine-staging.list
sudo apt update
sudo apt upgrade wine-staging


mdadm raid1 boot error "Create user root not found"

md126 looks like a randomly made up md number that the recovery had put there, it's usually not the one in /etc/mdadm/mdadm.conf
When a kernel is updated, it runs update-initramfs and update-grub.
They grab the md? numbers from
/proc/mdstat
/etc/mdadm/mdadm.conf

The numbers there have to be the same for initrd to boot.
Also, check in these files to see that all the md? and UUID= numbers are the same...
/boot/grub/grub.cfg
/etc/fstab
/etc/mdadm/mdadm.conf


Installing Windows10 and Ubuntu on UEFI with GPT

You need to start the installion as efi and the under windows normaly hidden boot patrtion mounted as /boot. Grub will add a extra entry for windows in grub.cfg in /boot/grub  .

you shold see a list like below afterinstallion:

Ubuntu 15.10
Windows
Ubuntu 15.10 (failsafe)
Memtest


What security differences are between click and .deb package?

Note: I work on the Ubuntu security team and helped design the application confinement story for Ubuntu. I reworded the questions for clarity.

Q: "Will click packages be safer with regard to the system and user data or will it be the same?"

A: In general, click packages are safer than debs with regard to system and user data.

Click packages do not include maintainer scripts that run as root at installation like deb packages do. Click packages are simply unpacked and then hooks provided by the system are used if declared by the click. For example, the click might declare to use a desktop hook to generate a desktop file or an AppArmor hook to generate an AppArmor profile for the app. Because deb packaging has the concept of maintainer scripts that are designed to allow for extensive customization of the software or the system, deb packages should only be installed from a trusted source, eg a signed archive from a distribution like Ubuntu. Click packages may be installed directly and you can be reasonably sure the package installation won't ruin your system. However, that is only part of the story-- if you install a click package from an untrusted source, there are no guarantees that it will declare in its manifest that it is properly confined, so while installing it is ok, running it may not be (ie, the software may run without confinement and therefore be able to steal your data or run programs as your user).

The real power of click is when it is used in combination with a software repository with strong policies. For example, the security of a click package installed from the Ubuntu App Store is typically higher than that of a deb installed from a trusted archive. This is because in the Ubuntu App Store, the trust model is apps are considered untrusted* and policies and checks are in place to ensure that click packages in the store have a proper security manifest and therefore run under very strict confinement. Contrast that to deb packages in the Ubuntu archive-- the trust model is that the software and deb packaging are considered trusted and in general the software does not run under confinement (though there are plenty of exceptions where an AppArmor profile is shipped with the software to guard against security bugs).

Trusted packages may also be delivered via the Ubuntu App Store. While uncommon, they are typically developed by Canonical and may or may not run under confinement.

To answer your specific questions:

Q: Is click based on the same system as deb?

A: The low level package format for click is deb. However, click packaging is much simpler in that it uses a declarative manifest and hooks rather than traditional packaging files and maintainer scripts.

Q: Can AppArmor provide privileged access to apps without user interaction?

A: AppArmor is root strong and can allow or deny access to system resources (files, DBus, networking, etc) based on the defined security policy. A click package on its own is not required to ship an AppArmor security manifest or to ship an AppArmor security manifest that is 'safe'. What makes the system secure is the combination of click and the policies of the store that delivers click packages. Click packages delivered via the Ubuntu App Store will use AppArmor policy that is very restrictive and does not allow privileged actions behind the scenes (eg, an app running under this policy can't execute programs on the system behind the scenes, access your facebook account, steal your gpg or ssh keys, manipulate networking, etc)

Q: Will the user be prompted at install time to grant access rights to the app like on Android? (eg, "this app is able to scan your /home and access network")

A: No. A click package itself may be installed with no prompting using lowlevel tools. On Ubuntu, click packages should be installed via the Ubuntu App store (see the above) and because of the Ubuntu App store policies combined with click capabilities and the Ubuntu system, there is no need for click-through, context-less installation prompts. Ubuntu can do this because apps installed from the Ubuntu App store run under restrictive confinement (ie they can't do bad things behind the scenes) and when an app needs additional access it does so using controlled APIs which may include prompting.

In the case of privileged APIs, we have the concept of trusted helpers such that the user will have a contextual prompt to allow or deny the access (with (optional) revokable caching so the user isn't asked each time). For example, if the app needs to access the location-service (a trusted helper), the user will be prompted to allow the access at the time the app tries to use the location-service, which gives context so the user can make an informed decision. The same will happen for video and audio recording. Often, we don't need to have a security prompt at all and we can allow access based on user-driven interactions with the app. Eg, if an app wants to upload an picture there will be a dialog to select the picture. Behind the scenes, because the app isn't allowed to access the ~/Pictures directory, it will use the content-hub API which will launch the gallery file selector for the user to choose a picture to upload. The content-hub then takes the picture from the gallery and gives it to the app. In this manner, there is no security dialog, there is only a natural interaction for the user, but behind the scenes, there is an implied trust decision.

Q: Related to this question: will .apk and click have similar language with regard to policies and user experiences?

A: No, there is no installation prompting for the reasons stated above. Android permissions and security permissions for click packages as defined for Ubuntu have some similarities, but are different and implemented differently.

Q: Specifically, with click, can an app send all my private data over the network without me knowing or will it be confined in some way to prevent this?

A: If you install a click from an untrusted source, yes, it can do anything. If you install a click from the Ubuntu App Store, no, an app can't send all your data off over the network because it does not have access to it. Of course, an app can appear to do one thing and do another so if a user grants access to the location-service or gives the app access to a picture, then the app can be evil with that data-- but that is where ratings/reviews and App Store security policies come in to effect. If an app like this is reported, it will be investigated. If appropriate, the app will be removed from the store, the app will be removed from any devices where it is installed and the developer's App Store access will be revoked.

Q: Can it be said that click packages are safer than debs, but less powerful because they are more restricted?

A: As can be seen from the above, the answer is not that simple. A click by itself may ship software that can do anything. The click packaging format is intentionally general purpose and can be used in any number of ways and is not at all specific to Ubuntu. For Ubuntu, the combination of click, Ubuntu APIs, AppArmor and App Store policies provides a very powerful environment for developers to deliver applications to users in a way that is safe and easy for people to use. The utility of the applications themselves is dependent on the APIs offered to the applications by the underlying system. The initial set of APIs that will be offered on Ubuntu's first shipping phones will allow developers to create all kinds of fun and useful applications using a rich API and SDK. These APIs will expand in their breadth and utility as we move forward to better support developers and users.


Can't start mysql - mysql respawning too fast, stopped

I finally figured out the issue. Basically, the definition of some parameters has been removed from the previous version of mysql and has been replaced with different names. To fix, in /etc/mysql/my.cnf, replace:

# Tom Added to ensure the server character set is set to utf8
default-character-set = utf8
default-collation     = utf8_general_ci

with:

# Tom Added to ensure the server character set is set to utf8
character_set_server  = utf8
collation_server      = utf8_general_ci

This is the associated launchpad bug report: https://bugs.launchpad.net/ubuntu/+source/mysql-5.5/+bug/958120.

Or easily run:

# Miraz added dpkg-reconfigure
dpkg-reconfigure mysql-server-5.5

But make sure there's no old mysql version installation installed, if there was please remove:

# Miraz quick mysql package check
dpkg -l *mysql*


Boots to GRUB and then won't start Ubuntu 17.10 except from in recovery mode

Turns out it was thermal damage to my GPU. Replaced the card and I still get the error code briefly but otherwise it boot normally.


How to use single-thread script to do batch processing?

One way:

for i in *.txt
do
   while read line
   do
     python -c "$line"
   done < $i
done


Xubuntu 14.04 does not detect second monitor

Your logs suggest that KMS is disabled through the nomodeset option:

  [     4.409] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-3.13.0-30-generic root=UUID=87d0f715-ffb9-454e-a1a8-3233df4fa25e ro nomodeset quiet splash vt.handoff=7

Without this option, the Intel (i915) and radeon video driver won't load, and thus fallback to other, more limited options. You should remove this option, it is probably present in /etc/default/grub. Once changed, you have to run sudo update-grub and reboot.


You can see the Wayland architecture page to see how it differs in design. It's supposed to simplify the whole graphics stack by forcing everything through a standard GEM/DRM stack straight into the kernel and managing compositing itself.

Compare that to the X stack where you have bits and bobs all over the place. Some of the X mess has been through flexible design, some have been growing pains. All the compositors (Compiz/Metacity/Mutter/KWin/etc) have been added as an afterthought. They are, at their core, hacks to do what X should probably be doing itself. If things carry on expanding outwards like they have been, we'll get to a point where the project become unmaintainable.

All in all, when hardware support is there, it should make the whole stack more efficient and less painful to use in standard setups.

However there are a couple of issues that I haven't seen remedies for so far:

X is pretty network-aware. You can send windows to other computers, you can have multiple screens with remote logins and all sorts of funky things like that. This might seem fairly specialist but it's widely used technology. Wayland appears fairly local and static in comparison.
There's also driver support. Closed-source drivers are yet to support the KMS/shared-GEM/shared-DRM technologies that Wayland thrives upon. A purist might be okay with Nouveau but somebody who pays £100-400 on a high performance 3D graphics card won't be happy with the flaky poor 3d performance they'd get with the current open driver.

Update: Nvidia is working to support both Wayland and Mir.

2018 update. 17.10 used Wayland as the default display server (unless you had a closed driver, or a driver that didn't support it, or needed X). 18.04 and 18.10 both use  X as global default (though you can install Wayland).

I'm not in charge of anything but from this position, it seems like we're still a metric Nvidia away from getting real traction. Until that point, I don't think we're going to see enough mindshare and developing power get behind Wayland. The gaming/performance market is using X. The MCE market are using X (and direct framebuffers). I'm not sure Wayland will ever have a real chance.


After upgrade, rc.local now gives su must be ran from a terminal in rc.local

Unsure why su -s stopped working like it did before, but sudo -u username does resolve the issue.

I did have to chain the commands together to change directory as sudo -u username resets the working directory to the user's home directory:

sudo -S -u username -i /bin/bash -l -c 'cd /opt/bin; git reset --hard'


Using Chromium 53, I get on flash applets: `Couldn't load plugin`

This is because on October 2016, Chrome 53, Chrome stopped bundling the Pepperflash plugin. Ubuntu followed suit and disabled it. Here is the official PR from Ubuntu. There are old flash packages in the repo, but they do not work for Chrome:

pepperflashplugin-nonfree - Pepper Flash Player - browser plugin (this is the Google hosted Pepperflash which they stopped hosting)
flashplugin-installer - Adobe Flash Player plugin installer (this uses NPAPI which Chrome doesn't support)
browser-plugin-freshplayer-pepperflash - PPAPI-host NPAPI-plugin adapter for pepperflash (this isn't needed because Chrome natively supports PPAPI)
flashplugin-downloader - Adobe Flash Player plugin installer (transitional package links to flashplugin-installer)

Ubuntu Way

First we make sure we have the partner repository installed. If we do, this won't do anything. Then we install adobe-flashplugin.

sudo add-apt-repository "deb http://archive.canonical.com/ubuntu $(lsb_release -sc) partner"
sudo apt-get update;
sudo apt-get install adobe-flashplugin;

Now you can go meet Hudson he Muskox on like the last remaining major site to do video distribution in flash (evil eye for Slate).


From a windows computer to an ubuntu computer

Follow these instructions to make a bootable usb stick of Ubuntu Live. Here it is summarized:

  Have a 4GB+ USB stick
  Windows XP or later
  Install Rufus
  Downlaod a Ubuntu ISO file
  Use Rufus to wipe the drive and place the ISO onto the USB
  Press OK/Yes to the two warning boxes that pop up
  You now have a bootable Ubuntu Live USB stick

Reboot your computer, and boot into the bootable usb stick. Then you will be guided through the installation instructions of Ubuntu, where you can select the options you want (wipe Windows or install alongside Windows).

You can also follow these installation instructions.


mpdboot and mpdtrace gives Alarm Clock as a result

Finally I found it. This indicated a licence problem.

The reason is that I installed Licensed mpd (not free mpd) in my virtual machine.

Then I copied the virtual machine to another computer.

That´s why the mpd can not be used in the new machine. I should update the licence.


Got it... j + f + z with KaGaPa Phonetic input method i.e. ज + ् + ञ = ज्ञ . May this be useful to somebody else....


Why do I have to unlock my private key to perform a download operation?

bzr is using a ssh-key that is stored in your keyring, the calling application would actually be ssh-agent. Your keyring has a password set so that nobody else can access that key without the password. For more information on keyrings see:
my answer to this post

THe only way that i'm aware of defaulting this behavior is to generate a private/public keypair without a password.


How to install a Virgo FTP on ubuntu 12.10 on Session fallback desktop

The location directory depends on personal preference. I'd use /opt, but any of those you mentioned, or the home folder would do.
Assuming it's in /opt, create a text file with the following content

[Desktop Entry]
Name=Virgo FTP
Comment=Virgo FTP
Exec=/opt/virgoftp/virgoftp
Icon=/opt/virgoftp/image/virgoftp32.png
Terminal=false
Type=Application
Categories=System;Settings;GNOME;GTK;
StartupNotify=true

Again, assuming it's been put in /opt, open a terminal window and run

bash /opt/virgoftp/virgoftp


Touchpad disabled after resume when previously using usb mouse

It appears that the mouse module becomes non-functional, and needs to be reloaded.

My solution was to reload the mouse module. This makes my touchpad work again.

Unfortunately you need sudo to do this.

sudo modprobe -r psmouse && sudo modprobe psmouse


How to remove a package from the list of packages to be installed in apt-get?

The only correct way to make apt not try and install vim-runtime is to sudo apt-get remove vim.

Dpkg crashing while unpacking vim-runtime is either a serious bug, or an indication that something's wrong with your hardware.  (Although hardware errors are usually more random.)


Share Internet Connection With Symbian device, no, not the other way around

Try GnuBox on phone (works via bluetooth).
But if your phone supports Wifi, buy cheap router (like DIR-300), it will be much faster.


I don't think packages for all the new apps that you have mentioned are available in the gnome ppas, so far I have seen only the following.

Weather app - The package name is gnome-weather, and is available via the Gnome 3 staging ppa.

Gnome music is available via ricotz/testing.

Gnome maps is in the staging ppa.


802.11n can be both 2.4GHz and 5GHz. I'd guess your card only supports 2.4GHz. The  product page does not mention 5GHz at all. You can see a few chips with 5GHz support on the product list, and the support is mentioned explicitly, unlike the case of the BCM43142.


wireless hardware switch disabled in a compaq presario CQ57-339WM notebook pc

It was the BOIS I went in to the BOIS by hitting F10 before the computer loaded Ubuntu and used the load default setting on the exit tab of the BOIS and then exited the BOIS started Ubuntu up and my wireless is now working and and the hard block is gone

0: hp-wifi: Wireless LAN
    Soft blocked: no
    Hard blocked: no
1: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no


How to pass SIGALRM to a program which finishes execution in milliseconds?

Create a short shell script:

#!/bin/sh
./prime 5 &
sleep 0.001
kill -14 $!

You may experiment in adjusting the value to the right of the sleep command or get rid of it altogether.

Also note that especially on a busy multi-user system you have no way of guaranteeing that the process will actually get the signal.

Edit: borrowed the $! idea from murus answer


WWAN-modem disabeling by itself, Ubuntu 14.10, Lenovo T440s, Sierra Wireless EM7345 4G LTE

I had the same issue on Ubuntu 14.04 on a Lenovo Thinkpad W541 with a Sierra Wireless EM7345 4G LTE with firmware: FIH7160_V1.2_WW_01.1415.07
I read in the EM7345 firmware 1.1 Changelog that the issue of random disconnects and then failing to reconnect has been fixed in 1.2. I can confirm that the issue still persists in 1.2 and there aren't any updates for Lenovo W541.
The solution is to cut power to the integrated Sierra Wireless EM7345 modem (which is technically an USB device), to force a hard restart. I tried absolutely every soft restart possible until I stumbled onto the possibility of cutting power to an USB port completely without shutting down my laptop.
Follow these steps:
1. find out the bus path of your Sierra Wireless EM7345 modem with:
$ lsusb -t

search for "cdc" in the output, here's mine:
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/3p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/8p, 480M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/3p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/15p, 480M
    |__ Port 5: Dev 2, If 0, Class=Chip/SmartCard, Driver=usbfs, 12M
    |__ Port 6: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 6: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 6: Dev 3, If 2, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 7: Dev 4, If 0, Class=Vendor Specific Class, Driver=, 12M
    |__ Port 10: Dev 14, If 0, Class=Communications, Driver=cdc_mbim, 480M
    |__ Port 10: Dev 14, If 1, Class=CDC Data, Driver=cdc_mbim, 480M
    |__ Port 10: Dev 14, If 2, Class=Communications, Driver=cdc_acm, 480M
    |__ Port 10: Dev 14, If 3, Class=CDC Data, Driver=cdc_acm, 480M
    |__ Port 12: Dev 7, If 0, Class=Video, Driver=uvcvideo, 480M
    |__ Port 12: Dev 7, If 1, Class=Video, Driver=uvcvideo, 480M

here you can see that in Bus 01 Port 10 there is a cdc device (the Sierra Wireless EM7345 modem), this means its path is: 1-10
2. send the modem into a soft restart:
$ sudo modem-cmd /dev/ttyACM0 AT+CFUN=16

there will be no output if its successful.
this command does not close itself, so CTRL+C kill it
3. shut off power to the modem (you need to be root):
$ echo '1-10' |sudo tee /sys/bus/usb/drivers/usb/unbind

wait for a few second until the device is shut down, when there is no activity in /var/log/syslog
4. turn power back on to the modem:
$ echo '1-10' |sudo tee /sys/bus/usb/drivers/usb/bind

After that it will take 1..2 seconds for the modem to start, its done when there is no activity in syslog
5. tick Enable Mobile Broadband in NetworkManagers tray icon right click menu.
6. connect to your chosen Mobile Broadband connection like usual
Or use this script:
I wrote a small bash script to do all this, which I start with gksudo:
#!/bin/bash
# run this with root!!
# if this doesnt work, check if the bus path is correct with:
# lsusb -t (search for cdc)

modem-cmd /dev/ttyACM0 AT+CFUN=16 &
sleep 1
killall modem-cmd
echo '1-10' |tee /sys/bus/usb/drivers/usb/unbind
sleep 2
echo '1-10' |tee /sys/bus/usb/drivers/usb/bind

Appendum
here's my syslog for SEO purposes:
Every time I suspend my laptop or disconnect the Mobile Broadband connection or when the Mobile Broadband connection dies by itself (happens sometimes):
Also, the modem sometimes disconnects on its own:
Nov  6 02:19:44 L4 avahi-daemon[1075]: Interface wwan0.IPv6 no longer relevant for mDNS.
Nov  6 02:19:44 L4 avahi-daemon[1075]: Leaving mDNS multicast group on interface wwan0.IPv6 with address fe80::d8a3:4fff:fec9:d56e.
Nov  6 02:19:44 L4 avahi-daemon[1075]: Interface wwan0.IPv4 no longer relevant for mDNS.
Nov  6 02:19:44 L4 avahi-daemon[1075]: Leaving mDNS multicast group on interface wwan0.IPv4 with address 10.144.34.75.
Nov  6 02:19:44 L4 kernel: [258309.296360] usb 1-10: USB disconnect, device number 13
Nov  6 02:19:44 L4 kernel: [258309.296416] cdc_mbim 1-10:1.0 wwan0: unregister 'cdc_mbim' usb-0000:00:14.0-10, CDC MBIM
Nov  6 02:19:44 L4 NetworkManager[1024]:    SCPlugin-Ifupdown: devices removed (path: /sys/devices/pci0000:00/0000:00:14.0/usb1/1-10/1-10:1.0/net/wwan0, iface: wwan0)
Nov  6 02:19:44 L4 ModemManager[982]: <info>  (net/wwan0): released by modem /sys/devices/pci0000:00/0000:00:14.0/usb1/1-10
Nov  6 02:19:44 L4 avahi-daemon[1075]: IP_DROP_MEMBERSHIP failed: No such device
Nov  6 02:19:44 L4 avahi-daemon[1075]: Withdrawing address record for fe80::d8a3:4fff:fec9:d56e on wwan0.
Nov  6 02:19:44 L4 avahi-daemon[1075]: Withdrawing address record for 10.144.34.75 on wwan0.
Nov  6 02:19:44 L4 avahi-daemon[1075]: Withdrawing workstation service for wwan0.
Nov  6 02:19:44 L4 ModemManager[982]: [/dev/cdc-wdm0] unexpected port hangup!
Nov  6 02:19:44 L4 ModemManager[982]: <info>  (usbmisc/cdc-wdm0): released by modem /sys/devices/pci0000:00/0000:00:14.0/usb1/1-10
Nov  6 02:19:44 L4 kernel: [258309.319654] cdc_acm 1-10:1.2: failed to set dtr/rts
Nov  6 02:19:44 L4 ModemManager[982]: <info>  (tty/ttyACM0): released by modem /sys/devices/pci0000:00/0000:00:14.0/usb1/1-10
Nov  6 02:19:44 L4 NetworkManager[1024]: <info> (cdc-wdm0): device state change: activated -> unmanaged (reason 'removed') [100 10 36]
Nov  6 02:19:44 L4 NetworkManager[1024]: <info> (cdc-wdm0): deactivating device (reason 'removed') [36]
Nov  6 02:19:44 L4 NetworkManager[1024]: <warn> (12) failed to find interface name for index
Nov  6 02:19:44 L4 NetworkManager[1024]: nm_system_iface_flush_routes: assertion 'iface != NULL' failed
Nov  6 02:19:44 L4 NetworkManager[1024]: <warn> (12) failed to find interface name for index
Nov  6 02:19:44 L4 NetworkManager[1024]: <warn> (12) failed to find interface name for index
Nov  6 02:19:44 L4 NetworkManager[1024]: nm_system_iface_flush_routes: assertion 'iface != NULL' failed
Nov  6 02:19:44 L4 NetworkManager[1024]: <warn> (12) failed to find interface name for index
Nov  6 02:19:44 L4 NetworkManager[1024]: <info> Writing DNS information to /sbin/resolvconf
Nov  6 02:19:44 L4 NetworkManager[1024]: <info> (cdc-wdm0): cleaning up...
Nov  6 02:19:44 L4 NetworkManager[1024]: <info> (cdc-wdm0): taking down device.
Nov  6 02:19:44 L4 NetworkManager[1024]: <info> Unmanaged Device found; state CONNECTED forced. (see http://bugs.launchpad.net/bugs/191889)
Nov  6 02:19:44 L4 dbus[956]: [system] Activating service name='org.freedesktop.nm_dispatcher' (using servicehelper)
Nov  6 02:19:44 L4 NetworkManager[1024]: <warn> (cdc-wdm0) failed to disconnect modem: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface 'org.freedesktop.ModemManager1.Modem.Simple' on object at path /org/freedesktop/ModemManager1/Modem/3
Nov  6 02:19:44 L4 dbus[956]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Nov  6 02:19:44 L4 dbus[956]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Nov  6 02:19:45 L4 kernel: [258309.563672] usb 1-10: new high-speed USB device number 14 using xhci_hcd
Nov  6 02:19:45 L4 kernel: [258309.699555] usb 1-10: New USB device found, idVendor=1199, idProduct=a001
Nov  6 02:19:45 L4 kernel: [258309.699558] usb 1-10: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Nov  6 02:19:45 L4 kernel: [258309.699559] usb 1-10: Product: Sierra Wireless EM7345 4G LTE
Nov  6 02:19:45 L4 kernel: [258309.699560] usb 1-10: Manufacturer: Sierra Wireless Inc.
Nov  6 02:19:45 L4 kernel: [258309.699561] usb 1-10: SerialNumber: 013937005331614
Nov  6 02:19:45 L4 kernel: [258309.720394] cdc_mbim 1-10:1.0: setting rx_max = 16384
Nov  6 02:19:45 L4 kernel: [258309.720903] cdc_mbim 1-10:1.0: cdc-wdm0: USB WDM device
Nov  6 02:19:45 L4 kernel: [258309.721035] cdc_mbim 1-10:1.0 wwan0: register 'cdc_mbim' at usb-0000:00:14.0-10, CDC MBIM, da:a3:4f:c9:d5:6e
Nov  6 02:19:45 L4 kernel: [258309.721963] cdc_acm 1-10:1.2: ttyACM0: USB ACM device
Nov  6 02:19:45 L4 mtp-probe: checking bus 1, device 14: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-10"
Nov  6 02:19:45 L4 mtp-probe: bus: 1, device: 14 was not an MTP device
Nov  6 02:19:45 L4 NetworkManager[1024]:    SCPlugin-Ifupdown: devices added (path: /sys/devices/pci0000:00/0000:00:14.0/usb1/1-10/1-10:1.0/net/wwan0, iface: wwan0)
Nov  6 02:19:45 L4 NetworkManager[1024]:    SCPlugin-Ifupdown: device added (path: /sys/devices/pci0000:00/0000:00:14.0/usb1/1-10/1-10:1.0/net/wwan0, iface: wwan0): no ifupdown configuration found.
Nov  6 02:19:46 L4 ntpd[23035]: Deleting interface #5 wwan0, fe80::d8a3:4fff:fec9:d56e#123, interface stats: received=0, sent=0, dropped=0, active_time=2433 secs
Nov  6 02:19:46 L4 ntpd[23035]: Deleting interface #3 wwan0, 10.144.34.75#123, interface stats: received=144, sent=144, dropped=0, active_time=2433 secs
Nov  6 02:19:46 L4 ntpd[23035]: 91.189.94.4 interface 10.144.34.75 -> (none)
Nov  6 02:19:46 L4 ntpd[23035]: 212.7.1.132 interface 10.144.34.75 -> (none)
Nov  6 02:19:46 L4 ntpd[23035]: 193.40.0.5 interface 10.144.34.75 -> (none)
Nov  6 02:19:46 L4 ntpd[23035]: 5.101.116.20 interface 10.144.34.75 -> (none)
Nov  6 02:19:46 L4 ntpd[23035]: 46.22.223.220 interface 10.144.34.75 -> (none)
Nov  6 02:19:46 L4 ntpd[23035]: peers refreshed
Nov  6 02:19:48 L4 ModemManager[982]: [/dev/cdc-wdm0] Queried max control message size: 512
Nov  6 02:19:48 L4 ModemManager[982]: <info>  Creating modem with plugin 'Generic' and '3' ports
Nov  6 02:19:48 L4 ModemManager[982]: <info>  Modem for device at '/sys/devices/pci0000:00/0000:00:14.0/usb1/1-10' successfully created
Nov  6 02:19:48 L4 ModemManager[982]: [/dev/cdc-wdm0] Queried max control message size: 512
Nov  6 02:19:49 L4 ModemManager[982]: <info>  Modem: state changed (unknown -> disabled)
Nov  6 02:19:49 L4 NetworkManager[1024]: <warn> (cdc-wdm0): failed to look up interface index
Nov  6 02:19:49 L4 NetworkManager[1024]: <info> WWAN now disabled by management service
Nov  6 02:19:49 L4 NetworkManager[1024]: <info> (cdc-wdm0): new Broadband device (driver: 'cdc_mbim, cdc_acm' ifindex: 0)
Nov  6 02:19:49 L4 NetworkManager[1024]: <info> (cdc-wdm0): exported as /org/freedesktop/NetworkManager/Devices/6
Nov  6 02:19:49 L4 NetworkManager[1024]: <info> (cdc-wdm0): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
Nov  6 02:19:49 L4 NetworkManager[1024]: <info> (cdc-wdm0): deactivating device (reason 'managed') [2]
Nov  6 02:19:49 L4 NetworkManager[1024]: <info> NetworkManager state is now DISCONNECTED
Nov  6 02:19:49 L4 NetworkManager[1024]: <info> (cdc-wdm0): device state change: unavailable -> disconnected (reason 'none') [20 30 0]
Nov  6 02:19:46 L4 ntpd[23035]: Deleting interface #5 wwan0, fe80::d8a3:4fff:fec9:d56e#123, interface stats: received=0, sent=0, dropped=0, active_time=2433 secs
Nov  6 02:19:46 L4 ntpd[23035]: Deleting interface #3 wwan0, 10.144.34.75#123, interface stats: received=144, sent=144, dropped=0, active_time=2433 secs
Nov  6 02:19:46 L4 ntpd[23035]: 91.189.94.4 interface 10.144.34.75 -> (none)
Nov  6 02:19:46 L4 ntpd[23035]: 212.7.1.132 interface 10.144.34.75 -> (none)
Nov  6 02:19:46 L4 ntpd[23035]: 193.40.0.5 interface 10.144.34.75 -> (none)
Nov  6 02:19:46 L4 ntpd[23035]: 5.101.116.20 interface 10.144.34.75 -> (none)
Nov  6 02:19:46 L4 ntpd[23035]: 46.22.223.220 interface 10.144.34.75 -> (none)
Nov  6 02:19:46 L4 ntpd[23035]: peers refreshed
Nov  6 02:19:48 L4 ModemManager[982]: [/dev/cdc-wdm0] Queried max control message size: 512
Nov  6 02:19:48 L4 ModemManager[982]: <info>  Creating modem with plugin 'Generic' and '3' ports
Nov  6 02:19:48 L4 ModemManager[982]: <info>  Modem for device at '/sys/devices/pci0000:00/0000:00:14.0/usb1/1-10' successfully created
Nov  6 02:19:48 L4 ModemManager[982]: [/dev/cdc-wdm0] Queried max control message size: 512
Nov  6 02:19:49 L4 ModemManager[982]: <info>  Modem: state changed (unknown -> disabled)
Nov  6 02:19:49 L4 NetworkManager[1024]: <warn> (cdc-wdm0): failed to look up interface index
Nov  6 02:19:49 L4 NetworkManager[1024]: <info> WWAN now disabled by management service
Nov  6 02:19:49 L4 NetworkManager[1024]: <info> (cdc-wdm0): new Broadband device (driver: 'cdc_mbim, cdc_acm' ifindex: 0)
Nov  6 02:19:49 L4 NetworkManager[1024]: <info> (cdc-wdm0): exported as /org/freedesktop/NetworkManager/Devices/6
Nov  6 02:19:49 L4 NetworkManager[1024]: <info> (cdc-wdm0): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
Nov  6 02:19:49 L4 NetworkManager[1024]: <info> (cdc-wdm0): deactivating device (reason 'managed') [2]
Nov  6 02:19:49 L4 NetworkManager[1024]: <info> NetworkManager state is now DISCONNECTED
Nov  6 02:19:49 L4 NetworkManager[1024]: <info> (cdc-wdm0): device state change: unavailable -> disconnected (reason 'none') [20 30 0]

after that I can no longer reconnect:
Aug 26 16:45:03 L4 NetworkManager[965]: <info> Activation (cdc-wdm1) starting connection 'EE Elisa Any'
Aug 26 16:45:03 L4 NetworkManager[965]: <info> (cdc-wdm1): device state change: disconnected -> prepare (reason 'none') [30 40 0]
Aug 26 16:45:03 L4 NetworkManager[965]: <info> Activation (cdc-wdm1) Stage 1 of 5 (Device Prepare) scheduled...
Aug 26 16:45:03 L4 NetworkManager[965]: <info> Activation (cdc-wdm1) Stage 1 of 5 (Device Prepare) started...
Aug 26 16:45:03 L4 NetworkManager[965]: <info> Activation (cdc-wdm1) Stage 1 of 5 (Device Prepare) complete.
Aug 26 16:45:03 L4 ModemManager[923]: <info>  Simple connect started...
Aug 26 16:45:03 L4 ModemManager[923]: <info>  Simple connect state (4/8): Wait to get fully enabled
Aug 26 16:45:03 L4 ModemManager[923]: <info>  Simple connect state (5/8): Register
Aug 26 16:45:03 L4 ModemManager[923]: <info>  Simple connect state (6/8): Bearer
Aug 26 16:45:03 L4 ModemManager[923]: <info>  Simple connect state (7/8): Connect
Aug 26 16:45:03 L4 ModemManager[923]: <info>  Modem /org/freedesktop/ModemManager1/Modem/12: state changed (registered -> connecting)
Aug 26 16:45:03 L4 NetworkManager[965]: <info> (cdc-wdm1) modem state changed, 'registered' --> 'connecting' (reason: user-requested)
Aug 26 16:45:03 L4 ModemManager[923]: <info>  Modem /org/freedesktop/ModemManager1/Modem/12: state changed (connecting -> registered)
Aug 26 16:45:03 L4 NetworkManager[965]: <info> (cdc-wdm1) modem state changed, 'connecting' --> 'registered' (reason: user-requested)
Aug 26 16:45:03 L4 NetworkManager[965]: <warn> (cdc-wdm1) failed to connect modem: Failure
Aug 26 16:45:03 L4 NetworkManager[965]: <info> (cdc-wdm1): device state change: prepare -> failed (reason 'unknown') [40 120 1]
Aug 26 16:45:03 L4 NetworkManager[965]: <info> Marking connection 'EE Elisa Any' invalid.
Aug 26 16:45:03 L4 NetworkManager[965]: <warn> Activation (cdc-wdm1) failed for connection 'EE Elisa Any'
Aug 26 16:45:03 L4 NetworkManager[965]: <info> (cdc-wdm1): device state change: failed -> disconnected (reason 'none') [120 30 0]
Aug 26 16:45:03 L4 NetworkManager[965]: <info> (cdc-wdm1): deactivating device (reason 'none') [0]


Boot Ubuntu in Command line without loading graphics drivers?

I figured this out myself. I just had to create an Ubuntu Server (and not Desktop) flash drive. Then I was able to successfully boot in rescue command line.

It seems that busybox shell environment on Ubuntu server image does not come with scp tool. So I just had to let the recovery tools to mount the previous partition to be able to copy over my files to a backup server.


abcde: What is an ~/.abcde.conf file to rip to multiple formats?

The web author of andrews-corner has moved to other areas of interest now but preserved here is an ~/.abcde.conf that will rip to 11 different audio formats at the same time:

# -----------------$HOME/.abcde.conf----------------- #
#
#  A sample configuration file to convert music cds to
#  MP3, Ogg Vorbis, FLAC, Musepack, AAC, WavPack, Opus,
#  Monkey's Audio (ape), True Audio, AC3 and mp2, 11 formats
#  at the same time! Using abcde version 2.7.2 release version.
#
#   Acknowledgements to http://andrews-corner.org
# -------------------------------------------------- #

# Encode tracks immediately after reading. Saves disk space, gives
# better reading of 'scratchy' disks and better troubleshooting of
# encoding process but slows the operation of abcde quite a bit:
LOWDISK=y

# Specify the method to use to retrieve the track information,
# the alternative is to specify 'musicbrainz':
CDDBMETHOD=cddb

# Make a local cache of cddb entries and then volunteer to use
# these entries when and if they match the cd:
CDDBCOPYLOCAL="y"
CDDBLOCALDIR="$HOME/.cddb"
CDDBLOCALRECURSIVE="y"
CDDBUSELOCAL="y"

OGGENCODERSYNTAX=oggenc                 # Specify encoder for Ogg Vorbis
MP3ENCODERSYNTAX=lame                   # Specify encoder for MP3
FLACENCODERSYNTAX=flac                  # Specify encoder for FLAC
MPCENCODERSYNTAX=mpcenc                 # Specify encoder for Musepack
AACENCODERSYNTAX=fdkaac                 # Specify encoder for AAC
OPUSENCODERSYNTAX=opusenc               # Specify encoder for Opus
WVENCODERSYNTAX=wavpack                 # Specify encoder for Wavpack
APENCODERSYNTAX=mac                     # Specify encoder for Monkey's Audio
TTAENCODERSYNTAX=tta                    # Specify encoder for True Audio
MP2ENCODERSYNTAX=twolame                # Specify encoder for MP2
MKAENCODERSYNTAX=ffmpeg                 # Specify encoder for MKA (AC3 via FFmpeg)

OGGENC=oggenc                           # Path to Ogg Vorbis encoder
LAME=lame                               # Path to MP3 encoder
FLAC=flac                               # Path to FLAC encoder
MPCENC=mpcenc                           # Path to Musepack encoder
FDKAAC=fdkaac                           # Path to the AAC encoder
OPUSENC=opusenc                         # Path to Opus encoder
WVENC=wavpack                           # Path to WavPack encoder
APENC=mac                               # Path to Monkey's Audio encoder
TTA=tta                                 # Path to True Audio encoder
TWOLAME=twolame                         # Path to MP2 encoder
FFMPEG=ffmpeg                           # Path to FFmpeg (AC3 via FFmpeg)

OGGENCOPTS='-q 6'                       # Options for Ogg Vorbis
LAMEOPTS='-V 2'                         # Options for MP3
FLACOPTS='-s -e -V -8'                  # Options for FLAC
MPCENCOPTS='--extreme'                  # Options for Musepack
FDKAACENCOPTS='-p 2 -m 5 -a 1'          # Options for fdkaac
OPUSENCOPTS="--vbr --bitrate 128"       # Options for Opus
WVENCOPTS="-hx3"                        # Options for WavPack
APENCOPTS="-c4000"                      # Options for Monkey's Audio
TTAENCOPTS=""                           # Options for True Audio
TWOLAMENCOPTS="--bitrate 320"           # Options for MP2
FFMPEGENCOPTS="-c:a ac3 -b:a 448k"      # Options for MKA (AC3 via FFmpeg)

OUTPUTTYPE="ogg,mp3,flac,mpc,m4a,opus,wv,ape,tta,mp2,mka"  # Encode to 11 formats!

# The cd ripping program to use. There are a few choices here: cdda2wav,
# dagrab, cddafs (Mac OS X only) and flac. New to abcde 2.7 is 'libcdio'.
CDROMREADERSYNTAX=cdparanoia

# Give the location of the ripping program and pass any extra options,
# if using libcdio set 'CD_PARANOIA=cd-paranoia'.
CDPARANOIA=cdparanoia
CDPARANOIAOPTS="--never-skip=40"

# Give the location of the CD identification program:
CDDISCID=cd-discid

# Give the base location here for the encoded music files.
OUTPUTDIR="$HOME/Music"

# The default actions that abcde will take.
ACTIONS=cddb,playlist,read,encode,tag,move,clean

# Decide here how you want the tracks labelled for a standard 'single-artist',
# multi-track encode and also for a multi-track, 'various-artist' encode:
OUTPUTFORMAT='${OUTPUT}/${ARTISTFILE}-${ALBUMFILE}/${TRACKNUM}.${TRACKFILE}'
VAOUTPUTFORMAT='${OUTPUT}/Various-${ALBUMFILE}/${TRACKNUM}.${ARTISTFILE}-${TRACKFILE}'

# Decide here how you want the tracks labelled for a standard 'single-artist',
# single-track encode and also for a single-track 'various-artist' encode.
# (Create a single-track encode with 'abcde -1' from the commandline.)
ONETRACKOUTPUTFORMAT='${OUTPUT}/${ARTISTFILE}-${ALBUMFILE}/${ALBUMFILE}'
VAONETRACKOUTPUTFORMAT='${OUTPUT}/Various-${ALBUMFILE}/${ALBUMFILE}'

# Create playlists for single and various-artist encodes. I would suggest
# commenting these out for single-track encoding.
PLAYLISTFORMAT='${OUTPUT}/${ARTISTFILE}-${ALBUMFILE}/${ALBUMFILE}.m3u'
VAPLAYLISTFORMAT='${OUTPUT}/Various-${ALBUMFILE}/${ALBUMFILE}.m3u'

# This function takes out dots preceding the album name, and removes a grab
# bag of illegal characters. It allows spaces, if you do not wish spaces add
# in -e 's/ /_/g' after the first sed command.
mungefilename ()
{
  echo "$@" | sed -e 's/^\.*//' | tr -d ":><|*/\"'?[:cntrl:]"
}

MAXPROCS=2                                # Run a few encoders simultaneously
PADTRACKS=y                               # Makes tracks 01 02 not 1 2
EXTRAVERBOSE=2                            # Useful for debugging
COMMENT='abcde version 2.7.2'             # Place a comment...
EJECTCD=y                                 # Please eject cd when finished :-)

Keep in mind that this ~/.abcde.conf can also be used for a single audio codec rip and encode by using something like the following:

abcde -o mp3

This will utilise the 'mp3' section of the conf file only... How cool is the command line :)


Mount device as RW for root and RO for everyone else

First, unmount fooReadOnly with
sudo umount /mnt/fooReadOnly

Then, change the permission of fooReadOnly to 555
sudo chmod 555 /mnt/fooReadOnly
This is needed because entering a directory requires execute privilege.

Finally, remount fooReadOnly
sudo mount -o remount,bind,ro /mnt/foo /mnt/fooReadOnly


Wine doesn't work (Problem with the mount manager)

I found out that the problem is just a several bugs, and have been fixed with the latest wine update. No more responds are necessary, and thank you very much.


How to package a single text file into a .deb?

For your use case you would not use a new package to modify your configuration.  Rather, you should rebuild the package that you are modifying with a modified default config (via a patch).  Then, you would upload that package to a PPA or similar repository system for easy installation.

Packaging a single file into a .deb just to change a different .deb's config file is not advised given that if that other .deb is modified and you ahve an explicit version in your debian/control, and the new version is too new, your system will reject the config-changing .deb.

Please comment on this answer with why you specifically want a .deb to do the conf changes, and I can elaborate on how you'd go about doing this, if at all.

  Well, first is that I imagined that making such a .deb would be a no-brainer, secondly I don't expect the config to change a lot, and I think that if I repackage another package I will need to update my package as soon as an update arrives to the original one (?). I'd greatly appreciate your help, the package I'm trying to change the config of is collectd, and I just need to replace /etc/collectd/collectd.conf in the postinstall script – Fluffy

Making a .deb is not a no-brainer, you actually need substantial understanding of how packaging works among other things.  You will have to update your package once an update arrives from the original one, but that can be partially decided based upon changelogs, including but not limited to what package currently exists in Ubuntu, and what is fixed in the differing version.  But once you have the patch, you can apply it just as easily in the new version as it is to apply it to the old version, hence why I mentioned that.

  Do I need to download the current .deb, unpack and edit it, or do I have to deal with the original source code? – Fluffy

This question is unanswerable in its current form, so let me elaborate on other questions i've seen:

  What is a Source Package?

A source package is a package in which the binary installer packages (.debs) are built from.  They contain the entire source code of a program, but with all applicable patches and Debian package information in them.

  Does editing a source package mean i'm editing the source code of the program?

Not necessarily.  The source code of the program is indeed what the package is built from, but unless you're changing that code, you could modify a package without even touching the code.  Depending of course, on what you are trying to do.

So to explain simply, regardless of whichever you do here you'll need to edit either the source code of the program downloaded upstream, or the source code contained within the package.  So the "Original Source Code" is going to be worked with regardless.  The postinst scripts and other installation-related scripts though are stored in debian/* within the package, and are not part of the source code.

Patches to packages are touched upon in the packaging guide: http://developer.ubuntu.com/packaging/html/patches-to-packages.html

The complete Ubuntu Packaging Guide is here: http://developer.ubuntu.com/packaging/html/

After recieving additional information via email, the configuration is being updated for a specific package in order to include some type of restricted API that has a single-use key.

My method statement of using a PPA would not be recommended in this case given that API keys are usually specific to individual configurations, and such modified configurations should not be publicized, so that others don't try to hijack those configs.


You mentioned it contains photos.
Nautilus might be generating thumbnails for your files hence the hang

try this in terminal

ls 'your directory location here'

and see if you geting list of entire files contained without hanging

or else try another file manager called thunar

sudo apt-get install thunar

its pretty fast and has inbuilt multiple renaming feature


Unity launcher for Intellij duplicate after application loading

You can get Intellij to generate the icon in /usr/share/applications for you to copy to your launcher:

Open a terminal, in idea/bin folder
Start IntelliJ with ./idea.sh
Tools -> Generate Desktop Entry
Close IntelliJ
In the terminal, start nautilus as admin (gksudo nautilus)
Go to /usr/share/applications
Drag the new icon for IntelliJ to your launcher


How to get a full list of available packages with key word from terminal

Aptitude is your swiss army knife for package management.

For example searching packages in section 'python' thats not 'installed' and starts with 'python'.

aptitude search '~spython!~i^python'

(Long verion)

aptitude search '?narrow(?section(python) ?not(?installed), ^python)'


You need to disable Secure Boot if you are using UEFI.

With Secure Boot enabled hibernation is disabled for security reasons.


Unable to launch Topcoder IcedTea Arena in ubuntu 14.04

For TopCoder (and this may work for other sites too), for the current version of Java from Oracle (Java 8 update 91 while posting), you may NOT be able to launch the arena by simply running the command javaws ContestAppletProd.jnlp because of some newly added security restrictions in Java. In order to be able to launch TopCoder arena, I had to perform the following -

Open Java Control Panel by running command javaws -viewer on terminal.
On the Security tab, set the desired security level to High to have somewhat permissive behavior.
Add TopCoder to the Exception Site List in the same tab. For me, adding the TopCoder URL alone didn't suffice. I had to add the HTTP URL (http://www.topcoder.com) to the list as well to be able to launch the arena.
Apply these changes to Java Control Panel and relaunch the arena by running the command javaws ContestAppletProd.jnlp.

Hope this helps!


Can't get workrave window to display under Ubuntu Gnome

Alright, so I happened upon the solution by playing around with the tweak tool. Basically you have to find the applet icon by turning on some non-default settings.

Open Tweak Tool
Go to Extension
Turn on the Window list extension

Now there should be a tool bar at the bottom of the screen that displays all active apps. In the bottom right corner there should be a circle with a number in it , click on it and you should see the workrave applet icon (workrave needs to already be running).

After I set up my workrave preferences I just turned off window list.


how to change Alt+Tab window highlight color in Unity 2D

Based on the answer found here:   How I turn off backlight around switcher icons

Short Answer

You need to edit the file /usr/share/unity/5/launcher_icon_glow_200.png. I used GIMPs Colors -> Map -> Color Exchange to edit the color to my liking.

Long Answer (had inline images, but my rep is too low)

I first used the referenced answer to delete the background PNG as described and then was able to locate the file(s) you want to edit. In my case, I found that just changing the glow was not enough.

First make a back up of the two files, launcher_icon_selected_back_150.png and launcher_icon_glow_200.png.

cd /usr/shar/unity/5
sudo cp launcher_icon_selected_back_150.png launcher_icon_selected_back_150.png.bak
sudo cp launcher_icon_glow_200.png launcher_icon_glow_200.png.bak

You can edit the two files however you like. To keep it simple, I edited just the background color:

sudo gimp launcher_icon_selected_back_150.png

I personally made the selected background darker. If some Gimp effect isn't working, make sure you change the color mode to RGB.

Here's what it looks like when I alt + tab looks now:


Why did my Bluetooth headset disappear from Sound Settings and how can I get it back?

Found my answer here:

Get rid of 0.5s latency when playing audio over Bluetooth with A2DP

blt@aurora:/$ pactl list cards short
0   alsa_card.pci-0000_01_00.1  module-alsa-card.c
1   alsa_card.usb-Generic_Turtle_Beach_USB_Headset_0000000001-00-Headset    module-alsa-card.c
2   alsa_card.pci-0000_00_14.2  module-alsa-card.c
8   bluez_card.C8_84_47_04_21_6F    module-bluetooth-device.c

blt@aurora:/$ pactl set-card-profile bluez_card.C8_84_47_04_21_6F a2dp

and it works again


Can I execute multiple lines sudo commands?

There's several approaches to letting multiple commands run with sudo.

The first one suits your use-case best. Others are added for the sake of exploring alternatives; they may not suit your particular need, but may come in handy to you in the future or other users.

Approach #1: Cleanest and simplest

Put everything into a script, for example myscript.sh, make the file executable with chmod 755 myscript.sh, and run that script with sudo myscript.sh

Approach #2: long string of commands

You need something with superuser privileges to run multiple commands. That would be shell, ( any shell for that matter, bash or sh ) . Shells have a -c flag, which tells them to run a command or a set of commands separated by a semicolon ;. Simple example: sudo bash -c 'apt-get update; apt-get upgrade'. In particular, kyodake's answer can be re-done like so:

sudo bash -c 'apt-get update;apt-get install --reinstall aptitude deborphan mate-desktop; aptitude remove '?and(?reverse-depends(unity),?not(?reverse-depends(?exact-name(mate-desktop))))';aptitude remove '?and(?reverse-depends(ubuntu),?not(?reverse-depends(?exact-name(mate-desktop))))';aptitude remove '?and(?reverse-depends(gnome),?not(?reverse-depends(?exact-name(mate-desktop))))';apt-get install --reinstall mate-desktop;deborphan;apt-get --purge remove $(deborphan);deborphan --libdevel;apt-get --purge remove $(deborphan --libdevel);deborphan --find-config;dpkg --purge $(deborphan --find-config);apt-get autoremove;apt-get clean;reboot'

Lengthy ? Yes. This approach works better when you need to run just a few commands with sudo.

Approach #3: playing with sudo timeout

By default, the sudo privilege times out after 15 minutes. So if you are certain all those commands won't take that long, you could run the first command with sudo and will be prompted for password; for all the subsequent commands you won't be prompted, but you still need to type sudo.

Approach #4: using root shell

As kyodake suggested himself in the answer, log-in to a root shell with sudo -i to use the root privilege until you exit. Note, that this is not recommended for security reasons. Unless you are 100% certain you will remember to log out once you are done working and no-one will get into your root shell, then... use this approach at your discretion.


Keyboard and touchpad not working on new laptop

You can install the operating system using external usb keyboard. After installation the laptop keyboard and trackpad will start worling. If not, you will need to enable external drivers in "Software and updates" application in ubuntu.


Installed Ubuntu with the wubi installer, but can't find it.

Since you've installed Ubuntu using the Wubi installer, just reboot--then you'll get a screen to choose whether to run Ubuntu or Windows. (You'll get this choice every time.)


Netbeans installer stopped, can't install or uninstall


How do I restrict the users from installing applications from being installed on the linux machine?

If the users have sudo privileges, it is almost impossible to restrict them from doing something unless you specify a whitelist of specific commands they are allowed to use.

If asking the users not to do something is not good enough, then look at this SuperUser SE answer for other possible solutions.


Unable to mount partition from NAS RAID array to recover data

I used these instructions and was able to see the LVM both in terminal window and in GUI interface.

But then:

mount /dev/vg8/lv8 /mnt/sd1

Generated:
    “Wrong fs type, bad option, bad superblock on /dev/mapper/vg8-lv8,
     missing codepage or helper program, or other error”

Followed the advice and used

mkfs.ext4 /dev/vg8/lv8

But got message

/dev/vg8/lv8 contains a ext4 file system
  last mounted on /shares/public on Tue Sept 16 20:00:52 1975
Proceed anyway?

JerryFrey suggested using a file recovery such as foremost. I ended up doing that and recovered all the files albeit without file names or a directory tree.


How to view .HEIC photos from iPhone IOS 11+ on Ubuntu?

HEIC is the file format name Apple has chosen for the new HEIF (High Efficiency Image Format) Standard. Using advanced and modern compression methods, it allows photos to be created in smaller file sizes while retaining a higher image quality compared to JPEG/JPG.
Every iOS update comes with a host of changes, but some are not immediately obvious. ... HEIC will be used by default on new photos on iOS 11, and it's designed to save you storage space. As it's a new container format, there will be some incompatibilities along the way, and Apple does a good job at handling most of these.
To view these .HEIC images on Ubuntu, do this...
sudo apt update
sudo apt install heif-gdk-pixbuf
sudo apt install heif-thumbnailer
sudo apt install libheif1:amd64

Then save one of the .HEIC images to your ~/Pictures folder, right-click on the image icon, select Properties, and set the default application to Open With as Image Viewer.
Now a double-click on the image icon will open the file in Image Viewer for viewing.
Image thumbnails will also be seen in Files (Nautilus) windows.
In Thunderbird you can now also view these images in the original email attachment bar.


Permission denied error when trying to install with wubi

Wubi is trying to download the desktop CD ISO for the install using a bittorrent client. It requires that pyrun.exe (the python runtime that Wubi uses) be given permission to your windows firewall. If you granted pyrun.exe firewall access (there would have been a popup asking permission) then you may be blocked by an upstream firewall e.g. some colleges/universities block bittorrents.

If that's the case you should download the desktop CD iso yourself from http://www.ubuntu.com/download/ubuntu/download and save it in the same directory as wubi.exe before running (and Wubi will find it and use it).


Cannot Write Image to USB drive using usb-creator-gtk

I have decided to use Unetbootin for Ubuntu, an application with all the features of usb-creator-gtk and more. It can be downloaded at unetbootin.sourceforge.net and it is a completely free and open-source application. I, however, am still disappointed that usb-creator-gtk can't handle this image, as Unetbootin handled it gracefully without complaining.


To install Opera in Ubuntu read below:

  There are two basic types of installations, static and shared:

  Static version: Opera has the Qt library built in. It is a larger
  download, and it does not use antialiased fonts on menus or the file
  chooser, and uses aliasing in the browser window and most other
  interface elements.

  Shared version: Opera uses the Qt installation on your system. It
  integrates with the system, using whatever anti aliasing setting you
  have for other Qt applications.

  The shared version is probably better, as some of the resources it
  uses (e.g., RAM for the Qt libraries) can be reused by other
  applications. Try the other one if you run into installation or
  operational problems.1

Read On

1Source:Ubuntu Documentations