juju status returns ERROR Invalid SSH Key

Things to check:

Have the nodes finished installing?
Any chance you edited the bootstrap node name from the MAAS node interface?
Is your DNS still pointing in the right place?

One more thing - are the clocks reasonably accurate on the maas server and on the nodes? If they are too far out of sync, it makes OAuth fail which currently silently breaks the metadata access from the commissioning node, which makes it just sit at a login prompt instead of finishing the commissioning process and rebooting.


If you really

  formated my hard disk ... Since there is no OS in my hard disk

then you might have erased windows... and it's not there to load anymore. May have to try data recovery to possibly recover the deleted partitions, or just the files, or just some unnamed files & data with a tool like testdisk or photorec, or if not worth it re-install windows. But make sure there's really no windows left on the HD first, browse around (mounted read-only if you have any future recovery in mind) and check.


Display and edit text and images in a quickly app

You can actually do this using a TextView widget. First you should set editable to true:

textview.set_editable(true)

You will need to get its textbuffer which is the textviews data:

buffer = textview.get_buffer()

Then using that buffer you can get and set the data in it. to get the text currently in the buffer use:

buffer.get_text(buffer.get_start_iter(), buffer.get_end_iter(), false)

The first and second arguments are the range to get the text, in this case all off it. The last argument specifies whether you would like to get hidden characters, in this case false. To insert text you can use the following:

buffer.insert(buffer.get_end_iter(), "Sample text")

The first argument specifies where to insert the text, in this case at the end. the second argument is the text to insert. To replace all the data in the buffer you can use:

buffer.set_text("Sample text")

This will replace everything in the buffer with "Sample text". To insert an image you need to create a pixbuf to do this use the following:

pixbuf = gtk.gdk.pixbuf_new_from_file(filename)

To resize the pixbuf use:

pixbuf.scale_simple(dest_width, dest_height, gtk.gdk.INTERP_BILINEAR)

The first two arguments are the new width and height, the third argument is the interpolation type which controls how it scales (there are four types which can be found here). You can then add this pixbuf to the buffer using:

buffer.insert_pixbuf(buffer.get_end_iter(), pixbuf)

This will insert an image at the end of the buffer.

You can also do things like add widgets, set margins, copy and paste from clipboard, insert at the cursor, etc. but you can look at the links below for that.

Edit: For a formatted save/load you can use the textbuffers serialization method. First you should use its register_serialize_tagset() method:

format = buffer.register_serialize_tagset()

Next you can use its serialize method to get the serialized data:

data buffer.serialize(buffer, format, buffer.get_start_iter(), buffer.get_end_iter())

This will return the data in textbuffer's internal format, which you can save to a file. To load this data first call textbuffer's register_deserialize_tagset() method:

format = emptyBuffer.register_deserialize_tagset()

Then you can load the data using its deserialize() method:

emptyBuffer.deserialize(emptyBuffer, format, emptyBuffer.get_end_iter(), data)

This will load the data into the textbuffer.

Edit2: if you want the user to be able to drag to move and resize you will have to instead load the pixbuf into an image widget, the image widget into a event box, the event box into a child anchor to put into the the textview you can handle x events for that widget and write code in the handlers to that will move or resize the image.

Resources:

gtk.TextView
gtk.TextBuffer
gtk.gdk.Pixbuf


Pyinstaller in ubuntu16.04 :Python library not found: libpython3.6mu.so.1.0, libpython3.6m.so.1.0, libpython3.6.so.1.0

Try follow the last line of message:

* If you're building Python by yourself, please rebuild your Python with `--enable-shared` (or, `--enable-framework` on Darwin)

Clearly, rebuild your Python by ./configure --enable-shared, and make sure the $LD_LIBRARY_PATH does include your python3.6/lib path. Say if your python3.6.8 is installed at /home/bibao/python3.6, than use export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/bibao/python3.6/lib to add PATH.

I do not use conda. but I think you may use find to find python path, or just build a python3.6.8 alone for packaging use, even the latter is not elegant enough.


Upgrade from 12.10 to 13.04 affecting other systems

Although the upgrade should go without any problem you should back up your data first just in case. Upgrades can fail for any number of reasons. You should also read the release notes first.

https://wiki.ubuntu.com/RaringRingtail/ReleaseNotes

Especially the "known issues" section

https://wiki.ubuntu.com/RaringRingtail/ReleaseNotes#Known_issues

There is no reason to believe the upgrade would affect windows.

Once you upgrade, you will no longer be able to boot 12.10 and there should not be an option to do so.


view ubuntu one files from another computer

If you're just looking for a quick way to access your files from a friend's system, just browse to http://one.ubuntu.com/, log in, and click the 'Files' tab.

From there, you should be able to browse your synchronised files, and download the ones you want.


How do I mount a hibernated NTFS partition?

You need to use sudo before the command it gave you. So typing the following in a terminal should work.
Big Disclaimer:
Running this will delete the hibernation file, which as I understand it will not damage Windows, but will delete any hibernated session that you have saved. If you were working on something in Windows that you did not save before you hibernated you will lose your work if you run this command!
If you understand the above, the command you should run is:
sudo mount -t ntfs-3g -o remove_hiberfile /dev/sda2 /media/FE46D60C46D5C615


The following isn't perfect. It doesn't handle directories with spaces well but unless you have a load of header directories with identical suffixes, that's not really an issue.

find -type f -iname '*.jpg' -o -iname '*.jpeg' -o -iname '*.png' -o -iname '*.gif' -printf '%h %s\n' \
| awk -F '[ /]' '{a[$2] += $NF} END{for(i in a){print i, a[i]}}'


Unfortunately, there really is not enough information to know what is happening here. Would be nice to know what the latency to and from the wireless router is, and then what the latency between your browser and perhaps yahoo.com or google.com, then try to determine what the hardware is within the desktop that is providing the wireless connection.

Hard to say it is a wireless driver without knowing much more information about the issue. Here is what I would do in order to diagnose in order of likely ease and best return of resolution to you:

1) Check your browser's settings in the desktop computer for any proxy connections (not likely if newly setup though)

2) Check to see if your computer's connection to your Wireless Access Point is solid and low-latency:

user@host~:$ping xxx.xxx.xxx.xxx

where $xxx.xxx.xxx.xxx represents the IP Address of the wireless access point or router. You will probably only need to gather about 5 to 10 packets and then interrupt the ping command with a simple CTRL+C:

user@user~:$ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_req=1 ttl=64 time=1.81 ms
64 bytes from 192.168.1.1: icmp_req=2 ttl=64 time=0.398 ms
64 bytes from 192.168.1.1: icmp_req=3 ttl=64 time=0.425 ms
64 bytes from 192.168.1.1: icmp_req=4 ttl=64 time=0.404 ms
64 bytes from 192.168.1.1: icmp_req=5 ttl=64 time=0.447 ms
^C
--- 192.168.1.1 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4000ms
rtt min/avg/max/mdev = 0.398/0.698/1.816/0.559 ms

In this example the IP Address is a standard home Wireless Router default administrative IP address and the ping results are as shown. The round trip time is no an issue there.

3) Next, ping google.com or yahoo.com or some other site for the same results. Do not rely solely on one site as you may have a problem with a local content server from a content mirroring service. Even the largest providers in the world have occasional issues with their content services, it happens.

user@host~:$ping google.com
PING google.com (74.125.227.50) 56(84) bytes of data.
64 bytes from dfw06s06-in-f18.1e100.net (74.125.227.50): icmp_req=1 ttl=59 time=32.1 ms
64 bytes from dfw06s06-in-f18.1e100.net (74.125.227.50): icmp_req=2 ttl=59 time=30.7 ms
64 bytes from dfw06s06-in-f18.1e100.net (74.125.227.50): icmp_req=3 ttl=59 time=31.9 ms
64 bytes from dfw06s06-in-f18.1e100.net (74.125.227.50): icmp_req=4 ttl=59 time=33.2 ms
64 bytes from dfw06s06-in-f18.1e100.net (74.125.227.50): icmp_req=5 ttl=59 time=32.1 ms
^C
--- google.com ping statistics ---
6 packets transmitted, 5 received, 16% packet loss, time 5008ms
rtt min/avg/max/mdev = 30.777/32.060/33.217/0.777 ms

The results here are a bit misleading, simply because the last packet was lost because of the interruption of the ping command, but the connection is stable and normal.

4) If you are seeing something different at this point, then you should probably verify that your desktop has the proper drivers for your wireless card. Try this command to gather information about your card:

user@host~:$sudo lspci

This should provide a full list of your devices, including the wireless device.

5) Next, go to System Settings, Additional Hardware and then allow the system to search for additional drivers. If any additional drivers are required for the Wireless card, install them.

6) Restart the system as required to allow the newly installed driver (if any) to take effect.

HTH. Have a nice day.


Likewise: joined Active Directory but cannot write shares

I finally solved the problem.

It turned out, this would not work without a valid GID or UID parameter in fstab.

I added my UID to the fstab entry and I can now write the share perfectly.

This resource has helped me come to this conclusion.


Ricoh SP 111 Printer + Stability Problems (I'm going nuts!!)

As i couldn't get out of the situation, i have reinstalled Ubuntu 18.04 and my applications very carefully.Finally, i have no unstable situation and i managed my printer work ;)

So steps in previous topics are clearly correct:

Ricoh SP111 printer setup help

Except something i need to mention is the file "pstoricohddst-gdi" has to be in following settings:

Owner: Root
Accessibility: Read and Write
Group: Root
Accessibility: Read
Others
Accessibility: Read
Run: Let the file run just like an executable file.

I hope these settings help for people who face the same problem in the future, i hope not.Additionally, you can see your proceed via CUPS interface as status:
http://localhost:631/printers/

Best Regards.


How to run 2 X sessions with different display managers?

Questions #1: How to run multiple X sessions at the same time

You need to run sudo startx gnome-session -- :1 vt8 - the vt8 tells X to start the session on TTY8 (which you get to with ctrlaltF8)

Question #2: Drag windows between X Sessions

I doubt that's possible, and if it is, with the software we have today it would be very unstable - it's the job of the DE to do everything from window management and toolbar rendering to workspace placement, and you can't just 'cut and paste' a window from one DE to another. In the future this could be possible, as it sounds like something the Wayland graphics server (hoped to be a replacement for X) could be better at managing. But for the moment at least, it's unlikely to work.


The error means that you compiled your Java program with a version of the compiler that is more recent than the version of the Java virtual machine you're trying to execute the compiled code.
In your case 58 means Java 14 and 55 means Java 11. Thus, you compiled your program with Java 14 and you're trying to execute the compiled code with Java 11.
Probably your configuration of the Java virtual machine is not in sync with your configuration of your Java compiler.
Maybe you ran something like sudo update-alternatives --config java (JVM) but not sudo update-alternatives --config javac (Java compiler).
To avoid such problems, in Ubuntu, you can run sudo update-java-alternatives, which takes care of setting the version both for java and for javac.


How to install drivers for Samsung printer ml-2955 on Ubuntu 13?

Open Terminal by pressing ctrl + alt + t and

type :
sh filename

Replace filename with the present filename.

It would install the driver .


Ubuntu 17.10 not showing Spring Tool Suite icon in the Dock

It seems STS is not a correct StartupWMClass value in the STS.desktop file.

To get a correct value first switch to an Xorg session and launch Spring Tool Suite. Then open Terminal and run xprop WM_CLASS, place the cursor over the STS window and click. You should get correct values for Spring Tool Suite in the Terminal window as

WM_CLASS(STRING) = "value1", "value2"

You should get something like the following in particular

WM_CLASS(STRING) = "Spring Tool Suite", "Spring Tool Suite"

Then change the StartupWMClass=STS line to StartupWMClass=Spring Tool Suite in the STS.desktop file and save it.


xbox controller bluetooth connection ubuntu 20.04

I'm having the exact same problem described above and have tried the same "fixes". I'm really sorry not to be able to help.


Mounting External HD inside Encrypted Folder

Best solution to use encrypted file systems with the other ones is symbolic link. Mount HD to /media/Music and use symbolic link at home folder:

ln -s /media/Music /home/USERNAME/Music


TMPFS Available space does not equal size

Available space does not have to equal size. What you're seeing in the case of /dev/shm is the fact that the system uses very little or zero space for this filesystem (Used = 0), so in this case available = size.

I'm not sure why df doesn't show 16G of used space, but, generally speaking, when a process asks the kernel for allocation of space, the request might be granted, but the kernel can in fact allocate smaller space and later (in case more memory is needed) expand it.


From the output provided the swap is not part of the zpool/zvol. For example here is output from a machine which has Swap on ZFS:

My FSTAB:

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/dev/mapper/nuc--root-root /               xfs     noatime         0       0
# /boot was on /dev/sdb1 during installation
UUID=afd2054d-1ed3-498f-90de-b7d282bdab80 /boot           ext2    noatime,nodiratime 0       2
/dev/zvol/VMs/swap none swap discard 0 0

stratus@nuc:/$ sudo zpool list
NAME   SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
VMs    232G  79.0G   153G         -    61%    34%  1.00x  ONLINE  -

stratus@nuc:/$ sudo zpool status
  pool: VMs
 state: ONLINE
  scan: scrub repaired 0 in 0h21m with 0 errors on Sun Dec  8 00:45:29 2019
config:

    NAME                                  STATE     READ WRITE CKSUM
    VMs                                   ONLINE       0     0     0
      ata-faspeed_F710-250G_180116710082  ONLINE       0     0     0

errors: No known data errors

stratus@nuc:/$ sudo zfs list
NAME         USED  AVAIL  REFER  MOUNTPOINT
VMs         86.4G   138G    96K  none
VMs/images  77.7G   138G  77.7G  /var/lib/libvirt/images/
VMs/swap    8.50G   146G  1.09G  -

It is likely that 'rpool' is just a label on the partition and not refering to the ZFS volume.

If you would like to add SWAP to ZFS you can do this:

zfs create -V 8G -b $(getconf PAGESIZE) -o logbias=throughput -o sync=always -o primarycache=metadata -o com.sun:auto-snapshot=false rpool/swap
mkswap -f /dev/zvol/rpool/swap
swapon /dev/zvol/rpool/swap

In your FSTAB:

# IN FSTAB
/dev/zvol/rpool/swap none swap discard 0 0

Make sure to set the size as you feel appropriate


You might want to check remark.js.
It's not as easy to use as DeckSet but it does the job pretty well.


I suggest that you install newer firmware to see if it helps. With a working internet connection, open a terminal and do:

wget http://security.ubuntu.com/ubuntu/pool/main/l/linux-firmware/linux-firmware_1.183.2_all.deb
sudo dpkg -i linux*.deb

Reboot and show us:

dmesg | grep iwl


I don't know about your problem, but I successfully installed Win7 on qemu with this command:

  virt-install --connect qemu:///system -n win7 -r 2048 --vcpus=2 -f
  win7.qcow2 -s 30 -c
  win7.iso --vnc --noautoconsole
  --os-type windows --os-variant win7 --accelerate --network=bridge:br0
  --hvm

-n Name
-r Ram
-s Size in GB
-c Installation media

You might want to try this


Ubuntu not shown in boot menu in other devices

UEFI only boots external drives from the ESP - efi system partition on that drive and using /EFI/Boot/bootx64.efi.

You must have an ESP on the external drive. And Ubiquity installer does not give that option with auto installs & will not use ESP on external drive. Ubiquity only installs grub to first ESP usually sda or NVMe drive that has Windows' ESP.
These instructions still apply, but now you do not need swap partition. Ubuntu creates a swap file.

http://askubuntu.com/questions/743095/how-to-prepare-a-disk-on-an-efi-based-pc-for-ubuntu

How to use manual partitioning during installation?

Then you can either reinstall grub specifying the external drive's ESP. Often easier with Boot-Repair, but you can just to a full reinstall if you are booted into your install. Or you can copy all files from internal drive's ESP to external drive's ESP. You need both /EFI/Boot & /EFI/ubuntu as Ubuntu's grub for a full install expects more boot files in /EFI/ubuntu folder. Or you can do a work around when installing to unmount internal ESP & mount external ESP.

https://help.ubuntu.com/community/Boot-Info

sudo dpkg-reconfigure grub-efi-amd64
sudo grub-install --efi-directory=/boot/efi

Work around in this bug report, see post #23 & later (I just installed 20.04 to sdb with this procedure), I double check mounts in terminal and ESP mount does not show until about when you add user name & password. My ESP was on sdb1:

https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1396379

mount
sudo umount /target/boot/efi
sudo mount /dev/sdb1 /target/boot/efi


You can background a process by typing C-z, at that point, the process is suspended and doesn't do anything other than wait. Then execute bg to allow the process to continue in the background.

jobs will list all the process running/waiting in the background.

testarossa :: ~ % jobs
[1]  + suspended  sudo apt-get update

To bring it back to the foreground you can just execute fg. In case you have many processes running in the background you can specify which one to bring to the foreground (or continue in the background) by specifying the process id (e.g., [1] in the above example). So given the above example, bg 1 and bg are equivalent. Note that this is not the pid!

Using a terminal multiplexer like screen and tmux would have prevented this. Might want to check those out.

Example

testarossa :: ~ % sudo apt-get update                                                                                1 ↵
[sudo] password for christophe:
Hit http://ppa.launchpad.net trusty InRelease
Hit http://ppa.launchpad.net trusty InRelease
Hit http://ppa.launchpad.net trusty InRelease
Hit http://ppa.launchpad.net trusty InRelease
Hit http://ppa.launchpad.net trusty/main amd64 Packages
Hit http://ppa.launchpad.net trusty/main i386 Packages
Hit http://ppa.launchpad.net trusty/main Translation-en
Ign http://us.archive.ubuntu.com trusty InRelease
Hit http://ppa.launchpad.net trusty/main amd64 Packages
Hit http://ppa.launchpad.net trusty/main i386 Packages
Get:1 https://get.docker.com docker InRelease
100% [Waiting for headers] [Connecting to security.ubuntu.com (91.189.91.14)] [^Z
[1]  + 16963 suspended  sudo apt-get update
testarossa :: ~ % bg                                                                                20 ↵
[1]  + 16963 continued  sudo apt-get update

Do mind that output from the process appears on your terminal! You can, however, just do normal stuff on the commandline as you wish.


Trouble installing Matlab 2014b on Ubuntu 14.04

Having looked up the line of code in the install script where glnx86 appears, I got confused first. But now I realized I installed Ubuntu 14.04 32 bit.. Of course, trying to install Matlab 64 bit fails.

Gotta reinstall Ubuntu..


Multiple issues with Apple Bluetooth keyboard: no auto connect, battery always 0%

The A1314 keyboard takes a minute to connect in Ubuntu. You don't actually have to touch the power button. You just press any key, and after several seconds the bluetooth will connect and the keyboard will start working.

I think I was getting impatient and hitting the power button, which would just disconnect and reconnect the bluetooth.

My solution was to install blueman, and add it to the startup programs. Then, when I boot, I can see that the keyboard isn't connected. I can press a key, and I can see if bluetooth detected the keyboard. I can then see when I have a signal, an after a few more seconds, the keyboard will start working.


Compiz and Mate and Lubuntu, GUI not responsive

Open "Default applications for LXSession" in Preferences
Click the "Autostart" tab
In "Manual autostarted applications", add the line "compiz --replace"


Tool bar missing for text editor missing after installing 16.04

Gedit's new interface no longer includes a toolbar. It's been somewhat oversimplified. I think pretty much everything is in menus now.

If you really want the toolbar back, you can follow Videonauth's guide to downgrade Gedit, but it's quite complex. Unless you absolutely cannot stand the new look, stay with the current version.


Add the below string to server.xml connecter

sslEnabledProtocols="TLSv1, TLSv1.1, TLSv1.2"

and then remove

sslProtocols="TLS"

check on

http://poodlebleed.com/
https://www.ssllabs.com/ssltest/


Created a Bootable USB Drive to Install Ubuntu.. What next?

This definitely shouldn't happen. You should get a beautiful menu to select if you either want to install Ubuntu or test it. But anyway, we can do it through the grub menu. Run the following commands:

set root=(hd0,msdos1)

I'm considering your flash drive has only one partition here.

linux /casper/vmlinuz boot=casper noprompt noeject quiet splash

initrd /casper/initrd.lz

boot

And that, in the best scenario, should boot Ubuntu Live.


I had a similar problem, the main difference being the fact that I started with a fresh 14.04 installation.

I was able to fix this problem after reading this tutorial.

First thing I did was I purged ubuntu-emulator and ubuntu-emulator-runtime and have removed ubuntu-sdk-team/ppa.
Then, following the instructions, I've added the phablet-team/tools ppa and then installed ubuntu-emulator.

Lastly, I've made a new emulator with this command (I think I could have fixed the problem with THIS command only! Maybe You can try just this one first):

$ sudo ubuntu-emulator create UbuntuTouch --arch=i386 --channel=ubuntu-touch/utopic-proposed

Now I can run apps on this emulator from the QtCreator, and I get a green status icon for this emulator instead of orange!

Hope this helps! :D


I can't install any newer versions of vagrant past 1.8.1

How to upgrade to Vagrant 1.9.1 from any older version on Ubuntu
  16.04

  First remove the older version of vagrant.

sudo apt-get remove --auto-remove vagrant
rm -r ~/.vagrant.d

  Install instructions

wget https://releases.hashicorp.com/vagrant/1.9.1/vagrant_1.9.1_x86_64.deb
sudo dpkg -i vagrant_1.9.1_x86_64.deb
vagrant version


Use pvdisplay to see how much space is available on your physical volumes that are set up in LVM. You may need to add space to that first.

pvdisplay shows what devices like /dev/sda1, etc are set up to be managed by LVM.

vgdisplay shows info about the volume groups that are made up of the different physical volumes. A volume group can span over several physical volumes.

lvdisplay show info about the logical volumes in the volume groups.

To extend a logical volume, there needs to be available space/extents in the volume group. To expand a volume group, there needs to be space on the physical volumes the volume group is on. You can add physical volumes and expand onto those.


MAC address error : Device or resource busy

It is saying two things, "interface up or not permission" this means that you may need to:

sudo machanger

Or that the "Device or resource is busy".

Maybe something like:

sudo ifconfig wlan1 down
sudo airmon-ng stop wlan1

then run sudo machanger

and to get it up again.

sudo ifconfig wlan1 up
sudo airmon-ng start wlan1


The > redirection is done by shell, not by echo. In fact, the shell does the redirection before the command is even started and by default shell will overwrite any file by that name if exists.

You can prevent the overwriting by shell if any file exists by using the noclobber shell option:

set -o noclobber

Example:

$ echo "new text" > existing_file.txt

$ set -o noclobber

$ echo "another text" > existing_file.txt
bash: existing_file.txt: cannot overwrite existing file

To unset the option:

set +o noclobber

You won't get any option like taking user input to overwrite any existing file, without doing something manual like defining a function and use it every time.


How to copy files from one directory to another after closing the Dolphin file manager in Kubuntu 16.04 LTS?

After researching this topic, it seems that the problem was related to my clipboard manager itself. My clipboard manager was not running at all.

Make sure to set your clipboard manager to autorun with your OS.
In Kubuntu, the recommended clipboard manager is "Klipper".


How do I download Adobe Flash on Ubuntu 12.10?

It is rather simple;
- open software center
- typ in the search box 'restricted extra's' and choose the version for Ubuntu
- install the package

now you should have Flash installed.
Adove reader is a package you really don't need; you can easily install via the software center software that suits your needs (there is a lot of software for this purpose)

Succes !


I suspect you are using the snap version of VLC and you are opening DVDs via either autoplay on insertion or from the file manager using the "Open with VLC" button.

Opening VLC, going to Media > Open disc, and clicking "Play" should work.

Alternatively, replace VLC with the deb version:

sudo snap remove vlc
sudo apt install vlc

The deb version appears to correctly handle external requests to play DVDs, so all of the above should work.


"Error in main glxinfo is not installed. Please install mesa-utils package" when trying to install PlayOnLinux

Just open up a terminal and type:

sudo apt-get install mesa-utils


No Banshee notification area icon in Gnome 3 classic session

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

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

However, banshee is fully integrated in the sound-indicator, to perhaps the use of the notification icon is not required.


Gnome Emoji Picker and Characters app do not show Noto Color Emoji emojis

I ended up using Emote
sudo snap install emote
https://github.com/tom-james-watson/Emote
I assigned a custom shortcut to it and completely replaced that rubbish emoji picker


This has to do with old distros being archived. I found a previous question that talks about it

How to install software or upgrade from an old unsupported release?

along with a ubuntu page here

Hope this helps.

Edit: The steps I had to take turned out to be a tad different than what was suggested. I changed the bg.archive.ubuntu.com found in /etc/apt/source.list.d/precise.list to old-releases.ubuntu.com and things worked like a charm.


"unable to open '/usr/share/icons/Pop/16x16@2x/actions/bookmark-new.png.dpkg-new': No such file or directory" error while trying to update

I had the same issue. I removed the package and reinstalled using

sudo apt-get remove --purge pop-icon-theme
sudo apt install --reinstall pop-icon-theme


14.04 - gnome forgets disabled keyboard shortcuts after boot. Is there a workaround?

Install Compiz Config Setting Manager (ccsm):

sudo apt-get install compizconfig-settings-manager

Open it, Go to Preferences → Profile & Backend tab

Because it's a bug, this is just a work around that may work:

Uncheck Enable integration into the desktop environment
If didn't work, Change Backend to: Flat-File Configuration Backend
If didn't work, Remove write permission from Current profile (Default in my case):

sudo chmod -w ~/.config/compiz-1/compizconfig/Default.ini


Internal SD card reader - Acer Aspire 1410, Lub 16.04

A Muliti-card reader will not display in the device list if no memory card is plugged in. This is normal behavior. Since your sdcard works in other computers and dmesg reports correct operation, It is most likely a bad slot in your laptop.


How to make some folders appear on the top in Nautilus?

Bookmarks can be added to the left panel in the Nautilus menu in Bookmarks > Add Bookmark or just pressing Ctrl+D when inside a folder

If you still want to sort out the folders so that a few are kept always on top you can do so manually by going to View > Arrange Items > Manually, they will keep the desired order.

If you still want to organize by name so that some folders are kept always on top of the order just add a 0 in front of the name, so for i.e. _videos would be instead 0videos.

If you are trying to access your folders as fast as possible another option would be the creation of a quicklist for the Unity launcher, instructions can be found here

https://askubuntu.com/a/35526/25863


Déjà Dup is an incremental back-up utility which means it will back up all the files that have changed since the last backup.

To restore a backup, click the Restore button in the Déjà Dup window. It will automatically show you the folder that you last backed up to (or you can select the one you want). See here for a tutorial.


Click on the address bar and there is on the left site a button to reload. The button is in the address bar – left from the internet address.


Live USB or Live Install better for my needs

Small comparison between your mentioned options :

LiveCD/LiveDVD < LiveUSB < LiveUSB with persistence < Full install on USB  ,

where < sign means less than , as in lesser productivity options.

As you already know Live systems are mainly intended as demos mediums, install mediums, and limited productivity mediums (as in rescue scenarios or restrictive, secure mediums).

Live systems do use a special type of file system called squashfs, in which are squashed in all the files needed for the live system to run (including OS and software). Squashfs is a fixed, uneditable system.

You can update any live version, but the updates will be lost after reboot, unless you had set up persistence mode. You can install any software in any live version, but all the installs will be lost after reboot, unless you had set up persistence.

Full install is not a great idea for USB, because USB drives are typically supporting about 1000 writing cycles, whereas an internal drive (even a ssd) is typically supporting much more writing cycles. More yet, in most situations, the SATA bus of an internal drive is much faster than an USB bus. Sure, SATA I is slower than USB 3.0, but that's the exception rather than the rule. And even so, the motherboard always presumes SATA is prioritary over USB, and therefore SATA will always be the preferred bus, and SATA data will always be executed first no matter the speed of the bus.

When you do a full install on USB, you can to run it on any system, as long as it has the same CPU architecture, same type of video card, same type of RAM, etc. You can't run an Ubuntu x86 on ARM architecture.


How can I see the IP addresses which are connected to a switch?

arp -a

Given an IP address, you should be able to find the MAC address of the corresponding host.

(Note that this will need to be run on a machine that is on the same IP subnet as the machine you are trying to find).

Network Tracking Database

    Description

  NetDB tracks all MAC addresses on your switches and ARP entries on
  your network over time. It supports extensive switch, VLAN and vendor
  code reports from a CLI or Web App. Can generate CSV reports, track
  the usage of static addresses and much more.

  Features

Network User Tracking

Static Address Management

Unused Switchport Recovery

Security Audit Trail for all Network Devices

CLI and Web Interface, Easy Integration with Other Tools

MORE HELP


Fullscreen enabled in Ubuntu Virtualbox VM without Guest Additions

Guest additions can also be installed via a .run that dpkg does not know. Do a ls /sbin/*vbox* to look up the binary.


SOLVED IT
Reinstalled Cinnamon desktop, removed XFCE and rebooted, it said the disk was full, deleted a few things and I'm now back on track


Desktop icons or menus not appear in ubuntu 16.04 lts

You need to reset the whole Unity since something got messed up.

In Terminal (CTRL+ALT+T) type:

dconf reset -f /org/compiz/

After that:

setsid unity

Should fix the whole thing. Then try Compiz again.


No Network Interfaces, unable to connect to internet

Its pretty common issue. You will have to find the right network drivers:
sudo lspci

This will give the driver you want and then just download, unpack and install them
This might help:
Wi-Fi not working on Lenovo ThinkPad E570 (Realtek RTL8821CE)


My folders are still locked (External Hard Drive)

Did you try to change the owner of the folders ?

by typing:

sudo chown -R $USER /your_folder

After that you can type in your terminal:

ls -l

or to go your_folders->properties

To see if there is any change concerning the owner of the folder, It should be the case.

To fix the errors by your chmod use

find . -type d -print0 | xargs -0 chmod 0755
find . -type f -print0 | xargs -0 chmod 0644

to fix that.


12.04 How to automatically boot to single user mode with auto login

I don't know how I missed this when I searched the question but the answer was provided by Mr. Gruber: How to autologin (without entering username and password)(in text mode)

As sudo ,edit the file /etc/default/grub and change:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to

GRUB_CMDLINE_LINUX_DEFAULT="text"

Save and then enter the command

sudo update-grub

GRUB is now configured to boot to text mode

As sudo edit the file /etc/init/tty1.conf an dchange the line:

exec /sbin/getty -8 38400 tty1

to

exec /sbin/getty -8 38400 tty1 -a user-name

Where "user-name" is the user who will be automatically logged in.

It appears to work correctly for me.

To get to a GUI envirnment enter  startx.  Be sure to do this as a "regular" user as using sudo the file .Xauthority will have root as the owner and will cause an endless sequence of requesting passwords ...

Mr. Gruber mentions using tty6 in tty1.conf, I think you must not edit the whatever TTY is in that line unless you have a rescue disk/usb-stick available!

I'll work on the auto start of a script later ...


Gnome 3.12 - Choppy Animations with Intel HD 4600 Graphics

Use last video drivers

sudo ubuntu-drivers autoinstall

Disable showing seconds on clock

gsettings set org.gnome.desktop.interface clock-show-seconds false

Disable animations in GNOME Shell (or in Unity). Using CLI:

gsettings set org.gnome.desktop.interface enable-animations false


hi i had this same problem and found the answer here: http://ubuntuforums.org/showpost.php?p=11802779&postcount=9.


Can't boot Ubuntu after update to MacOS Sierra in dual boot with rEFInd

The problem was that when I updated to macOS Sierra the rEFInd boot loader configuration was reset. After reinstallation of rEFInd the  problem was solved.


Base 4.2.1 does not display Access Database Connection option

The option to connect directly to an Access database is only available in the Windows versions of LibreOffice Base. However, it is possible to use the UCanAccess JDBC driver to give LibreOffice Base read/write access to a Microsoft Access database file (.mdb or .accdb).

For detailed instructions on how to set it up, see my answer to a similar question here:

Is it possible to open an Access 2010 database file without using Wine or VirtualBox?


How to see what technologies a video card supports

Install Google Chrome and go to URL chrome://gpu

Report generated looks like this:

Graphics Feature Status

Canvas: Software only, hardware acceleration unavailable
3D CSS: Hardware accelerated
Compositing: Hardware accelerated
CSS Animation: Accelerated
Flash 3D: Unavailable. Hardware acceleration unavailable
Flash Stage3D: Unavailable. Hardware acceleration unavailable
Flash Stage3D Baseline profile: Unavailable. Hardware acceleration unavailable
WebGL multisampling: Hardware accelerated
Texture Sharing: Hardware accelerated
Video: Software only, hardware acceleration unavailable
Video Decode: Software only, hardware acceleration unavailable
Video Encode: Hardware accelerated
WebGL: Hardware accelerated

Problems Detected

Accelerated 2d canvas is unstable in Linux at the moment
Stage3D is not supported on Linux: 129848
Accelerated video decode is unavailable on Mac and Linux: 137247, 133828
NVIDIA linux drivers are unstable when using multiple Open GL contexts and with low memory: 145600

Driver Bug Workarounds

 ...

Version Information

Driver Information

solution found here:  https://askubuntu.com/a/217481/9881


Why are two versions of software with identical names installed on Ubuntu 18.04, and can I remove one of them?

Replacing some GNOME apps with Snaps is developers' decision to support modern glossy non-geek GNOME "functionality".

How to remove such snaps?
Search them by snap list:

$ snap list
Name                  Version  Rev   Tracking  Developer  Notes
core                  16-2.33  4830  stable    canonical  core
gnome-3-26-1604       3.26.0   64    stable/…  canonical  -
gnome-calculator      3.28.1   178   stable/…  canonical  -
gnome-characters      3.28.2   101   stable/…  canonical  -
gnome-logs            3.28.2   37    stable/…  canonical  -
gnome-system-monitor  3.26.0   45    stable/…  canonical  -

and then remove them with for example

snap remove gnome-system-monitor

And then install regular package with for example

sudo apt install gnome-system-monitor

Some deb-packages could be installed into the system as dependencies of other packages . For example gnome-system-monitor is a dependency of the following packages:

$ apt-cache rdepends gnome-system-monitor
gnome-system-monitor
Reverse Depends:
  gnome-core
  vanilla-gnome-desktop
  ubuntu-unity-desktop
  ubuntu-budgie-desktop
  gnome-applets
 |compiz-gnome
  cinnamon-desktop-environment

$ aptitude why gnome-system-monitor
i   xinit        Recommends gnome-terminal | xterm | x-session-manager | x-windo
                            w-manager | x-terminal-emulator
p   compiz       Provides   x-window-manager
p   compiz       Depends    compiz-gnome
p   compiz-gnome Recommends gnome-system-monitor | mate-system-monitor

see corresponding man-pages for the syntax of used commands (man apt-cache and man aptitude).


Connecting two ethernet ports with a bridge kills local network

You don't want to bridge the ports, you want to bond them. Bridging allows the computer to receive packets (technically frames) on one port, and forward them out the other, which isn't what you want at all.

Bonding tells the computer to transmit frames over one port or the other (based on a policy you can configure), and the switch to do the same back at the computer. It's normally done using the IEEE 802.3ad protocol. You need to set it up on both the NAS computer and the switch. If the switch doesn't support IEEE 802.3ad, I don't think there's a way to make it work.

BTW, the reason the network died when you hooked it up in bridge mode is that connecting two bridges/switches by multiple links (with spanning tree turned off, as you have it)  creates a switch loop, where both the NAS and the actual switch forward traffic infinitely back & forth between the two cables, consuming all bandwidth and effectively killing the network. The spanning tree protocol is designed specifically to prevent this problem; if you turn it off, you take on responsibility for creating a loop-free network.


Fglrx always hard-crashes my hybrid-GPU laptop. How can I disable radeon and use only i915?

You need to remove the radeon drivers from the system, and revert to the open source drivers. Here is a link with the appropriate procedure.


Two finger scrolling and other multitouch gestures are not working on asus laptop model x555u.

I was able to fix this on an Asus ux501vw by installing kernel 4.3.3 from http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.3.3-wily/.

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.3.3-wily/linux-headers-4.3.3-040303-generic_4.3.3-040303.201512150130_amd64.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.3.3-wily/linux-headers-4.3.3-040303_4.3.3-040303.201512150130_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.3.3-wily/linux-image-4.3.3-040303-generic_4.3.3-040303.201512150130_amd64.deb
sudo dpkg -i linux-headers-4.3.3-040303_4.3.3-040303.201512150130_all.deb linux-headers-4.3.3-040303-generic_4.3.3-040303.201512150130_amd64.deb linux-image-4.3.3-040303-generic_4.3.3-040303.201512150130_amd64.deb
sudo reboot


Will Ubuntu non-carrier phones be available?

According to the Ubuntu Edge website (Which I think you are referring to), the Ubuntu phone is unlocked.  As such, it is open to any carrier.  ALL these phones will be non-carrier specific.  Now the problem here is that I doubt that the project is going to go ahead, because funding does seem insignificant.  Anyway, you can read more up on the Ubuntu phone here:

http://www.indiegogo.com/projects/ubuntu-edge


Here is a guide that describes the way xrandr operates.

It mentions that:

  Displayed are the different connectors (i.e. VGA-0, DVI-0, S-Video, LVDS) along with the automatically detected resolutions using the EDID information obtained from the display.

In other words, the lines:

DP-1-1-2 connected 2560x1440+0+1080 (normal left inverted right x axis y axis) 597mm x 336mm
   2560x1440     59.95*+

Are the direct EDID information provided by the display. So this display only supports a single mode:

resolution of 2560x1440
refresh rate of 59.95Hz.

Xrandr won't be able to set a different mode.

However it is not unheard of that a display EDID info are badly configured and that in reality the display supports additional modes. In that case, a potential workaround would be to use an EDID emulator to spoof the EDID capabilities of the screen, thus enabling additional modes in xrandr.


Can I install 14.04 on a Dell XPS13 (not developer edition)?

I looked over the hardware and it looks like they are exactly the same. Most of the hardware is intel which makes getting your drivers working a non-issue. If you get a Windows 8.1 based laptop you will have to work around getting UEFI Firmware Settings to allow you to install another operating. You Can normally find this setting to disable UEFI in the bios and install like normal. Since this laptop doesn't have a disc drive you will have to use a usb drive to install ubuntu. It looks like the ubuntu version is cheaper from what dells site shows. I Think you could even do the reverse and install windows later if you wanted since the hardware matches.


Install two applications with the same name?

As far as I can see both deb install different files and folder...
but the problem could be that these applications have the same name in the "control" file under the debian package.

You can try changing the name of the package, open a Terminal when you have the deb package and type the following:

Unpack the rstudio-0.97.551-amd64.deb in a temp folder.

dpkg-deb -x rstudio-0.97.551-amd64.deb tempdeb

dpkg-deb --control rstudio-0.97.551-amd64.deb tempdeb/DEBIAN

Go to the tempdeb/DEBIAN folder en edit the file "control" and change the name of the package from "rstudio" to "rstudio-ide"

gedit tempdeb/DEBIAN/control

Repack the .deb, in this case with other name.

dpkg -b tempdeb new-rstudio-ide-0.97.551-amd64.deb

As the Web site says.. you need to install r-base

sudo apt-get install r-base

Then you can install the new deb package

sudo dpkg -i new-rstudio-ide-0.97.551-amd64.deb

You should have both applications installed and running...

To remove this package use this command:

sudo dpkg --purge rstudio-ide

Hope this will helpful.


Ardour, system has a limit for maximum amount of locked memory

Launch a terminal (CTRL-ALT-T) and open the file in gedit with admin priveldges:

sudo gedit /etc/security/limits.conf

Be sure that the file contains the following line:

@audio - memlock unlimited

If it doesn't exist, add it. If it does exist, be sure the line doesn't begin with a # and is below any other lines in the file beginning with @audio. This will allow any user in the audio group to avoid memlock limits. Save, close the editor, then add your user to the group by running the command

sudo adduser $USER audio

Close the terminal, log out and back in again, and reopen Ardour. The message should be gone.


To change your update settings, follow these steps:

Change the 'download from' server by going to Settings -> Software & Updates.

Then in the Ubuntu Software tab, select a different server or select the main server.

You can also check the updates settings that you want in the updates tab.

Run these commands to install any available updates:

sudo apt-get update
sudo apt-get upgrade


How to install 17.04 on new 4 TB hard drive?

The answer was from oldfred: In the BIOS setting the SATA drive to AHCI and then re-partitioning the hard drive resolved the issue. Thanks to all who responded.


eBPF Maps: How to update using bpftool from command line

You already found all the tools you need to update eBPF maps from user space.

bpf()

The bpf(cmd, attr, size) system call is used to perform the update. The cmd passed as first argument indicates what type of operation you want to perform: in your case, that would be BPF_MAP_UPDATE_ELEM. Then the manual page you linked explains how to build attr: in your case (for map updates), it should be:

struct {    /* Used by BPF_MAP_*_ELEM and BPF_MAP_GET_NEXT_KEY commands */
        __u32         map_fd;
        __aligned_u64 key;
        union {
                __aligned_u64 value;
                /* [...] */
        };
        __u64         flags;
};

Meaning you should build a union bpf_attr and pass it the file descriptor to the map, the key of the entry you want to update, the new value for that key, and possibly some flags.

The file descriptor for the map can be obtained:

from the path under the BPF virtual file system, if the map has been pinned beforehand,
from the id of the map, with another call to the bpf() system call, using the BPF_MAP_GET_FD_BY_ID command,
(or as a return value from the call to bpf() that created the map, but not in the case you used tc to load the program).

Note that libbpf (shipped with kernel or mirrored on GitHub) provides wrappers around the bpf() system call and can make things easier.

bpftool

In practice, you do not need to reimplement all of this. As you mentioned in the title, bpftool allows you to update maps from command line, without having to reimplement the whole process.

Get bpftool

Edit: On Ubuntu 19.10 (eoan), bpftool is packaged as part of the linux-tools-common package. Read below for instructions for older releases.

As of this writing, bpftool has not been packaged for Debian/Ubuntu, which means that you have to build it from source. It is shipped with the kernel, so it takes time to download, but building is actually very simple:

 $ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
 $ cd linux
 $ cd tools/bpf/bpftool
 $ make
(# make install)
(# make doc doc-install)

Alternatively, there is an unofficial version packaged on this page (disclaimer: from my company). The packaged binary was statically built and should work on all x86_64 Linux machines.

Update maps

After that, you can use it to list the maps currently existing on your system:

# bpftool -f map show

The ids of each map will be displayed on the left. Find the id related to the map you want to update (or if the map was pinned, note its path, displayed with the -f option), and then use one of:

# bpftool map update id <id> key <key> value <new_value>
# bpftool map update pinned <path> key <key> value <new_value>

For example:

# bpftool map update id 17 key 0x1 0 0 0 0 0 0 0 value 0x1 0x2 0x3...

(Note: I would use an array of __u8s rather than ints for storing a MAC address in your struct rt_val. Your macaddr is likely to count for 24 bytes.)

In case you are unsure of how values are stored in the map, do not hesitate to dump it in the console:

# bpftool map dump id 17

More resources

I do not know of any existing bpftool tutorial, but you can find all the details in the manual pages for the tool. I also wrote some tips about it on Twitter.


E: Unable to locate package mysql-server

It seems that your /etc/apt/sources.list is absolutely broken.

Try to fill it with the following contents:

deb http://archive.ubuntu.com/ubuntu xenial main restricted universe
deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe

deb http://archive.ubuntu.com/ubuntu xenial multiverse
deb http://archive.ubuntu.com/ubuntu xenial-updates multiverse

deb http://archive.ubuntu.com/ubuntu xenial-security main restricted universe
deb http://archive.ubuntu.com/ubuntu xenial-security multiverse

deb http://archive.canonical.com/ubuntu xenial partner

Then run:

sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install mysql-server


How to make subdomains point to different local IP addresses?

Answer thanks to JoshP in Server Fault:

  I just recently did this.  See my
  question.  It was kind of a
  long back and forth, but I did get it set up in the end.

  Set up DNS.  The A record will point to your public IP.  So, yourdomain.com points to your.pub.ip.add.  Add CNAME records for the
  subdomains.  So, sub1.yourdomain.com points to @, and
  sub2.yourdomain.com points to @, etc.  Although the subdomains are
  all pointing to the same address, the browser will confer to the
  webserver which subdomain you are trying to reach.
  Set up Apache.  You'll want to set up Virtual Hosts for each subdomain (and maybe for primary domain as well).  You can define the
  Virtual Hosts in different places... mine is defined in
  /etc/apache2/sites-available, and includes the <Location>
  directive, which is where you'll set up your reverse proxy.

This answer was given to OP in ServerFault.


I use a method that has some similarities to the answer of terdon (and was created with some help of him - Thank you @terdon for this!), but has a slightly different approach:

I create a temp file so that the child terminal can communicate with the parent terminal and tell it the PID of its corresponding bash instance. Then I let the parent terminal read the temp file and remember the PID, delete the file and continue by checking every 100ms (delay can be changed) whether the child terminal's bash instance is still running. If not, the terminal was closed either manually or because the command finished. Then the launching command finishes and the parent terminal is usable again.

Advantage of this approach:
All commands that will be launched (ls; sleep 3 or any replacement for those) are executed after the command that is responsible to allow detection of the terminal closing. So if the inner command hangs or you close the terminal manually before it ends, the mechanism is still working and will continue execution of the outer script instead of running into infinite loops.

The code as one-liner with debug output ("launched" after the child terminal window was opened, "terminated" after it was closed) and accuracy of 0.1 seconds is:

pidfile=$(mktemp); gnome-terminal -x bash -c "echo \$$>$pidfile; ls; sleep 3"; until [ -s $pidfile ]; do sleep 0.1; done; terminalpid=$(cat "$pidfile"); rm $pidfile; echo "launched"; while ps -p $terminalpid > /dev/null 2>&1; do sleep 0.1; done; echo "terminated"

Or without debug output:

pidfile=$(mktemp); gnome-terminal -x bash -c "echo \$$>$pidfile; ls; sleep 3"; until [ -s $pidfile ]; do sleep 0.1; done; terminalpid=$(cat "$pidfile"); rm $pidfile; while ps -p $terminalpid > /dev/null 2>&1; do sleep 0.1; done

Almost the same code but with more flexibility written as bash script:

#! /bin/bash

delay=0.1
pidfile=$(mktemp)

gnome-terminal -x bash -c "echo \$$>$pidfile; ls; sleep 3"

until [ -s $pidfile ]
    do sleep $delay
done
terminalpid=$(cat "$pidfile")
rm $pidfile
echo "launched"
while ps -p $terminalpid > /dev/null 2>&1
    do sleep $delay
done
echo "terminated"

You may omit the echo "launched" and echo "terminated" lines of course, as well as you can change the delay=0.1 line to another delay between two checks of the terminal state (in seconds) if you need it to be more or less accurate.

To execute another custom command in the child terminal, replace the line

gnome-terminal -x bash -c "echo \$$>$pidfile; ls; sleep 3"

with the following (insert your command instead of the capitalized placeholder!)

gnome-terminal -x bash -c "echo \$$>$pidfile; INSERTYOURCOMMANDSHERE"


Install python-dev package using the command below:

sudo apt-get install python-dev   # for python2
sudo apt-get install python3-dev  # for python3


Try this. https://techwiser.com/fix-keyboard-not-working-in-ubuntu-18-04/ . If it doesn't work, you have to reinstall the OS as suggested here https://appuals.com/fix-ubuntu-20-04-lts-keyboard-and-mouse-not-working/ . It could be that the keyboard is not working because you had an external keyboard connected during the installation process. So you need to reinstall the OS.
Try to look also here Ubuntu 20.04 - keyboard not working


Canon MP630 M/F printer wont print correctly

Update: I have found a (temporary) solution at the following link: http://bkintegration.com/2011/05/mp-620-630-debian-based-univeral-installer/ . Hope this helps someone else.


If you can run the VPN client on the router (or the computer which acts as a router) then you can route all (or any selected) connections through the VPN.

With OpenVPN you can add

redirect-gateway

to the client configuration file to route all connections through the VPN, or

route destination.IP destination's.mask

to route connections to a given destination.

For example, Ask Ubuntu uses CloudFlare and IPs in the 104.16.0.0 - 104.31.255.255 range so to route all connections to AskUbuntu.com through the VPN, you would add

route 104.16.0.0 255.255.0.0

If this provides insufficient granularity, you can also issue arbitrary commands with

route-up "whatever command, for example /usr/sbin/ip route add ..."

which will be executed after the VPN connection is established. Make sure you set the appropriate script-security level.

Before that, you need to share the connection over wifi of course.


creating a deb package to install extension

Creating packages is relatively straight forward.  You essentially create a tarball, which could be unpacked at the root of your filesystem (the parallel directory structures), but in addition there is a debian folder, which contains scripts which can be run during the process.
I'm assuming you knew this, so I'm not sure exactly which bit of the process of creating a package, you're unclear on.

https://wiki.debian.org/HowToPackageForDebian

Will give you chapter and verse on creating the package

http://kb.mozillazine.org/Installing_extensions

Says putting .xpi files in a certain directory will cause firefox to install them on next startup

https://forum.openoffice.org/en/forum/viewtopic.php?f=47&t=804

Talks about using unopkg to install libreoffice packages from the command line.

If you want hired consultancy to do the grunt work for you, that's a different matter ;-)


Apt-cache has no candidate for PulseAudio

Turns out the package was pinned.

$ ls /etc/apt/preferences.d/
libasound2-plugins.pref  pulseaudio.pref
$ cat /etc/apt/preferences.d/pulseaudio.pref
Package: pulseaudio
Pin: version *
Pin-Priority: -1

I couldn't find any documentation on how to remove pins nicely, so I just deleted the files

$ sudo rm /etc/apt/preferences.d/*.pref

And then I could install the package.

$ sudo apt-get install pulseaudio
…
The following NEW packages will be installed:
… pulseaudio …


Why do flash players consume up to 20 times more CPU than VLC player to view exactly the same video file?

The probable reason is that the Flash plugin cannot take advantage of any kind of hardware acceleration supported by your graphics card driver. Everything is then decoded using the CPU.

The Intel drivers present in your system allow VLC to use your GPU instead of your CPU to render the movie with video acceleration which is much better for obvious reasons.

Also, Flash hardware acceleration API (Stage Video) requires developers to actually add support for it into their video player SWFs.

If the video player does not have built in support for it even if the version of Flash you have does have VA enabled and your drivers support it (seems they do since VLC is apparently using it) your video will be decoded via the CPU.


I got the same problem after upgrading to 20.04 from 16.04. As mentioned above in the comments using CRTL+ALT+T brings up the terminal. Use sudo apt install gnome-shell-extension-ubuntu-dock command to install the dock (launcher) and sudo apt install gnome-shell-extension-desktop-icons to install the icons. You can add --reinstall in this command if it was already installed before. You will need to logoff and login again to get the dock and icons back.
For the blue screen, just right click and choose "Display Settings". Go to "Background" from the left pane to pick your favourite background.


Ethernet Network not showing or connecting in Ubuntu 17.04

According to this bug report, the solution is to add a missing configuration file to NetworkManager, then to restart it.

It worked for me :

sudo touch /etc/NetworkManager/conf.d/10-globally-managed-devices.conf
sudo systemctl restart NetworkManager


First of all, yes user names are case sensitive. In general, in the Linux world, assume that everything is case sensitive, there are very few (if any) exceptions. By default, all user names are lower case so unless you have changed something, yours will as well.

Now, to list the users available on the system, you can do this:

 sudo cut -d: -f 1 /etc/passwd

If you are currently logged in, you can find out your username with

whoami

In bash and some other shells, the username is stored in $USER as suggested by Avinash but that is not always the case:

$ echo $USER
terdon
$ USER=bob
$ echo $USER
bob
$ whoami
terdon

If you have forgotten your username, this will not help since you won't be able to connect. The easiest workaround would be to use an Ubuntu CD/USB and boot into a live session. Log into your live system and mount the / partition of your installed Ubuntu. This is usually /dev/sda1 but that will depend on your setup. If you need help figuring out which to use, edit your question and add the output of running sudo parted -l from the live system. Anyway, assuming the partition is indeed /dev/sda1, you will need to run these commands to mount it:

sudo mkdir oldroot
sudo mount /dev/sda1 oldroot

Once you have done that, get the list of users on the system with

 sudo cut -d: -f 1 /oldroot/etc/passwd

Alternatively, you can list the contents of /home, your home directory is usually the same as your username:

ls /oldroot/home


Is that possible to run the image ubuntu 14.04 64 bits-Oracle 11g in virtual box in parallel in mac?

Parallels Desktop provides nested virtualization support (Intel VT-X technology) that allows you to run virtual machines inside Windows 10, 8 and Windows Server 2012 virtual machines.

To enable Hyper-V support in Parallels Desktop Pro and Business Edition:

Go to Actions menu -> Configure -> Hardware -> CPU & Memory. Click the gray downward pointing triangle ▼ to expand Advanced Settings and tick the Enable nested virtualization checkbox (enclosed in a red rectangle in the below screenshot).

Parallels Desktop 13

In Windows 10

Open VirtualBox, select the Ubuntu 14.04 guest OS, and click the Settings icon (yellow gear) in the VirtualBox toolbar.
You will see a guest OS Settings window that looks like this.

Select System from the left pane of the Settings window.
Select the Acceleration tab.
After where it says Paravirtualization Interface, click the downward pointing triangle and from the dropdown menu select Default.
After where it says Hardware Virtualization, check the checkbox to the left of where it says Enable VT-x/AMD-V.
Click the OK button in the lower right corner to enable the changes.


Swap being consumed despite ram being empty

Fear not. This is expected behavior.
The kernel does not blindly copy back and forth between RAM and Swap. It's a bit more clever than that. Rarely-used data may remain in swap for quite a while.


I don't know what kind of domain you want that cannot be set up with Samba... If I get you right, you probably want some fancy active directory domain, which can be accomplished with either Samba 3 (very complicated) or Samba 4 (still pretty complicated, but easier).

If you want to try Samba 4, I recommend using this appliance from SerNet, which I recently used to set up an active directory domain.


What should I need to do after a CPU/IGP change in Ubuntu 18.04?

Do nothing

I am no expert, but my understanding is, you don't need to do anything to the OS. It should work as before.

Why?

Intel graphics has open source drivers built right into the kernel. The right driver loads automatically. After the upgrade when you boot Ubuntu, it will work like it did before.

This is not Windows

Unlike Microsoft Windows, Ubuntu is open-source and free. This means Ubuntu does not care if you install it in one system and then change the system. In Ubuntu there is no equivalent of Windows Genuine Advantage feature that checks your CPU, GPU and other hardware to verify that the OS is installed in the computer it was licensed for.

So, there is no reason to be afraid that if you upgrade your system your operating system will stop working. Unless the upgrade requires some proprietary driver that is not currently installed.

Hope this helps


grub on a bootable UEFI usb stick to start ubuntu on hdd

thanks for your ideas.
I think starting from usb doesn't work as well because of UEFI/BIOS bugs. But I found a solution:

get Ubuntu 20.04 mini.iso (see post 'Installing GRUB onto a USB stick (Server 20.04)'
burn iso to a usb stick
append the menu entry found in /boot/grub/grub.cfg on my hdd to the one on the usb stick (I had to change hdb2 to hda2 and hd1 to hd0 for some reason).


how do i log into my computer using ubuntu

You should be able to go into your BIOS at startup and select which drive to bout off of. It varies widely from model to model but typically if you press F10 or F12 when you see the computer manufacture's logo the BIOS should pop up.

From here your can use the arrow keys to navigate to "boot options" (or something similarly named) where you can select the appropriate drive.


Searching the internet helped me discover that sudo swapon -s will report whether a swapfile is active or not, and if so, where it is. It turns out that as I suspected I don't have one active, which is pretty surprising but explains a lot of things.

Now I will follow the procedure indicated here to enable one.


Slow WiFi with Ubuntu 18.04 and Intel Dual Band Wireless-AC 3168

What I did to solve this issue is installing the latest stable kernel, according to kernel.org that is at the time of writing 4.17.13.

I installed ukuu, the ubuntu kernel update utility using the ppa from "Tony George" (https://launchpad.net/~teejee2008/+archive/ubuntu/ppa):

sudo add-apt-repository ppa:teejee2008/ppa
sudo apt update
sudo apt install ukuu

Then run ukuu either through the console (ukuu --help) or use the graphical version which can be found in the menu. Install the latest stable kernel and reboot.

Warning: There might be some issues; if they persist after a reboot, during the boot sequence, select your old kernel version (4.15 on my machine).


This is a known bug:
https://bugzilla.gnome.org/show_bug.cgi?id=403130

The solution "is practically impossible. The code ... is terribly complicated, I'm afraid to touch it."


Windows programs can not be run in Linux directly, both systems are too different.
Linux has a ton of applications, FileZilla and 7zip for example are available as native Linux programs ready to install and use.

If you want to use windows programs on Linux than you need to install a runtime environment like Wine. Installation instructions can be found here (WineHQ).

Please note that you still need to have a license for all applications you use in wine.


Anything with a bunch of small files will be slow via NFS vs. a local filesystem.

First off you could start looking at tuning your NFS options. I found some of these resources:

http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.prftungd/doc/prftungd/nfs_stats_tun_params.htm
http://veerapen.blogspot.com/2011/09/tuning-redhat-enterprise-linux-rhel-54.html
http://www.techrepublic.com/blog/opensource/tuning-nfs-for-better-performance/64

The IBM article is particularly important, as you tune the available settings on the clients you can use nfsstat on the server to see what's going on.

Other Options to look into:

One thing you can consider is caching your NFS mounts: How can I cache NFS shares on a local disk?

Since that requires changes on the client side (you don't have to touch the server), you might want to grab a node, mount it with caching enabled, and then do a few runs of some builds to see if it improves the situation.

One thing I've done in this situation when deploying large NFS /home systems is to provide some space on the client machine(s) that is on local disk for users to use for IO intensive tasks, like /var/$username, but depending on your space requirements that might not be an option for you.

Caveats

It sounds like you're doing pulling and compiling via NFS homes, when I did this at a University where the situation is "Okay everyone in this 50 person class, pull this source and type make!" this can totally crush responsiveness to a machine depending on what people are building.  You'll want to experiment with your NFS settings and measure performance to squeeze the most you can out of it.


Why does my Ubuntu system use more disk space than how much it describes so?

I recommend you to install ncdu - which is a very nice graphical disk usage app.

sudo apt install ncdu

Then start it in a terminal

ncdu /

After some time, it will show you what eats your disk space.

You can navigate the in the terminal with your arrow keys, and drill down into sub directories by hitting the enter key and get up with the back key.

Once you know where all the disk space is going to, I guess it is easier to interpret your numbers.


Looks like I fixed it with:

apt install --reinstall tzdata

Resulting in:

    # timedatectl
                      Local time: Wed 2019-09-04 08:42:58 PDT
                  Universal time: Wed 2019-09-04 15:42:58 UTC
                        RTC time: Wed 2019-09-04 15:42:58
                       Time zone: America/Los_Angeles (PDT, -0700)
       System clock synchronized: no
systemd-timesyncd.service active: yes
RTC in local TZ: no


How to stop GNOME from adding bars, clocks, menu, etc. every time I restart X or log in?

Which ubuntu version you are using?

If it is 12.04 amd64 you can go to this launchpad bug and download last two attached .deb packages which includes fix.

In ubuntu 13.04 is included only half fix for this bug - panels will be created on correct screens, but you will have to manually add objects to other screen panels.


how to run the files within a folder using an executable file?

mike1/100/./zacros.x

is invalid. The . goes at the FRONT of the command if you are at the directory where mike1 is in.

./mike1/100/zacros.x

When zacros.x is inside /100 and you are 1 dir lower you do

cd mike1/100
../zacros.x

If it is inside mike1 (so you are 2 dirs lower):

../../zacros.x

You can also do

../../mike1/100/zacros.x

if you are 2 directories deep and need to go into 2 other directories.

edit

cd build
./zacros.x /mike1/100

why do you put a / in front of mike1? The system will try to find it at the root of the filesystem. Please point to it relatively from the dir Zacros: use ../mike1/100 to go 1 up from Zacros or mike1/100 if you have mike1 in Zacros.

  Let me clarify, here is the executable: Zacros/build/zacros.x, the files are in the following directory: mike1/100/. If I type what you suggested: cd build ./zacros.x /mike/100, it says it is not valid.

If those are relative paths from the beginning:

cd Zacros/build/
./zavros.x ../../mike1/100/

could be what it need to be. But that is assuming those 2 are in the same directory.


Answered in comments by OP:

  I fixed it changing keymap option Emac to default. Thanks.


How to install Ubuntu Trusty 14.04 in a qemu virtual machine

The error above turns out to mean: "not sufficient system memory to load ramdisk".

So if I start qemu with -m 512 then everything works as expected.

On the other hand I'm a bit puzzled which resources tells me the minimum system requirements for Ubuntu 14.04. For example this page says it's 512 MiB RAM and 5 GB of hard-drive space while this page tells me it's 1.5 GB RAM and 7 GB of hard-drive space.

The latter seems more authoratative but a minimum of 7 GB of hard disk space is not the same value that is given during the installation process where it says that at least 6.5 GB of space are needed.

In fact, the 6.5 GB are not really true either. It turns out that the following two commands create a qcow2 and bare disk image of minimal size, respectively:

qemu-img create -f qcow2 ubuntu-trusty.qcow 6527123968
fallocate -l 6527123457 ubuntu-trusty.img

The values are curious because

they are different (but this might be due to the qcow format)
because 6527123968=12748289*512
because 6527123457-1=12748288*512
because neither one or the other are close to either 6.5 GB or 6.5 GiB. They are about 6.53 GB or 6.08 GiB
the installer forces me to create a 6.08 GiB disk image but ends up only using 3.4 GiB of the primary partition

But this is now way off topic ;)


How can I set up Landscape on Premis if the package is missing?

Before running sudo apt install landscape-server-quickstart you need to add Landscape PPA:

sudo add-apt-repository ppa:landscape/17.03
sudo apt update

Also, please keep in mind that Landscape server is available for Xenial (16.04) or lower. If you are using 17.10 or 18.04 you will not be able to find landscape-server-quickstart.

Hope this will help!


installing ubuntu 14.04 in dell inspiron 15

Basically, when installing any Linux (such as Ubuntu) you should refer to their "Linux" device name. "C" is a Microsoft/Windows term for the primary drive (or actually partition). In Linux most modern hard-drives would be named sda (for primary HDD), sdb, sdc, etc. and partition within a specific drive would be sda1, sda2, etc. (for partitions of primary HDD).

So "C" refers to specific partition in your primary drive. Specifically, since you refer to a latop (Dell Inspiron 15) which has an internal space for just one HDD, I assume that you actually mean: "Can I avoid overriding existing data (or OS) that I already have on the partition where my Windows runs?"

You need to tackle two obstacles to make this:

Your current "C" drive is probably occupying almost all the free space left on the internal drive. You would need to use a tool like "Gparted" - booting it from a live CD and resizing (Shrinking) the partition that currently holds "C" and making space to create new partition for Ubuntu's  (root) partition.
Follow the instructions pointed by previous answers in order to install Ubuntu on the new partition you created, and not on the existing partition that holds "C".


The ability to continue to run Upstart should be considered temporary. Over time (or already?) some projects which will quit providing Upstart init scripts, so your transition to systemd will happen eventually if you stick with Ubuntu.

However, the service command continues to work with systemd on Ubuntu 16.04 and beyond as it did before with Upstart.  I expect this command will exist for a while.

If your primary concern is being able to use the service command, there is no need to switch back to Upstart for that.


It seems to be something with Unity window management. I installed Gnome shell instead and by switching to Gnome Classic (no effects) I got everything to work.

sudo apt-get install gnome-shell

And then changed window manager at login screen.


How to turn off remembering the position in file for SMPlayer?

Launch SMPlayer and open Options > Preferences (or simply press ctrl+p). In General section, under Media settings uncheck the "Remember time position" option.


Is it possible to replace notify-osd with Gnome 3 Indicators?

You should just use GNOME Shell in 11.10, it will work as expected.


This worked for me . Now  Plug-in installation successful .
Install apparmor utils
sudo apt-get install apparmor-utils

Run
sudo aa-disable /usr/share/hplip/plugin.py

Run as normal user, not as root:
hp-plugin


Why do I keep getting 'failed to download' error whenever I try to download anything from the terminal?

Ferramosca Roberto's Java PPA doesn't seem to be up anymore. This is a PPA for Sun/Oracle Java; my guess is that licensing changes preventing up-to-date versions (later than 6u26) from being provided, so after a while he no longer considered it useful to keep up. But that's just a guess.

I recommend removing the PPA; this explains how; this may help too. I'd use ppa-purge for this, since you'll also want to remove the software provided by that PPA (and replace it with something up-to-date); this explains ppa-purge (this simple answer is probably all you need).

Then, if you want to use Oracle's proprietary Java runtime, this explains how. That should achieve what you were using the ppa:ferramroberto/java PPA for before. Or you may prefer to use the OpenJDK (which is also official); for that, this might help.

In short, to remove the broken PPA with ppa-purge and install the latest stable version of Oracle's proprietary JDK, you can run:

sudo apt-get install ppa-purge
sudo ppa-purge ppa:ferramroberto/java

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

Source: This answer to that question (for the last three commands).

Unlike some old PPAs, packages from that PPA can provide the latest versions of Oracle Java even with their licensing restrictions prohibiting distribution by unauthorized parties. The way this works is that the packages don't actually contain Oracle Java; instead, they contain scripts that automatically download them from authorized download sites, and install them. Meanwhile the packages manage what version is installed, so it works similarly to the way it would work if the packages did directly provide the software.

Java 8 exists, and you can install it with oracle-java8-installer. But it's still in testing; it's not recommended for general use. Similarly, the old Java 6 still exists, though you should check to see if it still get security updates before using it. To install that, you'd use the oracle-java6-installer package.


I had partial success today. One of the most helpful diagnostics is:

systemd-analyze plot > <some_file_name>.html

Use a browser to view it.
This made it clear that powerd.service was the biggest problem. It never actually got started, and the boot just waited until it timed out.
Since powerd.service never really started, I figured I wouldn't miss it if it wasn't there, and, sure enough, I removed the powerd package and now the boot time is just slightly over a minute(vs. 3.5 minutes with it).

I really don't know if powerd is supposed to be running on my computer(a laptop) as it seems all the documentation I can find describes it's use for a phone. Anyone know if this is true?

The next slowest service to start is wicd.service.   This actually gets started, but takes about 36 seconds.  Not sure why, but that is the next thing I will look at.


How do I install qBittorrent from the tarball?

Checked the conf.log and it actually expects libtorrent to be available. The steps to be followed are here

https://github.com/qbittorrent/qBittorrent/wiki/Compiling-qBittorrent-on-Debian-and-Ubuntu

I tried it myself and it works :)


Forwarding contact via SMS Ubuntu BQ Aquaris 4.5

Open the contact you want to share > Click on Share > Choose Messaging app > Enter number/contact you want to send the first contact to and click on send.

The sending works. The contact is sent as an MMS.

Sharing via QR code (Tagger app) is possible as well.


Bash Startup not showing color on bash input line

Your bash app appears to be corrupt. Uninstall it and reinstall it. You won't lose anything that you have made.


Do application indicators work/help outside Linux?

Potentially, yes. They use DBus as a transport mechanism and this is available for Windows, for instance. So you'd write a Windows notification icon that rendered itself based on the DBus data and the indicator would appear as a normal Windows notification icon. The same is true for OS X.


Difference between convert -sample and convert -geometry

You can find an explanation of the different resize options in ImageMagick on there website: http://www.imagemagick.org/Usage/resize/#other


imagemagick crop images to specific aspect ratio?

Two things to consider:

Simple resizing with or without aspect ratio conversion
Cropping with aspect ration conversion

I address each in turn:

1. Simple resizing with or without aspect ratio conversion

imagemagick by default will maintain the preexisting aspect ratio of an image during conversions. Using this test image:

which conveniently has the dimensions of 100x100 an attempt to resize to 300x150 with this syntax will silently fail:

convert test.png -resize 300x150 300_test.png

and will produce a 150x150 image:

To force imagemagickto actually produce your 2:1 aspect ratio image the following slightly different syntax is required:

convert test.png -resize 300x150\! distort.png

And this achieves a 2:1 aspect ratio, with distortion of the original image of course:

2. Cropping with aspect ration conversion

If you would prefer to simply and automatically crop an image to a specified aspect ratio the easiest way is to use one of Fred's ImageMagick Scripts: 'Aspectcrop'. Usage on our test image is simply:

./aspectcrop -a 2:1 test.png Fred_wins.png

and the resulting image has been successfully cropped to a 2:1 ratio:

The other option to be manipulated is -g gravity which defines which part of the image is used for cropping. The default is center, all options are:

center (c)
north (n)
south (s)
east (e)
west (w)
northwest (nw)
northeast (ne)
southwest, (sw)
southeast (se)

So to give an example of this using north:

./aspectcrop -a 2:1 -g n test.png north.png

The results are:

If you needed to use this script for a batch load of images in a single directory you could use a bash 'for' loop. First place the script correctly and set it to executable:

sudo mv aspectcrop /usr/local/bin
sudo chmod +x /usr/local/bin/aspectcrop

This makes it a lot easier to use the script. Then run the 'for' loop from within a directory of images:

for i in *.png
do
aspectcrop -a 2:1 -g n "$i" "${i%.png}_cropped.png"
done

This loop can be varied according to the type of input and output files, different locations etc. You could also produce a similar syntax that will search recursively for images. Lots of possibilities...

I think that is all pretty cool :)

References:

Imagemagick: Resize or Scaling (General Techniques)
Fred's ImageMagick Scripts: 'Aspectcrop'


Windows 8.1 fails to boot after 14.04 upgrade

As far as I can see you have 3 drives and there is no indication that you use UEFI booting or GPT partition tables (similar to what oldfred already posted in the comment above).

Windows 8 seems to be installed in sda1, but Grub installed in it's MBR. I don't recommend this, you should have the Windows boot loader in the MBR of this drive so that Windows can boot independently from Ubuntu if you select this drive from the BIOS menu to boot from.

  windows specific instructions - (from windows live boot)

I'm not sure what you mean, but running bcdboot C:\Windows\ /s C: from the installation media or another Windows 7/8/10 installation creates a new boot configuration in C: (change appropriately to your system if necessary, includes writing the bootloader, more info on the Technet page). Up until this point, there is nothing related to Ubuntu.

sdb1: __________________________________________________________________________

    File system:       Extended Partition
    Boot sector type:  -
    Boot sector info:

  […]

/dev/sdb5:The OS now in use - Ubuntu 14.04 LTS CurrentSession:linux
/dev/sda1:Windows 8 (loader):Windows:chain

This looks very odd. You have a non-bootable extended partition and therein the volume bootloader (or PBR) of Ubuntu. Please back up the Ubuntu installation and restore it to a primary partition (then run grub-install with the appropriate parameters or boot-repair to restore boot functionality). You should have no future issues related to this problem after you do this.

Related:

How to back up my entire system?
GRUB does not detect Windows - Instructions for how to detect a Windows installation with OS-prober and include it in the Grub menu.


Installed un-encrypted Ubuntu 16.04 on encrypted Windows Machine - Unsecure?

You always need the right key to decrypt the Windows data. So, although you have an unencrypted Ubuntu partition, it doesn't mean that the Windows data is now unencrypted as well. The two OS are totally separated from each other.


How to open magnet torrent links from Firefox in rTorrent?

The problems usually lie with mime type and default handlers.

Firstly, have you changed Firefox's about:config settings? ie:

network.protocol-handler.expose.magnet -> false

and reset other options
as per this Firefox deluge Q&A.

Have you set up rTorrent to watch any particular directory?

FILE: ~/.rtorrent.rc

# Maximum and minimum number of peers to connect to per torrent.
min_peers = 50
max_peers = 80

# Maximum number of simultanious uploads per torrent.
max_uploads = 5

# Global upload and download rate in KiB. "0" for unlimited.
download_rate = 0
upload_rate = 50

# Default directory to save the downloaded torrents.
directory = $HOME/torrents/downloads

# Watch a directory for new torrents
# SET your watch directory here --v
schedule = watch_directory,5,5,$HOME/torrents/watch/*.torrent

port_range = 60125-64125
port_random = yes
dht = auto

# UDP port to use for DHT.
dht_port = 63425

# Enable peer exchange (for torrents not marked private)
peer_exchange = yes

# Check hash for finished torrents.
check_hash = yes

encryption = allow_incoming,try_outgoing ,enable_retry

Then it is a simple matter of "save as" into $HOME/torrents/watch.

Change $HOME/torrents/watch to whatever torrents subfolder you use, or at least $HOME to /home/username

Create a file and add the following script:

FILE: maglink-rtorrent.sh

#!/bin/bash

cd $HOME/torrents/watch    # set your watch directory here
[[ "$1" =~ xt=urn:btih:([^&/]+) ]] || exit;
echo "d10:magnet-uri${#1}:${1}e" > "meta-${BASH_REMATCH[1]}.torrent"

Don't forget to make it executable

chmod +x maglink-rtorrent.sh

This also offers the ability to download from terminal by:

cd $HOME/torrents/watch
./maglink-rtorrent.sh "MAGNET-LINK-HERE"

Further awesome Service Tips and rTorrent setup options here.

Futher credits:

magnet links and command line 1
magnet links and command line 2

Update 2:

If not using rTorrent, but kTorrent or qBittorent, then this following is the way to get that running:

# check defaults
xdg-mime query default x-scheme-handler/magnet
gvfs-mime --query x-scheme-handler/magnet

# set defaults
xdg-mime default qBittorent.desktop x-scheme-handler/magnet
gvfs-mime --set x-scheme-handler/magnet qBittorrent.desktop

There's a further setting (from memory) for whether you require commandline.

For rTorrent though, this link is the FlexGet rTorrent Magnet URI Handler

Full information here.

Hope this helps.


Broken USB-drive not given a name with lsblk

sorry if this does not help, but did you try booting the pc with the stick plugged in to see if it recognizes it? i guess so the bios can see it.

i found this thread working on something similar.

i did a dd for an iso, now my stick will not automount. i thought i bricked it, but left it in the slot and noticed it was blinking when i rebooted the machine. at that time i ran dd again to undo the original hybrid config "that distro!!" needed. once i had a single partition again, i formatted it and then i could write to it. but it was still not automounting.

so now, i can only access it, if i boot with it in the usb slot and if i remove it during a session, lsblk no longer sees it, but lsusb does, as well as a syslog that has led me nowhere.

output of syslog

usb 1-2: can't set config #1, error -110
mtp-probe: checking bus 1, device 4: "/sys/devices/pci0000:00/0000:00:1a.7/usb1/1-2"
mtp-probe: bus: 1, device: 4 was not an MTP device

it i have to reboot the pc to get hold of it again. i've redone dd, tried testdisk, gparted (made new partition table) and did a 'clean all' in windows disk part. it will even boot the pc with systemrescue, but it will not automount.


What's a good tool for creating .epub format e-books?

Try Sigil, from here; http://code.google.com/p/sigil/

This is an excellent program for creating .epub files, works almost like a word processor

After a lot of frustration with other applications I can say this one works, has good support for .svg images and tables just code your tables as xhtml,  it can easily import an existing .epub too.


How do I share my screen to airplay / AppleTV?

No.  Airplay is a proprietary protocol that hasn't been fully reverse engineered.  That might even never happen.

If you are not bound to Apple, you might look into DLNA.


cant boot to windows after installing ubuntu 15.04

Install Grub Customizer, it lets you configure what options do you see in the 'purple screen'.

You can install it via the Terminal by:

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer


How to get smooth scrolling in Nautilus?

This feature is not available in Nautilus, sorry.


Unable to boot ubuntu on a surface pro 2 with virtualbox

Many virtual machines and 64-bit processors can only handle 32-bit guest systems.

This may also help - Cannot install Ubuntu in VirtualBox due to "this kernel requires an x86-64 CPU, but only detects an i686 CPU, unable to boot" error


Creating an application launcher icon for Android Studio

This is so simple...

Go to Android Studio > Tools > Create desktop Entry


Unable to mount external HDD with SABRENT Drive enclosure

Maybe is a controller bug

To lists block devices,open a Terminal:

> lsblk

probably you will see a raid0 FS (fake).

Fix using mdadm

  sudo mdadm --stop /dev/md(your-id)

open gparted,format the HDD then set FS label like device name.

now you can mount !


IF function returning TRUE/FALSE instead of referenced cell values

The correct syntax is =IF(AA2<=4;X2;0). Note the semicolons instead of commas.


The first thing to check is if the Rubbish Bin / Trash folder is full - if so, empty it.

There are a few things you can do to find out what's using your disk space.

Use the Gnome Partition Editor tool GParted check that the size of the partition is what you think it is.

You can install it from Ubuntu Software Centre (search for "gparted") or from a terminal:

sudo apt-get install gparted

You should then be able to find it in the Menu, either as "GParted" or "Partition Editor". You might need to enter your password to run it. This will show you your disk and the size of each partition.

If you have more than one hard disk installed, select the appropirate one at the top right of the screen.

If you decide to make any changes to your partitions with this tool (or any other) then make sure you back up anything you want to keep before you start.

There is also the Disk Usage Analyzer tool, which has the unusual name "baobab". If not installed by default, install via the Software Centre, or from a terminal with

sudo apt-get install baobab

This program works better if run as root, because there are certain files not visible to normal users. Run this command  (ALT + F2)

pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY baobab

and enter your password.


Compiling apib undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'

OK, I have found it - there was an error in Makefile

APR_ONLY_LIBS did not have libthread linked :

APR_ONLY_LIBS = -lapr-1

So I changed it to :

APR_ONLY_LIBS = -lapr-1 -lpthread


This worked for me, you can try this..(Works for python 2.7)

$ sudo -H python -m pip install --upgrade pip setuptools wheel
$ sudo -H pip install xlib
$ sudo -H pip install xlib>=0.17
$ sudo -H pip install pynput


Please assist with partition management- cannot reformat drive to install Windows?

No, you will not damage your drive (unless you have bad sectors).

Think of LVM as a partition that can hold other partitions. You can delete LVM the same way as you delete any partition. It's perfectly safe. I would recommend re-formatting the entire drive to NTFS, anyways.


I found that the DBus Module was not loaded.

if you're using Ruby you can call:

%x{pacmd load-module module-dbus-protocol}

Works on the command line too:

pacmd load-module module-dbus-protocol


Gigabit connection not working properly on Ubuntu 14.04

Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                     100baseT/Half 100baseT/Full
[...]
Speed: 100Mb/s

The "link partner" is the switch/router/modem to which your computer is connected. Possible explanations for the above diagnosis:

The link partner doesn't support Gigabit Ethernet (or has it disabled for some reason, e. g. to save power).
The signal-to-noise ratio on the connection cable(s) is too low because they lack proper electro-magnetic shielding. This may lead to the link partners agreeing on a lower link speed to maintain a reliable connection. If this is the case, replace the cable (and any other potential connection equipment like wall plugs) by one with at least CAT5e or CAT6 shielding that isn't broken.


Initramfs unpacking failed: Decoding failed. Hard drive dying?

This is the same issue I solved here
In a nutshell :
Here are the steps :

With the selector on your main GRUB entry press e to enter the editor
Find the entry that starts with linux
Delete quiet splash (or anything you have at the end of the line, but not touching any word that starts with a $) from the line (don't worry the change is only going to last one boot) replacing it with nomodeset
(the line should look like this

linux   /boot/vmlinuz-5.9.12-050912-generic root=UUID=<REDACTED> ro nomodeset $vt_handoff

Boot using F10 and wait to be spawned to the DE (if you don't no worry, stike Ctrl-Alt-F2 to enter the tty)
Once logged and within an open terminal run :

sudo -i
nano /etc/initramfs-tools/initramfs.conf

Change the COMPRESS line from COMPRESS=lz4 to COMPRESS=gzip
Save the changes with Ctrl + x | y | Return
then run update-initramfs -u
Reboot and done


How to join Skype for Business meeting on Ubuntu (without Skype for Business account)?

Here is my latest advice about running Skype4B aka Lync on Linux:

It's annoying, but I am almost certain MS will never make Skype4B available on Linux.

The software is "Skype" by brand name only, and has nothing to do with regular Skype which already works on Linux.
Skype4B was always just a renamed version of the very old Microsoft Lync software which works totally differently to Skype regular (which was originally a separate company later purchased by MS).
The other nail in the coffin is that MS will reportedly discontinue Skype4B support in mid 2021.

Good news is that MS is replacing Skype4B with MS Teams which has a web and native Linux binary already. But some corporations could be over a decade slow in upgrading (many still use Lync 2007!).
For a long time I have used the method below to run MS software. It works 100% fine for me.

How I use Skype4B on my Linux laptop:

OK so this is a work-around but it works surprisingly well for me as I very rarely need to share my Linux host screen, or if I do, then its just a MS Office doc which is easy to share within VM.  This is also how I use MS office 2016 on Linux.

All I do is use VirtualBox to create a Windows 10 VM with a little bit of RAM and 2 CPUs and install Skype4B + Office on it and Outlook online to get emails, calendar and links to Skype4B meetings. I pass through my audio and microphone to the VM.  Make sure you install the VirtualBox Extension Pack on host and Guest Additions within VM to allow seamless resizing, drag and drop files and shared clipboard with host.  This will give you an almost seamless experience on a decent PC.

Now this sounds like a crap solution but just try it and you might be surprised. Windows 10 boots up very quickly in VM, especially if you remove all bloatware and auto-login.  The key is to install the Virtual Box extras mentioned above which allows the VM to works seamlessly with the Linux host OS (window resizing, shared files and clipboard).

Windows 10 DOES NOT require a license, just get the official ISO from MS website and install without a product key, it works fine but just disables a couple features like change color scheme and desktop background.

Edit: forgot to mention, if you dont have a Skype4B account, that is fine, just click the link and it will install the web version (msi) and you can join.


Wireless only semi-working with Lenovo Ideapad S10-3t netbook (driver Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller)

Thanks to @chili555's first pointer, I could dig enough and fix my problem. So I'll summarize it here (and post a final question).

There are three kind of Broadcomm wifi drivers that apply to this situation (taken from here):

Driver                         Description
  broadcom-wl              Proprietary Broadcom STA driver
  b43                             Reversed engineered (open source) kernel driver
brcmsmac/brcmfmacOpen source Broadcomm kernel driver

So, apparently, Ubuntu came pre-installed with broadcom-wl enabled. As this Kernel spec page says, the b43 is not an option (it says "No (WIP)") for my hardware ID 14e4:4727, and the alternatives are wl and brcm80211 (the latter got renamed to brcmsmac). So then simply removing the package of the proprietary driver will make the brcmsmac start working (without installing any additional package because, as it is open source, this driver is embedded in the kernel):

sudo apt-get purge bcmwl-kernel-source

After rebooting and deleting my previous network-profiles saved in NetworkManager, this started working.

So, now the question is, how to fix this upstream so Ubuntu 13.10 comes without the proprietary driver package installed in case it finds this hardware?


How can I make a program start at a higher priority?

By using nice, see man nice;man renice. Something like (I haven't tried exactly this):

sudo nice -n -1 sudo -u $USER /path/to/pulseeffects


Make browsers like chrome and firefox go through VPN

I solved the the problem !
The problem was DNS ,so you should first install resolvconf , but why?? when you use this feature your system first read the dns server from this and then write it to /etc/resolv.conf so for installing this you should simply run this command :

sudo apt-get install resolvconf

And after doing that you should edit head file in the /etc/resolvconf/resolv.conf.d/head and put the DNS servers like in it :

nameserver 1.1.1.1
nameserver 8.8.8.8
nameserver 1.0.0.1
nameserver 2606:4700:4700::1111
nameserver 2606:4700:4700::1001

And for more sure you can go to your vpn connection and put the DNS in that too.


It appears, that the meta-packages linux-generic, linux-image-generic, linux-headers-generic are out of date. You can try

sudo apt-get dist-upgrade -f

to upgrade them and fix issues with unconfigured packages (-f).

Alternatively, telling apt-get to install linux-generic should update just those packages:

sudo apt-get install -f linux-generic


There is a driver problem with this wifi-adapter (Chipset: Realtek RTL8188CUS).

See How to install driver for RTL8188CUS Wireless adaptor?

Probably solution:

sudo apt-get install linux-backports-modules-cw-3.6-precise-generic


Mount error, special device does not exist

Did you re-partition that disk recently?  That's the only thing that comes into my mind that could cause the kernel's understanding of the partition layout to differ from fdisk's.

If so, you need to tell the kernel to re-read the partition table with

sudo blockdev --rereadpt

(This used to be sfdisk -R, but sfdisk dropped -R in version 2.26.)

This can fail (with an error message) if you have any of the partitions of that disk already mounted.  Unmount them and try again.  Sometimes that's not possible (e.g. when your root partition is on the same disk), and you have to reboot instead.

(There is actually a way to force the kernel to re-read the partition table, which ought to be safe enough if you didn't change the sizes or positions of any of the mounted partition, but I don't remember the exact command line.  I think it involves partx or kpartx.)


To be able to open executables with double-click:

Open Nautilus
Open the menu Edit > Preferences > Behavior > Executable text files
Choose either:

Run executable text files when they are opened
Ask each time


How do I reinstall the sound icon / sound menu?

You need to reinstall indicator-sound, then log out and back in:

or sudo apt-get install indicator-sound via the command line.