How can I correct touchscreen configuration (inverted x and y) in 19.04?

This worked for me since kernel 4.20 which was the first time I had any touchscreen at all.I had to , and still have to run scripts to rotate and until kernel 5.0 I had to run this following script to calibrate the touch pen and screen.
The key line is:

xinput map-to-output $i eDP

where $1 is what you get from xinput and it is a number (which I found could change between boots, so I get it from the name with the deviceid= line, mine being ELAN0732:00). note I have to touch the screen to activate the pen to get it to show up in xinput. the number changes all the time.

I had an issue last week with the pen cursor being off where the pen was contacting, but this has, er, magically resolved itself, actually just checked and its back so I need to work on that one. I think my script just fixed it again.

This link helped with the rotations. I still don't have those showing in display settings, though I think it once did. Such is consistent with Ubuntu AMD experiences this year.
https://wiki.ubuntu.com/X/InputCoordinateTransformation

I made a script saved as RotateMapToOutputs.sh

# dont forget to touch the screen first with the pen.
touchscreen=""
pen=""

OIFS=$IFS
search=""ELAN0732:00""

# note that the pen didnt show up until I mapped the standard one or clicked the screen.
# so need to do that first
echo $search

list=$(xinput | grep $search | grep pointer)
echo "list $list"

# just a text file to work with the list.
if [ -f tempxinput.txt ]
then
    echo " removing tempxinput"
    rm tempxinput.txt
fi

device_id=$(echo "$list" | sed -n 's/.*ELAN0732:00.*id=\([0-9]*\).*/\1/p')

for i in $device_id
do
echo "id is $i"
xinput map-to-output $i eDP

done

I then set a keyboard shortcut to do

bash "~/MyScripts/ RotateMapToOutputs.sh"

as it seems like you might have troubles with rotation, this is my rotate inverted script and I made a shortcut key as above. (note the maptoputput there might be in error as 14 is no longer that one, so I can then run the above maptooutputs after any rotation if it doesn't calibrate.

xrandr --output eDP --rotate inverted &&  xinput set-prop 'ELAN0732:00 04F3:2536 Pen (0)' --type=float "Coordinate Transformation Matrix" -1 0 1 0 -1 1 0 0 1 && xinput map-to-output 'ELAN0732:00 04F3:2536 Pen (0)' eDP && xinput map-to-output 14 eDP

normal is:

xrandr --output eDP --rotate normal &&  xinput set-prop 'ELAN0732:00 04F3:2536 Pen (0)' --type=float "Coordinate Transformation Matrix" 0 0 0 0 0 0 0 0 0 && xinput map-to-output 'ELAN0732:00 04F3:2536 Pen (0)' eDP && xinput map-to-output 14 eDP

left:

xrandr --output eDP --rotate left &&  xinput set-prop 'ELAN0732:00 04F3:2536 Pen (0)' --type=float "Coordinate Transformation Matrix" 0 -1 1 1 0 0 0 0 1 && xinput map-to-output 'ELAN0732:00 04F3:2536 Pen (0)' eDP && xinput map-to-output 14 eDP

right:

xrandr --output eDP --rotate right &&  xinput set-prop 'ELAN0732:00 04F3:2536 Pen (0)' --type=float "Coordinate Transformation Matrix" 0 1 0 -1 0 1 0 0 1 && xinput map-to-output 'ELAN0732:00 04F3:2536 Pen (0)' eDP && xinput map-to-output 14 eDP


Software Center doesn't launch, and no software visible in Unity

I think your package list is broken... I too faced this issue which I resolved by running the following commands

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


Is running Latest Firefox on older versions of Ubuntu possible?

Yes, you can. But you need to uninstall the installed one first. Use sudo apt-get remove firefox to do it

Download the latest version of Firefox from here.
Extract it in a directory, preferably in a folder in your home directory.
You can run firefox by going to the extracted folder and double clicking on the "firefox" program.

But you may want to have an icon like regular installation. Create an icon with the help of these questions:

How do I install the latest stable version of Firefox?
How can I create launchers on my desktop?
How can I edit/create new launcher items in Unity by hand?

Now use the new Firefox.


Bash script works when called by run-parts, fails as cron job with exit code 1

I managed to work out what was wrong. Upon running run-parts cron.daily as root, I got one of those "The authenticity of host ***** can't be established" messages from ssh. What must have been happening is that this prompt was coming up, timing out, and then the whole script was failing. After saying "yes" manually to the prompt, the script now runs automatically correctly.


Here are some variants you may like:

First Way: city lens

to install type this in terminal(to start Ctrl+Alt+T)

sudo add-apt-repository ppa:scopes-packagers/ppa
sudo apt-get update && sudo apt-get install unity-lens-utilities unity-scope-cities

Second Way: weather indicator

to install weather applet indicator write in terminal(to start Ctrl+Alt+T)

sudo apt-get install indicator-weather

or click this button

Third Way: My Weather Indicator

to install my weather indicator type in terminal(to start Ctrl+Alt+T):

sudo add-apt-repository ppa:atareao/atareao
sudo apt-get update
sudo apt-get install my-weather-indicator

Fourth Way: Stormcloud

Paid Application ($2.99), available at developers' website

For gnome shell users

Here we have one amazing extension for gnome shell called Weather or something like that. Here is screenshot:

So to install this just move on here and click that switch-i like thing on the right to turn it on, and it will ask you do you want to install it. Just say yes. Add your cities and you have another awesome weather app for gnome!

Alternative Way: HTC-style Weather Clock

for this just read from here


How to connect to a laptop running Ubuntu on the same home wireless network?

At first you need to know the IP addresses (try ifconfig or ip addr show or any other method) of the laptops lets say Laptop A's IP is "192.168.1.4" and Laptop B's IP is "192.168.1.5". To do ssh from A to B and vice versa you need to install the ssh server on both laptops by following command:

sudo apt-get install openssh-server

As client is automatically installed by default you now should be able to ssh either directions by:

ssh username@192.168.1.4 ##From B to A
ssh username@192.168.1.4 ##From A to B

Here "username" is any user of "192.168.1.4/192.168.1.5" as whom you are logging in.

If you want ssh X11 forwarding try this:

ssh -Y username@192.168.1.4
ssh -Y username@192.168.1.5

Read manpage of ssh to get more idea.

EDIT: As "Rmano" suggested in the comment, you can check for "DHCP preallocation". Have a look at this and this.

Answer to the EDIT: I think you have not installed openssh-server on 192.168.1.22 leading to the error connection refused. You can check which tcp ports of 192.168.1.11 are in listening state for connections by doing

netstat -tlpn

from 192.168.1.22 and then look for port 22 by netstat -tlpn | grep 22. You can also check this from 192.168.1.11:

nmap -PN 192.168.1.22

Answer to the 2nd EDIT: The problem is that in your ~/.profile instead of sourcing the ~/.bashrc file by . $HOME/.bashrc it is doing "$HOME/.bashrc". The code snippet should be:

if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f "$HOME/.bashrc" ]; then
        . "$HOME/.bashrc"
    fi
fi


formatting only windows partition and leaving ubuntu untouched

Through the Gparted partition editor, first format /dev/sda3 partition to ntfs filesystem.Before formatting, make sure that your /dev/sda3 partition wasn't mounted.
Now boot Windows installation disk and choose custom option on startup.
Install Windows on the formatted ntfs partition.
Because of the installation of Windows, grub will be overwrited by Windows boot manager.
For this you have to run Boot-repair.
Now both Windows and Ubuntu options will be appear on the grub.


To get a simple list of previously entered commands in the bash shell, you can use the command

history

The fact that you are using PuTTY or any other SSH client should be irrelevant.


After deleting  all the ntfs partitions, run boot-repair. It will reinstall grub on your disk.


You can include a command to run on the remote machine as the last argument to ssh

ssh root@192.168.0.188 'find /var/mobile/Media/Music/ [...]'


The wifi speed will be delimiting. Change to wired Cat 6a cable between the server and router, ad well as between router and computer. Make also sure you router has gigabit lan ports.


Problems running Deja Dup with elevated priveleges

deja-dup uses gnome-keyring1,2 to remember your passwords and keys. So you need to again save your password when running as root, because your earlier setting won't be used in this case.


Synaptics Touchpad problem when disabling it and then enabling it

THIS MIGHT WORK FOR OTHER LAPTOP MODELS
I have to pad my back on this one. The following will solve this problem to anyone at least with a HP dv6000 or dv6500 laptop. Do the following in the terminal:
This is divided into three parts:
NOTE: Before starting MAKE SURE YOU UPGRADE ALL PACKAGES!
STEP 1 - Solve the mouse not functioning when starting the PC problem
Doing this even if your mouse in the dv6000 or any other variation works correctly will not create any other problems.
Type: sudo nano /etc/rc.local
and add above the EXIT 0 the following lines:
rmmod psmouse
modprobe psmouse proto=imps

Save an continue with STEP 2.
STEP 2 - Making sure that when you turn OFF and ON the touchpad it stays ON!
Go to the terminal and type:
sudo gconftool --type bool --set /desktop/gnome/peripherals/touchpad/touchpad_enabled true

This will activate the synaptics and make it work (It will make the value true for gnome-settings-daemon) UNTIL next reboot when the problem will appear again. To solve this, do the following step:
sudo gconftool-2 --type string --set /apps/gnome_settings_daemon/keybindings/touchpad ""

This in essence will disable any chance for gnome-settings-daemon to change the boolean value.
I can confirm this works on the HP dv6000 and dv6500. Please give thanks if this work to you to post #103 for Ubuntu user quirks
Now for STEP 3.
STEP 3 - The making sure this sucker will work because you want to. Force the fix to stay.
Press ALT+F2 and type gconf-editor (For 12.04 and below)
Go to APP -> GNOME_SETTINGS_DAEMON -> KEYBINDINGS
Look for touchpad
Delete the assign value for touchpad. Leave it empty.
REBOOT the pc


Please note that The Ubuntu One Files Services have been closed. This is the original post that announce plans to shut down the Ubuntu One file services.   http://blog.canonical.com/2014/04/02/shutting-down-ubuntu-one-file-services/


I had the same problem in very similar environment (running Juju and MAAS in VSphere). First I also thought that the problem was MongoDB so I updated the version on the bootstrap node. But what solved the problem is having the right DNS settings on the node that you are running the juju-core because it is using FQDNs when connecting to nodes. So, make sure that you can ping the bootstrap node using the FQDN.


How to shift from one distro's grub to another's

You need to boot into whichever one's grub you want to use and reinstall its GRUB. For example, boot into Ubuntu-2 and then run:

sudo grub-install /dev/sda

Note that the above assumes you want your GRUB to be on /dev/sda. You should change that to whichever drive you want to install it on.


How to transfer Launchpad SSH and OpenPGP keys to another computer?

Seahorse' Export function only exports public keys, not private ones.

You can easily export the private key from the command line using gpg --export-secret-keys [key-id] > secret.pgp.

An alternative would be to migrate the whole ~/.gnupg folder to the new machine (you might have to fix some permission issues afterwards, mostly making sure you and only you can read and write from/to that folder).

Private SSH keys are usually stored in ~/.ssh, I'd also simply just copy the whole folder to the new machine.


How can I stop my email address displaying in the Software Center comments?

I believe the reviews use your Ubuntu SSO id. If you go to http://login.ubuntu.com, login, you should be able to change your full name. You may even be able to edit the review after you change your name.


Cannot download Ubuntu to a USB drive. Only option available is to burn to a DVD, which I do not have

UNetbootin can create a bootable Live USB drive.

UNetbootin allows you to create bootable Live USB drives for Ubuntu, Fedora, and other Linux distributions without burning a CD. It runs on Windows, Linux, and Mac OS X.

http://sourceforge.net/projects/unetbootin/files/UNetbootin/608/unetbootin-windows-608.exe/download?use_mirror=ufpr

If using Windows, run the file, select an ISO file or a distribution to download, select a target drive (USB Drive or Hard Disk), then reboot once done. If your USB drive doesn't show up, reformat it as FAT32.

Source: http://unetbootin.sourceforge.net/


new installation dropping me to login prompt. No GUI

This might be an issue with your graphics drivers.
Firstly, login to your installation through the prompt. Then run
sudo apt-get update && sudo apt-get upgrade to update your installation.
This is a precautionary step. Just in case yours is a bug and it has been fixed, your problem will be solved straightaway.

Then, try starting the Xserver by using the command startx
If that works, then you have a working GUI now. Reboot and check if the GUI works properly. if not, some package (probably lightdm) is broken. in any case, posting the output/errors generated by startx should help in further diagnosis.
You may also consider filing a bug at Launchpad


What content should be in my /etc/network/interfaces file in 20.04?

You have the correct content of /etc/network/interfaces.
It should be
auto lo
iface lo inet loopback


Access to the new Volumes and changing myself to admin

However, whenever I login, I am only able to access and write to my /home but am unable to make any changes to Workspace and Personal volumes. Upon investigation, I find that the permissions on these are given to 'root' only. I tried to put an entry to the /etc/fstab with the UUID but it is of no use as these volumes are already mounted. It is just that I need to get access to these volumes.

Permissions for Unix-filesystems are not stored in /etc/fstab. They are part of the file system. To check the permissions of a particular folder, you can use ls -l /path.

To change the owner of a folder, you can use the command chown

sudo chown ${USER}:${USER} /media/vishnu/Workspace

This will make current user owner of that directory or file. ${USER} is a variable, set by bash when you log in, that expands to your username when interpreted by bash.

The default for a newly formatted Unix filesystem is that root owns the root of it, and this is what you're expiriencing.

You should not change ownership of system files, such as /etc/, /usr/ and so forth, as this will Make Things Not Work(TM). Changing for arbitrary, user controlled directories are fine.

  Best would be to make my login as admin / su / super user. I did try to find how to do this but could not find the right solution (or maybe did not look in the right places). Many sites and solutions talk about the solutions of problems with dual boot esp. with windows. I have only Ubuntu on my machine and wish to keep it that way.

No, you don't find a right solution for it, because it is by definition not the right solution. There's almost zero reason to be logged in as super user in daily use. If you wish, you can set up Policy Kit (pkexec) and sudo to allow you to become root without prompting for authentication. But that still keeps a seperation of privileges, that you'll loose if you log in as root. Linux has a solid multiuser concept, and most tasks, including the one you seek to solve can be handled perfectly fine as a normal user.

As to your partioning; I would not spread your user data over multiple partitions. I see no reason not to have all the space you have on /home, and rather symlink it to other places, or even bind mount it, if needed. Splitting it simply makes management harder, as you risk running out of space in one partition, while having plenty free in another partition. This is, of course, my personal opinion.


How to enable OpenGL 2.0 and WebGL on GMA 3150?

Install driconf from the software center .
Press Alt + F2 and type driconf and press enter .
Change Enable limited ARB_fragment_shader support on 915/945 from No to Yes by clicking on the button next to it


Side by side programs on at the same time

Use the inbuilt keyboard shortcuts in 18.04 to snap windows to either the left or right of the screen. If a program is snapped to the left of the screen, opening a new program will appear over the top of it but as the focus is on the new window opened, you can then snap it to the right.

The shortcuts are as follows:

Super← = snap application to left edge of screen

Super→ = snap application to right edge of screen

Super↑ = maximise the application window (left or right)

Super↓ = bring application window back to normal self.

Click the application header to change focus from one window to the other as per normal.


Is it possible to "lock" Firefox in one state and run it from that state?

You can PAUSE the process with:

kill -STOP $( pidof firefox )

and return with:

kill -CONT $( pidof firefox )

Or use the gnome-system-monitor:


Installing composer globally permission denied

You need to use

sudo mv composer.phar /usr/local/bin/composer

to move the file to the specified location(/usr/local/bin/composer). You will be prompted to enter your password after you enter this command. (See the note after the command).

sudo is used to execute privileged commands and requires the user who is executing this command present in the sudoers list.

If you encounter an error such as this:

user is not in the sudoers list. This incident will be reported

You will need to ask your administrator to run this command for you as you are not privileged enough to run this command.


You can use CCSM to adjust the focus stealing prevention. Open it and go to General Options > Focus & Raise Behaviour. Here you can set the Focus Prevention Level, normal should work fine in most cases, but you can set it to a higher level if you still have problems. Just be careful to not set it unnecessarily high as it could prevent modal popups (which need an action immediately) from gaining focus, which would cause undesirable side effects.


Are the ssl-cert-snakeoil.pem and ssl-cert-snakeoil.key unique per installation?

They are created by in the post-installation script of the ssl-cert package (/var/lib/dpkg/info/ssl-cert.postinst) by calling make-ssl-cert:

make-ssl-cert generate-default-snakeoil


How to upgrade my HDD and keep my ubuntu 11.10 instalation

Boot a live CD with both HDDs attached, start the Partition Editor (gparted), copy and paste the partitions from one drive to the other:

In the top right corner select your old hard disk.
Select a partition you want to copy (right-click → "Copy"):

In the top right corner select your new hard disk.
Paste the copied partition into unallocated space (right-click → "Paste"):

Resize if you want (right-click on the partition → "Resize/Move")

This will keep the unique identifiers of the partitions, so you shouldn't need to adjust anything after cloning the drive.

The final part is to re-install GRUB:

Note the root partition name of your new HDD (for example /dev/sdb1).
Open a gnome-terminal and run (sorry, I don't know a GUI way to do it, but it's just a couple of commands):

sudo mount /dev/sdb1 /mnt
sudo grub-install --root-directory=/mnt /dev/sdb
sudo umount /mnt

Make sure you use the disk name at the end of point 2!

That's it, reboot with only your new HDD and you should be fine.

Some advise: Do backups first! Only run one operation at a time and not all at once (so: copy → (resize) → copy → ...).


I upgraded Ubuntu 12.04 to 14.04 and touch-pad stopped working in HP pavilion 15 r062tu

It seems touchpad file need to enabled, please try the below command and check whether it works,

sudo modprobe -r psmouse

sudo modprobe psmouse proto=XXX

In the place of XXX you can fill your name as your wish to give to touchpad.

Hope the above helps.


Chromium "Show in Folder" opens in text editor

That's pretty weird and annoying.  I hope I can help you a bit into the correct direction :-)

Does it happen with any file type? txt? torrent? mp3?

In ~/.local/share/applications/mimeapps.list there is a list of files to be opened by an application. Have a look with more ~/.local/share/applications/mimeapps.list and check if you can find something weird here.
There is a nifty command mimeopen that allows you to alter what program should open what file  (and that updates the file I mentioned before). It will 'guess' what would be the most logical option based on the file you feed it.

Examples:

mimeopen -d /home/{your_name}/Documents
Please choose a default application for files of type inode/directory

    1) Open Folder  (nautilus-folder-handler)
    2) Other...

mimeopen -d \[Mazui\]_Ore_No_Imouto_-_14_\[SD\]\[7EA51F50\].mkv
Please choose a default application for files of type video/x-matroska

    1) Enqueue in SMPlayer  (smplayer_enqueue)
    2) Movie Player  (totem)
    3) SMPlayer  (smplayer)
    4) Banshee  (banshee)
    5) VLC media player  (vlc)
    6) Other...

If it is a problem regarding mimetypes this should solve it.


It's not possible unfortunately, but most of the time you work only with the main timeline window, you can reopen the other windows from the Window menu.


Can not run a script downloaded with 'wget -o filename.sh '

You have used the wrong option of wget.

To save a document/file, you need -O (capital o). To save the log i.e. whatever shown on STDERR, you need -o.

As you were using -o, you have saved the logs as ready-for.sh and presumably that file does not contain anything understandable by bash, hence the error.

In a nutshell, do:

wget -O ready-for.sh "https://training.linuxfoundation.org/cm/prep/ready-for.sh"

Then you should be able to execute to execute the script, ready-for.sh, in the usual manner.

Also don't forget to check man wget.


Force resolution and make it stay on Ubuntu 15.10

You need to add the xrandr configurations to a startup file, so that you'll get your desired resolution upon reboot/startup:

Create a bash script, xrandr.sh for example, and place your xrandr commands into it:

#!/bin/bash
sudo xrandr --newmode "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync
sudo xrandr --addmode VGA1 1280x1024_60.00

Make the script executable with chmod +x xrandr.sh
Search for "Startup Applications" in the dash, run it, and add the script as a startup application.

The commands will now run every time you log into your account.

NOTE: You don't use sudo when executing xrandr commands.


Why can't Ubuntu mount my exfat pen drive?

You should install the optional exfat filesystem on Ubuntu so that it can recognize it on your pen drive

sudo apt-get install exfat-fuse exfat-utils

Afterwards, just mount it normally.


"Could not find a version that satisfies the requirement lbcapi (from versions: )" when trying to install via pip

Running pip download lbcapi works for me (for Python 2).
But there's no Python 3 compatible version of lbcapi of PyPI, so installing it on Python 3 is a bit more tricky.

It doesn't look like this software is compatible with Python 3.


I had success using Testdisk.
There is a detailed list of instructions, so I won't go into details.
However, for me, it has only been a matter of selecting the appropriate items from the menu and to wait for an hour so for the program to scan my disk.


Strange behavior of a script when executed from /etc/profile.d/

The files in /etc.profile.d/ are sourced when /etc/profile is executed.

Here are the relevant lines from /etc/profile:

if [ -d /etc/profile.d ]; then
  for i in /etc/profile.d/*.sh; do
    if [ -r $i ]; then
      . $i
    fi
  done
  unset i
fi

From this lines we can see, that only files which names ends with .sh are going to be sourced.

If the name of your custom file doesn't end with .sh, rename it accordingly, otherwise it will not be sourced.


Error While Creating New Resolution Mode

Solved. I just needed to rename the newmode.


Why can't I launch eclipse from a terminal or run it?

From Migration Guide JDK 8 to JDK 11 says that in Java 8, Java 9 or Later. the MaxPermSize or PermSize flag has been removed from Hotspot Heap GC Option and was moved to native memory.

Removed Permanent Generation

The permanent generation was removed in JDK 8, and the related VM options cause a warning to be printed. You should remove these options from your scripts:

XX:MaxPermSize=size
XX:PermSize=size

In JDK 9 and later releases, the JVM displays a warning like this:

Java HotSpot(TM) 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0

Tools that are aware of the permanent generation may have to be updated.

Or

you can try remove that message using a Environment variable in .bashrc :

MAVEN_OPTS -Xmx512m

Hope this helps.


I needed google's api-python client installed. I don't know why I needed to install it on my laptop and not my desktop, but I ran

sudo pip2 install --upgrade google-api-python-client

Then I was able to run overGrive from the terminal and from the dash.


How do you create a bootable USB stick using windows 7

This is just to mention that Canonical now recommends the Rufus USB Installer. (I haven't used it myself.)

Instructions (copied from the Canonical instructions):

  Open Rufus and select your USB stick in the 'Device' dropdown
  Click the CD Rom icon next to the 'FreeDOS' dropdown, then find your
  downloaded Ubuntu ISO and click 'Open'
  Click 'Yes' when it asks to download Syslinux software
  Click 'OK' to write in ISO Image mode
  Confirm that your USB stick is selected and then 'OK' to continue
  When it is finished, just restart your computer and start using
  Ubuntu, or you can install Ubuntu


Banshee - How can I show/highlight the track currently playing in the library for editing?

After a lot more searching, I found the solution in another thread:

  Under the "Playback" menu, there is an item named "Jump to Playing Song". Its key-combination is Control+J.

Thanks to Aoeuid.

Note: this only works if the track is still listed in the playlist, i.e. not possible for a "smart" playlist for unplayed tracks.


Is it necessary to have a Firewall in Ubuntu?

It depends on what you are doing, but when you just use your Ubuntu machine for e-mail, browsing and text editing I would say no. In case you have services running like SSH or FTP you might consider installing a firewall manager, for example ufw.


Application menu was/is a menu for gnome-fallback/gnome-classic interface. It is not available with unity. To access applications in unity, there is a simpler way; Just press Super key and type the name of what application you want.


Completely automated custom server installation with no internet - What are my options?

In the post install script, can't you call out to a BASH Script?
The in your BASH script you can then process out?

Is there not a place in in start up to check these options?
Trying to understand the requirement here, I would question why you would want to do post install, and rather have a configuration script that runs at start up, trying something like hooking in to the grub configuration or something?

How to Configure the GRUB2 Boot Loader’s Settings


Using grep and whoami to list processes that aren't owned by the current user

grep -v 'whoami' excludes lines matching literal string whoami

If you want to exclude lines matching the output of the whoami command, you need to replace the single quotes with backticks

ps aux --sort=-%cpu | grep -vFe `whoami`

or use the $(...) form of command substitution instead

ps aux --sort=-%cpu | grep -vFe "$(whoami)"

Alternatively, you could skip the grep altogether by negating the user selection directly:

ps -Nu `whoami` --sort=-%cpu u


How to get the URL from a file using a shell script

You can do everything with a simple grep:

grep -oP "http://\K[^']+" file.php

From man grep:

   -P, --perl-regexp
          Interpret  PATTERN  as  a  Perl  regular  expression  (PCRE, see
          below).  This is highly experimental and grep  -P  may  warn  of
          unimplemented features.
   -o, --only-matching
          Print  only  the  matched  (non-empty) parts of a matching line,
          with each such part on a separate output line.

The trick is to use \K which, in Perl regex, means discard everything matched to the left of the \K. So, the regular expression looks for strings starting with http:// (which is then discarded because of the \K) followed by as many non-' characters as possible. Combined with -o, this means that only the URL will be printed.

You could also do it in Perl directly:

perl -ne "print if s/.*http:\/\/(.+)\'.*/\$1/" file.php\


isn't it possible to install mplayer and devede at the same time?

Edit the .deb file to allow installation

First, find the DEVEDE .deb file, usually in /var/cache/apt/archives. Copy the full path to the DEB file.

Then:

$ cd `mktemp -d`
$ dpkg-deb -e "</path/to/devede.deb>"
$ dpkg-deb -x "</path/to/devede.deb>" .

Now try to edit the control file with your text editor (gedit in this example) and change the dependencies:

$ gedit DEBIAN/control

In the Depends: line you will see there ..., mplayer2, ... now add mplayer and change that to:

..., mplayer2 | mplayer, ...

Save & Close.

Now run these commands:

$ dpkg-deb -b . "<newpackage.deb>"
$ sudo dpkg -i "<newpackage.deb>"

Welcome, DEVEDE!


My problem was that my user was not a sudoer.

This problem can be solved by adding your user to /etc/sudoers file or by adding cron job as root.

sudo su
crontab -e

and placing cron job there


Trouble using the Xonar Essence STX soundcard

To make the Xonar the first sound card, edit the file /etc/modprobe.d/alsa-base(.conf) and add this line:

options snd slots=snd-virtuoso,snd-hda-intel,snd-hda-intel

(You do not need to disable the on-board device.)

In theory, you could just select the Xonar in the sound configuration, but this would affect only programs that use PulseAudio.


Changes made in LibreOffice impression master slides are not seen in presentation

Some things seem to work when changing an attribute on the master slide.  For example, specifying a different background, is carried out across all slides.  The difficulty I have is changing the font.  I can change this on the master slide but the new setting isn't carried over to any of the presentation slides.  A workaround seems to be to select the text on one of the slides in the actual presentation, then navigate to Format - Styles and Formatting - Right click on the highlighted style and select Modify.  Change the Font and/or Font Effects and press OK.  The new font should now be displayed on all slides.


Problem with creating shorcuts in ubuntu

It has to do with your Ubuntu default language which is different from English.

Instead of ~/Desktop use the default language expression, listing your root folder.

In my case, Portuguese I did:

gnome-desktop-item-edit -–create-new ~/Área\ de\ Trabalho/

It works


14.04.4 LTS to 16.04.3 LTS upgrade - ImportError: No module named 'lsb_release'

I did search for lsb_release module with dpkg -S lsb_release | grep python on my Ubuntu 16.04.3 LTS and got its package (lsb-release). In Trusty it is located in the same package.

So for me it seems that you should install this package before upgrade with
sudo apt-get install lsb-release.


Stuck when shutdown kubuntu or linuxmint KDE

Use sudo systemctl poweroff.  It helps to actually safely kill all the processes and shut the machine down.


First of all, from my own experience it is possible to install Ubuntu on a SSD drive, and it actually works quite well.

My Laptop had a 32GB SSD drive and a 500GB HDD that I wanted to split between Ubuntu and Windows.
I ended up installing Ubuntu on my 32GB SSD drive and splitting the HDD drive between the Windows installation and a media drive for Ubuntu.

Ubuntu boots really fast now, and working with the HDD drive is seamless, so I'm quite happy with the results. However, Windows' performance was cut down because I gave it a relativity small part from the HDD drive.

Should you do it?
It really depends on how you use Ubuntu and Windows relatively. If you just want Ubuntu as a lightweight OS that can be booted quickly then installing it on a 64GB drive, even without a media drive for heavy files, should be fine. That way you can give Windows the whole HDD drive like you suggested.

Please note that the performance improvement may be negligible, and installing an OS on a SSD drive does have its own risks. So you may want to think twice before deciding to play with an SSD installation.

If you decide that you do want to install Ubuntu on the SSD drive, then the  answer here  might guide you:
Do I need Intel Smart Response when installing Ubuntu?


Can't install Angry ipscan in ubuntu LTS 20.4

The error you are getting is because you are not having the specific java. The solution is to install open-jdk-8 as it is a prerequisite. Therefore run the following commands to install it.
sudo apt update
sudo apt install openjdk-8-jdk


Middle click to open a new tab/close tab in Firefox & Chrome

This behaviour should be enabled by default with Firefox, it may be that your system is not recognizing middle clicks.

To check whether "middle click open in a new tab" is activated type about:config into the URL bar in Firefox (and click the "I'll be careful" button, if prompted).

In the search bar type middleclick

Make sure the Value for browser.tabs.opentabfor.middleclick is set to true (if it is "False" then double click to change it)
`


config dual monitors with quite different resolution

if you're using Gnome on Ubuntu, you can use xrandr command to make screens different from one another. For example:

xrandr --output HDMI1 --scale 2x2 --mode 1920x1200 --fb 3840x2160 --pos 0x0
xrandr --output DVI-0 --scale 1x1 --pos 320x2160

--scale 2x2 - make everything on 4K screen twice larger

--mode XxY - explicitly set the resolution for the screen (not necessary if is already set)

--fb XxY - set the size of a virtual screen (framebuffer) (this iss very important.
Without this, you will be able to use only a fourth of your screen). That maximum framebuffer size might be specified in xorg.conf - then you cannot exceed it (it is written in the first line of xrandr -q output).

--pos XxY - in my case I set the absolute positioning of the screens, so my laptop screen is directly on the bottom of the external screen.

sources: Arch Wiki Page and This post


Printer set-up in Ubuntu13.10: printer can not create temporary file

I had the same problem and found this:
http://www.emmestech.com/linux/problems.html

Solution:
sudo chmod 1777 /tmp

So the permissions on the /tmp folder were wrong. In my case I've changed the mount and did not realise the implications.


Why is the total RAM for my HP dm1 less than the actual it should be?

One guess I have as to where the remaining 400MB is going is the video card, which (based on Ubuntu Tweak) uses 380+MB of memory.

That is the correct answer, the Video card has the remainder reserved, hence Ubuntu is not showing it as available to the rest of the system.


Ubuntu 14.04 Thinkpad w520 Three monitors only after turn on and connect to dock

I had this working on a Dell E6520 with the eport+ docking station on Ubuntu 14.04.1. The drivers that I had working correctly were the following packages. Once I got them working I then pinned them through synaptic.

libcuda1-331_331.38-0ubuntu7.1_amd64.deb
nvidia-331_331.38-0ubuntu7.1_amd64.deb
nvidia-331-uvm_331.38-0ubuntu7.1_amd64.deb
nvidia-libopencl1-331_331.38-0ubuntu7.1_amd64.deb
nvidia-opencl-icd-331_331.38-0ubuntu7.1_amd64.deb

following that I created the following in my .xprofile

export LIBOVERLAY_SCROLLBAR=0
xrandr --setprovideroutputsource Intel NVIDIA-0
xrandr --output DP-0 --left-of LVDS1
xrandr --output DP-1 --right-of LVDS1

obviously you will need to modify for your specific outputs from xrandr.
The export is because I like my scroll bars.
The newer versions of the drivers will give me live screens at login on either of the external monitors, but once I log in the laptop display will go loose the background and only show the mouse pointer but nothing else. the Displays settings from the unity dash shows all of the monitors correctly.
I've since updated to 14.04.2 and the 331.38 drivers are not compatible with the newer xorg-core packages.

I just wanted to add that I had a meeting earlier today and booted the laptop out of the dock and then docked it after the meeting without a reboot and all three monitors are working. I'm using the xorg-edgers PPA currently on 346.47-0ubuntu1~xedgers14.04.1. My .xprofile only contains my scrollbar export.


You can use grep -E to access the extended regular expression syntax( Same as egrep)

I have created a testfile with below contents:

>cat testfile
this is some text
with some random lines

again some text
ok now going for numbers (:32)
ok now going for numbers (:12)
ok now going for numbers (:132)
ok now going for numbers (:1324)

Now to grep the numbers alone from the text you can use

>grep -Eo '[0-9]{1,4}' testfile
32
12
132
1324

will be output.

Here "-o" is used to only output the matching segment of the line, rather than the full contents of the line.

The squiggly brackets (e.g. { and }) indicate the number of instances of the match. {1,4} requires that the previous character or character class must occur at least once, but no more than four times.

Hope this helps


1.) You can boot your System from LiveCD/USB-Stick, then install Gparted from Ubuntu Software Center, you can use Gparted while running the liveCD image.  With Gparted you can change the size of your ubuntu partition or move free space from other partitions to your Ubuntu partition to get more free hard disk space for your ubuntu installation.
(dont forget to make backup before doing so)


If you find yourself in a situation where you think Ubuntu One has removed your files you have two options. The first place to check is the computers Trash. Ubuntu One on versions of Ubuntu newer then 11.04 and all the Windows Clients move files to the computers Trash when removing them.

If that does not work there is a job that we can run in emergencies to try and recover your files. Please contact our support folks for that.


Slow network speeds GA511 (RTL-8169) 1Gbit adapter

try this

socket options = IPTOS_LOWDELAY TCP_NODELAY

in your samba file, remove any other socket options you have

worked for me


How can I make Xubuntu automatically tally the number of times a machine loads?

I am not getting the clear idea about your script but who ever login into that system will have their log with their username in  /var/log/auth.log

you can view the log by

sudo cat  /var/log/auth.log

So if you want to track their login/starting , make a backup command and run it before they logout/shutdown of your system.

Execute a script upon logout/reboot/shutdown in Ubuntu


Why is the \d metacharacter not working in the find command with -regextype posix-egrep active?

\d (for a decimal digit) is not supported by POSIX (or GNU grep) extended regular expression (ERE) syntax - as you can confirm easily:

$ echo 'foo1234bar' | grep -E '\d'

In fact \d comes from perl, and is supported by GNU grep in PCRE (perl-compatible regular expression) mode:

$ echo 'foo1234bar' | grep -P '\d'
foo1234bar

However that doesn't help much with find since AFAIK it doesn't yet provide a PCRE regextype - you will have to use the simple character range [0-9], which is supported by both ERE and basic regular expressions (BRE):

find . -regextype posix-egrep -regex "\.\/ex[0-9]+\.jpg"

The reason \d*\.jpg matches ex.jpg is because \d is treated as literal d - and zero or more of anything matches everything.


Why does Ubuntu start up with the PXE rom?

The the windows pxe rom output is not from Windows. The PXE rom is part of the network card and it is used for PXE booting.

Ignoring the pi part, normally when a PC-ish computer boots it does the following:

Power up and start running firmware. (E.g. BIOS, or UFI, ...)
firmware initialised memory controllers etc etc.
firmware looks in the CMOS to see which device to boot.

These devices can be (in a semi-random order):

Floppy drive
Harddisk 0
Harddisk 1
...
Optical drive
Add in cards (e.g. HW RAID cards).
NETWORK via PXE boot.

The order of these is usually selectable. And usually it will try to boot from the first option. If that fails it will fall back to the second, third etc etc. If all options fail it will display a failure message (or start a BASIC ROM if you have a really old system).

In your case it seems that you either configured the pi to boot from the network as first device, or that all boots options tried before the network boot failed.

In that case it will send out a DHCP request; not just for IP and DNS information, but also asking for a server from which it can tftp a boot image.


What is the Ubuntu equivalent to Windows' Disk Managment?

You can use the Disks utility which is installed by default.

Just search for "Disks" in the dash or run gnome-disks from terminal.

It does look a bit different than Windows Disk Management, but includes a variety of features:

Creating new partition tables
Creating and restoring disk images (this is what dd does, just nicer and with a progress bar)
Benchmarking disks or partitions
Reading SMART data (for disks and data connections that support it)
Apply Standby Timeout Settings and Enable Write Cache  (through Drive Settings… menu option)
Manually putting drives into standby mode or shutting them down
Format partitions
Setting partition flags and attributes
Changing partition labels
Handling LUKS encrypted disks

…and probably a lot more. If you're just looking for a straight forward partition manager you may want to have a look at GParted.

What you may not find in any graphical tool to my knowledge is how to create and manage software RAID arrays. You should have a look at btrfs, ZFS (on Linux) and mdadm for this functionality.


converting several mkv files to avi at once

This worked fine:

for i in *mkv; do ffmpeg -i $i -vcodec copy -acodec copy $i.mp4; done


Installing Ubuntu 13.10 with UEFI/secure boot enabled. Dualboot with win 8.1

Solved my problem by disabling fast boot in HP bios.

The following link confirmed it could be done.

After reading this article I went into HP bios (esc or F10) Security, Secure boot and Disabled Fast Boot.

My ubuntu 13.10 and fedora 20 live dvds would boot and install in efi / secure boot mode and reboot windows, ubuntu and fedora if I went into firmware boot (F9)

(actually worked booting to ubuntu grub then windows or ubuntu, but after installing fedora it would boot to fedora only unless I used F9 boot menu. Trying to learn efibootmgr to fix this problem)

Most of the tutorials mention disabling fast boot in windows under power options, but in my case I had to also disable it in the bios.


Terminal not running after change command

Option 1:

Are you able to at least open the terminal application? If so, you should be able to re-open the terminal's preferences and disable the "Run a custom command." What happens if you open the terminal? Do you get an error message?

Option 2:

The simple solution to this problem, would be to reset the terminal application's preferences and profiles. You can do this by pressing CTRL + ALT + F1 ... Once you have done this enter your username and your password at prompt. Then, once you see the shell, enter gconftool --recursive-unset /apps/gnome-terminal (And press enter).


How to rename all files in folder with name ending with "_backup"

try rename -v 's/\.jpg_backup$/\.jpg/' *.jpg_backup
the -v gives you detail output.
see here How to rename


There is a couple of related bugs that describe this behaviour. See e.g. here. As far as I can tell, it is a bug that comes and goes. You may try to disable scroll overlay bars as described here.


Can't get Ubuntu to install in Windows 8

You seem to have problem not with installing the system per se, but with starting installation.

If you're sure, you've disabled fastboot, you need to get to "boot menu".

Before windows start kicks in you probably see either full screen HP logo, or some hardware information - look for information that reads "Boot menu - [KEY]".
Then press that before Windows starts. you should be presented with menu where you'll be able to choose a device you want to boot from (usual suspects are keys F2, F11, F12 and DEL).

Now, you might get 2 options for the USB drive - UEFI and some other (it might be named "old", "standard" or something else. But you'll most probably want to use the one that starts with UEFI (thats - in short - the way the drives will be accessed).

After that you should be able to start *ubuntu installer.


It is fairly normal to have a few megabytes between partitions (some software do this purposefully, and as some have said, are necessary to have). To remove these few megabytes you will need to move the partitions above the unallocated space down. This will group the unallocated space so that you can combine the space left over into another partition.

For a few megabytes, this is simply not worth it. This would take quite a while (many hours), can put quite alot of wear on the disk, and has the potentiality of data loss, or corruption.


Using that option makes the program run using your NVIDIA card instead of the intel integrated graphics. Differences in performance depend on your system configuration, though it is usually faster to use the NVIDIA card. However, you need to install the proprietary drivers from their website


Install Nvidia drivers by
sudo ubuntu-drivers autoinstall


Where are the mouse button settings in Ubuntu 14.04?

I am having the same problem with exactly the same mouse.
For now I am typing

xinput set-button-map NUM 1 2 3 4 5 6 7 8 9

in the terminal.

To find out the value for NUM, type

xinput list

This will give you back full functionality.
However, you'll have to do that after every login so it annoys a bit in the long run.


How to build cmake-gui on Linux from source?

Two options here:

cmake-gui is packaged as cmake-qt-gui. Install it with:

sudo apt-get install cmake-qt-gui

If you really need to build it from source do the following:

sudo apt-get update
sudo apt-get build-dep cmake-qt-gui
wget https://cmake.org/files/v3.11/cmake-3.11.0.tar.gz

tar -xzf cmake-3.11.0.tar.gz
cd cmake-3.11.0/
./configure --qt-gui
make -j5
bin/cmake-gui


You cannot shrink a mounted partition. Boot from a live CD/USB and from there run gparted. This way you can shrink the partition.
After the install, you must use this live media again to repair grub.

Edit:

Back up your files.
Create the live media if you don't own it already.
Boot from it, and run gparted.
Select the partition, and click resize, which will bring you to a new window.
Grab the bar at the right end with the mouse, and shrink the bar.
Now execute the task, it will take time, because first it will do some tests and later it will move some data.

If a message pops up that you might ruin the boot process, you should not execute the task. (If this happens, then you need to repair grub.)

I suggest, that when it is over, you reboot.
The new partition can be created from the normal ubuntu.
After you installed windows, do come to this site, and you will find how to repair grub, which was overwritten by windows. Here is the solution for this: How can I repair grub? (How to get Ubuntu back after installing Windows?)


The usual approach (usual — other than the Filesystem Hierarchy Standard, there is no strong rule to do so, it is just done this way in many distributions) is to have boot-related files stored in /boot.

This usually includes

The kernel image
An additional image to use as '/' during the early stages of the boot process (optional, and usually used by prebuilt kernels which have a lot of modules, and may require a module to mount the real '/')
Bootloader files, when the bootloader requires additional files (like GNU GRUB)

That's usually how /boot is used, I've never seen a system where these files, by default, go somewhere else, but you could always configure your bootloader so that you can use another folder.

These files are required to boot the system, so they're accessed each time you boot. They're actually what you boot when you boot the computer.


gedit won't save&quit after upgrade to 16.04

This is a known bug:

Launchpad: Gedit didn't close after saving a new file

which has a fix released upstream:

Bug 734068 - gedit should quit after saving through "Save before closing?" dialog

An annoying bug that at the moment has only recompiling and patching as an option.  Patch is here...


Execute fsck /dev/mapper/ubuntu--vg-root from that prompt, press y to say yes each time to fix everything found wrong, and then execute exit from that same prompt to return to the normal login screen.


Postgres dropdb and createdb commands in sudoers as a different user

Wrap dropdb and createdb in a bash script like /usr/bin/recreatedb.sh:

#!/bin/bash

sudo -u postgres dropdb $2
sudo -u postgres createdb -O $1 $2

Then create a special sudoers rule using visudo:

$ sudo visudo -f /etc/sudoers.d/postgresql

With this rule:

Cmnd_Alias RECREATE_DB = /bin/bash -l -c recreatedb*, /usr/bin/recreatedb*
username ALL = NOPASSWD: RECREATE_DB


fail to install ubuntu server 14.04 64bit LTS from USB drive

This is how i got it to work.

When it gets the CD-ROM error, move the install USB stick from one port, to another USB port on your PC. Then retry.

This worked. I don't know why.

Not only that but I was reinstalling 14.04 later that night, and the CD-ROM error did not happen again. The 2nd install went without a hitch.

Yes it worked for me also.


You want to get the Desktop version (Desktop refers to any computer that isn't a server), and if you have a newer mac, the 64-bit version.

http://www.ubuntu.com/download/desktop

If you're just trying it out, you might want the latest version -- 13.04 for all the shiny new features.  Otherwise, if you're looking for something to put on your computer and Just Get Work Done, I would recommend 12.04.


I found other links inlcuding How to restore Windows boot loader after removing Ubuntu, but this did not help me.
What ended up doing it was I was looking at the UEFI boot order and I realized one of them was Windows. So I tried that one. DUH! Fixed it. Boots windows now, but booting to linux is a distant dream. I'll have to to UEFI boot every time I want to go there.
Alas!


Creating a custom Ubuntu installation DVD : Setting custom preferences

There are plenty programs that permit you do that. For me, one of the easiest one is remastersys.

1- Custom your Ubuntu with all the preference you want to have on the new iso.

2- Download remastersys. First you will need to add the repository:

vi /etc/apt/sources.list

# Remastersys
deb http://www.remastersys.klikit-linux.com/repository remastersys/

Save and exit. Run

 apt-get update

Install it

apt-get install remastersys

3- Now you just need to run to create the copy of your system:

sudo remastersys dist

This also lets you create backups on iso file, with the following command:

sudo remastersys backup nameyouwant.iso


To begin, the guide you reference is badly outdated; its page history indicates that its last edit was in 2013. It relies heavily on rEFIt, which has been abandonware since 2010. I maintain rEFInd, which is a currently-supported fork of rEFIt that is much better for dual-booting with Ubuntu.

Also, you haven't said what Mac you're using (especially its age and, most importantly, EFI bit depth), what bit depth of Ubuntu you're trying to install, or what version of OS X you're running. These details are critically important, because an accurate answer for one set of these details will be badly misleading for another one -- or the answer will have to be ridiculously long to cover all possibilities.

To get you started, though, I recommend you read:

The rEFInd documentation on SIP -- This is a feature of OS X 10.11 that interferes with the installation of both rEFIt and rEFInd. Of course, this is irrelevant if you're using an earlier version of OS X.
Instructions on installing rEFInd under OS X -- You may be able to combine this with the page you used to get mostly working.
My page on the CSM -- Many older Ubuntu-on-Mac installation instructions rely on the Mac EFI's Compatibility Support Module (CSM), installing Ubuntu in BIOS/CSM/legacy mode. This is a Bad Way to do it these days, and my CSM page describes why. That page is mostly written with UEFI-based PCs in mind, but it's still mostly applicable to Macs. Understanding these issues will help you get things working correctly.

Note that it may be best to install Ubuntu on the computer before installing rEFInd in OS X. The reason is that this order will cause the refind-install script to set up a filesystem driver that will enable rEFInd to launch the Linux kernel directly and in EFI mode, rather than relying on either BIOS-mode or EFI-mode GRUB to get Ubuntu to boot.


Configuring a usb modem in Ubuntu 12.04 - toshiba laptop

Please go through this link it will help you .And there is the same question ask here .

askubuntu and it has nice answer.

How to install Huawei E173 Usb Modem in Ubuntu 10.04/12.04


Are there processes that can't be stopped?

Full screen terminal applications ( think nano ) that are badly written/broken can fail to resume properly in that they don't repaint the screen correctly after its contents changed while the program was suspended.  Well behaved applications notice when they have been suspended and resumed and will repaint the screen properly.  That's about it.


Brightness control keys don't work on Lenovo Y540 but xrandr does

I have This Issue with Lenovo Y540 that comes with NVIDIA GeForce GTX 1660Ti Graphics Card
Ubuntu version: 19.10
Also, I have upgraded to version 20.04 and working fine
you need to edit or create this file
sudo nano /usr/share/X11/xorg.conf.d/10-nvidia.conf
and add this line
Option "RegistryDwords" "EnableBrightnessControl=1;"
after this line Option "AllowEmptyInitialConfiguration"
so the file 10-nvidia.conf will look like this:
Section "OutputClass"
    Identifier "nvidia"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "AllowEmptyInitialConfiguration"
    Option "RegistryDwords" "EnableBrightnessControl=1;"  # Line need to be added
    ModulePath "/usr/lib/x86_64-linux-gnu/nvidia/xorg"
EndSection

and save the restart your laptop
and the brightness control keys will work


`xdg-open .` opens file manager, but opens Audacious with sudo permissions

xdg-open is not always configured to open the correct application by default.  You can start Lubuntu's file manager directly by running pcmanfm.


You haven't mentioned your ubuntu version and your window manager (unity 3d/compiz, unity 2d, metacity/gnome classic etc.)

Steps

Backup your important data.
Please create a new user, then grant admin privileges and check if it works there. If it works, then the problem is somewhere in your user's home directory. Some program settings must have been altered.
(a) If you also have problems with the new user, try purging packages:

sudo apt-get update
sudo dpkg -P --force-all ubuntu-desktop ubuntu-standard ubuntu-minimal
sudo apt-get install ubuntu-desktop ubuntu-standard ubuntu-minimal
sudo apt-get -f install
sudo apt-get dist-upgrade

This is mostly harmless and will install any important packages you may have removed.
Restart your pc and see if it's fixed.

(b) If you do not have any problems with the new user, then some settings in your home configuration are causing trouble. Close any windows that you don't need and do not open anything.

The following commands will reset your gconf and dconf settings. This includes window positions, default theme, desktop wallpaper/backgrounds, only very basic preferences in programs (e.g. nautilus will be in default view, not list view). but NOT your data nor any folder-specific settings.

There is a small chance that something will go wrong, so please backup (#1) and have a live cd/usb somewhere in case you need to reinstall. Or use your new administrator account to fix the issues.

The commands are:

gconftool --shutdown
killall -r -I -9 dconf
killall -r -I -9 gconf
mv .gconf gconf-backup
mv .config/dconf config-dconf
mv .cache/dconf cache-dconf

Then reboot (do not do anything else, do not open/close any windows):

sudo reboot

Recovery

To recover your old settings:

gconftool --shutdown
killall -r -I -9 dconf
killall -r -I -9 gconf
mv gconf-backup .gconf
mv config-dconf .config/dconf

And reboot (do not do anything else, do not open/close any windows):

sudo reboot

If it didn't work

Did you by any chance install packages from any PPA or third-party repositories?

These packages are not all checked, nor are all safe. Some exist for testing purposes only. I suggest you reinstall your system without any PPA until you become acquainted with the linux system (and how to recover).


Would this work?
gsettings set org.gnome.mutter edge-tiling true

Regards.
EDIT: You can also look at the dash-to-dock settings, maybe something's there that will be useful


Most likely the exact 1.7.17 version is different now and the jdk1.7.0_17 does not exists, so use the interactive command to change the java or javaws alternative.

$ sudo update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).
  Selection    Path                                            Priority   Status
------------------------------------------------------------
  0            /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java   1061      auto mode
* 1            /usr/lib/jvm/j2re1.7-oracle/bin/java             316       manual mode
  2            /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java   1061      manual mode
Press enter to keep the current choice[*], or type selection number: 1

$ sudo update-alternatives --config javaws
There are 3 choices for the alternative javaws (providing /usr/bin/javaws).
  Selection    Path                                              Priority   Status
------------------------------------------------------------
* 0            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/javaws   1071      auto mode
  1            /usr/lib/jvm/j2re1.7-oracle/bin/javaws             316       manual mode
  2            /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/javaws   1061      manual mode
  3            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/javaws   1071      manual mode
Press enter to keep the current choice[*], or type selection number: 1

It's a lot less likely to make mistakes with this. :)


Issue bootstraping juju 2.0 on maas xenial setup

Juju's support for MAAS 2.0 (which is what you'll get in Xenial) is still in development. The bug you're seeing appears to be fixed for Juju 2.0-beta7:

https://bugs.launchpad.net/juju-core/+bug/1576368


Ubuntu on VMware Fusion resolution not changeable from 800x600

Installing VM Ware tools should help. Main menu-> Virtual Machine -> Install VM Ware tools.

Make sure you update linux headers, since vmware is notorious for not being able to find them. Plenty of solutions and guides online in case you run into this issue.


Ubuntu Server 12.04 on Dell PowerEdge T320

Ubuntu offers a certified hardware database.

Doing a simple search I found Dell PowerEdge T310 and Dell  PowerEdge T410. They both work flawlessly. Also Dell PERC H310 works.


Intel 7260 bluetooth device (usb-device-8087-07dc) at 100% usage

This is a bug in Ubuntu 16.04. I reported and it looks to be recently fixed for Ubuntu 16.10, but not yet for 16.04.

It is not related to the Intel adapter.

You can check the power management status by iwconfig.

You can enable power management manually using iwconfig, or install laptop-mode-tools, where it will be automatically set on.

Another workaround is to set power management on in Network Manager, but it is possible only per connection, that is not handy if there are many connections.

BTW I have exactly same wireless adapter ;-)


Extracting a part of a massive csv file from command line

I had a script that I adjusted (good idea the (N+1)q part!) thanks to @chronitis comment and the SO answer:

#! /bin/bash
#
N=10
M=20
P=2
Q=3
sed -n "$N,${M}p; $((M+1))q" $1 | cut -d, -f$P-$Q

Save the file as for example cut_csv, make it executable and use as

cut_csv file

It can be made fancier by accepting the N,M,P,Q parameters as input etc, but I use it seldomly so I normally simply edit the file.

How it works:

The main command is the following (let's suppose N=10, M=20, P=2, Q=3); the shell substitutes the variables and the last line will become: (1)

sed -n "10,20p ; 21q" file | cut -d, -f2-3

Let's start with the first command:

sed -n "10,20p ; 21q" file

This call sed (stream editor, man sed) in no-print mode (-n) and execute the following commands on the file:

print (p) the lines between 10 and 20 (this is the 10,20p part)
quit (q) when reading line 21 (21q) so that discard the rest of the file

The output of sed is piped (|) to cut:

cut -d, -f2-3

This command (man cut) selects fields of a line (and repeat for each line). In this case, I am telling it that the separator between fields (columns) is a commad (-d,), and to print out the columns between 2 and 3.

As another more complex example I often use this one:

sed -n "1p; 10,14p; 21q" data.csv | cut -d, -f1,4-8

This will select row 1 (where I have titles :-)) and rows from 10 to 14 (5 lines); then select columns 1 (time in my data...) and column from 4 to 8. It is really powerful once you get grips with it.

(1) one great way to see what the shell is doing is change the first line (which is called a shebang) like that:

#! /bin/bash -xv

The shell will now print every command it reads and the result of the substitutions:

(0)asus-rmano: part_of_csv.sh p20dedo.csv
#! /bin/bash -xv
#
N=10
+ N=10
M=20
+ M=20
P=2
+ P=2
Q=3
+ Q=3
sed -n "$N,${M}p; $((M+1))q" $1 | cut -d, -f$P-$Q
+ cut -d, -f2-3
+ sed -n '10,20p; 21q' p20dedo.csv
16:05:49,000
16:05:51,000
[...]


Downloading Ubuntu in Windows through Virtual Box

You have 'mounted' the installation media (the ISO probably) in the virtual machine. You need to remove it from the machine by going to the settings and deselecting it. This is the equivalent of removing the CD or USB from a real computer after installation.


You don't.

There is no such thing as 32-bit colors, at least when it comes to displays. Not even when Microsoft likes to call their 24-bit color mode a "32-bit" mode.

24-bit colors give you 8 bits per color channel, totaling 16,7 million colors (2^8 * 2^8 * 2^8 = ). That's way more than what most LCD displays are able to handle (in fact most consumer-grade LCD panels are really only able to display 18-bit colors)

Pictures and graphics can have 32-bit colors, in which case the last 8 bits are used for Alpha channel (transparency). As long as out displays can't become transparent they have no need for those last 8 bits.

More reading see Color depth

Source:Ubuntu Forums


ModuleNotFoundError: No module named 'nltk' after installation on a Windows 10 + Ubuntu 18.04 machine

It's probably related to using conda. I used it for a very short time, and it was easier for me to just blow it out and install things manually.

converted from a comment because OP said it solved their problem


What are the pros and cons of the repository system concept used in Ubuntu (et al)?

There are good things and bad things about installing software from one central repository.

Good:

It's all in one place, so you know where to look.
It enables really easy catalogue-type applications (e.g. aptitude, synaptic)
Good distros maintain their repos fairly strictly, so there's a fair bit of quality control, meaning you can trust the software from the repo more than from untrusted sources
It enables you to do some very fancy auto-resolving of software dependencies (well, allows you to do it more easily at least)
Single source of updates - you don't have to check each individual app (or app's website) for updates, they all come via one place
It allows mirroring of all the known-good software for an OS to different servers around the world (e.g. the place I work maintains a Ubuntu repo mirror)

Bad:

It's not as easy to install from other sources outside the repo
It's very geared towards open-source software, rather than proprietary
It feels restrictive; if you're not in the repo, you're not on the radar (even though, yes, you can still install software from outside the repo, it's so much harder that not a lot of people bother)

Overall, the Pros outweigh the Cons for most linux distros (in fact, probably most unixes), which is why it's used a lot in the unix world. Used in a lot of different ways too; ubuntu's deb/apt repositories, fedora/redhat/others rpm/yum repos, *bsd's ports tree, gentoo's portage, pkgsrc, the list goes on. Some of them do a better job than others :)


Would not boot after swapped computer, stuck booting from live-boot USB

Found it here: USB MBR Damaged

I used install-mbr /dev/sdc

I shut down, removed the unwanted USB stick and rebooted from the original 64GB drive. Thank you for your helps.


I can print but not scan with my Epson XP-400...what can I do?

I have the same printer.

First, go to http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX

type XP-400 in the search field and press enter.

You will need to click Download on each one of these to obtain the following packages

(If you are using 64 bit, download the amd64.deb packages instead of i386.deb)

epson-inkjet-printer-201203w_1.0.0-1lsb3.2_i386.deb (full-feature)

epson-inkjet-printer-escpr_1.4.0-1lsb3.2_i386.deb (generic-driver)

iscan-data_1.28.0-2_all.deb (core & data)

iscan_2.29.3-1~usb0.1.ltdl7_i386.deb (core & data)

iscan-network-nt_1.1.1-1_i386.deb (network plugin)

Install each of these packages one at a time by right clicking on the .deb files in your downloads folder and selecting open using Ubuntu Software Center.

Because of dependency issues, you must install each of these packages in the same order as in this list or software center will complain.

Also, one of the packages may complain that a newer version is already installed. If you encounter this, skip that package and move on to the next one.

I've tested and verified this using "simple scan", "image scan! for linux", "xsane image scanning program" (with firewall access on port 631), and "acquireimages".


How do I install the video driver on an Asus N56V?

You will require Bumblebee packaged drivers for your video card because Nvidia does not yet officially support these for Linux. See this thread for further instructions: Switchable laptop graphics issues on Ubuntu 12.04?


/etc/hosts keeps getting reset. How am I supposed to edit it?

According to this post your problem is caused by one of the three possibilities:

1.It's due to dnsmasq defaulting to sys dns settings.

http://www.stgraber.org/2012/02/24/dns-in-ubuntu-12-04/#comment-39367

http://wiki.debian.org/HowTo/dnsmasq

2.You need to update .

3.Any changes you make to /etc/hosts or /ets/resolv.conf during the VPN session are wiped out when you disconnect from the VPN


Admin password reset successful, but not recognized on reboot

Normally, admin is not a user in Ubuntu.  The equivalent to admin is "root", but you don't normally need a root password.

In order to perform administrative tasks, you use your normal user account, and use a command such as "sudo" or for gui apps, "gksu".

If you do have a user named admin, then you need to log in with that name and corresponding password.  But admin is just another user, not anything special.

Edits

Note that the password asked for by the updater is for the currently logged-in user, not some administrator or anything.  The user must be in the "sudoers" file, or a member of the group named "sudo".  In the old days, this was done by "dropping into a root shell", ie becoming root/superuser (using the "su" command). You would then enter all the administrative commands, and then type "exit" to return to your normal shell.  But that required giving all users who might need it the root password, which is not good security; so, modern systems use the sudo method, which allows specified users to have higher levels of privileges without necessarily knowing the root password.


Shell script issue: cron job script to Restart MySQL server when it stops accidentally

I suspect that you setup the cron job to execute this script in your crontab file, and not in the root crontab file. This is not correct because if you don't run service mysql status as root, the mysql service will not be recognized.

So, modify the script as follow:

#!/bin/bash
if [[ ! "$(/usr/sbin/service mysql status)" =~ "start/running" ]]
then
    /usr/sbin/service mysql start
fi

Be sure that is executable:

chmod +x /path/to/script

Then add a new entry in the root crontab as follow:

Edit root crontab file using:

sudo crontab -e

And add the following line to the file:

*/1 * * * * /path/to/script

Note: I have set the cron job for every minute, but you can change as you wish or as you think is better. See http://en.wikipedia.org/wiki/Cron in this sense.


You can try installing CPUfreq. From Point 4 from Most Effective Ways To Reduce Laptop Overheating In Linux - It's FOSS:

With CPUfreq, you can choose the mode you want the laptop to run in. There are three modes, performance, on demand and power saver. Running the laptop in Power Saver mode reduces overheating. The tool is easy to use thanks to its indicator applet in Ubuntu. To install CPUfreq in Ubuntu based Linux distributions, use the following command:
sudo apt-get install indicator-cpufreq

When installed, just choose the power saver mode from the indicator applet.

Last I know, CPUfreq doesn’t conflict with TLP. I think it should not conflict with thermald and Laptop Mode Tools as well (if you install them as well).
Out of the four tools mentioned, which one should go with?? Answer differs from person to person. I usually install TLP along with CPUfreq. But you can try each one of them one by one to see which one works the best for you. It will be easier to see the performance of these tools if you monitor your computer’s temperature. We are going to see next on how to monitor hardware temperature.


Can I make a Compiz animation rule for Wine menus?

The reason you don't get the normal menu effect is because there is no way to tell these are menu windows. There is no way I know of to identify them separately from any other WINE window or Ubuntu would already be doing so. :)


Error removing initramfs tools (fresh install)

In the end I 'solved' this by installing 12.04.3 LTS instead of 13.10.  As part of this I also 'rejigged' my partitioning schema:

sda1 /swap  swap 4GB
sda2 /boot  ext4 128MB
sda3 /var   ext4 8GB
sda5 /opt   ext4 4GB
sda6 /      ext4 16GB
sda7             16GB
sda8 /home  ext4 200GB

sda7 is unformatted free space for test installations and is where I will eventually try installing 13.10.

In any case, 12.04.3 LTS is installed and running quite happily.


Is it possible to log/monitor Bluetooth errors?

/var/log/syslog

will have notices regarding bluetooth.
grep blue /var/log/syslog.1|more

shows amongst others ...
Mar 12 17:47:36 schijfwereld bluetoothd[894]: DIS cannot start: GATT is disabled
Mar 12 17:47:36 schijfwereld bluetoothd[894]: Failed to init deviceinfo plugin
Mar 12 17:47:36 schijfwereld bluetoothd[894]: Failed to init proximity plugin
Mar 12 17:47:36 schijfwereld bluetoothd[894]: Failed to init time plugin
Mar 12 17:47:36 schijfwereld bluetoothd[894]: Failed to init alert plugin
Mar 12 17:47:36 schijfwereld bluetoothd[894]: Failed to init thermometer plugin
Mar 12 17:47:36 schijfwereld bluetoothd[894]: Failed to init gatt_example plugin
Mar 12 17:47:36 schijfwereld bluetoothd[894]: Bluetooth Management interface ini
tialized
Mar 12 18:38:23 schijfwereld bluetoothd[862]: Failed to init gatt_example plugin

If you do a
tail -f /var/log/syslog

and enable/disble bluetooth it will start listing commands when they are inserted into syslog so you can monitor this file in real time.


Checkout this github project, it may work for you.


For KDE use KSnapshot, it should be installed, if not

sudo apt-get install ksnapshot

If you must use this I think you will need all the libs required for a gnome environment.

sudo apt-get install gnome-shell

This should help


PYTHON SPYDER starting problem on LUBUNTU

İ assume that you are using Turkish as system language. Turn it to English and it should work, than I suggest you do a clean installation.


You might need to add wireless firmware for Linux. Open your terminal and copy/paste this command:

sudo apt-get install firmware-b43-installer

It's worked for me a couple of times. Good luck!


This is what I used when I had a problem with it.

These Commands Will Remove/Uninstall Compiz Unity:

sudo apt-get remove compizconfig-settings-manager
sudo apt-get remove compiz-fusion-plugins-extra
sudo apt-get remove compiz-plugins-extra
sudo apt-get purge compiz*

Then to Re-install Compiz Unity use:

sudo apt-get install unity-2d
sudo apt-get install ubuntu-desktop
sudo apt-get install ubuntu-desktop-2d
sudo apt-get install compizconfig-settings-manager
sudo apt-get install xserver-xgl
sudo apt-get install emerald
sudo apt-get install compiz-fusion-plugins-extra
sudo apt-get install compiz-plugins-extra
sudo apt-get install unity


Second Moniter not properly detected, stuck in mirrored

I believe that you'll have the best luck having both monitors plugged in at boot, vs plugging and unplugging the live system.  I'm not sure it's related, but have you taken a  look at the recommended Radeon R9 390 kernel parameters?  Do you have any other kernel parameters set?  For example, nomodeset will break amdgpu, as noted here.

In doing some research on the Radeon R9 390, I'm seeing people having the best luck using Kernel >=4.16.7.  At the time of this post, Ubuntu 16.04 mainline does not have this available.  You can see here that by upgrading to 18.04, you'd be able to get on 4.15, which is close but not exactly right.  People are also mentioning that amdgpu isn't always being used or loaded properly.  You can look at the output of lspci -k, find your graphics card, and make sure that amdgpu is being used.

There are very detailed instructions in this answer walkthrough of options for Ubuntu 16.04 and an explanation for some of the quirks.  This post talks about moving from radeon to amdgpu.  Some have had success by simply blacklisting radeon.

Which drivers do you have running, and which do you want running?  Have you looked at "Additional Drivers", or ubuntu-drivers devices.  Can you edit your question and include which drivers are in use?  Is upgrading to 18.04 an option for you?


Ubuntu Stays on Desktop BackGround Picture

You can attempt to rest the settings:

Press Ctrl+Alt+F2.
You will get a login prompt with a black screen. Login to your account.
Execute this command:

  sudo rm -r .*
  sudo reboot now

  Warning!

This will erase your application settings, including Firefox history and bookmarks.


How to create a common base folder with tar and how to rename folders?

You can do 1. with the following command:

tar cvf archive.tar --transform 's,^,baseFolder/,'  a b

The archive will contain:

$ tar tvf archive.tar
drwxrwxr-x sylvain/sylvain   0 2015-03-18 12:47 baseFolder/a/
-rw-rw-r-- sylvain/sylvain   0 2015-03-18 12:47 baseFolder/a/foo
drwxrwxr-x sylvain/sylvain   0 2015-03-18 12:47 baseFolder/b/
-rw-rw-r-- sylvain/sylvain   0 2015-03-18 12:47 baseFolder/b/bar

For 2. you can run tar with multiple --transform options:

tar cvf archive.tar --transform 's,^a,changed_a,' --transform 's,^b,changed_b,'  a b

The archive will contain:

$ tar tvf archive.tar
drwxrwxr-x sylvain/sylvain   0 2015-03-18 12:47 changed_a/
-rw-rw-r-- sylvain/sylvain   0 2015-03-18 12:47 changed_a/foo
drwxrwxr-x sylvain/sylvain   0 2015-03-18 12:47 changed_b/
-rw-rw-r-- sylvain/sylvain   0 2015-03-18 12:47 changed_b/bar

For 3. you can combine 1. and 2. as follows:

tar cvf archive.tar --transform 's,^a,changed_a,' --transform 's,^b,changed_b,' --transform 's,^,baseFolder/,' a b

The archive will contain:

$ tar tvf archive.tar
drwxrwxr-x sylvain/sylvain   0 2015-03-18 12:47 baseFolder/changed_a/
-rw-rw-r-- sylvain/sylvain   0 2015-03-18 12:47 baseFolder/changed_a/foo
drwxrwxr-x sylvain/sylvain   0 2015-03-18 12:47 baseFolder/changed_b/
-rw-rw-r-- sylvain/sylvain   0 2015-03-18 12:47 baseFolder/changed_b/bar


try reinstalling ubuntu or testing it on a windows to see if that fixes the problem.


Is there a way to programatically detach the built in media player from dbus?

First of all, there is nothing ungraceful in killall banshee. Kill just happens to be the name of the signal passing application. You could of cause create an alias for kill with a more graceful name :-)

Apart from that, you really don't have to do that. Just send the play/pause/next/etc directly via dbus:
e.g.

  dbus-send --type=method_call --print-reply --dest=org.mpris.MediaPlayer2.vlc /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause

This does not interfere with any other player. (Assuming you have a vlc version that implements mpris2 (2.0) and you have started vlc with dbus enabled configuration).


How can I ensure if there is no crypto currency mining script running on my ubuntu?

If you had cryptomining script running you should see them when you use top command as chromium/firefox/(or else) process. If no browser process are running, the issue is certainly somewhere else.

For your performance, maybe try to disable all desktop effect and see if there is differences and check if your hardware is well supported (graphic driver, etc.).

And about cryptomining script, I advise you to use an Web Extension in your browser, such as uBlock or even uMatrix if you want to block absolutly all by default.
Also the NoCoin extension is made specially to avoid cryptomining scripts running in your browser.


Do I have to explicitly declare ports if I've defined an interface?

All port openings need to be explicit. In an example like http port 80 isn't the only port an http server could run on.

Docs:

https://jujucharms.com/docs/stable/charms-exposing
https://jujucharms.com/docs/stable/reference-hook-tools#open-port


Requested download is not authorized for use with this tracker

I saw the same message when trying to download ubuntustudio-16.04-dvd-amd64.iso.torrent  from http://cdimage.ubuntu.com/ubuntustudio/releases/xenial/release/
Using Transmission 2.84

While I was searching for information on the error, the download began. However, the message remains under the progress bar.

My suggestion is to wait, perhaps two minutes, before looking for another way to download.


"Invalid MIT-MAGIC-COOKIE-1 key" message while running a program with the Terminal

This indicates a permission Problem or simply a wrong magic cookie ..

what works for me: xhost + 192.168.1.2 for virtual boxes  , then in the virtual machine : DISPLAY=192.168.1.1:0.0 dbus-run my-x11-program

the MIT-MAGIC-COOKIE is stored in the file .Xauthority of the user who is running the desktop

you might have an already wrong-filled .Xauthority ?

you could also just "steal" this one (transfer via ssh) or copy on
localhost , sometimes sudo works , and su not

when everything fails: run via ssh with e.g ssh -YXC myuser@the-machine "the-command"

if you encounter failures concerning MPI_init() from openMPI, you should read the mpirun-gui section from the manual there is another thread in the SE community describing what MPI_Init() it does


Boot into recover mode, and enter the commands

sudo dpkg --configure -a
sudo apt-get --fix-missing
sudo apt-get -f install


Remove an youtube-dl packages from your system.

sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl

First one draws the program from git, and saves the file under
/usr/local/bin/
Second one makes it executable.

This is the up-to-date version direct from git. From time to time you have to update the programm with

sudo youtube-dl -U


Your environments.yaml will need to define http-proxy, https-proxy, and no-proxy. See here for all configuration options https://jujucharms.com/docs/1.25/config-general


Gnome Terminal Receiving Incorrect Character Input

I was using the wrong syntax in my ~/.inputrc file which led to this behavior. Clearing the ~/.inputrc file fixed the problem.


You might find this handy: http://www.anta.net/misc/telnet-troubleshooting/imap.shtml

When I was last trying to figure out a complex IMAP server setup, so I could use pine, I found it invaluable, being able to telnet into the server and talk IMAP to it directly, so I could list the contents of various folders, to try to figure out where INBOX actually was.  From memory the issue I was having was that INBOX was in one place and my folders were in another, and not contained in INBOX as thunderbird expected.

That said, the best advice is probably to ask one of your University tech guru's how to correctly configure thunderbird, or some other IMAP client.


Looks like you forgot to tick the option to install the WiFi hardware.

I know that there is way to fix by installing the WiFi drivers. But I have forgotten what the package it was. If I were you, I would check this answer.

If you have tried everything you can, I would recommend you reinstall Ubuntu and make sure to tick the option to install the WiFi hardwares.


SSD-caching vs OS on SSD - which is faster?

Yes, running Ubuntu solely on an SSD would be the option with the most performance. You could even consider partitioning the SSD further to contain both your OS partition as well as the swap space. Putting the swap space on the HDD places somewhat of a bottleneck in performance if you begin to use memory-intensive applications that exceed the RAM space you have, as your speed will be limited by the read/write speed of the HDD. Because SDDs can read and write data much faster, having the swap space there will undoubtedly increase your performance.


How do I get rid of the block cursor in the GNOME Terminal?

You can change it in Edit -> Profile Preferences -> General Tab.


Help with adapting a script to Multiple Outputs

I don’t know awk well enough, I’d just use grep and loop over the group names as follows:

for i in Sports News" Movies "General Streams"
do
  <input.m3u grep --no-group-separator -A1 'group-title="'"$i"\" >"$i.m3u"
  sed -i '1i #EXTM3U' "$i.m3u"
done

This saves the output in files called simply by the group name, e.g. Sports.m3u and General Streams.m3u.

The GNU parallel  equivalent to this loop is:

parallel '<input.m3u grep -A1 group-title=\"{}\" >{}.m3u;sed -i "1i #EXTM3U" {}.m3u' ::: Sports News Movies "General Streams"


setting up a script to rotate scren Lenovo Yoga Thinkpad S1

You could try to change synclient touchpadoff=0 to synclient touchpadon=1 and at right" styles rotate half and erase" rotate half.

and it might work fine this way.


Calibre server doesn't start on Ubuntu server 16.10 with systemd

You are using --pidfile=/var/run/calibre-server.pid which tell calibre to write the pid file to /var/run. Most likely the user running the process User=calibre does not have access to write there. I'd suggest you remove --pidfile since you're not using it.

If you do want to use it, change the path to a writeable directory by the calibre user and add PIDFile=/dir/with/pidfile/calibre-server.pid before your ExecStart line, and as mentioned above also add Type=forking


Google Chrome app name changed after installing LINE from Chrome Web Store

I would try locating the LINE or Chrome .desktop file in /usr/share/applications/ and renaming it to Google Chrome. Also, open the .desktop file with a text editor and change the name to Google Chrome


How can I make a KDE app (Okular) register its actions with Zeitgeist?

Sadly at the moment it is not. The integration of Zeitgeist with KDE isn't that good. It needs more work.

More info

There is a library named libqzeitgeist which can be used for gluing applications with zeitgeist. Sadly the library (gluing code) exists, but not used that much. I had plans on working on it, but got stuck up in other work.


Add icon to Unity panel during/after package installation

It's stored as a dconf key:

$ gsettings get com.canonical.Unity.Launcher favorites
['nautilus.desktop', 'chromium-browser.desktop', 'terminator.desktop', 'gedit.desktop',
'libreoffice-startcenter.desktop', 'banshee.desktop', 'ubuntu-software-center.desktop']

I'm not sure of a way to do what you want in a policy compliant way short of patching the package providing the default schema. I'm sure you can imagine some hacky approaches in the postinstall.


Why does "ping" work,  but "ping -R" fails?

It works for me as well as it is supposed to work.

According to the man page:

"Note that the IP header is only large enough for nine such routes.
 Many hosts ignore or discard this option."

So, if the route is more than 9 hops, including your local machine, then that's all you'll ever see is the first 9.


What is the type of my kernel, 32 bits or 64 bits?

You can see the programs installed are on their 64-bit version, so I assume it's a 64-bit system.


Preserve image size when converting images to gif

One way to get this done in different steps is first to convert the .jpg images to have same size, then create animated gif.

E.g.:

mkdir CONVERTED
for i in *.jpg; do convert $i -size 927x1200 xc:black +swap -gravity center -composite ./CONVERTED/$i; done
convert -delay 1000 -loop 0 ./CONVERTED/*.jpg animated.gif

This does: For each image create new image of size 927x1200 in subfolder CONVERTED, keep the size of the image, center it with black border.

If you do want to have the images resized in a way so they fit into the output size, you might also resize them:

for i in *.jpg; do convert "$i" -resize 927x1200 -size 927x1200 xc:black +swap -gravity center -composite ./CONVERTED/"$i"; done

Instead of making animated gif (which could become very big) you might want to create a movie by using photofilmstrip (on the converted images).


It is not up to date.

You can see the Chromium release calendar here. At the moment Chromium 34 is the current stable release. Also see the Chromium blog.

As Thomas W. pointed out, in Ubuntu 13.10 the "Universe" repository is fixed. That means they won't have the newer Chromium in 13.10 ever, unless it's backported or put in a PPA.

Unfortunately, the PPAs of the Chromium Builds team at Launchpad, which are supposed to offer a variety of stable and beta Chromium builds, seem not to have been maintained for a while.

This means you will have to wait for Ubuntu 14.04.

If you do not want to wait, you can download and install Chromium Beta manually (beware, it will not be maintained by apt). That will be Chromium 35 Beta, then. Unfortunately the Chromium projects don't provide any stable builds for Linux, so if you want the current Chromium 34 you will have to compile it yourself. You will first have to checkout the source using git, then switch to the 34 branch. This is slightly involved, so if you want to do that best follow the instructions that I linked to and if you have any particular questions, post them here. :)


Hide user list from logon page in Ubuntu/Xubuntu 11.10

Edit the LightDM configuration file:

gksudo leafpad /etc/lightdm/lightdm.conf

You may have to substitute mousepad for leafpad if you're on a newer release.  Add the following two lines to the [SeatDefaults] section:

greeter-hide-users=true
allow-guest=false

You can then restart your system, or just restart lightdm:

 sudo restart lightdm


Resume after hibernate: monitor signal out-of-range

Can you get into the Grub2 menu (ideally from your hard disk, otherwise from your LiveCD)? Try holding down the Shift key while booting!

If yes: In Grub2, select your Hard Disk Linux installation, press the 'e' (edit) key, then add "noresume" to the kernel parameters. Now it should boot without resuming from the hibernate image.


Many sound cards have a "beep" channel, often muted:
run "alsamixer" in a terminal : you may need to press F6 and select your card. scroll to the Beep channel using the arrow keys and press M to unmute the channel. notice that the "MM" label below the channel will change to "00". you can also use ↑ to increase the volume of the channel.
press Esc to close alsamixer.

(From archwiki: beep)


run charm_helpers_sync.py during charm deployment

Since you want to run charm_helpers_sync.py everytime you deploy the charm, I suspect you want to always have the latest version of python-charmhelpers. There is a much easyer way to accomplish this:

Automatically install charmhelpers using python-pip

The following function installs the charmhelpers using the repository and python-pip.

def install_charmhelpers():
    """
    Install the charmhelpers library, if not present.
    """
    try:
        import charmhelpers  # noqa
    except ImportError:
        import subprocess
        subprocess.check_call(['apt-get', 'install', '-y', 'python-pip'])
        subprocess.check_call(['pip', 'install', 'charmhelpers'])

Call this function on the top of your hook scripts, above the charm-helper imports. Juju's python charm template shows a clean way to do this.

Write a Juju plugin to download charmhelpers source

If you really want Juju to download the charmhelpers code and include it in the charms, you'll have to write a Juju plugin.

There was a talk about writing plugins on the Ubuntu Online Summit
You can find other Juju plugins on the Juju plugin github page


Can we watch Full HD 1080p content on Netflix for Ubuntu?

No, per its policy Netflix only streams Full-HD videos to applications with a content decryption module meeting their requirements and neither Chrome nor Firefox is among them and the native client has been discontinued.

Source


Trying to connect an Ubuntu machine to a Windows Workgroup. Various things do work but not file share access

Your problems are all undoubtedly related to SMBv1, your Ubuntu machine will still be using it and the Win10 wont.This is further compounded by the fact that SMBv1 is needed for Network browsing, Windows has replaced Network browsing with Network discovery, but Linux doesn't use this, it uses Avahi instead. You can get a Linux Network discovery server here:
https://github.com/christgau/wsdd
I would also suggest you turn off SMBv1 on your Ubuntu machine by adding these lines to your smb.conf file:
client min protocol = SMB2_02
server min protocol = SMB2_02


Press Ctrl+Alt+T. This opens a terminal in Ubuntu and you can also open it from the menu.
In Ganache do you mean the log?


PhotoRec can identify a data chunk 'on the disk' even when there is no pointer to it in the file system (which happens, when the file is deleted, and which can happen, when the file system is damaged). PhotoRec will copy from these data to files in another drive.

See the following link and links from it, if you want more details,

Repair the partition table and file system of a pendrive


Terminal not outputting result in Visual Studio Code

I am very dumb. I forgot to save the file. Do people recommend to turn on autosave?


Certain commands not working for a user with sudo after adding to `sudoers` file

You have the wrong path to rm, rmdir and mkdir commands. Change your line to this instead:

Ruby ALL=NOPASSWD: /usr/bin/apt-get update, /bin/rmdir, /bin/rm, /bin/mkdir


Microphone not working on Ubuntu 20.04 KDE Plasma with pulseaudio and pavucontrol installed

Ok, so this is what fixed this issue for me

Run command pavucontrol or just open pavu volume control in apps
Go to 'Input Devices'
Scroll down to 'Built-in Audio Analog Stereo'
Click on lock icon
Set 'Front Right' slider to zero
Adjust 'Front Left' so you get clean sound

I think that you may try to go with 'Front Left' to zero instead, based on you mic.


How do I configure apt to use a Proxy.pac file?

In system --> preferences --> network proxy, enable Automatic proxy configuration and enter the URL of the PAC.

Then press apply system wide, and that should do the trick.


How to highlight items on Desktop using xfce?

You can consult this link: Hidden Options and look at the section reproduced below:

The colors of the icon text and the icon text background, as well as the
opacity of the icon text background, can be customized by putting directives
similar to the following in your ~/.gtkrc-2.0 file:

style "xfdesktop-icon-view" {

    XfdesktopIconView::label-alpha = 75
    base[NORMAL] = "#00ff00"
    base[SELECTED] = "#5050ff"
    base[ACTIVE] = "#0000ff"

    fg[NORMAL] = "#ff0000"
    fg[SELECTED] = "#ff0000"
    fg[ACTIVE] = "#ff0000"
}
widget_class "*XfdesktopIconView*" style "xfdesktop-icon-view"

The first entry sets the opacity of the rounded text background. The three
“base” entries set the text background color, and the three “fg” entries
set the text color.

The “NORMAL” entries set the color for the regular, unselected state. The
“SELECTED” entries set the color for when the icon is selected, and the
desktop has keyboard focus. The “ACTIVE” entries set the color for when
the icon is selected, but the desktop does not have keyboard focus.

(If you don't have a hidden text file called .gtkrc-2.0 in your home folder, create it with a text editor and put what is recommended above in there. Obviously, you will have to choose colors of background and text that are compatible with your wallpaper, if any. Most operating systems come with a color chooser. I use gcolor2 from the Ubuntu Software Center.)

Recent versions of Greybird, which I think is the default theme in Xubuntu, now have a section in /usr/share/themes/Greybird/gtk-2.0/gtkrc which can be tweaked instead of ~/.gtkrc-2.0. Just search for  style "xfdesktop-icon-view". (Greybird is included in shimmer-themes.)


Found the issue, the filesystem.squashfs was not flashed correctly and the check performed at the beginning by the installer did not detect this.


As Nick mentioned, Synergy is perhaps the best known software for what you ask. It's no longer free, but for $10 is still pretty reasonable.

If it doesn't work for you (or for your budget), then you may find a good alternative on alternativeto.net.

From there, you may find win2vnc useful; it'll let you control extra computers as long as you're willing to run VNC servers on them. The site claims win2vnc is discontinued, but the SourceForge page is still up, and shows an update from a year ago.

My personal experience is with Synergy and x2vnc, but the latter is only useful if your keyboard and mouse are plugged into your linux box, which is the opposite of how you described your setup.


Tablets running Ubuntu (or any other Linux distro)

You can find list of devices working (and partialy working) with Ubuntu Touch here

As an alternative for Ubuntu Touch you can try Postmarket OS (list of devices) or  Plasma Mobile.

But remember, that there are no native (arm-based) tablets working without any issue with regular Linux distro.


I had installed vuze and had the same problem.

Then I installed azureus, which effectively also seems to install vuze.
After installing, hit the super then type azureus, you get vuze!

Anyway, as of now azureus/vuze works again. I must say I don't understand the relationship between azureus and vuze, but it did the trick for me. Hope it works for you as well.


Typing location path instead of clicking directory buttons in the file picker dialog?

I have my nautilus set to always show the location bar instead of the buttons and in Firefox, I see the location bar by default too (what you want, I believe).

To do this you have to change a gconf/dconf entry.

Up to Ubuntu 11.10:

gconftool-2 --set /apps/nautilus/preferences/always_use_location_entry --type=bool true

From 12.04 LTS and up:

gsettings set org.gnome.nautilus.preferences always-use-location-entry true

You might need to restart nautilus (with nautilus -q) to see the effect but you might not.


I presume this means you used the wubi installer. (Not installing from a CD, but downloading a windows program to install it), to remove this just go to add/remove programs in the windows control panel, and select ubuntu (it might be called wubi, I can't quite remember), and click uninstall.


How to put a (Start) Menu button on Fluxbox Toolbar

In your $HOME/.fluxbox/init file, look for the line that defines the tools on your toolbar, and add a "RootMenu" item where you want it to appear.  Here's what mine looks like:

session.screen0.toolbar.tools:  RootMenu, iconbar, systemtray, clock


closing processes using /home in order to move /home to new drive

You could use sudo fuser --mount --user /home/* to see the processes, or sudo lsof +D /home (see man fuser;man lsof), but:

The easiest, safest way is to download a Luve USB release, burn it to a USB key, and boot from it. This will guarantee that no process has the former /home open. You will be able to manually mount your old partitions to copy from.

This is more complex if you're using encrypted $HOME directories.


How do I dual boot Ubuntu 11.10 and Windows 7 with EFI?

I tried this some time ago on my Lenovo S205 and it still works just fine. The idea is to make it simple and actually work.

It uses windows loader for both OSs, and while it leaves you short of some Ubuntu maintenance options it works all right and allows updates etc.

Please make sure to use:

mount --bind /sys ./sys

and not

mount –bind /sys ./sys

otherwise follow the instructions sequence verbatim.
Here is the link
http://helms-deep.cable.nu/~rwh/blog/?p=177


I have somehow managed the situtation. I just randomly include and exclude keyboard layouts and after a long time I found the true keyboard layout. It is just too weird and every time I install 18.04 I am encountering with this issue.


Based off the form of your question, it's difficult(for me) to determine direct cause, however, a driver problem would be the simplest, most direct approach. Please update your drivers by following the instructions in this link, then edit your question with further details(OS Version, clear description of issue, etc.).:
http://www.ehow.com/how_5976269_update-drivers-ubuntu.html

if the link above does not help you, check the following link:
https://wiki.archlinux.org/index.php/bluetooth

in particular the section on configuring bluetooth settings.