Say you want to install the following script you found while browsing Ask Ubuntu:

#!/bin/bash
## Sample Script 0.1
## Dependencies: notify-osd

notify-send "Sample nautilus script" "You Selected $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS"

Dependencies

The first thing you'll notice is that many scripts won't just run out of the box. Sometimes they depend on other packages you might or might not have installed. In this case our script depends on notify-osd, which comes with Ubuntu by default.

On other distros this might not be the case and you'll have to install the dependencies before using the script. If the dependency is part of the official repositories you can easily install it with apt-get, e.g.:

sudo apt-get install notify-osd

Setting the script up

Now that we've satisfied all dependencies we can move on and copy the script to our system. To do so we first create a new document in our scripts folder, which is ~/.gnome2/nautilus-scripts or  ~/.local/share/nautilus/scripts/ on Ubuntu 13.04 and above. This is a hidden folder. In order to head to it you will have to open your file manager, press CTRL+L and paste the directory path into the Location bar.

Next we will create a new empty document by right clicking and selecting Create new Document → Empty Document. Name it anything you want, but beware: The title you choose is how the script entry will later appear in the nautilus context menu. So better choose a descriptive name for the document:

Open the new document up in a text editor of your choice and proceed to copy and paste the contents of the code box above into it. Save it and exit the text editor.

Making it executable

At this point your script is set up correctly but still won't work as the system does not recognize it as an executable file yet. To make it executable, right click on your file and head to Properties → Permissions. Set the checkmark at Allow Executing as program and close the dialogue:

Usage

You should now be able to access the script from your nautilus context menu. Just right click on a file of your choice and head to Scripts --> Script name (here: Sample Script). Click on the entry to execute the script on the files you selected:

Assigning a keyboard shortcut to the script

Keyboard shortcuts for Nautilus scripts can be assigned by editing Nautilus' keyboard accelerator file. On Ubuntu 12.04 and below this file can be found under ~/.gnome2/accels/nautilus. On newer releases this file has been moved to ~/.config/nautilus/accels. Please note that your script will only appear in the accelerator file after restarting Nautilus (execute nautilus -q, then launch Nautilus again by clicking on its launcher).

The syntax of the accelerator file might look a bit overwhelming at first but it's actually pretty easy. Take a look at this excerpt, for instance:

; (gtk_accel_path "<Actions>/ShellActions/ZoomInAccel2" "<Primary>KP_Add")
; (gtk_accel_path "<Actions>/ShellActions/TabsNext" "<Primary>Page_Down")
; (gtk_accel_path "<Actions>/ScriptsGroup/script_file:\\s\\s\\shome\\sglutanimate\\s.gnome2\\snautilus-scripts\\sSample%20script" "")
; (gtk_accel_path "<Actions>/ShellActions/Search" "<Primary>f")
; (gtk_accel_path "<Actions>/ShellActions/Forward" "<Alt>Right")

Every line represents a single key assignment. The first double-quoted segment designates the action, the second one the assigned key combination. Lines starting with a semicolon are commented and currently inactive.

In order to assign a shortcut to your script you will have to search this file for the name of the script and uncomment the corresponding line by removing the semicolon. Then proceed to type in the keyboard shortcut you would like to assign.

These are the available modifiers and their corresponding keycodes:

CTRL = <Primary>
ALT = <Alt>
SHIFT = <Shift>

You can find valid keycodes for all other keys by using xev.

Here's how you would have to modify the section above to assign your sample script to ALT + SHIFT + S:

; (gtk_accel_path "<Actions>/ShellActions/ZoomInAccel2" "<Primary>KP_Add")
; (gtk_accel_path "<Actions>/ShellActions/TabsNext" "<Primary>Page_Down")
(gtk_accel_path "<Actions>/ScriptsGroup/script_file:\\s\\s\\shome\\sglutanimate\\s.gnome2\\snautilus-scripts\\sSample%20script" "<Alt><Shift>s")
; (gtk_accel_path "<Actions>/ShellActions/Search" "<Primary>f")
; (gtk_accel_path "<Actions>/ShellActions/Forward" "<Alt>Right")

On Ubuntu 12.04 (and perhaps later releases as well) Nautilus will sometimes overwrite the accelerator file before you can make any changes. So it might be a good idea to perform all of the changes you make while Nautilus isn't running (nautilus -q). Either way, you will have to restart Nautilus to see the changes.

Automating the installation

This Nautilus script will automatically install Nautilus scripts for you. Please take a look at the comments to see what's going on behind the scenes:

#!/bin/bash
# AUTHOR:       Glutanimate (https://askubuntu.com/users/81372/)
# LICENSE:      GNU GPLv3 (http://www.gnu.de/documents/gpl-3.0.en.html)
# NAME:         Nautilus Scripts Installer
#
# DESCRIPTION:  This script will install Nautilus scripts on Ubuntu 12.04 and above.
#               Note: scripts of the same name in the destination folder will be
#               overwritten without warning

# general purpose notification function
gui_notify(){
    notify-send -i gnome-app-install "Nautilus Scripts Installer" "$1"
}

# check if any files selected
if [[ -z "$@" ]]
  then
      gui_notify "Error: No files selected."
      exit 1
fi

RELEASE="$(lsb_release -r | cut -f2)"   # detect Ubuntu release

if [[ "$RELEASE" = "12.04" ]]           # set script folder accordingly
  then
      ScriptFolder="$HOME/.gnome2/nautilus-scripts"
  else
      ScriptFolder="$HOME/.local/share/nautilus/scripts/"
fi

for Script in "$@"; do

  ScriptFilename="${Script##*/}"                # get filename via bash string manipulation

  cp "$Script" "$ScriptFolder/"                 # Move script to destination
  chmod u+x "$ScriptFolder/$ScriptFilename"     # Make it executable for the user

done

gui_notify "The following scripts have been installed: $@"

As an aside: Here's the nautilus script I used to record the screencasts of this answer.


After suspend mode, Wi-Fi won't reconnect to open network, but works fine on secure network. Any suggestions?

I don't have a solution :P I have problems with wifi even at my home, if the signal gets lost and then up again then the wifi, sometimes, can't reconnect (even with disabling-enabling wifi). The only thing I can do is run in terminal 'systemctl restart NetworkManager' and the wifi works again. You can create a .desktop file on your desktop with this command so that you execute it every time you have problem.


Why is better to upgrade/install a newer release

Reasons to stay up-to-date:

1) Security.  All software has bugs, and code that is exposed to the outside world, either due to being accessible by the outside world (i.e. ssh), reaching out to the outside world (i.e. browsers) or dealing with data you get from the outside world (i.e. gimp opening downloaded images), all of this code can be exploited by virus/malware writers to do bad things to your system.

2) Bugs.  Even bugs that don't cause security issues can be annoying, and newer software tends to fix older bugs.

3) Hardware support.  Newer versions of the operating system are sometimes required to work with new devices, especially if you're running an '05 version and you now want to connect to a new TYPE of device (that may not have even been invented in '05).

4) Features.  Newer software usually has more features, and can do more of what you want.

Reasons to not stay up-to-date:

1) Bugs.  Yeah, newer features mean newer bugs, so this is a double-edged sword.

2) Features.  Sometimes (i.e. Gnome 3) new features mean your software won't work the same way it used to, and that can be annoying.  Thinking about my mom here, and the fact that once she gets used to doing things a certain way, she usually doesn't want to change (at least not without a compelling reason).

The first four points apply to all programs and operating systems, but specifically as they relate to Ubuntu:

1) All active O/S's provide security patches; I prefer Ubuntu, since as a subscriber to their security list, I have a pretty good handle on what I'm updating when the patches are suggested by the update-manager.

2) All software has bugs; I prefer Ubuntu, since as a programmer I can poke around and submit a bug report or patch and have a better likelihood that there's a human on the other end that cares.  Anecdotal, to be sure, but I've done this a few times with open source programs; never felt it worth my time with commercial software.

3) I punt on this one, and only used hardware that I know Ubuntu supports well.  It's not a bad tactic to use for Windows as well, as they have driver issues themselves.

4) Given the typically free-as-in-beer nature of Ubuntu, upgrading to get new features has no sticker shock, making it a much nicer process than with other O/S's.  Just go and grab various programs and give them a spin.

Bottom line here, I think, is that the reasons you SHOULD stay up-to-date are the same for all programs and operating systems, but Ubuntu makes it better in various ways to ACTUALLY stay up-to-date.  (YMMV.)


Right click to open a terminal in Kubuntu?

Dolphin (the default KDE file manager) already include this option.

  Right click in the folder and choose Action > Open Terminal Here

The shortcut for this operation is Shift + F4


Successfully set up Samba share with Ubuntu 19.10 but cannot access with some old devices

Maybe an old authentication mode, which I would have to enable with Samba v4?

That may very well be the issue. You can try editing /etc/samba/smb.conf and adding the following in the [global] section - like right under workgroup = WORKGROUP:

lanman auth = yes
ntlm auth = yes

THen restarting smbd:

sudo service smbd restart


Virtualbox Guest (Win 7 host) locks up on network access

Just to close up my own question -- I ended up installing the Virtualbox 4 and Ubuntu 10.10. This is no longer an issue for me.


Chromium doesn't shutdown correctly with 2 or more active tabs open (18.04)

That is the normal and expected behavior of a browser ...

  if I quite/close Chromium running multiple tabs directly from the application, no such error occurs.

You have to close your browser before you shutdown/reboot your system. otherwise before system getting shutdown a signal will be sent to all running programs (process) (chromium in our case) asking the process to close itself.

That causes chromium to immediately close itself (seems not being shutdown properly) and thus the session (more than of one tab) being lost, so next time when you run chromium it suggests you to restore the lost session (it considers that system has crashed or you have encounter a power failure, etc).

Test it without shutdown:

open chromium
open two or more tabs
open a new terminal
run this command:

pkill -3 chromium

open chromium again

Same message will be appeared...


Windows partition not showing during installation of Ubuntu

Boot options might not appear if GRUB is convinced there is only one bootable drive. You can force the GRUB menu by holding Shift immediately after turning on your PC.

You can run this command to re-generate your GRUB boot menu and it will attempt to find any other operating systems:

sudo update-grub

You can run this commands to see your disks:

gnome-disks

This will give you options to mount your existing Windows disk or determine why it's not being detected. Sometimes if Windows was not shutdown properly it sets a flag saying it needs to be "checked" or "repaired" in which case Linux will not touch it. You can have Linux do the repair if you do this:

sudo apt install ntfs-3g
sudo ntfsfix /some/disk

In this case /some/disk is a disk path like /dev/sdXXX - this varies between system and you should take caution to not "fix" the wrong disk. If the package ntfs-3g doesn't exist try installing ntfsprogs instead.


When I read that a new router has been installed, I get nervous because often, routers are put in place with default settings that work fine for most wireless devices but may not work well with Linux drivers that are often very sensitive to settings in the router or other access point.

Please check the settings in the router. WPA2-AES is preferred; not any WPA and WPA2 mixed mode and certainly not TKIP. Second, if your router is capable of N speeds, you may have better connectivity with a channel width of 20 MHz in the 2.4 GHz band instead of automatic 20/40 MHz, although it is likely to affect N speeds. I also have better luck with a fixed channel, either 1, 6 or 11, rather than automatic channel selection. Also, be certain the router is not set to use N speeds only; auto B, G and N is preferred. After making these changes, reboot the router.

Next, I recommend that your regulatory domain be set explicitly. Check yours:

sudo iw reg get

If you get 00, that is a one-size-maybe-fits-all setting. Find yours here: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 Then set it temporarily:

sudo iw reg set IS

Of course, substitute your country code if not Iceland. Set it permanently:

gksudo gedit /etc/default/crda

Use nano or kate or leafpad if you don't have the text editor gedit.

Change the last line to read:

REGDOMAIN=IS

Proofread carefully, save and close the text editor.

Next, I'd set IPv6 to Ignore in Network Manager: http://docs.fedoraproject.org/en-US/Fedora/18/html/Installation_Guide/images/netconfig/network-connections-ipv6-ignore.png  This example is for ethernet, but you want wireless.

After making these changes, let us hear if connectivity is improved.


With a custom built PC that hasn't gone through the BIOS setup could I get Ubuntu?

Sounds like an great rig!

Assuming you properly set up you USB drive to be bootable image of Ubuntu and enable your BIOS to boot from USB (if required) then Yes.

If you are new to installing OS's I would suggest to download the Ubuntu ISO and burn it to CD/DVD then install it that way.


It seems to be due to some dependencies on 32 bit packages, try running sudo apt-get install ia32-libs and then attempting the install again.


cd home/dir

grep -r -l -i "1896\.345" .


There are in-process switches, accessible by typing h within. I can't find a way to list cumulative network meter from the command line. However, I found the following command gives all the other functionality...

$ glances -0 -b --fs-free-space --process-short-name

-0 lists CPU by overall work, not only for the core(s) the process uses
-b shows Byte-form data instead of bits
--fs-free-space shows free space on volumes, switching from filled space
--process-short-name takes a lot of the path out and shows the command name firsst

Glances is a pretty neat app. I launch it on login, now with the above command.


Is it possible to use EXT4 partition in windows 10?

You cannot use an ext partition with Windows on its own.

Windows cannot read ext partitions.  This has always been the case and continues to be the case.

You would have to repartition your disk to have a shared storage space (such as NTFS or FAT32) to use with both OSes and then use that for storing repositories you need on both environments.

@Rinzwind made a note in comments:

  There are at least 2 windows projects that allow using ext on windows. ext2fsd is for ext2 and ext3. Paragon ExtFS (non-free) allow full access to ext

  @AadithyaS ext2fsd is limited. it does not understand journaling and worse lacks ext4 support.


I have noticed that gnash does a better job for streaming video than flash  to install gnash there isn't really any need to remove flash you can install gnash by  sudo apt-get install gnash  Hope it helps


How to view RGB 565 format image on ubuntu

GIMP

sudo apt-get update
sudo apt-get install gimp

kolourpaint

sudo apt-get update
sudo apt-get install kolourpaint4


Caps lock doesn't work with Danish letters

It's a bug.

This will work around it:

On the computer with earlier version of Ubuntu:

$ sudo dumpkeys > mykeys.txt

On the computer running with 14.04 add this to /etc/rc.local:

loadkeys -s /path/to/mykeys.txt


Is it possible to make an EXACT ISO of my system to put on other computers?

Parts of this answer comes from: How to move Ubuntu installation from one hdd to another?

I can't say an exact answer for the creation of an ISO as you say in your question but if you wish to reduce the amount of time for creating identical copies of an operating system in different computers, the Cloning process can be useful for your case, of which I suggest you the usage of Clonezilla which can be useful for cloning hard disk drives even for those situations on which you need to do it with different size disks as mentioned here: http://www.tuxradar.com/content/how-clone-hard-drives-clonezilla

  Moving to a bigger disk

  It's easy to ensure that a clone of a SCSI
  disk is restored to a SCSI disk, but you'll have a tough time finding
  an exact replica size-wise. The good news is you don't have to restore
  a disk on another disk of the same size. The even better news is that
  you can in fact restore the image to a much larger disk.

  When restoring a disk, Clonezilla enables you to resize the filesystem
  and create partitions on the new disk proportionally. But even if you
  are moving to a bigger disk, you might prefer to keep the partitions
  as they are. In that case you can ask Clonezilla to create the
  partition table as its listed in the image.

There is documentation about moving to a larger disk but I am not sure that you can do it the opposite (cloning to a smaller disk). That's why I should suggest you to use just the amount of hard disk drive space needed for the install or check which is the smallest hard disk drive of your equipment in order to create the install based on that disk. Let's say: If you have 9 hard disk drives, 2x100GB, 4x80GB 2x40GB and 1x20GB, let's use the smallest one to install and to be the source for cloning so you can clone it in the largest ones. Remember to expand the partitions as needed in order to use the full hard disk drive after cloning.

Clonezilla offers several Live CD's and bootable USB images and there is also documented that you can resize the free space on the disk after the copy, in which case the suggestion to use gparted is also a good idea.

You don't need to worry about drivers and possible failures related to these things. Ubuntu will install whatever drivers as needed for the new computer, except the proprietary drivers of certain video cards (ATI/nVidia) or more specific hardware. Based on that I suggest you to check every cloned system in order to make sure that everything is running fine after the cloning.

By using a cloning procedure you can do as many customization as you wish to the system and be sure that all the cloned hard disk drives will have the same software that you include on the original.

Good luck!


Can't Login to Windows 10 after installing Ubuntu 14.04

Not sure what you mean with "can't log in", be more specific. But if windows doesn't show up in the grub boot menu.. In your Ubuntu open a terminal (press Ctrl+Alt+T at the same time). In the terminal type sudo update-grub.
Reboot.


Can I add LUKS/LVM to an already installed Ubuntu system?

No, you have to re-install as a part of encryption (LUKS) writes random data to the hard drive over writing your data. You will have to back up your data an re-install.


How to install 2 telegram desktop on a ubuntu pc?

You can simply run Telegram with a custom "working directory":

mkdir tel_account2

Telegram -many -workdir tel_account2


Install/upgrade ubuntu from another system

You can buy a DVD here: http://shop.canonical.com/product_info.php?products_id=1027

Or maybe go to a library or somewhere else with decent free wifi? Unless the new laptop has the .iso somewhere then you're out of luck for the newer upgrading the older. You can search for it with:

sudo updatedb
locate *.iso


How to switch from Ubuntu 18.04 to Lubuntu while keeping the home directory?

You have a number of options.

1. Bloated option (my favorite)

Add the Lubuntu desktop to your existing system.

sudo apt install lubuntu-desktop

It'll add LXDE & all Lubuntu software to your existing system. It increases bandwidth for each update (as you'll get all Ubuntu (GNOME) + Lubuntu (LXDE) upgrades; it also complicates menus somewhat (eg. you'll have a load more programs being for example Ubuntu GNOME's gedit text editor, plus Lubuntu's text editor leafpad...  It's probably not ideal for a 'newbie', but it lets you use LXDE (Lubuntu) when you want to, or at login you can select to use GNOME (Ubuntu).

2. Re-install Lubuntu 18.04 LTS

Download Lubuntu 18.04 LTS ISO, write to install media & install.
Use the 'Something-else' option, select your existing partitions ensuring you don't have format (esp. for whatever partition has your /home partition). It'll cause the following to occur

any added packages will be noted
system directories will be erased
new system installed
additional packages you had installed (noted earlier) will be added back
you're asked to reboot.

Just ensure you don't format your home partition (it'll be in "/" if you didn't specify another partition), otherwise what I've described here won't apply.

3. Switch to Lubuntu 19.10 during install

I'd be tempted to use this one if you're sticking to Lubuntu.  Lubuntu 18.04 LTS was the last that used the LXDE desktop, as all later releases use the more modern LXQt.  Yes it's possible to upgrade without re-install (I did on this box), however due to problems doing it, it's not supported & not recommended. Thus you could make the switch now, and be running a system that'll easily upgrade to Lubuntu 20.04 LTS in a few months.

Download the Lubuntu 19.10 ISO, write to media, and install using "Manual Partitioning" (what was called Something-else in 18.04). Select your existing partitions ensuring you don't have the 'format' boxes checked, it'll do the same as the prior install.

any added packages will be noted
system directories will be erased
new system installed
additional packages you had installed (noted earlier) will be added back
you're asked to reboot.

I'll add some links

The Lubuntu manual (Installation section)
https://manual.lubuntu.me/stable/1/Installing_lubuntu.html

Chapter 1.1 Retrieving the image - https://manual.lubuntu.me/stable/1/1.1/retrieving_the_image.html

Chapter 1.2 Booting the Image - https://manual.lubuntu.me/stable/1/1.2/booting_the_image.html

Chapter 1.3 Installation - https://manual.lubuntu.me/stable/1/1.3/installation.html

The manual pages refer to 19.10; which is treated as the stable release.  As the manual was started with the switch to LXQt, it doesn't really relate to LXDE or 'legacy' Lubuntu.

You didn't provide specs of your box; my own box is a decade old & I'm running LXQt correctly (20.04), however for x86 (i386 or 32-bit boxes) the LXQt is not a choice and 18.04 LTS is your best bet.  If you're running a x86_64 (amd64) box, I'd really consider using this as a chance to switch to 19.10 and LXQt. It'll be the easiest longer-term.  Lubuntu 18.04 LTS is supported until 2021-April (ie. 3 years from release in 2018-April).


Is there any way to see all the special characters in a special keyboard layout?

System Setting → Regional & Languages → Input Sources

Select your layout then click on that small keyboard icon at middle bottom

Other way, Open terminal and run:

gkbd-keyboard-display -l is?dvorak

BTW, it is a part of gkbd-capplet package. If it is not installed:

sudo apt-get install gkbd-capplet


Can I remove the SanDisk security file from my trash?

If you can't empty the trash in the usual way then you can often do so by deleting the trash folder. As Byte Commander said, each device on which files are deleted to the trash gets its own trash folder, which is hidden because it starts with .:

  If you put something from a removable device into trash, Ubuntu will
  create a trash folder on that device and move it there. Something like
  a folder called .Trash-1000 (you must enable showing hidden files to
  see it) in the device's root directory. Your trash will then display
  the combined content of both your local user's trash folder and those
  of all connected devices, if any.

– Byte Commander Aug 16 at 21:49

The . prefix to hide files is just a convention and there is no technical impediment against you viewing, modifying, or deleting such files. In most graphical file browsers including Nautilus ("Files"), pressing Ctrl+H views hidden files. You can press it again to re-hide them.

If you prefer to use the terminal, add -A to your ls commands to show hidden files. You can probably delete the files in a graphical file browser or with the rm command. To "hard delete" them in the file browser--rather than sending them (back) to the trash--you can use Shift+Delete rather than just Delete. This works in virtually all graphical file browsers (it even  works in Windows).

You should be extra careful when using Shift+Delete--for example, make sure you don't have anything selected that you don't want to delete--because it's quite often not possible to recover files after you've deleted them, and even when it is possible, it is almost always a hassle and the files may be damaged. You should apply the same care with rm.

(You indicated you were able to delete the files based on Byte Commander's explanation, but you did give the specific method you used, so I've included some information about that here for the benefit of others. This answer is mainly to help others who have the same problem you had and find your question by searching.)


With Ubuntu 13.10 amd64,
the problem /usr/include/stdc-predef.h:30:26: fatal error: bits/predefs.h: No such file or directory compilation terminated. has been solved after:

$ sudo apt-get install build-essential
$ sudo apt-get install libc6-dev-i386
$ sudo apt-get install g++-4.8-multilib


You can download .deb version from the Debian site and install it using Software Centre or Gdebi.

http://linuxappfinder.com/package/labplot


Boot Problem: "Boot Loader; /casper/vmlinuz: read error @ 0"

Open your USB drive and see you have indeed a file names vmlinuz inside a directory named casper (see the image below).

If not something must have gone wrong during the creation of live USB. There is another user who faced the same problem using the same tool you used to create live USB. See /casper/vmlinuz: not found

As suggested in an answer in the above post, you can also try adding the .efi extension to vmlinuz (or remove if efi is already there) and then try to boot.

If this also did not work, perhaps you should try other tools such as Unetbootin or Universal USB installer

If your downloaded ISO is not corrupted and your creation of bootable USB has worked out well, you should end up with a USB having following folders (example shown here is 15.04):


The ModemManager can conflict with /dev/ttyACM0. You have two options:
Disable ModemManager temporarily
systemctl stop ModemManager.service

This will stop ModemManager until the next reboot. You will need to run this command every time you reboot your computer.
Remove ModemManager completely
You can remove ModemManager completely, but this means you will not be able to use any modem with Ubuntu anymore. So if you use a USB modem for internet, do not remove the ModemManager.
This is what ModemManager does:

ModemManager is a DBus-activated daemon which controls mobile broadband (2G/3G/4G) devices and connections. Whether built-in devices, USB dongles, bluetooth-paired telephones, or professional RS232/USB devices with external power supplies, ModemManager is able to prepare and configure the modems and setup connections with them.

If you are sure you will never use a Modem, run the following command to remove the modem completely:
sudo apt-get --purge remove modemmanager


How do I access shared folders on Ubuntu server from Mac OS?

I would go on the Mac to the net info then to machines and search for Ubuntu PC's name, copy that name, and use it instead of the IP address. In Finder do: Go -> Connect To and then smb://name/user or smb://` and type in your credentials.

Make sure the samba server (your Ubuntu server) is configured correctly:

Type the following:

 sudo gedit /etc/samba/smb.conf

Rename MSHOME to WORKGROUP or whatever your workgroup's name is.

Then go to the line where the security is defined and add ; at the beginning of the line.

Scroll to the bottom of the file and add/edit your shared folders as follows:

[<folder_name>]
path = /home/<user_name>/<folder_name>
available = yes
valid users = <user_name>
read only = no
browseable = yes
public = yes
writable = yes

Save and restart samba with:

sudo /etc/init.d/samba restart

or

sudo service smbd restart

depending on the version of Linux you're using.

If you haven't already done so, create a user with:

sudo smbpasswd -a yourname

Now go to the network settings and give your Server IP, subnet mask and gateway. You can then connect on the Mac as previously stated (Go -> Connect To -> smb://)

On the Linux box, you need to right-click whatever folder you want to share and go to Network Share or Properties and then click Sharing and click Share This Folder.

To test that your share is working correctly, type

testparm

and you'll see output similar to the following:

Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[printers]"
Processing section "[print$]"
Processing section "[<folder_name>]"
Loaded services file OK.
Server role: ROLE_STANDALONE

Lifted from instructions here and originally found here.

This worked on MacOS Sierra Version 10.12.


When I simply run Terminal and type php -f xxx.php it tells me that program php is currently not installed…

Which is correct. Please uninstall XAMPP and familiarize yourself with the LAMP stack that Ubuntu provides. This will automatically set up everything the way it was meant to be. The error message usually also tells you the package where you can find the program it it isn't currently installed, the PHP CLI program for example can be installed from the php5-cli package.


wget supports downloading more than a file with a single command. This means that you can take advantage of your shell features like so:

wget http://www.example.com/index.php?file={1..500}

If your URLs are in a file (one URL per line) or on standard input, you can also use wget's -i option.


How do I uninstall Ubuntu 14.04.3 LTS from my Dell Inspirion 15 7548?

The flash drive you used to install Ubuntu should have a live environment you can boot to.  This is the same environment you booted to in order to install Ubuntu in the first place.

There should be a utility (e. g. gparted) that you can use to remove the Ubuntu installation from the laptop.  Be sure not to remove the Windows partition if you still want to use that operating system.


Input language groups switching windows style

Script to switch to the next language group, or to the next language inside the current group, depending on the argument.

Preparation

In a terminal, run:

gsettings get org.gnome.desktop.input-sources sources

This will output something like (in my case):

[('xkb', 'us+intl'), ('xkb', 'us'), ('xkb', 'nl'), ('xkb', 'be')]

Now simply create a file inside your $HOME directory (exactly) named:

langsets

where you group the languages to your liking. In my example, I will group'us+intl' together with 'us', and 'nl' with 'be'. I group them by their order in the list, which results into a file:

content of the file ~/home/langsets:

 1 2
3 4

As you can see, on each line, I put the numbers of the index of the languages, separated by a space (where 1 is the first language in the output list).

You can set any combination of languages (as long as you don't place languages in multiple groups), and any number of language groups, simply create a new line with indices.
The script

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

arg = sys.argv[1]

key = "org.gnome.desktop.input-sources"

f = [f for f in [l.strip().split() for l in open(
    os.path.join(os.environ["HOME"], "langsets")
    ).readlines()] if f]

def get(cmd): return subprocess.check_output(cmd).decode("utf-8")

def execute(cmd):
    subprocess.Popen(cmd)

langs = ast.literal_eval(get(["gsettings", "get", key, "sources"]).strip())
currlang = str(int(get(["gsettings", "get", key, "current"]).split()[-1].strip())+1)

currgroup = [l for l in f if currlang in l][0]

if arg == "nextcurr":
    currsub = currgroup.index(currlang)
    try:
        nextlang = currgroup[currsub+1]
    except IndexError:
        nextlang = currgroup[0]
    nextlang = str(int(nextlang)-1)

elif arg == "nextgroup":
    try:
        nextlang = f[[i for i, l in enumerate(f) if f[i] == currgroup][0]+1][0]
    except IndexError:
        nextlang = f[0][0]

subprocess.Popen(["gsettings", "set", key, "current", nextlang])

Copy the script into an empty file, save it as language_set.py
Test- run the script with the two commands:

python3 /path/to/language_set.py nextgroup

an

python3 /path/to/language_set.py nextcurr

to see if the script (subsequently) moves to the next language group or to the next language in the current group.
If all works fine, create two keyboard shortcuts. One to switch to the next group, one to switch inside the current group.

Choose: System Settings > "Keyboard" > "Shortcuts" > "Custom Shortcuts". Click the "+" and add the commands below.

To change between language groups:

python3 /path/to/language_set.py nextgroup

To change between languages inside a group:

python3 /path/to/language_set.py nextcurr


I'm not sure of what is going on but I managed to remove the unsigned kernels by commenting out the line:

linux-check-removal $version

in the files

/var/lib/dpkg/info/linux-image-unsigned-4.16.5-041605-generic.prerm

and / or

/var/lib/dpkg/info/linux-image-unsigned-4.16.4-041604-generic.prerm

and then continuing with apt-get standard removal procedure (ukuu-gtk also works fine).


Unwanted startup page on Firefox keeps on coming back

Sounds like a session problem. Firefox can restore sessions with each start. So you might want to try this. You don't say which version it is so I'll give an answer how it can be solved in the version I use.

Go to: Options > General > When Firefox starts > change the option from “Show my windows and tabs from last time”. Now restart and the annoying tab should be gone All other tabs are gone too so make bookmarks if you want fo keep (some of) them.


Ubuntu Gnome creates ~/Videos, ~/Desktop and ~/Public every boot

You can disable this feature

system-wide: by editing the /etc/xdg/user-dirs.conf file and changing enabled=True to enabled=False.
per-user: by editing/adding the file ~/.config/user-dirs.conf to have the line enabled=False

Or if you only want to disable some of those directories but keep others then you have to edit the

/etc/xdg/user-dirs.defaults file for a system-wide solution. Just remove the lines you don't need. Or the
~/.config/user-dirs.dirs file for a per-user solution. Here to disable a directory point it to the user's home directory, e.g. XDG_VIDEOS_DIR="$HOME".

source: http://www.freedesktop.org/wiki/Software/xdg-user-dirs/


How to make windows transparent by default

NOTE: For those who interested on getting transparent window, you might want to install Compiz Settings and its plugins:
sudo apt install compizconfig-settings-manager compiz-plugins

Press Alt + F2, type ccsm on field to launch Compiz Setting.

On Accessibility section, click Opacity Brightness & Saturation plugin.

On the current tab, expand Window Specific Settings.

Click New button, then click + and Edit Match window will be appear.

On Type field, change value from "Window Class" to "Window Type". Then type "Normal" on Value field. Don't forget to click Add when you're done.

Back to edit window, you have to set your preferred opacity values, you can set the values from 0 to 100. Less values make the window more transparent, we'll use 80 for example.

Click Close then, as you can see there are new defined specific settings.

Before effect

After effect


How to share files on Virtualbox with Windows as a guest?

For 12.04+
The instructions in the link you provided are basically the same for 12.04. The menu are not the same and depend if you are running Gnome, Unity or something else but you can do it from command line with:
sudo adduser <your-user> vboxusers
Create the Ubuntu folder you want to share.
On the virtualbox part, it's the same: install virtualbox guest additions (from virtualbox menu inside the VM) and from the same virtualbox menu inside the VM, you can use the Shared Folder option to add the folder you created on the Ubuntu host.


Touchscreen tap counts as double left click on Ubuntu 18.04

Same here with a Dell 2314ht Touchscreen. It is correctly detected as an 'Advanced Silicon S.A.' device.
libinput debug-events detects the following sequence for a single tap: TOUCH_DOWN, TOUCH_FRAME, TOUCH_UP, TOUCH_FRAME. Seems ok, however not sure what the TOUCH_FRAME is about?

Like in your case, tapping on the left Ubuntu 18.04 starterbar, (e.g. the Apps button) generates two clicks:

First click on event TOUCH_DOWN
Second click on event TOUCH_UP

That is, if one touch-and-hold the Apps button, only one click is generated. When removing the finger another click is fired.

Anyway, far more interesting is that the behavior depend INTO WHAT FIELD one taps:

Using the onscreen keyboard to type a command into console, everything works fine
Using the onscreen keyboard to type a web-address into Firefox, every key needs to be pressed TWICE (loses every second tap)

libinput debug-events reports exactly the same sequence for all the above. Therefore, my best guess is that this issue is located 'above/after' libinput towards X.org.


How do I install browser plugins in a centralized way?

Firefox:

There is a clean way to do this by simply copying the Firefox profile from the ~/.mozilla/firefox directory of user1, which has made the profile ready (e.g. this is the account with Adblock, etc. installed) to the accounts of user2, user3, ... :

sudo mkdir -p /home/user2/.mozilla/firefox
sudo mkdir -p /home/user3/.mozilla/firefox
sudo cp -rv /home/user1/.mozilla/firefox /home/user2/.mozilla
sudo cp -rv /home/user1/.mozilla/firefox /home/user3/.mozilla
sudo chown -R user2 /home/user2/.mozilla
sudo chown -R user3 /home/user3/.mozilla

I tested this, and it worked. An alternative is to use Firefox Sync. However, that will keep all the Bookmarks and History the same if anything changes.

Chromium:

The same technique can be used with Chromium:

sudo mkdir -p /home/user2/.config/chromium
sudo mkdir -p /home/user3/.config/chromium
sudo cp -rv /home/user1/.config/chromium/Default/ /home/user2/.config/chromium
sudo cp -rv /home/user1/.config/chromium/Default/ /home/user3/.config/chromium
sudo chown -R user2 /home/user2/.config/chromium
sudo chown -R user3 /home/user3/.config/chromium

Chromium also has an option where you can sign in with your Google account and have all your settings, Bookmarks, and History sunc across your Chromium installations. However, as with Firefox, this might not be applicable to your needs.


Why would you want wubi. It is now being discontinued. Also any abnormal shutdown may totally erase wubi as it is just a large file inside a NTFS formatted partition. Ok for testing but any long term use may lead to issues.
Why not use USB flash drive as a persistent install or if larger a full install?

wubi direct boot where hd0 is boot drive, yours should be different, and it is in partition 2 which may als be different. So both hd0,2 and sda2 must change. May be sdb1 and hd1,1 if you only have one other drive. Boot drive is always hd0, but other drives usually are in BIOS order.

Not sure if this works when inside Windows or not. More to boot wubi when in its own partition.

menuentry "Wubi" {
insmod ntfs
set root=(hd0,2)
loopback loop0 /ubuntu/disks/root.disk
set root=(loop0)
linux /vmlinuz root=/dev/sda2 loop=/ubuntu/disks/root.disk ro       quiet splash
initrd /initrd.img
}

Really old info on caveats:
Posts by meierfra. to use grub2 to directly boot wubi

http://ubuntuforums.org/showthread.php?p=8903013


Regarding why your date format was changed, this Ubuntu Forums thread entitled "I upgraded, and now I have this error..." might be enlightening.  Here's the executive summary: operating systems are complicated beasts, and any process that promises to upgrade the OS automatically has a high likelihood of causing problems, because the process is huge and complicated, and impossible to test on every variation of hardware that people run Ubuntu on.  This problem is by no means unique to Ubuntu; once I ran a script that promised to upgrade a computer from Windows Vista to Windows 7, and it crashed and burned and left the system unusable.  (And that script was written by the maker of the computer, for just that model.)  I would think that a majority of experienced Ubuntu users don't bother with the automatic upgrade, but rather copy their personal files off (or use a separate partition for /home), wipe the Ubuntu partitions, and do a fresh install of the newer version.  That process is a pain, but it bypasses so many potential problems.

So now you know.  In your case the script probably ran into a problem before it got around to setting the date format to the way you had it before.  If your date format is the only thing that was messed up, then you're fairly lucky.  I have one computer that I've updated automatically about three times, and it wants to fire off three or four error reports every time it boots.


To change the python version for your terminal session you can create an alias in your .bashrc file then re-login.

alias python='/usr/bin/python3.4'

The link to the following article provides detailed instructions to change to an alternate Python version per user session.


Use Xubuntu 14.04 or Lubuntu 14.04. They use less system power and deliver good performance. Installation process is same as ubuntu. You are going to need:

An empty drive apart from you XP installation (min. space = 20GB
recommended)
ISO image of the OS.
Unetbootin software and a USB drive of 2GB or more.

Install guide (process remains same):


Why isn't my Used + Avail equalling the total space in my partition?

Two hypotheses:

The difference between GB and GiB: the xB prefix are power of 10, while the xiB prefixes are power of 2^10 (1024). So, 1 KiB = 1.024 KB, etc ... and 1GiB = (1.024^3) GB
You need also to know that some "emergency" space is reserved for root. See for example https://unix.stackexchange.com/questions/7950/reserved-space-for-root-on-a-filesystem-why

Best regards.


Rhythmbox controls are missing from the SoundMenu

Make sure you have package rhythmbox-plugins installed. It contains MPRIS support which is vital for Sound Menu to work. After the package is installed, launch/restart Rhythmbox. Controls should appear in Sound Menu then.

You can find this package in Ubuntu Software Center:

Or you can install it through terminal using this command:

sudo apt-get install rhythmbox-plugins


SSLLoadSharedLibrary: Failed to load library libcrypto.so.0.9.8

I just ran into this problem myself.  The vmware-vdiskmanager needs i386 libraries.

sudo aptitude install libssl0.9.8:i386

If that by itself doesn't solve the problem, look at other related i386 libs.

Shane


This worked finally (in terminal type):

mv ~/.local/share/Steam/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu/libgcc_s.so.1{,.disable}
mv ~/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libstdc++.so.6{,.disable}
mv ~/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/lib/x86_64-linux-gnu/libpcre.so.3{,.disable}
mv ~/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/lib/x86_64-linux-gnu/libpcre.so.3.12.1{,.disable}


Does Ubuntu provide extra fonts through a font package?

Yes.

In a terminal...

apt-cache search font

will yield all results. Or...

apt-cache search font | grep ttf

will yield a list of TrueType fonts. You could save the output to a file to examine it:

apt-cache search font | grep ttf > ttf_font_packages

If you wanted 465 free TTF fonts in the ttf-aenigma package and the tuffy font after reading the output, then:

sudo apt-get install ttf-aenigma fonts-tuffy

Aside from packages, you can create a directory for your own fonts.

cd
mkdir .fonts

Then, drop as many fonts as you like into that directory (~/.fonts).
You've also got some graphical software selection tools available if you do not like the terminal.


Ok I solved it. Disable hibernate in Windows,  disable fast boot, then go in to grub, choose kernal, press e, then at the end of the Linux boot instructions type
"nvme_core.default_ps_max_latency_us=5500" "idle=nomwait"


Newbie question...My Intel DZ77BH-55K came with a windows express installer disk

I found a post that may interest you, have a look at it maybe you will find answers :
How do I enable the Nvidia Geforce GTX 570?


Ubuntu 13.04: Can't login using Ubuntu(Default) session. Stuck in login loop

You seem to have done all the hard work of diagnosing the issue: /usr/bin/gnome-session needs to be executable

sudo chmod +x /usr/bin/gnome-session

However I strongly advise you to investigate how the permission got changed, and whether there are other system files that have been affected.


Errors "*ERROR* UVD not responding, trying to reset the VCPU!!!"

I had a very similar problem and fixed it by editing the default grub file with

  sudo nano /etc/default/grub

and changing the line

  GRUB_CMDLINE_LINUX=""

to

  GRUB_CMDLINE_LINUX="radeon.modeset=0"

then saving the file and updating the grub with

  sudo update-grub

and rebooting.  If the above does not work then perhaps try out changing the

  GRUB_CMDLINE_LINUX="radeon.modeset=0"

to

  GRUB_CMDLINE_LINUX="nomodeset"

.
And check the dmesg log for errors with

 dmesg | grep radeon

if the above methods work just to make sure everything is Ok.


Use MATE Tweak to change the Window Manager to "Marco with Compton" or "Compiz", both of those remove screen tearing.


No, dpkg only installs a package, so doing dpkg -i packageName.deb will only install this Deb package, and will notify you of any dependencies that need to be installed, but it will not install them, and it will not configure the packageName.deb because well...the dependencies are not there.
apt-get is a Package Management System that handles the installation of Deb packages on Debian-based Linux distributions. A Package Management System is a set of tools that will help you install, remove, and change packages easily. So apt-get is like a clever dpkg.
I like to think of the timeline this way (the following is just me speaking from experience. It is meant to only give you an idea of this whole thing):

They came up with a way to "store" the files of an application in a "package" so that it can be easily installed. So, the Deb package (.deb extension file) was born.

A .deb file contains the files needed by an application to run, as well as (I like to call it) "meta-data" that holds other information, such as the names of the dependencies the application needs. If you want to see the contents of a .deb file, you can use the command dpkg -c packageName.deb, and if you want to see this "meta-data" information, use the command dpkg -I pacakgeName.deb (and if you want to only see the dependencies, do dpkg -I packageName.deb | grep Depends).

They needed a tool to install these .deb files, so they came up with the dpkg tool. This tool, however, will just install the .deb file, but will not install its dependencies because it doesn't have those files and it does not have access to "repositories" to go pull the dependencies from.

Then, they came up with apt-get, which automates the problems in the previous point. Underneath the hood, apt-get is basically dpkg (I like to think of it as apt-get being a front-end for dpkg), but a clever one that will look for the dependencies and install them. It even looks at the currently installed dependencies and determines ones that are not being used by any other packages, and will inform you that you can remove them.

aptitude then came along. It uses the libraries apt-get uses and actually has an interactive UI (user interface). If you want to see this UI, simply type aptitude in the terminal. That's aptitude. It leverages the libraries to provide more options and perks than apt-get. For example, aptitude will automatically remove eligible packages, while apt-get needs a separate command to do so. But, in the end, doing sudo aptitude install packageName.deb should at least be the same as sudo apt-get install packageName.deb. There might be subtle differences here and there that I do not know about, but they will both look for the dependencies and do all that stuff. You can read the answer here for more information on the differences between aptitude and apt-get.
Also, aptitude does not have Super Cow Powers.

EDIT: Apparently, it does. aptitude -v[v[v[v[v]]]] moo.

aptitude might not be installed by default. To install it, do sudo apt-get install aptitude or click this: aptitude .

Extra

The following information doesn't really directly answer "What is the difference between dpkg and aptitude/apt-get?" but it contributes to the big picture.

From Carlos Campderrós' comment below:
gdebi is another tool that is kind of a mixture between apt-get and aptitude. When you use it to install a .deb package (gdebi packageName.deb), it will identify the missing dependencies, install them using apt-get, and then finally install and configure the package using dpkg. It even has a simple and neat GUI that gives you information about the .deb package, the files included in the package, and what dependencies need to be installed. To see this GUI, you would do gdebi-gtk packageName.deb. You can give gdebi a try by installing it with sudo apt-get install gdebi or click this: gdebi .

I don't want to confuse anyone, but just to give you another part of the picture, there is another popular Linux package format called RPM, and its files have the .rpm extension. This package format is used on RPM-based Linux distributions (such as Red Hat, CentOS, and Fedora). They use the command rpm to install a package, and yum is the front-end for it, it's the clever one. So their .rpm files are our .deb files, their rpm tool is our dpkg tool, and their yum is our apt-get.
From Paddy Landau's comment below:
alien is a tool that converts between .rpm and .deb packages. So if you ever fall into the situation where you have an .rpm package, and you want to install in on your Ubuntu (or any other Debian-based distro), you can use the command alien rpm_packageName.rpm to convert it to .deb, and then install it using dpkg. You can do the reverse (convert .deb to .rpm) using alien -r packageName.deb.


Installation Problems Acer 4750G Ubuntu 12.04 Dual Boot

Just try this and it will probably work: https://help.ubuntu.com/community/Boot-Repair


I get "dpkg-query: no path found matching pattern" How to solve this?

Installation generated files are a common cause for this error message, as mentioned at: https://unix.stackexchange.com/questions/159001/how-to-find-the-package-that-installed-a-comand-if-dpkg-s-finds-no-path-beca

For example, /bin/nc appears when you install the package netcat-openbsd.

But upon:

dpkg -S /bin/nc

we get dpkg-query: no path found matching pattern /bin/nc.

This happens because /bin/nc is generated by the update-alternatives call in the postinst script that gets run after installation.

It works like this because another version of /bin/nc is provided by the netcat-traditional package.

I don't think there is a general way of finding such generated files. In the specific case of alternative symlinks, we can just follow the link with readlink -f:

dpkg -S "$(readlink -f /bin/nc)"


How to forbid a specific package to be installed?

As in Debian we can use apt-pinning for version and installation control in Ubuntu too.

To block the installation of a given package we may put the following lines in /etc/apt/preferences

Package: <nameofpackage>
Pin: origin ""
Pin-Priority: -1

By giving a negative priority for this pin we will block the installation of <nameofpackage> from not further specified origin, i.e. our local repository. Of course we can use apt-pinning to pin a certain package version or specific origin.

Before you proceed it is strongly recommended to read the documentation given above and the manpage from apt_preferences because errors in these files are not checked by apt and if they occur may break your package management.

For an alternative, and to prevent updating of a given package see:

How to prevent updating of a specific package?


How to get the MD5 hash of a string directly in the terminal?

You can also say something like this :

~$ echo -n Welcome | md5sum
83218ac34c1834c26781fe4bde918ee4  -

It basically does the same thing as described by @enzotib, but is perhaps a bit simpler.


Conky system temperature monitoring, execigraph empty

I got it working surrounding the command to execute with " ", here below my usage as example:

${execgraph "sensors | grep 'Core 0' | awk '{print $3}' | cut -b2,3"}

It worked fine with both execgraph and execigraph; additionally, remember to set your default graph size, for example: default_graph_size 175 25 .


USB keyboard still doesn't work in Server installer

Lol i also use DELL USB Keyboard in ubuntu and it wors flawlessly
I think the first step to solving the problem would be listing the make and model of your laptop.
If it is hardware failure the only way I know would be to run:

Code:

Memtest


What is "STRING" and "+%s" in this script using the date command?

You find it a bit below in man date:

  DATE STRING

  The  --date=STRING  is  a  mostly  free format human readable date string such as "Sun, 29 Feb 2004 16:21:42 -0800" or "2004-02-29 16:21:42" or even "next Thursday".
  A date string may contain items indicating calendar date, time of day, time zone, day of week, relative time, relative date, and numbers.
  An empty string indicates the beginning of the day. The date string format is more complex than is easily documented here but is fully described in the info documentation.

To get to know what exactly is allowed and what not, you can read the info documentation.

So, run info date and switch to "Date input formats".

Regarding +%s see the Synopsis:

date [OPTION]... [+FORMAT]

with FORMAT being a long number of possible sequences, so here just the one you need:

%s     seconds since 1970-01-01 00:00:00 UTC

The + is just part of the syntax.

Additionally, some good reading:  How can I get help on terminal commands?


How do I automatically restart docky after a crash?

First off, I'm not using docky. But I'm assuming docky is in your $PATH. If not, then specify the full path to the binary.

Here is the awesome use of Bash:

Start off with a file, such as (vim instead of gedit if you want):

gedit ~/process_monitor.sh
Type the following:

#!/bin/bash

if [[ -z "$1" ]];then
    echo "ERROR: must specify program"
    exit 1
fi

while (( 0 == 0 ));do
    $@ &
    pid=`jobs -l | awk '{print $2}'`
    wait $pid
done

Save the file.
Set the permission:

chmod a+x ~/process_monitor.sh

Now you can run a program like so:

~/process_monitor.sh docky

and it'll launch the program once, and make sure to restart the program if you ever choose to quit it or it chooses to crash.

To add an entry to system startup so it launches the program once you logged in and won't stop until you quit, do this:

Go to Unity Dash, type and look for "Startup Applications"
Click Add
Name: Docky or whatever you like
Command: /bin/bash ~/process_monitor.sh docky
Comment: Whatever you like

Make sure the new entry is checked. Log back out and in and you see docky all the time.


If you want to keep the assignments in a separate env_var file, you would need to source it from one of your shell's startup files, rather than adding it to your PATH

For example, you could add something like

if [ -r "$HOME/Django_projects/lotus/env_var" ]; then
  . "$HOME/Django_projects/lotus/env_var"
fi

to the bottom of your ~/.profile

I don't recommend adding it to a system-wide file such as /etc/profile since the file is in your home directory.


How to set up a cron job to run every 10 minutes?

Make the script executable by:

chmod u+x /path/to/script.py

Note that, you need a shebang (i.e. indicate interpreter in the first line of the script), for python2:

#!/usr/bin/env python2

For python3:

#!/usr/bin/env python3

Open your cron table by

crontab -e

Add the following cron entry:

*/10 * * * * /path/to/script.py

Note that, if the script is not executable you can indicate the interpreter on the go:

For python2:

*/10 * * * * /usr/bin/env python2 /path/to/script.py

For python3:

*/10 * * * * /usr/bin/env python3 /path/to/script.py


Sharing folder with VM through libvirt, 9p, permission denied

I know, that this is an old thread, but I just came across a similar problem and found a solution that works at least in parts.

I also changed the user and group values in /etc/libvirt/qemu.conf to root, like you did.
But I also changed the dynamic_ownership setting, because the description sounded promising:

  # Whether libvirt should dynamically change file ownership
  # to match the configured user/group above. Defaults to 1.
  # Set to 0 to disable file ownership changes.

My setup is:

Host:  Debian 8 (Jessie)
Guest: Debian 8 (Jessie)
shared folder on host belongs to root
local user w/ id 1000 is member of the group libvirt (might be important)
mount point on the guest (/mnt/data) belongs to user 1000 ("alexander")

I can now finally write files in the mounted shared folder with both root(0) and alexander(1000). (before I did that, only root was allowed to write files here)

Setting dynamic_ownership to 0 is what has to be done in "mapped" accessmode.

Here's some more information about my setup:

/etc/libvirt/qemu.conf:

user = "root"
group = "root"
dynamic_ownership = 0

filesystem (virsh edit):

<!-- ... -->
    <filesystem type='mount' accessmode='mapped'>
      <source dir='/share/vm.localdomain/owncloud_data'/>
      <target dir='/data'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
    </filesystem>
<!-- ... -->

Host:

ls -al /share/vm.localdomain/owncloud_data/
total 8
drwxr-xr-x 2 root      root      4096 Sep  8 00:15 .
drwxr-xr-x 7 root      root      4096 Sep  8 00:10 ..

fstab on guest:

/data  /mnt/data/  9p  trans=virtio  0  0

Guest:

root@debian:~# cd /mnt/data
root@debian:/mnt/data# touch touched_by_root
root@debian:/mnt/data# su - alexander
alexander@debian:~$ cd /mnt/data
alexander@debian:/mnt/data$ touch touched_by_user
alexander@debian:/mnt/data$ ls -al
total 16
drwxr-xr-x 2 alexander alexander 4096 Sep  8 00:30 .
drwxr-xr-x 6 root      root      4096 Sep  7 18:13 ..
-rw-r--r-- 1 root      root         0 Sep  8 00:30 touched_by_root
-rw-r--r-- 1 alexander alexander    0 Sep  8 00:30 touched_by_user

back on host:

root@Host /share/vm.localdomain # ls -al /share/vm.localdomain/owncloud_data/
total 16
drwxr-xr-x 2 root      root         4096 Sep  8 00:30 .
drwxr-xr-x 7 root      root         4096 Sep  8 00:10 ..
-rw------- 1 root      libvirt-qemu    0 Sep  8 00:30 touched_by_root
-rw------- 1 root      libvirt-qemu    0 Sep  8 00:30 touched_by_user

conclusion

The strange thing is that on the guest these two files belong to different users (root vs. alexander), whereas on the host, both files belong to the same user (root:libvirt-qemu). :-O
I don't know exactly how this magic works, but apparently it does.

Hope this helps,
Alexander


How can I make the Wubi installation partition bigger?

Is this not the moment to install Ubuntu at is own partition, this meanes migrate your wubi install to a partition.  You can find here all the necessary: http://ubuntuforums.org/showthread.php?t=1519354 .  I would recommend it.


No Wi-Fi Adapter Found - Ubuntu 18.04.4 LTS

Pages 24-25 of your manual https://dlcdnets.asus.com/pub/ASUS/nb/X409FA/0409_E15108_X409_X509_A.pdf shows there's a USB-C port. If one came with the PC, please connect the USB-C to Ethernet adapter to that port and use that to connect to your wired network to get drivers.


Can I create two different profiles for one wifi network?

You need to directly manipulate the Network Manager config files.

Start by copying the file for the profile you want to duplicate:

$ cd /etc/NetworkManager/system-connections
$ ls
My Wifi Connection  My VPN  Some Other Connection
$ sudo cp "My Wifi Connection" "My Wifi Connection 2"

You need to change a few things in the new config file for it to work properly. Firstly, the name. If you look inside the config file (you need sudo for this), you'll see it starts with something like:

[connection]
id=My Wifi Connection
uuid=a66c4104-742c-11e7-a31d-973b9fb99e77
type=wifi

Edit the file (with sudoedit) to change the name to something different eg. "My Wifi Connection 2" or whatever makes it special eg. "My Wifi Connection (special DNS)".

Secondly, it needs a distinct UUID. The problem is, since you just copied this, the "unique" identifier is shared by two connections. Generate a new UUID like so:

$ sudo apt install uuid
$ uuid
bd52b27c-742c-11e7-82d3-c3bd07dba910

...and replace the UUID in the new config file with this.

Restart Network Manager so it sees the new config:

$ sudo systemctl restart NetworkManager

Now for using it — you'll need to change connections via the command line, because Gnome doesn't this situation.

To turn off your existing connection, do:

$ sudo nmcli connection down "My Wifi Connection"

To turn on the new connection, do:

$ sudo nmcli connection up "My Wifi Connection 2"

If you named the connection inside the config file something different from the filename, use the name inside the config file.


If you need to reconfigure an already configured package, just use dpkg-reconfigure, e.g.

sudo dpkg-reconfigure gconf2

dpkg --configure is only intended for first-time-configuration of a package, therefore the error-message.


Pulse audio and connection refused in openbox in Ubuntu 16.04

My qt app tried to play mp3 files in openbox but it gives gstreamer and pulseaudio related error.

So I decided to start my app in openbox and  when it just try to rum mp3 files then my app switches from openbox window manager to ubuntu desktop ( because as I mentioned in my question when I do the same process in gnome-desktop session (instead of the openbox session) then it works fine and my app play the mp3 file without any issue)  and it gives me the above mentioned error.

So I have started thinking in  direction of "Pulse audio manager error".  But during debug I found that the issue in switching from openbox to ubuntu desktop and it causes the above error.

So I run the below set of commands and repeat the same set of command 4-5 times in my qt program and it resolved my issue. Here 'nw' is nodejs program and lighttpd it web server.

pkill -f lighttpd

pkill -f nw

openbox --exit

And now my app start in openbox and before playing mp3 files it switched into ubuntu deskop and play mp3 files without any issue and error.

NOTE : My app started lighttpd and nw. So if my app does not kill lighttpd and nw (in case of above error) then the error persists. That is why my app is killing the lighttpd and nw to resolve the error.


The fix is to run this command as any user where you need this, including root if for instance you do gksudo to run something under root for a certain requirement you might have.

gtk-theme-switch2

I opened this and then applied the Adwaita theme. Instantly, lxpanel showed the icons I needed.

If you don't have this command, check to see if you can add it with apt-get update; apt-get install gtk-theme-switch2. This edits the .gtkrc file, which is an old GTK2 holdover, and since lxpanel is written in GTK2 instead of GTK3, it pulls from this. Previously I had this styled with the lxappearance command, but then that screws up the lxpanel's icons for some strange reason.


This error is a bug in the f.lux application.

Drag the f.lux notification window out of the way, fill in your longitude and latitude or zipcode on the f.lux preferences screen, and click the Close button on the preferences screen. After that click the OK button to close the f.lux notification window.

If that doesn't work try closing the notification window by clicking on the X.

If that doesn't work uninstall f.lux, reinstall it, and try again. Be careful filling in the preferences screen. If you make a mistake, f.lux won't let you change it without uninstalling and reinstalling the application.


gnome-session-flashback : Desktop icons disappear after opening File Explorer

So if anyone is having this issue, it's because his Nautilus is opening up with --no-desktop flag. Most probably it's an icon or link created by yourself and upon editing it's properties you can remove the flag to make it work so that desktop icons don't disappear anymore.


run sudo apt-get install libapache2-mod-php7.0


First of all you should update your list of packages.
sudo apt-get update

Thereafter try to install the packages one by one on the terminal:
sudo apt-get install xxx

Where xxx are the packages in your question.
If you haven't installed proper authentication keys look at:
https://help.ubuntu.com/community/Repositories/Ubuntu
Under headline "Authentication Tab" you can find the way to install them or restore the default ones.


Computer hanging when booting Linux 5.4.2

If you are compiling the kernel yourself, you are pretty much venturing on your own. You may receive assistance only from the few most technical savvy users among us.

Your system will probably run just fine if you revert to the supported kernel that comes with your Ubuntu distribution.


How to remount a pen drive after having it "Safely Removed"

The USB design does not let you. Safely remove cuts the power to the device so there is no way to remount it until you replug it or reboot your system.

If it is not shown with ...

ls /dev/disk/by-id

it is gone.

Also found this one:

How to re-mount a USB stick after unmounting from Nautilus without disconnecting it?


Updated from 16.04 to 16.10; the keyboard and mouse no longer works after getting to the lock screen

I had the same issue today and found this bug report.

The problem seems to be, that during update process they forget to install/update the package xserver-xorg-input-all!

So these instructions worked for me on my thinkpad p51s notebook with a little modification:

Press a Shift key during boot to get the GRUB menu.
In GRUB, select Advanced Options, then the first kernel with the recovery mode.
Select "Network" to get network access (needed for package installation)
Select "Drop to root shell"
Press Enter to confirm.
On my system not needed because, the filesystem was mounted rw, but if needed then mount -o rw,remount /.
Install the needed package: apt install xserver-xorg-input-all (and the message that they need to uninstall 16.04 packages!)
Press Ctrl+D to leave the root shell.
Select resume boot from the menu.
Now I could only log into console.
sudo reboot

After reboot my ThinkPad's mouse and keyboard and the external mouse and keyboard worked fine!


You can increase volume by cliciking "Allow more that 100% at

System Settings -> Sound


Maybe TeamViewer? I've used this in the past as it is one of the few desktop sharing suites that works on Linux.


Why is .vimrc not changing the appearance of vimtutor?

From man vimtutor:

Vim is always started in Vi compatible mode.

From man vim:

-C    Compatible.  Set the 'compatible' option.  This will make Vim behave mostly like Vi, even though a .vimrc file exists.

So when you start vimtutor, it starts in compatible mode, which ignores your vimrc file.

The meat of vimtutor is really just a text file, though.  Nothing special about it, other than the fact that (a) it makes a copy of the tutor file so it can be modified without changing the original file, and (b) it always starts in vi compatible mode.

If you want to open the tutor text file (a copy of it) using your vimrc settings instead of with vi compatible mode, run vimtutor, then type :w myvimtutorfile to save the text file in your current directory.  Next, enter :q! to exit vimtutor, and then at the command line enter vim myvimtutorfile, and you should see your .vimrc settings take effect.


According to the NVIDIA readme in /usr/share/doc/nvidia-current/README.txt.gz this card is supported (From Appendix A:)

A1. NVIDIA GEFORCE GPUS

NVIDIA GPU product                    Device PCI ID*     VDPAU features
----------------------------------    ---------------    ---------------

GeForce GT 220M                       0x0654             A
GeForce GT 220                        0x0A20             C

So after you install the Additional drivers tool will prompt you asking to install these drivers and then you should be set.


How to attach new EBS volume to Ubuntu machine on AWS?

The devices are named /dev/xvdX rather than sdX in 11.04. This was a kernel change.  The kernel name for xen block devices is 'xvd'.  Previously Ubuntu carried a patch to rename those devices as sdX.  That patch became problematic.

You could, if you really wanted, run your own kernel with a patch applied.
bug 684875 has more information on why this was changed.

So, to answer your question, attach it /dev/sdb, it will appear as /dev/xvdb.


GNU-Octave won't install because of package conflicts

You must install dependencies before installing octave.
A dependency is a file that something you are trying to install requires for it's operation.

So, to install all the dependencies OCTAVE requires, follow these steps

Open terminal.
Type sudo apt-get build-dep octave.
Enter password and follow instructions.

This will install all the dependencies that octave requires. Source - here.

After this Go to software center and install octave.
Hope it helps!


Ogg Vorbis is a superior format for many reasons, not only being an open, royalty-free, patent-free standard. Just to name a few technical aspects, it has native metadata support, gapless play and multichannel, unlike MP3's ID3v1/v2 tags (v2 has no standard at all), player hacks to mitigate gaps (try listening to a live album) and 2 max channels (stereo). So MP3 is inferior in every way... its only "advantage" is being there several years first, got massively widespread, so any digital player (including car players, portable players, dvd players) can read it.

But, as for converting your MP3 to OGG... do not do this!

Transcoding to a lossy format will not improve its quality in any way... in fact, it may decrease quality! Both MP3 and Vorbis encoders are lossy, meaning they achieve high compression ratios by throwing away inaudible parts of the audio waveform. However, the MP3 and Vorbis codecs are very different, so they each will throw away different parts of the audio. The degraded quality may or may not be perceivable for a single conversion, but it will add up for each transcoding.

But if you have a lossless source (either FLAC, WAV, CD-Audio), and you want to convert from that to a smaller, lossy format, and you don't mind about portability (ie, you mostly in PC or in players that support it), go ahead and use ogg. It is superior than MP3.


I just found another solution: sudo /etc/init.d/dbus start, that works and starts the dbus system succesfully.


To show events from keyboards, but also other input devices, there is also evtest.
It can not create keypresses in itself, but see below.

It shows events on a lower level than xev would, for example.

Also, it shows which events can be created by the device.

As it happens, event4 refers to my main keyboard.

So I create the example output below with the command

sudo evtest /dev/input/event4

and pressing aB:

[ ... ]
Event: time 1429316964.681508, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70004
Event: time 1429316964.681508, type 1 (EV_KEY), code 30 (KEY_A), value 1
Event: time 1429316964.681508, -------------- SYN_REPORT ------------
aEvent: time 1429316964.761540, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70004
Event: time 1429316964.761540, type 1 (EV_KEY), code 30 (KEY_A), value 0
Event: time 1429316964.761540, -------------- SYN_REPORT ------------
Event: time 1429316965.385461, type 4 (EV_MSC), code 4 (MSC_SCAN), value 700e1
Event: time 1429316965.385461, type 1 (EV_KEY), code 42 (KEY_LEFTSHIFT), value 1
Event: time 1429316965.385461, -------------- SYN_REPORT ------------
Event: time 1429316965.577461, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70005
Event: time 1429316965.577461, type 1 (EV_KEY), code 48 (KEY_B), value 1
Event: time 1429316965.577461, -------------- SYN_REPORT ------------
BEvent: time 1429316965.641460, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70005
Event: time 1429316965.641460, type 1 (EV_KEY), code 48 (KEY_B), value 0
Event: time 1429316965.641460, -------------- SYN_REPORT ------------
Event: time 1429316965.713470, type 4 (EV_MSC), code 4 (MSC_SCAN), value 700e1
Event: time 1429316965.713470, type 1 (EV_KEY), code 42 (KEY_LEFTSHIFT), value 0
[ ... ]

(To find the right event number (like my event4), you could look at cat /proc/bus/input/devices. The Name may not refer to a keyboard, but look for the entry Handlers containing sysrq kbd and leds.  Or just try them all.)

Keypress events can not be created by evdev, but there is an implementation of a key remapping using evdev that can create new events,
It seems to match what you are looking for:

At Home Modifier by Evdev (ahm or at-home-modifier-evdev):

  It enables for example "Space/Shift dual role key." When you press the
  Space key alone, it's a space; but when you press it with another key,
  it's a shift. E.g., space + x = X, roughly speaking.

  Any pairs of keys are possible. For example you can turn your Left Alt
  into BS/Alt in addition to Space/Shift. In this example, Space
  followed by LAlt sends Shift + BS, LAlt followed by Space does Alt +
  Space, and Space + LAlt + x and LAlt + Space + x is Alt + Shift + x.

  It's a fork of Xorg "evdev" driver [  ...  ]

It does not claim to be a clean implementation - but that does not prevent to learn from it.


Dell XPS 15 9560 Ubuntu 18.04 touchpad fixing

How can I install synaptics only for the touchpad in Wayland?

You can't.

Oddly, I can't find elaborate links to libinput vs synaptics comparison, but the gist was that synaptics couldn't work under Wayland for some architectural reasons.

libinput was created as a solution (and as I vaguely remember from whot's articles, another reason was that synaptics driver was full of legacy cruft and unclear code paths). Later, in order to α) reduce maintainance, and β) increase coverage of actual users, X11 got xf86-input-libinput driver, as a replacement to xf86-input-synaptics. And then, after some maturing, the later got deprecated.

  Would it be easier/better experience if I switched to X? Could there be downsides to not using Wayland?

I assume this question focused specifically on input, since by now there's too many posts/discussions for "Wayland vs X11" in general.

So, if you mean "switching to X11 and still using libinput", then, with regard to input, the only difference I can think of is that you can use DE-independent xinput on X11. But that's it.

Side notes:

It's usually nice to use the latest libinput version. E.g. as a MacOS user you might enjoy recently added horizontal/vertical scroll-lock (but ATM it's only available in git; it will be part of 1.12 release).
if you find any problems or have suggestions for improvement, you can report them.
Just in case, don't confuse xf86-input-synaptics with the device driver.


Must boot through recovery mode - new Nvidia drivers installed

I found a way to fix this.

Originally I was running a shell script at boot to re-assign update alternatives. For example..

sudo update-alternatives --set x86_64-linux-gnu_gl_conf /usr/lib/nvidia-352-prime/ld.so.conf
sudo update-alternatives --set i386-linux-gnu_gl_conf /usr/lib/nvidia-352-prime/alt_ld.so.conf

For a separate reason I needed to have a newer kernel so I downloaded the wily 4.2 kernel to my 14.04 system and I noticed I didn't have to run that script any more.

I think this may be that installing this kernel forced rebuilding.  I also noticed a DKMS error as well.  Obviously this isn't the exact reasoning to the error as I haven't had a chance to investigate it completely.

Perhaps re-installing the kernel and headers might help, or even trying to install the wily kernel.  It does have some new upgrades.

You can see the all the options for kernels by searching the repos like so.

apt-cache search linux-image
apt-cache search linux-headers


Use Respin which is a current fork of Remastersys Packages and [source code] 3 is available for Ubuntu 14.04 through 16.04 versions of Ubuntu. Now that Yakkety is frozen I would expect a package for that to be available soon as well.
The below is the process I used to install respin in Xenial (16.04)
Respin depends on xresprobe  and isolinux neither is available in the repositories so we will have to add a couple of PPA'S, update the package list, and install them.
sudo add-apt-repository ppa:sergiomejia666/respin
sudo add-apt-repository ppa:sergiomejia666/xresprobe
sudo apt install xresprobe
sudo apt install respin

Further research indicates that we also need isolinux
sudo apt install isolinux

I decided to go with the live system (the script provides other options as well, but the live system with installer seemed more useful to me) respin without any parameters will provide   the following output:
Examples:

   sudo respin backup   (to make a livecd/dvd backup of your system)

   sudo respin backup custom.iso
                        (to make a livecd/dvd backup and call the iso custom.iso)

   sudo respin clean    (to clean up temporary files of respin)

   sudo respin dist     (to make a distributable livecd/dvd of your system)

   sudo respin dist cdfs
                        (to make a distributable livecd/dvd filesystem only)

   sudo respin dist iso custom.iso
                        (to make a distributable iso named custom.iso but only
                         if the cdfs is already present)

   cdfs and iso options should only be used if you wish to modify something on the
   cd before the iso is created.  An example of this would be to modify the isolinux
   portion of the livecd/dvd

Next we need to setup our respin
sudo respin dist cdfs (to make a distributable livecd/dvd filesystem) which we will use to create a custom ISO
This will be a fairly time consuming process (ETA dependent on hardware)
At this point we can modify the isolinux portion of the if the live media to our liking.
And now for the creation of the ISO
sudo respin dist iso custom.iso

Note:
As my 16.04 system has a number of additions/modifications and several VM's the resulting image is quite large.
Making custom.iso a hybrid iso
isohybrid: Warning: more than 1024 cylinders: 2547
isohybrid: Not all BIOSes will be able to boot this device
Creating custom.iso.md5 in /home/respin/respin
/home/respin/respin/custom.iso which is 2.5G in size is ready to be burned or tested in a virtual machine.

Launch  Startup disk Creator and select your custom.iso file and target location.(I used a 4GB Flash drive)
the custom.iso file will be found in the /home/respin/respin directory.
The resulting image works as expected. The stopper for Yakkety is that as of this wrinting, I can't find an installation candidate for xresprobe Perhaps you could build from source or wait. Personally I've found that most developers seem to focus on LTS versions. This makes sense to me as it doesn't seem very efficient to expend a great deal of effort on a 9 month release.
EDIT: The latest published respin deb package for Ubuntu can be found here.


No Internet Access after restarting System in Ubuntu 18.04.2 LTS

For Ubuntu Desktop, the dns client setup should be done via network manager
You have to revert modifications in resolv.conf then setup the dns servers in the gnome-control-center

In the file /etc/resolv.conf replace the two lines

nameserver 8.8.8.8
nameserver 8.8.4.4

by the original

nameserver 127.0.0.53

Then, setup DNS servers in the Gnome Control Panel, WIFI section

# the panel can be opened with the command line or the gui
gnome-control-center wifi

Find your Wifi SSID, hit the cog, go to IPv4 tab
In the DNS section, switch Automatic to OFF. Enter the IP address of the DNS servers you want to use like this 8.8.8.8, 8.8.4.4


You should just remove xserver-xorg-video-intel.
had the same issue with almost the same model, I've i5, and followed up this link(was searching about two weeks for the solution)
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1798961/comments/83
I think in the beginning I hadn't these drivers installed, it was just my searching of improvements and setting up env.
since I followed this recomendation there is no one freeze at all.
thanks to all for voting for delete my answer


How to set up virtual hosts for sites in each user's directory

What you want is called "virtual mass hosting", and Apache has documentation about it.


What is the difference between 'su -' , 'sudo bash' and 'sudo sh'?

Background

In Linux (and Unix in general), there is a SuperUser named Root. The SuperUser can do anything and everything, and thus doing daily work as the SuperUser can be dangerous. You could type a command incorrectly and destroy the system. Ideally, you run as a user that has only the privileges needed for the task at hand. In some cases, this is necessarily Root, but most of the time it is a regular user.

su -

This command is used to login at root account.
By default, the Root account password is locked in Ubuntu. This means that you cannot login as Root directly or use the su command to become the Root user. However, since the Root account physically exists it is still possible to run programs with root-level privileges. This is where sudo comes in - it allows authorized users (normally "Administrative" users) to run certain programs as Root without having to know the root password.

See How to Enable Root Account.

sudo sh

This command runs "sh" as a super user.
The sh utility is a command language interpreter that shall execute commands read from a command line string, the standard input, or a specified file.

sudo bash

This command runs "bash" as a super user.
Bash is the shell, or command language interpreter. Bash is an sh-compatible shell that incorporates useful features from the Korn shell (ksh) and C shell (csh). It is intended to conform to the IEEE POSIX P1003.2/ISO 9945.2 Shell and Tools standard. It offers functional improvements over sh for both programming and interactive use. In addition, most sh scripts can be run by Bash without modification.

References: 1, 2, 3.


Eclipse launcher doesn't work in Xubuntu

I suspect you need to use update-alternatives to get the links to default locations in order.  Your edits to .bashrc aren't applied unless you run in a terminal.

Alternately, you could make a bash script to run your bashrc and then eclipse and use that as your launcher target.


Update:
A PPA exists now for network-manager-l2tp:

You can use

sudo add-apt-repository ppa:nm-l2tp/network-manager-l2tp
sudo apt-get update
sudo apt-get install network-manager-l2tp

To install the network manager l2tp that supports L2TP for Ubuntu 16.04

Walkthrough for building from source: http://blog.z-proj.com/enabling-l2tp-over-ipsec-on-ubuntu-16-04/

Old Answer

Another solution is to use network-manager-l2tp. You can get it from
https://github.com/nm-l2tp/network-manager-l2tp.

For installation walk-through:
http://blog.z-proj.com/enabling-l2tp-over-ipsec-on-ubuntu-16-04/

It works for Ubuntu 16.04


Why does 20.04 options show up on my Ubuntu 18.04 GRUB menu?

I think it had some grub problem,
You need to update grub info by using below command in Ubuntu terminal.
sudo update-grub

It's update your grub detail and remove unbootable options.

Note: Make sure you don't inserted bootable usb drive, When you run this command.


The NX session is defined by a session name (where you can enter whatever you want) and a host name, which is used to identify the server on the network.

Your host name can be a regular name (that will be resolved by your DNS or domain server, or /etc/hosts file, or whatever resolution system you may have.

If you don't have such a thing, you can simply put your server's IP address as the host name, and the client should connect to it.


So, run installation of Ubuntu 12.04.1 x64 LTS using alternate CD.
    During the installation I selected manual partitioning and
  to:
   - Use and Format / (root)
   - Use and Format SWAP
   - Use and Keep data on /home
   - Use and Keep data on /data    After I clicked "Continue" I get error creating and formatting SWAP partition.
   I go to terminal with Alt + F2 (?) and hit enter. I
  discovered that there was visible RAID as only disk with NO
  partitions. Something like this:

arek@domek:/var/log/installer$ ls -l /dev/mapper/
lrwxrwxrwx 1 root root 7 Oct  7 20:17 /dev/mapper/pdc_jhjbcaha -> ../dm-0

arek@domek:/var/log/installer$ ls -l /dev/dm*
brw-rw---- 1 root disk 252, 0 Oct  7 20:17 /dev/dm-0

    So I switched to log console Alt+F3 (?) and saw errors like
  below:

Oct  7 14:02:45 check-missing-firmware: /dev/.udev/firmware-missing does not exist, skipping
Oct  7 14:02:45 check-missing-firmware: /run/udev/firmware-missing does not exist, skipping
Oct  7 14:02:45 check-missing-firmware: no missing firmware in /dev/.udev/firmware-missing /run/udev/firmware-missing
Oct  7 14:02:45 anna-install: Installing dmraid-udeb
Oct  7 14:02:45 anna[12599]: DEBUG: retrieving dmraid-udeb 1.0.0.rc16-4.1ubuntu8
Oct  7 14:02:49 anna[12599]: DEBUG: retrieving libdmraid1.0.0.rc16-udeb 1.0.0.rc16-4.1ubuntu8
Oct  7 14:02:49 anna[12599]: DEBUG: retrieving kpartx-udeb 0.4.9-3ubuntu5
Oct  7 14:02:49 disk-detect: Serial ATA RAID disk(s) detected.
Oct  7 14:02:55 disk-detect: Enabling dmraid support.
Oct  7 14:02:55 disk-detect: RAID set "pdc_jhjbcaha" was activated
Oct  7 14:02:55 HERE --> dmraid-activate: ERROR: Cannot retrieve RAID set information for pdc_jhjbcaha
Oct  7 14:02:56 check-missing-firmware: /dev/.udev/firmware-missing does not exist, skipping
Oct  7 14:02:56 check-missing-firmware: /run/udev/firmware-missing does not exist, skipping
Oct  7 14:02:56 check-missing-firmware: no missing firmware in /dev/.udev/firmware-missing /run/udev/firmware-missing
Oct  7 14:02:57 main-menu[428]: DEBUG: resolver (libnewt0.52): package doesn't exist (ignored)
Oct  7 14:02:57 main-menu[428]: DEBUG: resolver (ext2-modules): package doesn't exist (ignored)
Oct  7 14:02:57 main-menu[428]: INFO: Menu item 'partman-base' selected
Oct  7 14:02:57 kernel: [  316.512999] NTFS driver 2.1.30 [Flags: R/O MODULE].
Oct  7 14:02:57 kernel: [  316.523221] Btrfs loaded
Oct  7 14:02:57 kernel: [  316.534781] JFS: nTxBlock = 8192, nTxLock = 65536
Oct  7 14:02:57 kernel: [  316.554749] SGI XFS with ACLs, security attributes, realtime, large block/inode numbers, no debug enabled
Oct  7 14:02:57 kernel: [  316.555336] SGI XFS Quota Management subsystem
Oct  7 14:02:58 md-devices: mdadm: No arrays found in config file or automatically
Oct  7 14:02:58 partman:   No matching physical volumes found
Oct  7 14:02:58 partman:   No volume groups found
Oct  7 14:02:58 partman:   Reading all physical volumes.  This may take a while...
Oct  7 14:02:58 partman-lvm:   No volume groups found
Oct  7 14:02:58 partman: Error running 'tune2fs -l /dev/mapper/pdc_jhjbcaha'
Oct  7 14:02:58 partman: Error running 'tune2fs -l /dev/mapper/pdc_jhjbcaha'
Oct  7 14:02:58 partman: Error running 'tune2fs -l /dev/mapper/pdc_jhjbcaha'
Oct  7 14:06:11 HERE --> partman: mkswap: can't open '/dev/mapper/pdc_jhjbcaha2': No such file or directory
Oct  7 14:07:28 init: starting pid 401, tty '/dev/tty2': '-/bin/sh'
Oct  7 14:15:00 net/hw-detect.hotplug: Detected hotpluggable network interface eth0
Oct  7 14:15:00 net/hw-detect.hotplug: Detected hotpluggable network interface lo

   As You can see there are 2 errors

Oct  7 14:02:55 dmraid-activate: ERROR: Cannot retrieve RAID set information for pdc_jhjbcaha

   and

Oct  7 14:06:11 partman: mkswap: can't open '/dev/mapper/pdc_jhjbcaha2': No such file or directory

  I looked in the internet and try to run command "dmraid -ay" and get
  something like that:

dmraid -ay
/dev/mapper/pdc_jhjbcaha -> Already activated
/dev/mapper/pdc_jhjbcaha1 -> Successfully activated
/dev/mapper/pdc_jhjbcaha2 -> Successfully activated
/dev/mapper/pdc_jhjbcaha3 -> Successfully activated
/dev/mapper/pdc_jhjbcaha4 -> Successfully activated
/dev/mapper/pdc_jhjbcaha5 -> Successfully activated
/dev/mapper/pdc_jhjbcaha6 -> Successfully activated

  Then I returned to installer with Alt+F1 (?) and click "Return" to
  return to partitioning menu. I did NOT change anything just
  selected again "Continue" and everything goes smoothly.

  I hope this will help someone.

  arkadius


How can I remove google chrome from launcher?

Fixed it! Here is what I did:

Check this folder using this command:

ls ~/.local/share/applications

If there are some google stuff in it remove it. If you want to remove it alltogether use:

rm -rf ~/.local/share/applications

HOWEVER this removes the directory along with its files so I just created the directory again just to be sure I won't make a mess:

mkdir ~/.local/share/applications

There must be a better way to do that last part but this worked for me at least.


This is not an answer to your question,but there are many flash games offering that amount of functionality.You will only need flash installed (install the restricted extras package).


There is a bug at launchpad #624635 which is about the problem you are having the solution provided in the comments of the bug is to use Install-depot-multiboot which is an alternative to Unetbootin or Startup Disk Creator

You can download the script from

pendrivelinux.com (download link)

You will need to extract the tar.bz2 file and run the install-depot-multisystem.sh by double clicking and answering run in terminal it will ask for your password to install additional packages you can then start multi system from the Accessories menu and plug in your usb drive and install your .ISO

Hope this helps


Unlike e.g. NTFS or FAT ext4 supports Unix style permissions so the UIDs are stored in the file system and can't be changed by mount options.

If your disk is mounted on first/ use

sudo chown 1000 --recursive first/

to make UID 1000 the owner of all files and folders on that partition.

By default 5% of a ext4 file system are reserved for root. With the resuid option you can specify another user instead of root who is allowed to use this 5%. It doesn't affect the ownership of the files on the partition.


No sound... How to re-enable pulseaudio?

If you say it works fine as guest, just run rm -rf ~/.pulse from your terminal. That would wipe your pulseaudio settings as the currently logged in user.


If you go to Ubuntu > System > Administration > Update Manager, you'll see a Settings... button at the bottom left of the dialog. In the dialog, switch to the Updates tab and uncheck the updates checkboxes and set Release Upgrade to "Long Term Support Releases Only".

It should look something like:

See the community docs for more information.


Add video/3gpp; to the MimeType section in /usr/share/thumbnailers/ffmpegthumbnailer.thumbnailer.
Then clear the thumbnail cache:
cd ~/.thumbnails
rm -r fail
rm -r normal
rm -r large


Can I have Global Menu within the Gnome Fallback Session?

You can get this by installing the indicator-applet-appmenu  package in the Software Center, Synaptic, or with apt-get.

I had to log out an back in to get it to show up in my list of panel widgets to add.


Is my boot process normal? It takes 50 seconds boot

The normal booting time is 40s (including BIOS). You might have some "not so good" hardware which causes this problem. Also you must have kept many things on boot and installed many packages. But you need not worry.


Updating is quite easy, from this answer from Rinzwind:

Download the three .DEB files with the name starting with linux from here.

Example for i386 (take the 2 with amd64 in the name for 64-bit. Check uname -a if you are unsure):

linux-headers-3.13.0-031300_3.13.0-031300.201401192235_all.deb
linux-headers-3.13.0-031300-generic_3.13.0-031300.201401192235_i386.deb
linux-image-3.13.0-031300-generic_3.13.0-031300.201401192235_i386.deb

  Install all 3 packages ...

Example for i386

dpkg -i linux-headers-3.13.0-031300_3.13.0-031300.201401192235_all.deb
dpkg -i linux-headers-3.13.0-031300-generic_3.13.0-031300.201401192235_i386.deb
dpkg -i linux-image-3.13.0-031300-generic_3.13.0-031300.201401192235_i386.deb

or

 dpkg -i *.deb

  Reboot your system ...

I just this and it resulted in disc failure. But I fixed it using:

fsck /dev/<disk> -y


While installing npm in I'am getting nodejs dependency error like nodejs-dev is not going to be installed, why?

The answer to your question of why is in the output of apt-get:

  you have held broken packages

To fix broken package dependencies run it with the -f option:

sudo apt-get install -f [PACKAGE...]

You can run the command without any packages at all or you can specify one or more packages (e. g. npm) to install them at the same time.


how to resolve this problem on npm start

Error code ENOENT mean "no such file or directory".

Check your installation if you have the file /home/nikhil/package.json present and accessible by the application.

From this post in StackOverflow, it has been recommended also to do npm init to initialize and create a valid package.json file.


According to Boot summary:
Your sda7 (swap) has : UUID:ef66677d-b68d-44bd-88bd-6b32f30eb1cb.
Your /etc/fstab has: UUID=b66d26d9-8ef1-4192-ac02-02ac6c52b4f9.
You need to change /etc/fstab to use the first UUID.


how to make detection of external hard disk & retrive data from it

You could try to manually mount the external drive from a command prompt. First, identify the drive with:

sudo fdisk -l ,

then, once you've identified your drive, create a mount point for it:

sudo mkdir /media/external_drive .

Lastly, mount the drive itself with:

sudo mount -t *hard drive type* /dev/sd*letter* /media/external_drive ,

substituting your values in between the ** as appropriate.

Once you've mounted the drive, you can explore it with 'cd', like:

sudo cd /media/external_drive .

To umount the drive do:

sudo umount /media/external_drive .

Keep in mind, you can't umount a drive if you are actually in the mounted directory (or sub-directory(s)).


If you need install specific version of Java on any distro, you must do it manually, but it is easy.

First you need which architecture OS you have.

uname -a

The x86_64 is 64bit and ix86 (x can be 3 or 6).

If you have 64 bit OS (in present it is probably) follow this steps.
-> Open the terminal.

1) Create directory and go to /opt/jdk

mkdir /opt/jdk
cd /opt

2) Download Java package (if someone need another version only need change version and build in link)

wget --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u5-b13/jdk-8u5-linux-x64.tar.gz

3) Optional (if you are not logged as root you need):

sudo su

4) Untar the package:

tar -zxf jdk-8u5-linux-x64.tar.gz -C /opt/jdk

5) Set Oracle's Java as default:

update-alternatives --install /usr/bin/java java /opt/jdk/jdk1.8.0_05/bin/java 100
update-alternatives --install /usr/bin/javac javac /opt/jdk/jdk1.8.0_05/bin/javac 100

6) Check Java version if it os ok

java -version

I follow this part of this tutorial, but this method is for anyone distro. For example I mainly used this for installation on servers where we nedd specific version of Java 7.


What is available memory while using free command?

In the output of free,

Free memory is the amount of memory which is currently not used for anything. This number should be small, because memory which is not used is simply wasted.
Available memory is the amount of memory which is available for allocation to a new process or to existing processes.

The example given in the question shows a healthy system.


How do I stop immortal / immortalctl process?

To stop/start/restart all depends on how you started the process if using immortaldir the easy way is just to remove the run.yml or rename it to run.yml-off from the directory that you passed as an argument or  defined when calling immortaldir (probably /etc/immortal) check How to install & setup for more details

If you ran the process using your $USER (not root), you could remove the $HOME/.immortal directory (this will stop other processes as well)

To manage the process you then can use immortalctl, in your case the name of your process is run therefore if you want to stop it just need to do:

# immortalctl stop run

or

$ sudo immortalctl stop run

In this case, run is the name of your service and also the name of your service config, probably located in /etc/immortal/run.yml

Keep in mind that immortal will do its best to keep your process up and running forever, if you are using:

# immortalctl  -k run

This will only send a kill signal to your process, but immortal will bring it up again, you may have already noticed that the PID changes.

When using immortaldir the options exit or halt will behave more like a restart, they indeed are exiting or halting (stopping and exiting the supervisor) but immortaldir will bring your application up again since the idea is to keep your application always running.

For more examples check: https://immortal.run/post/examples/


Permission denied when running "./script.sh", but works when running "bash script.sh"

Issue resolved..

I just found this post : https://unix.stackexchange.com/questions/203371/run-script-sh-vs-bash-script-sh-permission-denied

The filesystem was mounted with the "noexec" param.


How to install TortoiseHg on Ubuntu 20.04 from its source code

You are missing python qt libraries.
sudo apt get install python3-pyqt5 pyqt5-dev-tools qttools5-dev-tools

After installing missing libararies, you should be able to install tortoisehg.