"Misaligned partition" - Should I do repartition (how?)

There's two issues usually involved here.  I think the main problem is that the physical sector size on the disk might be (say for example) 4096 bytes whereas the logical sector size is usually 512 bytes.  Where the start of the partition is not at the beginning  of the physical sector a discrepancy occurs with how the disk is read.  This can mainly cause a performance problem on some machines with some drives.  I don't believe it will actually cause any loss of data or similar problems, however I'm not a disk drive engineer.

The second issue is that Linux disk utilities and the ext file system in general seem to assume that partitions should line up with the cylinders on the hard drive.  I've seen it written that if a cylinder extends past a cylinder boundary and the next partition starts in the same cylinder, data corruption could result.  Sorry I've got no firm reference on this and google seems to be finding anything but information on cylinder alignment, but it had something to do with ext2/3/4 assuming that it could write to the end of a cylinder under certain circumstance.

Usually, I set up partitions with Gparted before I start the installation (gparted is on the LiveDVD) and then select how I want to use the partitions manually by selecting "do something else" when I get to that part of the installation.  It's usually later that I realise that Gparted has left a few MB of unused space either at the end of the drive, or if I've set up the whole drive with Gparted, right at the end.  Here's the exact example of the drive that I'm on at the moment.  Note that I have two boot partitions of about 20Gb, with a the rest of the drive being an extended partition containing the swap partition and /home.  Note the 2Mb of unallocated space right at the end of the extended partition.  This was Gparted's doing, not mine.  I've seen other disks that (for example) might have some unallocated space beteen the primary partitions or before the extended partition because the partitions were created at different times and with different programs.

Since it is only a few MB, and after reading the information about the potential problems, I usually let it be.  If Gparted wants to take a belt and suspenders approach I'm quite happy to let it do so.

I suggest you boot off the LiveDVD/USB again and just resize the ext4 partition Ubuntu is on with Gparted.  I think you'll find that Gparted will try to align the partition with the cylinders, and this should solve the problems for you.  Don't bother re-installing unless the resize breaks the Linux boot in some way.

During my google searches I did find information about Gparted aligning to full MB figures, but this is not my experience.  The amount of space left is more like a cylinder's worth, rather that something that denotes MB boundaries.


Xubuntu: Wireless connection using Broadcom BCM4318 fails

Temporarily connect to the internet by other means and run in a terminal:

sudo apt purge bcmwl-kernel-source
sudo apt install firmware-b43-installer

Immediately or after a reboot, you Wi-Fi adapter should be up and running a normal way. You will be able to connect without tinkering with weird terminal commands.


It definitely won't remove LightDM, since that's currently the display manager for Ubuntu. The upgrade shouldn't remove your alternate desktop environments, but if it does, then you simply need to reinstall them again though software center.

Graphics drivers are a little more challenging. You'll need to open System Settings, then click on Software and Updates (near the bottom).

Next, you'll want to click on the right-most tab (labeled Additional Drivers), then have a look at what's listed there. If there are any binary drivers selected, you'll see a line at the bottom saying "1 Proprietary Driver is in use." If you see this, you'll want to choose the X.org drivers instead. On my system, with an Nvidia graphics card, I see this initially:

And after selecting the correct driver, I see this:

After this, you can click on Apply changes at the bottom, then restart your system. After this, you should be good to upgrade to 12.10 without any issues.


At the top left of the window you can find the button to go back. If you want to do that on the keyboard hold ALT and press left arrow (if you want to go back) or right arrow (if you want to go forward).


Headphone not working on Ubuntu 17.04 - Dell XPS 15

I think I solved the problem for my XPS12. The answer is based on this question: Microphone is not working on Ubuntu 16.04

I executed hdajackretask (see image in the question mentioned above)
I checked the "Show unconnected pins" check-box
For every "pin" that had a "Headphones" option in its drop-down, I checked the "override" check-box and selected the "Headphones" option.
I clicked the "Install boot override" button.
I restarted, and the speakers worked fine.

Something important to note is that if you just play with other possibilities and press apply, for some reason, in my case, switching back and forward the same option, sometimes didn't work...

Another thing to note is that, after rebooting, I opened the hdajackretask and the options didn't look exactly the same way I left them before reboot...

Bottom line: the headphones/speakers now work for me.

Good luck!


Sound is available from speakers only when 'Headphones (unplugged)'' is selected

It seems PulseAudio is not recognizing in a proper way your Speakers, so it uses the headphones output for both: headphones (when plugged in) and speakers (when plugged out)

Since by default PulseAudio is using the "Speakers - Built-in Audio" and your speakers work properly when you select "Headphones (Unplugged)" in pavucontrol you can tweak PulseAudio so it sets by default the Headphones option, even if it is unplugged.

First you need to identify the output device using pactl. Run: pactl list short sinks on a Terminal. You should see a list of all your output devices. Maybe you could not get at first which is the correct device, but you can guide with the name.

In my case I get this:

$ pactl list short sinks
0   alsa_output.pci-0000_00_1f.3.analog-stereo  module-alsa-card.c  s16le 2ch 44100Hz   IDLE
1   PulseEffects_apps   module-null-sink.c  s16le 2ch 44100Hz   RUNNING
2   PulseEffects_mic    module-null-sink.c  s16le 2ch 44100Hz   IDLE
3   bluez_sink.C0_28_8D_93_25_42.a2dp_sink  module-bluez5-device.c  s16le 2ch 44100Hz   RUNNING

Run pactl set-default-sink 'copy-paste-here-the-device-name'. This will set as default the device you have chosen before. If you chose the correct one your speakers should begin working.

In my case (using the 1st sink):
$ pactl set-default-sink 'alsa_output.pci-0000_00_1f.3.analog-stereo' works for my speakers.

Now you have recognized the correct output device for your speakers you can tweak PulseAudio so it by defaults use it.

Use a text editor as superuser and open this file: /etc/pulse/default.pa. Usually gedit works on Ubuntu. Scroll to the bottom of the file where two lines starting with set- will be commented out.

Uncomment the set-default-sink output by removing the # icon at the beginning. Replace the word output with the number of the source you want to be the default.

In my case it worked with: 0   alsa_output.pci-0000_00_1f.3.analog-stereo for my speakers. So the uncommented line would look like this:

After doing this, delete the ~/.config/pulse directory, and then reboot the system. Once the system comes back up, the appropriate devices should now be set as the defaults.

The downside to this approach, will be that if the device list changes, the indexes of the devices may also change, meaning this process may need to be repeated.

I used this guide to answer this question.

Hope it helps!


System goes unresponsive when I close the laptop

May not be appropriate as a definitive answer but I don't have the privilege yet to post comments.

Have you checked that you energy management is not set so that your computer goes in hibernation or suspend-to-disk mode when closing the lid (screeen) ?

If this is the case, then you have two solution:

Set up your computer to go properly in hibernation or suspend-to-disk mode (maybe tricky)

or

Disable set the energy mode option on "Do nothing" when closing the lid.

Regards,


Netflix error code F7355-1204 and F7363-1260

You need to install codec (copy and paste in the terminal).
sudo apt install ubuntu-restricted-extras

Also, a browser extension may be causing the problem, try disabling them.


Is it possible to install drivers used on Windows for Ubuntu?

Unfortunately you can't do this. What do you mean by no drivers for your computer? Wireless networking, video, Ethernet?


Thanks to tobu in ServerFault:

Simple:

grep ^Package: /var/lib/apt/lists/ppa.launchpad.net_*_Packages

Or more flexible:

grep-dctrl -sPackage . /var/lib/apt/lists/ppa.launchpad.net_*_Packages

For fancier querying, use apt-cache policy and aptitude as described here:

aptitude search '~O LP-PPA-gstreamer-developers'

You shall modify the search queries to meet your requirements:

aptitude search '~O LP-PPA-do-tester'


The 4.4 kernel is not supported in Ubuntu 16.10.

You can use Ubuntu 16.04 on hardware that you claim to be incompatible with the 4.8 kernel.


Ubuntu 18 unity - keyboard (not mouse) freeze, lightdm restart borks system

It turns out that simply tapping touch screen fixes this issue.


If you installation went successfully ...

The normal process is: Open home folder > Go > Computer. You should see all your drives.

If you still do not try install gparted and see if it picks it up.

(assuming you are not having an installation problem)


Every time is open figma-linux it need to log in again

The issue was solved itself after few days. Never knew how.


initramfs will attempt to resume from /dev/sda8 (why is this message and should I set RESUME)

Do you want your system to be able to resume or not?

If not, create /etc/initramfs-tools/conf.d/resume with the contents:

RESUME=none


To install GMate, you have first to add the right PPA.  To do so, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the commands below:

sudo apt-add-repository ppa:ubuntu-on-rails/ppa
sudo apt-get update

Once that is done. then you can run:

sudo apt-get install gedit-gmate

See image below:


Interpreting uname output: 32 or 64 bit?

From man uname:

  -a, --all
                print  all  information,  in the following order, except omit -p
                and -i if unknown:

   -s, --kernel-name
          print the kernel name

   -n, --nodename
          print the network node hostname

   -r, --kernel-release
          print the kernel release

   -v, --kernel-version
          print the kernel version

   -m, --machine
          print the machine hardware name

   -p, --processor
          print the processor type or "unknown"

   -i, --hardware-platform
          print the hardware platform or "unknown"

   -o, --operating-system
          print the operating system

So in your case:

Linux       rufusruffcutt 3.2.0-35-generic-pae #55-Ubuntu SMP Wed Dec 5 18:04:39 UTC 2012 i686 i686 i386 GNU/Linux

So you have a machine hw which is  i686, a processor type i686, and a hw platform which is i386.

In Ubuntu builds, i386 are the 32-bit builds; in a 64-bit system they would be x86_64.

Using uname -i should give you just the hardware platform.


CPU load not evenly distrubuted over cores

In Virtualbox, you can designate how many processor cores to use. It's default is one. Setting it to two makes the VM work much better. It's generally not good for host performance to set it higher.

To solve the microcode message, in Synaptic, click the RELOAD icon, then the SEARCH icon, enter intel-microcode, mark the only result for installation, then click the APPLY icon. Quit Synaptic. Reboot the computer.

To see if it's really working, in terminal, type dmesg|grep microcode.

Cheers, Al


Allow to mount/unmount a specific device to a specific user

you could create a simple file:

 sudo visudo -f /etc/sudoers.d/myOverrides

with this directive:

 User ALL = NOPASSWD:/sbin/mount -t ntfs /dev/sda2 /home/User/mnt/ntfs

This allow User to runs mount command with those parameter without entering a password.

Here is sudo manual for more details.


I got this going by creating a file /etc/lightdm/lightdm.conf.d/50-manlogin.conf with the following:

[SeatDefaults]
greeter-show-manual-login=true

i got this procedure from here:

https://wiki.ubuntu.com/LightDM


Error: unknown filesystem. Grub rescue. Insmod normal not working

First, sudo mount /dev/sda5/mnt won't do anything because /dev/sda* is a block device and doesn't have a folder in it because...it isn't a folder.

This happened to me.  Boot to the LiveCD again and use:

cat /proc/partitions

to figure out which drive to choose (hopefully you know what size it was).  Then set your grub to the correct root() drive.

To mount it in the LiveCD use

cd ~ && mkdir systmp && sudo mount /dev/*DISK* systmp

Report back with results, of course.


I literally did this 5 minutes ago, lol. ironic. The reinstall is probably no good if it was interrupted. Uninstall is like this, Reboot into the multi-use target by setting it as default 'systemctl set-default multi-user.target' and run 'NVIDIA...run --uninstall' then set target back to graphical.target and reboot again. You should reboot back into the nouveau driver.


grep on --help doesn't work on some commands

ifconfig seems to print its help to stderr instead of stdout. Since piping only passes stdout to the next program, grep does not receive the output.

An easy way around that is redirecting stderr to stdout. Here's an example on how to do that with ifconfig's help.

ifconfig --help 2>&1 | grep unix

produces the wanted output

unix (UNIX Domain) inet (DARPA Internet) inet6 (IPv6)

Update: 2>&1 is what actually redirects (>) stderr (2) to the same output (&) as stdout (1). Since usually both stdout and stderr get printed to your terminal, you don't see a difference, but for piping, the actual stream is important.


Where is the window switcher in ubuntu 12.10?

You can get the functionality the same way that you used to. The only problem being that ubuntu already had super+tab functions reserved. So, either edit these super+tab functions in the unity plugin of ccsm or, just configure some other shortcut keys for the ring switcher.


Question: Installing AMD driver error (Tools missing)

I think I found the problem. https://docs.google.com/file/d/0B5qQst7RKhvqSGJGMlJYSDQwNFk/edit?usp=sharing

I am missing some headers it seems. I don't know how it happened; seems I need to find the tool and add to my system. Thanks for the help.


How to use ecryptfs with a non-home directory

You're only looking at the the super-easy scripts like ecryptsfs-setup-private and ecryptsfs-mount-private, they use the more "generic" tools you seem to be looking for: mount.ecryptfs and ecryptfs-add-passphrase. See their man pages for more info.

And the link Rinzwind posted has all the info you need, further down the page under Manual Setup. They're quite long, but the very very short version would be:

The "Manual Setup" way (archlinux wiki)

First choose an ALIAS as you like. Through this section, ALIAS will be secret. Create the required directories/files:

$ mkdir ~/.secret ~/secret ~/.ecryptfs
$ touch ~/.ecryptfs/secret.conf ~/.ecryptfs/secret.sig

The ~/.secret directory will hold the encrypted data. The ~/secret directory is the mount point where ~/.secret will be mounted as an ecryptfs filesystem.

[Now create the actual mount passphrase (the easy scripts will pick a pseudo-random 32 characters from /dev/urandom), make it a good one]

$ echo "$HOME/.secret $HOME/secret ecryptfs" > ~/.ecryptfs/secret.conf
$ ecryptfs-add-passphrase
Passphrase:
Inserted auth tok with sig [78c6f0645fe62da0] into the user session keyring

Write the output signature (ecryptfs_sig) from the previous command to ~/.ecryptfs/secret.sig:

$ echo 78c6f0645fe62da0 > ~/.ecryptfs/secret.sig

A second passphrase for filename encryption may be used. If you choose so, add it to the keyring:

$ ecryptfs-add-passphrase
Passphrase:
Inserted auth tok with sig [326a6d3e2a5d444a] into the user session keyring

If you run the command above, append its output signature (ecryptfs_fnek_sig) to ~/.ecryptfs/secret.sig:

$ echo 326a6d3e2a5d444a >> ~/.ecryptfs/secret.sig

Finally, to mount ~/.secret on ~/secret:

$ mount.ecryptfs_private secret

To unmount ~/.secret:

$ umount.ecryptfs_private secret

Or you could really get your hands dirty yourself and follow the Without ecryptfs-utils directions.
Or if you already looked at the easy scripts ecryptsfs-setup-private & ecryptsfs-mount-private, you might be able to copy those and edit them to point to your preferred directories, with a little bit of skill & patience.
Or just store the passphrase(s) yourself somehow (securely preferably) and do like the man ecryptfs page's example (must read the man pages):

The following command will layover mount eCryptfs on /secret with a passphrase
contained in a file stored on secure media mounted at /mnt/usb/.

mount  -t  ecryptfs -o key=passphrase:passphrase_passwd_file=/mnt/usb/file.txt /secret /secret

Where file.txt contains the contents "passphrase_passwd=[passphrase]".

Aside about encrypted home folders and an encrypted folder inside home - nested eCryptfs folders

And, an encrypted home folder normally stores files in /home/.ecryptfs/user/, while an encrypted Private folder has files inside your own home folder. You can not use both at the same time, eCryptfs will not do nested encrypted folders. But having an encrypted home, and encrypted folders outside of your home is ok.

I just tried creating a new user with an encrypted home sudo adduser --encrypt-home jack

It created a /home/.ecryptfs/ folder, with:

/home/.ecryptfs/jack/.ecryptfs/ - wrapped passphrase & config files to automount jack's home on login
/home/.ecryptfs/jack/.Private/ - actual encrypted home files, mounted to /home/jack/ when logged in.

And also the /home/jack/ folder, but it contained a link that stays there whether logged in or not:

/home/jack/.ecryptfs/ -> /home/.ecryptfs/jack/.ecryptfs
Next I logged in as jack, but the link was still there, so trying to run ecryptfs-setup-private caused it to look in /home/jack/.ecryptfs/ but really see the existing files in /home/.ecryptfs/jack/.ecryptfs so it failed to create another password file & fail with ERROR:  wrapped-passphrase file already exists, use --force to overwrite.

Trying the "ALIAS" steps above, using a .secret folder inside the encrypted home failed, with these errors:
Mount on filesystem of type eCryptfs explicitly disallowed due to known incompatibilities
Reading sb failed; rc = [-22]

"Nesting encrypted directories inside of encrypted directories is not supported with eCryptfs. Sorry." - eCryptfs author & maintainer
Changing the ALIAS folder outside of jack's home, trying /tmp/.secret/ &  /tmp/secret/ works. BUT if jack log's out the new encrypted folder will stay mounted, so you have to unmount it (umount.ecryptfs_private secret).


How do I replace the HUD functions from Rhythmbox with Clementine?

In Edit > plugins there is 'Notification popups' plugin. You can anytime deactivate the plugin, but I'm not sure if there is Clementine plugin for Rhythmbox.


You can also use the udev subsystem to establish the settings when the device is plugged in or the machine boots.
For example, here is how I set the power line frequency on my Logitech HD Pro C920 Webcam, which lsusb says has the USB ID 046d:082d.
As root create a new world-readable file /etc/udev/rules.d/99-local-webcam.rules. It contains:
SUBSYSTEM=="video4linux", SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="082d", PROGRAM="/usr/bin/v4l2-ctl --set-ctrl power_line_frequency=1 --device /dev/%k"

You can follow the same recipe, modifying the USB ID and the v4l2-ctl parameters to suit your exact needs. You can test the v4l2-ctl parameters from the command line until you are comfortable that they will work, then put that text into the udev rules file.
The advantage of this approach is that it "just works". Every time the device is plugged in then the settings are applied.  If you are a systems administrator for a lot of machines then you can push out rules files for all your institution's equipment, they aren't used until that USB ID is plugged into the machine.


Mate executable as desktop manager in core applications

It seems like nemo (cinnamon's file manager) what getting in the way (according to what I could see in 'ps -fax' listings. So removing nemo seemed to solve the issue.


Issue with Terminal After Ubuntu 11.10 Install

Looks like you have hit an old bug. I thought it was already fixed. Are you trying to install wine?

The solution to this i, instead of trying to click OK with mouse, just press TAB and then ENTER. It should work.

If this does not work from terminal try to do the same from synaptic.


Edit 1:

  My question: how to mount my rescue.img to the other external HDD?

  Can please someone to explain to me, how to does it with easy words,
  Thanks!

Now I think I understand. There is a confusion about the words; I think you want to clone the image to another USB drive. But we need a bit more details before knowing exactly how to do it: If it is an image of a whole drive /dev/sdx or an image of a partition /dev/sdxn, where x is the device letter and n is the partition number.

Edit 2:

If it is an image of the whole drive, you should have used something like

sudo ddrescue <some options> /dev/sdx /path/rescue.img /path/rescue.log

when you created the image file. If this is the case you can

either use ddrescue in the reversed way to read from the image file and write to the new USB drive seen as a device /dev/sdy,
or you can also do it with mkusb which is safer. You point to the image file as source and mkusb will help you select the new USB drive as target. Furthermore, if there is a GUID partition table, mkusb will fix the backup table at the tail end of the drive.

Original answer:

If rescue.img is an image of the whole drive with one or more partitions,

the easiest way is to clone it to another [new] drive of at least the same size as the original drive. You can do that with ddrescue, it is safer with mkusb. But it costs money to get a new drive.
You can try to mount the image with kpartx, which is easier than to identify manually where partitions start.

If rescue.img is an image of a single partition, things are more straight-forward. It should be possible to loop mount it and have read access to the content, if the file system is healthy.

sudo mkdir -p /mnt/lp1
sudo mount -o loop rescue.img /mnt/lp1

Otherwise it should also be possible to recover files with PhotoRec or maybe repair the partition table with TestDisk or repair the file system with a tool made for that particular file system. See this link.


nvidia-smi: command not found, but GPU works fine

nvidia-smi is installed via nvidia-utils, as shown here:

$ sudo apt-get install nvidia-smi
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package nvidia-smi is a virtual package provided by:
  nvidia-utils-440 440.44-0ubuntu0~0.18.04.1
  nvidia-utils-435 435.21-0ubuntu0.18.04.2
  nvidia-utils-430 430.64-0ubuntu0~gpu18.04.1
  nvidia-utils-415 415.27-0ubuntu0~gpu18.04.2
  nvidia-utils-410 410.104-0ubuntu0~18.04.1
  nvidia-utils-390 390.129-0ubuntu0~gpu18.04.1
You should explicitly select one to install.

E: Package 'nvidia-smi' has no installation candidate

So, in your case you'll need to install nvidia-utils-440.


Ubuntu 16.04 network manager not showing wifi (r8822be)

This will be a multi-part answer as we will probably have to fix several issues before we locate the underlying problem. I will add edits to this answer as we go.

First, bcmwl-kernel-source is a driver for Broadcom devices. Yours is a Realtek and so it isn't needed. Let's remove it. From the terminal:

sudo apt-get purge bcmwl-kernel-source

Next, your changes to /etc/rc.local will be ineffective. Please remove them:

sudo nano /etc/rc.local

Remove your changes so that the only uncommented # part is:

exit 0

Proofread carefully, save (Ctrl+o followed by Enter) and exit (Ctrl+x) the text editor.

Next, when you add an interface to /etc/network/interfaces, then Network Manager steps aside so that you may manually configure the interface. Your addition to the file is defective in that the interface will not connect without knowing the SSID and WPA2 password. Moreover, in only a very few cases in my experience, will Network Manager not do the job as well as interfaces. Let's remove the defective stanza.

sudo nano /etc/network/interfaces

Remove these lines:

auto wlp7s0
iface wlp7s0 inet dhcp

Proofread carefully, save and close the text editor.

Reboot and tell us if there is any improvement. Then please run and paste a new Wireless Info as above. Paste it here and give us the link: http://paste.ubuntu.com

EDIT: You also need to blacklist ideapad_laptop. From the terminal:

sudo -i
echo "blacklist ideapad_laptop"  >>  /etc/modprobe.d/blacklist.conf
modprobe -r ideapad_laptop
exit

Any improvement? It may take a reboot.


Problem in jenkins installation on Ubuntu 12.04.3 LTS

Try this:

sudo apt-get clean
sudo apt-get purge jenkins-common
sudo apt-get install jenkins


If it doesn't work, use these:
1. Ctrl + Alt + F2
2. UXTerm
Go to Unity Dash Search and type in 'UXTerm'
3. XTerm
Go to Unity Dash Search and type in 'XTerm'
4. Look for terminal alternatives in Software Center


how to delete last two word in the sentences

If by <last space avalible> you mean any combination of zero or more trailing spaces and horizontal tabs, you can use

sed 's/\\|[ \t]*$//'

Ex. given

$ echo 'alex\|facebook\|google\|amazon\|src\|cmd\|        ' | cat -A
alex\|facebook\|google\|amazon\|src\|cmd\| ^I $

(where ^I indicates a tab between two spaces) then

$ echo 'alex\|facebook\|google\|amazon\|src\|cmd\|       ' | sed 's/\\|[ \t]*$//' | cat -A
alex\|facebook\|google\|amazon\|src\|cmd$


First open gparted (if it is not installed install it by pressing Ctrl+Alt+T and entering

sudo apt-get install gparted

in the upcoming terminal
)

and check for any ntfs partition. If you do not see one, that you probably wiped out windows when installing ubuntu.

Download a windows 8 image from somewhere (http://msdn.microsoft.com/subscriptions/downloads/?#searchTerm=&ProductFamilyId=545&Languages=en&PageSize=10&PageIndex=0&FileId=0)

and then proceed with this guide to make a bootable USB:
How do I use Unetbootin to make a bootable Windows USB installer?

If I recall correctly for me simply unzipping the ISO (windows 7) to the USB worked perfectly, so maybe you should try that first, and if it fails, then try with unetbootin to create the USB.

In any case, be sure, that you also have an ubuntu startup USB, if anything goes wrong during the windows installation. (And I would create the empty partition for windows from gparted before proceeding with the install)


First of all, those packages haven't been updated since the 2008 so I'm not sure how much it will break if I use the equivalent packages to install it. So, this is an aventure:

First, install java:

sudo apt-get install java-7-jre

Why the 7? Well, because developers has been under cardiac arrest just to make sure that it's backwards compatible. Now create a folder:

mkdir ~/eldy && cd ~/eldy

Download and unpack the software:

wget http://download.eldy.net/eldy23.tar.gz
tar xf eldy23.tar.gz

Now you can execute eldy using ~/eldy/eldy/eldy.sh.


Suspend to RAM, and wake up.

Use a electricity measuring tool, to estimate the cost of, for example, one year of such behaviour. If it is acceptable, I guess no other method will beat it. If it is not acceptable, you have to name tradeoffs and prices you're willing to pay (for SSD - not for me ;) ).


I live in italy my ISP is fastweb and they don't automatically give each user a public IP adress. I have to ask for one otherwise the IP i'm actually pointing at is theirs.


How nested HERE DOC works in bash scripts?

You need to use the <<- form, and the indentation must be done with tab characters (not spaces). From man bash:

   If the redirection operator is <<-, then all leading tab characters are
   stripped  from  input  lines  and  the line containing delimiter.  This
   allows here-documents within shell scripts to be indented in a  natural
   fashion.

Ex. given

$ cat heredoc.sh
#!/bin/bash

    cat <<EOF1
    Hello from level 1
        cat <<EOF2
        Hello from level 2
        EOF2
    EOF1

then

$ ./heredoc.sh
./heredoc.sh: line 8: warning: here-document at line 3 delimited by end-of-file (wanted `EOF1')
    Hello from level 1
        cat <<EOF2
        Hello from level 2
        EOF2
    EOF1

whereas

$ cat heredoc.sh
#!/bin/bash

    cat <<-EOF1
    Hello from level 1
        cat <<-EOF2
        Hello from level 2
        EOF2
    EOF1

then

$ ./heredoc.sh
Hello from level 1
cat <<-EOF2
Hello from level 2
EOF2


I accidentaly did sudo apt-get remove python

Just switch to the tty, you will have a login prompt, write your username/password, you will get a shell. So, now you only need to install python back, along with all the others packages, the simple way to do so is:

sudo apt-get install ubuntu-desktop

If you like, you can also install other metapackages instead:

apt-cache search metapackage | grep desktop


What is the safest method for repartitioning space from the / partition?

A couple things:

Using LVM to manage your partitions makes it MUCH easier to do this kind of thing.
It is a lot easier to increase a partition's size than to decrease
it.  Especially the root mount.
Since all the partitions you're discussing are on the same physical disk, there is no performance benefit from splitting them up into different partitions.

Given the above, you might as well just move the /mnt/media folder directly under the system root.  That will get you the extra space.  From there, repurpose the "/dev/sda2" parition as you see fit (e.g. using it as a mount /var or /usr).

I would normally suggest using the space from "/dev/sda2" to increase the size of "/dev/sda3", but that would be somewhat difficult in your case.  Your SSD's partitions look to be in the wrong order to allow you to just delete the 40GB mount and add that space to the root partition easily (again, using LVM would avoid this issue).

If you aren't afraid of doing some repartitioning via boot disk, then you can get it sorted out.  This should get you started, but it's probably more effort than it's worth (unless you're just looking to gain knowledge).


installing ubuntu with windows installer

It will dual boot. It installs Ubuntu to  folder on your C: drive. If, for any reason, you eve want to remove Ubuntu from Windows you just have to go to Windows Control Panel > Program > uninstall a program and remove it.


Try this

sudo apt-get install mono-complete


There is an answer that is not optimal.

Setting IgnoreLid=true in /etc/UPower/UPower.conf closing the lid really does nothing, in fact, not even the screen is turned off (beware of that). Ideally, the screen would be turned off, but nothing else would happen (I would expect to be able to use the external monitor).

Therefore this is not really an answer but a workaround, which may be the best that we have for now.


Unity File Lens Giving Useless or No Results

The file lens displays results based on files that you have actually opened. It does NOT search a full index of all your files.

At a technical level the results come from a tool called Zeitgeist rather than Tracker.

If you search for files useing Super +F you have the added advantage of having search results arranged by how recently you opened the files.


Setup openssh to start when the computer boots

I'm not allowed to comment yet but I was going to ask how you installed it
Because if you installed openssh with apt-get install openssh-server then it should start automatically on boot even without a working network.


I used to get similar things happens on boot up & shutdown with previous versions of Ubuntu. I ignored them and everything was fine. They changed with different upgrades of Ubuntu. Why? I don't know. Recently I had to reinstall 14.10 and I don't get those sorts of screens anymore.

I agree with Томица Кораћ, don't worry about it, you computer and installation of Ubuntu is OK.


ubuntu 17.10 - VirtualBox kernel configuration is invalid (4.13.0-37-generic)

Please try this one:

sudo dpkg-reconfigure virtualbox-dkms


Tor installation error - SIGNATURE VERIFICATION FAILED

This is due to an outdated key for verifying the torbrowser-launcher download. Try:

  gpg --homedir "$HOME/.local/share/torbrowser/gnupg_homedir/" --refresh-keys --keyserver pgp.mit.edu

This worked fine in my case and I was able to successfully launch the tor browser.

Duplicate: https://unix.stackexchange.com/questions/341513/torbrowser-signature-verification-fails-a-glitch-or-an-attack/341519


Why would VirtualBox abort and take Ubuntu down with it

Although I never got to the bottom of these issues, I resolved them all by doing the following:

cairo-dock - Reinstalled with the latest version (3.4.1-1.2)
VirtualBox - Upgraded to Version 6.0.12 r133076 (Qt5.9.5)
Nautilus - The Linux OS Kernel has been upgraded several times and Nautilus has not crashed since.  I went from Kernel version 4.18.0-22.23~18.04.1 through to the current kernel version:

Linux version 5.0.0-31-generic (buildd@lgw01-amd64-046) (gcc version
7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)) #33~18.04.1-Ubuntu SMP Tue Oct 1 10:20:39 UTC 2019

So I can only conclude that the problems I was having were all unrelated and merely coincidental and that each of these app versions were unstable and after upgrading them I had no more problems and the issues with Nautilus were taken care of in one or the several kernel updates and I have had no problems since :)


I'm dual booting windows 7 and Ubuntu 14.04 and I want to upgrade windows 7 to version 10

Windows 10 will overwrite your GRUB, but you can simply recover it with a live CD. Boot from live CD and open a terminal after upgrading and run "sudo fdisk -l" and remember the device your system is installed on. Not the partitions but the whole disk. It is usually /dev/sda or /dev/sdb. Then run "grub-install ".


install ubuntu on macbook 9,1 (released 2016)

You can always try the Live CD. If it boots up and runs properly, all your hardware is supported. If your Macbook doesn't have a CD drive, make a bootable USB stick. Be forewarned, the LiveCD is slower that the real thing.


How can I unclutter Artists view in Banshee?

Select your songs using shift+click then left click, choose edit track information, and choose "Various artists" for your songs. Then click the icon next to the artist.

Keep in mind, if you have the option to save metadata to files enabled, that your files will have "Various Artists" as the artists! So disable this option in preferences (unless this is what you want).


cannot run strict.pm inside su for perl installation

In my case reason was PERL5LIB, pointing to HOME directory of another user:

postgres@delly:~$ echo $PERL5LIB
/home/sveta/build/mysql-sandbox/share/perl/5.22.1:

After setting it to empty string psql started working:

postgres@delly:~$ psql
Can't locate strict.pm:   /home/sveta/build/mysql-sandbox/share/perl/5.22.1/strict.pm: Permission denied at /usr/bin/psql line 19.
BEGIN failed--compilation aborted at /usr/bin/psql line 19.
postgres@delly:~$ echo $PERL5LIB
/home/sveta/build/mysql-sandbox/share/perl/5.22.1:
postgres@delly:~$ export PERL5LIB=
postgres@delly:~$ echo $PERL5LIB

postgres@delly:~$ psql
psql (9.5.10)
Type "help" for help.

postgres=#


Have a look at the logger command which is an interface to the system log module. It makes or writes one line entries in the system log file from the command line.

The general syntax is:

logger [options] [message]

For eg:

logger “Hello World”

will send the message "Hello World" to syslog. So in tail /var/log/syslog you should see:

Jan 31 20:13:50 ron ron: Hello World

You can also send the contents of a file with the -f option. From man logger:

-f, --file file
              Log the contents of the specified file.  This option  cannot  be
              combined with a command-line message.

You can use logger within a script; you just have to include the name of the script:

logger –t ScriptName “Hello World”

See man logger for more details. Here are few nice reference.


Install dconf Editor.

Select com -> canonical -> indicator -> datetime

The field show-auto-detected-location was set.
After untagging this field, both timezones were no longer displayed


network manager: the script you are attempting to invoke has been converted to an Upstart job

You needn't do anything. The message is simply telling you that there is a newer and a bit easier way to do what you are trying to do:

sudo service network-manager restart

And that you may also take a two step approach:

sudo service network-manager stop
sudo service network-manager start


The most common cause is the ~/.bashrc. Some applications could modify it.

Use the next commands to find out where the wrong line exists:

grep -r LICENSE ~/*
sudo grep -r LICENSE /etc/*

Comment out that line using # before that line


List of compatible or non-compatible video cards for Unity 3d

There isn't a full, complete list that I am aware of. However Unity hardware requirements are detailed here:
https://wiki.ubuntu.com/DesktopExperienceTeam/UnityHardwareRequirements


Trying to Install on 2016 HP Pavilion but getting a black screen

Figured it out! Here's my solution.
I first disabled Secure Boot in the Bios. That didn't work for me so I looked for other things to tweak in the BIOS. I found Delete All Secure Boot Keys. I did that, and when I tried booting from the USB it worked!


In fact there are not only 6 or 7 ttys, there are many more. You could see them, try

ls /dev/tty* | wc -l

All the consoles are not always active. You need to activate ttyN in order to switch to it with Ctrl+Alt+F N. You can activate any tty with openvt command also. See man openvt.

Reason why there so many ttys, may have historical baskground. In old days Linux was used in terminals (without X server).

To do multiple tasks at the same time it was indispensable to have more than one ttys.
due to any accidentally break, it was required to have another tty from where system could be monitored.
Even to read more than one man pages, different ttys were needed.

Nowadays for most users don't need that many — in fact most users never see anything but first 6 ttys to be available for CUI login and the virtual console that X is running on. As Rinzwind mentioned all these terminals are mostly identical.

But there are a few people who patch their kernel to allow more than 63 consoles(special ttys), because they run large machines with many hardware consoles.


Have you tried using UNetBootin

sudo apt-get install unetbootin


Only for BIOS systems.
All systems since Windows 8 released in 2012 are UEFI. So you do not need nor really want to install in the now 35 year old BIOS/MBR configuration.

Installing grub to PBR is only for BIOS boot. And you only can boot from a PBR if booting with another grub installed to MBR as BIOS only boots via MBR.

And now with grub2 there are many better ways to boot another install.
And grub has to use blocklists which are hard coded addresses for the rest of grub, not searching. And addresses even can change with a fsck.

Normally grub in MBR, is from last install & it takes control of boot process.
If you do not want grub installed from live installer:

sudo ubiquity -b

You can always boot into any install & install its grub into MBR. From inside your install:

sudo grub-install /dev/sdX where sdX is your drive.

You can use grub2's os-prober to find other installs & add to grub menu. You can use a configfile to load another installs grub. And you can use your own boot stanza in 40_custom to load the link of most current kernel, so no updates of second install's boot entries with newer kernel are required.

Grub in BIOS mode also saves the drive (and partition) info on where to reinstall. That must also be updated if not correct. Enter thru first pages,tab to ok, spacebar to choose/unchoose drive, enter to accept, do not choose partitions or choose nothing so grub will not reinstall anywhere.

sudo dpkg-reconfigure grub-pc

https://ubuntuforums.org/showthread.php?t=2189643

Examples of boot stanza for booting link in / to most recent kernel & configfile type grub entries. Not just for USB drive but any install.

How to add a GRUB2 menu entry for booting installed Ubuntu on a USB drive?

You always can manually install grub, either just mounting other install or full chroot. If you really want it in a partition you may need the --force parameter.

https://help.ubuntu.com/community/Grub2/Installing#Fixing_a_Broken_System

See also:

https://help.ubuntu.com/community/Grub2/Setup#Configuring_GRUB_2

https://help.ubuntu.com/community/Grub2/CustomMenus


how to fix ipython notebook 0.12 dashboard links

Hopefully the fix will be in a 0.12.1 update before long. In the meantime, this is the change you need to make to get it to work:

https://github.com/ipython/ipython/commit/cb7ff561f33acff72035da212c70def49fd65437


dpkg: error proccessing package archive install (--install)

The command is supposed to be sudo dpkg -i /home/chowder/Downloads/okular.deb. The install is not needed there and is meaningless.


Kubuntu 18.04 blank screen on resume from suspend

Update :

Since the previous fix isn't working, and it appears LibreOffice is causing the crash in your system, try this -

Start LibreOffice
Select Tools(shortcut: Alt+T) and then Options from the drop down list
In the L.H.S, select Advanced and disable the option -

  [ * ] Use a Java runtime environment

by deselecting it

  [   ] Use a Java runtime environment

Use OK to confirm the changes
Restart LibreOffice for good measure

(Not Working)

I've been facing the same problem on Kubuntu 18.04 with my screen blanking out and refusing to wake up no matter what I tried.
(this happens to me when I manually lock my screen and then try to start up after about 10 mins or so after the screen has gone blank)

Try changing the power saving option for your screen like so -

Access the 'Energy Saving' option from the main menu
Uncheck the 'Screen Energy Saving' option(i think this might be causing the screen to power off and stop responding)
Do the same for the 'On Battery' and 'On Low Battery' tabs as well.
Finally, apply the changes made so far.


I've had horrible screen tearing for a long time. HELP!!!! Ubuntu 19.10

Intel cards

Open the terminal
Install mesa-utils:

sudo apt-get install mesa-utils
Create a specific directory:

sudo mkdir /etc/X11/xorg.conf.d/
Enter these parameters:

echo -e 'Section "Device"\n Identifier "Intel Graphics"\n Driver "Intel"\n Option "AccelMethod" "sna"\n Option "TearFree" "true"\nEndSection' | sudo tee /etc/X11/xorg.conf.d/20-intel.conf

That's it. Reboot and it should be ok now.

If you wanna undo this procedure just enter in the terminal:

sudo rm /etc/X11/xorg.conf.d/20-intel.conf


How to remove the title bar of a window in js/lg/extension under gnome-shell?

You need to use a tool like devilspie which will allow you to match windows and perform actions on them, such as modifying the hints on the window to remove the display of the title bar. You could also instead write a program or script using the libwnck library's API to match windows and apply such changes to them.


Internal Microphone not working on HP mini

Go to sound settings.

If you are using Unity, then type Sound in Dash.
If you are using an Older Version, then Select it from your Menu.

Select the Input Tab.

Under Record Sound from, select Internal Microphone.

It's settings will be shown on the right.

Make sure that Mute is not selected.

Hopefully, your Microphone should work fine now.


CAC USB reader not allowing authentication, Ubuntu 20.04

Browsers don't have direct access to certificates in smart card or USB Tokens.  You may need to use Browser extension to access certificates from smartcard.  Is there any method suggested by the site, you want to authenticate?
Example of Browser Extension for digital signing or authentication or encryption/decryption on browser side is Signer.Digital extension. Please check by searching on Signer.Digital extension if it helps.


as I can't comment, still for being a beginner (low reputation), so I'll answer here.
this question seems duplicated,
see:

Disable Nautilus caching mechanism
How to switch off caching for usb device when writing to it?

Other alternative, you can try, by command line:
see and install : https://github.com/Xfennec/progress
cp bigfile newfile & progress -mp $!


Ubuntu errouneously telling me that a username is already taken

This is the expected behavior. You can't have two users with the same name, doesn't matter if they come from different user databases.

From useradd manpage:

  You may not add a user to a NIS or LDAP group. This must be performed
  on the corresponding server.

  Similarly, if the username already exists in an external user database
  such as NIS or LDAP, useradd will deny the user account creation
  request.


The answer that worked for me was from: How to add Windows 7 loader to GRUB?

In short I had to open terminal and run:

sudo update-grub

Which then created a grub config file. After reboot I saw an option to load my Windows 7 or Ubuntu.


Changing how pirate bay scope opens results

It finally worked by spelling out each command I wanted to run using Popen the final implementation follows.

    else:
        print uri
        subprocess.Popen('rm /path/.torrents/*', shell=True)
        subprocess.Popen('gnome-terminal -x aria2c --allow-overwrite=true -d /path/.torrents --bt-metadata-only=true --bt-save-metadata=true \'%s\'' % uri, shell=True).wait()
        torrent = subprocess.check_output('ls /path/.torrents/*', shell=True).strip()
        GLib.spawn_command_line_async('acestreamplayer %s' % torrent)
        return Unity.ActivationResponse(handled=Unity.HandledType.HIDE_DASH, goto_uri='')

Now I just need to parse out the adult hits.  It is for the family entertainment system after all.


I bet that it is the issue with permissions. Since you are using sudo to copy, i will assume that it is your home directory that you are copying it from and you've created the file with your user.

There are several ways to resolve this, the quickest would be to make the file world readable. You can do that by running

chmod a+r progma.php

A better way would be to find out what group does the server run under, often that would be group 'web', and then you would do:

chgrp web progma.php && chmod g+r progma.php


Want to make space on my computer, show installed apps I don't need and can remove

You could use less.

dpkg -l | grep ii | less

to halt the scrolling.


Want to set my dual boot because it got desipeared

This might work:
Create an Ubuntu live usb.
Choose it in BIOS. You will have multiple options. Select Boot Repair.
This should reinstall grub.
WARNING! I am not sure if it deletes user data or not. I am not responsible if you lose your data.


How to add WiFi password and static IP to OSMC, before saving the image?

Network passwords are stored in /etc/NetworkManager/system-connections and you can create a static IP for your device by changing your /etc/network/interfaces file to something like below:

# The wifi network interface
auto wlan0
iface wlan0 inet static
    address 192.168.0.87
    netmask 255.255.255.0
    network 192.168.0.0
    broadcast 192.168.0.255
    gateway 192.168.0.1
    dns-nameservers 192.168.0.1, 8.8.8.8
    wpa-ssid <Your wifi network SSID>
    wpa-psk <Your hex encoded wifi WPA password>

Then you can create your image of the system.


How do I add space to LVM's root partition without shutting down my VM?

In the VMWare consore, extend the drive
Use fdisk or cfdisk or parted to create a new primary partition with type 8e/lvm (we'll call it /dev/sda3 for now)
Tell the system about the new partition: sudo partprobe /dev/sda3
Make the new partition an lvm physical volume: sudo pvcreate /dev/sda3
Add the new physical volume to your volume group: sudo vgextend $VGName /dev/sda3
Increase the size of your logical volume: sudo lvextend -L+10G /dev/$VGName/root
Increase the size of your file system: sudo resize2fs /dev/$VGName/root

It may be easier to simply add additional drives to the VM and use them as physical volumes. That would clutter the VM storage area with more VMDKs. This solution is a bit messier in the vm.


Unable to copy from vim to system clipboard

This is what works for me (Ubuntu 13.10):

Reinstall vim as vim-gtk:

sudo apt-get install vim-gtk

select what you want using the mouse - then type to copy to clipboard:

"+y

to paste to vim from clipboard type:

"+p

I don't know why but comparing the output of vim --version shows that the usual vim installation is quite restricted compared to vim-gtk. Replacing vim with vim-gtk did not affect any plugings.

Further information:

Vim on Ubuntu - cut to system clipboard
How to make vim paste from (and copy to) system's clipboard?


pgAdmin show object browser text white on white with dark theme

I also use a dark theme and have the same problem. This is fairly easy to solve though:

If the Server connection is open, close it (right click -> Disconnect server)
Right click on the Server connection and choose Properties...
In the Properties tab click the button in the the second to last item, named Colour
Select a new colour, say #3C3B37
Restart pgAdmin

You have to repeat the procedure for each and every Server connection, but it works.


How can I speed up Unity with an ATI card?

Go to CCSM (compiz Configuration Settings Manager) then go to the OpenGL plug in and then uncheck Sync to Vblank.

Then go back and on the Composite plug in uncheck Detect Refresh Rate


Enable PostGIS extension on Ubuntu 14.04.2

You must install postgis and postgresql-9.3-postgis-2.1 packages and create postgis extension on your database

sudo apt-get install postgis postgresql-9.3-postgis-2.1
sudo -u postgres psql -c "CREATE EXTENSION postgis; CREATE EXTENSION postgis_topology;" DATABASE_NAME_HERE

Reference: Jon Saints' Tutorial


In which directories can "nobody" user write?

Running a check on my system lists:

$ sudo find / -xdev -type d \( \( -user nobody -o -group nogroup \) -o -perm -777 \)
/tmp
/tmp/.X11-unix
/tmp/.ICE-unix
/var/tmp
/var/metrics
/var/spool/samba
/var/crash

Of these, I imagine /tmp, /var/tmp, and /var/crash to be present on all Ubuntu installations, since they are listed in the Filesystem Hierarchy Standard. The two directories inside /tmp are, I think, session-based directories, so they can be ignored. I don't think /var/spool/samba would be present on a fresh Ubuntu system, which leaves /var/metrics. I'm not sure what that directory is for.

A note on the find command:

-xdev excludes other filesystems (so I can skip /proc, /sys, my home directory, etc.)
-type d restricts the check to directories
\( -user nobody -o -group nogroup \) - either the owner should be nobody, or the group should be nogroup. We use the brackets to group this condition, and check for the other possibility, that
-perm -777 - everyone has all permissions, again joined using an OR (-o). Instead of -perm -777, one could simply use -perm -2 as Random832 suggests, to check write permission to others.


You do not need to download scilab yourself, you can simply install it from the repository using the following command:

sudo apt install scilab

If you use this, it should automatically install all necessary desktop shortcuts so you can start scilab using the normal gnome way (using the Activities button for instance)


Showing all installed programs in Ubuntu

Just for fun

Since OP mentioned: from which I can launch a program from a list of all program installed?

Below a small script that lists all (globally) installed GUI applications. Choose one to launch it, or type a few of its characters and press Return to run the application:

To use

Copy the script below into an empty file, save it as list_apps.py
Test- run it by the command (open a terminal window, type the command and press Return):

python3 /path/to/list_apps.py

If all works fine, add it to a shortcut key: choose: System Settings > "Keyboard" > "Shortcuts" > "Custom Shortcuts". Click the "+" and add the command:

python3 /pat/to/list_apps.py

to a shortcut key combination you like.

The script

#!/usr/bin/env python3
import subprocess
import os

dr = "/usr/share/applications"

apps = []

for f in [f for f in os.listdir(dr) if f.endswith(".desktop")]:
    try:
        content = open(dr+"/"+f).read()
        if not "NoDisplay=true" in content:
            lines = content.splitlines()
            name = [l for l in lines if l.startswith("Name=")][0].replace("Name=", "")
            command = [l for l in lines if l.startswith("Exec=")][0].replace("Exec=", "")
            apps.append([name, command])
    except:
        pass

apps.sort(key=lambda x: x[0]); apps = sum(apps, [])
displ_list = '"'+'" "'.join(apps)+'"'

try:
    chosen = subprocess.check_output([
        "/bin/bash",
        "-c",
        'zenity --list '+\
        '--column="Applications" '+\
        '--column="commands" '+\
        '--hide-column=2 --height 450 '+\
        '--width 300 '+\
        '--print-column=2 '+displ_list
        ]).decode("utf-8").split("|")[-1].strip()
    chosen = chosen[:chosen.rfind(" ")] if "%" in chosen else chosen
    subprocess.Popen([
        "/bin/bash", "-c", chosen
        ])
except subprocess.CalledProcessError:
    pass

How it works

The script lists all .desktop files in /usr/share/applications, and checks if the line NoDisplay=true is in the file (which means it is not meant to be used as a GUI). Then it looks into the files, looks up the application name and the command to run it.

The result is listed in a zenity list, to choose from. If you pick one, the corresponding command is executed.

That's it.

Extended version

If you also would like to have a short description on the application, As mentioned in the Comment= line of its .desktop file, use the version below:

#!/usr/bin/env python3
import subprocess
import os

dr = "/usr/share/applications"

apps = []

for f in [f for f in os.listdir(dr) if f.endswith(".desktop")]:
    try:
        content = open(dr+"/"+f).read()
        if not "NoDisplay=true" in content:
            lines = content.splitlines()
            name = [l for l in lines if l.startswith("Name=")][0].replace("Name=", "")
            command = [l for l in lines if l.startswith("Exec=")][0].replace("Exec=", "")
            comment = [l for l in lines if l.startswith("Comment=")]
            comment = comment[0].replace("Comment=", "") if comment else "No description"
            apps.append([name, command, comment])
    except:
        pass

apps.sort(key=lambda x: x[0]); apps = sum(apps, [])
displ_list = '"'+'" "'.join(apps)+'"'

try:
    chosen = subprocess.check_output([
        "/bin/bash",
        "-c",
        'zenity --list '+\
        '--column="Applications" '+\
        '--column="commands" '+\
        '--column="Description" '+\
        '--hide-column=2 --height 450 '+\
        '--width 500 '+\
        '--print-column=2 '+displ_list
        ]).decode("utf-8").split("|")[-1].strip()
    chosen = chosen[:chosen.rfind(" ")] if "%" in chosen else chosen
    subprocess.Popen([
        "/bin/bash", "-c", chosen
        ])
except subprocess.CalledProcessError:
    pass


Chromium browser does not launch on Ubuntu 16

Open Software Updater in your applications.  In the setting, ensure that "Important Security Updates" is checked. Then close the window.

Open a terminal, run;

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libnss3

This should update/install NSS and you should now be able to open Chromium.


After Server reboot, can't remotely connect from Windows 7 machines

SOLVED:  IP was originally set up dynamically,  which caused issues when the router was reset and i guess it gave another device the same IP.  So I changed the /etc/network/interfaces file to set up a static IP address for my server.  Now everything reconnects properly.  thanks Mad hatterman!


Try with installing wifi card driver containing packages:

sudo apt-get install sudo apt-get install build-essential libssl-dev linux-headers-`uname -r` linux-firmware-nonfree

Then reboot.

If this doesnt work, then reinstall the packages:

sudo apt-get --reinstall install sudo apt-get install build-essential libssl-dev linux-headers-`uname -r` linux-firmware-nonfree


I found solution for my problem which is as follows:

sudo add-apt-repository ppa:ed10vi86/video
sudo apt-get update
sudo apt-get install vlc

The version 2.0.8 is problematic for me, 2.1.0 is OK.

Hope this helps.


You've asked a lot of questions in one, but I'll help you with as many of them as I can.

First, you need to add your IRC server of choice - fire up irssi, and type the following:

/server add -auto -network Freenode irc.freenode.net 6667

That will add the Freenode IRC network to your IRSSI config, and will automatically connect when you run irssi.

/network add -nick <your-nick> Freenode

That will add your nick to the new Freenode network, and will automatically use that nick whenever connecting to the network.

/channel add -auto #ubuntu Freenode

That will make you join #ubuntu on Freenode everytime you run irssi.

Assuming you have your nick registered, you can do this to identify automatically:

/network add -autosendcmd "/msg nickserv identify password ;wait 2000" Freenode

You can switch between channels with Alt-2, Alt-3, etc, with each channel being Alt-Number

If you're interested, here is my ~/.irrsi/config file:

servers = (
  { address = "irc.ubuntu.com"; chatnet = "Ubuntu"; port = "8001"; },
  #There is actually very little difference between irc.ubuntu.com
  # and irc.freenode.net - irc.u.c is just a redirect
  {
    address = "irc.freenode.net";
    chatnet = "Freenode";
    port = "6667";
    use_ssl = "no";
    ssl_verify = "no";
    autoconnect = "yes";
  }
);
# I'm a freenode user all the way man
chatnets = {
  Freenode = {
    type = "IRC";
    nick = "changeme";
    autosendcmd = "/msg nickserv identify <password removed> ;wait 2000";
  };
};

# Channels I hang out in a lot. Change these to your own.
channels = (
  { name = "#2buntu"; chatnet = "Freenode"; autojoin = "yes"; },
);

aliases = {
  J = "join";
  WJOIN = "join -window";
  WQUERY = "query -window";
  LEAVE = "part";
  BYE = "quit";
  EXIT = "quit";
  SIGNOFF = "quit";
  DESCRIBE = "action";
  DATE = "time";
  HOST = "userhost";
  LAST = "lastlog";
  SAY = "msg *";
  WI = "whois";
  WII = "whois $0 $0";
  WW = "whowas";
  W = "who";
  N = "names";
  M = "msg";
  T = "topic";
  C = "clear";
  CL = "clear";
  K = "kick";
  KB = "kickban";
  KN = "knockout";
  BANS = "ban";
  B = "ban";
  MUB = "unban *";
  UB = "unban";
  IG = "ignore";
  UNIG = "unignore";
  SB = "scrollback";
  UMODE = "mode $N";
  WC = "window close";
  WN = "window new hide";
  SV = "say Irssi $J ($V) - http://irssi.org/";
  GOTO = "sb goto";
  CHAT = "dcc chat";
  RUN = "SCRIPT LOAD";
  CALC = "exec - if command -v bc >/dev/null 2>&1\\; then printf '%s=' '$*'\\; echo '$*' | bc -l\\; else echo bc was not found\\; fi";
  SBAR = "STATUSBAR";
  INVITELIST = "mode $C +I";
  Q = "QUERY";
  "MANUAL-WINDOWS" = "set use_status_window off;set autocreate_windows off;set autocreate_query_level none;set autoclose_windows off;set reuse_unused_windows on;save";
  EXEMPTLIST = "mode $C +e";
  ATAG = "WINDOW SERVER";
  UNSET = "set -clear";
  RESET = "set -default";
};

statusbar = {
  # formats:
  # when using {templates}, the template is shown only if it's argument isn't
  # empty unless no argument is given. for example {sb} is printed always,
  # but {sb $T} is printed only if $T isn't empty.

  items = {
    # start/end text in statusbars
    barstart = "{sbstart}";
    barend = "{sbend}";

    topicbarstart = "{topicsbstart}";
    topicbarend = "{topicsbend}";

    # treated "normally", you could change the time/user name to whatever
    time = "{sb $Z}";
    user = "{sb {sbnickmode $cumode}$N{sbmode $usermode}{sbaway $A}}";

    # treated specially .. window is printed with non-empty windows,
    # window_empty is printed with empty windows
    window = "{sb $winref:$tag/$itemname{sbmode $M}}";
    window_empty = "{sb $winref{sbservertag $tag}}";
    prompt = "{prompt $[.15]itemname}";
    prompt_empty = "{prompt $winname}";
    topic = " $topic";
    topic_empty = " Irssi v$J - http://www.irssi.org";

    # all of these treated specially, they're only displayed when needed
    lag = "{sb Lag: $0-}";
    act = "{sb Act: $0-}";
    more = "-- more --";
  };

  # there's two type of statusbars. root statusbars are either at the top
  # of the screen or at the bottom of the screen. window statusbars are at
  # the top/bottom of each split window in screen.
  default = {
    # the "default statusbar" to be displayed at the bottom of the window.
    # contains all the normal items.
    window = {
      disabled = "no";

      # window, root
      type = "window";
      # top, bottom
      placement = "bottom";
      # number
      position = "1";
      # active, inactive, always
      visible = "active";

      # list of items in statusbar in the display order
      items = {
        barstart = { priority = "100"; };
        time = { };
        user = { };
        window = { };
        window_empty = { };
        lag = { priority = "-1"; };
        act = { priority = "10"; };
        more = { priority = "-1"; alignment = "right"; };
        barend = { priority = "100"; alignment = "right"; };
      };
    };

    # statusbar to use in inactive split windows
    window_inact = {
      type = "window";
      placement = "bottom";
      position = "1";
      visible = "inactive";
      items = {
        barstart = { priority = "100"; };
        window = { };
        window_empty = { };
        more = { priority = "-1"; alignment = "right"; };
        barend = { priority = "100"; alignment = "right"; };
      };
    };

    # we treat input line as yet another statusbar :) It's possible to
    # add other items before or after the input line item.
    prompt = {
      type = "root";
      placement = "bottom";
      # we want to be at the bottom always
      position = "100";
      visible = "always";
      items = {
        prompt = { priority = "-1"; };
        prompt_empty = { priority = "-1"; };
        # treated specially, this is the real input line.
        input = { priority = "10"; };
      };
    };

    # topicbar
    topic = {
      type = "root";
      placement = "top";
      position = "1";
      visible = "always";
      items = {
        topicbarstart = { priority = "100"; };
        topic = { };
        topic_empty = { };
        topicbarend = { priority = "100"; alignment = "right"; };
      };
    };
  };
};
settings = {
  core = { real_name = "Unknown"; user_name = "<your_user_name>"; nick = "<your_nick>"; };
  "fe-text" = { actlist_sort = "refnum"; };
};

If you're someone who likes to add all sorts of cool functionality, then you should take a look at the irssi scripts site - there are all sorts of little gems there.


Yes, only when some Russian hacker specifically wants to infect all over your device. But normally, it is very unlikely that if your ubuntu is infected with a virus then it will also affect windows.

When you boot ubuntu, only partitions assigned for ubuntu will be active (you can still have access to windows partition though). Software that you have installed on windows will not run in ubuntu and vice-versa.

I can't remember the last time I installed an antivirus on my device. For the normal daily purpose, you have windows defender. I recommend uninstalling another third-party antivirus as it slows down your device unless you really need it. Also, Linux is highly secure than windows. I have been using Debian for almost 4 years.


Visual Studio Code shows invalid syntax for "end" parameter in print()

As @Eliah Kagan pointed out, the error occurs because your VS Code is using Python 2 as the interpreter. Switch to Python 3 interpreter in your VS Code and it should work.
P.S. Free PEP style tip: Write print('something', end=' '). When giving default values to parameters, avoid spacing around the = operator.


Unable to install R packages in Ubuntu 18.04

It seems that to get predictive results you may want to start with renaming your existing R personal library with:

mv /home/$USER/R /home/$USER/R_old

Also install development package of curl:

sudo apt-get install libcurl4-openssl-dev

And then try to install your R-package from R-terminal:

$ R
install.packages("forecast")


How can I (from CLI) assign multiple IP addresses to one interface?

If you need an additional IP address just for the moment you can add it to any interface on your machine with

 sudo ip address add <ip-address>/<prefix-length> dev <interface>

for instance

 sudo ip address add 172.16.100.17/24 dev eth0

would add 172.16.100.17 using a 24 bit network prefix to the list of addresses configured for your eth0.

You can check the result with

ip address show eth0

and you can delete this address again with

sudo ip address del 172.16.100.17/24 dev eth0

Of course these changes are lost when you reboot your machine.
To make the additional addresses permanent you can edit the file /etc/network/interfaces by adding as many stanzas of the form

iface eth0 static
    address 172.16.100.17/24

so that it looks like

iface eth0 inet dhcp

iface eth0 inet static
    address 172.16.100.17/24

iface eth0 inet static
    address 172.16.24.11/24

You can even keep the dhcp for the primary address.

To activate these settings without a reboot use ifdown/ifup like

sudo ifdown eth0 && sudo ifup eth0

It is essential to put those two commands into one line if you are remoting into the server because the first one will drop your connection! Given in this way the ssh-session will survive.


Ubuntu shows a grey error dialog message on load when I enter password

Fixed with....
Login to the console (ctrl-alt-f2) and issue the command:
export PATH=/usr/bin:/bin

Then I was able to get into the GUI


Ubuntu 18.04 - Activation of network connection failed

Update:

WiFi now works, I am a newbie with anything related to hardware, but changing the port I was plugging the WiFi device in seemed to be a solution.

If anyone struggles with the same kind of problem, maybe try to plug the WiFi device in the back of your computer, directly in your motherboard (SS USB port in my case).

Note that Ethernet still doesn't work but I suspect this is related to the building providing the internet connection (or to the cable I am using, who knows).


How to determine meaning of ras-mc-ctl error messages?

Go to https://www.memtest86.com/ and download/run their free memtest to test your memory. Get at least one complete pass of all the 4/4 tests to confirm good memory. This will take many hours to complete.

Update #1:

memtest failed.

You've either got a defective 16G RAM stick, or bad cache memory on your motherboard. Try re-seating the 16G RAM stick and see if it helps. FYI: for optimum memory speed, it's better to have two 8G RAM sticks instead of one 16G RAM stick. It also makes it easier to troubleshoot memory issues.

Check to make sure that your CPU is not overclocked, or that memory XMP is not enabled in your BIOS.

Check your BIOS version with sudo dmidecode -s bios-version and then go to the manufacturer's web site and check for a newer BIOS.

Update #1:

User has the latest BIOS, version: BNKBL357.86A.0080.2019.0725.1139,
    date: 07/25/2019


maas 2.0 gui does not show node which has been pxe booted

Well first I must say all the credits must go to our friend "bc2946088" who gave the vital clue, thank you again dude.

As he said I ran the sudo dpkg-reconfigure maas-region-controller command and changed the auto detected ip to 10.1.1.100. I also on the local PC from which I ssh to the maas, ran the route -p ADD 10.1.1.0 MASK 255.255.255.0 172.16.63.100 command and rebooted. After these when I hit the power of the node it exactly did what was expected, receiving stuff from maas and also getting thing from archive and finally shutdown. And best of all maas gui showed the node as New. Then I commissioned it (needed to hit the power button of that node) and it went on working seamlessly and status became Ready.

one more question,
Now under DNS tab there are two entries

Should it look like that?


Integrated webcam on a Dell V131 drains the battery when not used. How to turn it off?

Install TLP and it will do it automatically for you. www.linrunner.de


A good corporate firewall will inspect traffic regardless of port so changing port just might not work.

If you have control over the server, and still want to try it, you can change the sshd port to port 80. Warning If you have something else running on port 80 (on the server) this will not work and will likely mean you completely lose SSH access to the server!

You'll need to edit /etc/ssh/sshd_config and change Port to 80. Then run

sudo restart ssh

And then connect:

ssh user@host -p80

Your bzr path would then look something like: bzr+ssh://host:80/path/

Another method is to use WebDav. This should skirt around the firewall problem completely because it all happens on Port 80 but it will require you to be running Apache and set up a number of things:

Get WebDav installed
Move your branch into the right place
Use the bzr-webdav plugin to connect

A VPN might be an option but if ssh is locked out, I'd expect that to be excluded too.

You might just want to have a word with your network admins. You need to do something and they're stopping you. If they've got a reason for blocking ssh, it's likely they'll view any extreme attempts to circumvent it fairly negatively...

In short, it might just be safer to talk to them.


This is related to a version conflict with the kernel module. I am not sure why this happens.

/var/log/kern.log:

  API mismatch: the client has the version 331.113, but this kernel module has the version 331.89.

Try this:

Ctrl+Alt+F2
$ sudo apt-get purge nvidia-*
$ sudo apt-get autoremove
$ sudo reboot

Back in a desktop (I wish I knew a better procedure for this/why it worked):

Ctrl+Alt+F2
$ DISPLAY=:0 unity
Ctrl+Alt+F7
Right Click Desktop -> Open In terminal
$ dconf reset -f /org/compiz/
$ unity

There should now be a unity interface (but slow as molasses)

Reboot

Back in unity:

Software & Updates -> Additional Drivers -> 331.113 updates
Apply & Wait & Wait & Wait
Reboot... (When done)

Victory!


Headphones not detected if plugged in before boot Ubuntu 18.04

I just faced a similar problem.

I also have an HDMI monitor plugged in, so PulseAudio chose it instead of the headphones. After unplugging and plugging the headphone in the audio jack, I can only guess it gave priority back to the headphone and set it as the default.

So the issue for me is that PulseAudio is setting up the wrong profile by default due to my HDMI monitor being present. The headphones are still being detected, just not being used due to the wrong profile.

Solution: Remove any configuration files auto-generated at ~/.config/pulse

rm -r ~/.config/pulse

Then restart pulseaudio

pulseaudio --kill && pulseaudio --start

If you open pavucontrol, it should be correctly set to a profile matching the headphones.

For example:

Then go to the Devices tab and check if Headphones (plugged in) is selected as the default device.


Chmod all files getting uploaded automatic

Here is your answer.

How Rinzwind said, you need a maximum of 664. Therefore 777-664=113

local_umask=0113

I quote:

  In case you are wondering where to set your umask, it can be set in
  the vsftpd config file (/etc/vsftpd.conf) as anon_umask for anonymous
  access and local_umask for users.

  For the mask to work properly (even without anonymous access) it seems
  necessary to set anon_upload_enable=YES and
  anon_mkdir_write_enable=YES. If these are not set, writing, reading
  and executing will not be allowed for groups or others on files
  uploaded via ftp (even though the standard privileges may be set for
  something else).

  In your case, if you need user-authenticated access, you should set
  the following:

anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=0002
anon_upload_enable=YES
anon_mkdir_write_enable=YES
file_open_mode=0777

  Here, file_open_mode sets the default setting of files. 777 makes it
  readable, writeable and executable for anyone. With local_umask set to
  002, this gives you 775, as you requested.

  Notice that local_umask defaults to 077, disabling groups and others
  to access files in any way (hence it is set here).


What Debian version are the different Ubuntu versions based on?

You can find the Debian version on which your Ubuntu version is based in the file: /etc/debian_version
From 10.04 up to 21.04:
Ubuntu            Debian
21.04  hirsute    bullseye/ sid   - 11
20.10  groovy     bullseye/ sid
20.04  focal      bullseye/ sid
19.10  eoan       buster  / sid   - 10
19.04  disco      buster  / sid
18.10  cosmic     buster  / sid
18.04  bionic     buster  / sid
17.10  artful     stretch / sid   - 9
17.04  zesty      stretch / sid
16.10  yakkety    stretch / sid
16.04  xenial     stretch / sid
15.10  wily       jessie  / sid   - 8
15.04  vivid      jessie  / sid
14.10  utopic     jessie  / sid
14.04  trusty     jessie  / sid
13.10  saucy      wheezy  / sid   - 7
13.04  raring     wheezy  / sid
12.10  quantal    wheezy  / sid
12.04  precise    wheezy  / sid
11.10  oneiric    wheezy  / sid
11.04  natty      squeeze / sid   - 6
10.10  maverick   squeeze / sid
10.04  lucid      squeeze / sid

sid is the development distribution of Debian (sid - testing - stable)
You can find out the contents of the file without installing an entire system by view the sources for the package basefiles on Launchpad.


How to disable gtk-theme in covergloobus?

Install CompizConfig
SettingsManager

sudo apt-get install compizconfig-settings-manager
Launch it by searching from the dash
in Unity, or Preferences >
CompizConfig Settings Manager in
Ubuntu Classic.
Navigate to the Window Decoration
tab.

Add a new rule to Decoration
Windows.

Enter the value Covergloobus.py,
and tick the Invert box.

Click Add.


Alt + F2 and ubuntu-bug NameOfProgram can be used to trigger Apport-Error-Report. It will check Integrity and Changes to related Configuration Files, which gives a general Idea wether the Issue is with the Component itself or in the Workings with the surrounding System.


I am trying to use the grep function in a script but it is not working, Although it is working in the terminal

The variable va1 needs to be put into action.

The variable va1, although it contains the output of a command ( this is called command substitution ), is not actually recognized by the shell as a command by itself and is not going to be executed like one. It needs to be called by a command in your script.

Try adding echo "$va1" in the second line of your script like so:

va1=$(grep -o -i G8LE C60_TAPC_GRM_box.gro | wc -l)

echo "$va1"

You might as well need to add the full path of the C60_TAPC_GRM_box.gro file like so:

va1=$(grep -o -i G8LE /home/YourUserName/C60_TAPC_GRM_box.gro | wc -l)

Best of luck


How would Ubuntu work on an Apple retina display?

It will work if you adjust the DPI settings for the fonts. You have several options:

Using gnome-tweak-tool: Advanced settings > Fonts > Text scaling factor
Using dconf-editor: org > gnome > desktop > interface > text-scaling-factor


Resuming a vim session I have accidentally disconnected from

Consider reptyr:

NAME
       reptyr - Reparent a running program to a new terminal

SYNOPSIS
       reptyr PID

Find vim's process id with pidof vim or ps aux | grep vim.

It is also possible to see the process id if you try to open a file which is still opened by vim. Using the shown pid you should be able to reattach to your previous session.

If you get an error:

Unable to attach to pid 12345: Operation not permitted

Ensure that the ptrace scope is set to 0 (instead of 1):

echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope

After running reptyr, you may have to press Enter or another key to refresh the terminal (console) window.


Where are the uploaded files from redmine stored? and its not in "/redmine/files"

I finally found it! It was somehow stored under /var/lib/redmine/default/files/

Funny that there is nothing else but this folder. There is a way to modify the folder location in the redmine installation.

For that you have to change under redmine/config/xxxx.rb  (your environment name)

and add: attachments_storage_path: /your/file/location


Ubuntu 14.04 ignoring network settings performed in the UI?

I suggest you comment out your eth0 setting in /etc/network/interfaces thus:

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#auto eth0
#iface eth0 inet dhcp

Restart the computer and you should be all set.


Installing mesa utils should take care of that. In a terminal, run the following command:

sudo apt-get install mesa-utils


I noticed that the script lines from the os_prober are not inserted in the grub script file at all. Maybe there is an error in the file:

/etc/grub.d/30_os_prober

It normally should show itself even if no other os is detected. You could purge grub-common and reinstall it, but maybe it is more safe to download grub-common.deb and just take the file from there.
If you run

sudo grub-mkconfig | grep prober

you should see the script beginning and ending. If this is not working no matter if your windows boot works or not, it will not show up.


Stop Unity dash from following/linking file

You can use Zeitgeist's "activity-log-manager" to prevent your system from scanning your Downloads folder.

1. Install activity-log-manager

Open a Terminal (hit Ctrl+Alt+t) and type:

sudo apt-get install activity-log-manager

You'll be asked for your passwort. Type it in, confirm and proceed.

2. Configurate activity logging

To open the activity-log-manager hit Alt+F2 and type activity-log-manager. Hit Enter.

Now configurate as you wish, for instance:

Everything in the given Folder (here "Downloads") won't be logged any longer.

Additionally it won't be shown under 'recently downloaded" in unity dash anymore.


Ubuntu 14.04: Wifi disabled after suspend

#!/bin/sh

case "${1}" in
  resume|thaw)
    nmcli r wifi off && nmcli r wifi on;
esac

Put this in /etc/pm/sleep.d/10_resume_wifi and the problem should be fixed immediately.


Why has IPv6 mngtmpaddr stopped responding?

After some research I see that the IPv6 addresses expire -- unless assigned otherwise. This default is, I believe, to protect the privacy of clients. This concern however is at odds with the requirement that servers have a consistent address.

So that's why the IPv6 addresses stopped working.

To acquire a 'static' - permanent - IPv6 I have added a IPv6 address to the netplan configuration.

  renderer: networkd
  wifis:
    wlp3s0:
      dhcp4: yes -- set through DHCP reservation
      dhcp6: no
      addresses: [10.0.0.120/24,"-:-:-:-::-/128"]

Where I took the IPv6 address from the current dynamically assigned IPv6 address, and the gateway from the default route of the ip -6 r command. (I found I had to reboot the machine to apply. A simple netplan apply or networking restart did not suffice.)

This assigns a forever lifetime to the IPv6 address and creates another temporary IPv6.

One of my three machines (all fully updated 19.04) resists creating a forever lifetime. I have fixed this with

ip a change <device IPv6 address> dev <device id> preferred_lft forever


Why do interface items keep disappearing?

You should try installing the proprietary driver if it doesn't bother you. To install it directly execute the .run file.
You may also try Unity 2D, which doesn't use hardware acceleration. If changing the driver doesn't fix it but using Unity 2D does, this indicates a possible issue with the videocard hardware.

To restart the unity shell (and clean up the garbage without logging off and back on), use Alt+F2 to open the run dialog, type (blindly if the problem is that bad) unity --replace and Enter. The current unity session is replaced with a new, clean one.

Other people using other compositing shells (like Gnome 3) could alt+F2 and type r. Unity just picks the first executable to begin with r instead of doing a shell restart.


There are two answers to your question.

The first is the short answer that directly addresses the error in your log:

file '/etc/ssl/private/ssl-cert-snakeoil.key' does not exist or is empty

Apache is stopping because the SSL certificate is missing. Simply remove the default SSL configuration from the sites-enabled folder using sudo rm /etc/apache2/sites-enabled/default-ssl and Apache should start up no problem. To re-enable the ssl site after you've adjusted the configuration you can run sudo ln -s /etc/apache2/sites-available/default-ssl etc/apache2/sites-enabled/default-ssl.

The second answer is the correct answer, which is to take a good look at the Apache documentation to determine why your configuration is incorrect. Because the values in your error log look like the defaults from a fresh Apache install I included the first answer, but after you do the above you should dedicate some time to reading the documentation. You will learn a lot and will find out why there was no snakeoil.pem file and what a snakeoil certificate means.

You can find the general documentation here: http://httpd.apache.org/docs/2.2/

(or http://httpd.apache.org/docs/2.4/ depending)

You can find general configuration documentation here: http://httpd.apache.org/docs/2.2/mod/quickreference.html

You can find the mod_ssl documentation here: http://httpd.apache.org/docs/2.2/ssl/


PROBLEM :: Enable SSH for hadoop with new key

You don't a space in between $HOME and .ssh/id_rsa.pub and also between $HOME and .ssh/authorized_keys, so the actual command is:

cat $HOME/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys

(you could copy-paste the above command).

This appends the contents of $HOME/.ssh/id_rsa.pub to $HOME/.ssh/authorized_keys


Kernel metapackages (linux-generic vs linux-image-generic)

Yes it iswas. But since Ubuntu 12.10 linux-generic depends both on image and headers metapackages:

linux-generic ─┐
               ├─ linux-image-generic   ─ linux-image-VERSION-generic
               │                        ┄ linux-image-OLD_VERSION-generic
               │                        ┄ linux-image-ANCIENT_VERSION-generic
               │
               └─ linux-headers-generic ─ linux-headers-VERSION-generic
                                        ┄ linux-headers-OLD_VERSION-generic
                                        ┄ linux-headers-ANCIENT_VERSION-generic

But I cannot explain why it was that way over mutiple release cycles. If you look at Ubuntu package search and look at all versions you will see at least the Hardy linux-generic package depends on two meta-packages (-image-generic and -restricted-modules-generic).


You have to install these packages to make Ubuntu One working in Xubuntu 11.10:
(In synaptic, search: ubuntuone)

desktopcouch-ubuntuone
python-ubuntuone
python-ubuntuone-client
python-ubuntuone-control-panel
python-ubuntuone-storageprotocol
ubuntuone-client
ubuntuone-client-dbg
ubuntuone-client-gnome
ubuntuone-control-panel
ubuntuone-control-panel-gtk
ubuntuone-couch

Then restart the computer. This works for me.


How to fix this "New tab" issue in Chromium?

I had the same problem and found a workaround:

http://www.mail-archive.com/linux-traipu@lists.launchpad.net/msg00886.html

Bye


Command to Move Mouse Pointer to Other Screen

You can install the xdotool utility and then move the mouse to a given screen and x and y position, eg:

xdotool mousemove --screen 1 10 10

If your 2 screens are actually one large virtual screen (xinerama mode) you dont use --screen but give a very large x value.


This only applies to Oneric 11.10

These removal commands were created based on what Ubuntu, Kubuntu, etc. packages were added to a default Lubuntu installation. It's possible that the commands might remove some other packages you have since added to the default and want to keep. If that's the case, keep track of which packages those are and reinstall them. Your settings should still be there.

sudo apt-get remove acpi-support acpid adium-theme-ubuntu aisleriot apg app-install-data app-install-data-partner appmenu-gtk appmenu-gtk3 appmenu-qt apt-xapian-index apturl apturl-common at-spi2-core avahi-autoipd bamfdaemon banshee banshee-extension-soundmenu banshee-extension-ubuntuonemusicstore baobab binfmt-support bluez-alsa bluez-cups bluez-gstreamer branding-ubuntu brasero brasero-cdrkit brasero-common brltty c2esp checkbox checkbox-gtk cli-common compiz compiz-core compiz-gnome compiz-plugins-default compiz-plugins-main-default compizconfig-backend-gconf cups-bsd dc deja-dup dmz-cursor-theme doc-base duplicity dvd+rw-tools empathy empathy-common eog espeak espeak-data evolution-data-server evolution-data-server-common example-content exiv2 firefox firefox-globalmenu firefox-gnome-support foo2zjs gamin gbrainy gcalctool gcc gcc-4.6 gedit gedit-common geoclue geoclue-ubuntu-geoip ghostscript-x ginn gir1.2-atspi-2.0 gir1.2-gconf-2.0 gir1.2-gmenu-3.0 gir1.2-gtksource-3.0 gir1.2-indicate-0.6 gir1.2-launchpad-integration-3.0 gir1.2-peas-1.0 gir1.2-totem-1.0 gir1.2-totem-plparser-1.0 gir1.2-wnck-3.0 gnome-accessibility-themes gnome-codec-install gnome-control-center gnome-control-center-data gnome-desktop3-data gnome-font-viewer gnome-games-common gnome-icon-theme-symbolic gnome-mahjongg gnome-media gnome-menus gnome-nettool gnome-online-accounts gnome-orca gnome-power-manager gnome-screensaver gnome-screenshot gnome-search-tool gnome-session gnome-session-bin gnome-session-canberra gnome-session-common gnome-settings-daemon gnome-sudoku gnome-system-log gnome-system-monitor gnome-terminal gnome-terminal-data gnome-utils-common gnomine growisofs gstreamer0.10-alsa gstreamer0.10-gconf gstreamer0.10-plugins-base-apps gstreamer0.10-pulseaudio gstreamer0.10-tools guile-1.8-libs gwibber gwibber-service gwibber-service-facebook gwibber-service-identica gwibber-service-twitter hplip hplip-cups hplip-data hwdata ibus ibus-gtk ibus-gtk3 ibus-pinyin ibus-pinyin-db-android ibus-pinyin-db-open-phrase ibus-table im-switch indicator-appmenu indicator-datetime indicator-power indicator-session indicator-sound inputattach intel-gpu-tools kerneloops-daemon lftp libappindicator0.1-cil libasound2-plugins libatk-adaptor libatspi2.0-0 libavahi-gobject0 libbamf0 libbamf3-0 libboost-serialization1.46.1 libbrasero-media3-1 libbrlapi0.5 libc-dev-bin libc6-dev libcamel-1.2-29 libcanberra-pulse libcompizconfig0 libcrypt-passwdmd5-perl libdbus-glib1.0-cil libdbus1.0-cil libdbusmenu-qt2 libdconf-dbus-1-0 libdconf-qt0 libdconf0 libdecoration0 libdotconf1.0 libebackend-1.2-1 libebook1.2-12 libecal1.2-10 libedata-book-1.2-11 libedata-cal-1.2-13 libedataserver1.2-15 libedataserverui-3.0-1 libespeak1 libexempi3 libexiv2-10 libfile-copy-recursive-perl libfolks-telepathy25 libfolks25 libgail-3-common libgail-common libgamin0 libgconf2.0-cil libgd2-xpm libgdata-common libgdata1.7-cil libgdata13 libgdiplus libgeoclue0 libgexiv2-0 libgkeyfile1.0-cil libglew1.5 libglewmx1.5 libglib2.0-bin libglib2.0-cil libglib2.0-data libgmime-2.4-2 libgmime2.4-cil libgnome-control-center1 libgnome-desktop-3-2 libgnome-media-profiles-3.0-0 libgnome-menu-3-0 libgnome-menu2 libgnome2-common libgnomekbd-common libgnomekbd7 libgnomevfs2-0 libgnomevfs2-common libgoa-1.0-0 libgomp1 libgtk-sharp-beans-cil libgtk-vnc-2.0-0 libgtk2.0-cil libgtkmm-3.0-1 libgtksourceview-3.0-0 libgtksourceview-3.0-common libgtkspell3-0 libgudev1.0-cil libgvnc-1.0-0 libgweather-3-0 libgweather-common libgwibber-gtk2 libgwibber2 libhyphen0 libibus-1.0-0 libidl0 libido3-0.1-0 libjson-glib-1.0-0 liblaunchpad-integration1.0-cil liblightdm-gobject-1-0 liblouis-data liblouis2 libmetacity-private0 libmission-control-plugins0 libmng1 libmono-addins-gui0.2-cil libmono-addins0.2-cil libmono-cairo4.0-cil libmono-corlib4.0-cil libmono-csharp4.0-cil libmono-i18n-west4.0-cil libmono-i18n4.0-cil libmono-posix4.0-cil libmono-security4.0-cil libmono-sharpzip4.84-cil libmono-system-configuration4.0-cil libmono-system-core4.0-cil libmono-system-drawing4.0-cil libmono-system-security4.0-cil libmono-system-xml4.0-cil libmono-system4.0-cil libmono-zeroconf1.0-cil libmysqlclient16 libmythes-1.2-0 libnotify-bin libnotify0.4-cil libnux-1.0-0 libnux-1.0-common liboauth0 libopencc1 liborbit2 liboverlay-scrollbar-0.2-0 liboverlay-scrollbar3-0.2-0 libpeas-1.0-0 libpeas-common libprotobuf7 libprotoc7 libpulse-mainloop-glib0 libqt4-dbus libqt4-declarative libqt4-network libqt4-opengl libqt4-script libqt4-sql libqt4-sql-mysql libqt4-svg libqt4-xml libqt4-xmlpatterns libqtbamf1 libqtcore4 libqtdee2 libqtgconf1 libqtgui4 libquadmath0 libquvi0 libraptor2-0 librasqal3 librdf0 libreoffice-base-core libreoffice-calc libreoffice-common libreoffice-core libreoffice-draw libreoffice-emailmerge libreoffice-gnome libreoffice-gtk libreoffice-help-en-us libreoffice-impress libreoffice-math libreoffice-style-human libreoffice-writer librest-0.7-0 librsync1 libsane-hpaio libsdl1.2debian-pulseaudio libspeechd2 libspeexdsp1 libstlport4.6ldbl libsyncdaemon-1.0-1 libtaglib2.0-cil libtelepathy-farsight0 libtelepathy-logger2 libtextcat-data libtextcat0 libtotem-plparser17 libtotem0 libubuntuone-1.0-1 libubuntuone1.0-cil libunique-1.0-0 libunity-2d-private0 libunity-core-4.0-4 libunity-misc4 libutempter0 libuuid-perl libwmf0.2-7-gtk libwnck-3-0 libwnck-3-common libwnck-common libwnck22 libxp6 libxres1 libyajl1 libyaml-tiny-perl libzeitgeist-1.0-1 light-themes lightdm linux-libc-dev make media-player-info metacity metacity-common mono-4.0-gac mono-gac mono-runtime mousetweaks mscompress mysql-common nautilus nautilus-sendto nautilus-sendto-empathy nautilus-share notify-osd notify-osd-icons nux-tools onboard oneconf openprinting-ppds overlay-scrollbar pinyin-database pkg-config plymouth-theme-ubuntu-logo protobuf-compiler ptouch-driver pulseaudio pulseaudio-esound-compat pulseaudio-module-bluetooth pulseaudio-module-gconf pulseaudio-module-x11 pulseaudio-utils pxljr python-brlapi python-configglue python-dateutil python-egenix-mxdatetime python-egenix-mxtools python-farsight python-gconf python-ibus python-imaging python-indicate python-libproxy python-louis python-openssl python-pam python-papyon python-pexpect python-piston-mini-client python-protobuf python-pyatspi2 python-pyinotify python-serial python-speechd python-telepathy python-twisted-bin python-twisted-core python-twisted-names python-twisted-web python-ubuntuone-client python-ubuntuone-control-panel python-ubuntuone-storageprotocol python-uno python-virtkey python-webkit python-wnck qdbus qt-at-spi radeontool rastertosag-gdi rdesktop rfkill rtkit sane-utils seahorse shotwell sni-qt software-center speech-dispatcher splix ssh-askpass-gnome syslinux syslinux-common telepathy-butterfly telepathy-gabble telepathy-haze telepathy-idle telepathy-indicator telepathy-logger telepathy-mission-control-5 telepathy-salut thunderbird thunderbird-globalmenu thunderbird-gnome-support tomboy toshset totem totem-common totem-mozilla totem-plugins ttf-opensymbol ubufox ubuntu-artwork ubuntu-desktop ubuntu-docs ubuntu-mono ubuntu-sounds ubuntu-sso-client ubuntu-system-service ubuntu-wallpapers ubuntuone-client ubuntuone-client-gnome ubuntuone-control-panel ubuntuone-control-panel-gtk ubuntuone-couch ubuntuone-installer unity unity-2d unity-2d-launcher unity-2d-panel unity-2d-places unity-2d-spread unity-asset-pool unity-common unity-greeter unity-lens-applications unity-lens-files unity-lens-music unity-scope-musicstores unity-services uno-libs3 update-inetd ure usb-creator-common usb-creator-gtk vinagre vino whois wodim xbitmaps xcursor-themes xdg-user-dirs-gtk xdiagnose xfonts-mathml xterm xul-ext-ubufox zeitgeist zeitgeist-core zeitgeist-datahub zeitgeist-extension-fts zenity zenity-common && sudo apt-get install lubuntu-desktop

Reference

Getting Back to a Pure LXDE on Ubuntu


Test tar archive of linux drive on the same pc

I finally accomplished testing my cloned system in the partiton of the same computer as was original one.
In my case I created a tar backup of linux filesystem with excluding --exclude={"/dev/","/proc/","/sys/","/tmp/","/run/","/mnt/","/media/*","/lost+found","/boot") using kbackup.
One must never forget to include Root as it contains the partition table without which, entire backup is simply useless.
Boot must be backed up separately, because it redirects the system to load exact location i.e /dev/sdaX as i learned from my experience. You may have to generate boot grub files separately if you are using a different location other than original one for cloning linux file-system.
Then I created an inetrnal ext4 partiton to test the tar as I do not have another laptop and do not intend to guinea pig my own system.
I edited fstab file in routine. Creating swap file is easy.
On my system it was named as /dev/sda5(test drive).
Then instead of using livecd I used my own root system, which was intended to be cloned
First I mounted the test drive on /mnt/Test(say)
sudo mount /dev/sda5 /mnt/Test
And untar my entire linux filesystem to that folder Test
Following, I created following empty directories that were excluded from tar backup
sudo mkdir temp && sudo mkdir proc && sudo mkdir sys && sudo mkdir dev && sudo mkdir boot
Then i copied following boot files from my own boot system to the cloned system as
sudo cp -r /boot/vmlinuz-5.8.0-25-generic  /mnt/Test/boot
sudo cp -r /boot/vmlinuz-5.8.0-41-generic  /mnt/Test/boot
sudo cp -r /boot/vmlinuz  /mnt/Test/boot
sudo cp -r /lib/modules/5.8.0-25-generic /mnt/Test/lib/modules/
sudo cp -r /lib/modules/5.8.0-41-generic /mnt/Test/lib/modules/
Then I follwed advice from How to restore deleted files in /boot? (vmlinuz missing, system does not boot)
for i in /sys /proc /run /dev; do sudo mount --bind "$i" "/mnt/Test$i"; done
chroot /mnt/Test
mkinitramfs -o /boot/initrd.img-5.8.0-25-generic 5.8.0-25-generic
mkinitramfs -o /boot/initrd.img-5.8.0-41-generic 5.8.0-41-generic
Then i updated grub both inside cloned system and my original system.
sudo update-grub
Create mnt directory if missing
sudo mkdir -m 755 /mnt
In order to be sure if you have indeed landed in cloned system as it is hard to tell the difference from the original one, make a text file in  $HOME directory of cloned system from original one  listing some text"(Big Brother is watching)".


Restore Firefox group tabs and previously opened tabs

You can!

ControlShiftN will restore closed windows, even between sessions.

I'm constantly accidentally firing this off when I switch to Chromium for private tab-testing (Chromium uses this shortcut to start a private-mode window) and old Firefox windows pop up because Firefox still has focus.


Ubuntu Restricted Extras installation via USC stuck on "Applying Changes"

Like in previous releases the installation of ubuntu-restricted-extras  requires to accept the Microsoft EULA for MS TTF core fonts.

Unfortunately the window asking for acceptance is hidden behind the USC window but you can present it by clicking on the grey question mark icon on the launcher:

We can  proceed with installing all other restricted software without accepting the MS licence if we do not need those fonts.


Does transferring files like this will consume bandwidth? Will it
  affect my internet usage allowance?

Bandwidth: It might, though it shouldn't be too much.
As for the usage allowance: No, it shouldn't. You aren't connecting to the internet, just passing files between computers on the local network. No connection to the outside involved, no getting of data from the outside world.

  And the transfer speed is very slow. (Around 1.1 MB/sec). But my other
  downloads from internet are very fast. Y is this slow?

Not exactly sure on this part. It might have to do with the connection that one of the systems has compared to the other. I'm guessing that the desktop is connected via Ethernet and the Laptop via WiFi? If it is, the speed issue might be because the data has to first go through the Ethernet to the Router, then be streamed to your Laptop. Beyond that, I can't honestly give any reason why this is happening.


Unable to install Ubuntu 18.04 after cancelled installation

The problem was that in the bootable USB the file mmx64.efi didn't exist.

Solution1:

Renamed the file grubx64.efi to mmx64.efi located at folder EFI\BOOT on USB and Reboot.

Solution2:

Copy the file grubx64.efi under the name mmx64.efi (so the USB Drive folder /EFI/BOOT now contains three files: BOOTx64.EFI, grubx64.efi and mmx64.efi).
Then, reboot


Unfortunately, no. Due to the way upgrades work, it is VERY difficult for you to do a clean down-grade while keeping all of your files, apps, and preferences. The simplest, cleanest solution here is to back up all of your import files and do a clean re-install of your preferred version.

I recently(AKA 15 minutes ago) went through the same process. You are able to keep some system config files safe through this process, such as etc/fstab, by using sudo mv or sudo cp to transfer them onto external storage and then move them back when the reinstall is finished. That is what I did.


Is it possible to set higher grub screen resolution then max videoinfo value?

Yes, you can do it from the bios settings. You go to BIOS setup then under boot up configuration select switchable graphics instead of discrete graphics.


I have used the newer unity and compiz from the following PPAs:

ppa:vanvugt/compiz
ppa:vanvugt/unity

This seems to have resolved the issues I am having.


What does the "--display" option of the gnome-screenshot command do?

From the gnome-screenshot manual:

--display=DISPLAY
    X display to use.

If you have multiple displays, you would use this to tell the program which one to screenshot, example

--display=HDMI-0

Would screenshot the screen with the display id HDMI-0.

HDMI-0 here is the id of my display, to find yours run

xrandr --query

Here is some sample output, you can see the three display ports I have, HDMI-0, VGA-0 and DVI-D-0 and if they are connect or not.

VGA-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 160mm x 90mm
   1920x1080     60.05 +  59.94*   50.00    23.97    60.00    50.04
   1280x960      37.88
   1280x768      17.09
   1280x720      60.00    59.94    50.00
   720x576       50.00    50.08
   720x480       59.94    60.05
   640x480       59.94    59.93
DVI-D-0 disconnected (normal left inverted right x axis y axis)