Skype 4.3 IM does not display attached photos

A note from the future: Since Microsoft retired the Skype application (v4.*) and replaced it with Skype for Linux (v7+) media are embedded directly into the conversation screen.

This appears to be by design:

  If you don't see a picture you were sent, but instead see a link, don't worry; this is only temporary.

  As part of Skype's move to a cloud-based architecture, pictures sent via chat are now uploaded to the cloud. All of our Skype clients are currently moving to this new cloud-based architecture, and once we complete the rollout, your pictures will show (as normal) inside the conversation. For the moment, to view the picture that your contact sent, all you have to do is click the link and log in.

  […]

  Skype 5.0 for iOS (and above), Skype 5.1 for Android (and above), Skype 1.8 on Xbox One, Skype 6.20 for Windows desktop, Skype 7.0 for Mac, and Skype 2.21 for Windows Phone (and above) users might also see pictures appear in their chats as pictures. Learn more. [emphasis added]

(Source – I had to disable the “Cloud-to-Butt” browser add-on for this one)

It's noteworthy, that Skype for Linux does not appear in the list of supported platforms for the soon-to-return feature, to have images embedded in the chat window again. The Learn more link repeats the emphasised portion and platforms.


How do I install Ubuntu on an external harddrive?

Use caution if attempting the following! Be sure you know what you are doing.

I believe you have to temporarily modify your bios settings to have the primary disabled, and have the connected external be recognized (the specific settings will differ between machine varieties).  With this accomplished you can then boot from live cd or usb and should be able to install as you normally would except it will be on the primary.  After that is completed return to bios after rebooting again, re-enable the primary drive and set your boot order preference.

That said, if you are not extremely comfortable messing with these settings do not proceed as you may be very sad at the outcome.

One other option, that I'm not sure if it will work or not is to create another smaller partition within the free partition and try to use unetbootin to image that partition only,  I have not tried to image a partition with it before, but if you can select this smaller partition within the unetbootin program I think you will get the result you are looking for, then you should be able to mount the main segment of the partition when booting from it, but as I said I haven't tried this, only in theory...I was planning on trying a similar setup as you are in the near future and if I get that done before you give it a go I will update the info as needed.


how to set IP Address manual with command line(not GUI) but the network connection through WLAN (WiFi)

With your command you did only restart the loopback interface, not the interface you edited.

Usually you stop the network interface you want to edit (wlan2 in your case) with ifdown, before you edit the /etc/network/interfaces file and bring it up with ifup afterwards.

Try executing ifup wlan2. Make sure there is no network manager installed trying to configure the wifi itself and make sure wlan2 is the correct interface.


I uninstalled my ubuntu 14.04 desktop now i have no login in screen

I would suggest trying to repair your installation with a live usb, the Ubuntu installer has an option to repair your installation, instead of just reinstalling everything.


Detecting rootkit without another computer

Rkhunter is actually better with its detections than Chrootkit (and as Rkhunter does additional checks for the suckit rootkit unlike Chrootkit, if only Chrootkit is detecting it then it is almost certainly a false-positive), however both need to be installed before the rootkit otherwise they will not detect it, so they are the sort of things that need to be installed when you install the OS and before you update, install, or change anything else.

So unless you've had them before having the rootkit they won't be any good because they focus on new changes, and assume that the system is currently safe.

There is a more advanced tool though called OSSEC HIDS which does a range of other things as well as being able to detect rootkits on systems without the need to be installed before the rootkit (though it is probably advisable as the rootkit could still alter it, but as it works in a different way, it is able to detect a rootkit installed before it).

And if I was worried that I had a kernel level rootkit, I wouldn't be worried about updates being infected, I would worry about the fact that the rootkit was already in my kernel and thus could do anything, even break the install system so that I can install anything to detect it.


Never mind I found out the answer, there was carriage returns and an ^M char which I had never seen. This question can be deleted.


It is indeed a combined launcher and taskbar, sounds like your configuration is pretty f-up. Try holding down alt and pressing f2 to open the run dialogue and typing in unity --reset before pressing enter. The screen may flicker for a bit, but then things should be back to normal.


How do I install flash in to Firefox running with Wine?

Step 1

Use this link and download the latest version of flash player for windows.(select windows 7 as your OS) - DOWNLOAD

Step 2

Now you will get a .exe file and open it with wine to provide flash support to the web browsers you installed inside wine.

This may be the answer for your primary question. But not sure whether your web cam problem will be solved by this


How Can I Command to Delete MySQL Logfiles Whenever Their Data Size is Greater Than a Limit?

When I delete these log files manually the server became to serve again and accepted connections

Please do not delete them and empty them using > mysql.log. It is a better practice: sometimes software expects the log to be there when that software is running and it can crash when it tries to write to it when it is gone. Emptying also preserves permissions.

How can I solve that issue?

Use logrotate. Here is an example script.


Will openssl on Ubuntu 12.04 and 14.04 be maintained after Dec 31, 2016?

If you read https://help.ubuntu.com/community/Repositories#Components you'll see that:

  When you install software from the main component, you are assured
  that the software will come with security updates and that commercial
  technical support is available from Canonical.

OpenSSL is from the Main component, therefore you are assured security updates until EOL.


You have not provided a return path. You need:

iptables -t nat -A POSTROUTING -o ens33 -j SNAT --to 192.168.1.5

I assume it is just a typo in your PREROUTING line, but regardless I would do it this way anyhow:

iptables -t nat -A PREROUTING -p tcp -i ens33 --dport 80 -j DNAT --to-destination 192.168.2.2:80

If your default policy for the FORWARD chain is ACCEPT, then you do not need those rules. You do not need the INPUT chain rule.


Cannot execute binary file with bash program but runs with ./program

When you do bash some/file, bash reads that file, parses its contents according to bash's syntax rules and executes the resulting commands. Valid files are usually called "scripts", and their contents are much like what you actually type out in a shell. Compiled programs contain machine instructions. You use zsh - do you expect it to understand machine instructions? Zsh doesn't, and neither does bash.

If you want to use bash to execute a command, use the -c option:

bash -c '/some/command'

But there's not much point to doing so when the command itself is executable. If you can run it using /some/command, then use it directly.


Lubuntu sound settings from sound applet

In order to get the Lubuntu/lxde sound icon in panel, as it's the default config of a fresh install, right click on the panel and select "add elements to the panel".

In this window you will select the"Add" button and search for the "volume control" applet.

Put it in any part of the panel you want and after this you can right click the icon and select "configuration" which will open alsamixergui or pavucontrol if you installed it.

You can then right click the notification INDICATOR area and disable the sound menu indicator.


"low disk space on filesystem root" Ubuntu 18.04/Windows 10 partitioned

First you need to run gparted from live cd/usb, cause it can't do anything with partition it running from, and all other mounted partitions.
How to make bootable usb, boot from it, choose "try without installing" in boot menu, then run gparted.

make sda8 smaller and move to the right(close to end of disk)
move sda7 to the right, placing it just before sda8
now you have unallocated space to the right of sda6, expand it to
that space and you'll get a lot of free space in Ubuntu

Note, backup important files/documents you have in Ubuntu
You using sda8 to store something, make it's size enough to store your data but much less then 400Gb, this size difference will go to ubuntu partition
You should follow instructions carefully, incorrect usage of gparted can corrupt your installed OS


How do i display headers of all commands?

Use a double pipe command, with head

ps -el | head -1 && ps -el | grep bash
F S   UID   PID  PPID  C PRI  NI ADDR SZ WCHAN  TTY          TIME CMD
0 S  1001  2680  2671  0  80   0 -  7532 wait   pts/0    00:00:00 bash
0 S  1001  3673  2671  0  80   0 -  7499 wait   pts/1    00:00:00 bash
4 S  1000  3694  3681  0  80   0 -  7469 -      pts/1    00:00:00 bash
0 S  1001  6825  2671  0  80   0 -  7499 wait   pts/2    00:00:00 bash

Explanation :

ps -el is the command that you would get result
head -1 will print the 1rst line displayed by your command (here, ps -el), so it would be the header line; the number of the option -1 just say how many lines must be displayed, so if your header is 2 lines, use -2 instead
there is the grep of your command
&& help you to execute 2 commands in 1 line :

it show the header line thanks to head -1
it display the ps result filtered by the grep command

Also, there is a contracted form (which is equivalent) :

ps -el | ( head -1 && grep bash )

NB : if you also want to have the header line at the end (due to some result), just add another && statement, to do a 3 commands in 1 line, like that :

ps -el | head -1 && ps -el | grep bash && ps -el | head -1

Result :

F S   UID   PID  PPID  C PRI  NI ADDR SZ WCHAN  TTY          TIME CMD
0 S  1001  2680  2671  0  80   0 -  7532 wait   pts/0    00:00:00 bash
0 S  1001  3673  2671  0  80   0 -  7499 wait   pts/1    00:00:00 bash
4 S  1000  3694  3681  0  80   0 -  7469 -      pts/1    00:00:00 bash
0 S  1001  6825  2671  0  80   0 -  7499 wait   pts/2    00:00:00 bash
F S   UID   PID  PPID  C PRI  NI ADDR SZ WCHAN  TTY          TIME CMD


What's a good way to reinstall (from the command line)?

So, the answer to the main question:

You can't.


Way to copy/recover data much larger than any storage medium I have?

I determined that the best thing for me to do, in my circumstance, was to purchase a new HDD large enough for what I needed.

It ends up being more cost effective than a temporary cloud solution or purchasing a BD-R drive and media, and worth avoiding the frustration of USB thumb sticks and DVD-Rs, plus I can get more utility out of it later.


Backup MySQL databases from broken Ubuntu

you can do a copy of your databases located in here.var/lib/mysql

The in the fresh install of your mysql stop the mysql. service mysql stop
change the /var/lib/mysql with your data, then re-run the mysql service mysql start


How can i increase mouse scrolling speed on Ubuntu Web Browser?

I believe there is an app called 'imwheel' in the Ubuntu repositories. As there is no native way to change the mouse wheel scroll speed in Ubuntu, you will have to install this to be able to do so.

Sorry, haven't used it myself so I can't comment much, but my understanding is that this is a viable solution to your problem.

However, it looks like slow scrolling has been reported as a bug for the browser:

https://bugs.launchpad.net/oxide/+bug/1555674

You might have to wait for an update that addresses the bug.


Area screenshot - move crosshair with keyboard

Yes you can control the mouse with the direction keys if you have a numeric keypad.

Open Dash using the Super Key and type Universal Access:

As shown above select the Pointing and Clicking tab and set the Mouse Keys to "ON".

Now when you have Num Lock toggled off the arrow keys will move the mouse pointer.

NOTE: On my system it was slow moving the cursor with the arrow keys so I'll still use the mouse to move around faster.


Start vim automatically as root in home folder

I suppose you could create a shortcut to run sudo vim ~/..


nautilus crashes when expanding /Downloads folder

I think i found the answer

In xsession-errors log  i found:

ERROR:io-xcf.c:1443:xcf_image_stop_load: code should not be reached.

it is gloobus-previewer bug which is cousing the crash.
Pls look here: bugs.launchpad.net/gloobus-preview/+bug/690364.
So what i did is to install gnome-xcf-thumbnailer.

I found also the suspect *.xcf.bz2 file in the /Download folder and removed it...

This is whats working for me.


Can I Get the Unity Desktop Terminal on Ubuntu GNOME?

They are actually the same (gnome-terminal), but with different color schemes.

If you have the Unity desktop, first create a new temporary user and login with it into Unity. Run a terminal and close it. Now log off and access GNOME with your regular user again. Open a terminal and run these commands:

sudo rm -rf $HOME/.gconf/apps/gnome-terminal
sudo cp -rf /home/tmp-username/.gconf/apps/gnome-terminal $HOME/.gconf/apps

replacing tmp-username with the name of the temporary user you just created. After running the command you can delete this user. Run gnome-terminal again and now you should see the Unity style.


How can I create themes for Gnome Shell?

while i also have failed so far to find some type of cheat-sheet for gnome 3.4 themes the posts on the blog of fp.murphy where Lucas Romero already has linked to seem to contain plenty of very useful information regarding gnome 3.x and its customization.

some basics worth reading prior to the post provided by Lucas can be found in an ealier post there giving some simple examples and general overview.

if more specifically geared to gnome shell extensions i found the series of up to now 4 posts all written in september 2012 on mathematicalcoffee very helpful. since gnome 3.4 has brought many api-changes its important to look into recent information regarding gnome customization.


Installing amsynth LV2 for use with Ardour 5

Ok, so this is how I manged to install and activate amsynth as an LV2 for use with Ardour 5 (on amd64 architecture):

Step 1: install amsynth through repositories

sudo apt-get install amsynth

Step 2: copy amsynth plugin to a directory Ardour 5 actually scans for example (see sidenote):

sudo cp -r /usr/lib/x86_64-linux-gnu/lv2/amsynth.lv2/ /usr/lib/lv2/

Step 3: add/drag amsynth to your midi lane through Ardours' plugin manager

Have fun composing!

Sidenotes:

Directories that are scanned for plugins:
~/.lv2:/usr/local/lib/lv2:/usr/local/lib64/lv2:/usr/lib/lv2:/usr/lib64/lv2 (Source: Paul David https://discourse.ardour.org/t/calf-plugins-cannot-be-loaded/90426/9)

amsynth is also installed as a standalone application. It can be launched independently from Ardour or Jack. There you can find features like random settings etc.


Firestorm needs 32-bits libs, which seem, unavailable

You need to install 32-bit libraries from an old repository. Note that this is a bad way of doing it and may cause undesirable effect sometimes but is suggested in firestorm wiki. You can either do a full 32-bit install or only install the needed 32-bit libraries

Full 32-bit install

This method installs the 32-bit libraries from a previous distribution

sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ raring main restricted universe multiverse"
sudo apt-get update
sudo apt-get install ia32-libs

Once everything is working, it is better to remove the ia32-libs-raring.list in /etc/apt/sources.list.d, and do sudo apt-get update.

There is also an option to install only the needed 32-bit libraries as given in the wiki if you do not want to do a full 32-bit install.

Install only the needed 32-bit libraries

Ensure 32-bit architecture support is enabled:

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

Install base libraries:

sudo apt-get install libglu1-mesa:i386 libgtk2.0-0:i386 libidn11:i386 libpangox-1.0-0:i386 libpangoxft-1.0-0:i386 libqtwebkit4:i386

Install gstreamer0.10 libraries:

sudo apt-get install gstreamer0.10-ffmpeg:i386 gstreamer0.10-pulseaudio:i386 gstreamer0.10-plugins-base:i386 gstreamer0.10-plugins-good:i386 gstreamer0.10-plugins-bad:i386 gstreamer0.10-plugins-ugly:i386

You might also have to install esound-common, libao-common,libao4 pulseaudio-esound-compat depending on your system.

You should also try installing following packages if you are running into problems running Firestorm. Note that some of the packages mentioned in the code below may have been already installed as a part of other packages you installed by running codes above. Also note that libstdc++ will try to remove some packages installed in your system, so read carefully what it is going to uninstalled before pressing enter!

sudo apt-get install libstdc++-4.8-pic:i386
sudo apt-get install libapr1:i386 libaprutil1:i386 libgl1-mesa-dev-lts-trusty:i386
sudo apt-get install libatk1.0-0:i386 libdb5.3:i386 libfontconfig1:i386 libfreetype6:i386 libuuid1:i386 libx11-6:i386 libxinerama1:i386 libxrender1:i386

Consult the wiki for more information.


Kodi Failed Installation on Ubuntu 16.04

You have a file conflict. Two packages are trying to provide the same file, and that's not allowed in a Debian-based system.

The packages kodi 2:17.6+git20171114.2125-final-0xenial and kodi-data 15.2+dfsg1-3ubuntu1.1 conflict. They cannot be installed at the same time. This usually occurs when the packages are from different sources.

There are two ways to resolve the problem.

1) Pick the package you want to keep, uninstall ALL packages from the rejected source, and delete the rejected source. Keeping packages from the rejected source may cause version conflicts or more file conflicts.

2) Use apt's --force flag  to agree to overwriting the file. This solves the problem for today, but the problem may re-occur each time the packages are upgraded.

The easy way to prevent this problem is by limiting your non-Ubuntu sources, deleting experimental sources after failed attempts, and occasionally using apt autoremove to clean orphaned packages off your system.


How to reboot Ubuntu the Magic SysRQ way using a Dell's E5450 keyboard?

On a different localisation the keyboard layout lets us access some function with an additional modifier key Fn only.

For the German layout of the Dell E5450 the PrtScrn button is realised by Fn + Ende. You should be able to access the magic SysRQ keys by:

StrgAltFnEnde + REISUB


Extract a date from a filename for CSH script?


cannot access files downloaded from Wine application for Utorrent in Ubuntu 14.04

So I guess your problem is that you can't find the downloaded files from your non-Wine environment.

By default wine creates a hidden folder in your /home called .wine. This is called your WINEPREFIX. Naturally (as with everything in linux) this location can be changed, but I'll assume that you left it at the default.

So you have your WINEPREFIX in the /home/<user>/.wine folder. If you look into it you will see a drive_c folder which is exactly that, your "C:". In that folder you will have an exact copy of a Windows filesystem.

So your file's paths will be something along the lines of /home/<user>/.wine/users/<user>/dowloads/.


Format USB drive to NTFS so it is usable under Windows

gparted (GNU Partition Editor) is a good graphical tool for formating drives to a variety of different filesystem types. You can install it with sudo apt-get install gparted.

Just as when you are using Disks, be very careful that you are making changes to the correct device. You can format your device to NTFS using the following steps:

Select the correct device from the dropdown selector on the top right.
Delete any partitions that already exist on the device.
Create a new partition using all of the available space and set the type to ntfs
Click the "Apply" button and wait for the operations to complete

If Windows still doesn't recognize the device, the partition table may be in a different type than the MS-DOS type (Ubuntu uses gpt partition type by default I think). Click "View >> Device Information" from the menu to see what the partition table type is. In this case, use the "Device >> Create Partition Table" menu option to change the partition table type to MS-DOS. You may have to follow the above steps again to create your NTFS partition.


Automatically open a file when another file is opened

you can create a little script:

touch myscript
chmod +x myscript

For Gnome

echo "gnome-open /path/to/file1" && gnome-open /path/to/file2" > myscript

For KDE

echo "okular /path/to/file1" && okular /path/to/file2" > myscript

Alternative

echo "xdg-open /path/to/file1" && xdg-open /path/to/file2" > myscript

Note: use only one of the three methods.

Replace your file one's shortcut with this and just double click it, to open the two files simultaneously.


Is there a way in Ubuntu 11.10 to configure the "mouse-on-edges" effects?

You have to install compizconfig settings manager.

sudo apt-get install compizconfig-settings-manager

Now, open compiz config settings manager:

alt+F2ccsm

Go to Window Management / Scale.

Here you can enable the window picker for the different edges. Screenshot:

To enable show desktop, go to General Options - Keybindings and enable show desktop with the corner you'd like to use. Screenshot:


How to write complex sed query which got special char

You don't actually have any special characters there, so you don't need to escape anything. The only issue is that you are using / as the pattern delimiter, so just use another character and it should work fine:
sed 's|../../../profileone|@mysettings/future-system-one|g' *.fileExtension

Note how the sed command is quoted, that is important.
Now, your question shows the target strings as ../../../profileone and @mysettings/future-system-one, but your command also includes double quotes. If those are supposed to be part of the strings, use this instead:
sed 's|"../../../profileone"|"@mysettings/future-system-one"|g' *.fileExtension


How to install Ubuntu Server 16.04.1 LTS in Raspberry Pi 3?

Yes it does ! You can donwload and copy pre-installed image of ubuntu server  16.04 for Raspberry PI

cd /tmp
wget http://www.finnie.org/software/raspberrypi/ubuntu-rpi3/ubuntu-16.04-preinstalled-server-armhf+raspi3.img.xz

If your sdcard path is /dev/mmcblk0 :

xzcat ubuntu.img.xz | sudo dd bs=4M of=/dev/mmcblk0

When exec end, your sd-card is ready to boot.
You can find more info  there as suggested by @negusp


Running into trouble restarting Apache 2

You have to edit the file as the root user, which could be achieved by entering the command sudo in front of the command you're using to edit the file (and entering the password for your user if asked for one).

For example if you're using vim the command should be

sudo vim /etc/apache2/apache2.conf

and you could replace vim with mc, nano, pico or whatever you prefer


Ruby gems install error openssl with package installed

You need libssl-dev package to be installed for building ruby with openssl support

sudo apt-get install libssl-dev


I have an unwanted Apache 2 redirection between my virtual Hosts, seems to be since latest update

I finally found the proper answer to that problem, and it was indeed linked to a recent Ubuntu update.

When I tried to do as Dan suggested, sudo a2ensite ecritsduchateau, I got the error Site does not exist while I knew it was there, I was looking at it!

So I searched for that error, to find the answer here: Stack Overflow: Site does not exist error for a2ensite

In a nutshell, a recent upgrade of Apache 2.4.x make the .conf extension mandatory, which I had not put on a couple of my sites definitions.

As soon as I fixed this and reloaded Apache2, everything went back to normal.


Apt installed postgres version does not match pg_config version

It ended up being another dependency getting installed (libpq-dev) without a specified version, so it would install the latest (10), which included its own version of pg_config, which would then in turn cause downstream packages that were dependent on getting the version from it to break.


How to switch off wifi on startup or from the console

You can turn off Wifi using rfkill:

sudo rfkill block wifi

To turn it on again, run:

sudo rfkill unblock wifi

See my answer on How can I keep a wireless card's radio powered off by default?.


sudo hexdump -s 56 -e '"MSDM key: " /29 "%s\n"'  /sys/firmware/acpi/tables/MSDM

From a comment by David6 on superuser


I think that the problem is the relative paths used. If you run in console:

mount -t nfs 10.0.0.5:/volume1/video ~/Videos

Works because the ~ refers to the user's home folder. When you restart the system the ~ does not, so you have to write the absolute path, eg:

 10.0.0.5:/volume1/video /home/<username>/Videos


Splitting string, extracting chars and putting back together

In the form of a script as what you ask for:

#!/usr/bin/env python3
import sys

# read the input, split by /
st = sys.argv[1].split("/")
# get the first char of all sections *but* the last one
# add the last *from* the first character
print("".join([s[0] for s in st][:-1])+st[-1][1:])

Note that this works for any lenght, e.g.:

wva/sia/bct/wva/sia/e1

will become

wsbws1

as long as the last section ends with /e<num>

To use

Copy the script into an empty file, save it as rearrange.py
Run it with the string as argument, e.g.:

python3 /path/to/rearrange.py wva/sia/e1

> ws1

Explanation

The script pretty much explains itself, but also is commented.


How to install Eclipse C/C++ in Ubuntu 18.04

Open the terminal and type:
sudo apt update
sudo apt install ubuntu-make g++
umake ide eclipse-cpp

To launch Eclipse click the Eclipse CPP icon in the Dash or launch Eclipse CPP from the terminal with the following command:
eclipse-cpp

On the first launch, you'll be asked to select the workspace directory. The default workspace directory should work just fine.

Cevelop is a free C++ IDE for professional developers which is based on Eclipse. Cevelop extends Eclipse CDT with many additional features: CUTE unit testing with Test Driven Development support, new refactorings and quick fixes, and much more.
To install Cevelop in all currently supported versions of Ubuntu open the terminal and type:
sudo snap install cevelop --beta --classic


How can I find the IP of a NAS connected via SMB?

You could scan your network to see where it is up, e.g.

nmap -sP 192.168.1.0/24

where obviously you should change the network to your own. Then you'll get a list of devices which are up and running on current LAN.

To find your LAN IP you can use ip addr. If you are on WiFi the IP address will be near right to inet on something like wlp2s0 network interface.


Because you changed your username, you need to uninstall Dropbox and remove the .dropbox* directories under your $HOME and than, reinstall Dropbox again.

It's can be done by open Terminal and:

Remove dropbox:

sudo apt-get remove dropbox

Delete dropbox hidden directories:

rm -rvf ~/.dropbox ~/.dropbox-dist

Now you can install dropbox


How do you set desktop background with nemo configured to manage the desktop, in 16.04

WEB UPD8 provides a PPA for a patched version of Nemo that automatically provides the other components for the desktop background and other integrations necessary for Unity.

The link to the PPA and detailed instructions is:
http://www.webupd8.org/2013/10/install-nemo-with-unity-patches-and.html

The install steps are:

$ sudo add-apt-repository ppa:webupd8team/nemo
$ sudo apt-get update
$ sudo apt-get install nemo nemo-fileroller


HP Pavilion with Ubuntu 16.04.5 WiFi not working

Thank you SO MUCH pomsky! I don't know why I didn't find that while googling the issue. Turning secure boot off fixed everything, I am so relieved.

Edit: for anyone with a similar issue, I rebooted my computer and pressed the esc key twice when it first turned back on to get to the BIOS menu. Then I turned secure boot off, saved and exited, restarted my computer, and the WiFi worked right away.


what specifically does ddrescue --retrim do?

My illustration:

If the error count is 'counting sectors', your conclusion would be correct, but if the error count is 'counting contiguous blocks of one or more bad sectors', and one such block can be split into several blocks, if some sectors inside such a block are recovered as readable but surrounded by bad sectors.:

...GGGBBBBBBBBBBGGG...` (one bad block) -->

...GGGBBBGGBBGBBGGG...` (three bad blocks).

Explanation in info ddrescue:

  The total error size ('errsize') is sum of the sizes of all the
  non-trimmed, non-scraped and bad-sector blocks. It increases during
  the copying phase and may decrease during trimming, scraping and
  retrying. Note that as ddrescue scrapes or retries the failed blocks,
  the good data found may divide them into smaller blocks, decreasing
  the total error size but increasing the number of errors.


Can upstart script be triggered by a device attached?

Yes. Have a read of man upstart-udev-bridge. Basically anything that can trigger a udev script can trigger an Upstart event. There's more in the Upstart Cookbook's Bridges section.

In your case, we're talking about a block device so here's an example from a StackOverflow post by deft_code:

#thumbdrive_special.conf
start on block-device-added

task

script
   if [ `blkid $DEV` -eq "YOUR-THUMBDRIVES-UUID" ]; then
      /home/you/bin/thumbdrive_special $DEV
   fi
end script

The other route is just using udev to trigger run a script when you plug something in. That could be anything, including running a upstart command.

Upstart has a mounted event but this only comes off the back of the booting mountall call. I don't think it's any use here.


linux shell script Syntax error: word unexpected (expecting "fi")

“Expecting fi” means your script is missing this keyword. In your case you have two ifs, but only one fi, leaving the first unclosed. Correct it to:

            else echo $(( VAL1 / VAL2 ))
            fi
        fi
done

In order to debug shell scripts it’s a good idea to use shellcheck either online or via the command shellcheck (sudo apt install shellcheck):

$ shellcheck myscript

Line 4:
    while [ "$VAL1" -eq 0 ] && [ "$VAL2" -eq 0 ]
    ^-- SC1009: The mentioned syntax error was in this while loop.

Line 6:
            if [ "$VAL1" -eq 99 ]  || [ "$VAL1" -eq 99 ]
            ^-- SC1046: Couldn't find 'fi' for this 'if'.
            ^-- SC1073: Couldn't parse this if expression. Fix to allow more checks.

Line 13:
    done
    ^-- SC1047: Expected 'fi' matching previously mentioned 'if'.
        ^-- SC1072: Unexpected keyword/token. Fix any mentioned problems and try again.


I made the silly mistake of formatting a partition by accident.  I was installing a linux distribution called crunchbang on my netbook, so I don't have to bring my laptop to class every week.  I was intending to format a USB flash drive for this purpose, when, to my dismay, I formatted an ext4 partition containing over 500gb of data to fat32.  This is a summary of what I've learned:
If a filesystem is damaged, you can attempt to recover that filesystem itself, or individual files.  Individual file recovery is possible regardless of the state of the filesystem, but it has the drawback of being almost completely useless if you are dealing with a lot of data.  When you recover individual files, you are going to LOSE the ENTIRE directory structure of your data (that means organisation and filenames).  In my case, this was completely useless, as it would take me years to sift through and rename all those music files and other junk.  Also, In many cases the program will fail to find specific start and end blocks for your file (this is almost always the case with plain text files) and you could end up (like me) with each mp3 file split into a hundred 1-5 second pieces.
READ this all the way through before attempting anything... (you will find instructions for making an image of your disk at the bottom, but it should be done first)
If you are in a different situation (like recovering a very small amount of data or looking for a specific searchable piece of data), than individual file recovery could be an option for you.
The free utilities I found for this are:
PhotoRec
and
ForeMost
(both are in the ubuntu repositories for your convenience)

If your intent is to recover an entire partition, then you should look towards a piece of software called TestDisk.  This is also in the ubuntu repositories, and It has a nice curses GUI to make things easier.
TestDisk is compatable with all kinds of filesystems including ext2/3/4, ntfs, fat, and others.. (and the binary is released in Windows as well as UNIX compatible versions)
Unfortunately after hours with this utility, TestDisk was able to find my old partition, but the root inode was destroyed, so I gave up on using TestDisk and decided to try to recover the ext backup superblock manually.

If your concern is a linux ext2/3/4 partition, then you will find these to utilities helpful (they will most certainly already be on your linux machine)
this will be used to calculate where the backup superblocks will be located in the event you were to create a ext filesystem on the partition in question
mke2fs (make extended 2 file-system) for ext2/3/4
this will be used to attempt to restore the filesystem using one of the backup superblocks
e2fsck (extended 2 file-system check) also for ext2/3/4
An explanation on how to recover an ext superblock manually using these utilities can be found here: Repair a broken Ext4 Superblock in Ubuntu .
SIDE NOTE: if your partition table is intact (not the case for me), then you could perhaps make use of dumpe2fs like so:
Linux: Find Alternative Superblocks - nixCraft
if you are unable to use these utilities to find the backup superblocks (perhaps you messed up multiple partitions, and because of this, you don't know where they start/end) you may find use of a program called gpart (not to be confused with gparted or parted... it's totally different) though I'm not sure if it supports linux file-systems newer than ext2.. If you are at this point, It may be time to start worrying.

Using this last approach, I was successfully able to recover the entire partition, save the top-level directory names (so I had to rename about 6 top-level folders, but everything below them was preserved)
SUCCESS!
Another thing that ended up being EXTREMELY important for me was creating a backup image of the messed up disk (in my attempts to recover, I ended up restoring this image at least twice)
so FIRST thing before using any of these utilities, find some free space on your machine or an external drive..
If your messed up drive is sda, and you wanted to store the image in yourname's home directory for instance:
dd if=/dev/sda of=/home/yourname/sda.img.bak bs=512
to restore the image after a failed recovery attempt:
dd if=/home/yourname/sda.img.bak of=/dev/sda bs=512
You could of course use /dev/sda1 if you are only interested in the first partition, but as some of these utilities alter the partition table, it is perhaps a better idea to image the whole disk..
Also, if you are using dd for a large operation, it is very helpful to see a progress bar, for which you can use a utility called pv which reports progress of data through a pipeline
for instance:
pv -tpreb /dev/sda | dd of=/home/yourname/sda.img.bak bs=512
BTW: some people suggested making the backup image, and working on it directly, but I found it easier to work on the disk itself (easier to mount) and restoring the image to disk if/when necessary


Which graphics driver set is better to test in the long run?

As one of the Ubuntu X maintainers I can say: testing on both the open-source and proprietary drivers is valuable; we have lots of users of both, and it's important the Unity runs well on both the free stack and the proprietary stack.

However, if you want your testing to have the biggest impact, testing the free stack would be the way to go - at least for AMD cards.

The open-source radeon driver has a reasonable set of developers - it's not large and can always do with more, but it's supported by AMD. Barring the influx of hundreds of full-time developers these drivers won't achieve the same performance as fglrx, but it's entirely possible they'll achieve 90-95% of the performance; it's the last couple of percent that's extremely expensive.

They're also much easier to improve - because they're open-source, we have visibility into fixes and can much more easily justify fixing bugs in stable releases.  With the fglrx driver we just get a code-dump mixing features and fixes, with unknown regression potential. This makes it difficult for us to update the proprietary drivers in a stable release.

Finally, there's more prospect of improvement for radeon than for fglrx. Radeon developers care about the whole desktop stack, fglrx is largely targetted at workstation users.

For nouveau the answer is a bit murkier. There's still more prospect of improvements in nouveau than nvidia - again, nvidia is largely targetted at the workstation market - but nouveau has a harder time making progress than radeon, as they additionally need to reverse-engineer everything.

All this applies mostly to bugs rather than performance.  It's generally harder to generate a good performance bug than it is to generate a good crash or incorrect rendering bug. Rendering and crash bugs are generally isolated to a small section of code, whereas performance problems generally involve a whole stack of code. Where you find isolated performance problems they can be worthwhile to report, but that's not the common case.

In short, performance problems generally require active effort to identify - you're unlikely to stumble across an actionable performance problem.  Bugs - both crashers and misrendering - you can easily identify during normal use.


disk full -- deleting files does not work

Test this:

Open a terminal.

Run it:

sudo -i
apt-get clean
apt-get autoremove
apt-get install deborphan
deborphan
apt-get --purge remove $(deborphan)
deborphan --libdevel
apt-get --purge remove $(deborphan --libdevel)
deborphan --find-config
dpkg --purge $(deborphan --find-config)
apt-get clean


You will find it in the home folder of root:

/root/.bashrc


Screen Resolution Problem with Ubuntu 14.04 and VirtualBox

You basically need the Guest additions, log into the Virtual Machine to install the following packages:

sudo apt-get install virtualbox-guest-dkms

Finally restart the VM to complete the installation.


Gnome 3.16 HiDPI scaling only accepts integers

I checked with my Fedora 21 install where I have Gnome 3.14.2 and it doesn't seem to be possible to set your desired value:

[btegge@za21 ~]$ gsettings set org.gnome.desktop.interface scaling-factor 1.2
invalid character in number:
  1.2
   ^
[btegge@za21 ~]$ gsettings set org.gnome.desktop.interface scaling-factor 1,2
expected end of input:
  1,2
   ^

My assumptions:

There is a another setting to achieve what you want. The only thing that comes to my mind is font rendering related, though that is not exactly what you are looking for.
It's a mistake that the key only accepts integers as datatype and you should file a bug.


I have VMware Workstation 9 too. :)

Anyways, just put in your own username.


Adding acpi_rev_override as a kernel boot parameter is a workaround for this.

You do this by editing the config file for GRUB, for example:

sudoedit /etc/default/grub

Find the line starting GRUB_CMDLINE_LINUX_DEFAULT

and add acpi_rev_override to the parameters between quotes, so that you end up with, for example

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_rev_override"

Save the file and exit, then run

sudo update-grub

The parameter will be applied on the next boot.


No additional driver listed for Nvidia GPU - 14.10

Very same problem with GTX 750 after upgrade 14.04 -> 14.10. Installed official 346 driver manually - works like a charm with ~5% performance boost (as tested with Unigine Tropics benchmark). You didn't ask the question but assuming you're looking for a solution I recommend you to do the same.


Use Super_L (WinKey) as a main menu toggle button in GNOME?

Unfortunanly, Gnome doesn't allow that.
They could have done a toggle to make it work.


I use the following to keep an SSH session alive:

#!/usr/bin/perl
# Name: /usr/bin/bigben         Author: Joe Smith
# Purpose: Outputs time, uptime, or message every N minutes to keep session up.
# Automatically terminates when STDIN is no longer connected to a terminal.

use strict; use warnings;
$| = 1;

my $period = 10;        # Default minutes between outputs
@ARGV and $ARGV[0] =~ /^-(\d+)$/ and $period = 0-shift; # "-60" for 60 minutes

(@ARGV and $period) or die <<EOM;
Usage: bigben "Hello, World!" & # Output text & time every $period minutes
       bigben -d &              # Output date & time every $period minutes
       bigben -q &              # Output a null byte every $period minutes
       bigben -u &              # Output  `uptime`   every $period minutes
       bigben -15 -d &      # Output date & time every 15 minutes
Also outputs `date` at startup and at midnight.
Program automatically terminates upon logout or network disconnection.
EOM

my $string = "@ARGV";
my $today  = 'first time';

# Sleep 1 second to start; continue while -t() is true; wake once a minute
for (sleep 1; -t(); sleep 60 - (time % 60)) {   # Stop when /dev/tty disappears

  next unless $today eq 'first time' or ((time/60) % $period) == 0;

  my ($sec,$minutes,$hours,$day,$mon,$year,$weekdaynum) = localtime;
  my $yyyymmdd = sprintf "%04d-%02d-%02d", $year+1900, $mon+1, $day;
  my $hhmmss   = sprintf "%02d:%02d:%02d", $hours, $minutes, $sec;
  my $weekday = (qw(Sun Mon Tue Wed Thu Fri Sat))[$weekdaynum];

  system 'date' unless $today eq $weekday;  # First time or at midnight

  if      ($string eq '-d') {           # Output date & time
    printf "\r\t\t\t\t  %s %s  \r\n", $yyyymmdd, $hhmmss;

  } elsif ($string eq '-q' or $string eq '-n' or $string eq '-0') {
    print "\0";                 # Quiet: output a null byte

  } elsif ($string eq '-u') {
    $_ = `uptime`; s/\s+/ /g;           # Get uptime and squeeze it
    s/^/$weekday/; s/ day(s?), /day$1_/;
    s/_(\d) min/_00:0$1/; s/_(\d\d) min/_00:$1/; s/_(\d):/_0$1:/;
    s/load average: (\S+) (\S+) (\S+)/LA:$1$2$3/;
    print  "\r\t\t  $_\r\n";            # Output modified uptime

  } else {                  # Output "string HH:MM"
    printf "\r\t\t\t\t  %s  %s %02d:%02d  %s\r\n",
        $string,$weekday,$hours,$minutes,
        ($minutes == 0 ? $yyyymmdd : '');
  }
  $today = $weekday;
}

I have my .login file run "bigben -u &" on certain hosts when it detects an SSH session.

The alternative is "ssh -o TCPKeepAlive remotehost" to keep the NAT translation active.


Resize multiple images with imagemagick from a folder to other (and keep the name) with a command

This:

for i in /home/$USER/Desktop/projs/proj1/img/*.png; do
    convert "$i" -resize 130X130 "/home/$USER/Desktop/projs/proj1/imgResized/${i##*/}"
done

should work, modify.


Replace packaged install with one from source

Nope, you miss out on a lot. Short of doing a proper package, this is what I'd do. I'm assuming you have build-essential, but the rest should be handled.

remove the old package with apt-get remove OpenIPMI

clean out the old dependancies with apt-get autoremove (I suppose this is optional, but it ensures that the next step works perfectly)

run apt-get install -s OpenIPMI and note down what it depends on.

Install these dependancies

sudo apt-get build-dep OpenIPMI to install the build dependancies (as distinct from dependancies that provide shared libs and other necessary things you don't actually want to compile yourself) - in theory you can work these out from your config file erroring out, but I have no idea why anyone would do that.

THEN

./configure
make
make install

This should handle most of the things you need painlessly. In your shoes I'd use the excellent checkinstall to make a quick and dirty package over make install, just so you can remove your own build cleanly with dpkg (and if you can be bothered, set dependancies correctly there should you want to use this on more than one system).


This is trying to mount your encrypted swap partition (encrypted swap is required for encrypted $HOME directories to be usable), and it seems that the initialization is taking too long. Your system will come up normally, but without that swap space. If the free command shows less swap than expected, you can re-initialize swap by logging in, and

sudo /usr/sbin/cryptdisks_start  ubuntu--vg-swap_1


Even if in the config file the Device parameter was set to default, you need to set the output device from the sound mixer. Yes, it was that easy.


The "404 Not Found" error message is telling you that the "FFmpeg next" PPA at https://launchpad.net/~kirillshkrogalev/+archive/ubuntu/ffmpeg-next does not have an installation candidate for Ubuntu 16.04 (Xenial). To get rid of the warning, you can remove the .list file for the offending PPA in your /etc/apt/sources.list.d. See How can PPAs be removed? if you are not sure how to do so.


How do I create deb package for Oracle JDK?

there's a script that downloads java packages from Oracle and builds a local deb repository so you can install JRE, JDK and java plugin.

https://github.com/flexiondotorg/oab-java6

cd ~/
wget https://github.com/flexiondotorg/oab-java6/raw/master/oab-java.sh -O oab-java.sh
chmod +x oab-java.sh
sudo ./oab-java.sh

For Java 7 run:

sudo ./oab-java.sh -7

The debs will be available in /var/local/oab/deb.


programmatically clone /etc/skel for new users

Note that useradd command allows you to specify a custom SKEL directory using the -k option. You may create a /etc/skel-for-group-A directory without the not-for-a.txt, and then add new users with their default group as A, and specify their SKEL directory using the command:

useradd username -g groupA -k /etc/skel-for-group-A -m

Refer: http://manpages.ubuntu.com/manpages/trusty/man8/useradd.8.html


14.04 Desktop Unresponsive When Applications Minimized

Its a bug that occurs with desktop icon viewability set to off (can be enabled/disabled with a tool like ubuntu tweak). After a recent system update, if you change this setting to hide desktop icons from view in the desktop, you might get this lockup-on-minimize behavior.

Case closed, Ill report this on launchpad.


How to find the list of users who had not logged in gerrit

You can do this with lastlog

sudo lastlog -b 365

To filter system users user grep

sudo lastlog -b 365 | grep -v 'Never log'

see man lastlog for additional options.


Ubuntu MATE 15.04 boots black screen blinking cursor after install?

If you booted from and used USB drive as a install medium, install process might end without errors but GRUB might not be installed correctly on the HDD.

I've experienced this odd behavior a dozen times from 12.04 onward.

Subsequent boot to Live environment and manually installing GRUB fixed this issue for me every time. Also, affected boxes do get correct GRUB if booted and installed from DVD.

In my experience occurrence is rare and hardware specific so I never had a chance/time to get to the bottom of the problem.


Ubuntu desktop ssh unreachable after a while

Verify that there isn't a firewall blocking the connection, that the SSH service is running on the instance, and that SSH tcp port 22 is in the listening state.
Try This.....
: Use AWS Systems Manager Session Manager
Note: Installation of the SSM Agent is required to use this method. For more information on Session Manager and a complete list of prerequisites, see Setting up Session Manager.

Open the AWS Systems Manager console.

Start a session.

To disable firewalls and restart the SSH service,run the following commands.
          # iptables -F
          # service sshd restart

Note: The preceding command flushes all main iptables rules, not just for port 22. After you regain access to your instance, review your firewall configuration (for example, ufw, firewalld, iptables).

Verify that the SSH tcp port (22) is in a listening state.
        # netstat -tnlp | grep :22**

tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      849/sshd
tcp6       0      0 :::22                   :::*                    LISTEN      849/sshd

Terminate the session.

Connect to the instance using SSH.
Run the AWSSupport-TroubleshootSSH automation document

AWSSupport-TroubleshootSSH automation document installs the Amazon EC2Rescue tool on the instance. Then this tool checks for and corrects some issues that cause remote connection errors when connecting to a Linux machine through SSH. For more information, see How can I use the AWSSupport-TroubleshootSSH Automation workflow to troubleshoot SSH connection issues?


Which options on Adobe Flash Player do I choose so that I could watch videos on YouTube?

It looks like Flash is not installed in your system. You can please install it from Ubuntu Software Center, by searching for flash player and installing the Adobe Flash player.

I also have 11.04 and as because I had chosen to install the codecs during the setup process itself, flash is already installed in my system and working correctly.


Is there a way to never have to put in your password after you have logged in?

Being able to run command with administrative privileges without entering a password is like doing everything as root. It's strongly discouraged to disable the password for sudo, although it's possible.

To skip asking for a password when installing programs, see:

How to prevent system applications (like the Software Center) from asking for password?

If you want to be able to use sudo without asking for a password (not recommended), follow the instructions at:

Always Sudo Privileges


How can I add drives to increase the capacity of a software raid 5 without losing data?

Straight from the mdadm man page.

http://linux.die.net/man/8/mdadm

Grow (or shrink) an array, or otherwise reshape it in some way. Currently
supported growth options including changing the active size of component
devices and changing the number of active devices in Linear and RAID
levels 0/1/4/5/6, changing the RAID level between 0, 1, 5, and 6, and
between 0 and 10, changing the chunk size and layout for RAID 0,4,5,6, as
well as adding or removing a write-intent bitmap.

Also, https://raid.wiki.kernel.org/index.php/Growing

Back to your config. Three drives, so two data + one parity (distributed). The more drives you add, the higher the probability that more than one can fail at a time.

If it were me, I would start over with a RAID 6 and get an additional disk to function as a hot spare. Even if that meant purchasing a storage controller. RAID 6 uses two disks worth of distributed parity so your available space would be 4 drives worth.

A compromise would be RAID 5 with a hot spare, which would fit in your current storage controller footprint. The exposure here is that you can take another fault while the array is rebuilding with the spare at which point you've lost everything.

All this is great, but even RAID with spares doesn't mean much without monitoring. We just had a HW RAID go at work, RAID 6 with no spares and no alerts setup. It lost both parity drives and then hit a single unrecoverable read error and that was it, the whole array was lost.

When you take on a software RAID you also take on all the responsibility of running it smoothly. If that isn't for you then I would suggest looking at Drobo storage arrays.

http://www.techrepublic.com/blog/the-enterprise-cloud/how-drobos-beyondraid-compares-to-traditional-raid-technologies/

http://www.drobo.com/drobo-capacity-calculator/

I hope this helps. Losing data sucks... Good luck!


Change the icons of buttons on login-screen after log-out on Ubuntu 18.04.2 LTS

your lock screen is using /usr/share/gnome-shell/theme/ubuntu.css file
and the login screen is using /usr/share/themes/Flat-Remix/gnome-shell/gnome-shell.css

run the below command
sudo update-alternatives --config gdm3.css

select the number corresponding to /usr/share/gnome-shell/theme/ubuntu.css

Example:

pratap@i7-6550U:~$ sudo update-alternatives --config gdm3.css
There are 6 choices for the alternative gdm3.css (providing /usr/share/gnome-shell/theme/gdm3.css).

  Selection    Path                                                                 Priority   Status
------------------------------------------------------------
* 0            /usr/share/themes/Flat-Remix/gnome-shell/gnome-shell.css              20        auto mode
  1            /usr/share/gnome-shell/theme/ubuntu.css                               10        manual mode
  2            /usr/share/themes/Flat-Remix-Dark/gnome-shell/gnome-shell.css         17        manual mode
  3            /usr/share/themes/Flat-Remix-Darkest/gnome-shell/gnome-shell.css      17        manual mode
  4            /usr/share/themes/Flat-Remix-Miami-Dark/gnome-shell/gnome-shell.css   17        manual mode
  5            /usr/share/themes/Flat-Remix-Miami/gnome-shell/gnome-shell.css        17        manual mode
  6            /usr/share/themes/Flat-Remix/gnome-shell/gnome-shell.css              20        manual mode

Press <enter> to keep the current choice[*], or type selection number: 1
update-alternatives: using /usr/share/gnome-shell/theme/ubuntu.css to provide /usr/share/gnome-shell/theme/gdm3.css (gdm3.css) in manual mode
pratap@i7-6550U:~$

this way what ever the changes we make to ubuntu.css file, will apply to both login screen and unlock screen..

Login Screen

Unlock Screen

to remove the white border around the user logo..

open the file /usr/share/gnome-shell/theme/ubuntu.css with your favorite editor..

mine is gedit.. so
sudo -H gedit /usr/share/gnome-shell/theme/ubuntu.css

find the content

/* Auth Dialogs & Screen Shield */
.framed-user-icon {
  background-size: contain;
  border: 2px solid #eeeeec;
  color: #eeeeec;
  border-radius: 3px; }
  .framed-user-icon:hover {
    border-color: white;
    color: white; }

and make the required changes as per your need..
i have changed like this..

/* Auth Dialogs & Screen Shield */
.framed-user-icon {
  background-size: contain;
  border: 0;
  color: #eeeeec;
  border-radius: 3px; }
  .framed-user-icon:hover {
    border-color: white;
    color: white; }

and the result is


I removed ubuntu-desktop, and ran "apt autoremove". Computer still booting, lxqt environment is still working wonderfully.

Anybody else who tries it please note that some amount of duplicate software is nevertheless left behind, which can be uninstalled manually, including, but not limited to, Nautilus, file roller, Thunderbird, etc.


The i in GiB means it's talking about Gibibytes, 2³⁰. When not synonymous, a GB is 10⁹ bytes.

A literal GB is 7.3741824e7 bytes (~70MiB) smaller than a literal GiB…

So if you want to match your RAM, you want 4 Gibibytes.

When talking about computing, most people use GB when they actually mean GiB. This is something we could try to correct but it's endemic now. This causes issues when comparing:

RAM is made in binary-power quantities. You actually have 4 GiB of RAM.
Storage vendors don't though, because it means they can sell a bigger number.
It's a marketing trick.

And that's why Gparted is so explicit about this. They straddle the line between these two worlds.


Find device.description of default sink from pulseaudio

I have something hacky that works:
pacmd list-sinks | grep -Pzo "\* index(.*\n)*" | sed \$d | grep -e "device.description" | cut -f2 -d\"

Explanation:

grep -Pzo "\* index(.*\n)*" outputs all lines after matching * index.
The last line on the output was causing problems. Removed it with sed \$d.
grep -e "device.description" matches the first device.description.
And lastly cut -f2 -d\" to output only the content.


You might want to check the disk's health.  The two tools I would use are smartctl (if your H.D.D.s support S.M.A.R.T.) and e2fsck.  Those should check for hard drive issues and attempt to repair the filesystem if they can.

The two things that make me suspect hard drive damage: 1) Disappearing files 2) Slow transfer speeds.

If that's not it, you might want to look at auditd which should tell you who/what is moving your files (assuming they are being moved).  If you enable that and it shows you nothing, it's probably hard drive failure.

auditd tutorial

smartctl tutorial


"BAD ARCHIVE MIRROR" error while installing ubuntu server 12.04

I am writing my above comment in answer this answer.

I solved this issue- Actually the problem was with "internet connection",
i was using a net connector or e-stick (TATA PHOTON+) to connect with the internet, but when i used the broadband my problem get solved.

Thanks


I find a workaround while searching on google. I recompiled libc6 and its other packages. It fixed unmet dependency problem of Amd's binary Ubuntu package.

First, Add source code repositries on Ubuntu Software Center ( https://help.ubuntu.com/community/Repositories/Ubuntu )

I rebuilt libc6-amd64 Ubuntu package:

sudo apt-get update && sudo apt-get --compile source libc6-amd64

I installed all eglibc (Embedded GNU C Library) packages with overriding problems.

Packages must created under directory that you gave "apt-get --compile source libc6-amd64" command:

sudo dpkg --force-all -i *.deb

Then, give same command to install your Amd Ubuntu packages:

sudo dpkg -i --force-all fglrx*.deb

It must install your Amd Ubuntu packages.

If you try to reinstall your Amd Ubuntu Packages, you have to reinstall libc6 and libc6-amd64 ( eglibc ) packages again.

It is my simple solution to fix dependency problem.


Is there any repository for installing PHP 5.2.x on Ubuntu 12.04?

PHP 5.2 was sent to end of life in December of 2010, so while there's a small chance you might find a PPA or .deb file in some dark alley of the Internet, you're very likely going to have to compile it from source if you want it to run on Ubuntu 12.04. Additionally, it's possible you'll run into problems with dependencies (particularly if anything has changed their API), so keep that in mind.

That said, you can find the latest source for the PHP 5.2 series on their GitHub (I found the 5.2.17 tag for you), and compile it using make. The PHP site also offers information on compiling PHP. The required versions will be different, but it's typically a "this version or greater" unless you get into major release differences (1.0 to 2.0, for example).

As a side note, it might be worth putting pressure on the people that maintain your external application to upgrade to at least the 5.3 series, or better yet, the 5.4 series. There have been a ton of bug fixes and security patches since then. Additionally, most tools don't support 5.2 anymore (which means you don't get things like Xdebug or PHPUnit without a fight, making maintaining an application of decent size and reasonable importance damn near impossible (I've been there)). The upgrade may not be something that can be done right away, thanks to changes between 5.2 and 5.3, but it generates customer demand and helps break down the delusion that a lot of companies have of "well, our userbase doesn't  want this, so we're not going to offer it" (even though the reason they don't demand it is because it was absent from the product and they found workarounds, nevermind the fact that if the product offered it, the customers would use it).


Unmount your /home partition (with Gparted or command line) and then look to make sure /home is empty (as it should be). Delete or move anything that doesn't belong. Then either mount your /home partition again or just reboot.


Where can I download the Beta release for Ubuntu?

For beta 2:

http://releases.ubuntu.com/13.04/

There are also ISOs for all of the other main distributions (among them Kubuntu and Xubuntu).

A few download links (more on the 13.04 wiki page):

Kubuntu: cdimage.ubuntu.com/kubuntu/releases/raring/beta-2

Lubuntu: cdimage.ubuntu.com/lubuntu/releases/raring/beta-2

Xubuntu: cdimage.ubuntu.com/xubuntu/releases/raring/beta-2


sudo dpkg -i *.deb will install all the .deb packages on the current directory in to your system.

Open a terminal, change the directory to where you saved your downloaded packages and use the command to install the packages that you previously saved.

If you have copied the packages to a USB pen, plug it in, open a terminal and change directory to where the USB pen was mounted (it should be a mount point under /media).

After you located the files you saved use the command to install the files.


Cinnamon Desktop - Clicking menu->shutdown presents no real button options?

Found this somewhere else and it fixed the problem for me.

  Updating to Cinnamon 2.6 (using the PPA ppa:moorkai/cinnamon), and
  executing the commands below, has solved the issue for me (after a
  restart).

gsettings set org.cinnamon.desktop.session settings-daemon-uses-logind true
gsettings set org.cinnamon.desktop.session session-manager-uses-logind true
gsettings set org.cinnamon.desktop.session screensaver-uses-logind false


How to install Ubuntu alongside BitLocker encrypted Windows 10?

It turns out it just works.

On Windows reduce the size of the system partition
Install Ubuntu on the new free space (the installer refers to it as "replace partition")
After installation is finished there will be a wall of errors, just shutdown your laptop/PC with the power switch
If you choose to boot Windows it'll ask for BitLocker code, input it.

Done

I rebooted to Linux, did something, rebooted to Windows, it doesn't ask for code, boots normally


how to find or list file and directories which having size more than 100mb

This is a good article: How to Find Out Top Directories and Files (Disk Space) in Linux

One of the commands listed comes close to your directory needs:

$ du -Sh | sort -rh | head -20
8.0G    ./Videos
990M    ./.googleearth/Cache/unified_cache_leveldb_leveldb2
798M    ./.cache/mozilla/firefox/9fu0cuql.default/cache2/entries
643M    ./roboto/Kijiji
378M    ./android-studio/lib
306M    ./roboto
293M    ./Pictures
195M    ./.dropbox-dist/dropbox-lnx.x86_64-84.4.170
193M    ./.cache/google-chrome/Default/Cache
193M    ./Android/Sdk/emulator/qemu/linux-x86_64
177M    ./android-studio/plugins/android/lib/layoutlib/data/fonts
131M    ./.cache/thumbnails/large
130M    ./android-studio/plugins/android/lib
102M    ./.gradle/wrapper/dists/gradle-4.6-all/bcst21l2brirad8k2ben1letg
101M    ./Pictures/1920x1080
93M     ./Android/Sdk/emulator
91M     ./.mozilla/firefox/9fu0cuql.default
90M     ./Android/Sdk/emulator/lib64/qt/lib
80M     ./gmail
80M     ./Downloads

Another of the commands comes close to solving your file size needs:

$ find -type f -exec du -Sh {} + | sort -rh | head -n 20
2.8G    ./Videos/simplescreenrecorder-2019-11-24_17.20.17.mkv
1.3G    ./Videos/simplescreenrecorder-2019-12-01_18.56.29.mkv
1.1G    ./Videos/simplescreenrecorder-2019-11-30_16.16.22.mkv
1.1G    ./Videos/simplescreenrecorder-2019-11-17_18.13.03.mkv
952M    ./Videos/simplescreenrecorder-2019-11-11_21.42.51.mkv
548M    ./Videos/simplescreenrecorder-2019-11-24_20.03.44.mkv
201M    ./Videos/Screencapture 2019-11-08 at 13.07.14.mp4
122M    ./Videos/Screencapture 2019-11-08 at 13.43.55.mp4
102M    ./.gradle/wrapper/dists/gradle-4.6-all/bcst21l2brirad8k2ben1letg/gradle-4.6-all.zip
88M     ./android-studio/lib/platform-impl.jar
66M     ./android-studio/bin/lldb/lib/liblldb.so.7
63M     ./android-studio/jre/jre/lib/rt.jar
62M     ./.AndroidStudio3.2/system/caches/content.dat.storageData
61M     ./android-studio/lib/idea.jar
57M     ./.config/VirtualBox/VBoxGuestAdditions_5.1.38.iso
54M     ./Documents/vio.mp4
48M     ./android-studio/plugins/android/lib/android.jar
46M     ./Downloads/linux-modules-4.14.153-0414153-generic_4.14.153-0414153.201911101449_amd64.deb
45M     ./Android/Sdk/platforms/android-28/android.jar
42M     ./android-studio/lib/java-impl.jar

In both examples, just tweak the number of lines listed to get files over 100 MB. For example change head -n 20 to head -n 40 to list double the number of files.


You need to pass the command components as elements of a list, so you can add tar to the TAR_CMD variable and then use split(' ') to create a list of command components separated on spaces:

TAR_CMD='tar .....'
subprocess.call(TAR_CMD.split(' '))

Or directly:

subprocess.call('tar ....'.split(' '))


Cron job to run python script at reboot does not work

To execute any GUI application from Cron you should export few desktop environment variables. In most cases it is quite enough to export the current $DISPLAY value. I would suggest you to create an additional startup (bash) script, that will launch your application.

In this answer is provided robust approach how to find and export the current user's $DISPLAY value. But there is a problem. While the user is not logged into the DE the $DISPLAY value is not set. Sо we could add an additional condition, like it is made in this answers:

# Get the value of the $DISPLAY variable for the current user. Unset it just in case this is a `ssh -X` connection
unset DISPLAY;
while [ "$DISPLAY" == "" ]; do
        export DISPLAY=$(w "$USER" | awk 'NF > 7 && $2 ~ /tty[0-9]+/ {print $3; exit}' 2>/dev/null) && sleep 3
done

This condition works in all other cases, but it fails within @reboot Cron jobs and I can't figure out the reason. So, within the script below is used another approach to check whether the user is logged in Mate.

Some applications need and few more variables (for example see this and this answers) as $DBUS_SESSION_BUS_ADDRESS and $DESKTOP_SESSION. In my opinion the best approach is to find the current user's desktop session process within the directory /proc (process information pseudo-filesystem) and export all variables from the file environ that is inside /proc/process-number.

I've created a small project, called cron-gui-launcher dedicated to this. It works but it's not tested for all user's cases (like the current). Here I've extracted the essential part that refers to Mate DE and made the modification mentioned above.

1. Create an executable file with this content:

#!/bin/bash -e

# Check whether the user is logged in Mate
while [ -z "$(pgrep mate-session -n -U $UID)" ]; do
        sleep 3 && count=$((count+1)) && echo "$count" > /tmp/mate-cron.log
done

# Get the content of the Current-Desktop-Session Environment File as an array:
EnvVarList=`cat -e "/proc/$(pgrep mate-session -n -U $UID)/environ" | sed 's/\^@/\n/g'`

# Export the Current-Desktop-Session Environment Variables:
for EnvVar in $EnvVarList; do
        echo "$EnvVar" >> /tmp/mate-cron.log
        export "$EnvVar"
done

# Execute the list of the input commands
nohup "${1}" >/dev/null 2>&1 &

exit 0

Better version of the scrip: How can I show notify-send messages triggered by crontab?

2. Now in crontab use:

@reboot /path-to-the/script "your-application"

3. Notes:

This script shall not work with root's crontab. Because of the variables $UID and $USER. You could replace them wit the certain user's UID and NAME.
For other DE change mate-session from this part $(pgrep mate-session -n -U $UID) with the name of the process of the other DE, for example gnome-session.
Maybe for GUI applications, that are executed within system startup it is better idea to create an entry within Startup Applications. For Mate DE: Control Centre > Personal > Startup Applications (source).

4. Here is presented how the script works:


How do I access other computers in a home network remotely and in the background?

TL;DR Use SSH.

Install openssh-server, set the computers IP addresses to static (something outside the DHCP pool of your router/modem), then from you computer, open a terminal and type ssh USER@IP.ADD.RESS.HERE accept the warning, type your password. You now have a terminal of the remote computer at your computer. You can now update the computer however you do so normally with apt-get.

Hopefully it all makes sense.


Self-signed server certificate for Postfix TLS

Fixed the issue using the helpful reply of muru in a comment.

  Uh, those # signs in the Howto are supposed to represent the prompt. They're not meant to be part of a script. Each # represents the beginning of a new command.

thufir@dur:~$
thufir@dur:~$ sudo ./tls.script
[sudo] password for thufir:
Generating RSA private key, 2048 bit long modulus
....................................................................+++
.........................................+++
e is 65537 (0x10001)

The content of tls.script should be like this (without the leading # marks as in the question)

    dir="$(postconf -h config_directory)"
    fqdn=$(postconf -h myhostname)
    case $fqdn in /*) fqdn=$(cat "$fqdn");; esac
    ymd=$(date +%Y-%m-%d)
    key="${dir}/key-${ymd}.pem"; rm -f "${key}"
    cert="${dir}/cert-${ymd}.pem"; rm -f "${cert}"
    (umask 077; openssl genrsa -out "${key}" 2048) &&
     openssl req -new -key "${key}" \
       -x509 -subj "/CN=${fqdn}" -days 3650 -out "${cert}" &&
    postconf -e \
      "smtpd_tls_cert_file = ${cert}" \
      "smtpd_tls_key_file = ${key}"


What's the difference between ubuntu-mate and ubuntu?

What is MATE DE?

quoting from the MATE Wikipedia article

  MATE  is a desktop
  environment forked from the now-unmaintained code base of GNOME 2. It
  is named after the South American plant Yerba mate and tea made from
  the herb, mate. The use of a new name, instead of GNOME, avoids
  conflicts with GNOME 3 components.

But what is a Desktop Environment?

quoting from the Desktop Environment Wikipedia article

  In computing, a desktop environment (DE) is an implementation of the
  desktop metaphor made of a bundle of programs running on top of a
  computer operating system, which share a common graphical user
  interface (GUI).

  A desktop environment typically consists of icons, windows, toolbars,
  folders, wallpapers and desktop widgets.

In Linux there are many different DEs. The most well-known are:
Unity, GNOME 3, KDE, Cinnamon, XFCE, and LXDE.

So what is Ubuntu MATE?

quoting from the official Ubuntu MATE site

  A community developed Ubuntu based operating system that beautifully
  integrates the MATE desktop.

  Ubuntu MATE is a stable, easy-to-use operating system with a
  configurable desktop environment. Ideal for those who want the most
  out of their desktops, laptops and netbooks and prefer a traditional
  desktop metaphor. With modest hardware requirements it is suitable for
  modern workstations and older hardware alike.

So what is the difference between Gnome and MATE?

MATE is a fork of Gnome 2 and retains features from Gnome 2 such as the file manager, appearance preferences, panel and indicator function(re-branded) and is not interchangeable with GNOME Classic.

The forked programs have been renamed, with most names in Spanish.

Caja (box) – File manager (from Nautilus)
Pluma (quill) – Text editor (from Gedit)
Eye of MATE – Image viewer (from Eye of GNOME)
Atril (lectern) – Document viewer (from Evince)
Engrampa (staple) – Archive manager (from File Roller)
MATE Terminal – Terminal emulator (from GNOME Terminal)
Marco (frame) – Window manager (from Metacity)
Mozo (waiter)  – Menu item editor (from Alacarte)


Openshot requires a number of codecs to function correctly - especially when it comes to creating DVDs- typically it needs mpeg and other similar codecs.

A codec is a program or code library that converts or translates from one format to another.  There are numerous codecs for video and sound.

Whilst you can install these codecs manually, the easiest way is to install ubuntu-restricted-extras

This is a package that gathers together the more commonly known codecs and installs this onto your computer.

note - for some countries (notably the united states) - some of these codecs are restricted from usage by patents etc.. so you need to be aware of your country's laws etc for what codecs you can lawfully use and in what circumstances you can use them.

To install - look in software-center for ubuntu-restricted-extras or install from the command line:

sudo apt-get install ubuntu-restricted-extras

There are similar named restricted-extras - you should install the appropriate named package for your desktop environment.  for Unity & Gnome-Shell use ubuntu-restricted-extras


After you formatted the external disc with ROOT you need to grant priviliges to your USER for access. So drop down to a terminal with control alt f2 and navigate to the directory this disc is mounted and then give yourself permissions with:

sudo chown -R $USER:$USER {mountpoint/directory}

After that your user can read, write, remove on the disc. If you have more than 1 user and need it for more than 1 persons change the 2nd $USER to the group you need it to be.


Have everything installed, edited BIOS settings (might be wrong) and I still get 'Missing operating system'?

Needs to be adjusted for exact BIOS behavior of Dell Mini 9.

You may need to change boot order, to select the USB device first (ahead of internal (?) SSD).

A better method is to force manual boot, and select the USB device.  This is usually more reliable.


Installation of Skype failed. How to install Skype from Ubuntu's package manager?

In the first photo, it seems that you try to install skype as a snap package from the gnome software. You said that you installed skype manually by downloading it, but you didn't say if you got the snap version or the deb version.

From the second photo, I assume that since the repo of skype is there, you installed the deb version.
Given that, the problem is that the repo of skype, as illustrated in second photo, is disabled.
You have to enable it in order to get updates.

For clarification, check my repolist including skype repo:
Skype repo enabled.

NOTE: the skype package in the repo is named skypeforlinux : Skype package in the repo


Well I found this post: http://www.nvnews.net/vbulletin/showthread.php?t=153283

And the people there are somewhat less than happy with SLI performance on Linux. Some of the posts are quite recent and there's no sign of performance being any better than single-card mode.

I guess I'll keep my eye on the driver releases to see if nvidia improve things.


Keeping below text in the file /usr/share/applications/logout.desktop will do the job.
[Desktop Entry]
Type=Application
Name=logout
Icon=application-exit-symbolic
Exec=gnome-session-quit


Inspect DVD with following command

pg@pipoTower: ~$ tcprobe -i /dev/sr0

look for line where chapters is like following:

[dvd_reader.c] DVD title 1/1: 17 chapter(s), 1 angle(s), title set 1

Rip all titles to mp3 where for example {1..17} is the number of chapters of your dvd

for i in {1..17};do
  transcode -x null,dvd -y null,tcaud -i /dev/sr0 -T 1,$i,1 -a 0 -E 44100,16,2 --lame_preset medium -m ~/tmp/yourDestinationMp3File_chapter${i}.mp3;
done

For details of command:

-T title,chapter,angle (described by your tcprobe command in point 1.)
-a audioTrackNumber
-i inputDevice
--lampe_preset can be: medium, standard, extreme refer to man transcode for further details


Creating a file in that directory required that you'll be either root or in group music.

It seems like the reason you failed to create the file, is that your user isn't included in group music.

You can check that by running id command - which will show the groups you are member in (thanks for @ridgy comment)
As explained here you can add your user to a group using:

sudo usermod -a -G groupName userName

  Note: You might need to logout/login in order to update the group list of your user.


How to install Nokia PC Suite on Ubuntu?

Nokia PC Suite isn't available for Ubuntu of any other Linux Distro. If having network problem then You can try Nokuntu.


Yes Windows is gone.  Good job!  :-)

You should try Ubuntu 12.04 LTS which will be supported until April 2017, or perhaps the 12.10 latest release if 12.04 is still lacking hardware support specific to your machine.

If you have problems you should search for solutions here, and ask a question if you have trouble finding the answer.


Thunderbird - Office 365 Exchange - Works Once

It is a Thunderbird issue. Thunderbird is very persistent in keeping a password, even it is typed in again. Even if you type it in correctly, it seems to create a kind of initial connection, but for subsequent accesses it uses the stored wrong one again.

For me it helped to go to Preferences -> Security -> Saved Passwords and delete whatever OWA password you find.


This is what i did to get the Macbook fans to work properly you will need to enable the Mactel PPA and install macfanctld.

sudo add-apt-repository ppa:mactel-support/ppa
sudo apt-get update && sudo apt-get install macfanctld

For more info you can read with more details in here, this is where i found my solution https://help.ubuntu.com/community/MacBookPro6-2/Precise


Clearly, it's because the in.lj file is not present in the current directory.

You have three possible courses of action:

cd to a directory containing in.lj
Copy in.lj from wherever it is to the current directory.
Specify a full or relative path to an existing in.lj, e.g. lmp_daily -in /home/rashid/other/directory/in.lj.

Pick one.


how do I install novacom in ubuntu 12.04?

This may help you: http://thehtd.blogspot.com/2013/03/installing-webos-sdk-on-ubuntu-linux.html

The article describes the installation of webOS SDK specific for the Ubuntu Linux 12.04 LTS on 32 bits.


The PulseAudio documentation shown on freedesktop.org says:

PulseAudio supports up to 32 individual channels. The order of the
channels is up to the application, but they must be continuous.


Can't run synaptic package manager on Ubuntu 18.04.1

This is a "feature" of Wayland, which prevents GUI software needing root from running via sudo. You can get around it by running

  xhost +si:localuser:root

after logging in. If you often need to use sudo applications you could put this command in a script in your startup applications.


Keyboard shortcut added to lubuntu-rc.xml is not executed on keypress

One way is to run openbox --reconfigure from a terminal and look out for messages that may help you fix things.

Are you sure you've added this code within the <keyboard> and </keyboard> tags? If it's elsewhere, it will be ignored.

Looking at your code, with the echo in it, I'm not sure that Openbox does such stuff. You may not get an error so long as the xml structure and syntax is okay.
In case you don't get an answer here, you could sign up and ask here: http://icculus.org/mailman/listinfo/openbox. Devs hang out there and are helpful!


JDK 8 Installation for Ubuntu 14.04 (Android Studio & NetBeans)

If you change the JAVA_HOME and PATH variables as below you should be able to access your local installation.

  export JAVA_HOME=/home/port8080/jdk1.8.0_11/bin
  export PATH=/home/port8080/jdk1.8.1.0_11/bin:$PATH


Why do tuner card drivers fail to build after kernel update to 4.4.0-143-generic?

What changed is the mm.h file's get_user_pages() interface.  This change to the base kernel code (in Jan) has finally worked its way down to the 4.4.0-143 Ubuntu kernel release.  It caused all sorts of grief to Nvidia drivers and some vm drivers, but they got rewritten.  Other drivers, like yours or the Intel Compute Stick's  HDMI audio driver in oem-hdmi-audio-dkms_0.1_all.deb may or may not get a rewrite.  Basically you have three choices:

Stay with the 4.4.0-142 kernel.  Forgo all future kernel patches -- the 4.4 series is dead to you until your driver is rewritten. Contact the card vendor about this, they may have a new driver.
Rewrite the driver yourself. It may not be too bad, looks like this interface has seen changes in the past, and the current ones are just undoing some things. Don't attempt unless you have some kernel code experience. Maybe hire a third party developer to fix the driver, if security and using that card are critical to you.
Spend your time looking for a later kernel with driver support. The HDMI audio has been fixed in later kernels, like the 4.18, so maybe you can upgrade OS/kernel.  Again, check with the vendor of the card, they may be aware of which later kernels have a working driver (if any) included.

Some machines were crashing, somewhere, so somebody thought changing a LTS kernel interface was acceptable. I personally think they were wrong, but who am I to say.  This alteration was upstream of Canonical, so it's considered a feature, not a bug, and unlikely to be changed because some old drivers don't work anymore.


Static Public IP for Server on a Network that has a Dynamic Public IP

Since you mentioned it being a server and public IP, I'm going to assume you are talking about accessing it outside of your local network. In that case, to get a static IP you'd have to talk to your ISP about getting one. Or as heynnema mentioned, using a dynamic DNS service so you don't have to worry about remembering your IP in the first place.


Is it possible to create a start up disk for 14.04 LTS via Windows 7? My Ubuntu o/s has crashed

Sure you can

Download PowerIso

Run the program as administrator and click on the following:

A box will appear and here you can choose what image file to "burn" onto a USB drive. It'll make it bootable.

However another option is clicking Ctrl+Alt+F1

This will allow you to browse your system, all you have to do is login.

Goodluck!


Parsing the output of ls is generally a bad idea. Doing so when that output is a list of video files is an absolutely horrible idea. Video files will almost certainly contain spaces and other strange characters which are very likely to cause problems. Here's a safer alternative that does the same thing:

latest="$(stat --printf '%Y\t%n\0' * | sort -zk1 | tail -zn1 | cut -f2-)"
mpv "$latest"

Or, if your tail doesn't have the -z flag:

latest="$(stat --printf '%Y\t%n\0' * | sort -rzk1 | awk -F'\t' -vRS='\0' '{print $2; exit}'

Or

latest="$(stat --printf '%Y\t%n\0' * | sort -rzk1 | perl -00pe 's/^\d+\s+(.*?)\0.*/$1/s')"

Note the quoting. You should always quote your variables unless you are absolutely certain that quoting will break something. This solution uses stat to print the modification date of the file (%Y), a tab (\t), the file's name (%n) and a NULL character (\0). This is fed to sort which sorts on the 1st field (-k1), the date and expects null-separated input (-z). It is then passed through tail to get the last (-n1) null-separated (-z) line and, finally, cut removes the date leaving only the file name. This ensures that you can deal with arbitrary files, even any with newlines in their names.

The error you are seeing is hard to diagnose without knowing the names of the files in ~/Videos. The main issue is that you're not quoting the variable's name, and since there seems to be a file with --t, that is taken as an argument. If you know your file names will never contain newlines, you could also do:

latest="$(ls ~/Videos/ -t | head -n 1)"
mpv ~/Videos/"$latest"

But this is really a bad habit to get into and should never be used in production code.


Add and remove launcher icons from command line

To view the current ones:

gsettings get com.canonical.Unity.Launcher favorites

would output something like:

['nautilus-home.desktop', 'chromium-browser.desktop', 'gnome-system-monitor.desktop']

To add new entry, say vlc, add its .desktop file ie. vlc.desktop as:

gsettings set com.canonical.Unity.Launcher favorites "['nautilus-home.desktop', 'chromium-browser.desktop', 'gnome-system-monitor.desktop', 'vlc.desktop']"

(those included in the value string "[... ... ...]" will be show up in the launcher. You can use this to add or remove the launchers of your choice.)

To reset to the default values:

gsettings reset com.canonical.Unity.Launcher favorites


Your kernel will be using blk-mq for such a device already. You can even tell because you have only the multi queue deadline scheduler!
(The following information was found via the search https://www.google.com/search?q=blk-mq+nvme )
Per this answer on How to disable blk-mq for NVMe and use CFQ, deadline, noop? you can't actually switch NVMe drives to use anything but blk-mq since the 3.19 kernel (see the commit NVMe: Convert to blk-mq) and prior to that the multi queue logic was inside the NVMe driver itself anyway.


As the standard user, open a terminal using Ctrl+Alt+t and then type the following:

passwd

And then enter your current password and then type your new passwords consisting of at least the following:

1 special character
1 digital character
1 alphabetic character

It is not possible to save a password without these criteria met, you'll need super user privileges to assign a simple password to a user.

I am not sure whether there is a graphical way of doing this, will update my answer if I find a simpler, graphical way.


How to install Kali Linux tools in Ubuntu 16.04 LTS?

Look at the second command in the screen-shot. I guess your pull from git failed because there already is a folder by the name katoolin in current directory. You will have to use rm -rf katoolin to remove the folder and its content.

Because of this failure, katoolin.py is not downloaded and chmod command fails to find it. Hence, the error.


Can't find or install Canon MP230 on Ubuntu 12.04

I can instill canon driver (mp230) from

sudo add-apt-repository ppa:michael-gruz/canon
sudo apt-get update

then look for appropriate command at here
wish it help you :)


Can't boot ubuntu 17.10 with usb displaylink monitor?

It is possible that the driver for the adapter isn't loaded on boot.  I would just unplug and plug in when needed, or add a cheap PCIe GPU for DisplayPort.  I personally wouldn't bother figuring it out.

Nothing appears probably because the OS doesn't detect a monitor and the driver for the adapter won't be loaded.  You'll need a monitor connected to the GPU for normal behaviour.


Check to make sure that you have the right WPA version(WPA, WPA2) or Encryption protocol(TKIP,CCMP/AES).


I fixed this by installing ubuntu by quickly pressing Ctrl at the first sign of the ubuntu coloured blank screen. Then when a menu pops up, I selected the install ubuntu (safe graphics) option. Everything works fine!
It seems like it was the Graphics issue that caused the freezing.


In Synaptic, how can one see what's been marked?

just found it:

Custom Filters > Marked Changes


How to transfer an iPhoto Library to a file based structure and how to manage them properly?

This might be random and might not be for you but I've installed a NextCloud server and put the app on my iPhone. It has a sync function so it will sync everything in the photos app on your iPhone (which is in an iPhoto db format) by date. If you install the sync client on your machine then you will have access to all of your photos because they will be downloaded from your cloud account. From there you can import them into Ubuntu easily.


Black screen when playing a movie in VLC player, just the sound is enabled

go to Tools → Preferences → Video and set the output to X11 video output and save it
now close and open VLC, and open your video
Edit:
If it still doesn't work try setting the output to OpenGL video output as suggested by @Asaf


When your computer boots up, after the BIOS loads, press the Esc key, to see all available Ubuntu boot options.

Choose Advanced options for Ubuntu and then choose the Ubuntu, with Linux ... (recovery mode), preferably the one with the oldest version of the kernel.

If you can safely login to Ubuntu, backup all your files. If this is all you need, then you can re-install Ubuntu. Otherwise after you back up your files, let me know so that we can see if we can diagnose your system's problem and fix it.

Update 1

Great, now that you have managed to login, press Alt+Ctrl+F2, this should show you a terminal screen. Then using the cp command, backup all your important files.

For example, if your external HDD is mounted at /run/media/my-hdd, first create a directory there named backup-2016-07-17:

$ cd /run/media/my-hdd
$ mkdir backup-2016-07-17

Then run the following command:

$ cp -R /home/your-username /run/media/my-hdd/backup-2016-07-17

Update 2

Also please run the following command to list all the errors that have occurred in this boot session:

journalctl -b -p err..emerg

Then please add them to your question. For example, for me, it shows the following output:

Jul 16 16:58:40 localhost kernel: tpm_tis 00:0a: A TPM error (6) occurred attempting to read a pcr value
Jul 16 16:58:40 localhost systemd[1]: Failed to start LSB: QEMU KVM module loading script.
Jul 16 16:58:40 localhost kernel: iwlwifi 0000:01:00.0: Unsupported splx structure
Jul 16 16:58:40 localhost systemd[1]: Failed to start LSB: QEMU KVM module loading script.
Jul 16 16:58:41 localhost kernel: Bluetooth: hci0: Failed to send firmware data (-38)
Jul 16 16:58:41 localhost NetworkManager[898]: nm_device_get_device_type: assertion 'NM_IS_DEVICE (self)' failed
Jul 16 16:58:41 localhost wpa_supplicant[1227]: dbus: wpa_dbus_get_object_properties: failed to get object properties: (none) none
Jul 16 16:58:41 localhost wpa_supplicant[1227]: dbus: Failed to construct signal
Jul 16 16:58:41 localhost wpa_supplicant[1227]: Could not read interface p2p-dev-wls2 flags: No such device
Jul 16 16:58:43 localhost kernel: Bluetooth: hci0 command 0xfc05 tx timeout
Jul 16 16:58:47 localhost kernel: Bluetooth: hci0: Reading Intel version information failed (-19)
Jul 16 16:58:50 localhost kernel: Bluetooth: hci0: Setting Intel event mask failed (-16)
Jul 16 16:58:50 localhost bluetoothd[1482]: Failed to obtain handles for "Service Changed" characteristic
Jul 16 16:58:50 localhost bluetoothd[1482]: Not enough free handles to register service
Jul 16 16:58:50 localhost bluetoothd[1482]: Error adding Link Loss service
Jul 16 16:58:50 localhost bluetoothd[1482]: Not enough free handles to register service
Jul 16 16:58:50 localhost bluetoothd[1482]: Not enough free handles to register service
Jul 16 16:58:50 localhost bluetoothd[1482]: Not enough free handles to register service
Jul 16 16:58:50 localhost bluetoothd[1482]: Current Time Service could not be registered
Jul 16 16:58:50 localhost bluetoothd[1482]: gatt-time-server: Input/output error (5)
Jul 16 16:58:50 localhost bluetoothd[1482]: Not enough free handles to register service
Jul 16 16:58:50 localhost bluetoothd[1482]: Not enough free handles to register service
Jul 16 16:58:50 localhost bluetoothd[1482]: Sap driver initialization failed.
Jul 16 16:58:50 localhost bluetoothd[1482]: sap-server: Operation not permitted (1)
Jul 16 16:58:59 localhost pulseaudio[1940]: [pulseaudio] pid.c: Daemon already running.


Only dummy output and no soundcards found on Ubuntu

snd_hda_intel: `2' invalid for parameter `beep_mode'

The driver refuses to load because there is an invalid setting for its beep_mode parameter.

It should not be necessary to make any customizations to any files in /etc/modprobe.d/.


What do "." and ".." mean when in a folder?

. is the current folder.

.. is the folder above the current folder - the folder that contains the current folder.

You will sometimes see that single dot in use when someone wants to run a script from their home directory. For instance: ./install-app.sh. That means the file "install-app.sh" is in the current directory. It would be just as valid to do /home/username/directory/install-app.sh. The same way, you could also do ../install.app if the file is in the parent directory. The reason why it is this way, is not only for navigation, but also that it shouldn't be possible to accidentally hide system applications simply by misnaming a file in your home directory.


Cannot use apt/curl/wget/git but can Ping

Can you try to download

wget https://cpan.metacpan.org/authors/id/S/SY/SYP/Net-Curl-0.44.tar.gz

Does this download?

Are there any rules in iptables?

ip6tables -nxvL
iptables -nxvL

Are you behind any other external firewall?


How do I monitor rm, mv , mkdir commands in Ubuntu Server?

If you want to log the usage of these commands, you could make some shell scripts to wrap them.

For example, for rm:

#!/bin/bash

echo $(date +"%m-%d-%Y %H:%M:%S") $USER: $0 $@ >> /tmp/rm.log
/bin/rm.real $@

Assuming you named this file rm_log.sh, you install it like this:

$ sudo mv -n /bin/rm /bin/rm.real
$ sudo cp rm_log.sh /bin/rm

Now whenever someone uses the rm command, you get a new line in the /tmp/rm.log file. For example:

$ rm example.txt
$ cat /tmp/rm.log
12-28-2015 12:34:56 cos64: /bin/rm example.txt


Can't install Ubuntu Server 18.04.3 in KVM with minimal disk size

You need space for the swap file, the documented space requirements are strictly for the Operating System so yes, you need more than what it is telling you as a minimum.


Ubuntu 16.04lts freeze on internet connection

I had this issue also and here is how I got it fixed...
The issue is that Ubuntun updates to the kernel version :

linux-headers-4.4.0-62-generic_xxx_amd64
linux-heasers-4.4.0.63-generic_xxx_all
linux-image-4.4.0.63-generic_xxx_amd64

and for some reason these versions have an issue with the wifi.( don't know what it is)
So to fix this: here is what you will have to do: simple... revert to an older kernel version.... you ask  but how?, I have no internet connection..

So you find a usb drive and download the previous kernel versions for your ubuntu flavor and then use the usb to install the previous kernel versions.
Here is the procedure:

Get the ubuntu flavor for your system:

--> `lsb_release -a`

Codename: <ubuntu_version> ( mine is "xenial")

Now using another internet connected machine(library computers); go to http://kernel.ubuntu.com/~kernel-ppa/mainline/ and get your recent kernel files (.deb) For mine, I am using xenial Ubuntu 16.04.1 LTS so I got the current kernel version.
Choose the folder with your ubuntu version and Download the following (.deb files)

---> linux-headers-xxxxx-generic-yyyyy_amd64.deb

---> linux-headers-xxxxx-yyyyy_all.deb

---> linux-image-xxxxx-generic-yyyyy_amd64.deb

Create a directory and put these .deb files inside e.g

---> `mkdir  linux_kernel_version_xxxxx`

--->  `cp *.deb linux_kernel_version_xxxx`

Copy this  directory into your usb and transfer these files to your troubling ubuntu machine
Open  terminal (CTRL + ALT+ T or right click on desktop and choose "open Terminal" and go to the directory you just transferred from your usb drive
and launch the package installation command as root:

---> `cd linux_kernel_version_xxxx`

---> `sudo dpkg -i *.deb`

That should install the previous kernel version and  adjust your boot appropriately so that you always boot to the kernel that does not leads to freeze once wifi adapter is connected.

If you get the error: "module_init_blah_blah", either try another previous version or find a way( using usb again?) download the "module_init_blah_blah" and install it first before trying to install the kernel or simply keep trying even more previous kernel version until you hit the right one, there are more previous kernel versions here:

Hope that works. Enjoy


ip forwarding set up so the nodes can get to the internet through your MAAS host?

this is how it is done:

do this on the maas/region cluster controller. this only for those who have maas/region cluster running on one server.

sudo nano nat.sh

then: copy and paste the contents of the link:

https://help.ubuntu.com/community/Router#Enable_IP_forwarding_and_Masquerading

save file nat.sh

After configuring the 2 variables, if necessary, ( i found it not necessary)

save the script below as nat.sh and make it executable by doing

chmod a+x nat.sh

Now, test the script by running as root

sudo sh nat.sh

Investigate the messages from the console output to see if any error happened. If everything looks fine, use another host in the internal network to test if it can access the external network (presumably the Internet). A quick way to test is pinging Google public DNS from the console.

ping -c 3 -W 10 8.8.8.8
If ping responds, make our new script bootable so we don't have to run the script every time we restart.

sudo cp nat.sh /etc/init.d/

sudo ln -s /etc/init.d/nat.sh /etc/rc2.d/S95masquradescript

As a final test, restart your computer and test to see if you still have the same functionality. If so then congratulations! If not then make sure you followed the above correctly so the script is bootable.

it worked beautifully. test by plugging a laptop on the node side of you router, and you should have internet.


Can Luks Be Used To Encrypt an NTFS Partition in Ubuntu?

Luks works at the block level so theoretically you can put any filesystems you want inside it including NTFS.

But you wouldn't be able to boot directly into Windows and access it, except I guess if Windows was running on a virtual machine inside your Linux installation.

While setting it up is outside the scope of this site, you could use Bitlocker.


I want to record a screencast of a processing sketch

The solution in the link seems to be working perfectly (if I understood what you asked correctly). Did not even had to change any config in gtk-recordmydesktop to make it work.

You don't need to change anything in pavucontrol about Processing since it will not show in the recording tab, you need to change the gtk-recordmydesktop setting to capture your system sounds.

Here is a quick video on how I did it.

Don't complain about the music please, my neighbors love it! ;)
(at least they keep banging of joy on the walls every time I play it loud)


Where to find gtx560Ti driver for ubuntu 12.04?

Yes this driver is supported for your graphics card.

What you see was RELEASE HIGHLIGHT and it was written

Added support for the following GPUs: following by your list. That means in that version they have added the support for the aforesaid products.

If you click on supported products tab of the page (the link you posted) your Graphics card is enlisted over there under 500 series.

A careful reading  sometime helps. :)


How to create a script to sync notes to files using Geeknote

I was looking for the same thing. This is what I came up with.

#!/bin/bash
geeknote notebook-list > /tmp/list.txt
Note_List=$(cat /tmp/list.txt | grep -v Total | cut -d : -f 2)
for i in $Note_List; do
    gnsync --path ~/evernote --logpath ~/.log/geeknote.log --format markdown --notebook "$i" --two-way TWO_WAY
done

You will probably have to press enter a few times after starting. I am not sure how to treat the geeknote notebook-list command to eliminate the need for having to press enter.