How to tell thunderbird to display HTML messages?

You can try:

View => Message Body As => Original HTML


Foreman doesn't start with "Invalid gemspec" error

I found a solution - edit gemspec files by opening an admin "session":

Alt+F2 then type gksudo nautilus and browse to, edit and save .gemspec files.

Both problem files require the dates edited from 2011-11-10 00:00:00.000000000Z to 2011-11-10


I am afraid nobody can possibly tell you that it is safe. That would mean that we can be 100% sure that the changes made after 3.8.2 will not affect your installation. That is obviously impossible. The prudent way would be to test the new version on a test system that is not used for production, and if nothing goes wrong as far as you can see, upgrading your production system.

It might be wise to read the release notes though.


Removing firefox make me install kde library (I am using unity)

The firefox package provides www-browser. When you remove firefox when there are no any other packages in your system that provides www-browser, apt will automatically select another package that provides www-browser to install. In your case, it selected rekonq, the KDE browser.

If you don't want to install KDE, you should install another browser first, say Chrome, before removing Firefox.


Bose Color II SoundLink Bluetooth Speaker Volume Adjustment Disabled

You can list the output devices with this command;

>>pactl list short sinks

0   alsa_output.pci-0320_00_2b.0.analog-stereo  module-alsa-card.c  s16le 2ch 44100Hz   SUSPENDED
4   bluez_sink.ZZ_AA_AA_AA_AA_XD.a2dp_sink  module-bluez5-device.c  s16le 2ch 44100Hz   RUNNING

The first column indicates the index of device.

Then set the volume (e.g.) from 100% to 200% for the device with index 4. This index can be different for you local.

>>sudo pactl -- set-sink-volume 4 200%


How can I discover the hostnames for all the machines on my lan?

Avahi tools
There also are tools from the Avahi package to list services.

avahi-browse (from avahi-utils)
Command line tool that browses the network for any services used by Avahi.
  avahi-browse -at

avahi-discover
Is a GUI to display all Avahi services available:


How can I set up an automatic check for supervision (monitoring of services) on Ubuntu 12.04 with ps?

Ok, so ... !

This "process sandbox feature" seems to happen only on 12.04.

One way to bypass this is to allow the expected user to run ps as sudo:

Edit /etc/sudoers :

accountname ALL = NOPASSWD: /bin/ps

Then use sudo ps -aux instead of ps -aux.


you use python3, but virtualenv uses python2 by default. So you need to modify it.

Add the following sentence at the end of the '~/.bashrc',to modify the default python and configure virtualenv：

VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
export WORKON_HOME=~/.environments
source /usr/local/bin/virtualenvwrapper.sh

and then reload this configuration file with the command：

source ~/.bashrc


I have accidently install two versions of ubuntu and need to uninstall one of them

I'm assuming you installed both on your machine in a disk partition and are running one of them through your linux live USB drive.

To remove 14.04, just format the partition where you've installed that version of Ubuntu (while you're on Ubuntu 15.10).

After formatting, you could merge that partition with another on your disk drive.


This is the command. If you met with an error comment the error.

sudo cp -R /etc/default/grub /backup/config/grub


Check files, fix damaged and restore missing files, 14.04

You can run a terminal command

sudo touch /forcefsck

This will force the system to check all disks on the next reboot.


How to debug sshd not running at startup on server

Your attempt at copying to /etc/rc2.d/ssh was almost right.

In order for a script in /etc/rcX.d to be run at startup, it has to be called SxxZZZ where S is a literal S (for Start; you can also use K for Kill at shutdown time), xx is a number representing where in the order of startup it runs (01 first, 99 last), and ZZZ is your script name.

So, you'd want something like S90ssh. The number isn't critically important, 90 should be ok, the network will be up by then etc.

Note it will also have to be set executable - I don't know if the system you're using will allow you to do that? Hopefully copying the existing ssh script and simply renaming will keep the executable bits set.

As an alternative, /etc/rc.local can be used as a generic all-purpose startup script. Simply drop /usr/sbin/sshd in there before the exit line to get sshd started as a last resort.

Give that a go and update your question if you're still having trouble :)

You can check in /var/log/auth.log (/var/log/syslog does not contain sshd messages by default) for a line like:

sshd[18838]: Server listening on 0.0.0.0 port 22.

to see if it's starting.


How to restore the shortcut for the "fancy window switch?

I'm guessing you mean this:

If this is what you had, you can use CompizConfig Settings Manager to edit that.

To get it, enter this into terminal:

sudo apt-get install compizconfig-settings-manager

After it installs, go to Window Management > Shift Switcher and enable it. When you do this, you should get a popup about key bindings. Select Resolve Conflicts and select Disable Exit Expo (Or something like that).

If you don't have CCSM, I'm not entirely too sure how you got that. I only know of how to use it through CCSM, but others may be able to help.


Change or reset default download application in Firefox

Firefox used the application defined in

~/.local/share/applications/mimeapps.list

for type application/octet-stream under [Default Applications].

In my case it was like this :

[Default Applications]
application/octet-stream=geany.desktop

You can set it to another application. If you remove this line, firefox will used the one defined under [Added Associations].

If you remove also the application/octet-stream under [Added Associations], then firefox will give you only the option to save the file.


Outlook is a software which runs on Windows only, not Linux. So if you want to use Outlook on Ubuntu, you will have to use a Windows emulator like WINE to make Outlook run on your Linux.


Some links I've managed to find are...

http://lazka.github.io/pgi-docs/api/AppIndicator3_0.1/classes/Indicator.html
http://developer.ubuntu.com/api/devel/ubuntu-12.04/python/AppIndicator3-0.1.html
http://developer.ubuntu.com/api/devel/ubuntu-13.10/c/AppIndicator3-0.1.html
http://developer.ubuntu.com/api/devel/ubuntu-14.04


Are you booting from USB? Switch USB ports. It is also possible that some BIOS menu features were enabled that should be disabled. Less likely a feature should be enabled that isn't. I recommend restoring factory default in your BIOS/EFI setting menu. If that doesn't resolve the issue, It is possible that you have a failed piece of hardware...anything from a dead switch in a LSI to a EM damaged component on the MotherBoard. But, before you go crazy with it...If this is a computer with another port for your boot hard drive, you could try switching that port too...

This is  a fairly common occurance, and it seems that one answer does not remedy for everyone experiencing this.


The upstream kernel version shipped in 11.04 is 2.6.38.

You can look at the package source in Launchpad to see other versions for each release.


After using Finger command.

Login     Name       Tty      Idle  Login Time   Office     Office Phone
user      user       tty1        *  Jun  4 07:53

* - after the terminal name states that write status permission is denied.

^ - If standard output is a socket, finger will emit a carriage return (^M)
     before every linefeed (^J). This is for processing remote finger requests
     when invoked by fingerd.

Source : Finger Manpage


I understand you solved your problem by upgrading, but here's how I did it:

According to dkms.conf, the 3.10 patch should be applied for both 3.10 and 3.11 kernels, but I guess somewhere along the way the patch became unnecessary.

The solution is to edit /usr/src/nvidia-331-xxx.yy/dkms.conf.  Change the line saying

PATCH_MATCH[0]="^3.1[01]"

to

PATCH_MATCH[0]="^3.10"

and then reconfigure the package:

sudo dpkg-reconfigure nvidia-331


The command rm -rf is the same as rm -r -f.
From rm's man page (type man rm in a terminal to see it) -r does:
remove directories and their contents recursively

And -f does:
ignore nonexistent files and arguments, never prompt

So in combination they do both.
In fact it is a very dangerous command because it will recursively remove everything within the directory you choose (or just remove the file you choose), and it will do so without ever prompting you.
Please use this command with care!


Let's break this into its constituent parts:

The date part

date -u : as explained in man date, the -u flag makes it print the Coordinated Universal Time
+%V : the data command takes a format argument which is given after a +. For example:

$ date +%m/%d/%y
05/04/14

See man date for a list of all the formats it can produce. The %V means:

  %V     ISO week number, with Monday as first day of week (01..53)

So, this week it will return:

$ date +%V
18

And next week it will return 19.
$(uname) : this will simply print the result of the uname command which should be Linux on a Linux system.

So, putting all that together, the date command will print WeekNumberLinux:

$ date -u +%V$(uname)
18Linux

The sha256sum part

sha256sum simply takes an input string and applies a hashing function to it. This produces a long string that is unique to the input given:

$ date -u +%V$(uname) | sha256sum
9a93b71d5b2841e649195bc81f8e38600860a040bc368cdbd0cde346b73248a1  -

The sed part

The sed commmand uses the susbtitution operator (s/pattern/replacment/) which will substitute pattern with replacement. In this case, the pattern is \W which means "All non-word characters", meaning anything that's not [A-Za-z0-9_], not a letter, not a number and not an underscore. This is used to remove the trailing space and - from the output of sha256sum.

So, the command is a simple way of making sure you are not a robot. Since the date is printing the current week, your output will always be the same until next week when it will change.


Uninstall build dependencies using apt-get

In order to find a package dependecies you can use apt-rdepends, to install run:

sudo apt-get install apt-rdepends

How to use: sudo apt-rdepends [options] [pkgs ...]

For example: apt-rdepends bash will print a list like this:

bash
  Depends: base-files (>= 2.1.12)
  Depends: debianutils (>= 2.15)
  PreDepends: dash (>= 0.5.5.1-2.2)
  PreDepends: libc6 (>= 2.15)
  PreDepends: libtinfo5
base-files
  PreDepends: awk
awk
debianutils
  Depends: sensible-utils
  PreDepends: libc6 (>= 2.15)
  ...

you can find these dependencies with apt-rdepends and then remove them by:

sudo apt-get remove --purge [PACKAGE_NAME]


Move WUBI installation of Ubuntu to a different partition in Windows failed

Do you have a copy of the original root.disk in a safe place? If not restore the original file from Windows backup and keep in a safe place.

Uninstall Ubuntu from control panel.
Reboot.
Reinstall using WUBI using exactly the same specifications as the
original.
Reboot to Ubuntu and check that Ubuntu boots correctly.
Reboot to Windows and copy the original from the safe place to the
boot location, such as C:\Ubuntu\Disks.
Reboot to Ubuntu.

One more step

See https://askubuntu.com/a/55029/14916 for details (Thanks to bcbc for pointing out this part.) The following is taken from that answer:

Assuming Ubuntu is being moved from D: to C: and if D: is /dev/sda2 and C: is /dev/sda1, then you'd hit 'e' on the first entry of the grub menu and change:

set root=(hd0,2) becomes set root=(hd0,1)

Delete the line - search --no-floppy xxx (as this overrides the previous set root command using the old UUID)

linux /boot/vmlinuz-xxxx root=/dev/sda2 ... becomes linux /boot/vmlinuz-xxx root=/dev/sda1 ...

This is a one-time override - hit Ctrl+X to boot, and make sure you run sudo update-grub after booting to fix the grub.cfg menu so it works the next time.

PS: There may be some variations. (hd0,2) could be (hd0, msdos2) or (/dev/sda, msdos2) depending on the version of Grub. Also root=/dev/sda2 may be root=UUID=xxxxx

Hope this helps


Ignore sudo in bash script if using root

In your scripts, towards the beginning, define sudo to be a function that calls the actual sudo if needed:

sudo ()
{
    [[ $EUID = 0 ]] || set -- command sudo "$@"
    "$@"
}

command sudo foo bar tells bash to use the actual sudo command instead of functions or aliases. $EUID is the effective user ID, which might be different from $UID.


How can I change language but only for the terminal?

Tl; dr
since you want to set everything to English (assuming that programs using GNU gettext should use Greek as a fallback language):
export LANG=en_US.UTF-8
export LANGUAGE=en:el

Or if some LC_* variables are defined already in your shell's environment and you wish to override them:
export LC_ALL=en_US.UTF-8
export LANGUAGE=en:el

To make the settings stick, add the exports at the end of ~/.bashrc.

Changing /etc/default/locale will affect the whole system's locale and consequently the locale of all users who didn't set a specific locale, so you shouldn't change it if you want to change only the language of the command running in your user's terminal / console.
The locale of the commands running in your user's terminal / console can be changed by exporting the following environment variables:
LANG
LANGUAGE
LC_ADDRESS
LC_ALL
LC_COLLATE
LC_CTYPE
LC_IDENTIFICATION
LC_MEASUREMENT
LC_MESSAGES
LC_MONETARY
LC_NAME
LC_NUMERIC
LC_PAPER
LC_TELEPHONE
LC_TIME

LANG defines the value to be used for each non-explicitly defined LC_* variable; so if none of the LC_* variables is currently defined in your shell's environment (that is the default behavior, if env | grep '^LC_' doesn't output anything it means that's the case) and you wish to set the value of all the categories to en_US.UTF-8, simply export LANG:
export LANG=en_US.UTF-8

Otherwise you'll have to either also override each previously defined LC_* variable or (alternatively, more easily) just export LC_ALL, which overrides any previously defined LC_* variable:
export LC_ALL=en_US.UTF-8

However programs using GNU gettext will rely on LANGUAGE rather than LANG / LC_ALL (unless LANG / LC_ALL is set to C) and will set the language based on its content. LANGUAGE should define a list of colon-separated languages. If a translation for the first colon-separated language listed is not available, the program will try to use to the second colon-separated language listed etc; for example, to set English as the preferred language and Greek as a fallback language:
export LANGUAGE=en:el

So in your case, since you want to set everything to English (assuming that programs using GNU gettext should use Greek as a fallback language):
export LANG=en_US.UTF-8
export LANGUAGE=en:el

Or if some LC_* variables are defined already in your shell's environment and you wish to override them:
export LC_ALL=en_US.UTF-8
export LANGUAGE=en:el

To make the settings stick, add the exports at the end of ~/.bashrc.


How do I put a graphics driver into use?

Even if jockey-text reports Not in use it doesn't mean that the driver is not in use.

To really determine if the nvidia driver is in use, run the following commands.

lsmod | grep nvidia

I you see nvidia then the nvidia driver is loaded. If not, you need load it.

Then run

nvidia-settings

It's a graphical utility that will not only let you know which version of the driver that you're running but also let you configure multi-monitor setup among other things.

From the command line, you can also run the following command to get the driver details.

modinfo nvidia_experimental_310


How to understand kernel choice at startup

You can think of the kernel as just another program on your computer. The particular version you choose doesn't affect which other programs are installed.

Generally, newer versions of the kernel provide increased system stability and better hardware support. As they become available they are used in Ubuntu, but they are not strictly associated with any particular Ubuntu release. The kernel is developed separately from Ubuntu, and each Ubuntu release is likely to receive several kernel upgrades over its lifetime.

Ubuntu only runs one kernel at a time, so in an ideal world we should be able to install newer kernels just as we install newer applications — in place of the old version, leaving only one copy installed at a time. Since the kernel is vital to the system's ability to boot, however, it receives special treatment. Older versions are kept around as backups in case a newer version doesn't work. You should never have to use them, but, hypothetically, if one day Ubuntu doesn't boot after an upgrade, you might be able to recover by selecting an older kernel.

It doesn't hurt to leave older kernels installed, so unless you're running out of disk space there's not really any reason to remove them.


It can take a long time - it is encrypting 2TB of "random" data to prime the drive.  This is much safer than using the drive plain particularly if it had data on it from before.

I can't give you a better idea how long it will take - it will vary heavily based on CPU power, USB speed and drive speed.  I would expect to run it overnight, perhaps longer.


Possibly the grub issues can be resolved using boot-repair! To know more about this, visit the link it explains that, you can install this on a liveCD/USB or directly in a working ubuntu install and it will attempt to find all O/S installs and repair the overall Grub MBR.

To re install the kernel, follow this link

HTH!


The terminal does not show anything when you type your password. This is for security purposes. Simply type your password and hit enter.

Your sudo password is your user password. The "default" is whatever password you use to log in. If there was a default password, Ubuntu would be extremely insecure, so we don't do that.


Why isn't the application launcher letting me resize it?

Look for the file "FullRepresentation.qml" (mine was in /usr/share/plasma/plasmoids/org.kde.plasma.kickoff/contents/ui/FullRepresentation.qml)
Open terminal sudo kate.
Drag and drop "FullRepresentation.qml" or open it from the menus.
Edit the Layout.minimumWidth: units.gridUnit * XX and the Layout.minimumHeight: units.gridUnit * XX values to whatever you like. Those are the width and height values of the Kickoff menu.
Save

I've set mine to W28 and H40.


Are there any Ubuntu-compatible laptops with a 1600x900 screen that are 1.1" thick or less?

Try the Lenovo Thinkpad T510 or T520 with integrated graphics. The NVidia Optimus video hardware isn't Linux-compatible and won't be for a while (more information).

1600x900 resolution
matte screen
no problems with Ubuntu
very high quality hardware


ftp server can have either anonymous or user authenticated. Check put this Official Ubuntu 14.04 wiki page for ftp server. Also visit this tutorial for step by step guide.


Installing graphics driver to fix resolution using vga to a 23 inch hd flat screen, ubuntu 16.04 64bit

I get this error when executing last command "xrandr: cannot find
  output "VGA-1" – ScottF Jan 3 '17 at 2:09

That is because the 'VGA-1' monitor doesn't exist. To check your monitors type:

xrandr --listmonitors

and write the correct monitor, in my case VGA1.


Try to configure lxdbr0 by

dpkg-reconfigure -p medium lxd

Maybe it's because lxdbr0 is not configured yet.
Let me know if it works for you.


Initial boot after installation works, all subsequent boots freeze on Dell Inspiron Mini

Shutdown the computer
Boot into Recovery Mode --After BIOS load, hold down Shift key to
access the grub menu --Once in grub menu, select the entry ending in
"(recovery mode)"
From the next menu selected option to enter Root Session
At the root session, execute command mount -o rw,remount / to
remount the filesystem as read-write
Execute sudo systemctl mask systemd-backlight@leds\:dell\:\:kbd_backlight.service

Sources:

https://ubuntuforums.org/showthread.php?t=2332063&p=13525821#post13525821
https://askubuntu.com/a/117954/42551


How do I restore Xubuntu desktop to default?

If you want to revert back to Gnome, then you should first remove XFCE desktop then reinstall Gnome desktop.

Removing XFCE:

sudo apt-get purge xfce4
sudo apt-get autoclean
sudo apt-get autoremove

reinstalling Gnome desktop:

sudo apt-get install --reinstall gnome-shell
sudo dpkg-reconfigure gdm
sudo apt-get update && sudo apt-get upgrade


Unable to import ova file - kernel driver issue Again

Actually disabling the secure boot did the tick to do 'modeprobe' , which again helped me in installing my VM (windows 10 ) . thanks all for suggesting edits and taking time to answer.


How do I restore sources that are ignored on upgrade?

Maybe this apt line is no more valid for maverick (10.10) version and it was only available for lucid (10.04).


Filesystem filling up due to large uvcydnctrl-udev.log file

1. Step: Find out what problem you actually have

When your filesystem is unexpectedly full, there are a lot of possible causes. See Eliah Kagan's answer for some more about this. In the vast majority of cases it should be easy to identify (and eventually repair) the real cause, so reformatting/reinstalling would not be necessary.

So the first step is to find out, what exactly is the problem, i.e., where has the missing space gone. So first execute

df -hl -x tmpfs -x devtmpfs

This shows a list of all the used partitions of the disks in your machine, their size, how full they are and their mount point. From this list, take the one which you think is too full and note its mount point. In your case, it is the root file system which is mounted at /.

Now we analyze where inside this file system the space is used. Execute

 sudo du -xhsc /* 2> /dev/null

(Replace / with the mount point identified above.)
It needs sudo because not all directories might be readable for your user. It may take some time (especially on large file systems) because it needs to visit every single directory on them.

What this command does is to show you each file and directory inside the given directory together with its size (including subdirectories).
So from this list take the one(s) which you think is larger than it should be, and call the command again on this directory. (That is, run the command again, but with the name of a big directory from a previous listing replacing /.)

For example, in your case it was clear /var was the only big directory, so you would need to execute

 sudo du -xhsc /var/* 2> /dev/null

Continue with these steps until you have either found a single file which is so big, or you have found a directory with lots of files that together take up all that space.

In your case the next step was to execute

 sudo du -xhsc /var/log/* 2> /dev/null

because /var/log was so big, and this showed you that there was a single log file named uvcdynctrl-udev.log with 174GB (which is obviously bad).

2. Step: Identify why the files are there and why there are so big

Now we need to find out why the identified are there, or why they are so big, if they are expected to be there.

In your case, a log file in /var/log is nothing suspicious, but its size surely is. Fortunately, a Google search simply with the file name brings up the following bug report as the first hit, which is clearly the same problem as we have:  http://bugs.launchpad.net/ubuntu/+source/libwebcam/+bug/811604

3. Step: Solve the problem

In this case, a log file of some webcam-related stuff seems not to be interesting, so we can easily delete it with the command sudo rm /var/log/uvcdynctrl-udev.log and free all the space.

Unfortunately, the bug report is still open, and there are no solutions or workarounds in the comments, so you probably have to live with this bug for now. You can delete the log file from time to time to free some space.


You don't have to do that!

As you have read elsewhere the best answer is, don't mess with the system folders. You can move the /home folder to a dedicated partition in the HDD (your sdb) using the official help page However, I recommend keeping the /home as well as /home/[upir user ID] in the SSD as all your personal configuration files are there. Keeping the personal configuration in the SSD keeps the system snappy.

Steam

Steam games take up a lot of space. However, it does not keep the games in the system folders, such as /usr. Your steam games are in /home/[your user name]/.local/share/Steam. See Where are Steam games installed?

See Installing programs in root vs home partitions? for more on the how to use an SSD and HDD.

Follow the instructions in Do I need Intel Smart Response when installing Ubuntu? to move some of your large personal folders like ~/.local/share/Steam to your hard drive and create symbolic links to the SSD.

I recommend creating an ext4 partition in sdb so that file and folder permissions used by Ubuntu can be preserved. These will be lost if you dump the folders in a NTFS partition. See I want to reformat my home partition from ext3 to ntfs

Also see How to save applications for re-install or upgrade? for why moving some apps to a different partition and keeping the default apps in their original place is a bad idea.

Hope this helps


Will my system be able to handle full disk encryption?

Performance

Disk encryption will lead to a small yet measurable performance decrease since the computer needs to perform an additional step during disk access. However, the bottle neck on a system with specs like yours will almost always be the disk itself and not the processing power required for encryption or decryption.

If you encrypt less data (e. g. only the home directory instead of the whole system) the performance difference will be smaller for obvious reasons. This only applies if you use the same encryption scheme in both instances! The home directory encryption offered by Ubuntu will use eCryptfs as opposed to dm-crypt for full disk encryption. The former is known to be slower than the latter but offers more flexibility (i. e. encrypting only a subset of files on a file system and with different keys, e. g. for different users).

Major problems

You'll lose all encrypted files if you lose the key or password (e. g. due to forgetfulness, a partial disk failure, or a mistake during repartitioning). Therefore it's very important to back up the key file and keep a note with the password in one or (better yet) more safe places. The key file is not the same as the password and neither can substitute the other. (In fact, the password is used to decrypt the key which is needed to decrypt the data.)


Dependecy problem when trying to remove emacs


2nd hand ASUS Ux31 need to delete users and reset laptop

For security reasons it is not recommended to keep an Ubuntu installation from an unknown predecessor.

They may have installed software you never need.
They may have made customization you can not undo without knowing where to look.
Their data may be interesting for the nosy part in us but they will use up space you prefer to use for your own data.
They may even have accidentally (or in the worst case intentionally) installed software capable of spying on you.

Therefore you should start new from scratch. Usually a fresh installation of Ubuntu will take you less than half an hour. After that you will be sure that the system is clean, and to your liking.

For an installation guide see: How do I install Ubuntu?


Is it possible to achieve autocomplete to predifined text in gnome-terminal?

In bash, you can simply use aliases to achieve what you want. Just type the alias, then continue providing the arguments with tab completion.

If you need to effectively expand your alias before executing the command, then press the hotkey Ctrl+Alt+e. Thus, after you have typed the name of your abbreviation (= an alias), press that key combination to see the alias expanded.

See here on how to create a permanent alias.


I've found out that the applets use different icons than what comes in an icon theme. It says what the icon is in it's applet.js file. It's easy to find it, open the file and search for "icon-name" or "icon_name" and you should be able to find it.
These usually have "symbolic" in their name. These are also the same icons that are used in Gnome-Shell's panel


You've installed Flash on your system, but this does not enable the Firefox Flash plugin, meaning that any websites you visit within firefox won't be able to use it.

To get Flash for Firefox itself, you can visit http://get.adobe.com/flashplayer - installing this will enable you to use Flash websites properly.


There are a lot of guides online regarding the config and steps for 'hardening' postfix.

This one courtesy of http://security-24-7.com/hardening-guide-for-postfix-2-x/

Hardening guide for Postfix 2.x

Make sure the Postfix is running with non-root account:

ps aux | grep postfix | grep -v '^root'

Change permissions and ownership on the destinations below:

chmod 755 /etc/postfix
chmod 644 /etc/postfix/*.cf
chmod 755 /etc/postfix/postfix-script*
chmod 755 /var/spool/postfix
chown root:root /var/log/mail*
chmod 600 /var/log/mail*

Edit using nano or vi, the file /etc/postfix/main.cf and add make the following changes:
Modify the myhostname value to correspond to the external fully qualified domain name (FQDN) of the Postfix server, for example:

myhostname = myserver.example.com

Configure network interface addresses that the Postfix service should listen on, for example:

inet_interfaces = 192.168.1.1

Configure Trusted Networks, for example:

mynetworks = 10.0.0.0/16, 192.168.1.0/24, 127.0.0.1

Configure the SMTP server to masquerade outgoing emails as coming from your DNS domain, for example:

myorigin = example.com

Configure the SMTP domain destination, for example:

mydomain = example.com

Configure to which SMTP domains to relay messages to, for example:

relay_domains = example.com

Configure SMTP Greeting Banner:

smtpd_banner = $myhostname

Limit Denial of Service Attacks:

default_process_limit = 100
smtpd_client_connection_count_limit = 10
smtpd_client_connection_rate_limit = 30
queue_minfree = 20971520
header_size_limit = 51200
message_size_limit = 10485760
smtpd_recipient_limit = 100

Restart the Postfix daemon:

service postfix restart


Will windows 8 work after i install Ubuntu 12.04?

For the question related to installing Ubuntu on a computer with Windows 8 see the answer in Installing Ubuntu Alongside a Pre-Installed Windows with UEFI that should cover everything related to installing Ubuntu on a computer with Windows 8. Note that if you do not suffer from the UEFI issue, you only need to install Ubuntu. The grub will simply work and grab the Windows 8 partition. Tested on way too many computers / laptops.

If you however, did it backwards, with this I mean, you have Ubuntu and installed Windows afterwards. Then you need to follow the answers found in How can I repair grub? (How to get Ubuntu back after installing Windows?)

In any case, since 13.04 came out, I recommend using 13.04 over 12.04. You will have better support for issues like this, more hardware support, more fixes, optimizations and more. For a brief explanation of why I would suggest to go with the 13.04 release please read install 13.04 or stay with 12.04 LTS?


'multiple active partition" error while booting ubuntu from USB

Open gparted and deleta all partitions the make a new partition FAT/Full space of the usb flash drive, then install ubuntu again on the flash drive


Black screen with mouse cursor upon boot, Fixed by logging in

From what I understand, [and correct me if I'm wrong] your problem is stated in the title and is Unity-related. Can you try:

sudo apt-get install ppa-purge
sudo ppa-purge ppa:unity-team/staging
sudo apt-get update
sudo apt-get install --reinstall ubuntu-desktop
sudo apt-get install unity

You can also try going to Synaptic Package Manager and "Mark for Reinstallation" only after you've done the above.

If I'm wrong, though, please clarify what exactly you're trying to fix/do.


Mounting partition to /mnt does not work

The /etc/fstab file is showing that the partitions are all trying to mount to /mnt/ rather than /mnt/partition_#. You could edit the /etc/fstab file by hand to correct this, adding the partition directory name after the /mnt/ in the bottom 4 lines of the file, but you must save a copy of the file first. Your system may cease to function if you mess up the editing of the file. It's not advisable to do this unless you're confidant of your actions. You can find the UUID for each disk partition using the sudo blkid command.

It is probably more sensible to try to use the GUI tool again, and ensure that there are no spaces between /mnt/ and partition_#. You may also need to make the partition directories first, but I'm not sure that's necessary


I see you use sudo in one of your winetricks commands: that could be the main problem, as sudo shouldn't be used with wine or winetricks (only when running sudo apt-get install wine); see my comment at the end of my post.*

When I successfully installed d3dx9 to a separate wine prefix, which I see you are also using, I used the below command in the terminal.

WINEPREFIX=$HOME/.myprefixname winetricks d3dx9

This is part of the voluminous output I got from the command using the WINEPREFIX:

Executing cabextract -q -d /home/mike/.myprefixname/dosdevices/c:/windows/system32 -L -F d3dx9*.dll /home/mike/.myprefixname/dosdevices/c:/windows/temp/_d3dx9/apr2006_d3dx9_30_x86.cab

You must change .myprefixname to the name of your own prefix; for more explanation of wine prefixes and their use, please see this question.

You only need to specify WINEARCH=win32 or the 64bit equivalent when you create the prefix, as it can't be altered afterwards, as noted at WineHQ. Wine will also refuse to load if you specify a different WINEARCH to the one you created it with.

Just entering in terminal winetricks d3dx9 would instead install directX to your default ~/.wine folder.

*It is most important to note that when installing things with winetricks or using wine, you don't need to use sudo, as you are not installing the files to the system, but to your Wine folder or separate wine prefix in your home folder. Using sudo might cause the problem you are experiencing with paths, as is noted on the  actual link given. In the WineFAQ it notes that

  Running with sudo...has the added bonus of breaking the permissions on your ~/.wine folder in the process. If you have run Wine with sudo you need to fix the permission errors... and then run winecfg to set Wine up again.

So, I should also check your permissions and refer to the WineFAQ article, as you will need to reset your permissions even if you reinstall wine. If you have used sudo with wine and now root owns some of the files, you will need to change the permissions by running the following commands from the WineFAQ:

cd $HOME
sudo chown -R $USER:$USER .wine

Replace .wine with your prefix if you use a WINEPREFIX or use the command for both your .wine folder and your prefix if you have both.


Can you double check to make sure your wireless has not been disable in BIOS, looks like only your Ethernet card and not wireless. This laptop should use a Broadcom 43xx wireless card, if wireless is enable, try the following

sudo apt-get install firmware-b43-installer

and reboot.


warning: setlocale: LC_ALL: cannot change locale

Try the following commands

sudo locale-gen fr_FR
sudo update-locale LANG=fr_FR


With Ubuntu One shut down, is there a way to sync applications between computers?

I'm adding this as a new answer now that I have a better understanding of what the full requirements are.

Install SpiderOak, Copy, DropBox or some other file syncing software on all machines.
Set the software up on the source computer to sync a directory that here we'll refer to as '~/SyncDir'
Schedule a cron job to regularly (daily?) run the following: sudo dpkg --get-selections | sed "s/.*deinstall//" | sed "s/install$//g" > ~/SyncDir/packageList
On the target computer, use the following script to watch for changes in the package list as it gets synced:

while true; do
 change=$(inotifywait -e close_write,moved_to,create .)
 change=${change#./ * }
 if [ "$change" = "packageList" ]; then sudo aptitude update && cat ~/SyncDir/packageList | xargs sudo aptitude install -y; fi
done

That should do it. You could theoretically run both parts on all machines so that they would see each others changes as well but there might be some tweaks required to stop it from continually updating. you also may need to move the "sudo aptitude update && cat pkglist | xargs sudo aptitude install -y" section into a shell script rather that running it directly inside the 'watch' script.


How to rename a network interface in 20.04

Using netplan which is the default these days..
File /etc/netplan/50-cloud-init.yaml file.
Find the target devices mac/hw address  using the lshw command:-
ilshw -C network

You'll see some output which looks like:-
root@ys:/etc# lshw -C network
  *-network
       description: Ethernet interface
       physical id: 2
       logical name: eth0
       serial: dc:a6:32:e8:23:19
       size: 1Gbit/s
       capacity: 1Gbit/s
       capabilities: ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=bcmgenet driverversion=5.8.0-1015-raspi duplex=full ip=192.168.0.112 link=yes multicast=yes port=MII speed=1Gbit/s

So then you take the serial
dc:a6:32:e8:23:19

Note the set-name option..
This works for the wifi section as well.
network:
    version: 2
    ethernets:
        eth0:
            dhcp4: true
            match:
                macaddress: <YOUR MAC ID HERE>
            set-name: eth0

Then then to test this config run..
netplan try

When your happy with it
netplan apply


make a script that open two terminal and start projects

install konsole and create 3 scripts:
to run 1 job:
#!/bin/bash
# 1 script
cd Repository/project1/ && npm run start:debug

to run 2 job:
#!/bin/bash
# 2 script
cd Repository/project2/local && chmod -x already_made_script.sh

and to run two terminal with 2 jobs:
#!/bin/bash
# 3 script
konsole --noclose  -e /bin/bash /path/to/my/script1 &
konsole --noclose  -e /bin/bash /path/to/my/script2


Dual Booting Windows and Ubuntu 18.04 - Ubuntu Not Showing Windows Free Space Partition When Installing Ubuntu

From my experience, do NOT create the dual boot with Windows 10 and Ubuntu. When  Windows 10 gets an Update, it will change and mess up the UEFI dual boot system.

Best way to have both is two different hard drives, hooked up with a switcher. That's what I am doing.

It does save your both of your OS and save your time to Reinstall everything again.


How and when is old-releases.ubuntu.com updated?

Okay, so I was able to get an answer on this from some of the archive/release team members. (The nitty-gritty gory procedures they use are documented here, though, but this is the basic information, here on this answer.)

I also have the log(s) of me asking this - see this page containing the logged chat on #ubuntu-release where I asked this.

According to the individual on the team(s) I talked to (cjwatson), the process of moving EOL releases from the mirrors to old-releases is a manual process and they do it whenever they get to it.  There is no set time for when they move the data from the archives to the old-releases page, but they do eventually get around to it.  The page I linked to detailing the process does explicitly state that "old-releases is by its nature not very regularly maintained" (quoted from the Wiki), so they do not regularly move the information over regularly and there is no schedule for it.


This is the method I used to install Google Earth on my 64bit Laptop and it worked perfectly

Firstly, I made sure I had all my media codecs installed then followed these instructions:

If you are running a 64-bit version of Ubuntu 12.04 then you will also need:

sudo apt-get install ia32-libs

To install Google Earth copy and paste the following command in the Terminal Window.

sudo apt-get install lsb-core

Google Earth 6.2  Latest Upgraded Version:

Download Google Earth 6.2 from here

Select either: 32 bit .deb (For Debian/Ubuntu) or 64 bit .deb (For Debian/Ubuntu)

depending on your PC architecture and install in Software Center.

That's It

I dont see any mention in your question or subsequent answer about ia32-libs.  Have you installed this.  You need this for 64bit also.


It is not clear: What permissions have you changed? But I will ignore this message :)

Normally system users doesn't have write permissions outside their own home directory, that by default is /home/<user>. Also user-A can't read most of the files of user-B. So according to the path in your question, to backup all files and directories located in /home, you should run the command with root's privileges, by using sudo.

In addition you are using wrong option - x instead c - use tar --help:

tar -cf archive.tar foo bar  # Create archive.tar from files foo and bar.
tar -xf archive.tar          # Extract all files from archive.tar.

So the right command should be one of these:

sudo tar -zcvf /home/homefiles.tar.gz /home/ --exclude=/home/homefiles.tar.gz # the backup will be created in the directory `/home`
tar -zcvf /home/<user>/homefiles.tar.gz /home/<user> --exclude=/home/<user>/homefiles.tar.gz

Here is an extended example for you:

How to create custom backup script

Let's assume along with the /home directory there are also Apache and MySQL servers and we want to make more complete backup of the system.

1. Create a file named mybackup; make it executable; locate it in /usr/local/bin to be accessible as shell command system wide. Create a directory where the backup files will be stored:

sudo touch /usr/local/bin/mybackup && sudo chmod +x /usr/local/bin/mybackup
sudo mkdir /var/backup

Paste the following script as content of the file /usr/local/bin/mybackup and save it:

#!/bin/bash

## Get the current date as variable.
TODAY="$(date +%Y-%m-%d)"

## Delete backup files older than 2 weeks before create the new one.
find /var/backup/ -mtime +14 -type f -delete

## MySQL Section. The first line is if you are using `mysqldump`,
## the next line is for `automysqlbackup`. I'm using both.
mysqldump -u'root' -p'<my-pwd>' --all-databases | gzip > /var/backup/mysql-all-db.sql.gz
automysqlbackup

## Tar Section. Create a backup file, with the current date in its name.
## Add -h to convert the symbolic links into a regular files.
## Backup some system files, also the entire `/home` directory, etc.
## --exclude some directories, for example the the browser's cache, `.bash_history`, etc.
tar zcvf "/var/backup/my-backup-$TODAY.tgz" \
/etc/hosts /etc/sudoers* /var/spool/cron/crontabs /etc/cron* \
/etc/apache2 /etc/letsencrypt /etc/php/7.0/apache2/php.ini \
/etc/phpmyadmin/apache.conf /etc/mysql/debian.cnf \
/etc/ssh/sshd_config* /etc/pam.d/sshd \
/usr/local/bin \
/var/backup/mysql-all-db.sql.gz /var/lib/automysqlbackup/latest/*.sql.gz \
/root \
/home \
/var/www \
--exclude=/home/<some-user>/.composer --exclude=/home/<some-user>/.npm

## MySQL Section - remove the DB backup files, if you want:
#rm /var/lib/automysqlbackup/latest/*.sql.gz
rm /var/backup/mysql-all-db.sql.gz

If this is a VPS, maybe you would want to access your backup file from Internet through the web browser. In this case we could encrypt the file for additional security. If you are fan of 7zip add some command as the next to the bottom of the script:

rm /var/www/html/the-location/*
7za a -tzip -p'<my-strong-pwd>' -mem=AES256 "/var/www/html/the-location/my-backup-$TODAY.tgz.7z" "/var/backup/my-backup-$TODAY.tgz"

If this is a desktop, maybe you will want to exclude the entire Downloads directory for each user. You could exclude also all files larger than or/and excluding certain file's extensions.
Please note all commands used above are located in /bin or /usr/bin that are listed into the default $PATH of Cron. If you are intend to use Cron job to automate the task and you have commands (scripts) that are located outside of these directories, you should use /the/full/path/to/the/script :)

2. To crate a backup manually, now you can use this command:

sudo mybackup

3. To automate the the task you can add a new entry in root's crontab by the command sudo crontab -e. For example to execute the script every night at 1:15 the Cron job definition should be:

15 1 * * * /usr/local/bin/mybackup > /var/log/mybackup-cron.log 2>&1

this will create also the log file /var/log/mybackup-cron.log that will contain and the error messages 2>&1 if there are any. Read the log periodically to be sur everything works fine.

Alternatively, I would prefer to create a script in /etc/cron.daily/:

sudo touch /etc/cron.daily/mybackup && sudo chmod +x /etc/cron.daily/mybackup

The content of the file should be something as this:

#!/bin/sh
test -x /usr/local/bin/mybackup || exit 0
echo -e "*** Log Begin $(date +%Y-%m-%d) ***\n" >> /var/log/mybackup-cron.log
/usr/local/bin/mybackup > /var/log/mybackup-cron.log 2>&1
echo -e "*** Log End $(date +%Y-%m-%d) *** \n" >> /var/log/mybackup-cron.log

Update:

The above script could be found in the GitHub repository, named Simple Backup Solutions.


Can we opinion about the list of core applications for the Ubuntu Phone?

You can voice your opinion and foster discussion on the Ubuntu phone mailing list. You'll simply need to:

Join the open Launchpad team
Send an e-mail to the list


sudo apt-get install virtualbox-fuse
sudo mkdir /mnt/vhd-disk/
sudo vdfuse -f disk.vhd /mnt/vhd-disk/
sudo mount -o loop  /mnt/vhd-disk/Partition1 /mnt/partition1

Note that you may need additional options to mount to set permissions to your liking.


Accidentally deleted the ipsec.conf file - what to do now?

It is reasonably straightforward to retrieve the required conf file from the 17.10 Ubuntu package. Use the following steps from the command line:

sudo apt-get --download-only install strongswan
mkdir -v $HOME/testing
dpkg-deb -x /var/cache/apt/archives/strongswan-starter_5.5.1-4ubuntu2_amd64.deb $HOME/testing
sudo cp -v $HOME/testing/etc/ipsec.conf /etc

This places the configuration file correctly in /etc and from here you will need to use elevated privileges (sudo) to edit the file using your favoured text editor. Once you are happy the testing directory can be safely removed:

rm -rfv $HOME/testing

The Ubuntu file is by default completely commented out but it gives 2 simple examples, either of which could be a great start for you:

# ipsec.conf - strongSwan IPsec configuration file

# basic configuration

config setup
    # strictcrlpolicy=yes
    # uniqueids = no

# Add connections here.

# Sample VPN connections

#conn sample-self-signed
#      leftsubnet=10.1.0.0/16
#      leftcert=selfCert.der
#      leftsendcert=never
#      right=192.168.0.2
#      rightsubnet=10.2.0.0/16
#      rightcert=peerCert.der
#      auto=start

#conn sample-with-ca-cert
#      leftsubnet=10.1.0.0/16
#      leftcert=myCert.pem
#      right=192.168.0.2
#      rightsubnet=10.2.0.0/16
#      rightid="C=CH, O=Linux strongSwan CN=peer name"
#      auto=start

Activate these settings by removing the '#' mark at the beginning of each line and then hopefully all will be well.


Cannot open phpmyadmin after xampp installed on ubuntu

Probably because there are some misconfiguration on phpmyadmin and mysql connection.

Why do we have to install xampp if we can have LAMP instead with much easier way. Install LAMP with these terminal commands :

sudo apt-get update
sudo apt-get install tasksel
sudo tasksel install lamp-server

You'll no longer have to start/stop xampp server manually. And you'll have all basic PHP server functionality.


16.04 Switching between workspaces with the keyboard shortcuts do not work

Try this Workplace switcher stopped working in Ubuntu 16.04


I am getting this error message while installing ubuntu on virtual box?

You have to enable virtualization in the BIOS.

Turn off your machine, turn it back on and enter the BIOS by tapping whichever button is required at the first splash screen, and then enable virtualization.

Most of the time the options for virtualization are under a section specific to the Processor.

If you mention the make/model of your machine then I can help you find out exactly how to enter the BIOS and which settings to enable


Bluetooth does not work since installing Lubuntu 20.04 LTS

Bluetooth now seems to work after repair posted by Nam Nguyen answered May 11 '20 at 2:59 Ubuntu 20.04 bluetooth not working.
I uninstalled Bluedevil as it did not work. Now using Blueman installed as part of fix above.
Bluetooth still seems erratic,receiving OK, but will not send notes and sometimes not sending files, but it seems I will have to live with this.


Android Studio Desktop Entry shows "OpenJDK shows intermittent performance and UI issues."

If you have multiple java versions installed on your Ubuntu machine run the following to choose the one you want as default:

$ sudo update-alternatives --config java

    There are 3 choices for the alternative java (providing /usr/bin/java).

      Selection    Path                                            Priority   Status
    ------------------------------------------------------------
      0            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1071      auto mode
      1            /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java   1061      manual mode
      2            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1071      manual mode
    * 3            /usr/lib/jvm/java-7-oracle/jre/bin/java          1063      manual mode

$ sudo update-alternatives --config javac

    There are 3 choices for the alternative javac (providing /usr/bin/javac).

      Selection    Path                                         Priority   Status
    ------------------------------------------------------------
      0            /usr/lib/jvm/java-7-oracle/bin/javac          1063      auto mode
      1            /usr/lib/jvm/java-6-openjdk-amd64/bin/javac   1061      manual mode
      2            /usr/lib/jvm/java-7-openjdk-amd64/bin/javac   1051      manual mode
    * 3            /usr/lib/jvm/java-7-oracle/bin/javac          1063      manual mode

To get rid of the notifications you have to choose Oracle Java and not the OpenJDK. Installation tutorial for Oracle Java 7


How do I configure a second monitor as an independent xscreen with Unity?

This is possible with the nvidia-settings application that comes with the NVIDIA driver, so make sure that one is installed by typing jockey in the dash to start the extra drivers application.

Make sure to start nvidia-settings as root so it can save the configuration for you, this can be done by pressing alt+f2 and typing gksudo nvidia-settings.
Once started, select the X Server Display Configuration category (1), select your external monitor and choose Seperate X screen (2) as configuration. Click Save to X Configuration File (3) to save these settings to your xorg.conf.
Log out and back in to apply these changes.


Overload capslock with esc and ctrl using xcape

.Xmodmap:

clear lock
clear control
keycode 66 = Control_L
add control = Control_L Control_R

Under Settings > Session and Startup > Application Autostart > Add:

/path/to/xcape -e 'Control_L=Escape'

This works with the side effect of LCtrl also escaping when tapped. Not perfect but hasn't bothered me enough to fix it in the years I've used it.


Lubuntu 17.10 fixes this problem - no more freeze


Persisting natural scrolling on a Logitech MX Master 2S in 17.10

For GNOME you can try these:

gsettings set org.gnome.desktop.peripherals.mouse natural-scroll false
gsettings set org.gnome.desktop.peripherals.touchpad natural-scroll false


Issues lies on the apache configuration for munin .  As default apache config for munin will allow only the localhost. As you have used http://myhost/munin/. So, we have to modify the apache for the munin to access from all .You can find the default apache config for munin in dir /etc/munin/ as apache.conf .

Look for

Allow from localhost 127.0.0.0/8 ::1

Change to

Allow from all

After modifying restart the apache


How to Convert mulfiple files using ffmpeg

for i in {1..100} ; do ffmpeg -i $i.flv -codec copy $i.mp4 ; done


Disable events from extra keyboard keys on notebook

On my laptop (Lenovo) this can be disabled in BIOS.


You need to install some control panel software as VestaCP оr Webmin:

VestaCP:

Webmin

Here is a list of free control panels alternatives:

web://cp
FlexCP
Cube Panel Lite
VHCS
Webmin
VestaCP

Here is a list of paid control panels alternatives:

Plesk
Cube Panel
Ensim pro
Direct Admin
Virtualmin Pro
VHCS Pro
ServerPilot

Sources:

What server control panels are available for Ubuntu Server?
Installing features on Ubuntu


Ubuntu installation is successful but not getting an option to select OS

You need to deactivate Secure Boot to see the boot option for Ubuntu.

To deactivate it:

Boot your laptop into BIOS mode.
Choose "Change Boot Mode Settings" or something like that, now hit enter.
Deactivate Secure Boot.

Your PC should automatically reboot, if it doesn't, boot into Ubuntu.
Then boot into BIOS mode again, and you should see the Ubuntu boot option.

Secure Boot prevents malware and unapproved operating systems from loading up at start-up, which is why Ubuntu successfully installs but does not actually show up as a boot option.


My Huawei E173 dongle works in Ubuntu 12.04 not in 13.10

Follow these simple steps.

From here: Hoovam:Ubuntu 13.10 Not detecting dongles

Step 1 :
First thing first, plug in your dongle :)

Step 2 :
Click the network indicator in your menu bar.
You will  see that Ubuntu 13.10 is not showing the 'Enable Mobile Broadband' option in the network indicator.

Step 3 :
Open the 'Disks' application.

Step 4 :
You will see some 'Disk Drivers' listed under 'Devices' list.
Eject the 'CD Drive (dongle specific)'.

'CD Drive HUAWEI Mass Storage' in my case.

Step 5 :
Within 1 minute, you will see the option 'Enable Mobile Broadband' in your network indicator. Go ahead and connect. Done.

Hope it will solve your problem.


If you want the machine to keep playing or running when you close the lid, then make sure that you set "When the lid is closed" to "Do nothing" both when your machine is on battery power and when it is plugged in.


How do you turn off touch on a Wacom Bamboo CTH-470?

Edit

Checking the comments and other answers it looks like some are still looking for toggling touch using the tablet's buttons. If you just want that you need 3 things (shown for Ubuntu/Unity):

A simple command (that can be run in the terminal or in a script file)

randompast's solution with a 1-line command is nice and can be turned into a more convenient 1-line toggle command:

xsetwacom --list | grep --line-buffered "TOUCH" | awk '{system("echo "$8";xsetwacom --get "$8" TOUCH;")}' | tr "\n" " " | awk '$2 == "off" {system("xsetwacom --set "$1" TOUCH on")} $2 == "on" {system("xsetwacom --set "$1" TOUCH off")}'

You don't need that if you already have your own script or command line of course, but it's a convenient way of toggling the touch of connected tablets without knowing the tablets' name or id.

Set up a keyboard shortcut

If you want to run this without the terminal, you need to save the script in a file, make it executable and create a keyboard shortcut for it. That's because you can't assign a command directly to the tablet's buttons (but you can assign a keystroke ...).

In Unity open System Settings > Keyboard > Shortcuts and create a new shortcut. Avoid the Super key since it may not always work in step 3.

As command, put the name of your script file (full path, between single quotes, if you're not sure then drag-drop the file in a terminal and use the created command).

Assign the shortcut's Keystroke to your button

Open System Settings > Wacom Tablet > Map Buttons ... and assign the keystroke you chose to your button.

To know which button is which you can first assign them letters with no modifier, select a text field and press the buttons to see which letter they correspond to.

Here beware: not all the buttons will be recognised (3 out of 4 for my Bamboo) and not all keystroke will work (I can't get any with the Super key to work). You'll have to try different combinations.

Original Answer (to learn the commands)

I set up my Pen & Touch over a year ago so I may be wrong here. What I usually do is run in a terminal:

xsetwacom --set "Wacom BambooPT 2FG 4x5 Finger touch" touch off

This won't work for you as you have another tablet so try first

xsetwacom

which should give you the parameters to use. First you need to get the name of your device (let's call it DEVICE_NAME), so try:

xsetwacom --list devices

This gives me for my Pen & Touch:

Wacom BambooPT 2FG 4x5 Pen eraser   id: 11  type: ERASER
Wacom BambooPT 2FG 4x5 Pen stylus   id: 12  type: STYLUS
Wacom BambooPT 2FG 4x5 Finger pad   id: 13  type: PAD
Wacom BambooPT 2FG 4x5 Finger touch  id: 14  type: TOUCH

Obviously the one which is of type TOUCH is the one to disable here. Here DEVICE_NAME would be Wacom BambooPT 2FG 4x5 Finger touch and DEVICE_ID would be 14.Then you need to know which parameter to disable, so try:

xsetwacom --list parameters

There's a plethora of parameters to enable/disable, and for each parameter name (let's call this PARAM_NAME) the type of value expected is explained. In this case we want to turn the Touch parameter Off, which you can do with the --set option. The syntax is:

xsetwacom --set "DEVICE_NAME"  PARAM_NAME  PARAM_VALUE

or

xsetwacom --set DEVICE_ID  PARAM_NAME  PARAM_VALUE

If you're not sure what to put in place of PARAM_VALUE, try the --get option to see the current value:

xsetwacom --get "DEVICE_NAME"  PARAM_NAME


Extracting pure MPEG frames from MP3 from command line

One solution is found (some args could be unnecessary). Looking for an alternative way still.

mplayer 1.mp3 -vo null -dumpaudio -dumpfile dump.mp3


sh: 0: getcwd() failed: No such file or directory

I got this error using jshint through a python subprocess on Ubuntu 12.10 64 bit.

node.js:464
var cwd = process.cwd();
                  ^
Error: ENOENT, no such file or directory
    at Function.resolveArgv0 (node.js:464:23)
    at startup (node.js:51:13)
    at node.js:555:3

It is caused because you deleted or moved a directory out from underneath it and the current directory can't be determined.

How to tell if you are having this problem:

Run the command cd .   (If you get this error then you have this problem).

el@apollo:~/foo$ cd .
cd: error retrieving current directory: getcwd: cannot access parent
directories: No such file or director

You tried to change directory into your current dir, and could not.

How to reproduce the error:

jshint is affected by this error.  Make a directory foo, cd into it, make a file called myjavascript.js

cd /home/el
mkdir foo
cd foo
touch myjavascript.js
jshint myjavascript.js

jshint runs correctly, it says there are no errors which is correct.

Open a 2nd terminal, and rm -rf the directory /home/el/foo out from underneath.

rm -rf /home/el/foo

Run the jshint myjavascript.js again from your first terminal and you get an error:

el@apollo:~/foo$ jshint myjavascript.js

    node.js:464
        var cwd = process.cwd();
                      ^
    Error: ENOENT, no such file or directory
        at Function.resolveArgv0 (node.js:464:23)
        at startup (node.js:51:13)
        at node.js:555:3

The directory is gone!  And even if you were to replace it with the same contents, it has a different signature and the terminal can't recover, the method getcwd can't know what the current directory is.

Three Solutions:

The terminal is confused about what the current directory is because its gone or it's signature has changed.  Do one of these to fix it:

Run the command cd .. until you stop getting errors.  This re synchronizes the terminal with the filesystem.  Then cd back into your directory.  Try again.  The error goes away.
Use su youruser in the terminal, enter the password.  It refreshes and brings you back to the same directory.
Close and reopen the terminal which flushes away the stale directory signatures.  Or send a nastymail to whatever program (jshint) or the thousands of other programs which can't tolerate or recover from stale directory signatures.


gksudo with cool GNOME Shell integration

That cool window in GNOME Shell is only displayed for applications that use PolicyKit. For example, to trigger this window for Synaptic, run this in a terminal:

pkexec synaptic

You can't use pkexec for all applications but only for those that have a pkexec policy file under /usr/share/polkit-1/actions/.


It's decent, and it can be improved.

One thing which will make your boot feel a little faster is to disable the service "NetworkManager-wait-online" which is waiting for your network to report that it's up and running.

Some services and daemons require networking to be up before they start, and of course if your trying to boot over the network you have to wait for that.  But given that the graphical manager still needs to start and you still need to login and load your desktop, you will never notice that you tried starting this before the network was up.

To disable the service:

sudo systemctl disable NetworkManager-wait-online.service

If you want it back:

sudo systemctl enable NetworkManager-wait-online.service


I have recently installed Ubuntu 12.04 to dual boot with Windows 7, but upon startup, the grub menu does not appear and boots into Windows 7

Boot from your Ubuntu Live DVD and try this tool-
Boot Repair


Ubuntu is not working on Windows 8 (64-bit) System

As explained by Thomas and Lion, Wubi cannot be used on Windows 8. But there are alternatives if you just use Ubuntu casually and don't want to create a dual-boot with dedicated partitions on your internal drive  (a bit more complex but still pretty easy):

Install Ubuntu on an external USB HDD (I always have one ready to use as a rescue system)
Install Ubuntu on the same drive, side-by-side with Windows (see this post's answers for the steps to take.
Use a virtual machine like VirtualBox. You can find many tutorials explaining how to do this step by step.


Ubuntu 18.04.4 + Windows 10 dual boot no grub menu

It turns out this answer to an earlier question does work after all. I didn't explicitly test the premise of the answer, that HP laptops come with firmware that set the Windows entry first in the UEFI boot order each time the device is loaded. However, efibootmgr did show Windows placed earlier in the boot order than Ubuntu, even after reinstalling. After running efibootmgr to find out BootCurrent is 0000 for me (it may vary), I created a new startup script (/etc/systemd/system/boot-linux-next.service) with the following contents:

[Unit]
Description=Boot Linux next

[Service]
Type=oneshot
# Replace '0' in the next line with the appropriate code. Advice taken from https://askubuntu.com/a/1142709.
ExecStart=/bin/efibootmgr --bootnext 0

[Install]
WantedBy=multi-user.target

and ran sudo systemctl enable --now boot-linux-next.service. You should pay attention to the output of this command to make sure there are no errors - there seems to be a difference between Ubuntu 18.04.4 and later versions of Ubuntu where the latter are OK with relative paths for executables (efibootmgr) but the former requires an absolute path (/bin/efibootmgr). I was able to check the BootNext variable is set correctly by running efibootmgr; apparently the act of running systemctl causes the startup script to be run once. Booting has been normal since then, although I'm still concerned about what might happen the next time I try to boot Windows.


ubuntu 13.10 performance for 1 GB machine

The minimum for 64bit Ubuntu is 768 MB of RAM memory.
Try increasing your swap memory.
I think you can use 32bit version, it would be better.

And one more tip: use Ubuntu 12.04 LTS.


"An error occurred while loading the archive" when extracting Kali Linux.7z on Ubuntu

When you run a terminal command giving it a file as input, the file must exist. If the file is in your current directory, it is enough to give the file name (command file). If, however, the file is in another directory, you need to give its path (command /path/to/file).

In your case, you have saved the archive in $HOME/Downloads/Kali-Linux-2016.1-vbox-i686/Kali-Linux-2016.1-vbox-i686.7z, so you need to do one of:

Use the file's path

7za e  $HOME/Downloads/Kali-Linux-2016.1-vbox-i686/Kali-Linux-2016.1-vbox-i686.7z

Move into the directory before running the command:

cd $HOME/Downloads/Kali-Linux-2016.1-vbox-i686/
7za e Kali-Linux-2016.1-vbox-i686.7z


For your server i.e. CentOS release 6.4 (Final)

CentOS uses yum (Yellowdog Updater, Modified)

yum update


Chrome on Ubuntu freezes in maximised mode

Try this one, it will solve your problem:
Screen freezes when going full-screen mode - Ubuntu 16.04 LTS

Create a file named 20-modesetting.conf under the
/usr/share/X11/xorg.conf.d directory, with the following content:
Section "Device"
   Identifier  "Intel Graphics"
   Driver      "modesetting"
EndSection

Some people suggest removing the Intel graphics driver entirely
(https://bugs.chromium.org/p/chromium/issues/detail?id=606152#c73):
sudo apt-get purge xserver-xorg-video-intel

This will essentially force Ubuntu to use the modesetting driver.
I think it is a more elegant solution to leave the Intel graphics
driver as is and just override it with a simple configuration file.
For the moment, the Intel graphics driver is responsible for many
problems, such as freezing when in full screen mode and flickering in
Google Chrome.

By the way, does the freeze always happen or only when you open a tab which uses a lot of resources, like a tab playing a video, etc?


For having authentication with wget you can use:

wget --proxy-user=user --proxy-password=pass http//someurl.com/file

If you want to set this as variable in the profile use:

export http_proxy="http://username:password@proxy.domain:8080"

Those are all you need. Of course, you should have a username:password for this proxy.

You could add the last line to your ~/.bashrc or ~/.profile or any script that executes at starting a prompt. If you want only wget knowing of this, you should modify ~/.wgetrc (only for the user) or /etc/wgetrc (globally for all the users) and add:

proxy_password = pass
proxy_user = user


How do I unsubscribe from a post on ubuntu wiki?

Go to https://wiki.ubuntu.com/Home?action=userprefs&sub=notification, you will see a text box with pages subscribed:

In my case, I have only subscribed to Home. Delete the relevant line(s) and save.


After you have downloaded the whole file, there's not so much you can do to fix it than a full re-download; except if you should find someone offering the file in (unencrypted, non-archived) parts, along with separate hash sums. Because otherwise you wouldn't even know in which part of the file the problem is, and therefore which part you still need again. I do not know of a program which does that for finished downloads.

So your best bet probably is to switch to a transmission tool like bittorrent, which does the splitting up into chunks internally, and which also checks hash sums for each of the chunks separately. For each part it will check if it was transferred correctly, and will re-download only that part if it was not.

In the end you will have the complete, correct file, without any manual intervention required.


how to install grsecurity in Ubuntu 16.04

You need to patch and compile your own kernel. The instructions are here: https://en.wikibooks.org/wiki/Grsecurity/Configuring_and_Installing_grsecurity

There is one caveat, however. Ubuntu normally uses its own kernel which is patched with useful fixes that haven't made it to mainline yet (like the MacBook Pro suspend/resume fix) and is compiled with an Ubuntu-approved config. Unfortunately, at the moment the Ubuntu patches aren't compatible with grsecurity. However, you should still grab the appropriate .config file, as explained here.


How do i make a stand-alone hard drive partition?

How inaccessible do you want them to be? Linux has FAT and NTFS drivers and there are ext2/3/4 drivers for Windows. Anybody with administrative privileges or physical access will always be able to gain unrestricted access to the data of each file system unless it's encrypted.

If you're afraid that the two operating systems will somehow intermingle: they don't¹. In a sane set up each system will live on its own disk partition(s).

¹ unless you make them with a significant amount of effort on your side.


I think this means that you have an old copy of Ubuntu's APT keys (used to verify that the packages you're installing are legit); you probably have not been hacked. Does it continue to happen after a sudo apt-get update to get the latest keys?

Here's a basic intro: http://wiki.debian.org/SecureApt

  Another problem you may encounter if using testing or unstable is that if you have not run apt-get update lately and apt-get install a package, apt might complain that it cannot be authenticated (why does it do this?). apt-get update will fix this.


Please Help, Unable to get TP Link T4UH AC1200 to work in Ubunutu 16.10

As it happens,I used a TP Link dongle on my HP laptop.It installed fine with the default Linux (16.04)drivers.I did have to go into BIOS and deactivate the built in wifi card.After that it worked.Hope this helps til someone more knowlegable sees you question.You should edit your question to include your hardware configuration.


Issues installing encrypted lubuntu 17.04 64bit

I had the same problem and initially attempted to resolve it by taking exactly the same steps as the original poster.

In my case, I was trying to install Lubuntu to an encrypted HDD with Linux Mint previously installed. The solution: once I unmounted the HDD, I was able to proceed with no problems.

Unmounting the HDD was simply a matter of double-clicking the "Trash" icon on the desktop, locating the HDD on the left-hand panel, right-clicking it, and selecting "Unmount".


Ubuntu is trying to resolve local IP addresses

you can add static hostname aliases for IP addresses to your /etc/hosts
file to have them resolve without using DNS.

Gotchas:

Be carefull to ensure the 127.0.0.1 locahost line remains intact as it can cause lots of other problems if thats missing.

The hosts file is still used when you are connected so its up to you to ensure that it makes sense in that situation as you can alias any hostname to any ip with it.


make Ubuntu server always ping to some ip

Try the following command on terminal:

ping 127.0.0.1 -i 5

Replace 127.0.0.1 with the ip of the device you want to ping and 5 with the time in seconds you want the ping to be repeated.

if it works, create a file with that, the output going to nothing:

ping 127.0.0.1 -i 5 > /dev/null 2>&1

Name the extension as .sh and make it executable - usually file managers have that option in the file properties.
Place the file anywhere you want, for example /home/your-user-name/scripts/

Now, set the file to run on startup. For that add a line with

/home/your-user-name/scripts/filename.sh

to /etc/rc.local. Make sure you put it before the line with "exit 0".
You will need admin rights for that. Try

  sudo -H gedit /etc/rc.local

Now it will start running on computer reboot and will run forever.


Is there a way to use facial recognition for login and approval of sudo actions?

Yes! There is... You can use Howdy which "provides Windows Hello™ style authentication for Linux."
Installation
Install Howdy using the following commands:
sudo apt-add-repository ppa:boltgolt/howdy
sudo apt install build-essential libx11-dev howdy

Configuration
You may need to set the device path for your camera. For example, on my system it is /dev/video0:
sed -i "s|^device_path =.*none|# &\ndevice_path = /dev/video0|g" /lib/security/howdy/config.ini

Also, you can change the preciseness of the face matching algorithm. On a scale from 1 (low precision) to 10 (high precision), values above 5 are not recommended; lower is better:
sed -i "s|^certainty = 3.5|# certainty = 3.5\ncertainty = 4.2|g" /lib/security/howdy/config.ini

Recording your face model
To record your face, execute sudo howdy add to add face models for the current user. To add face models for other users, use sudo howdy add --user other_user_name.
For example here is how you would add a face model for yourself, where my_user_name is your user name. You can record multiple face models for each user as long as you give each model a unique name.
sudo howdy add
No face model known
[sudo] password for my_user_name:
No face model folder found, creating one
Adding face model for the user my_user_name
Enter a label for this new model [Initial model] (max 24 characters): my_user_name_01

Please look straight into the camera
Scan complete

Added a new model to my_user_name


The solution to this problem was provided by Joao Andre. Basically, whenever i would clear stuff out from my Downloads folder, the same would not be done from Deluge, ie, the torrents and the associated files were removed from the folder itself, but since it still remained in Deluge's list, it'd try to download them again, resulting in a number of empty, 'ghost' folders.


Thunderbird is not authenticating Gmail Account on 19.04 but works well with other Ubuntu Distros

I'm having the same problem, i had to download the new version from https://www.thunderbird.net/en-US/thunderbird/all/ then it worked, except it is not a proper installation that is merged with the system. You have an icon on the desktop but not integrated. So I cant make a launcher icon in the panels.
https://support.mozilla.org/en-US/kb/installing-thunderbird-linux
It seems the older versions are not updating and the older versions don't like Google mail, I had the same problem at work on a windows machine. I had to download the new version manually as it didn't update automatically.


What is causing Unity to be slow on startup?

This is the same problem i "WAS" facing but solved it, seems like a startup application was causing that problem.

Ok here is what i did -

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

open startup application then uncheck - DISK NOTIFICATION (The Disk Utility notification is used to report disk failures using the SMART predictive technology). It explains your quote also

  I noticed more disc activity than usual

if u like u can also shutoff (it depends on your needs) -

  AT-SPI D-BUS BUS, Backup Monitor, Check for new hardware drivers,
  Desktop Sharing, Onboard, Ocra Screen Reader, Personal file sharing,

Before unity was taking near approx. about 20 seconds to load now it takes 3 seconds roughly.


To execute a script at startup of Ubuntu

Edit /etc/rc.local and add your commands
The script must always end with exit 0

To execute a script upon rebooting Ubuntu

Put your script in /etc/rc0.d
Make it executable (sudo chmod +x myscript)
Note: The scripts in this directory are executed in alphabetical order

The name of your script must begin with K99 to run at the right time.

I'm not sure if this will help you in your situation but I will look some more and see what I can come up with.

To execute a script at shutdown

Put your script in /etc/rc6.d
Make it executable (sudo chmod +x myscript)
Note: The scripts in this directory are executed in alphabetical order

The name of your script must begin with K99 to run at the right time.

This question has been asked before here is the link.
How to run commands at login on ubuntu 12.04?


How to create a new iso image from an existing iso image?

Mount the ISO:

sudo mount -o loop /path/to/iso /mnt/xxx
Copy the whole lot to a directory (say ~/yyy), using -p to preserve ownership and permissions for the files:

sudo cp -rp /mnt/xxx ~/yyy
Make your changes to the directory of files.
Create a new ISO from the directory:

mkisofs -o xyz.iso ~/xxx


How do I get my BCM43228 card working in mainline kernel 3.4 or higher?

If you read the wiki, might I draw your attention to this bit:

  By definition the mainline kernel builds are made from virgin unaltered mainline kernel sources and therefore do not, and should not, include any Ubuntu patches or drivers. There are also no binary drivers for these kernels.

Rather than the mainline builds, you will usually have better luck with the kernels for the next alpha/beta version (in this case, 12.10 Quantal Alpha 2), which should have binary drivers available:

Get the 12.10 bcmwl-kernel-source package from the below link and try installing it with dpkg:

http://www.mirrorservice.org/sites/archive.ubuntu.com/ubuntu/pool/restricted/b/bcmwl/bcmwl-kernel-source_5.100.82.112%2bbdcom-0ubuntu2_amd64.deb

If that doesn't work on your mainline build, install the 12.10 3.5 kernel images/headers, and then try again:

http://www.mirrorservice.org/sites/archive.ubuntu.com/ubuntu/pool/main/l/linux/linux-headers-3.5.0-4_3.5.0-4.4_all.deb
http://www.mirrorservice.org/sites/archive.ubuntu.com/ubuntu/pool/main/l/linux/linux-headers-3.5.0-4-generic_3.5.0-4.4_amd64.deb
http://www.mirrorservice.org/sites/archive.ubuntu.com/ubuntu/pool/main/l/linux/linux-image-3.5.0-4-generic_3.5.0-4.4_amd64.deb
http://www.mirrorservice.org/sites/archive.ubuntu.com/ubuntu/pool/main/l/linux/linux-image-extra-3.5.0-4-generic_3.5.0-4.4_amd64.deb

  Note: Since you look like someone who should be fairly handy with this :), may I recommend you consider replacing the awful binary-only Broadcom card with one of the excellent Intel 6205 or 6300 half-mini-PCIe cards, which have fully open-source driver support in the vanilla kernel?


How do I know whether I'm running a devel version of Ubuntu?

Currently supported versions of Ubuntu are 12.04, 14.04 and 15.04, and Ubuntu 15.10 beta is a development build. All you need to do is to find the version of Ubuntu that is installed in System Settings -> Details.

You can also identify a development build from its release number. Ubuntu 15.10 will be released on the 10th month of 2015. October, 2015 is still in the future, so Ubuntu 15.10 hasn't been released yet except for development builds.

Ubuntu 15.04 has been officially released, so there are no longer any development builds for 15.04. There are normally development builds for only the next scheduled release which is Ubuntu 15.10.


Internet connection went down while upgrading version

There are two main stages to do-release-upgrade,

download packages
install packages

If during the download a connection goes down, it'll abort and restore your system back to what it was (ie. put back you 'dingo' sources instead of the changed 'eoan' sources) and it's this that was 'restored' I'm betting in your posted message.

The second stage is the installation of the new packages (which mostly doesn't use internet, though some packages [flash as I recall was one] do use web, but they are unimportant so release-upgrade should have completed with only cosmetic issues (missing flash is a good thing anyway).

It sounds like the first download step aborted, and nothing was done - so re-do it will do what you want.


First, you are asking about conjure-up which is only supported on Ubuntu Xenial (16.04) and newer. Your question is confusing because you mentioned 14.04.

Second, I had answered this question in your github issue. To reiterate, you want to set net.ifaces=0 in your MAAS Settings page under Global Kernel Parameters.

There are other issues with this post like not mentioning you're using MAAS.

This should answer your question about the network interfaces being renamed.


Just create some symlinks:

sudo ln -s "$(command -v clang-3.6)" /usr/local/bin/clang
sudo ln -s "$(command -v clang++-3.6)" /usr/local/bin/clang++
sudo ln -s "$(man -w clang-3.6)" /usr/share/man/man1/clang.1.gz

The first two are for the clang and clang++ commands, and the third for the manpage. If the manpages for clang and clang++ are supposed to be the same, you can repeat it withclang++.1.gz instead of clang.1.gz.

And while you're at it, file a feature request with the package maintainers.


boot loader cant load windows 8 after installing ubuntu. boot repair even didn't work out

2 possible outcomes/scenarios from this.

1: When inside ubuntu try running sudo update-grub in the terminal. To find the terminal search terminal in the Dash, located in the top left corner. This will locate all existing OS's and add them to the Grub menu loader.

2: If that does not fix your issue, you most likely, accidentally, erased your Windows 8, and replaced it with Ubuntu.


SSL_ERROR_RX_RECORD_TOO_LONG error on virtual server

The .dev TLD's been forced into HTTPS by Chrome and Firefox:

https://ma.ttias.be/chrome-force-dev-domains-https-via-preloaded-hsts/

So use something else for testing. http://sandbox/ ought to work; does that also show an error?


Help with Getting out of grub rescue: unknown filesystem after Deleting Linux Partition

If you can make an Windows installer DVD or USB then boot to it, go to repair, then go to CMD and type: bootrec /fixmbr. Otherwise wait till you have a nice friend to let you borrow one.


You formatted the USB disk wrongly: it has a Hidden HPFS/NTFS partition.

Open gparted
Navigate to the correct disk in the upper right corner:

Go to device and choose create partition table and choose msdos
Right-click the large empty square in the middle:

and choose "format to" and take FAT32

Done!  ;-)


How can I make ultracopier handle cut-copy-paste function in nautilus?

There was a dialogue with the nautilus developers late 2010 but it fizzled out without a conclusion.

The developers said that the current nautilus infrastructure does not allow for the integration of ultracopier with nautilus.

It was mentioned, it should be possible via nautilus scripts - but those scripts cannot be invoked via keyboard - only via the nautilus menu.

Thus to answer the question - no - and not very likely.


I used Wubi to install 12.04 and update to 13.10. How can I switch to a real disk partion for 14.04 but keep all my custom programs and settings?

HOWTO: migrate wubi install to partition - bcbc

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

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

All your user settings and data is in /home. If you changed some hardware settings those may be in /etc. And if you installed server type applications they may have their own folders in / (root).

You can mount root.disk from another install or even boot it from grub if necessary. So if you have space on drive, you can still go back and get anything you missed until comfortable that everything has converted.


How to open a file with a determined application even when the type is opened by default by another application?

Open Nautilus and find a ".okular" file. Right click the file and select "Properties"
Click the "Open With" Tab and select the Okular Application. Click the "Set As Default" button.


How to print the location of malware in the terminal with ClamAV?

Remove the -i and scan again. You will get a full list including the name of the file that shows this notice.
If you want even more info add the verbose and/or debug options.


How to compare 2 files and extract the particular sequence using ID in first file and print the out put

You could write a script to do this directly, but I suggest you use the two little scripts below instead. I have spent many years working with this sort of data and they have been very, very useful. If you're planning to do a lot of FASTA file manipulation, I suggest you use them.

FastaToTbl:

#!/usr/bin/awk -f
{
        if (substr($1,1,1)==">")
        if (NR>1)
                    printf "\n%s\t", substr($0,2,length($0)-1)
        else
            printf "%s\t", substr($0,2,length($0)-1)
        else
                printf "%s", $0
}END{printf "\n"}

TblToFasta:

#! /usr/bin/awk -f
{
  sequence=$NF

  ls = length(sequence)
  is = 1
  fld  = 1
  while (fld < NF)
  {
     if (fld == 1){printf ">"}
     printf "%s " , $fld

     if (fld == NF-1)
      {
        printf "\n"
      }
      fld = fld+1
  }
  while (is <= ls)
  {
    printf "%s\n", substr(sequence,is,60)
    is=is+60
  }
}

Save the scripts above in your $HOME/bin directory (if it doesn't exist, create it then log out and log back in to add it to your $PATH). Then make the scripts executable with chmod a+x ~/bin/TblToFasta ~/bin/FastaToTbl.

The FastaToTbl will convert FASTA sequence files to tbl format (the sequence ID, followed by a tab character and the sequence, all in one line). Once they're in tbl format and you have the ID and the sequence on the same line, you can use grep to search for your IDs. Then, you pass the output through TblToFasta toi convert back to FASTA:

$ FastaToTbl file2 | grep -wFf file1 | TblToFasta
>AAX50250.1 cds:annotated chromosome:ASM1212v1:Chromosome:1:1770:1 gene:CTA_0001.1 gene_biotype:protein_coding transcript_biotype:protein_coding description:hypothetical protein
ATGAGCATCAGGGGAGTAGGAGGCAACGGGAATAGTCGAATCCCTTCTCATAATGGGGAT
GGATCGAATCGCAGAAGTCAAAATACGAAGAATAAAGTTGAAGATCGAGTTCGTTCTCTA
TATTCATCTCGTAGTAACGAAAATAGAGAATCTCCTTATGCAGTAGTAGACGTCAGCTCT
>AAX50251.1 cds:annotated chromosome:ASM1212v1:Chromosome:1915:2187:-1 gene:CTA_0002.1 gene_biotype:protein_coding transcript_biotype:protein_coding description:hypothetical membrane associated protein
ATGCTTTGTAAAGTTTGTAGAGGATTATCTTCTCTTATTGTTGTTCTCGGAGCTATAAAC
ACTGGAATTTTAGGAGTAACAGGGTATAAGGTAAACCTACTTACTCACCTGCTTGGTGAA
GGAACCATGTGGACACAAGCAGCTTATGTAGTAACGGGAATCGCTGGGGTTATGGTCTGC
>AAX50252.1 cds:annotated chromosome:ASM1212v1:Chromosome:2388:2690:1 gene:CTA_0003.1 gene_biotype:protein_coding transcript_biotype:protein_coding gene_symbol:gatC description:glutamyl-tRNA(Gln) amidotransferase subunit C
ATGACAGAGTCATATGTAAACAAAGAAGAAATCATCTCTTTAGCAAAGAATGCTGCATTG
GAGTTGGAAGATGCCCACGTGGAAGAGTTCGTAACATCTATGAATGACGTCATTGCTTTA
ATGCAGGAAGTAATCGCGATAGATATTTCGGATATCATTCTTGAAGCTACAGTGCATCAT
TTCGTTGGTCCAGAGGATCTTAGAGAAGACATGGTGACTTCGGATTTTACTCAAGAAGAA
TAG

The grep options used are:

   -F, --fixed-strings
          Interpret PATTERN as a list of fixed strings  (instead  of  regular
          expressions), separated by newlines, any of which is to be matched.

   -f FILE, --file=FILE
          Obtain  patterns  from  FILE, one per line.  If this option is used
          multiple times or is combined with the -e (--regexp) option, search
          for all patterns given.  The empty file contains zero patterns, and
          therefore matches nothing.
   -w, --word-regexp
          Select only those lines containing matches that form  whole  words.
          The  test  is  that  the  matching  substring must either be at the
          beginning of the  line,  or  preceded  by  a  non-word  constituent
          character.   Similarly, it must be either at the end of the line or
          followed by a  non-word  constituent  character.   Word-constituent
          characters are letters, digits, and the underscore.

So, the -f lets us give it a file to read the search [patterns from, the -F tells it to treat the patters as strings and not regular expressions (otherwise, if your IDs contain . which they often do, that will be taken as "match any character") and the -w ensures we only match the entire ID, so that foo will not match foobar.

Alternatively, here's a quick and dirty perl one liner to do what you want:

perl -e 'open(F,"File1.txt");while(<F>){/(\S+)/; $k{$1}++}; while(<>){if(/>\s*(\S+?)(\.| )/){if($k{$1}){$k=1}else{$k=0}; } print if $k==1;}' File2.fa

Or, slightly less dirty:

perl -e 'open(F,"File1.txt");
         while(<F>){
            /(\S+)/;
            $k{$1}++
         }
         while(<>){
            if(/>\s*(\S+?)(\.| )/){
                if($k{$1}){$k=1}
                else{$k=0}
            }
            print if $k==1
        }' File2.fa


How to make xdg-open to use kde-open instead of gvfs-open?

Not sure, if it is the best solution, but the only way I found for now, is to edit the script /usr/bin/xdg-open.

What I've done is added one line, (cheking $DESKTOP_SESSION variable for "kde-plasma" value) to detectDE() function:

detectDE()
{
    if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;
    elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;
    elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome;
    elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
    elif [ x"$DESKTOP_SESSION" = x"LXDE" ]; then DE=lxde;
    ##########
    elif [ x"$DESKTOP_SESSION" = x"kde-plasma" ]; then DE=kde; #++ Added line +++
    ##########
    else DE=""
    fi
}


Why is my desktop background black after upgrade to 13.04?

The following line pasted into a terminal did  recover the background image for me:

gsettings set org.gnome.settings-daemon.plugins.background active true

Hope that helps you too...


Laptop not working after suspend 14.04 lts

I switched to the AMD driver and the suspend problem is solved.


I would see if there is an option in your BIOS to force the boot from your CD.  Try burning another CD / DVD.  The other option is to take a look at WUBI to see if it fits your needs.  It does not repartion your drive.  It uses a virtual partition to run ubuntu from.
http://www.ubuntu.com/download/desktop/install-ubuntu-with-windows


Proprietary Drivers: Does Ubuntu know truly what my system has?

My understanding is that NVidia and ATI both have a single unified proprietary driver each, named nvidia and fglrx respectively. Those drivers are closed proprietary binary blobs over which Linux developers have no control.

There are also open source replacements of those drivers, named nouveau and radeon.

Intel, being in this case more open-source friendly, opened their driver, so there's just one open source driver, named intel,

All of those drivers support all available graphic chipsets from the given manufacturer (maybe except ancient ones). When a new chipset appears, the support is added to the driver; also the support for very old chipsets is sometimes dropped, which means that if you have an older machine sometimes you want to install an older version of the driver. Apart from that, there are no drivers specifically designed for a particular chipset.

On the other hand, if you don't have, say, an Nvidia card in your system you won't see nvidia driver in the Additional Drivers. So yes, Ubuntu only shows drivers which are designed for your hardware, but no, those drivers are not for designed for one particular chipset only.

Open-source drivers are installed in Ubuntu by default. If Ubuntu detects that there are proprietary drivers available for your hardware, it lists them in the Additional Drivers dialog. You're actually not required to install those drivers, if you don't you will continue to use the open source drivers.


Permission denied on files downloaded by Transmission

the only work around that I found to solve this problem is to edit /etc/init.d/transmission-daemon and set the "USER" variable to "root"

I know it's not the right way but is the only one that allow transmission daemon to write files in destination folders


how to increase ubuntu partition size from inside ubuntu

As far as I know you cannot increase the partition while Ubuntu is running. However you do not need to re-install Ubuntu either. Simply get a live USB or Ubuntu install disk and select the "Try Ubuntu without installing" option. You can then use Gparted to resize your partitions. If you do not have a spare USB or install CD then I don't think there is a lot you can do...


Arrow keys, Home, End, tab-complete keys not working in shell

That probably means that the new user account was created with /bin/sh as its login shell (which symlinks to the dash shell by default) instead of /bin/bash - you can change a user's login shell with the 'chsh' command
chsh -s /bin/bash

or to change another user's login shell (need to be root to do this obviously)
sudo chsh -s /bin/bash <username>

(you will need to start a new login session for the change to take effect). You may also need to copy the default .bashrc from /etc/skel to get the color prompt.
In future you might want to use the 'adduser' command instead of 'useradd' - it sets up a more complete user environment including things like a default .profile and .bashrc - as well as setting the login shell to 'bash'


This isn't the answer you're looking for, but I recommend that you not use a router given to you by your ISP. Your router is also your firewall, and do you want your ISP controlling the software and settings on your firewall?

The answer you're looking for is that yes, a VPN could help. You could set up an OpenVPN server on AWS or google, do the port-forwarding there, and use the AWS OpenVPN server's IP address for external access. However, that begs the question: Why not just put that webserver on AWS? Maybe there is a reason (e.g., if the webserver is your NextCloud home cloud server).

Also, if your router is configured for UPnP, you may be able to use that to automatically forward ports. You might have to install an mDNS server on your webserver machine (e.g., bonjour, zeroconf, rendezvous) to announce the webserver to the UPnP service on your router.

Honestly, I'd contact the ISP, I'd get a modem supported by the ISP, buy my own router, and configure it for port-forwarding. Short of that, I'd call the ISP to give me access to the firewall rules and add port forwarding.


Compress only files in a folder excluding the folders in the file's absolute path

The simplest way would be to simply cd to the directory and run find from there:

cd /home/ubuntu/reports/tmp
find . -type f -print0 | split -t '\0' -l 5 -d --filter 'tar czf /home/ubuntu/reports/tmp/reports-$(date +"%F-%T")-$FILE.tar.gz --files-from=- --null'

Note that you're creating the tar.gz files in the same directory as the files, which means they will come up in find's output and then get included in other tar.gz files. Put the tar.gz files in some other directory.

Also, for batches of 10, you need -l 10, not -l 5, which would be batches of 5.


Ubuntu will only start if I have an external monitor plugged in

The solution was to reinstall 16.04 LTS, deactivate the nouveau driver by updating grub with "nouveau.modeset=0", then use a USB-C to HDMI dongle to plug in the external monitor in the thunderbolt port instead of the HDMI port.


You need to open "input method switcher" in the xfce configuration tool and select ibus.


How to Install NVIDIA Drivers on Ubuntu Server

As I initially stated in my question, attempting to install the driver on my Ubuntu 20.04 server OS didn't work (maybe it's a bug, I'm not sure), but I've detailed the exact steps I took below, which worked for me.
After getting the driver to work, I could just install CUDA the standard way.
Remove Any Previous Installations (*IMPORTANT*)
I tried to install the driver via apt previously, which failed, so I had to ensure any previous NVIDIA packages were removed. I ran the following commands.
sudo apt-get purge nvidia*
sudo apt-get autoremove

Download the Driver
For me, I chose the 460.67 driver, which is the latest production branch version at the time of writing this. I ran the following commands:
cd ~/
wget http://us.download.nvidia.com/XFree86/Linux-x86_64/460.67/NVIDIA-Linux-x86_64-460.67.run

Install Dependencies
Execute the command sudo apt-get install build-essential gcc-multilib dkms.
Execute the Runfile
cd ~/
sudo chmod +x NVIDIA-Linux-x86_64-460.67.run
sudo ./NVIDIA-Linux-x86_64-460.67.run

Follow all the prompts the installer gives.
During installation, you may get a warning similar to the one below. It is perfectly safe to ignore.
WARNING: nvidia-installer was forced to guess the X library path '/usr/lib' and X module path '/usr/lib/xorg/modules'; these paths were not queryable from the system.  If X fails to find the NVIDIA X driver module, please install the `pkg-config` utility and the X.Org SDK/development package for your distribution and reinstall the driver.

Check the Installation
You can check if everything was installed correctly by running the command nvidia-smi, which should return a similar-looking output:
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 460.67       Driver Version: 460.67       CUDA Version: 11.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  GeForce GT 710      On   | 00000000:07:00.0 N/A |                  N/A |
| N/A   45C    P8    N/A /  N/A |      0MiB /  2000MiB |     N/A      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

If you see that, then your NVIDIA driver is correctly installed!