Run ubuntu 11.04 after full installation

Booting From the Flash Drive

You can try and boot from the flash drive. Every BIOS is different, but most of them will have a message like “Press F12 for the Boot Menu”, which is highly suggested. The boot menu will allow you to select the USB drive as the boot device.


Unable to complete pdftools installation Ubuntu 18.04 for R supporting readtext

The solution is to remain within the Anaconda/conda environment, since R is running there and this is a bit of an island within the surrounding Ubuntu sea (if the metaphor is not making you seasick). Just do
conda install -c conda-forge poppler

That took quite a while to finish, since the initial two attemtps to "solve the environment" failed, but conda finally tried another repodata source and succeeded:

package                    |            build
---------------------------|-----------------
certifi-2019.9.11          |           py37_0         147 KB  conda-forge
conda-4.10.1               |   py37h89c1867_0         3.1 MB  conda-forge
openjpeg-2.3.1             |       h21c5421_1         469 KB  conda-forge
poppler-0.65.0             |       h581218d_1         1.3 MB
poppler-data-0.4.10        |                0         3.8 MB  conda-forge
python_abi-3.7             |          1_cp37m           4 KB  conda-forge
------------------------------------------------------------
                                       Total:         8.7 MB

etc., ending with the blessed

Executing transaction: done

Then I opened a terminal window and started R:

dalton@dalton-Precision-3541:$ R

R version 3.6.1 (2019-07-05) -- "Action of the Toes"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-conda_cos6-linux-gnu (64-bit)
and installed pdftools:
> install.packages("pdftools")

installing source package ‘pdftools’ ...
** package ‘pdftools’ successfully unpacked and MD5 sums checked
** using staged installation
Found pkg-config cflags and libs!
Using PKG_CFLAGS=-I/usr/include/poppler/cpp -I/usr/include/poppler
Using PKG_LIBS=-lpoppler-cpp

etc. For those are interested, the Anaconda library files were in areas like

-lpoppler-cpp -L/home/dalton/anaconda3/lib/R/lib -lR

In other words, after the conda installation of poppler, my R install of pdftools could find poppler-cpp. pdftools completed:

** testing if installed package keeps a record of temporary installation path

DONE (pdftools)

I then was able to complete my original task of installing readtext, which required poppler and pdftools:
install.packages("readtext")

** testing if installed package keeps a record of temporary installation path

DONE (readtext)

The downloaded source packages are in
‘/tmp/Rtmpxksozx/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done

library(readtext)

All is good with the world, the convoluted world of Anaconda/conda within Ubuntu. It is a great environment for scientific and academic computing, once you figure out how to communicate.


The make: not found error can be solved by installing make. In all currently supported versions of Ubuntu open the terminal and type:

sudo apt install make build-essential python2.7 python-pil gcc grass-dev

r.avaflow requires the grass-dev package. This command will also install grass-dev version >=7.

Visualization and validation of the model results (flag v) makes use of the R Project for Statistical Computing (recommended version: 3.0.2 or higher). The following packages of R are required in order to fully explore the functionalities offered by r.avaflow: maptools, stats, sp, rgeos, rgdal, ROCR and raster. The code builds on Python 2.7 (the Python Imaging Library PIL is required) and C.

To install these additional dependencies open the terminal and type;

sudo apt install r-base r-base-core r-cran-maptools r-cran-sp r-cran-rocr r-cran-raster

To install the remaining additional dependencies (stats, rgeos and rgdal) you need to install a package to fetch and install packages from CRAN (the package archive network for the R programming language) by following the instructions at What is the preferred way to install R packages in Ubuntu?.


How can I install Ubuntu Server on HP MediaSmart (Model: EX495)?

The article at the following link describes a procedure that worked well for me.

https://dagolav.prestegarden.com/post/instaling-ubuntu-on-the-hp-mediasmart-ex490/

The basic idea is to take the boot disk out of the server and put it in another PC with keyboard and video support. Do the install and then put it back in the MediaSmart Server.

The article refers to Ubuntu 10, but I installed 18.04.1 successfully. I'd add that it's useful to install ssh server and perhaps xRdp for remote access, both of which I've done.

Don't expect zippy performance, it's a pretty underpowered box. Also, as yet it doesn't show all the drives that are physically plugged in. In my case it shows drive 1 and 3, but not 2 and 4.


Invalid argument error in httptunnel client

How can I tunnel my connection correctly?

Fix httptunnel. See below.

Note that you are using nc with erroneous arguments, but it still seems to work. From man nc:

  -l        Used to specify that nc should listen for an incoming connection rather than initiate a connection to a remote host.  It is
  an error to use
               this option in conjunction with the -p, -s, or -z options.

What causes the http_write_request: write error: Invalid argument?

Invalid argument is a stringified version of POSIX error code EINVAL.

The error code was returned from the write libc function/kernel syscall which was indirectly called by the http_write_request function of httptunnel client. EINVAL means:

  fd is attached to an object which is unsuitable for writing; or the
  file was opened with the O_DIRECT flag, and either the address
  specified in buf, the value specified in count, or the current file
  offset is not suitably aligned.

Before write() is called, the socket is configured with various options using the setsockopt libc function / kernel syscall. One of these options is SO_SNDLOWAT. You can read about what that is supposed to do here. Note that:

  SO_SNDLOWAT is not changeable on Linux (setsockopt(2) fails with the
  error ENOPROTOOPT)

so it's a useless call to make on linux in the first place, at least as of 2015.

After running htc with strace, I noticed an inconsistency between the code and the syscall arguments reported by strace. The code in the tunnel_out_setsockopts function is trying to set the SO_SNDLOWAT option, but strace reports setsockopt(5, SOL_TCP, TCP_REPAIR, [1], 4) = 0. Take a closer look at the socket man page where SO_SNDLOWAT is listed as an option, and note the following:

  The socket options listed below can be set by using setsockopt(2) and
  read with getsockopt(2) with the socket level set to SOL_SOCKET for
  all sockets.

tunnel_out_setsockopts does not use SOL_SOCKET for the SO_SNDLOWAT option; it uses the result of another function (get_proto_number) instead. This is a bug. This may be due to an inconsistency with prior versions of the kernel or libc API, but I suspect that is unlikely.

Unfortunately, fixing this bug by replacing the socket level argument with SOL_SOCKET does not result in a usable tunnel. The write call which was previously failing now succeeds, but the program fails about a second later with ETIMEDOUT on a read call.

There is another function tunnel_in_setsockopts which attempts to set SO_RCVLOWAT with the output of get_proto_numer instead of SOL_SOCKET. This is another bug.

Fixing these two causes the tunnel to work properly.

Server
nc -l 10000
sudo hts -F localhost:10000 81

Client
htc -F 7777 localhost:81
telnet localhost 7777

This bug was already reported against Ubuntu 14.04 here. I suggest you mark it as affecting you. I have uploaded a patch as a fix for the problem, but it will still need to be accepted by Ubuntu.


How do I log data from Courier .mailfilter rule sets?

After much research and searching, I have discovered that my system is not using maildrop for delivery.

If you are having the same question, first identify which mail delivery agent your system is using.

Start with your SMTP server. Mine is Postfix.

Postfix uses it's own local delivery agent in a process called local(8).  In the file /etc/postfix/main.cf, look for a variety of references to any of the local(8) handoff parameters. The two most prominent would probably be mailbox_transport or virtual_transport (the difference depends on whether the people who receive mail have accounts with home directories or if an account is maintained virtually).

If these parameters are not set, then postfix is probably handling its own local delivery, and as far as I can tell, postfix does not do inspection based redirection and delivery to specific mailboxes, only from one email address to another based on a series of forwarding or alias addresses.

So, if you are trying to implement advanced filtering with Courier or Dovecot-LDA or Dovecot-LMTP, then you will need to tell Postfix using the mailbox_transfer or virtual_transfer settings which program to call.


Wireless on HP Pavillion dv4 not working

Please get a temporary wired ethernet connection and open a terminal and do:

sudo apt-get install linux-headers-generic
sudo apt-get install --reinstall bcmwl-kernel-source
sudo modprobe wl

You should be all set.


Why can't I mount an image I just created on loopback?

Your system is borked. The first two commands succeed because everything takes place in the page cache. When you actually try to mount it, the page cache is bypassed and that's when things go awry because there is something wrong with the device your files are on.


Can't find XP boot after Dual boot installation

I believe that the answer to my specific problem is found here:
http://ubuntuguide.org/wiki/Multiple_OS_Installation#Windows_bootloaders

If reboot to XP was so critical after a partition re-size, I'd have appreciated a warning a little earlier in my learning curve.  Maybe it could be added right after "be sure to back up your files."


NVIDIA Driver causes Segmentation fault of graphical applications

get the CUDA 8.0 package from nvidia

https://developer.nvidia.com/cuda-release-candidate-download

This packages up all the cuda libs and matches them with drivers.


Whack {Esc} when it appears and it will clear, and show you line by line what's going on.

To permanently remove it so you can always see all the fiddly bits, see How do I disable the boot splash screen, and only show kernel and boot text instead?


For how long 12.04 LTS will be supported ? 5 or 3 years?

Canonical will provide security updates for 12.04 LTS through April 2017 on the desktop and server. That's five years total from release.

You can read about Canonical's support plan here.


I have very important data on my pc

Important data means you have a backup. So you could restore that. That way all you need to worry about is getting a user you can log into. See below.

  mv /home/mary /home/alex

Why did you think that was a good idea?

Files like /etc/passwd and /etc/shadow as an example do not get updated when you move a user.

The way to do this: create a 2nd user called alex from the "users" option in settings, make it an admin. Then log into alex, confirm it works. Then copy all personal files over to /home/alex and do a chown -R $USER:$USER /home/alex while logged in as alex. Do not copy over hidden files. Confirm it works and only then you remove user mary using the deluser command. Not by removing /home/mary

To fix the current problem:

Use a live session or grub rescue to get to a command line.

It MIGHT work to just do chown -R alex:alex /home/alex but if it does not you pile another problem onto this problem.

So the procedure would be ...

From command line:

Start by copying (not moving) everything back to /home/mary.
Confirm if logging into mary works. If not do a chown -R mary:mary /home/mary and try again.
If it does work remove /home/alex (so actual rm and not deluser since there  is no user alex, only a directory) and proceed with the method listed above.

Also have a look at .xsession-errors. That is where errors are logged.


How to safely download and gpg verify a Debian source package?

There are several questions which I will answer individually:

How to download (and not install) individual binary package?

apt-get has an option to only download the package:

-d  Download only - do NOT install or unpack archives

You will find the downloaded package in /var/cache/apt/archives/.  In this case you will have to add a new sources list configuration to apt.

How to download individual source package?

apt-get source <package>

or when you know the location of the .dsc file:

dget http://http.debian.net/debian/pool/main/k/knot/knot_1.2.0~rc3-1.dsc

Both approaches do verify the signature on the files

How to pin the sources.list aka how do I not mess my installation?

You have already pointed to the page of basic description for APT Pinning, and I would only add that you probably want to read the apt_preferences manpage which also have nice examples to accomplish things you need.  Especially see the section 'Tracking Stable' in EXAMPLES, since it describes something very close to your needs:

There's an usefull command when playing with multiple sources and APT Pinning:

# apt-cache policy knot
knot:
  Installed: 1.1.3-1~bpo60+1
  Candidate: 1.2.0~rc3-1~bpo60+1
  Version table:
     1.2.0~rc3-1~bpo60+1 0
        500 http://deb.knot-dns.cz/debian/ squeeze/main amd64 Packages
 *** 1.1.3-1~bpo60+1 0
        100 /var/lib/dpkg/status
     1.0.5-1~bpo60+1 0
        500 http://ppa.sury.org/debian/ squeeze/main amd64 Packages

This shows that the installed version is 1.1.3-1~bpo60+1, and candidate is 1.2.0~rc3-1~bpo60+1, which will get installed on next apt-get upgrade.  Also there's some older version available from yet another repository.

How to download Debian archive key?

Debian archive key is published on ftp-master.  You will need to import the key into your gpg keyring:

$ gpg --import archive-key-6.0.asc
gpg: key 473041FA: public key "Debian Archive Automatic Signing Key (6.0/squeeze) <ftpmaster@debian.org>" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0  valid:   9  signed:  31  trust: 0-, 0q, 0n, 0m, 0f, 9u
gpg: depth: 1  valid:  31  signed:  38  trust: 25-, 0q, 0n, 1m, 5f, 0u
gpg: depth: 2  valid:  21  signed:  31  trust: 19-, 0q, 0n, 0m, 2f, 0u
gpg: depth: 3  valid:   3  signed:  12  trust: 2-, 0q, 0n, 0m, 1f, 0u
gpg: depth: 4  valid:   1  signed:   8  trust: 1-, 0q, 0n, 0m, 0f, 0u
gpg: next trustdb check due at 2013-09-22

Then you will have to check its signatures:

$ gpg --list-sig 473041FA
pub   4096R/473041FA 2010-08-27 [expires: 2018-03-05]
uid                  Debian Archive Automatic Signing Key (6.0/squeeze) <ftpmaster@debian.org>
sig 3        473041FA 2010-08-27  Debian Archive Automatic Signing Key (6.0/squeeze) <ftpmaster@debian.org>
sig          7E7B8AC9 2010-08-27  Joerg Jaspert <joerg@debian.org>
sig     P    B12525C4 2010-08-27  [User ID not found]
sig          D0EC0723 2010-08-27  [User ID not found]
sig          8AEA8FEE 2010-08-27  [User ID not found]
sig          A3AE44A4 2010-08-28  [User ID not found]
sig          00D8CD16 2010-08-28  Alexander Reichle-Schmehl <alexander@reichle.schmehl.info>
sig          CD15A883 2010-08-28  [User ID not found]
sig          672C8B12 2010-08-28  [User ID not found]
sig 2        C4CF8EC3 2010-08-28  [User ID not found]
sig 2        D628A5CA 2010-08-28  [User ID not found]

And track the individual GPG keys to Debian developers either by tracking it manually, or f.e. checking at PGP Key Statistics project.  And unless there's a chain from your PGP/GPG key to the Debian key archive, you will have to make a leap of faith at some point of time.

How to download and verify individual packages by hand

So the other approach is more complicated, because deb packages are not signed individually, but only the Release file is signed.  Thus you will need to download and verify the signature on Release and Packages files together with the individual package.

I will add an example that will be clearer.

Imagine you want to download Debian package for Knot DNS from it's official PPA for Ubuntu precise on amd64 architecture.

You will have to click through the directories and find these files:

wget http://ppa.launchpad.net/cz.nic-labs/knot-dns/ubuntu/dists/precise/Release
wget http://ppa.launchpad.net/cz.nic-labs/knot-dns/ubuntu/dists/precise/Release.gpg
wget http://ppa.launchpad.net/cz.nic-labs/knot-dns/ubuntu/dists/precise/main/binary-amd64/Packages
wget http://ppa.launchpad.net/cz.nic-labs/knot-dns/ubuntu/pool/main/k/knot/knot_1.2.0~rc3-1~precise+1_amd64.deb

The next step would be to verify the signature on the Release file:

$ gpg --verify Release.gpg Release
gpg: Signature made Fri 01 Mar 2013 07:14:38 PM CET using RSA key ID F9C59A45
gpg: Good signature from "Launchpad Datové schránky"
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 5246 3488 670E 69A0 9200  7C24 F233 1238 F9C5 9A45

Of course you'll need to verify the key in some other means (like the Debian/Ubuntu maintainers key, checking it from launchpad, etc, etc...)

When you have verified the correct signature on Release file you can go to next step – verifying the Packages file.

sha256sum Packages
c96a524398cf6e9db033c8299974fe324eba47cc8190efec6495c74e251330ad  Packages
$ grep c96a524398cf6e9db033c8299974fe324eba47cc8190efec6495c74e251330ad Release
 c96a524398cf6e9db033c8299974fe324eba47cc8190efec6495c74e251330ad             3379 main/binary-amd64/Packages

As you can see, the signature can be found in the signed Release file, thus we have verified the integrity of Packages file by computing and comparing its SHA-256 fingerprint.

The last step is similar.  You need to compute and compare the fingerprint of the individual package:

$ sha1sum knot_1.2.0~rc3-1~precise+1_amd64.deb
8b34078e9bfef7aa818b2f926a28838b0ede9f43  knot_1.2.0~rc3-1~precise+1_amd64.deb
$ grep -A 13 "Package: knot$" Packages | grep "^SHA1: "
SHA1: 8b34078e9bfef7aa818b2f926a28838b0ede9f43

At this point we have securely chained the package to the signed Release file.  So if you believe the signature on the Release file, you can be sure that the package was downloaded intact.

You can read more in Secure APT article at Debian Wiki.


Backups program fails to backup. And the Backup Now button is grayed out

My thanks to guiverc for the helpful comments and links, especially yesterday.
Accordingly, yesterday I read within Deja Dup`s "Back Up Now" button is not highlighted
how I could un-gray the 'Back Up Now' button.
Specifically, yesterday I killed a process id (that is, a pid) for the backup program DejaDup. It was the pid of DejaDup that ended in ' --backup --auto '. After rebooting the computer I found that the 'Back Up Now' button was un-grayed. Then, I clicked the 'Back Up Now' button, and DejaDup started creating a fresh backup, and the reason it provided was "in order to avoid corruption" of the backup. However, after about 4 hours the backup attempt failed, and then the 'Back Up Now' button was grayed out again.
Today I used the command line 'killall deja-dup', and once more the 'Back Up Now' button is ungrayed.
Via the website for DejaDup, wiki.gnome.org/Apps/DejaDup , I have filed a support request with the Gnome Infrastructure Team (at GitLab). Whereas DejaDup was updated on 13th January 2021 (according to the Software utility in lUbuntu 18.04.5), and whereas the aforementioned website for DejaDup was last updated on 25th August 2020, nevertheless this problem of grayed-out 'Back Up Now' button (and lack of a progress bar, by the way) is clearly over 8 years old by now.


The Linux culture is to have many tools that can do the same job.

Our system is strongly connected to server instances so we have situations where users do not have a desktop. We also have situation where servers are on a remote location.

For that reason we have a terminal where we can insert commands and have them execute. This can be a simple list of files in a folder (ls) to a editing text files to configure your graphics card.

The big plus with this: those commands also work for desktop users.

Often there is a graphical option to do it from the desktop but those are not uniform across all desktops (we have more versions that do not use Unity as a desktop) so it is easier for someone to post commands on-line for you to use in a terminal. Otherwise he would need to provide images on how to do something in Unity, in KDE or any other desktop.

Understanding those commands though should be a must for anyone using Ubuntu. So yes... we are more of a coding/programmers operating system. In that sense we are totally different from Windows. But it is NOT that difficult. Give it a couple of weeks and you will understand all the codes that you need.

There are commands that look innocent but can cause trouble though. When you find a piece of code that needs to be inserted into a terminal and you are unsure you can always ask in Ubuntu Chat (20 reputation required).

All code in all the questions on AskUbuntu should be safe to use (if applicable) or it should have a big fat warning. Be careful when using destructive commands (like rm (remove) or mv (move) or when they are about formatting partitions and when commands need a password).


Bluetooth mouse pairs but does not connect

I believe what is happening is that you have a mouse that uses the new low-energy bluetooth mode that was introduced in bluez5 and your running bluez4. I have a similar situation with my Microsoft Arc Mouse.

In this line: [ 1359.069997] Bluetooth: HCI request failed to create LE connection: status 0x0c the LE connection refers to this new low-energy mode that is only in bluez5.

A Little Background on Bluez

Bluez is the bluetooth driver and, from what I've found online, each major update for it seems to break a lot of things. When bluez4 was introduced, it wasn't backwards compatible with bluez3 and so it took a long time for Linux to upgrade to bluez4 as every program had to be ported to bluez4. To go along with that, according to this article, apparently Bluez has horrible documentation and so took forever to figure out how to update programs to use it.

When bluez5 came out, it appears that also broke backwards compatibility. See this page. I've read that Canonical was trying to update to bluez5 for 15.04 but couldn't get it ready in time.

What You Can Do

Well, there's hope! You can download the Bluez5 .deb file here, if you need the AMD version, or here, if you need the i386 version, and then install it with dpkg -i name_of_package.deb. You'll then need to restart your computer.

This usually breaks the default bluetooth manager on Ubuntu but install Bluetooth Manager, either through Terminal or the Software Store, and you'll be able to connect all your devices.


Does selecting "Remove Windows" option during install remove all my Windows partitions?

Yes, and once all the partitions have been deleted, it is very difficult to recover the files, sometimes impossible.

Basically, it depends on how the drive was formatted.

If it was fast format, i.e. don't zero out the harddisk but just delete the file information (headers, etc), there is a possibility that you can recover some of the files using softwares such as TestDisk and PhotoRec.
If it was a complete format, i.e. zero out the hard disk, then it is impossible to recover data.

In your case, it is very difficult to recover. If you want to do it with TestDisk or similar softwares, you'd need another harddisk which has atleast the same storage space as your harddisk, and you'd need to boot from either a Live USB or some other computer and connect your hard disk to that computer.

Ubuntu needs ext4 or ext3 (usually) to get installed. To install Windows you'd need one more partition of type NTFS.

If you have only one partition, you have to compress that partition to make space for new partitions, or you can delete that partition and format it as NTFS to install Windows.


Unless you specifically set one, your root account probably does not have a password - the assumption being that you would log in as someone else and use sudo.

The guest account probably cannot use sudo, as that would be all sorts of badness.

Can you download and boot from the System Rescue CD (http://www.sysresccd.org/)?

Before you boot, do df / to work out which partition your root file system is on. e.g.

$ df /
Filesystem     1K-blocks      Used Available Use% Mounted on
/dev/sda1     192114204 101260032  81088596  56% /

tells me I need to remember /dev/sda1. I am assuming for the moment you are not using logical volumes as that adds a few steps in the next bit.

Now boot from the system rescue CD - this will (eventually) take you to a root prompt.

Now mount the root file system:

# mount /dev/sda1 /mnt

There are two ways to go here...

Simple - edit /mnt/etc/shadow, and remove root's password, change:

root:!:15842:0:99999:7:::

to

root::15842:0:99999:7:::

(note the missing !)

After this you should be able to reboot to Ubuntu and log in as root without a password (remember to set a root password after you log in!).

Complicated - If that does not work - then go back to system rescue and remount your root partition. Then try these commands:

# chroot /mnt
# passwd root

That should change the root password. Reboot, and log in as root.


It was an error, while running executable file, I was passing the whole path for library "/usr/local/MATLAB/R2015a/bin/glnxa64" and LD_LIBRARY_PATH was then "/usr/local/MATLAB/R2015a/bin/glnxa64/bin/glnxa64".

I changed it to MATLAB location "/usr/local/MATLAB/R2015a".

Its working now.


How to create shortcuts inside any application?

These are application dependent and can be set at the application it self. If a application was not programmed to take shortcuts you cannot force it (easily) to do things with shortcuts.

Short answer: you cant, not unless the application is already programmed to have them.


Can't see created disk partition when installing ubuntu

Try using gparted to reformat the partition from the live-cd/usb

apt-get install gparted


The alt+drag behavior change be changed through System Settings (systemsettings5). Navigate to: Workspace > Window Management > Window Actions. Under the "Inner Window, Titlebar & Frame" section, change "Left button" from "Move" to "Activate, Raise & Move". And then "Apply".


Apply MacBuntu Boot-screen/Splash in Ubuntu 16

You might need to update the Plymouth to change the boot screen.

Run the following commands

    sudo update-alternatives --config default.plymouth
sudo update-initramfs -u

After the first command is executed it will ask you to select a Plymouth theme. Type in the number corresponding to the Macbuntu related Plymouth theme and hit enter. Next run the second command and after it is executed completely reboot the system to see changes.


Cannot upgrade or install new apps due to segmentation faults

memtest
Go to https://www.memtest86.com/ and download/run their free memtest to test your memory. Get at least one complete pass of all the 4/4 tests to confirm good memory. This may take many hours to complete.
Note: Because you're using different size/type SODIMMs, you're not taking advantage of the speed improvement that comes with using memory interleaving.
BIOS
Acer Aspire 5250
You have BIOS 1.01, dated 04/21/2011.
There's a newer BIOS available, version 1.08, and can be downloaded here.
Note: Confirm that I have the correct web page for your model #.
Note: Have good backups before updating the BIOS.


Undesirably autologging-in after reboot - do not even have nopasswprd group

In order to disable Ubuntu auto-login, you can follow the below steps, and in step 5. Toggle the Automatic Login switch to OFF.

Ubuntu auto-login is described here:

  Log in automatically

  You can change your settings so that you are automatically logged in
  to your account when you start up your computer:

  Open the Activities overview and start typing Users.
  Click Users to open the panel.
  Select the user account that you want to log in to automatically at startup.
  Press Unlock and enter your password.
  Toggle the Automatic Login switch to ON.

  When you next start up your computer, you will be logged in
  automatically. If you have this option enabled, you will not need to
  type in your password to log in to your account which means that if
  someone else starts up your computer, they will be able to access your
  account and your personal data including your files and browser
  history.

More info provided by the OP @Craig Hicks:

  The actual file which is changed is /etc/lightdm.conf .
  A line is added: autologin-user=<username>.


linux-swap turns swap off during turn off

Open a terminal and enter:

sudo nano /etc/fstab

You will be asked for your password. Then, add a line to the end of the file:

[swap partition]       none    swap    sw      0       0

Replace [swap partition] by the name of the partition, e.g. /dev/sda5. Also, be careful not to accidentally change the other lines in the file. Save and reboot.

About nano, this should be written in the lower part of the terminal:

Use Ctrl + O (an O as in oven, not a zero) to save the file
Use Ctrl + X to exit from nano.


How do you get past "snap kde-frameworks-5" issue to run Okular?

You should run both commend with root user or sudo

sudo snap install kde-frameworks-5
sudo snap connect okular:kde-frameworks-5-plug kde-frameworks-5:kde-frameworks-5-slot

I got same issue that running okular asking me to do that. I checked snap interfaces | grep okular and it seems good:

:home                                   okular
:network                                okular
:network-bind                           core,okular
:opengl                                 okular
:pulseaudio                             okular
:unity7                                 okular
:x11                                    okular
kde-frameworks-5:kde-frameworks-5-slot  okular:kde-frameworks-5-plug
okular:session-dbus-interface

So I reinstalled okular left kde-frameworks-5 installed. Now it works fine:

sudo snap remove okular
sudo snap install okular

It seems to me a bug, if you are interested please report it against snapd package.


From a terminal window the process would be the following:
sudo apt-get remove <application_name>

Typically the <application_name> in this case would be teams


Conky not appearing on Compiz wallpapers?

Edit this line own_window_type desktop to own_window_type normal. In most cases this will work. If it doesn't, change the line to own_window_type dock.

For more configuration:

http://conky.sourceforge.net/config_settings.html


Generally speaking, to add "stuff" to the top bar would require you to hack into Gnome Shell  using javascript and css. That would result in you effectively writing your own custom Gnome Shell extensions.

For what you want to achieve, you likely will be helped by the well maintained power-user gnome shell extension argos.

That extension turns the standard output of executables into panel drop-down menus. It is actually inspired and compatible with a similar tool existing in the Mac OS X world, BitBar. It takes out the heavy lifting of having to hack into gnome shell yourself, so you can focus on the tools you want to have available in your top bar. Also this eliminates the need to be confronted directly with the poorly documented and unstable Gnome Shell extensions API.

Finally, although considered "legacy" by the Gnome developers, you can work with traditional tray appindicators. To enable these on Gnome Shell, an extension is needed. Ubuntu uses the Kstatusnotifier/appindicator extension for this.


Can I boot a Ubuntu live install ISO from a usb key on my Powerbook G4?

If I understand your question correctly, the answer is yes yes because you can just run Ubuntu live off your flash drive. Even if the hard drive is disconnected from the system, the hard drive is not involved in the process of running Ubuntu live unless you want to install Ubuntu to your hard drive.
First, boot from your flash drive and choose "Try Ubuntu without installing" and press the Enter or Return key.

Then, Ubuntu loads the kernel, does a bunch of other stuff, and then you should see the Unity desktop if everything went well. If it doesn't work that well, post what happened.


Help recovering grub dual-boot functionality after driver and system (linux) upgrade. What can I do?

Solved my problem wiping out the hdd and installing ONLY UBUNTU. Avoid grub, avoid installing from stick, and if you can, avoid dual-boot.


sudo apt-get install compiz-plugins

This will put back the plugins your used to. There compiz plugins that are not officially supported.


Can't add PPA using add-apt-repository: SSL support not available

It could be same case as this one SSL support not available, Ubuntu 18.04, ppa repository

Custom/incompatible version of openssl is installed in system.

Check current binary

which openssl

Check if there any copy from PPA or it is absolute

aptitude search '?narrow(?installed, ~Oppa | ~o)'

Check if any lib installed using pip

pip2 show pyOpenSSL


If you're referring to uploading a file using a web form, you have to know what the web end-point is (i.e. the part that is processing the form).

The fact that you're getting a webpage indicates that you are trying to upload a file to a form.  Without additional information, it would be next to impossible to help due to the sheer number of possibilities of how this can be implemented in the back end.

If you are uploading a file to a server that you do not control, it's best to get in touch with the web developer/host to find out if there is an API that you can use to upload files.  The API end-point can then be used by curl to send the file.

If this is a server you do control, I would recommend either scp, sftp, or ftp to upload the file instead of going through a form.


Since I'm currently running Ubuntu Minimal on VirtualBox's emulated VESA-compatible graphics card, for this particular case the following 3 steps were sufficient:

Uncomment the GRUB_GFXMODE=640x480 entry in /etc/default/grub and call sudo update-grub.
Do sudo apt-get install v86d (which the modprobe call mentioned above said was missing).
Do sudo modprobe uvesafb

Thanks to @psusi for making me aware that the error could mean it's completely missing, not just damaged or insufficient in some other way.

However, I still don't know what I'd have to do on different hardware to find out how to do the equivalent, so if anyone has an explanation that is more general and less specific, I'd be interested in hearing it. I just thought I'd post this partial answer so this isn't one of those "just a question no answers" SO posts.


what would you select

The one that works. Plain and simple.

If something works for you why would you go looking for alternatives?


OSS4 is an alternative for ALSA, not for PulseAudio.

I tried OSS4 with ubuntu, the sound is good, perhaps better than ALSA, but i reverted back to ALSA because of a couple of problems:

OSS4 does not detect automatically the plugging in of a headphones jack (at least for my audio card)
the flash plugin work bad or crashes with OSS4

Anyway, I have some notes I saved from my short experience:

add your user to the audio group;
install the package linux-source;
extract the tar archive installed with the previous package in /usr/src/linux-source-3.2.0/ (or equivalent, depending on the kernel version)
create a symlink /lib/modules/3.2.0-24-generic-pae/source to /usr/src/linux-source-3.2.0/linux-source-3.2.0/
install the packages oss4-{base,source,dkms,gtk} and liboss4-salsa2
run sudo dpkg-reconfigure linux-sound-base and choose OSS4
modify /etc/pulse/default.pa

comment the line: load-module module-udev-detect
add the line: load-module module-oss device="/dev/dsp" sink_name=output source_name=input mmap=0

run gstreamer-properties and choose OSS4
create ~/.asoundrc with content:

pcm.!default
{
  type oss
  device /dev/dsp
}
mixer.!default
{
  type oss
  device /dev/dsp
}

Good luck


wlan0 does not exist even with wireless driver and ndiswrapper installed

Make sure that the drivers have been unpacked into /lib/firmware/ and then type

sudo modprobe b43

You might have to wait a couple seconds.


Ubuntu iso boot load stuck in Virtual Box

I would recommend you to use Virtualbox 6.0 instead of 6.1.

I had some issues with long initramfs loading on 6.0. It seems some issue with initramfs loading could be present on 6.1. You could also try to Enable PAE/NX on System -> Processor and Enable VT-x/AMD-V, Enable Nested Paging on System -> Acceleration tabs.


Problem displaying panels and menu in kubuntu 13.10

I've experienced this on a Dell laptop with a Quadro FX 350M video card on a fresh install of Kubuntu 13.10.  To get a usable Graphical interface, I used the shift+alt+F12 key combo to turn off desktop effects (they're on by default).

Then I went to the K menu->System->Additional Drivers program and activated one of the proprietary driver options for my video card (uses nouveau by default on fresh install).  Once it was finished the item showed a yellow icon so I rebooted and things seem to be displaying properly once I've turned desktop effects back on.

Since you did an upgrade you may already have a proprietary driver in place, you may need to remove, reboot, then re-install it.  NikTh seems knowledgeable in figuring this out if that's the case.

Hope this was helpful.


Speed up Banshee's indexing of files on a device

Is there, per chance, any way to speed it up?

I don't think so. When banshee scans the library, it reads the metadata of all files. This is a slow process, more if it has to scan ~250 albums (eq to 1300 song more or less). Another factor is the speed of the external hard drive and how it is plugged into the PC.

  Should I not mount the hard disk as a music player, but add it's contents to my library?

If you do so, and you add it's content to banshee, you will get (as you said yourself) a lot of error messages pointing that the media files could not be found. This is if you open banshee with the external hard drive disconnected.

  What's the best way to have my library on an external hard drive?

Summarizing, there is no better way other than having a local copy of your library (which would use ~7 GB).


The Ubuntu partition sda5 is a secondary partition to the primary partition sda4 so you can't resize sda5 beyond the size of sda4

To resize the Ubuntu partition, you must first resize sda4 by extending it into the free space you have created. Then the next step is to extend sda5 to use up the extra spaces in sda4. You can do this in gparted and apply the change in one go.

Here are the steps:

Move the sda3 partition so that the free space is after sda3
   (not before it like it is shown now).
Resize sda4 into the free space before it (by extending sda4).
   Be sure not to select sda5 by mistake as it is just an outline surrounding sda5.
Lastly, resize sda5 to fill up the larger sda4 partition you have created.
Now, apply the changes.

Good luck.

PS: Should backup important stuff in case things go wrong.


Postfix + Dovecot - not receiving mail in vmail directory

I guess you are confusing two categories of users. There are the SystemUsers and the VirtualUSers.

If you try to use a systemuser just need to add this line:

mailbox_command = /usr/local/libexec/dovecot/deliver
#  or
mailbox_command = /usr/libexec/dovecot/deliver
#  or
mailbox_command = /usr/lib/dovecot/deliver
#  or wherever it was installed in your system.

If you are trying to use a virtualusers, you have to configure them on postfix also.

Something like this:
obs: I will try to use your mysql confs, but not ure if  i will get it right.

/etc/postfix/virtual-address-mysql.cf

Content:

user=mail
password=P@ssw0rd
dbname=mail
hosts=localhost
query=select username as address from mailbox where active = '1' and username = '%s';

Look, i might be missing something about your query.

Now postfix is able to know your virtualuser

Need to map it now.

proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_mailbox_maps $virtual_mailbox_domains
virtual_mailbox_maps =  proxy:mysql:/etc/postfix/virtual-address-mysql.cf

I would go to virtual users, better to manage a db than system users.

You can do also virtual domains and virtual alias

Same logic and the conf is like this:

virtual_mailbox_domains = proxy:mysql:/etc/postfix/vdomains.cf
virtual_alias_maps = proxy:mysql:/etc/postfix/virtual-alias.cf

I guess that its. If need more help i guess you can find in

Dovecot Wiki


$SPARK_VERSION, $APACHE_MIRROR are environment variables so just copy pasting as individual commands won't work.
The tutorial you've pointed above is about setting up a Spark cluster on OpenStack VMs.
First write a bash script as shown in in the tutorial. (init-spark-master.sh)
Then just executing it will do.
UPDATE--
Unless you set the environment variables beforehand, you should execute complete commands.
For example,
curl -o /tmp/spark-apache.uib.no-bin-hadoop1.tgz http://apache.uib.no/spark/spark-1.5.0/spark-1.5.0-bin-hadoop1.tgz
would run without any problem.


As with a lot of issues related to graphics in Chrome, disabling hardware acceleration is commonly suggested as a workaround and fixes the problem of image distortion in this case.


Short answer is NO you can't do it an easy way. nautilus file manager is built a way that you need to re-plug the device.

It is possible to patch Nautilus and change this behavior, but it is not worth the effort IMHO.

You can see more details at Unix & Linux


Changing ubuntu to windows xp on netbook

you could reinstall windows XP from a usb stick. Here's how


How to disable systemd-resolved and resolve DNS with dnsmasq?

dnsmasq packages are still available in 16.10 and 17.04.

Install dnsmasq and dependencies (or at least download their packages) before disabling systemd-resolved:

sudo apt-get install dnsmasq

Disable systemd-resolved and verify dnsmasq is running:

sudo systemctl stop systemd-resolved
sudo systemctl disable systemd-resolved

systemctl status dnsmasq

Season dnsmasq to taste.  After applying your settings, restart dnsmasq:

sudo systemctl stop dnsmasq
sudo systemctl start dnsmasq

After step 2 you might be without a working system resolver until step 3 is complete.  You may need to restart the networking subsystem (or simply reboot) to get dnsmasq functioning with the default configs.  In my testing, adding a known DNS server to /etc/dnsmasq.conf and restarting dnsmasq was enough to get it working in a liveCD environment.


Input/Output Error When Trying to Access Certain Directories

I fixed the problem by attempting to run fsck on the disk, which informed me that some of the files in the error prone directories had incorrect checksums. I fixed this by running Disk Utility to repair the corrupted files on the Mac computer.


Why is my computer turning on to this screen?

This is normal. The GRUB menu provides options for booting into different operating systems (if installed), and/or different versions of the GNU Linux kernel (if installed).

To prevent the GRUB menu from being displayed, see the related solution presented here, which will have you make some changes to the grub configuration called, appropriately, grub.

Let us know if you have any questions about following that procedure.


I highly doubt think you were hacked. Maybe some automated bot TRIED doing something, but I doubt that even happened..

If you disabled Password Auth and did not have a public key set up, there is very very little chance of anything even possibly happening.

In answer to your auth.log queries:

That is just PAM complaining about something. Usually just a programming error or a bad dependency. Missing SSH certs maybe? (Nothing to worry about)
Pretty much the same thing as #1. I assume someone (sshd) was trying to find certificates and didn't find them. Certs are generally stored in things called "wallets". (Nothing to worry about)
User 112 is the LightDM user. It is completely normal for it to be talking to the Xserver. (Nothing to worry about)

Regarding instability and network speed, you just enabled a server. It will definitely be slower. Even if nothing is happening. The increase in program crashing is also probably related.  More resources are being used on your computer now. Maybe there are a few config issues.

Also, I've dealt with hackers. If they got in looking for sensitive documents and didn't find them, they'll often troll. They'll delete random files. They'll wipe hard drives. They'll leave your system a broken mess. I think you're safe.


How can I make preview windows for Chrome/Chromium display window contents for minimized Chrome windows?

This seems to be a bug that has already been reported to dev.

You can read the bug-report here:

Minimized Chrome causes blank windows with Unity's Super+W spread function


One possibility would be the creation of a Personal Package Archive (PPA) to Bacula. Basically you provide the source and instructions on how to build Bacula and the packages are built remotely. If you add that PPA to all your machines, after a successfully build they are seen as updates.

I haven't created any PPA, so i cant ensure you this fits exactly you need and how hard it is. You can find more info here.

Another option would be using a continuous integration tool like Jenkins, to constantly watch a repository and when it founds a new version, downloads the sources and build it.

Hope this helps.

Edit

Here you can find a very complete answer with the steps needed to create a PPA. Also this shows how to automatically checkout code.

Credits to Khurshid Alam and George Edison.


Latest Kubuntu update for MySQL seems to have broken Akonadi

For me

sudo mkdir /var/lib/mysql-files

solved the problem after the update to 5.5.53. Albeit no files will be written to this new directory.


Juju deploy charm juju-gui fails with connection time out

Had the same issue. tried .bashrc, /etc/environment, .juju/environments.yaml, .juju/environments/maas.jenv none worked.

juju set-env worked. and did set proxy in all machines.

This is how I tested. Instead of using curl on master machine.

juju run "curl https://store.juju.ubuntu.com/charm-info?charms=cs%3Ajuju-gui" --all and it failed in all nodes.
juju run "env | grep proxy" --all in all machines and saw none have proxy related environment variables set.
juju set-env http-proxy=http://PROXY_IP:8080/ and https-proxy
juju run "env | grep proxy" --all now returned proxy variables set in all machines


Can't change startup programs in Startup Application Preferences

It sounds like a permission problem, you can try this (from a terminal):

sudo chown [username]:[username] -R ~/.config

If it doesn't help, try to start the "Startup Application Preferences" from a terminal using this command:

gnome-session-properties

You might see relevant error messages there. If the output looks useless to you, you might post it here.


How to install libsane-perl >=0.05 in Lubuntu 12.04?

That dependency is only available for Quantal at the moment unless you install it from some other ppa.

Here's an x64 build for precise. And an x86 build for precise here

Launchpad has a search function

See also: What are PPAs and how do I use them? and add ppa:alex-p/notesalexp-precise to Software Sources.


if you want to disable thumbnail feature in nautilus as:

open nautilus by clicking Files in launcher
in menu bar click on Edit > Preferences
then go to Preview tab as show below. "Show thumbnails:" set it to "Never"

Note you will not be able to see thumbnail preview for any file type


You can certainly disable apache and MySQL services on boot. They won't make a huge difference, but unless you are using them, they don't necessarily need to be running. Also, disabling virtualbox should not cause any errors.


Intel Graphics Board doesn't run great at Ubuntu. Help me?

What you could do, first, is use Unity 2D. Unity 2D isn't really behind Unity 3D, so you would get better performance and still be able to use Ubuntu as it's.

A second option would be use xorg-edgers, a PPA that updates your drivers to the latest ones avaiable. But those are EXPERIMENTAL drivers and are dangerous, so only use it if you are absolutely sure you want to use them. As they say: this PPA can put your computer on fire hehe

Since you are from Brazil, you can read this article i wrote about xorg-edgers.

Hope it helps you, but again: xorg-edgers have EXPERIMENTAL and not tested drivers and can break your desktop, so only use if you know what you are doing. I never had any problem with it (Intel HD 3000 Sandy Bridge), but i have to warn you that i can give you trouble.


Not able to clean out old kernel files in /boot

That's the main problem:

No space left on device

It's your /boot partition that has no more space left. Try to do this:

Delete the unused kernel images manually. But, take care to not delete the used one or you will not be able to boot anymore. Type uname -r in a terminal. All that contains this version string must not be deleted.

When you cleaned the boot partition, use apt-get -f install linux-image-3.2.0-67-generic again.

Then update your system cleanly with:

apt-get dist-upgrade


Ubuntu 20.04 pre-installed firefox lagging on scroll in fullscreen mode

I have also found that disabling smooth scrolling in preferences solves the issue, even when fractional scaling is enabled.


How to remove the old driver for Canon MX870 and install a new one?

What did I do to resolve this issue is the following:
I removed my MX870 from Ubuntu (Printing).
Since I couldn't install cnijfilter-mx870series, I just completely removed repository entries by michael-gruz.

$ sudo add-apt-repository -r ppa:michael-gruz/canon
$ sudo add-apt-repository -r ppa:michael-gruz/canon-trunk
$ cd /etc/apt/sources.list.d/
$ sudo find . -name "michael-gruz*"
$ sudo rm -rf michael-gruz*

I restarted Ubuntu and manually added my Canon PIXMA MX870 (via Printing), since the driver is already included in Ubuntu 12.04.
I'm still confused what happened with the PPA issue I've mentioned in my question (I've contacted the PPA maintainer), but who cares, since now it works without his drivers!


XRDP "Password failed, error - problem connecting"

I was facing the same issue while connecting through xrdp.

There is a problem with the latest xrdp update.
More info here.

Reverting to the previous version solves the issue:

sudo apt-get install xrdp=0.6.1-2


Here is a list of extensions I found that control various sites from the keyboard

Media Keys 0.5.1

Lets you control Youtube, Pandora, Bandcamp and TidalHiFi website media players using the media keys on your keyboard.

Be Quiet!

Provides tool bar and keyboard media controls and more for several music sites. Adds automatic music pausing functionality when playing html5 videos or watching videos on Youtube.

Google Music Media Key Fix

A fix to enable global use of media keys in Google Play Music.

I would think media keys is what you would need


Is there a website to check all media codecs?

Ubuntu should be setup so that when a media type is first-played then Ubuntu will guide the user to install the appropriate codecs via the internet (if they are not already installed).  Installing the two ubuntu-restricted-* packages from the Ubuntu Software Centre or command-line should be sufficient:

sudo apt-get install ubuntu-restricted-addons ubuntu-restricted-extras

I'm sorry that I don't know of a test site with media samples, but perhaps we should set one up to help Ubuntu users?  (The snippets would have to be legally free/libre before they could be hosted, which is going to be much harder to acquire unless they are encoded specifically for the purpose).


cannot find a way to switch to telex text input style in ibus-unikey (for Vietnamese language)

I managed to choose telex typing via text entry menu:

https://dl.dropboxusercontent.com/u/22321883/Workspace%201_040.png

You can show this menu by launching "Text entry" via launch pad and then tick the checkbox shown in the image below:

https://dl.dropboxusercontent.com/u/22321883/Text%20Entry_041.png

Regarding keyboard layout, I didn't find a way to use DVORAK instead of QWERTY.


'adobe-flashplugin conflicts with flashplugin-downloader' error while trying to install adobe-flashplugin

If figured it out myself.

I run $ apt-config dump|grep Archit
and it gave

APT::Architecture "amd64";
APT::Architectures "";
APT::Architectures:: "amd64";

And I fixed it with running:

$ sudo -s
# echo "foreign-architecture i386" > /etc/dpkg/dpkg.cfg.d/multiarch
# apt-get update

And then updating packages.


In 16.04, How to turn off the gray / darken feature when a window system is busy

In 16.04 you can open CompizConfig Settings Manager by firstly making sure you have it installed:

sudo apt install compizconfig-settings-manager

and secondly running it from the dash (click on swirly thing in top left and type compiz).

Once this is opened, click on Effects then untick the Fading Windows box.


As it turns out the rsync script did not sync the /lib64 directory to my host. Without it, no command will execute of course.

The lib64 dir contains only one symlink to the ld lib in /lib. But that's one very important symlink.


My touchpad, keyboard, and any other input devices intermittenly stopped working on Asus Zenbook UX303LB

Try using the latest nvidia-355 driver(ppa:xorg-edgers), it does not have the issue of freezing for me.

You can install the ppa by using this command:

apt-add-repository ppa:xorg-edgers/ppa
apt-get update

Install the driver using ubuntus driver manager (or how it's called)


What is a video editing program on Ubuntu which will allow me to create visual subliminal videos?

Here are some free video editing softwares with download links. https://itsfoss.com/best-video-editing-software-linux/


Running python script with sudo returns "sudo: script.py: command not found"

Try adding ./ like this:

sudo ./script.py

The above is assuming the script.py file is in your current working directory. The . means "this directory", so ./script.py refers to "script.py in the current directory".


Confusion about command-line system install

You should install server version, it comes with command line apps.AFAIK it does not come with ubuntu-desktop.

Alternate version is for computers with very low memory which can not load GUi based installer, it does not neccesarily mean that it does not contain any GUI, it just has a text based installer instead of GUi based installer.

So you should use Server edition.


Unable to install GATE software using "make install" command - "-- Up-to-date:" related error

I don't believe it actually prints any errors. It simply prints the path to the binary:

-- Up-to-date: /home/sghosh/Documents/Satyajit/softwares/GATE/gate_v8.2-install/bin/Gate

You can execute this from terminal with simply entering /home/sghosh/Documents/Satyajit/softwares/GATE/gate_v8.2-install/bin/Gate


Kernel error at start. How can I fix it?

Partial answer... work in progress...
From the comments...

upgrade from 16.04 to 16.04.2

(if you have Intel processors) install intel-microcode

update the BIOS from 203 to 211 by going to https://www.asus.com/support/Download/3/557/0/1/NjTBDAvwQa2EHvsG/41/ (confirm for yourself that I've got the correct page for your computer model #)

Update #1:
To check the file system on your Ubuntu partition...

boot to the GRUB menu
choose Advanced Options
choose Recovery mode
choose Root access
at the # prompt, type sudo fsck -f /
repeat the fsck command if there were errors
type reboot


Won't start League of Legends installation

Try checking for software updates in the Ubuntu software center update tab or by getting and installing the newest PlayonLinux version from your software center or the Official PlayonLinux web-page.

What work for me in Ubuntu 16.04 LTS as of patch 6.22 was changing settings of LoL launcher through PlayonLinux.

1.Install the most recent version of PlayonLinux and install the League of Legends. (Do not start game after installation)

Using PlayonLinux access the LoL game settings.

In PlayonLinux change the default wine version using the "General" tab.From 1.9.2 LeagueofLegends5 to the latest stagging version. When i wrote this answer it was "1.9.22stagging" i install both x86 and x64 wine versions. (again this all done through the playonlinux settings)

Through playonLinux settings now access the "wine" tab and click on "configure wine" icon. There you will change the default windows version from Windows XP to Windows Vista. (all other don't seem to work at least not on my PC)

Now using PlayonLinux start the LoL launcher (the screen will look weird, however, you should be able to see the League of legends logo on the top left, the percentage and download speed bar on the middle and the settings and minimize icons on the right.

This installation takes longer than when using windows.For me using Windows LoL installs in about 2.5 hrs. However, using Ubuntu it took 5 to 6 hours to install. During the installation it might seem like if the installation freezes or your installation stops and your download speed might even reduce to cero for a while but "PLEASE BE PATIENT"
Today is November 15, 2016 and i install LoL 6.22 and play.

8.if there is any new patch i would try waiting for the new playonlinux stagging version of wine before removing or changing anything else.


My system hangs very much even when multiple tabs are opened in browser. Android Studio and WebGL is not running on my system's browser

Onshape.com Problem

Check if you have enabled WebGL:

For chrome Open Google Chrome. In the address bar, type chrome://flags/, and press Enter.
Scroll to Disable WebGL - Enabling this option prevents web applications from accessing the WebGL API, and click Enable
Restart chrome

Android studio problem

I suggest to install it via snap:

sudo snap install android-studio


Welcome to Ask Ubuntu.

If you don't want gnome-screensaver, you can try to just uninstall it:

sudo apt remove gnome-screensaver

You can also try masking the service, which is telling systemd to act like the service doesn't exist:

sudo systemctl mask org.gnome.ScreenSaver.service

/etc/systemd is used for files that you manage. systemd related files installed by the systemd are often not stored there.

You can find where the systemd service file for a package is installed like this:

 dpkg -L gnome-screensaver | grep service


How can I move the google-chrome folder from ~/.config to a new location?

There are several options for relocating folders.  Which is most appropriate to use depends on circumstances.

application-specific configuration

Changing configuration settings from within an application is usually preferred if such a setting exists.  However, many programs are hard coded to use specific folders.

For Google Chrome, there is a command line setting that can be used:

google-chrome --disk-cache-dir="/tmp/chromium"

This change can be made semi-permanent by changing *.desktop files, but
doing so is cumbersome and likely to break.  So a more generic method may be preferred.

symbolic links

This is the approach you mention in your question.  It is the easiest, and the method I would try first in the situation you describe.  Copy or create the new folder at the desired location and use the ln -s command:

ln -s [new-location] [old-location]

This is the only type of link that will work with folders.  Hard links (created with ln without the -s option) work only with files.

Beware, links can be broken if either the target folder or the link itself are moved.

bind mount

A bind mount can be thought of as mounting a folder instead of a partition.  I would use this approach if I wanted several mount points to share a partition, but did not want to use symbolic links.  For instance, if a program misbehaves when encountering symbolic links.

What is a bind mount?

dedicated partition (or drive)

Usually, to prevent the / partition from filling up, a separate /home partition is used.  Also common is to put /var into its own partition.  You can read more here:

What mount points exist on a typical Linux system?

This approach is best taken during a fresh installation of the operating system.  Changing the partition structure of an already running system is cumbersome.


Using xdotool to count number of tabs in gnome-terminal

From a shell in the terminal you want to count the tabs on something like this might work

ps -h --ppid `ps -ho ppid $$` | grep pts | wc -l

The tabs share a common parent process and will be associated with a pseudo-terminal (pts). The $$ variable contains the process id of the invoking shell. The -h switch tells 'ps' to suppress the default header line and the -o switch tells it to use a custom format to return just the parent process id. The backticks say return the value of this command. So the output of the backticks will be the numeric process id of the parent of the current shell. Passed to 'ps' with the --ppid switch returns all processes with that parent. Filter with grep for TTY association and count lines.


If you don't like Unity, then there's no need to switch distro, just switch desktop!

To install plain gnome-shell by clicking this link, then log out (maybe restart?), use the gear icon to choose a new session type, log in, and see if you like that.

There's also KDE, LXDE, and XFCE to choose from, of course.


Not able to browse internet through WiFi in Ubuntu 14.04

I think you've a gateway issue, to be certain run the command traceroute 8.8.8.8 - the first hop should be the gateway. sudo apt-get install traceroute to install traceroute. Please post the outcome.

You wrote 'It was working fine earlier', so either you changed the gateway or you adjusted settings in /etc/networking/interface. Please post your interface setup. (See example below in post)

If you're able to ping 8.8.8.8 but not google.com you might also have a DNS issue then,

resolvconf generated /etc/resolv.conf,

# Generated by resolvconf
nameserver 8.8.8.8
nameserver 8.8.4.4

If you updated /etc/resolv.conf restart it by systemctl restart networking
 or sudo service networking restart

Check if you've the correct nameserver, you can also reinstall resolvconf and see if that resolves it.
sudo apt-get remove --purge resolvconf && sudo apt-get install --reinstall resolvconf

Another place where DNS is configured is in /etc/network/interfaces, if you configured it static.

example /etc/network/interface:

auto eth0
iface eth0 inet static
    address 192.168.1.2
    netmask 255.255.255.0
    gateway 192.168.1.1
    dns-nameservers 8.8.8.8 8.8.4.4


Has the resolvconf got updated? Go through the following link and give it a shot. Worked for me for my BSNL EVDO (Prithvi dongle)

  You might have issues with resolvconf stomping on your DNS
  configuration in /etc/resolv.conf - but if you're getting an IP
  address from the remote peer then the modem is working, even if you
  can't access any websites etc. If you don't use resolvconf, consider
  just uninstalling it.

Source: https://wiki.ubuntu.com/NetworkManager/Hardware/3G/Probing


After upgrade: what's this envelope systray icon, and how do I get rid of it?

I just remove it a few days ago by running the following command in terminal:

sudo apt-get remove indicator-messages -y

A re-login is necesary.


How to partition Seagate FreeAgent GoFlex 2TB hard disk?

First of all, all the stuff provided by the manufacturer of the hard disk drive, is "for the convenience of the user", which isn't used by some people because of some of we prefer to use different backup and diagnostic software, other than these provided by the manufacturer, and some other tools are facing the same situation.

For the diagnostic tools provided inside of the disk, I suggest you to perform a test running the software from a different location and let's see if the hard disk drive is found by the program. This way you can be sure that the hard disk drive will be handled by the programs in order to diagnose it when you put the files back into the disk. BTW: These tools will probably give you a better performance when used in a MS based system (Windows).

Well, it is a hard drive. With this in mind, let's take in consideration that the majority of the Operating systems will be able to reach the data contained on it. Nevertheless, the file system that you use will provide a better performance just if the OS is able to handle the allocation sectors with ease, which will be defined at the time that you create the partitions.

I mean: no matters what you put in the disk, if the OS that you use can understand the partitions table that you make, the data will be available.

In linux you can access the majority of the File Systems that are even created by other OS's, nonetheless, other OS's may not understand all the partitions created by Linux (in example: windows will have problems to natively read ext4 file systems)

About the partitions, In my experience I can tell you that partitioning provides an eye-candy solution for the user, which is just an optical illusion. If you make several partitions, you are forcing the heads to run from an allocation data sector to the MBR and back to a different allocation data sector, which won't provide a better performance than using a single partition. People may differ with me in this point but this is what I have experienced. Hard disk drives with several partitions burned because of overheat, situation that isn't faced by single partition HDD's.

For large files (10 up to 20 GB), I use NTFS. FAT may won't be able to store these files. And I haven't tested on ext4 FS.

About your last point: I have read that there are reports of people that says that Windows 7 doesn't read FAT file systems, you better gather enough information about it before making this kind of FS.

And good luck.


Adjust date and time informations inside several text files automatically from the command-line

You can use GNU date to convert that time to your local time zone.

 awk '/^Date:.*UTC/ {cmd="date -Rd \"" substr($0,6) "\""; cmd | getline new; close(cmd); $0="Date: " new} 1' file
text text
more text
Date: Fri, 01 Jan 2016 01:53:51 +0200
more text
some more

If you have GNU awk, you can change in-place all the files in the current directory using:

gawk -i inplace '/^Date:.*UTC/ {cmd="date -Rd \"" substr($0,6) "\""; cmd | getline new; close(cmd); $0="Date: " new} 1' *

Without GNU awk, use:

for f in *
do
    awk '/^Date:.*UTC/ {cmd="date -Rd \"" substr($0,6) "\""; cmd | getline new; close(cmd); $0="Date: " new} 1' "$f" >tmp && mv tmp "$f"
done

How it works

-i inplace

This tells GNU awk to change files in place.  This requires a modern GNU awk.  If you use Mike's awk, then use instead the bash loop as shown above.
/^Date:.*UTC/ {cmd="date -Rd \"" substr($0,6) "\""; cmd | getline new; close(cmd); $0="Date: " new}

This selects lines that start with Date: and contain UTC on the same line.  For those lines, the command date -Rd is run on the part of the line containing the date.  The result is stored in the variable new.  Then, the current line, denoted by $0 in awk, is replaced by one with the new date.
1

This is awk's cryptic shorthand for print-the-line.

Multiple line GNU version

If you prefer your scripts spread over multiple lines:

gawk -i inplace '

/^Date:.*UTC/ {
    cmd="date -Rd \"" substr($0,6) "\""; cmd | getline new
    close(cmd)
    $0="Date: " new
}

1
' file

Some refinements (non-GNU version)

The code above looks for lines starting with Date: that also contain the letters UTC.  This appears to me to be good enough.  The question, however, asks more specifically for lines that start Date: and end with +0000 (UTC).
The question also asks to eliminate the trailing +0200 from non-UTC date lines.

Adding these two refinements, the code becomes:

for f in *
do
    awk '/Date: .* [+]0200$/{sub(/ [+]0200$/,"")} /^Date: .* [+]0000 [(]UTC[)]$/ {cmd="date -Rd \"" substr($0,6) "\""; cmd | getline new; close(cmd); $0="Date: " new} 1' "$f" >tmp && mv tmp "$f"
done

This code is more precise but also more persnickety.  For example, this code insists that a line end with +0000 (UTC) before it will change it.   Consequently, lines with trailing whitespace, which may be invisible in your editor, will not be changed.  Whether this is good or not is something for you to decide.


GRUB boot loader error when installing Ubuntu in dual UEFI boot along side Windows

The installer can't write grub to the intended partition for some reason. Is your NVME drive compatible with your BIOS/motherboard? I have an older 4th gen system and I can't boot directly from my Intel Optane drive because the BIOS does not have the NVME boot code. However, I was able to put grub on my SATA SSD in the EFI boot partition and the rest of the OS is on the Optane drive which the BIOS sees as a regular device (which is very snappy over the SSD by the way) so it only uses the SSD to load grub and the boot menu. The rest of the SSD has Windows and data partitions like normal.

Also ensure your partitions are GPT not MSDOS. And it's a good idea to create the partitions before you start the installation. You can do this with the Live OS option, then install the full OS.


Multiple Users Sending Input To The Same Server Running On My Ubuntu Server

You might be looking for the screen program.

More specifically, how to allow multiple users to interact with the same screen.


Steps:

Open Skype
Click on your username
Click on the image.
Select a new one!
Done!


Cannot access external monitor on fresh install of 12.04 or HP laptop with Nvidia graphics

I think you are on the right track with editing the xorg.conf file that you posted not long after this one. I suspect the reason you didn't have this issue in 10.10 was rooted in how Xorg auto-configs. xorg.conf is now only really necessary if you have special circumstances like a broken monitor. :-)


Keyboard Stops Responding While Using Google Docs in Chrome Browser

I have the same problem but not just with Google Docs. I've noticed it with Facebook, Google Docs, other forums and basically anything else. Looks to be a Chrome problem specifically.

I have to open up task manager and kill the process for Chrome and re-open it for it to respond again.

I'm using Ubuntu 14.10 on a 13" MacBook.

Have you found a solution to this at all?

UPDATE: I found a solution
This thread seems to have it, turn off ibus in the system settings-language support and it'll solve it.

Ubuntu 14.10 chrome doesn't detect keyboard input


Are you on a UEFI machine booting 64 bit versions of 12.04.2, 12.10, or 13.04?  If so you may be experiencing bug 1159016.  Feel free to add yourself to the 'Does this affect me' list in that case.  Presuming you really created the USB with persistence, you may manually turn it on by editing the /boot/grub/grub.cfg file on the stick, adding the word persistent to the kernel line you ate booting.


Can I install apps in Ubuntu Touch without signing in?

No, you cannot install apps from the store without signing in to an Ubuntu One account. You can however install packages manually from the command line, ignoring signatures. Installing apps in such a manner can present a security risk.

There are several things which require an Ubuntu One account, and installing/updating apps is only part of that. An Ubuntu One account is also required to submit reviews, submit bug reports about the system on the https://launchpad.net/ site, and an account is needed in order to receive push notifications from the apps which support it.

The account is required for installing apps, also to allow certain features in the future, such as remote install via web, re-installation of installed apps on new/reflashed/other devices, and blacklisting revocation of malicious apps which may have been installed.

Apps which are "free" may also use in-app purchases, and an account is required for this feature to work properly, even if you do not wish to purchase anything. The high level QtPurchasing API for this is very limiting, and requiring an account to install the app helps ensure the account exists while the app is used, as well.


Go to System Settings -> Sound and check "Allow louder than 100%"


The relevant option is no longer available in the settings menu in Ubuntu 13.10; this has been reported as a bug (https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/1218322). However, it is still possible to swap these keys using the Gnome tweak tool.

First, install gnome-tweak-tool using sudo apt-get install gnome-tweak-tool from a console.

Then, run it using the command gnome-tweak-tool, or by typing "Tweak Tool" into the dash at the top-left.

From this tool, choose the "Typing" tab on the left. Then, from the dropdown next to "Ctrl key position" on the right, choose "Swap Ctrl and Caps Lock". This should swap those two keys.


You can use systemctl to "isolate" targets, which is to some extend similar to switching runlevels. The targets of interest here are

graphical.target
multi-user.target

Confusingly, graphical.target is the default target in both Ubuntu desktop and server, but since there is no display manager installed in server it's essentially the same as multi-user.target.

Switch while Ubuntu is running

Switch to "text mode" (you can simply run this in e.g. gnome-terminal):

sudo systemctl isolate multi-user.target

Switch to "graphical mode":

sudo systemctl isolate graphical.target

Set boot target

You can set the default target that is reached after boot (persists across reboot), e.g.:

sudo systemctl set-default multi-user.target

You can also set a target with the kernel parameter systemd.unit, e.g.

systemd.unit=multi-user.target

The kernel parameter has precedence over the default target.

This can be used to boot to a specific target once by editing the grub boot entry before boot. Or you could add multiple boot entries for different targets.


What are some good applications for creating lecture-like videos?

Vokoscreen: A new screen casting tool for Linux

 sudo add-apt-repository ppa:vokoscreen-dev/vokoscreen
 sudo apt-get update
 sudo apt-get install vokoscreen

For More HELP


Broken packages because of trying to install Adobe ConnectAddIn

sudo apt-get clean
sudo apt-get autoremove

if that doesn't work:

sudo apt-get purge  ConnectAddIn
sudo apt-get autoremove


How to "cat" or "less" a libreoffice writer .odt file?

The solution is using odt2txt. Now, this command is provided by two different packages, namely one called odt2txt that you can install with

sudo apt-get install odt2txt

and by the package unoconv (that offers also command-line conversions between more libreoffice formats), that is installed by

sudo apt-get install unoconv

If you have the two, you can switch between them using the alternative mechanism:

sudo update-alternatives --config odt2txt

If you are using the odt2txt provided by the package odt2txt you just use

odt2txt file.odt

if using the unoconv provided package you have to use

odt2txt --stdout file.odt

Pipe them to less to have a less-like experience (odt2txt file.odt | less)

Notice that if you do not use the --stdout option, the unoconv-provided package will write the result in a file called  file.txt.

The suggested package by the distribution seems to be the one from the odt2txt package (it has a higher default priority in the alternative system); for sure it has less dependencies.


How to write a Chromium OS *.img file to a USB drive?

Sites offering such images usually provide instructions:

  Extract the IMG file from the downloaded archive
  At the shell, run the following (where sdX is your USB stick and ChromeOS.img is the path to the IMG file you extracted): dd if=ChromeOS.img of=/dev/sdX bs=4M
  Boot from the newly created Chromium OS USB stick!

Known sites:

http://chromeos.hexxeh.net/
http://arnoldthebat.co.uk/wordpress/chromium-os/


"E:Type '<!DOCTYPE' is not known on line 1 in source list" how to fix?

The link in /etc/apt/sources.list.d/playonlinux.list is a link for Ubuntu 9.04, which is an End-of-Life release and unsuitable for the version of Ubuntu that you are using, Ubuntu 13.04. You can safely delete the file by running the following command from the terminal:

sudo rm '/etc/apt/sources.list.d/playonlinux.list'

Then you will no longer get the error message.


How to enable tap-to-click in libinput on Ubuntu 19.04 x11 Unity

This is a well known issue. You should ideally use libinput. Then you need to simply create a file and enable the options after targeting the right device.
 $ sudo su # Get root
 # touch /etc/X11/xorg.conf.d/30-touchpad.conf
 # vim /etc/X11/xorg.conf.d/30-touchpad.conf

Here you can now add additional options. A basic one would be:
Section "InputClass"
Identifier "touchpad"
Driver "libinput"
  MatchIsTouchpad "on"
  Option "Tapping" "on"
  Option "NaturalScrolling" "on"
  Option "ClickMethod" "clickfinger"
EndSection

Don't forget to reboot after this. For more options you should check the man pages for libinput. A better write-up is here.


Cant connect to bluetooth headphones [contains lots of terminal outputs to help debug]

I found this working perfectly Why am I getting this "Connection to PulseAudio failed" error? .Take a look into it once (:
quickNotes :

sudo apt-get --purge --reinstall install pulseaudio

sudo nano /etc/pulse/client.conf  [Change the variable autospawn = now/yes to autospawn = no]

reboot

pavucontrol

Now you can choose available bluetooth device for sound output


If you had installed Ubuntu correctly to your SD card, then you have to preform the following steps in macOS to finish the installation. Here, I assume 64 bit version of Ubuntu was installed to use the EFI boot method.

The steps below copy the boot file for grub to the correct location in the EFI partition. This is not only a requirement for the Mac Startup Manager, but is also defined in the UEFI specification.

Enter the command diskutil list to determine the identifier of the EFI partition on your SD card. In the steps given below, this identifier is assumed to be disk1s1. If you determined a difference identifier, then make the appropriate substitutions.
From a Terminal application window, enter the command diskutil mount disk1s1. A new device representing this partition should appear in the Finder application.
Using the Finder application, navigate to this device.
Create a folder labeled boot in the folder EFI.
Copy the file grubx64.efi found in the EFI/ubuntu folder to the EFI/boot folder.
Rename the  grubx64.efi file in the EFI/boot folder to bootx64.efi.
From a Terminal application window, enter the command diskutil unmount disk1s1.

If you can boot to the correctly installed Ubuntu operating system, then the above steps can be replaced by commands given below. These commands need to be entered in a Ubuntu Terminal window.

  Note: To enter these commands, you will have to know the root users password.

su
mkdir  /boot/efi/efi/boot
cp  /boot/efi/efi/ubuntu/grubx64.efi  /boot/efi/efi/boot/bootx64.efi
exit

Once the changes are made, you can do the following to choose an operating system.

Start or restart your Mac and immediately hold down the option key until the Startup Manager appears.
Select the icon for the desired operating system. Ubuntu will appear with label EFI Boot.
To boot the desired operating system, select the arrow below the chosen icon .

  Note: If you hold down the control key while selecting the arrow, the chosen operating system will be come the default.


Is it possible to get the old workspaceswitcher back in the top-panel?

I am sorry but i do not know a solution for Unity. However, you can start your session with GNOME classic and everything will be more similar to the old GNOME.

In order to set up panels as in the older one, you will have to press Alt and Super keys at the same time that you use the mouse with right button to access options or middle button to arrange icons...


Ubuntu 14.04 (64bit) installing and running Sql instant client via sqlplus command

It's enough to create a symlink named sqlplus pointing at sqlplus64
Just execute the following in a Terminal:

sudo ln -s /usr/bin/sqlplus64 /usr/bin/sqlplus


While it would almost certainly be possible to hack something together by extracting printable bytes from /dev/random (or /dev/urandom), perl appears to provide at least one module that does exactly what you seem to want:

NAME

String::Random - Perl module to generate random strings based on a pattern

The module is provided in Ubuntu by package libstring-random-perl, which you can install via your preferred package manager, or from the command line using sudo apt install libstring-random-perl or sudo apt-get install libstring-random-perl.

Based on the examples in the CPAN - String::Random page, you could then do something like:

perl -MString::Random=random_string -pe '
  s/\".*\"/sprintf "\"%s\"", random_string("CccnCccn")/e if /mumbleserver_username:/
' yourfile

to replace strings between literal double quotes \".*\" in lines matching mumbleserver_username: by 8-character random strings consisting of a pre-defined mix of upper-case letters C, lower-case letters c, and digits n.

Testing:

$ cat file.txt

mumbleserver_username: "BOT",
mumbleserver_username: "foobar",
mumbleserver_username: "NOT",

then

$ perl -MString::Random=random_string -pe '
    s/\".*\"/sprintf "\"%s\"", random_string("CccnCccn")/e if /mumbleserver_username:/
  ' file.txt

mumbleserver_username: "Wzk1Ihr2",
mumbleserver_username: "Los8Nuz7",
mumbleserver_username: "Sdf8Qmd9",

To turn the one-liner into a script, you can use the -MO=Deparse trick described here: How can I convert Perl one-liners into complete scripts? then paste its output into a file, along with a suitable 'shebang' line like so

#!/usr/bin/perl

use String::Random (split(/,/, 'random_string', 0));
LINE: while (defined($_ = <ARGV>)) {
    s/\".*\"/sprintf '"%s"', random_string('CccnCccn');/e if /mumbleserver_username:/;
}
continue {
    die "-p destination: $!\n" unless print $_;
}

Make it executable

chmod +x myscript.pl

and then you can use it like

./myscript.pl yourfile


Getting gnome keyring credentials on the command line, not knowing the SERVICE + USERNAME

I'm not sure about SERVICE or USERNAME still, but here is the usage for secret-tool:
secret-tool lookup application chromium

How would you know what attribute+value pair will match the Chromium Safe Storage entry?
# Python 3
import secretstorage
connection = secretstorage.dbus_init()
collection = secretstorage.Collection(connection)
for item in collection.get_all_items():
     print('%16s %s' % (item.get_label(), item.get_attributes()))


If you cannot empty the Rubbish Bin via the normal method (by clicking empty), navigate to the root of the drive in question and goto View->Show Hidden Files and check the box.

Then, delete any folders beginning with .Trash- such as .Trash-1000. You will be prompted for confirmation because the deletion is permanent.


Which format must the drive be in order to create a bootable USB?

To the best of my knowledge, it does not matter how you format (i.e. choice of filesystem) your pendrive. If your aim is to make a bootable pendrive with e.g. Unetbootin it is probably the best to format in VFAT. Given that the pendrive is plugged into the computer and mounted (i.e. you can browse its content) you can proceed as follows from the terminal:

Identify the device name /dev/sd* of the pendrive (from its size and/or mounting point) by typing

df -h

which will produce a list of all partitions currently mounted in Linux. Let us say that your device is called "/dev/sdc1". Unmount the pendrive by typing

umount /dev/sdc1

this will unplugg it from Linux (do not remove the pendrive physically). To format the pendrive you simply have to type

sudo mkfs.vfat /dev/sdc1

which will erase your pendrive and create a new empty VFAT filesystem. (Check that you selected the correct device name before formating.) Now you can toggle the disk as bootable with the cfdisk utility. Type

sudo cfdisk /dev/sdc

and select the 'sdc1' partition graphically and toggle it as bootable. Write the changes to the disk. Voila!


Add 'duplicate file' to Gedit file browser panel right-click menu?

Here's a solution that should work with the ExternalTools plugin recommended by @Rinzwind:

#!/bin/bash

FILE="$GEDIT_CURRENT_DOCUMENT_PATH"

FILENAME="${FILE##*/}"
EXTENSION_PRE="${FILENAME#*.}"
BASENAME="${FILENAME%%.*}"
DIRNAME="${FILE%/*}"

if [[ "$FILENAME" = "$EXTENSION_PRE" ]] # handle files without extension
  then
      EXTENSION=""
  else
      EXTENSION=".$EXTENSION_PRE"
fi

cp -v "$FILE" "$DIRNAME/${BASENAME}_copy$EXTENSION"

I tested it for files without extension (e.g. Untitled Document), with a single extension (e.g. Untitled Document.txt) and composite extensions (e.g. Untitled Document.text.txt).

Here's how I set it up with gEdit's external tools (this setup will show the (verbose) output of cp in the bottom pane):

Edit

Here's a step-by-step explanation of what the code does:

#!/bin/bash
#  Note: we are using /bin/bash and not /bin/sh
#  /bin/sh is the DASH shell, /bin/bash the BASH shell
#
#  We need BASH to perform the string manipulations on
#  the file path.
#
#  More information on the differences may be found here:
#  - http://stackoverflow.com/a/8960728/1708932
#  - https://wiki.ubuntu.com/DashAsBinSh

FILE="$GEDIT_CURRENT_DOCUMENT_PATH" # assign the full file path provided
                                    # by gedit to a shorter variable

# What follows are a number of bash string manipulations.
# These are very well documented in the following article:
# - http://linuxgazette.net/issue18/bash.html

# 1.) remove everything preceding (and including) the last slash
#     in the file path  to get the file name with its extension
#     (e.g. /home/test/file.tar.gz → file.tar.gz)
FILENAME="${FILE##*/}"

# 2.) remove everything in the file name before (and including)
#     the first dot to get the extension
#     (e.g. file.tar.gz → tar.gz)
EXTENSION_PRE="${FILENAME#*.}"

# 3.) remove everything in the file name after (and including)
#     the first dot to get the basename
#     (e.g. file.tar.gz → file)
BASENAME="${FILENAME%%.*}"

# 4.) remove everything after (and including) the last slash
#     in the file pathto get the directory path
#     (e.g. /home/test/file.tar.gz → /home/test)
DIRNAME="${FILE%/*}"

# If there's no extension in the filename the second string manipulation
# will simply print the filename. That's why we check if $FILENAME and
# $EXTENSION_PRE are identical and only assign EXTENSION to a value if
# they aren't.

if [[ "$FILENAME" = "$EXTENSION_PRE" ]]
  then
      EXTENSION=""
  else
      EXTENSION=".$EXTENSION_PRE"
fi

# in the last step we compose the new filename based on the string
# manipulation we did before and pass it to cp
cp - v "$FILE" "$DIRNAME/${BASENAME}_copy$EXTENSION"


Noob running xubuntu 14.04 and skype audio doesn't work

Found this solution on WebUpd8 -

sudo sed -i 's/^Exec=.*/Exec=env PULSE_LATENCY_MSEC=30 skype %U/' /usr/share/applications/skype.desktop

The command above replaces "skype" from the Skype desktop file with "env PULSE_LATENCY_MSEC=30 skype", this being a work-around for getting Skype to work with PulseAudio 4.0.


Some windows are dimmed like if they were unresponsive in GNOME

I have had the same problem after install new Intel Graphics drivers. The cause was the way dynamic links between shared libraries were formed by ld.so. I found pieces from different sources, and took the following steps to fix it.

1: Check /etc/ld.so.conf

ldconfig is used to update/maintain the configuration of links. On SO I found out that the list of paths it looks for is based on the file /etc/ld.so.conf, which should contain just one line and should look like this:

$ cat /etc/ld.so.conf
include /etc/ld.so.conf.d/*.conf

2: Check files /etc/ld.so.conf.d/

The files inside the folder /etc/ld.so.conf.d/ hold the different paths containing the shared libraries. To check, list all the *conf-files in the
folder. Mine had files and links, and looked like this. But it may be different depending on installed packages.

$ ls -Ahl /etc/ld.so.conf.d/
total 16K
-rw-r--r-- 1 root root 38 aug 12  2016 fakeroot-x86_64-linux-gnu.conf
-rw-r--r-- 1 root root 24 sep 27 20:41 ld.so.conf
-rw-r--r-- 1 root root 48 sep 27 20:43 x86_64-linux-gnu.conf
lrwxrwxrwx 1 root root 43 jun  8 11:51 x86_64-linux-gnu_EGL.conf -> /etc/alternatives/x86_64-linux-gnu_egl_conf
lrwxrwxrwx 1 root root 42 jun  8 11:51 x86_64-linux-gnu_GL.conf -> /etc/alternatives/x86_64-linux-gnu_gl_conf
-rw-r--r-- 1 root root 18 sep 27 20:43 zz_i386-biarch-compat.conf

and their contents, listed one after the other using cat (some files have comments, not shown here):

$ cat /etc/ld.so.conf.d/*.conf
/usr/lib/x86_64-linux-gnu/libfakeroot
/usr/lib
/usr/lib/x86_64-linux-gnu
/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/mesa-egl
/usr/lib/x86_64-linux-gnu/mesa
/lib32

3: Add missing paths

Back-up any files before changing them!
The first problem might be that paths are missing from the .conf files. For example, I had to add /user/local/lib and used sudo nano ld.so.conf to add it. And I added /usr/lib32 to zz_i386-biarch-compat.conf. Google ldd and ldconfig for finding paths that are missing.
Removing lines from these files is generally not necessary.

4: Reorder files and their entries

Now, the problem is that ld.so reads the files and their lines in the order they were saved (I found out here). I used an array of filenames and an array of new prefixes to rename the files. The /mesa... entries must come before those in (/usr)/lib/x86_64-linux-gnu/ to order the graphic libraries.

$ cd /etc/ld.so.conf.d
$ files=(*)                                    #filename array
$ numbers=(1 2 5 3 4 6)                        #order array
$ for i in ${!files[@]}; do
$  sudo mv -i ${files[$i]} ${numbers[$i]}0_${files[$i]};
$ done
$ cat /etc/ld.so.conf.d/*.conf                 #Check the order
/usr/lib/x86_64-linux-gnu/libfakeroot
/usr/local/lib
/usr/lib
/usr/lib/x86_64-linux-gnu/mesa-egl
/usr/lib/x86_64-linux-gnu/mesa
/usr/lib/x86_64-linux-gnu
/lib/x86_64-linux-gnu
/usr/lib32
/lib32

5: Reconfigure library and reboot

$ sudo ldconfig                                #sudo ldconfig -v (for output)
$ sudo reboot

After rebooting, everything was back to how it used to be (lighter windows, purple gnome-terminal, better font rendering). Let me know if it works for you.


Having Issues while installing Ubuntu using Windows XP

Wubi is buggy and it run slower than native installed Ubuntu.

Instead install Ubuntu as dual-boot with Windows.


how add a group to another group in linux

You can not add groups as members of other groups, only users.


I working command on the Terminal does not work set as a shortcut

I have found a solution. I created a .py program that adds '\' to my clipboard and I run it with Shift + /.

Python3 program:

import pyperclip
pyperclip.copy('\\')

It needs a version of python3 and the module pyperclip installed.

To install:

sudo apt install python3

sudo pip3 install pyperclip

Shortcut command:

python3 snap/contrabarra.py

*I named the .py file contrabarra and it is located in my snap directory, but you can name it whatever you want and put it wherever you see fit.


I'd suggest that you need not worry as long as the concerned programs run as intended.

You can look at this: A lot of gtk-warnings in terminal. Is this serious?.


package manager odd behavior after ubuntu failed update wich included an nginx update

I noticed this line:

cp: cannot stat `/usr/share/nginx/html/index.html': No such file or directory`

So I figured maybe just adding the previous index.html file (located now on /var/www/html/) to the old path (/usr/share/nginx/html/) would help the script execute without throwing an exception, and it did work.

http://localhost is working fine now.


How to grep for all packages used in a tex file

You can do multiline matches in regular grep using a combination of the -P (PCRE mode) and -z flags e.g.

grep -zP '(?s)\\usepackage.+?}' file

or with pcregrep

pcregrep -M '(?s)\\usepackage.+?}' file

The (?s) modifier allows . to match newlines.

To get just the package name, you could try either

grep -zPo '(?s)\\usepackage.*?{\K.+?(?=})' file

or

pcregrep -Mo '(?s)\\usepackage.*?{\K.+?(?=})' file

Testing the plain grep expression on a TeX manuscript of my own I get the following package list:

~$ grep -zPo '(?s)\\usepackage.*?{\K.+?(?=})' myfile.tex
geometry
changepage
inputenc
textcomp,marvosym
fixltx2e
amsmath,amssymb
cite
nameref,hyperref
lineno
microtype
rotating
setspace
caption
lastpage,fancyhdr,graphicx
epstopdf


Why is Tex is not rendering in the right way on math stackexchange?

Mathematics Stack Exchange built-in editor uses MathJax to render LaTeX. MathJax is an open-source JavaScript engine that makes it easy to embed mathematical equations, symbols, and formulae on a webpage. MathJax documentation

Mathematics Stack Exchange Markdown Editor Help can be accessed by clicking the edit link under a post followed by advanced help » or by going to the LaTeX Markdown Editor Help — Mathematics Stack Exchange webpage.

Please note the use of the single dollar sign to delimit inline equations instead of the double dollar sign to delimit blocks in this example.

integral of $\int\sin3x\cos3x \mathop{\mathrm{d}x}$

It is also possible to edit MathJax markdown text locally by installing Typora markdown editor in all currently supported versions of Ubuntu.

sudo snap install typora-alanzanattadev


I had the same problem until I downloaded the .iso via torrent http://releases.ubuntu.com/12.10/.  Once that was complete I used imgBurn to put the .iso on a CD.  After that it worked.

If you currently do not have the ability to download a .torrent file I recommend uTorrent 2.0.1.  It's ~313KB and can be downloaded here: http://www.oldapps.com/utorrent.php?old_utorrent=32


Application view in Glade differs from actual application

These are two menu entries added in code (not through Glade) that are part of the Launchpad Integration library. You'll find them in <yourproject>_lib/Window.py

# Optional Launchpad integration
# This shouldn't crash if not found as it is simply used for bug reporting.
# See https://wiki.ubuntu.com/UbuntuDevelopment/Internationalisation/Coding
# for more information about Launchpad integration.
try:
    from gi.repository import LaunchpadIntegration # pylint: disable=E0611
    LaunchpadIntegration.add_items(self.ui.helpMenu, 1, True, True)
    LaunchpadIntegration.set_sourcepackagename('foo')
except ImportError:
    pass


The standard Ubuntu NVidia drivers generate some problems on slightly older and slightly newer NVidia hardware.

If you want more then the standard Ubuntu repository drivers, install the xorg.edgers PPA.  As the xorg.edgers group ask not to give installation instructions directly without linking to their page, this is the best I can do for now...

If you don't know what a PPA is or need some guidance about rolling forward and backward of driver versions after reading their page, leave a comment below.


wireless card problem rtl8192se autodisconnects after a few minutes in 13.04

Have the same problem here... my workaround is reloading the driver...

make a .sh script with:

echo deloading wifi module...
sudo rmmod rtl8192se
echo reloading wifi module...
sudo modprobe rtl8192se


hm... Actually there's an option for minimize/maximize it's kinda hidden, when you click on nautilus top panel you get:

I'll add more solutions, when/if I find.


Unable to use sudo apt-get update: "NO_PUBKEY 26EB39123AAAAA96"

Looks like the keys are still valid, so you should be able to get them imported with the following: gpg --keyserver hkp://keys.gnupg.net --recv-keys {key}
Here is what I get for each of them:
$ gpg --keyserver hkp://keys.gnupg.net --recv-keys 3B4FE6ACC0B21F32
gpg: key 3B4FE6ACC0B21F32: public key "Ubuntu Archive Automatic Signing Key (2012) <ftpmaster@ubuntu.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1

$ gpg --keyserver hkp://keys.gnupg.net --recv-keys D94AA3F0EFE21092
gpg: key D94AA3F0EFE21092: public key "Ubuntu CD Image Automatic Signing Key (2012) <cdimage@ubuntu.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1

$ gpg --keyserver hkp://keys.gnupg.net --recv-keys 871920D1991BC93C
gpg: key 871920D1991BC93C: public key "Ubuntu Archive Automatic Signing Key (2018) <ftpmaster@ubuntu.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1

From here, you can sudo apt-get update and everything should work.
Hope this helps


Problem with KDE programs after upgrading to 15.04

SUMMARY: apt-get install kinit kio kio-extras kded5

LONG VERSION:

After much searching and experimenting, I was able to find a solution for this problem.

klauncher is a daemon for service activation in KDE and is controlled by kdeinit supplied by the kinit package. This package was not installed, so I installed it:

  apt-get install kinit

Once I installed kinit, the error message went away, but was replaced by another error message:

  could not start process unable to create io-slave klauncher said: unknown protocol 'file'

After some searching I realized I had to install the KDE Input/Output framework:

  apt-get install kio

This solved the problem, but to be sure I also installed kio-extras:

  apt-get install kio-extras

I am now able to right-click and save links without issue. I did still get the following error message when running konversation from the command line:

  Can't communicate with kded_kcookiejar!

Using @Graham's solution, I was able to resolve this issue:

  apt-get install kded5

EDITED TO ADD: There still seems to be one outstanding issue. Even though I can save the links, it doesn't remember the last folder I used. Before I upgraded to 15.04, the last folder I saved something to was remembered the next time I tried to save something.

Now, this is not the case. The "Save As" dialog does not remember the last used directory. Instead, it defaults to the directory I run konversation from.

I'm still looking for a solution for this.


You can do the following:

gnome-screensaver-command -l ; gdmflexiserver

gnome-screensaver-command -l will lock your session, and gdmflexiserver will take you to the login screen.  Your session will be locked, but will unlock automatically when you enter your password at the login screen.

As a script:

#!/bin/sh
gnome-screensaver-command -l
gdmflexiserver


You have to be root to create interfaces.

Try

sudo openvpn --config ...