You can use split utility in Linux to split a file either according to size or number of lines.

  split - split a file into pieces

      `split [OPTION]... [INPUT [PREFIX]]`

Explanation:

  Output fixed-size pieces of INPUT to PREFIXaa, PREFIXab, ...; default size is 1000 lines, and default PREFIX is 'x'. With no INPUT, or when    INPUT is -, read standard input.

Options:

  -a, --suffix-length=N
              use suffixes of length N (default 2)
  -b, --bytes=SIZE
              put SIZE bytes per output file
  -C, --line-bytes=SIZE
              put at most SIZE bytes of lines per output file
  -d, --numeric-suffixes
              use numeric suffixes instead of alphabetic
  -l, --lines=NUMBER
              put NUMBER lines per output file
  --verbose
              print a diagnostic just before each output file is opened
  --help
              display this help and exit
  --version
              output version information and exit

  SIZE may be (or may be an integer optionally followed by) one of following: KB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G, T, P, E, Z, Y.*

Examples:

  $ split --bytes 500M --numeric-suffixes --suffix-length=3 abc abc.

(where the input filename is abc and the last argument is the output prefix)

  same with short options:

  $ split -b 100k -d -a 3 abc abc.

The split commands generate pieces named: abc.000, abc.001 ...

For re-assembling the generated pieces again you can use e.g.:

$ cat abc.* > abc_2

(assuming that the shell sorts the results of shell globbing - and the number of parts does not exceed the system dependent limit of arguments)

You can compare the result via:

$ cmp abc abc_2
 $ echo $?

(which should output 0)

Alternatively, you can use a combination of find/sort/xargs to re-assemble the pieces:

$ find -maxdepth 1 -type f -name 'abc.*'  | sort | xargs cat > abc_3

  You could also do something like this but it will create files with 3000 lines named xaa xab xac... :

  $split -l 3000 filename

  Another option, split by size of the output file (still splits on line breaks):

  $split -C 50m --numeric-suffixes input_filename output_prefix

  creates files like output_prefix01 output_prefix02 output_prefix03 ... each of max size 50 megabytes.

pssh:

[feddy@localhost ~]$ pscp.pssh --help
Usage: pscp.pssh [OPTIONS] local remote

Options:
  --version             show program's version number and exit
  --help                show this help message and exit
  -h HOST_FILE, --hosts=HOST_FILE
                        hosts file (each line "[user@]host[:port]")
  -H HOST_STRING, --host=HOST_STRING
                        additional host entries ("[user@]host[:port]")
  -l USER, --user=USER  username (OPTIONAL)
  -p PAR, --par=PAR     max number of parallel threads (OPTIONAL)
  -o OUTDIR, --outdir=OUTDIR
                        output directory for stdout files (OPTIONAL)
  -e ERRDIR, --errdir=ERRDIR
                        output directory for stderr files (OPTIONAL)
  -t TIMEOUT, --timeout=TIMEOUT
                        timeout (secs) (0 = no timeout) per host (OPTIONAL)
  -O OPTION, --option=OPTION
                        SSH option (OPTIONAL)
  -v, --verbose         turn on warning and diagnostic messages (OPTIONAL)
  -A, --askpass         Ask for a password (OPTIONAL)
  -x ARGS, --extra-args=ARGS
                        Extra command-line arguments, with processing for
                        spaces, quotes, and backslashes
  -X ARG, --extra-arg=ARG
                        Extra command-line argument
  -r, --recursive       recusively copy directories (OPTIONAL)

Example: pscp -h hosts.txt -l irb2 foo.txt /home/irb2/foo.txt

Example (for your case):

[feddy@localhost ~]$ touch ko001 ko002 ko003
[feddy@localhost ~]$ pscp.pssh -AH feddy@localhost ko00* Downloads/
Warning: do not enter your password if anyone else has superuser privileges or access to your account.
Password:
[1] 20:26:42 [SUCCESS] feddy@localhost
[feddy@localhost ~]$ ls Downloads/
ko001   ko002   ko003

Now, Finally, you can use cat or find utility to join or reassemble all files (as already mentioned above)


Your alias can be called normal alias: it replace command at the beginning of the command line but not in the middle of it. To create global alias you need switch your shell from bash to zsh. See shells comparison for more information.

If you still want to work with bash, you probably don't need an alias at all. You need to adjust PATH variable where shell searches for executables. If you do something like

export PATH=/home/MyUSERNAME/liggghts/src/:$PATH

you will be able to run lmp_fedora without any aliases. I think that wrapping it with mpirunwill work too but I can't test it.


RAID1 "conflicting device node" message on startup

Can you tell me what raid configuration you have setup?
In your raid configuration are there indications of which is primary and is one of the drives set as a hot spare drive?
I believe a hot spare needs to be set.

  Configuring the RAID

Once you have completed your partitioning in the main "Partition Disks" page select "Configure Software RAID"
Select "Yes"
Select "Create new MD drive"
Select RAID type: RAID 0, RAID 1, RAID 5 or RAID 6
Number of devices. RAID 0 and 1 need 2 drives. 3 for RAID 5 and 4 for RAID 6.
Number of spare devices. Enter 0 if you have no spare drive.
select which partitions to use..
Repeat steps 3 to 7 with each pair of partitions you have created.
Filesystem and mount points will need to be specified for each RAID device. By default they are set to "do not use".
Once done, select finish.

See here for complete info info


In Ubuntu 18.04, the wayland login option will automatically switch off the Nvidia proprietary drivers and use the integrated graphics (e.g. i915).  For heavy graphics loads, the Nvidia drivers would be more efficient (lower temperatures).  Generally, which driver is most efficient depends upon the type of graphics being displayed.


Restore unity after removing gnome desktop (Ubuntu 14.04)

Reinstall the ubuntu-desktop package via command

sudo apt-get install --reinstall `ubuntu-desktop`

If that doesn't help, you can manually reset icons and theme via Unity Tweak Tool, and use update-alternatives command to change plymouth theme ( that's the boot screen ) , like so:

$ sudo update-alternatives --config default.plymouth
[sudo] password for xieerqi:
There are 3 choices for the alternative default.plymouth (providing /lib/plymouth/themes/default.plymouth).

  Selection    Path                                                             Priority   Status
------------------------------------------------------------
* 0            /lib/plymouth/themes/ubuntukylin-logo/ubuntukylin-logo.plymouth   150       auto mode
  1            /lib/plymouth/themes/ubuntu-logo/ubuntu-logo-scale-2.plymouth     99        manual mode
  2            /lib/plymouth/themes/ubuntu-logo/ubuntu-logo.plymouth             100       manual mode
  3            /lib/plymouth/themes/ubuntukylin-logo/ubuntukylin-logo.plymouth   150       manual mode

Press enter to keep the current choice[*], or type selection number:


How do I get windows previews when hovering over icons in the launch bar?

You have to install "CompizConfig Settings Manager" through Ubuntu Software Center.

Then launch the  "CompizConfig Settings Manager" application and search in "Extras" for the "Windows Previews" plugin and enable it.

Move your mouse to the unity laucher and the "preview window" should appears.

Cheers.


What players do support flac files with embeded cue sheet?

You may want to try DeaDBeef. It's open source and has been ported to Android.
It's the closest thing to foobar2000, even in terms of GUI style.


Unable to access internet from devices connected over WiFi hotspot with Ubuntu 13.04

Sorry to have bothered you all.

I just noticed that the DNS had changed. So in order to solve the problem I clicked on the "Connection Information" and Under the auto Ethernet tab I took the primary DNS IP shown under IPv4 and placed the same DNS on my iPhone WiFi connection details and it started working perfectly.


You need to delete Windows boot partition (EFS) to install Ubuntu, I faced the same issue during installation in Acer predator 500. If deleting only EFS (use gparted preinstalled in ubuntu Live boot partions are marked as esp under flags) does not work then you need to delete windows partition + Microsoft reserved partition + EFS this would definitely works.
It is recommended to backup anything useful in Windows Partition.
If deleting EFS works then search for a way to recover EFS  in windows 10 < https://www.disk-partition.com/windows-10/accidentally-deleted-boot-partition-windows-10.html > Try: Method in which Windows bootable drive is used. I used this and it worked for me.

And If you're using an Optane Drive then expect delay in booting to Ubuntu almost everytime.


Here is some basic information and a more detailed introduction by Dustin Kirkland.

Basically, the Ubuntu orchestra server consist of the following components:

Provisioning Server -> Cobbler
Monitoring Server -> Nagios
Management Server -> Juju
Logging Server -> Rsyslog

Cobbler is a Linux installation server that allows for rapid setup of network installation environments.

Nagios monitors large deployments to ensure systems, applications, services and business processes are functioning properly.

Juju was previously codenamed Ensemble. Through the use of charms, which describe services and their dependencies and interfaces, juju provides shareable, re-usable and repeatable expressions of DevOps best practices. Check out this Ubuntu Open Week Session for an intro to Juju.

Rsyslog is an enhanced syslogd supporting, among others, MySQL, PostgreSQL, failover log destinations, syslog/tcp, fine grain output format control, high precision timestamps, queued operations and the ability to filter on any message part.

Quoting from the Ubuntu Wiki page about Orchestra:

  A collection of what we think are the best free software services for
  provisioning, deploying, hosting, managing, and orchestrating
  enterprise data center infrastructure services, by, with, and for the
  Ubuntu Server. Orchestra, enables users to quickly deploy a solution
  in the datacentre. Instead of manually setting up a complex network
  installation environment, users can leverage Orchestra to rapidly
  deploy new servers in production using the best open-source tools. The
  process is standardised and fully automated, minimising manual
  intervention and ensuring consistency.

If you scroll down on the above mentioned Ubuntu Wiki page, you will find two links for a tutorial on setting up an Ubuntu-based Orchestra server in the safe confines of Virtualbox. For convenience, here are the links:

Deploy Orchestra server fleets part 1

Deploy Orchestra server fleets part 2


I have solved this issue by using the refresh feature.

Please note that it will revert Firefox to its original state: configurations and customizations, including extensions, extension data, and about:config preference configurations are removed.

Go the Troubleshooting Information page, that can be accessed by the following ways:

Menu: Help > Troubleshooting Information.
Type about:support in your address bar.

Click the Refresh Firefox button.

For more information, visit:
https://support.mozilla.org/en-US/kb/refresh-firefox-reset-add-ons-and-settings


have you checked if something is wrong in the ´sound´ tab in the systems settings menu? (the icon with a crossed wrench and screwdriver)
you can check if Ubuntu has listed your soundcard, or something has not been configurated correctly.
if not, it probably hasn't recognized the soundcard yet.

second thing that probably can help is to check the ´software and updates´ program.
the tab ´drivers´ maybe show possible alternitive drivers for the soundcard on your computer, to make it work.

i hope this is info will be helpful to you


Can I automatically generate a command-line for xrandr based on the current set-up?

I've had the same problem before which led me to create a function in ~/.bashrc called xreset:

xreset () {

    xrandr --output HDMI-0  --mode 1920x1080 --pos 0x0       --rotate normal \
           --output eDP-1-1 --mode 1920x1080 --pos 3840x2160 --rotate normal \
           --output DP-1-1  --mode 3840x2160 --pos 1920x0    --rotate normal

} # xreset

After you get your monitors arranged by position and resolution, grab the current setup with:

$ xrandr | grep " connected"

HDMI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 1107mm x 623mm
eDP-1-1 connected primary 1920x1080+3840+2160 (normal left inverted right x axis y axis) 382mm x 215mm
DP-1-1 connected 3840x2160+1920+0 (normal left inverted right x axis y axis) 1600mm x 900mm

All the information is there for you to create your own xreset function.


My Ubuntu 12.04 netbook stops at boot with purple screen when shutted down. After restart it works

I had a similar problem but this worked for me: Purple start screen - no splash screen

Hope it helps


Winetricks fails to find program files directory

This is a permissions problem as a result of having previously run Winetricks as root (with sudo). Winetricks was never intended to be run as root.

You can see from ls -ld that the Winetricks cache folder is owned by root:

drwxr-xr-x  2 root       root       4096 Aug  2 18:09 /home/vectoruser/.cache/winetricks

To fix this, you can run this command in a terminal to restore ownership to yourself:

sudo chown -R $USER:$USER "$HOME/.cache"


How to recover a deleted /etc/passwd file?

This question seems to already have the suitable answers, I will just expand on @Lekensteyn 's comment:

sudo cp /var/backups/passwd.bak /etc/passwd
sudo chmod 644 /etc/passwd


Answer from Unix & Linux Stack Exchange

  Not sure if this is a little too late but you can customize the values in /usr/share/gnome-shell/theme/gdm3.css and that does the trick. Just find the screen-shield-clock class and make your changes.

If this doesn't work try tweaking /etc/alternatives/gdm3.css file.

ps. Do not forget to backup files before changes!


How can I configure two monitors from two video sources?

Usually when you install a PCIe graphics card it will disable the onboard graphics. Does the nVidia card have more than 1 connector? Most cards these days have the ability to do dual display.


Command line calc program and PI constant

If you are talking about calc from the apcalc package the constant Pi is defined like this:

pi()

note, the parentheses are used even though the function does not take any arguments.

not too clear for the GUI desktop calculator,gcalctool, either, which is:
Ctrl+P


Does compiling a linux kernel make the OS faster?

In general , no.

There are, however, some exceptions to "no". For example the liquorix kernel or Ubuntu kernel Flavors. These are generally performance tuning and can make a difference (the server kernel is faster for servers, and will not improve desktop performance).

With Ubuntu, if you are running the proper kernel flavor, you should be good to go.

Note: The Liquorix kernel also has some patches (in addition to performance tuning).

The other exception would be if you have some unusual hardware.

But in the vast majority of cases, performance is not a "standard" reason to compile a kernel.

See:

Ubuntu wiki compile kernel


How to disable showing my Windows NTFS partion in Ubuntu

If this were a desktop as opposed to a laptop, and you don't specify, I might advise cloning the partitions to separate hard drives and literally switching off the drive you don't wish accessed.  That's what I'd do.

UPDATE:  I found the answer ON THIS SITE

It is entirely possible to get exactly what you want, but in my opinion it is not remotely easy.  Please see the answer in the following linked question with the most upvotes on it, currently 11 but sure to rise:

How to hide a(n) (NTFS) partition from ubuntu


snap permissions for home directory for Octave

I don't have octave installed in my machine, so I'm showing the process using the Brave browser.

Start software-center, click on the Installed tab, find octave from the list and click.

Now, select the Permissions button, from here you can set necessary access permission to your app.


How do I change the name of the folder GRUB installs to?

You can change the directory that concerns you only at build time, by passing a value to --with-grubdir= at configure time:

http://git.savannah.gnu.org/cgit/grub.git/tree/configure.ac?h=grub-2.02#n280
http://git.savannah.gnu.org/cgit/grub.git/tree/util/grub-install.c?h=grub-2.02#n339
http://git.savannah.gnu.org/cgit/grub.git/tree/util/grub-install.c?h=grub-2.02#n251


Try:

acpi_backlight=vendor

I answered a similar question yesterday. Black Screen After Post on Install 12 or 13.04


No, its based on Debian 7.1

See http://steamcommunity.com/groups/steamuniverse/discussions/1/648814395741989999/ for more info.

You can browse the test repo at http://repo.steampowered.com/hometest/dists/stable/steam/binary-amd64/Packages

It includes a steam-desktop metapackage as well as steam client and valve recovery partition


I believe EFI is only supported with the 64 bit install.

See: https://help.ubuntu.com/community/UEFI

They emphasize 64 bit


I uninstalled synergy and reinstalled it using Synaptic (Ubuntu Software Center), this time it worked.

sudo apt-get remove synergy
sudo apt-get install synergy


How do I prevent  Firefox from crashing constantly?

I see Pango and Font Config appear again and again.

Can you make sure that Pango is correctly installed and fontconfig is properly configured?


pyQt4 import error after updating it to 18.04 LTS

It seems that you should install one package python-qt4:

sudo apt-get install python-qt4

After installation you will be able to import PyQt4:

$ python
Python 2.7.15rc1 (default, Apr 15 2018, 21:51:34)
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from PyQt4 import QtGui
>>>


Kubuntu 15.10 won't boot from live USB on my Samsung rf-511 laptop

Third party tools like Unetbootin often don't prepare and create the Ubuntu Live media properly.

You can create the USB media by using the built-in disks tool in Ubuntu.
Open it and select Restore Disk Image from the menu on the top right.
Choose the ISO file and the USB drive to write it to and start restoring.

If you want to make it in Windows use the diskpart tool.
Open command prompt as administator and execute:

diskpart
list disk
select disk * (* = number of USB drive)
clean
create partition primary
active
format fs=fat32 (quick)
assign letter=** (** = select a free drive letter)

Mount the ISO file and copy the content to the USB drive.


Your first image looks like the regular (with wxt terminal type) output from the X11 version of GNUplot, provided on Ubuntu by the gnuplot-x11 package.

In order to get the interactive chart window, you need to use the Qt version of GNUplot, provided by package gnuplot-qt.


New Dell 3437 preinstalled Ubuntu laptop not working

I don't know what the bt-dw1705-firmware package was used for but removing it fixed my problem.


Hardware Graphic Accelleration on Asus E403S

I've got the same notebook and as for me the 2d/3d acceleration is working out of the box with xubuntu 16.04. I've experienced a lot of lag with firefox, and visual glitches with chrome, but after an acceleration method change from SNA to UXA, chrome seems to be good. (SNA is default in this case, without a config file).

Edit (or create) /etc/X11/xorg.conf as follows: (ugh, can't format,
should be a tab before each line except the first and the last).

Section "Device"
    Identifier "Intel Graphics"
    Driver "intel"
    Option "AccelMethod" "uxa"
EndSection

Restart GDM/XDM/LightDM/etc. and hope for the best! :)


How does Ubuntu One upload music metadata changes?

Ubuntu One does not currently support diff-style uploads, and whenever a file changes, the whole file is re-uploaded.


How can I configure an UltraWide monitor next to a 4K monitor using Xrandr

Ubuntu 18.04 with Xorg here too.

I am also looking for the solution to a similar problem. I have managed to get it to work for a layout where the ultrawide screen is either above or below the 4K one, but not when they are sitting side by side.

These are the commands required in order to get it to work in an above/below fashion:

xrandr --output eDP1 --scale 1x1 --pos 960x2160
xrandr --output HDMI1 --scale 2x2 --mode 2560x1080 --fb 5120x3960 --pos 0x0

The first one sets the position to be below the ultrawide - and centred. The position should be set using the real dimensions \times the scale being used (2.0 in this example), hence the 960x2160.

The second command sets the scale of the ultrawide to 2.0 x 2.0, and sets the required framebuffer size, which I believe to be max(3200, 2560*2) x (1800 + 1080*2) - hence, 5120x3960 - for an above/below layout.

I have tried to use a similar logic for the side-by-side layout but without success...

These are the commands I tried:

xrandr --output eDP1 --scale 1x1 --pos 0x0
xrandr --output HDMI1 --scale 2x2 --mode 2560x1080 --fb 8320x2160 --pos 3200x0

And this is the result...

Ps. I am commenting as an "answer" because I wanted to be able to post the picture above.


kubuntu 15.10 - Each time I try to install something I get the same dependency errors but the package seems to install OK

Answer to the above question is/was that old kernels filled up the boot partition. How do I resize my /boot partition?

Basic command to check free space on your mounted partitions: sudo df -h

  Below information is an extremely shortened version of:  How do I
  remove old kernel versions to clean up the boot menu?

  The basic commands in this situation:

  uname -r - check which kernel is in use

  sudo apt-get autoremove - remove old kernel

  A normal kernel upgrade should work flawlessly as follows:

sudo apt-get update; sudo apt-get dist-upgrade; sudo apt-get autoremove

If for any reason something goes wrong during a kernel upgrade may read this:
How to restore a system after accidentally removing all kernels?
and eventually this: Removed Kernel by mistake [duplicate] && How can I boot with an older kernel version?


The absolute safest way to do that is to install it on a separate partition, but that's probably more work than you need.
What I'd recommend is to install Kubuntu. I'm not sure if that's really what you meant when you said "KDE on top of an Ubuntu installation", but Kubuntu is little more than KDE+Ubuntu. Just do:

  sudo apt-get install kubuntu-desktop

on any terminal window (it will install a ton of kde packages). By the end, you'll get prompted if you want to use gdm or kdm as login manager. It's OK to choose either one, but kdm will give you the full Kubuntu experience.

Next time you boot, just before logging in, choose KDE as your session manager. It will use the same $HOME and the same root folder, and thus you'll still have all the same programs installed, and their respective settings will be kept. I might be wrong, but I think only the settings stored under ~/.gnome2/ won't be loaded by KDE (they are gnome settings after all).

Finally, you don't really need to remove KDE after that. You can keep using gnome regularly, and never choose KDE again in the session manager. If, for some reason, you do want to really remove KDE (maybe you need to free up space), here's what you do:

  sudo apt-get purge kubuntu-desktop

kubuntu-desktop is a dummy package (you'll notice the removal process will be quick), removing this package will make apt consider all of the kde packages as unnecessary (since they were brought along by this one), so just do:

  sudo apt-get autoremove --purge

If you chose to keep gdm as your login manager, you can stop here. If you happened to choose kdm as your login manager back in the first step, you'll have to either reinstall gdm (it's technically already installed, so you can just reconfigure it if you know how) sudo apt-get install --reinstall gdm or reinstall kdm again sudo apt-get install kdm.

EDIT According to @AnwarShah the method above for removing Kubuntu doesn't actually work. I don't have an Ubuntu machine on which to test that right now, so I'll just provide an alternative method.

The command provided in this answer, should purge all traces of kde from your system. Before running it you should read all of the packages and make sure none of them had been previously installed by you! Make sure to remove the name of any packages you want to keep.
(Also, I haven't read through all of those packages, so I can't garantee anything regarding the commands effectiveness.)

Alternatively, you could keept track of all packages installed when you install kubuntu-desktop, and then just do apt-get purge on these packages. This requires the forethought of copying the list of packages back when you installed kubuntu-desktop (and remembering where you saved it), but it's a little safer to do.


Error when using "sudo Nautilus", how do I solve it?

Nautilus is a graphical application so you ought to use gksudo instead :

gksudo nautilus

When you want to do graphical things with high prilivegies, gksudo and gksu are much more convinient than sudo and su.


Well, yes and no.

You can if the following prerequisites are met:

You have a static IP address from your ISP
You know how to properly configure your firewall and port forwarding
You know how to properly configure ftpd so that you're not opening yourself up to quite as much of a security risk.

If any one of those fails then you can't do it.  If I were you, I would get DropBox (yes it's a referral link, so you will get free bonus space) and use that to share files.  DropBox is much simpler to use and is also very secure.

If you are dead set on hosting it from your own network, then you might want to consider the costs:

In America, to get a static IP usually costs about 3 times more than a normal internet connection.
By running ftp on that connection, you open up a huge security risk.
Your ISP probably has a cap on how much upstream data you can use, so you'll likely run out of data much faster.

Now if you're still set on hosting it yourself, then I would recommend apache2 rather than ftp.  Apache is a http server instead of an ftp server, and it's much more secure.  More information on apache can be found on the Apache HTTP server project documentation page.

Please, take my advice, don't try to host this yourself, especially with ftp.  You're opening up a  can of worms that will take eons to close again.


The simplest way to enable British spell checking in LibreOffice on recent Ubuntu versions is to install the hunspell-en-gb package.

sudo apt install hunspell-en-gb


I had an old install from over a year ago that I'd forgotten about.  Even though I tried an uninstall/reinstall, it preserved the data files (which makes sense) and I had no memory of changing the default password back then.

I moved the data directory aside (mv /var/lib/virtuoso-opensource-6.1 virtuoso-opensource-6.1.old) and reinstalled, and then all worked as expected.

Additionally, I found that according to this message, the company apparently can also provide instructions for a hard password reset.


First, you must run through all of the thousands of packages that you want to include and check that they build for both MIPS architectures (big-endian and little-endian) in Debian. You chase the bug reports, investigate (or upstream) packages that fail to build, and generally glidepath the set of packages toward completion.
Second, you must persuade the Ubuntu Foundations Team that the MIPS architectures are a worthwhile addition to the Ubuntu Repositories. That's why you did all the Debian work -- to persuade the Foundations Team that a MIPS build is both possible and affordable. If they agree that it's worthwhile, then you must help shepherd all those packages through another build cycle, this time for Ubuntu.
Finally, you and some MIPS-using friends must volunteer to test the pre-release version of the Ubuntu MIPS build. If volunteers don't step up to do pre-release testing, or if volunteers don't step up to provide support, that architecture gets dropped. Ubuntu dropped PowerPC and i386 architectures when volunteers became too sparse.


How can I blank the screen from the command line over SSH?

Short answer:

xrandr --output DVI-I-1 --brightness 0

where DVI-I-1 is your screen's name.

The other way around:

xrandr --output DVI-I-1 --brightness 1

to set to normal brightness again.

To get the screen's name

Simply run the command:

xrandr

In the output, you will find the screen's name, in the line, including connected

Small script to either darken the screen or set it back to normal

The script can be used to set (all) connected screen(s) to black and vice versa. The script finds your screens automatically.

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

arg = sys.argv[1]

screens = [l.split()[0] for l in subprocess.check_output("xrandr").decode("utf-8").splitlines()
           if " connected" in l]

val = "0" if arg == "black" else "1"
for s in screens:
    subprocess.Popen(["xrandr", "--output", s, "--brightness", val])

To run

Copy the script into an empty file, save it as set_black.py
Run it either with:

python3 /path/to/set_black.py black

to darken the screen, or

python3 /path/to/set_black.py normal

to set brightness to normal again.

While the answer above should run fine on all Ubuntu distro's locally, the question turns out to be on ssh/remote (the information was edited into the question).

In case of a remote situation, we'd need to set the $DISPLAY variable correctly. If the display variable is e.g. :0, we'd need to run the script with:

DISPLAY=:0 python3 /path/to/script.py black

The variable is not necessarily :0 though. This post on U&L seems an excellent one set the DISPLAY variable on the remote machine.


Interactive mathematical constructions application

GeoGebra is just the app for you! Install it with:

sudo apt-get install geogebra

Description:

Dynamic mathematics software for education
GeoGebra is a dynamic geometry program. You can do constructions with points,
vectors, segments, lines, conic sections as well as functions and change
them dynamically afterwards. On the other hand, equations and coordinates
can be entered directly.
Support for many geometric constructions is provided, as well as support
for many calculus-based tools (derivatives, osculating circle, ...).
GeoGebra files can be exported in many different formats, or as interactive
applets for web pages.

Screenshots:


Check out error log (tail /var/log/apache2/error.log) in order to find out exact path that Apache tries to find.


How can I remove partitions? I already have 4

Both Windows and Ubuntu provide graphical interfaces to manage partitions.
Your question is unclear, so I will answer both potential questions:

If you wish to keep both your Ubuntu OS partition and your Windows partition, then from within Ubuntu you may run the "Disks" utility. Type "Disks" into the search field of the Ubuntu menu.
First select the disk, then select the partition you wish to delete and click the - symbol below it.

If you wish to delete the Ubuntu OS partition as well, leaving only the Windows partition, you may boot to Windows and access a similar tool by going control panel->(set view to large icons in the top right)->administrative tools->computer management->disk manager or run diskmgmt.msc.
From here you may select disks, and right click on partitions to delete them.

Be certain you wish to delete a partition, recovering them completely is usually impossible.


Can I change the color of tabs in gedit?

Despite "Preferably none that take long to implement as I'm just familiarizing myself with Xubuntu.", here's a longish multi-step procedure. The procedure assumes you know which theme you're currently using and, for the purpose at hand, let's assume its name is DefaultTheme.

The default location for themes is /usr/share/themes. This folder and its contents are not owned by you. So, if you make changes here, they will be lost in case of an update. A preferable way to play with themes is to install them in your home directory if you're getting them from elsewhere or copy them over from /usr/share/themes if they already exist there. To copy them over, here's what you do:

Open a terminal by pressing
Ctrl+Alt+T. You should normally be placed in your home directory. Otherwise, type cd and press Enter to get there.
Type mkdir .themes and press Enter. The . signifies a hidden file and is required.
Type cp /usr/share/themes/DefaultTheme ~/.themes and press
Enter.
Type ls ~/.themes and press
Enter to confirm that you've copied over the entire DefaultTheme folder to ~/.themes. Here, ~ is a shortcut that Ubuntu understands for /home/YourName.
Close the terminal.

At this point you should look at the contents of ~/.themes/DefaultTheme in your file manager, Thunar, the default, or Nautilus or whatever. Most themes provided by default are quite complete and should contain, among others, folders called gtk-2.0 and gtk-3.0. (gtk-3.0 is newer and shinier but gtk-2.0 lives on.)
Now, gedit is a gtk-3.0 app. To change the appearance of its tabs, we need to edit a file called gtk-widgets.css located in ~/.themes/DefaultTheme/gtk-3.0. In other words, we want to edit ~/.themes/DefaultTheme/gtk-3.0/gtk-widgets.css.
To do so, open this file with your preferred text editor.
Look for a section named somewhat like .notebook tab because there maybe differences from theme to theme. If you find such a section, look within it for something like:

background-image: -gtk-gradient (linear, left top, left bottom,
                                 from (shade (@bg_color, 0.97)),
                                 color-stop (0.80, shade (@bg_color, 0.95)),
                                 to (shade (@bg_color, 0.92)));

If you find this content and you understand how gradients work you could edit the above to suit your needs.
A simpler, probably less aesthetic way is to just replace the entire content with the following code:

background-color: #bbb

Save the file and close gedit. Log out of your session. Log back in and open gedit and see if you have decent contrast now: you should now have dark gray text on a light grey background. If you want the background even lighter, try #ccc or #ddd or even #fff (for pure white).

Notes:
I've provided a similar answer here: gnome-terminal tabs are very dark, difficult to tell which tab is in use.
I'm providing this answer based on my past usage. I no longer use Xfce or gedit. If you find this answer doesn't work for you, let me know and I'll ask for it to be deleted.


Yes, the command you're looking for is
reset

In contrast to clear, or Ctrl+L, reset will actually completely re-initialise the terminal, instead of just clearing the screen. However, it won't re-instantiate the shell (bash). That means that bash's state is the same as before, just as if you were merely clearing the screen.
As @Ponkadoodle mentions in the comments, this command should do the same thing more quickly:
tput reset

From the other answers:

You can set a Keyboard Shortcut to reset the terminal, as explained by towolf.

If you're running Kubuntu, and your terminal is Konsole, you need to go to Edit → Clear history, since reset doesn't work the same way there, as UncleZeiv notes.


How to install WineASIO on Ubuntu 18.10?

you can still use the PPA they are linking here on kx.studio/Repositories


Not sure about a Cobalt theme but there are many themes for Geany on GitHub (https://github.com/codebrainz/geany-themes).


What is the label directory to scan hard drive for viruses?

This page, part of Ubuntu Documentation, has some pretty good instructions on using it.  It also tells how to install it.  I hate to plagiarize what was written there, but this is what it has to say:

Installing AVG Free

This works for both 32 and 64 bit versions of Ubuntu 10.10 and above.

Download the linux version (.deb file): http://free.avg.com/download.prd-alf
    Double-click on the file which can be found in your download folder then click on the Software Centre Installation button.
    Reboot the PC to initialize AVG. Alternatively you could run

sudo /etc/init.d/avgd start

Using AVG Free

Open a terminal (Applications-Accessories-Terminal). Now update the virus definitions (while connected to the web) with

sudo avgupdate

To perform a virus check enter

sudo avgscan

For example you want to scan your USB device:

First type on the terminal:

blkid

After you do this you will see a list of the devices with some extra information Look for the "UUID" number, also if the device appear to have a "LABEL" then use this last one.

Ok now that you know the "UUID" or "LABEL" if is the case

you can proceed with the following code supposing the "UUID" is AE45, Remember to copy the whole code even if it contains "-" ok now type the following:

sudo avgscan /media/AE45

Now the scan operations will be performed.


SMS are stored in ~/.local/share/history-service/history.sqlite which you can edit with the sqlite3 tool. I would avoid manipulating this database directly though, as it is not documented whether manipulating this file directly will cause it to lose sync with state that might be stored elsewhere.


As long as you do not enter your password for root access you will be fine. You will work just like a normal desktop user even if you had the permission to become administrator when needed.

Only after you had chosen tasks that need such  administrator permissions (such as e.g. installing or removing software) you will be asked for the "root" password (which is your login password of course). You will then become an admin for this very task only.

More advanced users can also become Root temporarily by preceding a terminal command with sudo.

There is no need to change the account to a mere desktop user account. In fact it can even be dangerous to do so if you by accident ended up with no administrator account. So before you changed you account to a desktop user account, make triple sure you had created another administrator account before you proceed.


I got it.

How?!

Create Variables

echo "Hard drive for encryption:"
read DEVICEFILE
echo "UUID of $DEVICEFILE"
read DEVICEUUID
echo "Luks name (/dev/mapper/LuksName):"
read LUKSNAME
echo "LVM Volume Group:"
read LVMVG

Create LUKS Partion

cryptsetup luksFormat -c aes-xts-plain64 -s 512 -h sha512 -y $DEVICEFILE
cryptsetup luksOpen $DEVICEFILE $LUKSNAME

Add in /etc/crypttab

echo "$LUKSNAME UUID=$DEVICEUUID none luks" >> /etc/crypttab

Create LVM Partion

pvcreate /dev/mapper/$LUKSNAME
vgcreate $LVMVG /dev/mapper/$LUKSNAME

Create Logical Volumes and mount it

That's a generic thing.

# Create Logical Volume Size:2GB NAME:part
lvcreate -L 2GB -n part $LVMVG
# Create ext4 on it
mkfs.ext4 /dev/${LVMVG}/part
# Mount it
mount -t ext4 /dev/${LVMVG}/part /mnt

Close luks

cryptsetup luksClose /dev/mapper/$LUKSNAME


sudo chown -R everydayUser:everyDayUserGroup /var/www

Edit

Actually set the group to the group your browser is using so that it doesn't loose access to it.


How to get grub to recognize second hard drive?

Responding to myself

It's not a true answer, but I have found an obvious workaround, which is to clean up my files so I had enough room to put Ubuntu and Windows on the same disk... with that it boots normally. I'm sure there is a solution to the grub thing, but this is good enough for me so I consider this matter resolved


replace your_username, shown below, with your username

boot the computer and observe the GRUB menu
choose advanced options
choose root access
type sudo mount -o remount,rw /
type cd /home/your_username
type sudo chown your_username:your_username .ICEauthority
type sudo chown your_username:your_username .Xauthority
type reboot
login like normal


Ubuntu One: "The user cancelled a prompt."

You can sign up on Ubuntu One official website and sign in back on ubuntu one desktop application


Unity Tweak Tool Schema Missing com.canonical.desktop.interface

I had the same issue, and I used the above solutions. Both were required to achieve a solution.

sudo apt-get install notify-osd
sudo apt-get install overlay-scrollbar

Now it works perfectly.


How do I put an icon at the bottom of the unity bar?

Currently you can't remove the trash icon from the launcher. Here is the rationale behind that. So I don't think you can move any other icon to the bottom also.


Looking for software with picture in picture for streaming

I have recently started using OBS, it has been around for quite some time though. It supports multiple overlays, so p-in-p is no problem from 2 cams.

https://obsproject.com/

It is a breeze to use, seems to be a relatively defacto piece of software various youtubers are using, and is really quite easy to use with lots of tutorials on youtube.


Error opening /dev/sdf1: No such device or address (udisks-error-quark, 0)

Drives fail. Not frequently these days, but they do. Yours probably did. Just restore from backups!


How to copy set of files and folder structure with identical names but different file extensions

Instead of grep, you might use sed:

find /path/to/flashdrive -iname '*.mp3' -printf '%P\0' |
 sed -z 's/\.mp3$/.flac/' |
 rsync -aP --files-from=- -0 /path/to/computer1 /path/to/flashdrive  --dry-run

In order:

find to find the MP3 files and print their relative paths, separated by the ASCII NUL character (\0)
sed to replace .mp3 and the end with .flac, using -z to process NUL-delimited limes.
rsync to copy the files while retaining directory structure and permissions (-a), reading in file paths to copy from stdin (--files-from=-), using NUL-delimited lines (-0).

The --dry-run is used to simulate the copying, observe the output and run again without the option if it looks OK.


accessing windows server share on ubuntu 12.04 via fstab

I think you have to add uid & gid that missing:

//192.168.1.100/share /home/user/share cifs uid=1000,gid=1000,username=dem,password=****, iocharset=utf8, sec=ntlm 0 0

from mount.cifs manpage---
uid=arg: sets the uid that will own all files on the mounted filesystem

To find the user's uid/gid that will have access to the share, run in terminal id username


Exec format error on node-v8.11.1/out/Release/icupkg while cross compiling Nodejs for ARM7

Seems like the issue gets solved by adding --without-intl flag to configure line as in https://github.com/nodejs/node/issues/7173:

./configure --cross-compiling --without-snapshot --without-npm --without-ssl --without-intl --dest-cpu=arm --dest-os=linux --prefix="${PREFIX_DIR}"

Now I don't get any error and the compilation moves forward.

Seems like there's an error during the packaging steps:

Invalid package configuration: Cannot package the path '/tmp/installARMv7/usr/lib', does it exist? {:level=>:error}

but node executable seems to be created. tomorrow i'll try to deploy it on Parrot Drone and see if it works.


Dualboot on separate drives going straight to win10

Okej so just as an update I ended up backing up important files and scrapping my old windows install for a number of reasons. After a clean install I ended up with an EFS-partition that "looked more genuine".

I suspect in the backstory where I accidentally deleted my EFS and recreated it manually I got it to a state where windows booted again but for some reason it wasn't seen by the ubuntu installer.

It'd been good to work it out and figure out rather than scrapping the install but it was an old install and felt like things just progressed faster.

Another thing I discovered not sure if that's important was that my windows install was MBR and my storage disks and ubuntu install was GPT so I ended up unifying that as well.


My system requirements to install ubuntu-16.04 doesn't match completely with the recommended requirements, can I still install it on my system?

Yes. yes you can.

Ubuntu isn't that demanding of a system and especially not when compared to Windows, I.E. : any Windows release version is less ressource intensive then any ubuntu release version.

In the case of less ram and less graphic power such as say a 2-4GB RAM netbook with and intel atom and graphics ran off the atom I'd highly recommend another ubuntu flavour : say https://ubuntu-mate.org/download/


Fastest way to put a lot of files togheter into 1 big chunk

You need tar. Read the funny manpage:-) tar does not compress (unless you tell it to).

tar cf tarname.tar the_directory_you_want_to_archive/ will create one file: tarname.tar. You can extract with tar xf tarname.tar later.

If the files you wish to archive reside in different directories, simply add each one to the command line like so: tar cf tarname.tar dir1/file1 dir2/file2 dir3/file3. This will create an archive containing the files 'file1', 'file2' and 'file3'.


According to 7-Zip on Windows, there is a Setup.py in the archive, but there is no 3.2 Directory, I have /setup.py in the root, also, the path to setup is:

\npyscreen-3.37.tar.gz\dist\npyscreen-3.37.tar\npyscreen-3.37\setup.py

os.chdir('/opt/'), puts you in /opt
wget https://pypi.python.org/packages/source/n/npyscreen/npyscreen-3.37.tar.gz, would download the tar into /opt
tar xvf npyscreen-3.37.tar.gz, should untar the package, in /opt
os.chdir('npyscreen-3.2') should be:
os.chdir('npyscreen-3.37')

then:

sudo ./setup.py
enter code here
sudo rm npyscreen-3.37.tar.gz
echo "Download and Install Finished."
import npyscreen


How do I set up Full Disk Encryption on an SSD?

There's no special considerations at all for SSD versus spinning HDD.

And if you're comfortable using the Ubuntu Alternate Installer, it's fairly straightforward to setup full disk encryption.


Do both Windows and Linux have to be in legacy boot mode during dual boot?

On most computers, two OSes don't have to be in the same boot mode, but it's helpful -- very helpful -- for both of them to be in the same boot mode.

Details vary greatly from one EFI to another, but in all but some very ancient EFIs, BIOS-mode OSes are installed using a Compatibility Support Module (CSM), which is a sort of BIOS emulator for EFI firmware. The CSM can be switched on and off, either by you setting options in the firmware or by the firmware itself, when it detects whatever key things trigger it to use the CSM or not use it. Unfortunately, there's very little standardization in the way different EFIs (and therefore computers) determine which boot mode to use when both are active. This makes the CSM a temperamental and tricky thing to use. That said, there are typically two ways that OSes using different boot modes can be managed:

Using the built-in boot manager -- All EFIs provide some sort of built-in boot manager, but details on how they're used vary from one machine to another. Typically, you access the boot manager by hitting a function key (usually F8 or above), Del, or Enter soon after the computer powers on. This action produces a menu of boot options. Some of these will boot the computer in EFI mode and others in BIOS mode. EFI entries are usually either named by the OS that installs them (e.g., ubuntu or Windows boot manager) or include the string "UEFI." BIOS entries are likely to describe BIOS boot media, like be the name of a hard disk. Thus, you can switch between a BIOS-mode Windows and an EFI-mode Ubuntu by selecting the hard disk by name vs. an entry called ubuntu in the boot manager.
Using rEFInd -- My rEFInd boot manager is a standalone boot manager that can do something similar to what the EFI's boot manager can do, but it works in more-or-less the same way on any EFI-based computer. (Macs are an exception; the CSM in Macs is unique, and so rEFInd treats Macs differently.) By default, rEFInd's CSM support is inactive, so you won't see BIOS-mode boot options. If you uncomment the scanfor line in refind.conf and ensure that hdbios is among the options, you'll see a gray diamond-shaped icon for your hard disk, which will launch any BIOS-mode boot loader it contains. This is in addition to whatever EFI-mode boot loaders the disk contains. Thus, you can switch between BIOS-mode and EFI-mode boot loaders.

Neither of these tools is guaranteed to work; some EFIs lack CSMs and so can't boot in BIOS mode at all. (Clearly that's not the case for you.) Also, some very early EFIs for x86-64 were actually implemented on top of BIOS, so they boot in BIOS mode by using the underlying BIOS. These EFIs don't have a CSM, so the boot manager works differently and rEFInd can't boot in BIOS mode. Chances are you don't have such a system, but it's possible you do.

Note that the CSM must be active for it to be useful, but activating it does not (usually) guarantee that it will be used. This is what makes switching boot modes from one boot to the next, without mucking with firmware settings, possible. That said, if your computer has nothing but BIOS-mode boot loaders installed, booting in EFI mode becomes impossible (unless or until you plug in an EFI-bootable medium or install an EFI boot loader). Once again, I'd like to emphasize that there are subtle (and not-so-subtle) differences between computers, which makes providing generic advice very difficult.

As a practical matter, this information is largely academic for you. Given an existing Windows installation in BIOS mode, you should probably install Ubuntu in BIOS mode, too. The trick is to know the mode in which the installer boots. That information isn't exactly identified in flashing red letters, so it's easy to boot in the wrong mode and not realize it. You may want to drop to a shell and look for a directory called /sys/firmware/efi. If it's present, you've booted in EFI mode; if it's absent, you've booted in BIOS mode. If you accidentally boot in the wrong mode, stop and try again.

Alternatively, you could convert the Windows installation to boot in EFI mode using Microsoft's new MBR2GPT tool and then install Ubuntu in EFI mode. This is likely to be a cleaner solution in the long term, but in the short term, it adds some risk (I'm not sure how much yet; the tool is new enough that I have no idea of how risky it is) and is likely to be more time-consuming than doing a BIOS-mode install of Ubuntu.


Wireless not working Ubuntu 14.04 Lenovo g50

I believe this has been answered before.

First, open a Terminal window (Ctrl Alt T), then type the following:

    rfkill list

If it shows up to be softblocked, then try:

    rfkill unblock all

If it shows up to be hardblocked and any and all wireless switches on your laptop are ON, then there is a conflict between Linux and your BIOS. I have such a conflict on my own Toshiba Satellite, and solved it with the following steps:

First, make sure your Wi-Fi (or any wireless) switch is ON before booting. The BIOS will see it on and leave it that way. Never use 'Fn + F8' or any other methods to turn off the wireless. Use Ubuntu's built-in soft methods instead - that is, by clicking on the icon in the top-left of your screen.


Why won't my ethernet connection and wireless conection work on my Dell inspiron 1521 laptop after installing Ubuntu 16.04.1 LTS?

Do:

sudo apt-get purge bcmwl-kernel-source

Reboot and your ethernet should work, what happens when the sta driver is installed it blacklists the b43 driver for which I suspect your wireless device needs and the b44, ssb driver for the ethernet device and the above command removes the sta driver and the blacklist of the b43, b44,ssb drivers all at once.

Then do:

sudo apt-get install firmware-b43-installer

Reboot and wireless should come on.
The above command installs the correct driver.


sudo gem install rdoc

Then

sudo gem install jekyll

you can see the answer at https://github.com/mojombo/jekyll/issues/762


The IGV program started for me, these were the steps I took:

I uninstalled my version of Java and installed Java 8.

$ java -version
openjdk version "10.0.2" 2018-07-17
OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4)
OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4, mixed mode)

$ sudo apt remove openjdk*

$ java -version
bash: /usr/bin/java: No such file or directory

$ sudo apt update

$ sudo apt install openjdk-8-jdk

$ java -version
openjdk version "1.8.0_191"
OpenJDK Runtime Environment (build 1.8.0_191-8u191-b12-0ubuntu0.18.04.1-b12)
OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)

$ cd  Downloads/IGV_2.4.16
~/Downloads/IGV_2.4.16 $ ls
igv.command  igv.sh  lib  readme.txt

$ chmod a+x igv.sh  //Made the script executable
$ ./igv.sh  //Execute the script and start the program.

Hope this works for you.


Trying to make sure my system is updated properly. Ubuntu20.04

Ubuntu 20.04 Focal Fossa uses - like its ancestors - apt

Before you can upgrade your running system you need to update the package-cache for the repositories that are enabled on your system, by using:

sudo apt update

Once that is done, you have to upgrade - meaning applying the newly found patches to your system, by using:

sudo apt full-upgrade

This should be it, except if you are using packages that are not supported anymore and/or you made manual changes to packages that were regularly installed via apt from your current repositories/sources; In that case, you would have to use:

sudo apt upgrade

The difference to sudo apt full-upgrade is that sudo apt upgrade does not remove packages from your system; which would be done for example because those non-standard packages reached end-of-life, were replaced by another (meta-) package or do break the dependency chain, which you might have willfully ignored.

If you are new to Ubuntu, Distros based on Debian (using apt as a package manager) or in general to GNU/Linux Distributions, you can ignore the alternative method, namely sudo apt upgrade, just use the first two commands mentioned:

sudo apt update && sudo apt full-upgrade

[ The && just chains commands, so you can write/copy-paste this one-liner.]


Unable to reach Landscape GUI in browser

Setup instructions for Landscape Dedicated Server include steps to install the service via Juju, see:

https://help.landscape.canonical.com/?action=show&redirect=LDS


That page tells you its packages:

ffmpeg: Multimedia player, server, encoder and transcoder (transitional package)
ffmpeg-doc: Documentation of the Libav API (transitional package)
libav-doc: Documentation of the Libav API
libav-source: Patched Libav sources
libav-tools: Multimedia player, server, encoder and transcoder
libavcodec-dev: Development files for libavcodec
libavcodec53: Libav codec library
libavdevice-dev: Development files for libavdevice
libavdevice53: Libav device handling library
libavfilter-dev: Development files for libavfilter
libavfilter2: Libav video filtering library
libavformat-dev: Development files for libavformat
libavformat53: Libav file format library
libavutil-dev: Development files for libavutil
libavutil51: Libav utility library
libpostproc-dev: Development files for libpostproc
libpostproc52: Libav video postprocessing library
libswscale-dev: Development files for libswscale
libswscale2: Libav video scaling library

ffmpeg is still used as the trasitional name for libav. Yes I know they're not really the same thing any more (one's a fork) but they're incorrectly named. I'm not sure you can get an old-fashioned ffmpeg build any more.

In short:

sudo apt-get install ffmpeg


Ubuntu 13.04 installed but always start only Windows 7 and no option for ubuntu

I'm assuming that you have installed Ubuntu by using a bootable USB. If you used a CD, just substitute every "USB" with "CD".

Okay, there are several ways to fix this. However, I like the following method because it gets you familiar with Ubuntu if you haven't used it before. This method uses a utility called Boot Repair, which tries to fix problems when booting Ubuntu and/or Windows.

Step 1

Power off your computer. Plug in the USB you used to install Ubuntu. Power on your computer. Boot from the USB, as if you were going to install Ubuntu.

Step 2

When it loads up, choose "Try Ubuntu". This will open up Ubuntu for you. However, this is not the Ubuntu that you installed, it's just Ubuntu LiveCD, which is running from your USB.

Step 3

Connect to the internet.

Step 4

Open up a terminal (Ctrl+Alt+T). Type in the following and hit enter:

sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update

When it's done, type the following and hit enter:

sudo apt-get install -y boot-repair && (boot-repair &)

When it's done, a window should pop up, called the Boot Repair.

Step 5

Hit "Recommended Repair" in the window that pops up. When it's done, note down the URL (paste.ubuntu.com/XXXXX). Then restart your computer (don't forget to remove the USB so that you don't boot from it again. I think at some point when restarting, it'll instruct you to remove it anyways).

If the above did not work, post that URL here so we can further assist you.

All the above information was taken from here.


HDD data recovery from a formatted ext4 into fat32

Your ext4 filesystem lost its first 32G with the FAT32partition at the beginning of the disk.  You could try to reset  the partition table to what it was originally, and see if any disk recovery tools can find anything (might work if they can find a duplicate superblock).   If that doesn't work, you can try to make the partition table have a 32G, the rest of the ext4, and the ntfses and see what the recovery tools pick out of the chopped off ext4.  Worst case, you've lost the filesystem, and just have the data, which if it's text, in theory you could use dd to copy the raw data into files, split them up into editable pieces, use the strings program to find interesting pieces, and use an editor to pull out the files you recognize.  Not a pretty scenario, but if you REALLY need something, it's possible.

Certainly use the same program you originally used to set up the ext4 partition.  So your default starts will be the same and when you give it a size of 800G, the G is interpreted the same way so the size will be the same.  Now try the recovery tool on that partition.  It may well be very confused with 32G of FAT32 filesystem sitting at the begining of the ext4 filesystem, but see what it finds -- The hope is the FAT32 format was "quick" and you may even recovery some files which were in the first 32G.  If not much of interest is found (like just the Microsoft recovery files), try to help out the recovery tools by eliminating that FAT32 filesystem. Do that by putting it into its own, new partition.  Now the second partition starts when the FAT32 ends, but the filesystem on it has had its beginning chopped off, losing those files, but the rest of the files should be OK, just hard to access, since the filesystem is broken.  Try the recovery tool again, and hopefuylly it will find the remaining files in that broken filesystem.  Good Luck.  Backups are such a nuisance, until you have to go through the effort of recovery without them, then they don't seem so bad after all.


You need to start the service on the ubuntu server, just use the following command

service sshd start


Can I make a script wait for a key press when it has opened itself in a new terminal window?

Cannot reproduce. This code

#!/bin/bash
if [ ! -t 0 ]; then x-terminal-emulator -e "$0"; exit 0; fi
echo "new window"
read -n1 -r -p "Press any key to continue..." key
echo bye

when run with ./foo.sh </dev/null opens in a new terminal and waits for a key press.

You'll need to be more explicit about your code.


What is a good fast CD Audio Ripper for my Lubuntu System?

I installed Audacity! I am just cutting the audio I want. Got it!


It turns out that I simply needed to manually change container formats to allow Opus to be used. On the summary tab, I simply changed from MPEG-4 to Matroska.


GPU fan spins like crazy in 12.10 on HD 6870

Try to install kernel 3.7.0.

I installed Ubuntu 12.04 and had the same problem with a 5750 card, constant fan noise seemingly 100% fan speed and high temperature (I've had a maximum of 70 degrees!).

Installing kernel 3.7.0 along with fglrx gave me an almost silent computer and a maximum temperature on heavy load of +/- 55 degrees Celsius.


Overlapping gnome-terminals in second monitor

The window placement is defined by the "Place Windows" Compiz plugin.

Try to change the default "smart" setting with "Pace accross all outputs".

Type in a terminal the following command to change the placement behaviour:

dconf write /org/compiz/profiles/unity/plugins/place/multioutput-mode 3

To restore the default setting:

dconf write /org/compiz/profiles/unity/plugins/place/multioutput-mode 0


Which of these are Ubuntu partitions I can safely delete from Windows?

Unless you have installed a third operating system, these are your Ubuntu partitions:

Right-click to remove these partitions one-by-one, and then right-click the first (C:) to extend it across the unallocated space OR create a new partition in there.

Use Windows' diskpart tool to get more info without booting a LiveCD

You can get some more information on the two 8 GB partitions from within Windows by using the diskpart command:

Open a command-prompt as administrator.
Type diskpart, you will get a prompt.
Type select disk 0, and then select part 3
Type detail part, and you should get something like this:

Partition 3
Type  : 82
Hidden: Yes
Active: No
Offset in Bytes: 442499072000

Type 82 is swap, while type 83 is regular Linux (ext4, etc.). Do the same for the fourth partition, with select part 4. If either of those are NOT type 82/83, you should boot a LiveCD and investigate further with gParted as Eliah Kagan's answer recommends.


Unable to access my domain (BIND9 issue)

is mbnoimi-pc running bind9? if its not try nslookup my.lan 192.168.0.74 if that works you will need to update /etc/resolv.conf to use your bind9 server


Removing Grub2 and reverting back to windows 8 boot loader

Bootsect is for MBR drives, since you have Windows 8 I would assume you are using UEFI. Before doing a repair you should find out how many UEFI partitions you have and where the Ubuntu one is currently stored or you might end up unable to boot Ubuntu or Windows.

Install Windows 8 Bootloader ON UEFI System:

bcdboot C:\Windows /s S: /f UEFI

Additional Readings:
http://technet.microsoft.com/en-us/library/hh824874.aspx


Lazy right management for package installation

Here goes oneliner:

   dpkg -l | grep packagename | wc -l

If it results in zero, this package is not installed.


How to connect a Nexus 10 to transfer files?

I don't know if this will work on the 10, but what I did for my 7 was installed a program called gMTP. It's kind of slow and glitchy, but it works. I don't fully understand exactly why it doesn't just open like a regular flash drive though.


Install Wine on Ubuntu 13.04 running from a Live USB?

Welcome to Ask Ubuntu! Try to do the same in a Ubuntu 12.04.2 LTS Live USB. But I don't recommend you to use a MBR repair tool for Windows in Wine in a Live USB (personally). There will be a solution for your problem with GNU/Linux tools.

I recommend you Ubuntu 12.04.2 LTS because is the second version of Ubuntu 12.04, which is more tested and more stable than 13.04. And I don't recommend you to use the program EasyBCD in Wine over a Live USB because Wine is not suposed to manage the ext4 format as a NTFS, then, what I think is going to happen is to "repair" a simulated C:/ disk drive inside .wine folder. That's why I think that you need a tool for GNU/Linux or a Windows Boot Repair Disk (if you are doing all of this to repair the Windows boot sequence).


xmodmap keyboard changes stop working after Logout and Login again

I found a way how it works.

I created a ~/home//startup.sh
This I launch with Autostart from Lubuntu.

#!/bin/bash
sleep 5
xmodmap keymods &
exit 0

I need to use a 5 seconds delay.


When installing I'm given the option of encrypting my home folder -- what does this do?

Simply

Encrypting your home folder doesn't actually make your computer more secure - it simply makes all the files and folders in your home folder more secure from unauthorized viewing.

Your computer is still "vulnerable" in a security standpoint - but it becomes very difficult for your content to be stolen (unless the attacker has your password).

You won't need to actually enter your password any more than you normally do - when you log in to your computer your files are seamlessly decrypted for just your session.
There is a possibility (depending on your computers hardware) that this will affect the performance on your machine. If you're worried about performance more than security (and you're on an older machine) you may wish to disable this feature.

Technically

Ubuntu uses "eCryptfs" which stores all the data in a directory (this case the home folders) as encrypted data. When a user is logged in that encrypted folder is mounted with second decryption mount (this is a temporary mount that works similar to tmpfs - it's created and run in RAM so the files are never stored in a decrypted state on the HD). The idea is - if your hard drive is stolen and the contents read those items aren't able to be read since Linux needs to be running with your authentication to create the successful mount and decryption ( The keys are SHA-512 encrypted data based of several user aspects - the keys are then stored in your encrypted key ring ). The end result is technically secure data (as long as your password isn't cracked or leaked).

You will not have to enter your password any more than usual. There is a slight increase of Disk I/O and CPU which (depending on your computer specs) may hinder performance - though it's quite seamless on most modern PCs


Cant boot into OS using YUMI multi boot from USB

I'd suggest contacting the publisher of YUMI Multi Boot since the BACKTRACK5 distro is not yet supported. Some distros, sad to say, don't work well with multi-booting from a USB FlashDrive.


Ubuntu 14.04 log-in fails, in VirtualBox, seems to be a libGL problem

I had the problem after I run startx while I had root permissions.

I solved the problem looking at this post

Basically you do

cd ~

and then

sudo chown username:groupname .Xauthority

where username and groupname has to be changed accordingly


Great documentation of what the various options mean (and also a somewhat insanely clever approach around scripting the expert-recipe) https://www.claudioborges.org/?p=733

Example implementing gpt https://gist.github.com/robertstarmer/7332658

I feel your pain WRT preseed and partman.


How can I install the Faenza icons for Libreoffice on 14.04?

You can get the Sifr icon set (very similar to the Faenza set depicted in another answer):

Much more simply by using the PPA available for Ubuntu 14.04:

sudo apt-get install libreoffice-style-sifr

To chose this icon set, then go to Tools > Options > LibreOffice > View and then select "Sifr" under "Icon size and style" drop-down.


I have found the solution to the problem myself:
cd /path/to/your/owncloud
wget https://gist.github.com/VicDeo/bb0689104baeb5ad2371d3fdb1a013ac/raw/04bb98e08719a04322ea883bcce7c3e778e3afe1/DoctrineMariaDB102.patch
patch -p0 < DoctrineMariaDB102.patch

Source: https://github.com/owncloud/core/issues/28695#issuecomment-332174798


Netflix error M7703-1003 with Chrome in ubuntu

I just got same error M7703-1003 with Netflix on Chrome and Ubuntu 16.04.
Problem have been solved like this:

close Chrome, and then RESET chrome profile (by doing a back-up of current profile):

cd ~/.config/google-chrome/
mv Default Default-bkp

restart Chrome: it is opening on new fresh profile.
inside Chrome, add the "netflix icon":

3.1 go to Netflix chrome plugin

3.2 go to chrome://apps, right click on Netflix icon and select Open as Window and Create Shortcut

Now Netflix is back available in the Dash

Sources:
Creation the fresh Chrome profile
and Creation of the Netflix icon in the Dash.


Do I need Bios update for remote access on my HP EliteBook laptop, or should I remove it if I'm worried about being hacked?

Hello and welcome to the Ask Ubuntu forums!

You don't need a BIOS update for remote access to your computer. If you use tools like SSH with VNC or the TeamViewer application you have all the remote access you need without any special BIOS. So no you don't need it. Except your laptop allows for control at boot, but I don't think so. Never heard of it.


Using a value with trailing spaces in a variable, keeping the spaces

Unlike some other languages, bash reads quotes from left to right, literally. The first quotation mark sets the basis for the subsequent characters, which will abide by its rules until a matching quotation mark terminates the quote. In that sense, you could say that bash does not  nest quotes.
example:
'ACTION=="change",KERNEL=="'  "$drive_number"  '",SUBSYSTEM=="block",' ...
^ string one---------------^  ^ string two--^  ^ string three--------^

The complete line will look something like this:
udev_insert='ACTION=="change",KERNEL=="'"$drive_number"'",SUBSYSTEM=="block",'"$drive_model"',ENV{ID_CDROM_MEDIA_'"$env_ammend"'}=="1",ENV{HOME}="/home/'"$install_user"'",RUN+="/bin/systemctl start '"${env_ammend}_ripping.service"\"

You could also use += operator to append to a variable:
udev_insert='ACTION=="change",KERNEL=="'
udev_insert+="$drive_number"
udev_insert+='",SUBSYSTEM=="block",'
...


How can I have inertia scrolling for my touchpad?

I believe the closest we have in Ubuntu is the 'Natural Scrolling' by Chalarampos. Natural Scrolling allows the direction of scrolling to be toggled.

Natural Scrolling has the following dependencies: (Click on the link to install)

couch-db python-desktopcouch-application gawk

Then download the .deb file and install it.

dl.dropbox.com/u/1111373/NaturalScrolling/naturalscrolling_0.2.4_all.deb


Login Screen hangs after entering password

Using recovery mode can help you.  Use this mode only if your system is unbootable. It is also recommended that you make backup of important data.

  Start Computer / reboot computer
  Put your Ubuntu install CD
  Make sure BIOS is set to boot from CD
  Now booting will start from Ubuntu install CD
  You will see various option screen - select Recover a broken system

  You will system is booting in to rescue mode; system will ask about
  Network and other information. This is required to setup rescue
  environment.

  Now you will prompted to select root partition or device.

  Next it will try to mount root device and it will notify the same.

  Now you will see common rescue mode option such as Reinstall GRUB or
  open / execute a shell etc.

  Now you are in rescue mode.

Source: http://www.cyberciti.biz/faq/howto-boot-ubuntu-linux-rescue-mode/

To Delete Theme:

  Your custom themes are stored in the directory:

  ~/.themes

  Where ~ is your home directory path (/home/username).

  Themes are stored in their own folders under that directory, so to
  delete one, simply delete the folder (which is the name of the theme
  you want to remove).

Source: http://ubuntuforums.org/showthread.php?t=453879 (post #2)

Now depending how you installed the theme you may be able to use the

sudo apt-get remove

command.


Ubuntu Software Center not opening in Ubuntu 14.04 LTS

Not sure about your issue but you're not already aware you can also install apps by using

sudo apt-get install (application name)

Sorry that I can't solve your issue.


Desktop environments and ubuntu upgrades

Each desktop environment has its own configurations, some part of them may not work together perfectly or there might be some conflicts, etc.

Each Ubuntu flavor has been designed to work as best as it can with that specific desktop environment, there are a lot of configurations and customization has been made to them.

It's up to user who decides which one is the best for him.

There is no combined image because nobody going to use it and it's going to have a huge size, instead! there is a network installer image, which make you able to choose your desired DE in installation process.

Support is important, it's the amount of time which you receive update for your installed packages, these updates solves a lot of problems, bugs, security issues etc.

And you can upgrade to a newer version.


Ubuntu Gnome having all app icons in top bar

After some more research and found some part of issues I've found this steps that fixes the problem

First thing we need to do is to remove all indicators that comes with Ubuntu but we don't actually need. Source

indicator-application
indicator-appmenu
indicator-bluetooth
indicator-common
indicator-datetime
indicator-keyboard
indicator-messages
indicator-network
indicator-power
indicator-printers
indicator-session
indicator-sound
indicator-transfer
indicator-transfer-download-manager

Or by one command line

sudo apt purge indicator-application indicator-appmenu indicator-bluetooth indicator-common indicator-datetime indicator-keyboard indicator-messages indicator-network indicator-power indicator-printers indicator-session indicator-sound indicator-transfer indicator-transfer-download-manager

When this is done I suggest to reboot your session or run this command to stop the current application indicator services that doesn't work Source

killall indicator-application-service

You now need to install the gnome-shell-extension-appindicator and TopIcon Plus Extension

The first extension is made by Ubuntu to show the app indicators in the Gnome Shell and the second extension will allow some external apps like Discord or Skype to show their indicator in the Gnome top bar.

When both extensions are installed, you need to enable them in the Gnome Tweek Tool or by going in the settings and finding the extension section.

Now everything should be working properly and without any issue. It is still not the best solution but the indicator section in Gnome is messed up a bit since the new release of Ubuntu 17.10. You can also change the settings of the Topicons Plus extension to make it look like the "Default" Ubuntu one.


PulseAudio unable to detect Bluetooth Headset

Run the command gksudo pactl load-module module-bluetooth-discover and see if that helps.


When I installed Ubuntu my windows 8.1 does not load?

You can try using Boot-Repair which attempts to automatically fix common booting problems (such as the one you're having). However, you'll need to run it on a Boot Disk.


Launch Files and open its Preferences:

Go to the Behaviour (tab) and check "Show action to create symbolic links" under Link Creation.

Right click to create a link to a file or folder should work now.


Create Boot-Repair-Disk would be better option. You can download it here.


I found a way to monitor single files:
The tool inotifywait does exactly what I needed!

inotifywait -e modify /for/bar/file | while read t; do
 if t ~= *test*
[...]


what free percentage is good for a partition to maintain?

While it would be impossible to give a fixed percentage of space you should keep empty, following points may help you to find a range. Also note that most factors depend upon the net condition of drive, rather than the partitions.

Fragmentation
Linux Fragments very less, so this should be a very vague issue.
Performance.
Again, there would be very less an issue of performance. The speed would more depend upon the read write speed of disk than on how much it is filled. Also the minor effect, if any, would be considered only for servers, not for personal computers. You may choose to use SSD for better performance.
Backup
It is better to backup data on a separate drive, so that you won't lose data in case of drive failure. So this should not be a issue.
File overwriting
When you delete files, they are not really deleted, but just removed from the index(look at man shred). If you have a filled drive, you have a greater chance of overwriting your old deleted files, thus increasing security.

Now having considered these factors. I would suggest,

/boot,if you decide to have a separate one, should have enough space. Maybe a extra 10GB should suffice.
/home would be better have as much as it can, as this will serve you in case

You need to copy large files in case of an  emergency(a Hard drive is failing)
You have to use the partition as a transition device for transferring files from one device to other.

I would recommend using the ext4 filesystem, for reason that Ubuntu and most linux would probably support it better than anything else. It also has some features which may not be in others(eg. less defragmentation)


package linux-image-extra-3.19.0-65-generic is not ready for configuration cannot configure (current status `half-installed')

The error on the top is not generally fatal (just for the given repository), it means that apt cannot retrieve anything from the repository website (got 404). Maybe the repo have changed the URL or have a local problem (right now there is no /ubuntu/ on linuxtrack.eu).

Half-installed is a pretty bad shape for a package, try to manually reinstall by

dpkg -i /var/cache/apt/archives/linux-image-extra-3.19.0-65-generic*deb


I have 12.04 & if you think 12.10 is slow , 12.04 is turtle for me it takes 13 seconds to boot on a laptop with ivy bride core i5 CPU ! I think wait 20 days for 13.04 release & try it .


Ubuntu installer not detecting Windows installation and disk partitions

Here's the source of your problem, from your parted output:

Error: Can't have overlapping partitions.

Your disk's one primary partition (/dev/sda1) resides entirely within your extended partition (/dev/sda2). This is illegal. This invalid layout was probably created by the Windows partitioning tools, which often do this sort of thing with disks that have extended and logical partitions.

Chances are my FixPart utility, which comes with Ubuntu, can fix the problem; however, you must be careful about how you go about doing this repair. Specifically:

Windows normally insists on booting from a primary partition. Thus, you must ensure that whatever partition Windows uses for this purpose becomes a primary partition when FixParts has done its thing.
In order to create new partition(s) for Ubuntu, you must have at least one logical partition, and it must be positioned in such a way that the future Ubuntu partition(s) will be adjacent to the logical partition(s). (This point assumes that all your existing NTFS partitions contain Windows data. If you intend to convert one of them entirely to Ubuntu use, you might remain under the four-primary-partition limit of MBR.)
Unless I've missed something, you'll need to resize at least one partition to make room for more. FixParts can't do this. Resizing the partition in Windows is normally advisable; however, as I've already noted, the standard Windows tools tend to make a mess of things when logical partitions are present, so you may want to use a third-party tool or the Ubuntu installer to do this job. (I don't recall offhand how good the Ubuntu installer is at resizing partitions. GParted should be able to do it -- but be sure to fix the overlapping partition problem before you try!)
Do not create new partitions for Ubuntu using the Windows tools; they're likely to convert to a Logical Disk Manager (LDM) layout (aka a dynamic disk setup), which will be a new set of problems for Ubuntu installation. If you use Windows tools to shrink existing partition(s), leave the resulting space unallocated and let the Ubuntu installer create new partition(s) in that space itself.
There's always a chance that something will go badly wrong when repartitioning the disk. This is doubly true when your disk is already damaged, as yours is. I therefore recommend doing a full backup, or at least backing up your user files, before you do anything else.

Also, although you note that UEFI boot is specified in your firmware, your disk layout clearly indicates a BIOS-mode installation of Windows. When dual-booting, it's almost always best to ensure that both OSes boot in the same mode, so you should install Ubuntu in BIOS mode. Note that the boot mode (BIOS/CSM/legacy vs. EFI/UEFI) specified in the firmware is often interpreted as more of a suggestion than a command, which is why you can have a BIOS-mode boot even when you've set EFI-mode booting in the firmware.

As an alternative to some of this, you might consider converting Windows to boot in EFI mode, as described in this blog post. With Windows booting in EFI mode from a GPT disk, you needn't be concerned with primary/extended/logical partition issues, since GPT doesn't recognize that distinction. It's usually easier to ensure a consistent EFI-mode boot in a dual-boot configuration than to set up both OSes in BIOS mode, too. (See this page of mine for more on this subject.) If you go this route, it's probably safest to fix the current disk setup with FixParts as a first step; however, if you put off resizing partitions until after the MBR-to-GPT configuration, FixParts will become unnecessary.


Why is Ubuntu unmounting my primary hard drive?

The dmesg output shows filesystem errors. Therefore, the message you got was probably about remounting the root filesystem as read-only, and not allowing you to write on it, until it gets fixed.

What you need to do is provide S.M.A.R.T. information for your hard disk to figure out whether the problem is actually a hardware issue. Apart from Disk Utility you can use

sudo apt-get install smartmontools
sudo smartctl -a /dev/sda

Then, any output you get from about put it on PasteBin. This will show if you have any hardware issues with your hard disk.


Additionally you can prune the backup yourself. What I did is to use:

duplicity remove-all-but-n-full 1 --force scp://mylogin@myserver/path_to_backup

from command line. Just use the information you used to create your backups from the Ubuntu GUI.


How can I allow a snap application to execute a custom script

Based on everyone's comments. It sounds like in order to give snap permission to execute ffmpeg and my script, I would either need to A) redo my implementation as a "writable snap" per the nextcloud-snap documentation, or B) stop using snap altogether (I'm not tied to snap, but I'm also not interested in redoing my nextcloud installation at this time). So I can't use my script through nextcloud's workflow feature as-implemented. However, I did find a workaround for my scenario. My script just needs access to run ffmpeg on my stored nextcloud data, and the snap does allow me to designate an external data directory where my nextcloud data can be stored. So I did the following

I copied my data to an external directory, pointed snap to use that data directory per These instructions

Set up an incron job to execute my script when a new file is uploaded via nextcloud. My incrontab entry looks like this /mnt/nextcloud/data/directory/ IN_ATTRIB ~/bin/my_script.sh $@$#

As the final step in my script, I instruct nextcloud to scan for new files in my destination directory by running /snap/bin/nextcloud.occ files:scan --path="username/videos/converted (note: path is relative to the nextcloud username)


rcconf package alternative in bionic beaver?

On Ubuntu 18.04 LTS you can use SystemD GUI module from KDE Control Center (packaged as kde-config-systemd). Its description is below:

  KDE control center module for Systemd
   This package is a KDE Control Center module for the systemd daemon.
   It is capable of starting and stopping systemd units.
   In addition, it allows for the configuration of several systemd
   parameters.

You can install with:

sudo apt install kde-config-systemd kde-cli-tools

And then run with:

kcmshell5 kcm_systemd

It looks like:


How to edit "~/.profile" to change file sort order

In Ubuntu, files that start with a . are hidden by default.

~ is a symbol for your home directory located at /home/username (vs C:/Documents & Settings/Username in Windows (iirc).

This is where your Documents, Downloads, Pictures, Videos folders are. In Linux file addressing there is no leading drive name (C, D, F etc). This means that the file you are looking for is located in /home/username/.profile

You have two options for editing the file.

Visit your home directory, and press CTRLH to show hidden files, find .profile and open it with your text editor and make the changes.
Use the terminal and the inbuilt command-line file editor (called nano).

Open Terminal (I think CTRLAltT works as a shortcut)
Type: nano ~/.profile
Use the keypad to move your cursor to the bottom
Add export LC_COLLATE=C in a new line
Press  CTRLX to exit
Press Y to confirm changes, then press ENTER to save.


How to install Perl Switch.pm module required to build WebKit-GTK?

If you want to install the Switch.pm Perl module into your system Perl config, there are two methods of installing it:

Install it through the Ubuntu repositories.
Install the .pm through CPAN.

At this time, both will provide the current version of this module(2.16).

Installing Switch.pm using the Ubuntu repositories:

From the command-line, the installation can be completed by running the following command from the terminal (Ctrl-Alt-t):

sudo apt-get install libswitch-perl

Within Synaptic, right-click on the libswitch-perl package, select Mark for installation, then click on the Apply button.
Within the Ubuntu Software Center (USC), search for the phrase libswitch-perl, highlight the package and select install:

Installing Switch.pm using CPAN:
If you would prefer to install this via cpan, follow these instructions:

Open a terminal(Ctrl-Alt-t).
Enter the command cpan.
At the prompt cpan[1]>, type install Switch.
Once completed, Type exit.

The Switch.pm Perl module will now be available for you to use in your scripts.


How to make an NTFS partition on HDD (12.10)

Install GPart on your Ubuntu.

Open Gpart and select your HDD and make some free space by resize/delete option.

make usb drive as bootable and boot XP from your usb drive.


How can I save to an external HD, using IDLE3?

Let's make some wild assumptions.

Your "data" partition partition is ntfs file system for Windows.
It is not automagically mounted in the Ubuntu system and therefore invisible from within the system.

To make data on the 'data' partition available from within the Ubuntu system the partition needs to be mounted.  It could be mounted as needed, or for convenience can be mounted on system startup.

Ubuntu's Manual Configuration instructions are as follows:

First, you need to find the device locations of the partition(s) you wish to mount. Open a terminal and run:

sudo blkid

For illustration purposes, an example output from a computer setup with a Vista/Ubuntu dual-boot and shared NTFS data partition is shown here:

/dev/sda1: LABEL="Recovery" UUID="B23613F43613B875" TYPE="ntfs"
/dev/sda2: LABEL="Windows" UUID="38CE9483CE943AD8" TYPE="ntfs"
/dev/sda3: LABEL="Data" UUID="519CB82E5888AD0F" TYPE="ntfs"
/dev/sda5: UUID="00d7d951-2a35-40fd-8e5d-411bb824ff3b" TYPE="swap"
/dev/sda6: LABEL="Ubuntu" UUID="6044b1d0-208e-4ab3-850d-03a92e1516fc" TYPE="ext4"

The first three partitions, all NTFS, are the ones that concern us here. There are no FAT32 partitions. In this instance, all three NTFS partitions have partition labels, which makes it easier to identify the purpose of each. If your blkid output does not include partition labels, this means that the partitions do not have labels and you will have to determine which partition you wish to mount by another means. Of the three NTFS partitions, we are going to configure /etc/fstab with only the third, the Data partition. Partition /dev/sda1 is the OEM manufacturer's recovery partition and should be left unmounted, or as described below. Partition /dev/sda2 is the Windows C:\ partition and is best not included in /etc/fstab for the reasons described above, or mounted read-only - see below.

You will now need to create a mountpoint for each NTFS partition that you wish to mount by means of /etc/fstab. In our illustration we are going to add one entry only for /dev/sda3. From a terminal:

sudo mkdir /media/Data

In this case we have created a mountpoint with the same name – Data – as the partition label. You may use (almost) any string you wish.

Before editing /etc/fstab directly, it is a good idea to make a backup. From a terminal:

sudo cp /etc/fstab /etc/fstab.orig

Now open /etc/fstab in a text editor with root privileges. In Ubuntu:

gksudo gedit /etc/fstab

In Kubuntu:

kdesudo kate /etc/fstab

In Xubuntu or Lubuntu:

gksudo leafpad /etc/fstab

For a general-purpose read-write mount, add this line to the end of /etc/fstab:

UUID=519CB82E5888AD0F  /media/Data  ntfs-3g  defaults,windows_names,locale=en_US.utf8  0 0

Replace the UUID with the one relevant for your partition as shown in your blkid output. “519CB82E5888AD0F” will not work for you.

Also, substitute your mountpoint for “/media/Data”. In case you have a blank space in the name of the mountpoint you want to use like "New Volume" instead of "Data" located in "/media" use "/media/New\040Volume". The space character is created by using "\040" in the fstab.

You will also need to change the “locale=en_US.utf8” option to one suitable for your location and language if you are not in the USA. You can determine your locale with this terminal command:

locale

Or for a list of all locales available on your system:

locale -a

Now save your edited /etc/fstab and close the text editor. The partition(s) you have configured will be mounted the next time you reboot, but to mount them now:

sudo mount -a

Now when you go to save/retrieve your data, written from the Windows system, it will be at the location specified in your /etc/fstab mounting instructions.

As a personal preference, rather than have the mount point be /mnt/Data or /media/Data, e.g., I used mount points just off root, /Data e.g.. because it saves 4-5 keystrokes or an extra click.


How do I connect remotely to an Ububtu Gnome desktop?

You can do remote control regardless the version of Ubuntu you use. That depends on the Default Display Manager you have and the protocol XDMCP. You can find how to proceed on the ubuntu's wiki: https://wiki.ubuntu.com/xdmcp


Disk image in read-only with persistent storage image

I am still not sure why you want two containers filled with data and why one of them should be read-only.

Alternative 1: The operating system is in one of them and the persistent storage of data is in the other
Alternative 2: There are similar data in both, but the newest data are in the second one, which is mounted read-write. In this case you could run some kind of backup or synchronization between the two drives at certain intervals to update the drive that is usually read-only.

I would solve this problem with a persistent live system installed in an internal drive (or in an SSD connected via a USB adapter or box), and have a backup routine, to backup the content of the file or partition for persistence.

Then it would be straightforward to restore the system to what you intend to store in the 'first container', that you want to mount read-only.

Links:

help.ubuntu.com/community/mkusb

help.ubuntu.com/community/mkusb/persistent

Backup & restore of the whole casper-rw partition


Finding router Private WAN IP through bash

as far as I know, that WAN IP Address is the local IP your router is getting from your ISP router/OTU/Modem in their network (I suppose you have 2 routers? ISP and personal?)
Think about it like this: you have your personal router, which creates its own network, the router IP is something like 192.168.1.1, and your devices connected to that router could get local IPs like 192.168.1.2, 192.168.1.3 and so on. And it's the same thing with your ISP router, it has its own IP, lets say something like 10.1.100.1 (this is the information presented in the Default Gateway field in your screenshot), so your ISP router has its own network, and devices connected to it (like your personal router) would get local IP's like 10.1.100.2 just like it happens in your personal router's network.
So basically saying, that red marked IP in the screenshot is just the local IP your personal router is getting from your ISP router.
So if you have a computer A connected to your personal router, I'm not sure but I think you can not find the IP's of the devices connected to your ISPs router from that computer A.
But if you had a computer A connected directly to your ISPs router (cable or wifi), then you could run the command nmap -sn 10.1.100.0/24 (of course you have to adapt that to your router network address and the fourth and last group of digits from the IP should be set to 0 check this guide for more info) to check the devices connected to that same network (in this case computer A and your personal router).


DNAT redirecting to specifc port is not working

Test this command:

ssh username@IP_ADDRESS -p 10003


Ok I figured it out. The link you provided did seem to apply only to LXDE/Openbox, but once I started snooping through my ~/.config folder, I found a deluge config folder.

I removed deluge, deleted the deluge folder from inside ~/.config, and reinstalled Deluge. Everything is back to normal.


Host two separate web servers on the same IP

From the Link Provided by George Kourouleas

Apache Reverse Proxy

Is what I was looking for

NameVirtualHost *:80

<VirtualHost *:80>
  ServerName foo.com

  DocumentRoot /srv/www/default

  <Location "/">
    Order Deny, Allow
    Deny from all
    Allow from all
  </Location>
</VirtualHost>

<VirtualHost *:80>
  ServerName fooa.com

  ProxyPreserveHost on
  ProxyPass / http://server2/
  ProxyPassReverse / http://server2/
</VirtualHost>

<VirtualHost *:80>
  ServerName foob.com
  ServerAlias fooc.com

  ProxyPreserveHost on
  ProxyPass / http://server3/
  ProxyPassReverse / http://server3/
</VirtualHost>

Is perfectly what I wanted along with mod_proxy


Ubuntu-make should have you up and running in no time... The command to do it is:

umake android

It should install the SDK, configure it, and install Android Studio.


i was trying to install ubuntu on virtualbox, but i'm ending up with the screen mentioned below. please let me know if u have solution for this

I hope you have finished the installation, because the screen you saw is the initial screen before the LiveCD starts. It allows to pass additional option to kernel. After a moment the booting process continues.


install Flask as a virtual environment whith virtualenv.py in 12.10


DELL INSPIRON 13 7000 - Touchpad problem

Iv managed to fix this on Fedora by installing touchegg

On Ubuntu touchegg should make it work. (sudo apt-get install touchegg)

It's because dell doesn't use synaptics touchpad, they use elantech, with a ps/2 interface.


How to mirror only required update's from apt-update repo

You probably want to use apt-cacher.

Here is a link to the wiki page:
 https://help.ubuntu.com/community/Apt-Cacher-Server


How to show only hidden files in Terminal?

The command :

ls -ld .?*

Will only list hidden files .

Explain :

 -l     use a long listing format

 -d, --directory
              list  directory entries instead of contents, and do not derefer‐
              ence symbolic links

.?* will only state hidden files


Ubuntu doesn't boot after installation even with boot-repair

I guess you've managed to find a way round this in the 9 months you have been waiting for an answer but it looks similar to a dual boot problem I had with a uefi system.

The boot process is looking for a bootloader in the MBR but the boot files loaded all look to be .efi and these need to operate in a GPT formatted disk.

I think the problem might well have started in your BIOS settings - more correctly UEFI. A lot of installation instructions tell you to turn on a legacy boot mode but this requires a DOS-type of disk partition structure and the conflict between the two confuses the installer.

If you are able to set your 'BIOS' to uefi booting (and my installation eventually coped with secure boot too) then it would be worth reinstalling as the installer should pick this up and confirm that it's placing the bootloader in a 'system' directory (this is from memory, sorry, but in my case it was partition 2), otherwise it asks you where you want it and you (well, I) can easily give the wrong answer.

In my case I also tried to do a uefi install with a 32-bit system, and I later found that 64-bit was mandatory, but you look as though you have that sorted.

I found the following 2 articles to be very helpful and authoritative in describing how to go about a UEFI installation:

https://help.ubuntu.com/community/UEFI

Allowing boot of Ubuntu on a Acer Aspire v5-531 with UEFI

I hope these prove helpful - but in 9 months you have either been successful or given up on Linux altogether in all probability!


Tested in Ubuntu 18.04.3

sudo touch /etc/dconf/profile/user
sudo -H gedit /etc/dconf/profile/user (change gedit if you use different editor)

and paste below content

user-db:user
system-db:local

sudo mkdir /etc/dconf/db/local.d
sudo touch /etc/dconf/db/local.d/00-FA
sudo -H gedit /etc/dconf/db/local.d/00-FA (change gedit if you use different editor)

and paste below content [note that below favorite-apps are my own.. use gsettings get org.gnome.shell favorite-apps output in your case]

[org/gnome/shell]
favorite-apps=['chromium-browser.desktop', 'google-chrome.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Software.desktop', 'audacious.desktop', 'mpv.desktop', 'spotify_spotify.desktop', 'org.gnome.Terminal.desktop', 'libreoffice-writer.desktop', 'gnome-calculator_gnome-calculator.desktop', 'libreoffice-calc.desktop', 'gnome-control-center.desktop', 'org.gnome.tweaks.desktop', 'firefox.desktop']

sudo mkdir /etc/dconf/db/local.d/locks
sudo touch /etc/dconf/db/local.d/locks/00-FA
sudo -H gedit /etc/dconf/db/local.d/locks/00-FA (change gedit if you use different editor)

and paste the below content

/org/gnome/shell/favorite-apps

sudo dconf update
Must logout and login back to see the change

Source: https://help.gnome.org/admin/system-admin-guide/stable/desktop-background.html.en

when ever you need to change the favorite-apps, you can edit the file /etc/dconf/db/local.d/00-FA and run sudo dconf update then logout & login


bash: how to make smarter auto-complete on tab press

I'm not a git nor a bash expert, but this works for me:

git diff *$(file="$(git status -s)"; echo ${file:2})

I haven't tested yet with multiple pending files or multiple directories, but you can change and use these to work mostly like a shortcut to your file/directory.

For using the TAB key in the terminal, I don't think there's an easy way to change the terminal keys behavior based on the running command (Someone correct me if I'm wrong).


ACER Aspire V5-131-2840 brighness control with Ubuntu 12.04 LTS

So this won't totally resolve your problems, I think the problem is your system that cannot use the fn + brightness key, that but you can install this program that will use the shortcut CTRL+F11 and CTRL+F12 for the brighness

sudo add-apt-repository ppa:indicator-brightness/ppa
sudo apt-get update
sudo apt-get install indicator-brightness