Strange mouse click behaviour after reinstalling Ubuntu 14.04.1

It seems the mouse issue was caused by some configuration files (I reinstalled Ubuntu 14.04.1, but my home directory pointed to a separated home partition that was not formatted when reinstalling Ubuntu).

So I backed up all of the hidden files and hidden directories in the my home directory using tar -czf cfg.backup.tar.gz ~/.*, then I removed all the hidden files and hidden directories in the my home directory by sudo rm -rf ~/.*.

I restarted the computer, after I logged in, everything is ok! now, if you miss some custom configuration you has lost, you can find it from cfg.backup.tar.gz, use the one in the backup to replace the one in your home directory.

Editor's Note:

  WARNING! while removing offending config files is a useful technique, removing all hidden files and directories is not a good idea as many things will not work properly. A better approach might be to back up all your config files and try renaming or removing the likely suspects one by one (start with ~/.config and if that doesn't work try ~/.local). If you really feel you need to nuke the whole lot (highly unlikely) then you could make a new user, and copy the hidden files from the new user's home directory over those in your old home directory, for example.


GRUB unable to install. Installation fail

Just use Boot-Repair's "Recommended repair". It will reinstall GRUB and provide a BootInfo URL in case you still have boot problems.


Mathematica 8 constantly crashing when I rotate 3D graphics

I have the same problem.  The response from Wolfram was to check
my open source video driver and maybe try an older one/newer one.

They recommend using Mathematica -mesa which seems to fix the
problem, but the graphics performace seems to be slower.


I would re-download the Ubuntu ISO and try it again. It seems like there is a problem with the files on the ISO disk.


Ubuntu Studio 19.04: How to use BlueTooth headphones with JACK?

Jack cannot support Bluetooth headphones. Bluetooth headphone support is handled exclusively by PulseAudio (not even ALSA).

The reason for Jack not supporting Bluetooth audio devices is primarily because Jack is for low latency professional audio, and Bluetooth adds a lot of latency. Basically, it's outside of the scope of the project altogether.


How to set GRUB timeout to 0 on Ubuntu 18.04

In /boot/grub/grub.cfg file there is a condition, almost at the end of the file, that sets the timeout to 10 if the timeout is set to 0. In other words, if you set the timeout to 0 in your /etc/default/grub and then update grub, the condition above reset it to 10 seconds.

if [ "${timeout}" = 0 ]; then
     set timeout=10
fi

However, /boot/grub/grub.cfg is a read-only file and I cannot remove that condition. I made some tests with different values of the timeout in /etc/default/grub. I tried with 1ms (0.001), 0.1s and 1s and I found out that values below 1 (like 0.1 and 0.001) work in the same way and almost like timeout set to 0.


Using webdav to selective sync Box on Ubuntu

The guide you link to, is mostly about WebDavfs2, though near the end it has a reference to an experimental sync client as well.  Did you try that?
I have tried various ways to sync my Box cloud.  Up to BoxSync3, I could sync with Wine.  That worked but I used Ubuntu on a dual boot laptop and when switching to windows the sync indexing started all over again, regardless of syncing under Ubuntu and vice-versa.
In the end I prefer to just have access to my files through WebDav, mounting the remote Box.com location.  The webdav client in Nautilus, performs better than webdavfs2, for that purpose.

I used the guide you link to and succeeded in mounting the remote Box.com location.  However it is very-very slow, with nautilus or most gui file managers - the client webdavfs2 caches icons and file information and with large cloud storage the system crawls till it hangs - there are plenty of posts on this problem.
Nautilus has a webdav client built in! use it and you will get much-much faster results (depending on your internet connection). Access to Box.com now works as fast as it does on my smart phone with the android client.
here is how:

Select "Connect to Server" at the bottom of your Nautilus side bar, or Nautilus > Files > Connect to Server
sidebar screen shot
At the window prompting you to enter your webdav location enter
davs://dav.box.com:443    (443 is the port)
screenshot of location query window
Box will prompt you for user name and password

That's all for connecting and using your cloud files

In order to sync you will need a sync client.


Trouble with audio in remote desktop session with xrdp

You do not really specify which version of Ubuntu you are running.  To have sound working within xRDP session, you have to install an additional xrdp module....( that can be found at git clone https://github.com/neutrinolabs/pulseaudio-module-xrdp.git

You can check this post that explains how to install manually the xrdp sound module (see https://c-nergy.be/blog/?p=13655

If you want to, you can also try to use the latest version of the script (running on Ubuntu 16.04.x, 18.04.x,19.10.x and soon on Ubuntu 20.04) that can help automate the installation of the xRDP and ease and automate the installation of the xrdp sound module (check this link http://c-nergy.be/blog/?p=14093.

Using the script is quite straight forward (Please read the howto use it first in the post  [http://c-nergy.be/blog/?p=14093] !!!)

Step 1 - Download the script

wget https://www.c-nergy.be/downloads/xrdp-installer-1.1.zip

Step 2 - Unzip it

unzip xrdp-installer-1.1.zip

Step 3 - Mark it as executable

chmod +x xrdp-installer-1.1.sh

Step 4 - Execute the script with parameters to enable your selected options

./xrdp-installer-1.1.sh -h  (for the help)
./xrdp-installer-1.1.sh -s  (install xrdp + enable sound redirection )

If you are using Ubuntu 19.10, be aware that sometimes the sound modules does not load properly (and automatically).  The following post explains the working around (https://c-nergy.be/blog/?p=14079) which basically consists of issuing the following command in the remote session

pulseaudio -k

As mentioned, a new version of the script will be published soon to include support for Ubuntu 20.04 and fix some minor issues..

Hope this help
Till next time


Skype Nofitication Icon on Gnome Session Fallback (12.04)

Install the following package

Press Ctrl + Alt + T

type the following

sudo apt-get install sni-qt:i386


Accessibility Tweak: How to prevent accidentally selected text from getting replaced when typing?

The selected text is copied to PRIMARY selection buffer. You could monitor it and send Right arrow key if it changes, to move to the end of the selected text. This works with any application, not only LibreOffice/Thunderbird, at least on X11+GNOME.
# Install dependencies
sudo apt install xdotool  git build-essential libx11-dev libxtst-dev

# Compile clipnotify
git clone https://github.com/cdown/clipnotify.git
cd clipnotify
make

# Run the monitor, could be on ~/.xprofile, or under ~/.config/autostart/
while ./clipnotify;do xdotool key Right; done

# Optional: To kill the monitor on any other Terminal
killall clipnotify

Probably are better ways to do this, maybe using Dbus.
Inspiration and useful links:

bash - Detect clipboard copy/paste event and modify clipboard contents - Ask Ubuntu.
Arch Wiki


Can I install Ubuntu 14.04 on a laptop with builtin camera and mic?

I bought a laptop with Ubuntu 12.10 installed, but unfortunately I lost the installation CD.

That is no problem. Ubuntu is Open Source, ie, FREE. You can always download the latest version without any charge to you. However, if you wish to donate to the ubuntu project, that helps the cover the charges for development.

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

  I now want to upgrade to Ubuntu 14.04, and I am wondering if I can do this without the installation CD?

Yes; you can upgrade to Ubuntu 14.04 without a CD. For clear instructions, you can visit

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

To download the latest version of Ubuntu, visit:

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

If English is not your first language, please comment below and we can find tutorials in your language.

  The laptop I own has a Microphone and Web Camera; Will these both work if perform an upgrade?

Yes.


The installation of grub has 2 parts: the resource files, and the boot loader.
 [Concerning non UEFI boot] Each OS installation has its own resource files [located in the same partition than the OS you have installed), but the boot loader is always installed on the master boot record. Effectively, the boot loader that is installed later will overwrite the former. In that sense, you can have only one full functional grub at a time.

So, don't worry, one of your grub is not functional.

The fact that your Windows, on the non-removable disk, cannot boot with the help of the Linux removable disk, means that your boot loader has a part that is needed located in the Linux partition, as I wrote, there are 2 parts.

  (...) I either have 2 grubs, which doesn't make sense, or I lose the option to boot into Ubuntu when my hdd is connected if I do the windows repair thingy.

No, you have only one that is functional. The one with the 2 parts, one has now only one part, as the Linux one rewrote your MBR.

In your case, you had first Windows installing its bootloader in the MBR of your non-removable drive, and after that, you installed a Linux distro, and you probably didn't use the option "Install Linux next to Windows" (dual boot), so the only (MBR-)bootloader that remained was the Linux one, as you didn't specify explicitly to keep the ability to boot Windows during the install.

I had problems sometimes with install that installed the MBR in the wrong partition, I think it happens.

  I googled online and what I found out is that I either have to install grub on my primary drive; or use a windows recovery disc to repair the MBR.

As you have 2 disks, you can have 2 functional grub, the Windows grub in the MBR of your Windows disk, and the Linux grub in the MBR of your removable disk.

You can use a live CD/USB (everyone should have one to fix bad things that happens to boot, more often than we think).
A live CD with any distro, and an ethernet cable, and you download boot-repair,
or a boot-repair disk: To download here or here.

(For people who cannot boot from the live CD or USB, obviously, they have to change the boot order in their bios.)

You can make a bootable disk with Rufus or Unetbootin for instance.
Tutorial: https://linuxhint.com/ubuntu_boot_repair_tutorial/

There are other disks that can help you alternatively, like Hiren boot (this one is very good as you can use both Windows and Linux to repair your system, from the same ISO), System Rescue CD, SuperGrub disk, Rescatux, Grub-customizer (not live CD), etc...

And of course, as it's a double boot, you can use the Windows method (I consider the Linux one as safer through).
It's not confusing, there are several methods to do that. You can use the Windows MBR restauration at the condition your Linux disk is unplugged, and then, you will have a fully functional Windows MBR. In this case, it won't be a dual boot, but you will tell that you want to boot from the disk or from the removable media, alternatively.

More info: https://help.ubuntu.com/community/Grub2/Installing#via_the_LiveCD_terminal

Next time, to avoid this kind of problem, follow the recommendations:

nstalling Ubuntu to a Specific Partition ("Something Else"):

*When using the "Something Else" option, you will be offered to choose the "Device for bootloader installation". Please select: * either the disk (eg /dev/sdX, not /dev/sdXY) on which the BIOS is setup to boot (recommended for normal use) * OR the partition (eg /dev/sdXY, not /dev/sdX) on which Ubuntu (/boot, else /) will be installed (only if you want to chainload it from another bootloader; if any doubt, do NOT choose this)*

Never choose any other partition! (this may break the boot of your other systems, see Bug #1049549).

On a system with multiple drives and OS's, the user can preserve the original bootloader by installing GRUB 2 on another drive. To accomplish this:
    specify the disk (eg /dev/sdX, not /dev/sdaXY) not currently used to boot the system for the bootloader location.
    After the installation is complete, change the boot order (via BIOS setup) so that the disk to which the GRUB information was written is the one booted first.
    If the user wishes to restore booting with the original bootloader, change the boot order back to the original drive.

GRUB 2 normally writes its bootloader information to an area just beyond the Master Boot Record and before the first partition. Some software on non-Linux operating systems also used this embedded area and broke the system by overwriting the GRUB 2 information on dual-boot systems. GRUB 2 now can recognize this potential problem and avoid it.

The bootloader information does not have to be installed to the embedded area of the MBR. It may also bypass the MBR entirely and be installed to a specific partition. In doing this, the location of the GRUB 2 files are specified by using blocklists. This option is not available via an Ubuntu GUI installation but can be made via the terminal after installation. Even then this method is not as reliable as writing to the MBR and is not recommended by the GRUB developers.

Fixing with the Windows method:
https://www.pagestart.com/repairwin7dualboot02.html

With a Windows CD/USB: Choose “Install Now”, and then "Repair your computer'

    System recovery options >> Command prompt >> Diskpart

Tuto here

bootrec.exe  /fixmbr
bootrec.exe  /fixboot
bootrec.exe  /RebuildBcd


How do I boot Ubuntu from the Windows 10 Bootloader?

Actually not really.

You can boot directly into BCD (Windows Boot Manager) and if you can manage to add a boot item for Ubuntu (which is a real pain), you cannot avoid to boot into GRUB (or whatever Ubuntu uses).

The only way to avoid the Linux boot loader to appear, is to set the automatic boot option and the timeout to 0.  But really, I can not recommend that, because if you have a problem with Ubuntu you are not able to boot into a previous update version or a repair mode!

Whatever your first boot manager is, with a dual boot system (Windows and Linux) you will always need to go through two boot managers – unless your dual boot system is both Linux/Unix or Windows/M$ family.


Nvidia driver removal to revert to xorg - I cannnot boot in recovery/failsafe mode

Thanks to Shiki's chroot suggestion, here is how I was able to revert to the open source display driver:
Reference: http://www.tuxation.com/chrooting-into-a-linux-environment.html

I started booting with the Ubuntu 13.10 installation disk, selecting to "Try" Ubuntu.
Then I opened a terminal window (clicked on the upper left corner icon, and typed: Terminal, to find it)
Then, I typed this sequence of commands:
sudo su
fdisk -l
(Now I looked for the device name of the bootable partition. There is a "Boot" column with an asterix in the line corresponding to the bootable partition. In my case, it was: /dev/sda1 )
ls /mnt (to confirm that nothing was mounted in there yet)
mount /dev/sda1 /mnt
mount -t proc none /mnt/proc
mount -o bind /dev /mnt/dev
mount -o bind /sys /mnt/sys ( I added this from another help page )
chroot /mnt
source /etc/profile
(I remembered installing an updated nvidia driver with number 319, but I looked for the exact name to remove in:
System Settings > Software & Updates > Additional Drivers
There is probably a better way to find the name.)
apt-get remove nvidia-319-updates
mv xorg.conf xorg.conf_bad (Just in case. I don't know if this matters.)

Then, I restarted the computer booting to the HDD installation, tried a few random things and re-booted to confirm that it wasn't a fluke   :-)


Should be possible so long as X detects key presses from the numpad.

You'll need xev which you'll get by installing x11-utils.

The process is defined quite well here:
http://wiki.linuxquestions.org/wiki/Configuring_keyboards#Enabling_Keyboard_Multimedia_Keys

Effectively you'll use xev to capture keycodes from the numpad and use xmodmap to map key presses (and releases) to functions.

There's also heap of great information here:
https://wiki.archlinux.org/index.php/Xmodmap

Note: I will not be suprised if Wayland has issues with this approach, so watch out for that and be prepared for a need to switch to Xorg (which is trivial).


After copying my itunes library to my Ubuntu partition, how can I rename mp3s to their correct name?

Ended up using tagtool  to rename the files based on their tags.

Useful link:

Tagtool - Tool to tag and rename MP3 and Ogg Vorbis files


Will there be a security fix for php in 10.04 LTS?

The "latest critical vulnerability" that you are referring to was introduced in PHP 5.3.9. Lucid is therefore not affected by the flaw fixed in 5.3.10.


After searching around for a while, I found this wiki. So that is systemd activates swap on boot.


As far as I can tell, dpkg -p is an alias for dpkg-query -p which is defined as:

  Display details about package-name, as found in  /var/lib/dpkg/available.
   Users of APT-based frontends
  should use apt-cache show package-name instead

and dpkg -s is an alias for dpkg-query -s which is defined as:

  Report status of specified package.

So, as far as I can tell, you've probably got that specific kernel installed via the linux-generic metapackage. That's why -s works. It would be assumed, however, that linux-generic should be present in /var/lib/dpkg/available and not linux-image-3.16.0-28-generic, which would be why -d doesn't seem to work.


Dual monitor won't work together (one screen blank)

I have the Nvidia 540M and I also faced some problems with Nouveau driver, but I figured out a solution quite simply after hours and days of search, when Nvidia finally released there driver on Ubuntu.

I suggest you to install the latest tested Nvidia Driver (346.96) by using the graphical interface (Drivers > Additional Drivers).
Do not forget to reboot after a proper installation and ensure that you actually run this driver.
Then, open NVIDIA X Server settings. On "Prime profiles" menu, check "Nvidia (Performance mode)".
You can finally perform some checks while pluging in in your monitor. It should appear on the Server settings menu, and can be easily configured.


Grub boot error on cloned virtual machine

You will need to reinstall Grub, I can't tell you why it needs to be reinstalled myself but this is what you will need to enter (/dev/sda1 is assumed to be the OS partition on disk /dev/sda, change as needed).

sudo mount /dev/sda1 /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo chroot /mnt
grub-install /dev/sda


Can I force window to open on top of other windows when opened by keyboard shortcut?

As spacefm used single process. New command just pass signal to the running process and this creates the new window at level just above its last created window.

sudo apt-get install wmctrl

With function: It has 1sec delay.

sfm() { spacefm $* & pid=`pgrep spacefm | head -1`; sleep 1;  wmctrl -i -R `wmctrl -lp | grep " $pid" | tail -1 | awk '{ print $1 }'` }

Run spacefm with same arguments $* were passed to the function, & in background
pgrep spacefm | head -1 get PID of main process which is in the head then store it in pid variable
sleep 1 wait for new process to terminal, to avoid raise of two windows (I don't know why, try removing it)
wmctrl -lp get window list | grep " $pid" filter related ones to $pid, | tail -1 filter last line/window then | awk '{ print $1 }' filter out window id (WID) which is in the first column $1
wmctrl -i -R WID  Move the window WID to the current desktop, raise the  window, and give it focus.

With alias: This will raise 2 windows the new one on the top but simpler.

alias sfm="wmctrl -i -R \`wmctrl -lp | grep ' $(pgrep spacefm)' | tail -1 | awk '{ print $1 }'\`; spacefm"

wmctrl -lp get window list | grep " $pid" filter related ones to spacefm, | tail -1 filter last line/window then | awk '{ print $1 }' filter out window id (WID) which is in the first column $1
wmctrl -i -R WID  Move the window WID to the current desktop, raise the  window, and give it focus.
Run spacefm with arguments coming after. The new window will be created on the top.

- How to use: similar way to the original command.

    sfm -w /home/rasmus/Work/

References: Please look for the man pages.


Hibernate menu not visible when other users logged in

Add org.freedesktop.login1.hibernate-multiple-sessions to the Action. Thus:

...
Action=org.freedesktop.login1.hibernate;org.freedesktop.login1.hibernate-multiple-sessions
...


You can add the system monitor applet to the gnome-panel as shown in the picture.

To add, ALT+Win and right-click the gnome-panel to add the system monitor applet.

Note - this picture was taken using 12.04 Gnome-Classic


You just have to forward port 22 (default) from your router to the computer's IP address (make sure it is static).

Ideally set up iptables firewall rules - this is a big job.

Also learn about ssh and ssh hardening (you will want to use keys and not passwords).

I wouldn't worry about the additional users unless you added any yourself. They are there for other services/daemons. Also check your sudoers file to see who has root permissions etc.


How to run.vhd file ( virtual PC image ) in ubuntu 11.10

CONVERT .VHD (VIRTUALPC) FILE TO .VDI (VIRTUALBOX) FORMAT
To do this, I proceeded as follow:

install qemu package (sudo apt-get install qemu) convert .vhd file:
qemu-img convert -O raw myfile.vhd myfile.bin once the file has been
converted, we convert it to .vdi format using VBoxManage: VBoxManage
convertfromraw myfile.bin myfile.vdi –variant standard
note1: “variant” is specified to ensure we have an expandable vdi file (.bin
file is 17Gb, .vdi file will be only 1.5Gb)
note2: in previous version, “convertfromraw” command was called “convertdd”
That’s it.

Simply load your vdi file within VirtualBox, do it for all three xp .vhd files and you can now use all these VM more easily.
http://www.qc4blog.com/?p=84
http://www.qc4blog.com/?p=721


Install the ubuntu-restricted-extras package and then install the libcss:

sudo apt-get install ubuntu-restricted-extras
sudo /usr/share/doc/libdvdread4/install-css.sh


How to run a .jar application as a service (Start on boot of system)

i) Create your bash script called mystartup.sh to run the .jar file in /etc/init.d/ directory(login as root)

# vi /etc/init.d/mystartup.sh

ii) Add commands to this script one by one:

#!/bin/bash

echo “Setting up customized environment…”
fortune

iii) Setup executable permission on script:

# chmod +x /etc/init.d/mystartup.sh

iv)Make sure this script get executed every time Debian Linux system boot up/comes up:

# update-rc.d mystartup.sh defaults 100

To read more follow this link


Battery reduced by 50%> How to make my battery last longer than windows 7 for HP pavilion g7?

Maybe try tlp:

sudo add-apt-repository ppa:linrunner/tlp
sudo apt-get update
sudo apt-get install tlp tlp-rdw
sudo tlp start
sudo tlp-stat


12.04 boots to black screen ATI Radeon HD 3200

What drivers are you using? I have a fresh install of Ubuntu 12.04 with the HD3200, have tried both open source drivers and ATI's drivers with no problems.

What drivers were you using before the upgrade? Have you tried a different display manager yet? Does Ctrl-Alt-F[number] (where [number] is 1 to 6) bring up a terminal? If the terminal appears, I'd runsudo apt-get update && sudo apt-get dist-upgrade if you haven't already.


ubuntu 16/18 with nvidia. boot hangs. nomodeset, nouveau.modeset, recovery mode - nothing helps

Fixed by upgrading to Ubuntu 18 and then downgrading the intel-microcode package to the previous version using this instruction:

sudo apt-get install intel-microcode=3.20180312.0~ubuntu18.04.1

Then freeze the package to avoid accidental upgrade:

sudo su
echo "intel-microcode" hold | dpkg --set-selections

Maybe some similar solution can fix the issue on Ubuntu 16 I just didn't find the right package version to downgrade to.


This is the place to start, get your info, get your tests and do your certifications:
http://www.lpi.org/

Check this sites also: http://www.linuxcertified.com/

http://www.redhat.com/training/certifications/rhce/


You may have updated the Display Driver. Most of the time the driver that you updated caused the problem. Try using the one that came with the ubuntu distro.


How do I install Compiz extra animations?

The package contents have been moved to compiz-plugins and the dummy package was removed in 12.10.

This was the state in 12.04:

$ aptitude show compiz-fusion-plugins-extra
Package: compiz-fusion-plugins-extra
[...]
Depends: compiz-plugins-extra
Description: transitional dummy package.

 This package ensures a clean upgrade path, and can be safely removed after the
 upgrade.
Homepage: http://www.compiz.org/

$ aptitude show compiz-plugins-extra
Package: compiz-plugins-extra
[...]
Description: Collection of extra plugins from OpenCompositing for Compiz
 The OpenCompositing Project brings 3D desktop visual effects that improve
 usability of the X Window System and provide increased productivity.

 This package contains extra plugins and themes contributed by the community
 giving a rich desktop experience.
Homepage: http://www.compiz.org/

Note that compiz-plugins-extra now is a dummy package in 12.10, too.


This error appears to be a minor bug, your hardware vendor may have provided a bios update that may take care of it. In the mean time if you are not experiencing any resulting errors it can be ignored. Otherwise try adding either noioapic or nomodeset boot options.


Once you install a Ubuntu flavor (eg lubuntu) can you change the desktop environment?

Yes you can. But, while logging in, go to the top right (actually not exactly at the corner), and you will see a small icon to change the desktop environment you need to boot into. Click on it and choose the Unity desktop. (See the 4th icon from the top right in the image)  Mind you that installing another desktop is not very efficient and will cause issues like out of place icons, theme issues etc. although most of the things will work fine. So, if you are testing out Unity, its alright. But, if you want to continue with Unity, I suggest you install Ubuntu with Unity desktop again. Even if you do not, its okay. Things will run fine.


Updating Kernel destroyed display drivers. Reverting back didn't help

Each Nvidia proprietary driver supports some Linux kernels (up to some version). It is not guaranteed that they will build on newer ones.

Officially supported Nvidia drivers are located in Ubuntu repositories.

"Graphics Drivers" PPA is unofficial source of Nvidia drivers. Building on a specific HWE kernel is not guaranteed. Nothing is guaranteed at all when using PPA in general.

If you install unsupported driver, it is possible that it won't be quite easy to revert.

Having different HWE kernel versions for the same release complicates things a lot.

General recommendation is to use officially supported Nvidia drivers unless you have enough knowledge.


Google chrome does not show Nimbus Roman No9 L font

It appears to be using Times Roman for me. Perhaps I'm running a later version?

Here is a suggestion for tracking down the problem. Run chrome with the FC_DEBUG environment variable set. Then you can see what fonts it is using.

FC_DEBUG=1 google-chrome http://seedconference.com/seed.php > ~/Desktop/Out

saved all the fonts accessed into ~/Desktop/Out. I find

grep file: ~/Desktop/Out

useful for listing the fonts actually used.


Xbindkeys doesn't work properly with keys

Try xdotool instead of xte if you want to type a capital s (S):

"xdotool key S"
 m:0x15 + c:37 m:0x11 + c:50 m:0x10 + c:55

But it also depends on your caps lock state or if you're holding down the shift key, for example if your caps lock is on it will type a non capital s, to solve this you can use --clearmodifiers for any command.
e.g.:

"xdotool key --clearmodifiers S"

For clarification, keydown will press and hold a key, be sure to use keyup after using keydown for your other binds.

For example "xte 'keydown s' 'keyup s'" will have the same results as "xte 'key s'".


Can I Copy & Serve a website locally on the network?

Sure you can.

Step 1) Get the full site using wget ( see http://www.sonyjose.in/blog/?p=136 ).

2 ) Install and run a webserver like Apache ( https://help.ubuntu.com/10.04/serverguide/C/httpd.html )

3) Put the files downloaded from step 1 in /var/www

4) Ask your friend to access the site from your IP address through a browser. To get the IP address, use the connection information option in your network manager ( top right of your screen ) or use the command ifconfig


Ubuntu One and 'Something has gone wrong'

Can you check if your computer is connected to Ubuntu One? You can see this on the terminal by running:

u1sdtool --status

That should show online and connected as true. If you're connected and you're still getting an error when trying to log into the Ubuntu One site or your computer is not connected, then your best bet is to submit a support request at https://one.ubuntu.com/support/contact You don't need to be logged in to send the request.


How to convert multiple ISO8859-1 to UTF-8

iconv defaults to sending its output to stdout, which explains the behaviour of what you saw.  You can direct the output to a file using the -o option, but that will only generate a single output file, and probably won't help you update the files in place.  Perhaps try something like this:

for file in *.sql; do
    iconv -f ISO-8859-1 -t UTF-8 -o "$file".utf "$file" && mv "$file".utf "$file"
done

That will convert each file and store the result in a temporary file, moving it to the original file name if the conversion was successful.


How to know the progress of sfill free space wiping process?

zerofree and sfill

I think it enough for all the needs of ordinary people to overwrite once (and with zeros). You can do it with zerofree

sudo apt install zerofree

sudo zerofree /dev/sdxn

where x is the device letter and n is the partition number (for media devices probably sdb1).

Running sfill with 'wipe mode is secure (38 special passes)' needs 38 times longer time and will wear the drive 38 times more. Moreover is probably a waste of time.

You can use options to make it faster and (maybe) less secure. If I understand the manual correctly, sfill should work like zerofree when using the following options (but I have not tested).

sudo sfill -llz /path-to-mountpoint

or maybe they must be separate

sudo sfill -l -l -z /path-to-mountpoint

but you might as well let it write random data once

sudo sfill -l -l /path-to-mountpoint

I don't know if zerofree or sfill is more efficient (faster), when doing the same thing. (I need not guess here, but if you know, please edit this answer.)

According to the comment by @bodhi.zazen

  Data can not be recovered if it is overwritten more than once

so the following command with sfill might be a good option (it overwrites twice),

sudo sfill -l /path-to-mountpoint

man sfill describes the option -l:

  -l lessens the security. Only two passes are written: one mode with 0xff and a final mode with random values.

Low level wiping

If you really need this high level of security, it is better to backup or clone the data to another drive and wipe the drive with a special tool, that works on a lower level, for example hdparm or DBAN. It will be much more efficient (much faster).

It is possible to use re-linking between logical addresses and physical memory cells with hdparm. This is a kind of encryption rather than overwriting the whole memory and very efficient. I think the following link can help you use that method,

Re: best way to wipe a drive - with hdparm

After the low level wiping you can either restore the file data to the wiped drive or simply use it on the other drive (if cloned with Clonezilla, which clones used data blocks and skips free blocks).

How to know the progress or at least that something is happening

There is an option for verbose mode, -v. I see that you have already used it. I don't know any other way to make sfill tell you more, and it does not look like you get a progress view.

But if you want to know if the process is still doing something, you can try with iotop

sudo apt install iotop

sudo iotop -o


Ubuntu 18.04 HDMI output not recognized with Nvidia hybrid

There is a package called mate-optimus that I use to make sure that my nvidia card is active. The problem for me, is that the nvidia card is not active by default and I have to explicitly turn it on.

Previously I was using nvidia-xrun to launch a full gnome session, but since I discovered the mate-optimus, I just use the little icon that it puts in the status bar to switch on the nvidia graphics which activates my hdmi.

Its in most repos I think, but more info is here: https://github.com/ubuntu-mate/mate-optimus


How to change windows without going full circle?

I had the same problem. Here's what to do, install CCSM:

sudo apt-get install compizconfig-settings-manager

And under Window Management, mark the option 'Static Application Switcher'.

Now you can go forward [alt]+[tab] or backward [alt]+[shift]+[tab] in your open applications.


Why unattended-upgrades upgraded so few packages, seemingly?

Most of the answer is in your unattended-upgrades logfile, located at /var/log/unattended-upgrades/unattended-upgrades.log

Here's an example:

2018-01-08 06:17:51,770 INFO Starting unattended upgrades script
2018-01-08 06:17:51,771 INFO Allowed origins are: ['o=Ubuntu,a=xenial-security']
2018-01-08 06:18:07,765 INFO No packages found that can be upgraded unattended and no pending auto-removals

Take a look at that middle line 'Allowed origins'. That means Software Repositories. The only source there is -security. Not -upgrades, not -backports, no PPAs, no third-party repos.

In other words, this example unattended-upgrades is only providing security upgrades. Nothing else.

You can add, remove, or edit Allowed Origins (repositories) through the Software and Updates Control Panel, or by editing the unattended-upgrades config file, located at /etc/apt/apt.conf.d/50unattended-upgrades.

The rest of the answer is that Xenial (16.04) is two years old. Fewer new security updates for old software.


Can I change the /home folder after ubuntu installation?

Check out the howto: https://help.ubuntu.com/community/Partitioning/Home/Moving

The basic steps are as follows:

Setup your new partition.
Backup and edit your fstab file (/etc/fstab) to mount the new partition as /media/home (just for the time being) and reboot.
Use rsync to migrate all data from /home into /media/home.
Edit fstab again so the new partition mounts as /home instead of /media/home but not reboot just yet.
Move /home to /old_home and reboot.
Delete /old_home.


How to upgrade from VMware Workstation 6 to 10?

The best way to do it, is by downloading the latest VMWare.

Once downloaded, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, navigate to where the file was downloaded(probably the Downloads folder), and run the command(s) below:

For 32bit:

sudo apt-get install open-vm-tools open-vm-tools-dev open-vm-dkms open-vm-toolbox gcc build-essential
sudo chmod +x ./VMware-Workstation-Full-10.0.1-1379776.i386.bundle
sudo ./VMware-Workstation-Full-10.0.1-1379776.i386.bundle

For 64bit:

sudo apt-get install open-vm-tools open-vm-tools-dev open-vm-dkms open-vm-toolbox gcc build-essential
sudo chmod +x ./VMware-Workstation-Full-10.0.1-1379776.x86_64.bundle
sudo ./VMware-Workstation-Full-10.0.1-1379776.x86_64.bundle

And just follow the installation screen to finish the install.


These scripts works for me, perhaps someone will find these useful.  There are only two scripts needed, as the script that calls the actual python script is unnecessary.

in /etc/pm/sleep.d/99_run_python.sh:

#!/bin/sh

# ensure that we have a working path
PATH=/sbin:/usr/sbin/:/bin:/usr/bin

# see which python is installed
if [ -x /usr/bin/python3 ]; then
    PYTHON=python3
else
    PYTHON=python
fi

case "${1}" in
    hibernate|suspend|thaw|resume)
        # call python to execute script, and pass some args to script
        $PYTHON /home/some_user_name/test/test_syslog.py /data/fan/quiet/$1/
        ;;
esac

test_syslog.py:

#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
import logging
import logging.handlers

def main():
    logging.basicConfig()
    logger = logging.getLogger(__name__)
    logger.setLevel(logging.DEBUG)

    handler = logging.handlers.SysLogHandler()
    formatter = logging.Formatter('%(module)s.%(funcName)s: %(message)s')
    handler.setFormatter(formatter)
    logger.addHandler(handler)

    logger.debug("Hello from python!")

    if len(sys.argv) == 2:
        logger.debug("got arg = {}".format(sys.argv[1]))
    else:
        logger.debug("got no args")

    logger.warning("Will now exit.")
    return 0

if __name__ == "__main__":
    import sys
    sys.exit(main())

I tested these script by running sudo pm-suspend.  I also noticed that when I use a suspend applet, the script doesn't always get called.  But running pm-suspend will always call the script.


L2TP/IPSec VPN connection on Ubuntu 17.10 - Connection failed: Activation of network connection failed

I assume you are using network-manager-l2tp-1.2.8 and network-manager-l2tp-gnome-1.2.8 packages that are available in the default Ubuntu 17.10 repository.

Have you tried stopping and disabling the system xl2tpd ? More details in the README.md file :

https://github.com/nm-l2tp/network-manager-l2tp#issue-with-not-stopping-system-xl2tpd-service

What is the output of running ike-scan.sh script against your university's VPN server? You can find more details on the following page:

https://github.com/nm-l2tp/network-manager-l2tp/wiki/Known-Issues#querying-vpn-server-for-its-supported-ipsec-ikev1-algorithms

After seeing the output of ike-scan.sh I can advise what the phase1 & phase2 algorithms should be.

Also from the README.md file, you could look at the journalctl --boot output to help with the debugging, alternatively after issuing the following, try performing a VPN connection, which will then result in debugging info going to the terminal  :

sudo killall -TERM nm-l2tp-service
sudo /usr/lib/NetworkManager/nm-l2tp-service --debug


Try to find and uninstall all your mysql package on computer

dpkg --get-selections | grep mysql

Then

sudo apt-get remove --purge mysql-server mysql-client mysql-common;
sudo apt-get autoremove;
sudo apt-get autoclean;
sudo rm -rf /var/lib/mysql/;
sudo rm -rf /etc/mysql/

After that try to install mariadb

sudo apt-get install mariadb-server mariadb-client;


You can downgrade your xserver-xorg to 1.16 in Ubuntu 14.04 by running

sudo apt-get install xserver-xorg-lts-utopic libqt5gui5 libgles1-mesa-lts-utopic libgles2-mesa-lts-utopic libgl1-mesa-glx-lts-utopic libgl1-mesa-glx-lts-utopic:i386 libglapi-mesa-lts-utopic:i386 libegl1-mesa-drivers-lts-utopic

You can check the version by dpkg -l | grep "ii  xserver-xorg-core"


Should I use Gparted or again dual boot system?

The best thing to do in response to the out of disk space message is to manage disk space better.

Find out what is taking space. This app may help.
https://apps.ubuntu.com/cat/applications/natty/baobab/

Clean out old or over-sized logs, old package files, and move your data around given that information.

Your options are:

erase files that you don't need
use cloud storage, a shared partition with windows or a usb sick for
data files
Resize including extra room for future use in Ubuntu
Create a new mount point and mount an additional partition, but this might require resizing windows anyway.
Add a new drive and migrate or install Ubuntu onto the new drive.


How do I remount a filesystem as read/write?

The correct syntax is:

sudo mount -o remount,rw /partition/identifier /mount/point

Where mount/point is /partition/identifier's corresponding mountpoint, as listed by the following command:

mount -v | grep "^/" | awk '{print "\nPartition identifier: " $1  "\n Mountpoint: "  $3}'

For example, say that the above command gives this:

Partition identifier: /dev/sda1
 Mountpoint: /

Partition identifier: /dev/sda2
 Mountpoint: /boot

Partition identifier: /dev/sda3
 Mountpoint: /test

The following would be the correct syntax. (We start by unmounting it, if it's already mounted.)

sudo umount /test
sudo umount /dev/sdb3
sudo mount -t hfsplus -o rw,remount -force /dev/sdb3 /media/untitled


IRSSI - The client of the future http://www.irssi.org/

sudo apt-get install irssi

Say no more


Why does sudo -H pip -V differ from pip -V?

pip 8.1.1 is the version of python-pip from the default Ubuntu 16.04 repositories. When installing a package with pip set the HOME environment variable to the home directory specified by the target user's password database entry by using the option -H.

In the question you linked to two different versions of pip were installed. To find out why pip -V returns a more up-to-date version of pip (pip 9.0.1) which is also installed, run the following commands:

sudo -H pip -V

This command returns pip 8.1.1 from /usr/lib/python2.7/dist-packages (python 2.7) in a default Ubuntu 16.04 installation. The command sudo -H pip3 -V returns pip 8.1.1 from /usr/lib/python3/dist-packages (python 3.5) in a default Ubuntu 16.04 installation.

which python3

This command returns /usr/bin/python3 in a default Ubuntu 16.04 installation.

which pip

This command returns /usr/bin/pip in a default Ubuntu 16.04 installation. The command which pip3 returns /usr/bin/pip3 in a default Ubuntu 16.04 installation.


Adobe never made a 64-bit Acrobat Reader for Linux.

For some time they built a 32-bit version of it, but stopped at 9.5.5.

New versions of Acrobat reader are not available for Linux.

Older versions can be found, but they have serious security issues.

As for "Has any movement been made to get a 64 bit reader?".

Yes, it has been made. They stopped supporting Linux at all.


The xubuntu-dev/xfce-4.12 doesn't seem to contain any packages for Ubuntu 14.04 yet (see https://launchpad.net/~xubuntu-dev/+archive/xfce-4.12), so I'm unsure whether you managed to actually upgrade xfce to the latest version? What does xfce4-about return after the dist-upgrade? If not, maybe using the 4.12 package that are meant for older Ubuntu distro's doesn't work as intended?


Programatically modify file associations using standard interface (cases where mimetype does not matter)

You were missing the use of xdg-mime on a specific file.
How can I see actual mime type?

Try
$ xdg-mime query filetype index.ts

or
$ mimetype index.ts

It seems file examines the contents of the file, while xdg-mime uses a combination of methods to determine the MIME type, including some times calls to file.
I didn't find so far a specification of the algortihm used by xdg-mime to decide on the MIME type, but this info is so far enough for your purpose, I guess.
Is text/vnd.qt.linguist a mimetype?

Yes.
Related:

Why the difference between the results with "file --mime-type" and "xdg-mime query filetype"?
What is the relationship between MIME types and File .extensions?
https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/10
https://unix.stackexchange.com/questions/565202/kde-is-not-saving-a-mime-type-file-association


High CPU usage on a linux system writing to an NTFS volume can come from a number of sources, as described on tuxera (the maintainer of ntfs-3g).  They make an optimized, comercialized version of an ntfs driver, but this isn't open-source, nor is it easily available.  If you're committed to NTFS, you're stuck with this less stream-lined ntfs-3g driver.

http://www.tuxera.com/community/ntfs-3g-faq/#highcpu

Assuming you are using a recent version of ubuntu, with a recent version of ntfs-3g, then options are programs frequently reading/writing big chunks of data to the drive, application frequently accessing the drive (such as rsync), the drive being connected via a slow usb connection (possibly the usb port speed slowed down by a slow device/hub being attached), VMWare using temp files on the ntfs drive, or the drive being excessively fragmented (lots of debate around this issue, many people saying the drive shouldn't get too fragmented for linux unless you are also booting an installation of windows off of that drive).  Read the above link for more information about these and more.

My solution was to go to my fstab and modify the mount line to include big_writes in the options (ie: defaults,big_writes ....).  This caused it to write big chunks, rather than smaller chunks.

Disabling samba access to the drive and shutting down python scripts accessing the drive didn't have any impact for me.


DNS leak test shows other Google ISPs when I use Google 8.8.8.8 and 8.8.4.4 nameservers

Yes, requests to Google's DNS are load-balanced across many servers. To cite from dnsleaktest.com

  Even if you have configured a single DNS server, there may be many other servers that the request is passed on to in order to be resolved (normally to load balance the requests). For example if you configure Google DNS then you will often find 6-10 Google DNS servers which are fulfilling the DNS requests.

dnsleaktest works by sending a bunch of DNS requests to your configured DNS servers and performs Whois lookups on the IP addresses that answer.


Found a similar case in Askubuntu.
The problem seems solved removing ubuntuone app application data in the phone and restarting the app.

follow the link to:

Can't log into Ubuntu One for Android

This solution solved my case.


Is there a way to learn which files in the installed system are changed/updated during a kernel update?

The kernel is made up of two main packages the linux-image-* and linux-headers-* packages.  A kernel is made up of the pair at the same version.  You can see all of your installed kernel with the command below, the latest kernel has the largest version number:

dpkg -l 'linux-image-*' 'linux-headers-*' | grep '^ii'

To see the pair associated with the current running kernel use the command below:

dpkg -l '*'`uname -r`

The files which make up a kernel package (or indeed any package) are listed using the dpkg -L command, something similar to the following:

dpkg -L linux-image-3.2.0-23-generic

Of course there are a few other files which get updated which are not contained within these packages, for example the initramfs for each kernel is generated after installation and the bootloader (typically grub) configuration is rebuilt to contain the new kernel.


Access advanced features and commands of GUI from rhythmbox-client?

Rhythmbox-client out-of-the box does not have all of the capability you are seeking.

Just for the record, rhythmbox-client supports the following command line options:

rhythmbox-client --help
Usage:
  rhythmbox-client [OPTION…]

Help Options:
  -h, --help                               Show help options

Application Options:
  --debug
  --no-start                               Don't start a new instance of Rhythmbox
  --quit                                   Quit Rhythmbox
  --check-running                          Check if Rhythmbox is already running
  --no-present                             Don't present an existing Rhythmbox window
  --next                                   Jump to next song
  --previous                               Jump to previous song
  --seek                                   Seek in current track
  --play                                   Resume playback if currently paused
  --pause                                  Pause playback if currently playing
  --play-pause                             Toggle play/pause mode
  --play-uri=URI to play                   Play a specified URI, importing it if necessary
  --enqueue                                Add specified tracks to the play queue
  --clear-queue                            Empty the play queue before adding new tracks
  --print-playing                          Print the title and artist of the playing song
  --print-playing-format                   Print formatted details of the song
  --select-source=Source to select         Select the source matching the specified URI
  --activate-source=Source to activate     Activate the source matching the specified URI
  --play-source=Source to play from        Play from the source matching the specified URI
  --set-volume                             Set the playback volume
  --volume-up                              Increase the playback volume
  --volume-down                            Decrease the playback volume
  --print-volume                           Print the current playback volume
  --set-rating                             Set the rating of the current song

rhythmbox-client uses a capability called dbus - made accessible when you have the "MPRIS D-Bus plugin" enabled.

You'll need to write an external application that utilises this interface.  A good starting point is this project:

https://github.com/AeonAxan/Rhythmbox-Remote

This is a python project - you run the python file with command-line parameters just like rhythmbox-client.  You'll need to extend the functionality to support what particularly you are interested in.


Ubuntu supported wireless cards: see this page
Ubuntu ndiswrapper documentation: see this page
3rd party blog post configuring a wireless adapter with ndiswrapper:
see this page

Those links are a good place to start. We'd need much more relevant info in order to help you with your wireless USB adaptor. I've configured many myself, some worked out of the box, some worked out of the box after updates, some worked after installing restricted drivers, some worked with ndiswrapper. Good luck!


Install db-util. There are several in Ubuntu Software Center (for example db5.3-util). The latest version via command line:

sudo apt-get install db-util

After installing all you need to do is:

db_dump addressbook.db

Description of an old version from USC:


External monitoring flickering with Dell XPS 13 9350 laptop

There are a few things that have helped me with this:

If your router has a 5GHz option, switch permanently to the 5GHz one.
If you can only do 2.4GHz, disable the switching of channel width between 20 and 40 MHz (force 20)
If you can, disable IPv6 for your connection.

For me, I had to buy a new router anyway, so I got one with 5GHz and switched to it, which has made most of the problem go away.


Nautilus Google Drive integration: Open Google Docs

I think things might well have changed in 18.04 as in 16.04 it was possible to drag and drop a file from nautilus into Chromium and edit it directly from there as outlined in this thread.

Something has changed between versions (has Chromium itself changed or the fact the google-drive is now automounted using google-drive-occamlfuse).

What I have to do now in 18.04 is open a new tab in Chromium and go to

https://docs.google.com/spreadsheets or
 https://docs.google.com/document

(as appropriate for the type of document you are trying to open) and provided you have set the document to be available offline, you can click on the document listed and open it and edit it in Chromium.

You may need first to install and enable google docs offline extension for this to work. This extension makes it possible to edit your documents, spreadsheets and presentations when you aren’t connected to the internet.


Installing any nvidia driver on a Nvidia Geforce 310M causes laptop to not boot

as per a comment on the question

  ok chowned my home and it's ok now. i am starting over. properly this time


.tar.gz is usually source code of that. So download it if you know what you are doing . Else simple download and install using .deb package


This is related to your Keyboard.
Go to Ubuntu Dash, and type "Keyboard"
Then When the Keyboard is open, Select the "Layout"
Now you will have to adjust the Keyboard/Language with regards to
your setup.
You will have to tweak in order to see which one works.

See Install Tweaks from this page:
https://help.ubuntu.com/stable/ubuntu-help/tips-specialchars.html.en
You may also find this post useful.


There are 2 parts to this:

Open a terminal and run ls /boot
If boot is full of old kernels you can go remove happy on them, I recommend keeping the original, the latest and the one before latest. the lowest number is normally the shipping kernel, the highest number will be the latest.
To grow boot you first need to shrink another partition so you have free space.  I would suggest using the gparted tool on the live cd to do this.  First decrease the size of/ or /home depending on your setup.  Then increase the size of boot.


You can find the HTML-files under /usr/share/doc/libgtk-3-doc/gtk3. A full list of all files coming with the package libgtk-3-doc you can obtain by executing this command:

dpkg -L libgtk-3-doc

on a virtual terminal or a terminal window.


Computer wouldn't detect WiFi Network - Ubuntu 16.04.1

(apt-get install --reinstall network-manager)
Should reinstall said program


ubuntu-12.04.3-desktop-amd64.iso installing using pendrive

There's a simple way to get round this.

Rename the file you downloaded to say Ubuntu-12.04 rather than Ubuntu 12.04.3

When your in the installer select "Ubuntu 12.04 64bit" and the iso should be selectable for you.

The reason why you cant select your file is a bad design by the creators of the tool. They use some form of regex to filter out files by name but do not consider the version after 12.04 - which causes they're filter to fail.


Python scripts flash and fail on doubleclick

I found the problem. The Python files contained Windows line endings ("\r\n") instead of Unix ones ("\n"). IPython was able to run them anyway but env was not, reading the shebang line as calling "python3\r". Changing the line endings to Unix style solved it. Many text editors have a command to do this, for example Geany has various options in Document / Set Line Endings.


The entry for dev-sda1.device and a couple of the other entries indicates the problem is the speed of your hard disk drive.

An SSD (solid-state drive) would significantly speed up boot.

Note that slowness in services like plymouth-quit-wait.service simply indicate that it's waiting for something else - in this case, flushes to disk.

If you are noticing it getting worse, it may be that your hard drive is filling up or you've installed more software, which can make boot a little slower, though replacing the hard drive would make the most improvement.


give permission to create inside of htdocs

sudo chmod 777 -R /opt/lampp/htdocs

or more details:

https://superuser.com/questions/268987/cant-create-any-folder-in-htdocs-on-ubuntu


How can I delete xfce4 if I deleted crouton?

The beauty of Chromebooks is that you can do a clean reset of the device if you did something wrong to it, and lose nothing.

But from what you have written, I think you are running Crouton rather than a full Linux install - which I would say from experience does not usually result in a very stable computer.

If you wish to use Ubuntu full time on your Chromebook, I recommend installing Ubuntu onto the hard-drive directly.


Problem with shell script to reboot computer/switch to windows

I'd change the script to read:

#!/bin/bash
if [ ! -f /tmp/reboot.txt ]
then
    echo "test" > /tmp/reboot.txt
    sync
    reboot
fi
exit 0

The sync will flush changes to the file system before the reboot.


What am I missing to automate my 18.04 install?

Ubuntu 18.04 desktop seems to be based on ubiquity installer instead of debian-installer. I'm currently also trying to create an automated install and I see two possible things on your installation:

You lack automated-ubiquity as a boot parameter. I assume auto-install/enable=true is a long version of auto=true
The entries of the preseed file start with d-i instead of ubiquity. It seems the ubiquity installer don't look for some d-i keys..

You can take a look at this question: How do I create a completely unattended install of Ubuntu Desktop 16.04.1 LTS?
But I have notice that on 18.04 desktop changes the prefix of the preseed keys from d-i to ubiquity.


How to define AutoKey shortcut which sends the same keystroke to the window with certain title

Install libnotify-bin which provides notify-send

sudo apt-get install libnotify-bin

Create new script:

import time
import subprocess

#no need
#keyboard.release_key("<ctrl>")

# wait_for_keypress does not return any thing to distinguish between target key pressed or timeout reached.
# So if time is less than the timeout then it was key press.
start_time = time.time()
keyboard.wait_for_keypress("1", timeOut=1)
if (time.time()-start_time < 0.9):
    time.sleep(0.2)
    window.activate("gnu screen")
    time.sleep(0.1)
    active_title = window.get_active_title()
    # if it doesn't get same title, then no window titled as gnu screen
    # it sends a notify message otherwise send the key sequence.
    if (active_title == "gnu screen"):
        keyboard.press_key("<ctrl>")
        keyboard.send_key("a")
        keyboard.release_key("<ctrl>")
        keyboard.send_key("1")
    else:
        subprocess.Popen(['notify-send', "Couldn't find destination window"])

Setup its hot key as: Ctrl+a

To trigger it: Ctrl+a then 1 (in <1sec)

Debug

Launch X Event Tester in separate terminal window

xev -event keyboard

Check it's window title, mine shows Event Tester

$ wmctrl -l
0x03000012 -1       N/A Desktop — Plasma
0x030000c1 -1       N/A Desktop — Plasma
0x0300001b -1       N/A Plasma
0x06a00098  0        PC User User - Ask Ubuntu - Mozilla Firefox
0x01a00067  0       N/A user : screen
0x01a000cd  0       N/A user : xev
0x04600001  0       N/A Event Tester
0x01e0015d  0        PC AutoKey

Modify script to target Event Tester window.

import time
import subprocess

start_time = time.time()
keyboard.wait_for_keypress("1", timeOut=1)
if (time.time()-start_time < 0.9):
    time.sleep(0.2)
    window.activate("Event Tester")
    time.sleep(0.1)
    keyboard.press_key("<ctrl>")
    keyboard.send_key("a")
    keyboard.release_key("<ctrl>")
    keyboard.send_key("1")

If xev receives the key sequence. Its output should be some thing similar to:

KeyPress event, serial 34, synthetic NO, window 0x4600001,
    root 0xb2, subw 0x0, time 55057700, (1053,140), root:(945,303),
    state 0x0, keycode 105 (keysym 0xffe4, Control_R), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyPress event, serial 34, synthetic YES, window 0x4600001,
    root 0xb2, subw 0x0, time 0, (1,1), root:(1,1),
    state 0x0, keycode 38 (keysym 0x61, a), same_screen YES,
    XLookupString gives 1 bytes: (61) "a"
    XmbLookupString gives 1 bytes: (61) "a"
    XFilterEvent returns: False

KeyRelease event, serial 35, synthetic YES, window 0x4600001,
    root 0xb2, subw 0x0, time 0, (1,1), root:(1,1),
    state 0x0, keycode 38 (keysym 0x61, a), same_screen YES,
    XLookupString gives 1 bytes: (61) "a"
    XFilterEvent returns: False

KeyRelease event, serial 35, synthetic NO, window 0x4600001,
    root 0xb2, subw 0x0, time 55057701, (1053,140), root:(945,303),
    state 0x4, keycode 105 (keysym 0xffe4, Control_R), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyPress event, serial 35, synthetic YES, window 0x4600001,
    root 0xb2, subw 0x0, time 0, (1,1), root:(1,1),
    state 0x0, keycode 10 (keysym 0x31, 1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 35, synthetic YES, window 0x4600001,
    root 0xb2, subw 0x0, time 0, (1,1), root:(1,1),
    state 0x0, keycode 10 (keysym 0x31, 1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

Note, I have removed the if condition to check active  title. The script activates/raises xev window but the check doesn't find the correct title. I got just the notification message.


No, it's a feature of the Unity desktop; you'll only see this integration when running that.  (Which is why it says 'Unity Webapps' all over that article you linked. ;)

I don't know what KDE or Kubuntu might do in the future, but the new webapp integration code, that I know of, is largely Unity-specific.  It's code to make the Unity Launcher, the Unity Dash, Unity's alt-tab switcher, Unity indicators and notifications, aware of web sites.  When you visit sites from that growing list, in Firefox or Chromium, those parts of Unity can treat that website like a first-class citizen of the desktop.

This kind of integration may take off, and be built into more desktops in the future, but what you're reading about for 12.10 -- no, that's just Unity.


I'm not clear if you want a command line type answer, but given that you said that there are different videos and framerates and you want to do simple edits, then I would use a good video editor such as OpenShot or KdenLive to amalgamate all the videos on one track and export as one video format.


As I know, Chrome uses PPAPI-based plugins ONLY now, while vlc-browser-plugin is NPAPI-based, so it's unavailable for Chrome. Just use another browser.


"You are missing the following 32-bit libraries, and Steam may not run: libc.so.6"

libc6.so.6 is in the package libc6-i386, so install that package too.

The libc6.so.6 you are missing is the 32 bit version from /lib32/libc6.so.6.  There is another 64 bit version in /lib/x86_64-linux-gnu/libc.so.6 but that's not the one you need for Steam.  After installing all the missing 32 bit libraries steam needs, you will still need the 32 bit loader, which is also in the libc6-i386 package.  Once the 32 bit loader is present, the ldd script run on your Steam executable will produce output listing the required libraries, and which are missing.
The 32 bit packages may be distinguished from the 64 bit versions by adding ":i386" to the package name when installing, e.g.:

sudo apt-get install libgl1-mesa-dri:i386

The libc6:i386 and the libc6-386 packages are probably the same. Some people suggest:

sudo dpkg --add-architecture i386
sudo apt-get update

commands, but I've never had to do that.


Installed TOR, looking to install/run TOR browser

the installation gonna be like this

$ sudo add-apt-repository ppa:webupd8team/tor-browser
$ sudo apt-get update
$ sudo apt-get install tor-browser

open the tor browser look for app named :  tor-browser


Laptop freezes when trying to install Ubuntu 18.04 LTS

Your Hp has Nvidia graphics card and you will need to enter nomodeset to the boot parameter to keep it from freezing until you can get the correct video driver for your card installed. Here is a page that shows you how to do that.


Can I run several distros on one install?

Yes and no.

If you want to have the netbook edition, ubuntu, kubuntu, xubuntu, lubuntu, and similar setups for different users, then yes.

Just install the *buntu-desktop of choice, then have the user choose which desktop environment they want to use on login. However if you want to have JoliCloud, Mint, etc, then no, you cannot do this (at least not without chanting and doing the rain dance).


Every Hour? Little paranoid much? :P But yes.

This provides a good resource if you want to backup files to external locations via the network or to external drives. If you meant backups of the entire disk I think hourly is probably a little much but you could probably do something similar with cron.

To improve the answer for posterity in case the link goes down:

"Cron can be used on Linux to automate the execution of commands, such as rsync. Using Cron, we can have our Linux system run nightly backups, or however often you would like them to run.

To edit the cron table file for the user you are logged in as, run:

$ crontab -e

You will need to be familiar with vi in order to edit this file. Type “I” for insert, and then begin editing the cron table file.

Cron uses the following syntax: minute of the hour, hour of the day, day of the month, month of the year, day of the week, command.

It can be a little confusing at first, so let me give you an example. The following command will run the rsync command every night at 10 PM:

0 22 * * * rsync -av --delete /Directory1/ /Directory2/

The first “0” specifies the minute of the hour, and “22” specifies 10 PM. Since we want this command to run daily, we will leave the rest of the fields with asterisks and then paste the rsync command.

After you are done configuring Cron, press escape, and then type “:wq” (without the quotes) and press enter. This will save your changes in vi.
"


Generally this is not possible, as programs tend to hardcode (put the path directly into the source code) the config directory path (exceptions exist, see the darent's answer).

For example:

I use stackapplet which informs me of status changes on my askubuntu account. In its code it says (config_store.py):

CONFIG_FILE_PATH = os.path.join(os.path.expanduser("~"),".stackapplet")

which sets the CONFIG_FILE_PATH to ~/.stackapplet. I would have to change the source code manually to override this.

Another example: wireshark

homedir = getenv("HOME");
if (homedir == NULL) {
    pwd = getpwuid(getuid());
    if (pwd != NULL) {
        homedir = g_strdup(pwd->pw_dir);
    } else
        homedir = "/tmp";
}
persconffile_dir = g_strdup_printf("%s" G_DIR_SEPARATOR_S "%s", homedir, PF_DIR);

This gets the home directory path either from the HOME environment variable, or from the /etc/passwd entry for the current user, or it sets it to /tmp if all fails.

Different programs get the HOME path in different ways, you just can't change all the "home" references to /home/user/.config.


For Ubuntu, try dvdisaster for data cd's and dvd's. Really good if you like graphical tools. It's tricky to use with commercial movie dvd's, though. You'll have to open the dvd in Totem once first to "authenticate" the drive. After that, it works well.

You also have ddrescue for the terminal.

I have used both, and they are good.

Once you have the file on your hard drive you can try "uncompressing" it, or mounting it. If it's too damaged, I resort to foremost or testdisk to get all possible files out of the dumped image of the disk.
Here is a quick link:
http://www.ubuntugeek.com/recover-deleted-files-with-foremostscalpel-in-ubuntu.html

Not sure about music cd's, though. Look for a cd-ripper that uses cdparanoia. I haven't needed to do that in a long time. A quick search shows abcde, ripperx, and more.


Steam opens Civ V in a window instead of in full screen (Ubuntu 20.10)

Changing this completely to a more dirty solution:

Go to /home/USER/.local/share/Aspyr
Make sure com.aspyr.civ5xp.json has:"DisplayFullScreen" : true
Go to subfolder “Sid Meier's Civilization 5”
Edit GraphicsSettingsDX9.ini for:

FSResID = 6
WindowResX = 1920
WindowResY = 1080


How to set display scaling to 200% for i3 desktop environment

Edit the ~/.Xresources file with this:
Xft.dpi: 192

! These might also be useful depending on your monitor and personal preference:
Xft.autohint: 0
Xft.lcdfilter:  lcddefault
Xft.hintstyle:  hintfull
Xft.hinting: 1
Xft.antialias: 1
Xft.rgba: rgb

Then in the ~/.xinitrc file, append xrdb -merge ~/.Xresources.
Source : https://wiki.archlinux.org/index.php/HiDPI#X_Resources


Ubuntu 19.04: can't update because `libcupsfilters1` is not configured

Since the other errors talk about a package (libcupsfilters1) being unconfigured, let's configure it:

sudo dpkg --configure libcupsfilters1

In this case, that output gives us the answer:

dpkg: error processing package libcupsfilters1:amd64 (--configure):
package is in a very bad inconsistent state; you should
reinstall it before attempting configuration

It's easy to reinstall a package using apt:

sudo apt install --reinstall libcupsfilters1


How to merge multiple (more than two) videos on Ubuntu?

I am using mkvmerge to join multiple MP4 files into single one:

mkvmerge -o outfile.mkv infile_01.mp4 \+ infile_02.mp4 \+ infile_03.mp4


Can I use the Unity launcher icon to minimize applications/windows?

For 14.04 & 14.10:

An unsupported capability was added to Unity for Trusty.  Unsupported means that Canonical do not guarantee this capability moving forwards towards Unity 8.
However, from a LTS point-of-view this gives those users at least 5 years with just this capability.  This is not directly available through the standard GUI.
For a safe way, reach for a terminal and copy & paste the following:
gsettings set org.compiz.unityshell:/org/compiz/profiles/unity/plugins/unityshell/ launcher-minimize-window true

To undo this change:
gsettings set org.compiz.unityshell:/org/compiz/profiles/unity/plugins/unityshell/ launcher-minimize-window false

For an unsafe method, you can use compizconfig-settings-manager :

Launch the application and click on Ubuntu Unity Plugin:

Switch to the Launcher tab and put the checkmark beside Minimize Single Window Applications (Unsupported) to enable this feature.


The idea of answering myself isn't appealing, but I'm writing this for the sake of others who viewed this question hoping they'd get an answer.

After googling, I found some interesting pages discussing the topic ..

RootFS and this
SquashFS and this
Initramfs and this , and the old initrd
the mysterious isolinux

And for Live CDs specifically ..

Linux Live CDs and this
Linux Live CD Customization


Copy files over network while creating these files

The best way would have been to have the process that is creating the file also create the remote file at the same time. Either by writing directly to the remote location or by using something like tee to both pipe data to, for example, an ssh connection and to a local file. That should have been done when you started the process though.

Since the file is already being created, yes, you can use rsync for it. By default, rsync only copies the updated data so if you just run rsync every few minutes, you will get what you want. You could use a brute force approach:

while :; do rsync -u source destination; sleep 20; done

That will run in an endless loop, copying source to destination only if source is different. Once the process that is creating the file has finished, you can stop it with Ctrl+C.

A more elegant way would be to monitor the file. If it is being created on machineA and copied to machineB, you could do this from machineB (this assumes you have passwordless ssh set up):

while [[ $(ssh machineA md5sum < /path/to/file) != $(md5sum < /path/to/file) ]] do
    rsync -uv aa b
    sleep 20
done

Note that this will stop the first time the two files are the same. If you file creation process doesn't write for more than 20 seconds and then resumes, you will have to copy again manually.


Installing Ubuntu 15.04 on mac book pro Yosemite

I actually solved the problem
All you have to do is go to disk utility on ur mac and creat a partition and u can make what ever ext4,Ntfs and then when u get to the window where it says install as a third party DO NOT check the box and continue
Its gonna show the the new partition u created and now u can format ot to ext4 with "/" as in extension and u can also creat a "swap" space which will give u extra space for memory in case ur RAM is all occupied
And that will be NOT a Primary  partition but logical and then u can install ubuntu on it
U have search how to make ubuntu bootable on you tube u will find it


Ubuntu 17.10 Elantech touchpad jerky and sluggish with phantom click events

Some RedHat folks have been working this here:  https://bugzilla.redhat.com/show_bug.cgi?id=1543769

Apparently the fix is in kernel-4.17.0-0.rc4.  There are builds that can be tested for redhat at https://koji.fedoraproject.org/koji/buildinfo?buildID=1080723, but I don't know of an Ubuntu build at this time.


My computer set my external hard disk as read-only after I upgraded it to 11.10

I had a similar problem...

I had ntfs-3g installed. In my case Ubuntu removed it? of course i am assuming you have an NTFS EXT-HDD

please copy/paste this into gnome-terminal to install ntfs-3g:

 sudo apt-get install ntfs-3g

Or via the Ubuntu Software Center. Just search for ntfs-3g


Window resizing problems like this are pretty much solved in the 1.x client (currently in beta for Linux, see the Spotify community forums for a link).


Can i update ubuntu 13.10 from iso file in ubuntu itself?

Yes of course! You can do this.
Follow these steps

Create a LiveCD or Live USB as you would normally do.
Start the installation from the media created.
At the installation type screen in the installer, select "Upgrade from Ubuntu 13.04"

This will upgrade Ubuntu to 13.10 preserving programs and your files. Backup is still recommended.


Multiple selections can be achieved via clicking on a file and using Shift +  Arrow Up (or Arrow Down).

As shown in Select multiple non-consecutive files in Nautilus using only the keyboard  , it is possible to make non-consecutive selection via holding Ctrl , press Space once , and use mouse to select multiple files. Note: this is only active while you hold Ctrl. Once you let go, non-consecutive selection becomes inactive.

Non-consecutive selection can be used with both list and icon view. Below is example with icon view


Asus K52J has NVIDIA graphics and they sometimes have trouble in linux. Ubuntu 12.10 no longer comes with Unity 2D and instead relies on LLVMpipe, which is an OpenGL rasterizer that uses your CPU to render the Unity interface. This would explain the high CPU usage.

Try installing x-swat drivers to fix the problem.

sudo apt-add-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get install nvidia-current


For installing directadmin, is ubnutu server needed?

Ubuntu Server is just a set of default packages to be installed using a text-based installer, it's not another OS. The most important difference here is a more tweaked kernel for servers, while the Ubuntu desktop flavour comes with a kernel tweakers for desktop usage. The whole user space is exactly the same, the availability of packages is the same, etc.

So, in short, yes, provided the software runs on the Ubuntu release, it will just work independently of whether you have installed Ubuntu from the desktop installation or the server installation. This applies to any application you want to run in Ubuntu.


Did reinstalling pulseaudio restore the files to /etc/pulse? The next step would be to check if pulseaudio is running.

pulseaudio --check
echo $?

0 = running

Or try: ps -ef | grep pulse

The default configuration is for pulseaudio to try to restart itself whenever it quits but it could be running into errors when starting.

This might be helpful: How can I restart pulseaudio without logout?


If two columns partially match, replace third with awk

An awk approach:

$ awk 'NR==FNR{a[$1]=$2; next} {split($1,b,/:/); $7=a[b[2]]}1;' b.txt a.txt
chr:1:10539:A:C 10539 C A 0.545987 0.508902 4972 0.36065 + 1
chr:2:13494:A:G 13494 A G 0.330493 0.0264746 4972 0.733423 + 1
chr:7:13494:A:G 13494 A G 0.330493 0.0264746 4970 0.733423 + 1

Explanation

NR==FNR{a[$1]=$2; next} : NR is the line number of the current input line and FNR is the current line number of the current file. The two will only be equal while reading the 1st file. Therefore, this will save the information from b.txt in the array a whose indices are the chromosomes from b.txt and whose values are the associated numbers. The next skips to the next line and ensures that the second block is not run for b.txt.
split($1,b,/:/); $7=a[b[2]] : this will only be run for a.txt. First, it splits the 1st field on : into the array b. So the 2nd element of b will be the chromosome. Then, it sets the 7th field of the file to be whatever was stored in the array a for the chromosome stored in b[2] (this is what a[b[2]] means: a[  b[2]  ]).
1;: this is awk shorthand for "print this line".


Need to add something permanently to my PATH

The relevant lines

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
    PATH="$HOME/.local/bin:$PATH"
fi

in the file ~/.profile should already exist. Just run the command

source "$HOME/.profile"

and you're done. You'll have to do that only once since you just installed HaskellToolStack and the folder ~/.local/bin didn't exist before.

You can check with

echo $PATH

if /home/kester/.local/bin is added to your PATH now.


Can I set up Thunderbird such that emails are automatically grouped by the senders I prescribe?

That is what the "Message Filters" function is designed to do. "Tools" - "Message Filters" allows you to set up filters that automatically can act on incoming messages, but that you also can run on messages that are already stored. It would be a matter of creating the desired folder structure, then have filters automatically move messages to one of these folders based on the sender.


How do I install the latest Unity3D beta?

I was able to follow the instructions given further up the page:

Make the installer writeable: chmod +x UnitySetup-2017.3.0f1
Run it: ./UnitySetup-2017.3.0f1 --unattended --install-location=(path)


Information about SATA, IDE (PATA) controllers

I can only link you to one of my answers on Which hard disk is which.

Basically what you are looking for is hwinfo --disk and hwinfo --storage-ctrl.


Can Ubuntu launcher damage my LCD screen pixels?

Yes, it's called LCD screen image persistence.  The Good news appears to be that unlike plasma screen and phosphor screen burn-in, persistence is generally reversible.

It's caused by the the liquid crystals that are in a turned on state for very long periods of time not "relaxing" completely back to the non-activated state.  There's two main approaches to reversing the problem:

Solution 1

Turn the screen off and do not use it for an extended period of time.  This may vary from a few days to a few weeks, depending on the nature of the liquid crystals and how bad the problem is.

Solution 2

Set up a screen saver that is one white image that covers the entire screen.  Set the screen saver to activate in a short amount of time, say one or two minutes.  Set the screen to turn off after about 15 minutes of inactivity.  This way, when the computer is idle it will display the white screen for less than 15 minutes, then go blank.  After a period of this you should see the problem lessen and eventually go away.  When the problem is fixed you can go back to a normal screen saver, or simply do as I do and set the screen to turn off after a reasonable amount of time.

The last solution (2) is one that seems to be suggested a lot, however I believe that the first solution is most likely to reverse the problem completely and in the shortest possible time.


Upgrade to 12.04 LTS failed, unable to boot

Use usb live Ubuntu to live boot to computer. You can use Unetbootin on windows or on Ubuntu using Startup Disk Creator

How to Create a Bootable Linux USB Drive on Windows

Boot live Usb in computer where you want to get files from- Try Ubuntu before you install it

In booted live usb Ubuntu open file manager and you will see the hard drive of computer. Open home folder and get files.

Add external drive to computer to witch to copy files you need.

Can you get all files like this? Was this helpful?


How to install Ubuntu in a way that doesn't affect the boot proccess?

You could install Ubuntu without overwriting the MBR, and then boot it using SuperGrub2 USB. That said, taking in consideration the other users, that route might prove an Indiana Jones kind of adventure for you. Dealing with partitions and installing OSs is never bulletproof, things can go wrong in many ways.

I'd recommend a VirtualBox route instead, you don't have to modify partitions, deal with bootloaders or burn CDs/USBs. If something goes wrong, just delete the VM.


ripping a dvd into an iso image using k9 but getting no sound

Ripping typically means some kind of re-encoding the data to some other format while in your case it appears you simply want to dump the disc to an ISO image. Just in case the original dvd might have some kind of protection, I'd recommend using dvddecryper to create the iso. It is a windows app which works fine under wine and will typically be able to handle protected discs.


After upgrading to 16.04 from 14.04, php7 installation fails

Sorry for inconvenience,

NOTE: i used php7 in 14.04 and removed it and install php5 again. and now i want t install php7 again.

To solve this:

Remove php7.0-fpm: sudo apt-get remove php7.0-fpm
Purge it: sudo apt-get purge php7.0-fpm
Manually remove /etc/php/7.0/fpm directory: sudo rm -rf /etc/php/7.0/fpm/
Install php7.0-fpm again: sudo apt-get install php7.0-fpm


Find out the full path of the program that runs when I enter a command

If all you want to know is the command location
If you want to know what directory the top level command is stored in you have a number of options:
$ which uname
/bin/uname

$ type -a uname
uname is /bin/uname

$ locate uname
/bin/uname
    (... SNIP dozens of Windows files on C & D ...)
/usr/lib/klibc/bin/uname
/usr/lib/plainbox-provider-resource-generic/bin/uname_resource
/usr/share/man/man1/uname.1.gz
/usr/share/man/man2/oldolduname.2.gz
/usr/share/man/man2/olduname.2.gz
/usr/share/man/man2/uname.2.gz

The last option locate returns all files containing uname not just the program that is run from the command prompt.
strace - trace system calls and interrupts
You don't need the pid of commands called in order to find the names of various commands that are called by a function. With strace all the command names are displayed directly.
For your uname -n example the output is:
$ strace uname -n
execve("/bin/uname", ["uname", "-n"], [/* 62 vars */]) = 0
brk(NULL)                               = 0x2356000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=109073, ...}) = 0
mmap(NULL, 109073, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ff2f9a9f000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\t\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1868984, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff2f9a9e000
mmap(NULL, 3971488, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff2f94cb000
mprotect(0x7ff2f968b000, 2097152, PROT_NONE) = 0
mmap(0x7ff2f988b000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1c0000) = 0x7ff2f988b000
mmap(0x7ff2f9891000, 14752, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ff2f9891000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff2f9a9d000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff2f9a9c000
arch_prctl(ARCH_SET_FS, 0x7ff2f9a9d700) = 0
mprotect(0x7ff2f988b000, 16384, PROT_READ) = 0
mprotect(0x606000, 4096, PROT_READ)     = 0
mprotect(0x7ff2f9aba000, 4096, PROT_READ) = 0
munmap(0x7ff2f9a9f000, 109073)          = 0
brk(NULL)                               = 0x2356000
brk(0x2377000)                          = 0x2377000
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=10219008, ...}) = 0
mmap(NULL, 10219008, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ff2f8b0c000
close(3)                                = 0
uname({sysname="Linux", nodename="alien", ...}) = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0
write(1, "alien\n", 6alien
)                  = 6
close(1)                                = 0
close(2)                                = 0
exit_group(0)                           = ?
+++ exited with 0 +++

For more information refer to man strace:
STRACE(1)                           General Commands Manual                           STRACE(1)

NAME
       strace - trace system calls and signals

SYNOPSIS
       strace  [-CdffhikqrtttTvVxxy]  [-In] [-bexecve] [-eexpr]...  [-acolumn] [-ofile] [-sstr‐
       size] [-Ppath]... -ppid... / [-D] [-Evar[=val]]... [-uusername] command [args]

       strace -c[df] [-In] [-bexecve] [-eexpr]...   [-Ooverhead]  [-Ssortby]  -ppid...  /  [-D]
       [-Evar[=val]]... [-uusername] command [args]

DESCRIPTION
       In  the  simplest  case strace runs the specified command until it exits.  It intercepts
       and records the system calls which are called by a process and  the  signals  which  are
       received by a process.  The name of each system call, its arguments and its return value
       are printed on standard error or to the file specified with the -o option.

       strace is a useful diagnostic, instructional, and debugging  tool.   System  administra‐
       tors,  diagnosticians  and trouble-shooters will find it invaluable for solving problems
       with programs for which the source is not readily available since they do not need to be
       recompiled  in  order to trace them.  Students, hackers and the overly-curious will find
       that a great deal can be learned about a system and its system  calls  by  tracing  even
       ordinary  programs.   And  programmers will find that since system calls and signals are
       events that happen at the user/kernel interface, a close examination of this boundary is
       very  useful  for  bug  isolation, sanity checking and attempting to capture race condi‐
       tions.

Above is just the beginning of manpage for strace


You typed the wrong command to install the application.  You used an uppercase I when it should have been a lower case i.  Unlike Windows, the case of the letters in a command makes a difference.

Run this to install the package:

$ sudo dpkg -i google-chrome-stable_current_amd64.deb

Just change your Uppercase I to the lowercase i in the command you typed and you'll be all set.

By the way, the difference between the lower case and the uppercase i is:

-i (lowercase) Install the package
-I (uppercase) Show information about the package.

For other details see:

$ man dpkg


There's an app called Live Wallpaper.You can choose between the following live wallpapers:
  * Circles
  * Galaxy
  * Nexus
  * Noise
  * Photoslide
Additional live wallpapers can be added as plugins. Also, make sure to install the package livewallpaper-config (settings application).


Thee is no (good) reason ever for pictures to be executable.

Just run this command to fix them:

find /space/music -name "*.jpg" -exec chmod -x {} +

Bonus:

find /space/music -type d -exec chmod o-w {} +

Explanation:

Most of the command line is self-explanatory. The only part that need some insight is the ending. {} is replaced by the name of the files (resp directory) found that match the filter. Usually, the find command is ended with a protected semicolon \;.

However, this isn't efficient as the command is run once for each file/directory.

There is a well known workaround that pipes find output to xargs which concatenates the file names up to the maximum command line allowed but then there is an issue when the path contains spaces, which is more and more common even in the Unix/Linux world.

Again a workaround based on GNU specific extensions allows to properly handle these case. I choose a simpler approach using a POSIX (read portable) way to have find building itself the long command lines, i.e. {} is replaced by a suite of file names up to the maximum number allowed.


To execute a script at shutdown or reboot:

save your script in /etc/rc6.d
Make it executable: sudo chmod +x K99_script

Notes:

The script in rc6.d must be with no .sh extension
The name of your script must begin with K99 to run at the right time.
The scripts in this directory are executed in alphabetical order.

source


Assuming that all video files match the pattern *Exx*.mp4 and all subtitle files match *Exx*.srt where xx is the same two-digit decimal number, you can use the following shell script to rename your files:

#!/bin/bash
shopt -s nullglob

printf '%s\n' *.mp4 |
sed -nre 's/^.*E([0-9]{2}).*$/\1 &/p' |
while read -r episode video; do
  for subtitle in *"E${episode}"*.srt; do
    dst="${video%.*}.${subtitle##*.}"
    if [ "$dst" != "$subtitle" ]; then
      mv -viT -- "$subtitle" "$dst"
    fi
  done
done

I added the interactive witch (-i) to the mv command in case there are multiple subtitle file with the same episode number in the name or a file of the same name exists already. It's also idempotent, meaning that running it multiple times doesn't change the outcome, so you can abort the script any time, investigate something and re-run it again later.

You can test it with some empty files created in a temporary directory:

mkdir /tmp/scratch
cd /tmp/scratch
touch 'AE01 Video.mp4' 'Sub E01.srt'


E: The repository 'file:/var/nv-tensorrt-repo-cuda10.2-trt7.0.0.11-ga-20191216 Release' does not have a Release file

My bad I again had to install sudo dpkg -i nv-tensorrt-repo-ubuntu1804-cuda10.2-trt7.0.0.11-ga-20191216_1-1_amd64.deb

then purge the package with sudo dpkg -P nv-tensorrt-repo-ubuntu1804-cuda10.2-trt7.0.0.11-ga-20191216

Worked just fine


GDM fails to launch xfwm4, but lightdm succeeds?

This might not completely answer your question, but might offer a quick-fix.
I also have this problem, using Xubuntu 14.10 so something has broken recently...

I find that the mouse is still responsive (in part) so you are able to RMB the desktop and open a terminal.

xfwm4 --replace

Should do the trick.


The information in the link is specific to vi/vim regex and is not directly applicable to grep.
Probably the equivalent in grep is to use perl compatible regular expressions (PCRE), with the s modifier that tells the regex engine to include newline in the . "any character" set (normally, . means any character except newline).
So for example with pcregrep using the Multiline flag:
$ pcregrep -Mo '(?s)elements = {.*?}' yourexample
elements = { 192.168.1.102, 192.168.1.119,
                 192.168.1.133, 192.168.1.134 }

You can force something similar in regular GNU grep by using the -z flag as a proxy for -M:
grep -zPo '(?s)elements = {.*?}'

If you want to format the matched text as well, I'd switch to perl proper ex.
$ perl -00nE 'say $1 =~ s/\n\s*/ /r if m/elements = {(.*?)}/s' yourdata
 192.168.1.102, 192.168.1.119, 192.168.1.133, 192.168.1.134


php5-mcrypt (MCrypt module for php5) has been updated to php7.0-mcrypt (libmcrypt module for PHP) in Ubuntu 16.04, 16.10 and 17.04. The command sudo apt-get install lamp-server^ in Ubuntu 16.04 searches the package list files for all Task: fields and gets all with lamp-server, among them is php7.0. Then it installs those packages the standard way with sudo apt-get install package1 package2...

In Ubuntu 16.04 open the terminal and type:

sudo apt-get install php7.0-mcrypt

In Ubuntu 17.10 and 18.04 php5-mcrypt has been updated to php7.1-mcrypt.


Can't install the latest version of NodeJs despite update prior to the attempt

Use the NodeJS guide for installing the 10.x repo.  These instructions are roughly copied here below:

  Node.js is available from the NodeSource Debian and Ubuntu binary
  distributions repository (formerly Chris Lea's Launchpad PPA).
  Support for this repository, along with its scripts, can be found on
  GitHub at nodesource/distributions.

  NOTE: If you are using Ubuntu Precise or Debian Wheezy, you might want to read about running Node.js >= 6.x on older distros.

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs

  Alternatively, for Node.js 10:

curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs

  Optional: install build tools

  To compile and install native addons from npm you may also need to
  install build tools:

sudo apt-get install -y build-essential

  Available architectures:

  i386 (32-bit)
  amd64 (64-bit)
  armhf (ARM 32-bit hard-float, ARMv7 and up: arm-linux-gnueabihf)

  Supported Ubuntu versions:

  Ubuntu 14.04 LTS (Trusty Tahr)
  Ubuntu 16.04 LTS (Xenial Xerus)


To encrypt a zip file after it has been created, you can use zipcloak

The syntax is:

zipcloak foo.zip

You will be prompted to give the password for the zip file called foo.zip

You can zip a file(s) in creating a zip file using the -e parameter i.e.

zip -e foo.zip file1


Trouble adding IPv6 static route in netplan

In the quoted yaml, you are missing a colon after the interface name.


As @oldfred pointed out, there is an issue with the case. Thank you for pointing that out. Being the same brand and (apparent) model, I did not look into it so much but yes, I tested the faulty case with a 3TB I borrowed and the same happened, i.e. 2 less TB were available = 800GB instead of the 3.

I then tried my disk on an old computer at a friend's and was able to get the whole partition of 4TB.

So thank you again.


unable to view existing data of my windows D partition which is now ubuntu host partition

your windows D partition mounted on /host

to access it open nautilus, on the sidebar click Filesystem and now you can see the  host folder that's your windows D partition


How do I move /boot to a separate partition on UEFI system with current boot on btrfs?

I managed to do it using Boot-repair from a LiveUSB.

Before start I recommend to create a snapshot of @ subvolume in case something goes wrong.

Shrink / partition to leave 1-2 GB free with gparted
Create ext2 partition.
Mount the / partition to /mnt
Mount the new ext2 partition to /media
Run cp -a /mnt/@/boot/* /media
Edit /mnt/@/etc/fstab and add there mount of the new ext2 partition to /boot.
Delete old boot from / by sudo rm -r /mnt/@/boot
Run sudo umount /mnt && sudo umount /media
Run boot-repair and do a default check.

All should work, and grub timeout is OK now.


Can't log into Skype: complains of the existence of another instance when there isn't one

You can try deleting your ~/.Skype folder (remember to backup first). This usually fixes any problems of this kind.

According to sixones:

  Rather than wiping the entire folder, you can close Skype and delete these files; ~/.Skype/shared.lck, ~/.Skype/username/*.lock, ~/.Skype/username/*-journal. Deleting them all clears out the lock and keeps your chat history and preferences.

You can do this by running the following command in a terminal:

rm ~/.Skype/your-username-here/shared.lck, ~/.Skype/your-username-here/.lock, ~/.Skype/your-username-here/*-journal

Where "your-username-here" is your Skype username.

You can also use the file manager to do this. Simply navigate to your ~/.Skype/your-username-here folder and delete the files manually.


Can Ubuntu be installed to a Portable Hard Drive?

In theory yes, assuming the system is the right architecture - you will need to set up the drive to be bootable (which many drives are anyway - you would see these drives as a fixed disk under windows  ), and simply install ubuntu to that drive. Assuming you don't try to run 64 bit ubuntu on a 32 bit system (so its safer to use the 32 bit system), the worst that should happen is you would need to boot into safe mode. I used to do it with a bunch of 32 bit systems, but they were all the same generation/design of 32 bit x86 (I was running mostly core 2 duos).

I'd recommend a less 'heavy' varient of ubuntu, since they don't rely as much on compositing. Linux handles switches of hardware surprisingly gracefully, unless it lacks a driver you need, and the basic install includes a lot of things you 'might' but don't always need.

I'd also recommend doing the install of linux to the external hard drige on a system with no other hard drive on it to ensure that the bootloader is installed to the MBR of the external drive. This isn't necessary but makes things more foolproof.

Finally your mileage may vary - some systems simply do not boot off some external drives, and you will want to test this arrangement on a few systems before trusting it to be your daily driver system.


How to securely ssh into a machine at home over the internet

Your best bet is probably to run an SSH server on a non-default port, such as 2020. This prevents most attempts at brute force attacks from the web, as these bots tend to only look on default ports.

You are also going to need to assign the server a static IP address on the LAN, as it needs to be accessible at all times. You can set this in System Settings --> Network. To prevent IP address conflicts, it's also advisable that you tell your DHCP server (the router in most cases) that this IP address is taken. The method varies by model, but there should be an area somewhere in the router configuration that lets you reserve IP addresses.

The reason for the static IP is that you need to set up port forwarding in your router setup. This allows connections from port  to you external IP to be routed to that port on your server.

If your public IP address is dynamic, which it probably is, you're going to want to set up some sort of dynamic DNS service. My recommendation for this service is No-IP. It gives you a free sub-domain that always points to your public IP. This setup does require the installation of a program on an always-on machine on your LAN (called the DUC, provided by No-IP).

Once you have the SSH server set up how you want, SSH to it by entering

ssh user@remotehostip -p XXX

or by using whatever SSH/SFTP client you prefer.

If any of these sections need more detailed instructions, comment and I'll add them in.

If anyone else has trouble following, here is a chat room that has further/more detailed steps: http://chat.stackexchange.com/rooms/37251/discussion-between-homunculus-reticulli-and-zacharee1


The simplest way is to use PyCharm, it's one of Jetbrains IDEs in the market. It provides the functionality of spelling check, which you can enable/disable it by double click on shift button and search for Spelling Error.

One more interesting thing is that you can have a customized dictionary for your environment. To do so, you can install hunspell plugin for the same IDE too.


How can I undo the effects of startx logverbose 6

go to Ctrl + Alt + F1 login and
run command

sudo chown username:groupname ~/.Xauthority

generally groupname is your username

you started X system as root so the file .Xauthority in your home directory got owned by the root.

comeback Ctrl + Alt + F7 or reboot.