yes, you could xrandr in the commandline... The only thing you need to know is the name of the monitor you'd like to connect to...
Open a terminal and execute xrandr:

xrandr -q

The answer will look like:

Screen 0: minimum 8 x 8, current 2720 x 1024, maximum 32767 x 32767
LVDS1 connected primary 1440x900+0+0 (normal left inverted right x axis y axis) 300mm x 190mm
   1440x900      60.06*+  50.18
   1400x900      59.88
   1368x768      59.88    59.85
   1280x800      59.81    60.00    59.91
   1280x720      59.86    59.74
   1024x768      60.00
   1024x576      59.90    59.82
   960x540       59.63    59.82
   800x600       60.32    56.25
   864x486       59.92    59.57
   720x450       60.00
   640x480       59.94
   720x405       59.51    58.99
   640x360       59.84    59.32
DP1 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)
DP3 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
HDMI3 disconnected (normal left inverted right x axis y axis)
VGA1 connected 1280x1024+1440+0 (normal left inverted right x axis y axis) 380mm x 300mm
   1280x1024     75.02*
   1152x864      75.00
   1024x768      75.03
   832x624       74.55
   800x600       75.00
   640x480       75.00

Since LVDS1 is the default monitor for a laptop the other

  VGA1 connected

is the external one (in my example- yours is probably another). Only the monitors that are "connected" are available!

Now execute

xrandr --output VGA1 --primary --auto

and the attached monitor will have the task bar. If you want to completely turn off your broken "primary screen" you could execute:

xrandr --output VGA1 --primary --auto --output LVDS1 --off

Please note that VGA1 and LVDS1 are examples from my old thinkpad. You need to replace them with the  monitors from the xrandr list.

This will not work on wayland, but usually the X session should be active during installation...


All menu items greyed out in Golly. How to diagnose the problem?

golly doesn't appear to support the global menu so start it without. To test this - from a terminal use -

env UBUNTU_MENUPROXY=0 golly

To adjust golly's .desktop for starting from application menu/Dash or launcher icon -

 gksudo gedit /usr/share/applications/golly.desktop

Edit the Exec= line to this, save

Exec=env UBUNTU_MENUPROXY=0 golly

If you wish to protect the .desktop from an update (unlikely), then copy the .desktop to your Home folder instead & edit as above. (may need to log out/in to take affect, usually doesn't

mkdir -p ~/.local/share/applications && \
cp /usr/share/applications/golly.desktop ~/.local/share/applications && \
gedit ~/.local/share/applications/golly.desktop


Why output redirection is not working with the mplayer command?

mplayer [] > /dev/null only redirects mplayer's stdout to /dev/null; to completely disable any output you need to redirect its stderr to /dev/null as well.

Use mplayer [] &> /dev/null instead


What tutorial are you using? There are some applications for making Linux live USB drives, like UNetbootin from the Ubuntu Software Center, that can be used to make an Ubuntu live USB for installing Ubuntu using a 1GB USB flash drive. However starting from Ubuntu 14.04 and onward, the Ubuntu iso is too large to put on a 1GB flash drive using UNetbootin.

In fact, it is possible to make an Ubuntu live USB flash drive for installing Ubuntu that is only 36MB in size by using the Ubuntu 13.10 64-bit Mini CD iso. There is more information about how to make an Ubuntu live USB flash drive using the Ubuntu Mini CD in this answer.


How to manually set a stable fan speed like SpeedFan on Windows?

This is one of those things I wish there was a nice UI for and I think it would be easy to create.  One of the advantages of Windows is most motherboard manufacturers create drivers for Windows, and in Linux someone has to reverse engineer it to get it to work.  That being said, you will need to determine whether you can get full support for your fans out of the box, or if you need to install additional drivers.  It sounds like you already have some fan control.

When you run pwmconfig, do all of your fans that you want to control stop/start when it says they should?  If they do, then you should be able to control them.  If not, you will have to look into what drivers you need to install to get those fans under your control.  I had to do some custom configuration for mine and I still don't have control of my mini fans or my extra thermometers.

When that is done, it will generate an /etc/fancontrol file.  Inside of that, take a look at what it generated.  It should tell you the paths of each thermometer and fan that is is using for fancontrol.  If you were to view /sys/devices/platform/coretemp.0/hwmon/hwmon<#>/temp1_input, you should see the Celsius temp of the first core * 1000.  Now view the files that /etc/fancontrol has for the fans (FCFAN).  One of mine is /sys/devices/platform/nct6775.656/hwmon/hwmon4/pwm5.  You can manually edit this file as root and change the fan speed for that fan.  If fancontrol is running, it will just change it back, so make sure it is off.  That should be all you need to do to manually control it.

Though I would use caution, keep an eye on your CPU temps when you do this.  Also note that the hwmon numbers can change between boots.


How to take a photo from webcam when someone attempt to open a password protected PDF?

You could accomplish this with Incron.

Install Incron sudo apt-get install incron and configure it with incrontab -e similar to adding regular cron jobs.

eg. /path/to/pdf/files/ IN_ACCESS /path/to/script.sh save and voila.

  NOTE: Do not do any action from within a incron job in a directory
  that you monitor to avoid loops. Example: When you monitor the /tmp
  directory for changes and each change triggers a script that writes a
  log file in /tmp, this will cause a loop and might bring your system
  to high load or even crash it. - Quoted from https://www.howtoforge.com/tutorial/trigger-commands-on-file-or-directory-changes-with-incron/


Which is better for a slow computer and a user who is only familiar with Windows, Ubuntu or Lubuntu?

Simple answer: in your case, Lubuntu. Its interface is pretty similar to Windows' (unlike the vanilla Ubuntu) and it's very lightweight.

Actual answer: none. If you enjoy Windows' user-friendly ways but want performance at the same time:

Ubuntu is very user-friendly and "out-of-the-box", but is a bit too resource consuming;
Lubuntu is extremely lightweight and smooth, but it lacks some essential user-friendly features. It's not focused on beauty, so do not expect any eye-candy or beautiful details. Its configuration is somewhat hard and you'll have to do complex tasks to reach simple objectives. For example, if you want to create a keyboard shortcut you'll have to manually edit scripts or get third-party software from the internet (you could do the same task with 2-3 clicks in Ubuntu).

Long story short, if you want something smooth, with high performance and at the same time beautiful, full-featured and user-friendly, stick with Xubuntu. It comes with the Xfce Desktop Environment. It's so amazing it managed to give new life to my 10 years old fighter and still kept amazingly beautiful.

If you compare its performance to Lubuntu's, the change rate is somewhat around 0. Both systems (with 32-bit i386 architecture) use about 180 MB of RAM when idle, and stay at 0-1% of CPU usage.

Xubuntu is also extremely customizable, so you can make it look (and feel) whatever you want.

That's my recommendation for you.


Audio Recorder records low-pitched voice

Until you get a proper answer to this, you might have to work around the problem.

A very easy way to do this is to adjust the audio files produced by Audio Recorder by using SoX.

Open a console and go to the directory where your audio files are stored. Then run:

sox my_audio.ogg my_audio_faster.ogg speed 1.1

I've found that 1.1 is about right for this particular problem, but you will have to play around to get it just right for you.


DrumBurp (Drum Tab editor) not working UbuntuStudio 12.04

I found a solution, In UbuntuStudio 14.04 with Wine 1.6

Download the program from: http://whatang.org/download/
Note: This program is portable, not need to install it.

Next I install timidity package
 sudo apt-get install timidity

Now use this command in a terminal:
 modprobe snd_seq

then this one
 timidity -iA -Os -B2,8 &

Then a run  DrumBurp.exe and launch it, and working fine when play with drum partitures.


epson stylus office bx305fw plus How to scan

I just got my Epson Stylus Office bx305fw plus to scan using simple scan. I plugged in to the printer/all in one via usb and the scan worked I then tried it wirelessly and it worked. I'm using Ubuntu 12.04 LTS and a thinkpad t61.I had downloaded the epson driver from here http://avasys.jp/eng/linux_driver/download/lsb/epson-inkjet/escpr/
I hope this helps.
Tiernan


Upgraded from 13.04->13.10; "Error occurred while mounting /boot/efi"

@RodSmith - Thank you for the helpful answer!

UPDATE: It was indeed this bug.  I ended up recreating the /boot/efi partition (using GParted on Boot Recovery).  I then reinstalled Ubuntu 13.10 again.  This had the downside of losing a bunch of my apps, but I was due for a house cleaning anyways.

I think Rod's suggestion of copying the /boot/efi files off, and then back again, would have been the best course of action if I wanted to salvage more.

Unfortunately, I have no idea how I ended up in this situation.  It kind of sucks that I had to bang my head against this issue for like 10 hours, but oh well.


This depens on what exactly did the realtek-driver so to your system.I guess the driver did install itself into the modules directory of your kernel. In this case you can reinstall the kernel:

sudo apt-get install --reinstall linux-image-$(uname -r)

Another option is that the driver did install itself into the update-directory in the kernel:

/lib/modules/$(uname -r)/updates/...

Here you can simply delete the module from that directory.

To find out where the driver is located use:

modinfo "Name of the kernel module"


How to diagnose or repair data SSD on Ubuntu

Since you're a Ubuntu beginner, I'll try and keep this as simple as possible. I'm going to have to make some assumptions about your knowledge level and experience, and about the exact configuration of your SSD.

Ubuntu is not able to properly mount the 2TB SSD, and normally I'd ask that you try and fsck (file system check) the drive, but instructing you on how to do this is terse, and I don't think the SSD would respond properly.

You indicate that you have backups for the apps/data from the SSD, yes? If so, try to format the SSD as NTFS, FROM WINDOWS.

If that fails, you may have a defective SSD.

If this works, boot Ubuntu. It may give a failure message when it tries to mount the 2TB disk that is normally probably EXT4 format. If Ubuntu won't fully boot because of this, you'll have to edit /etc/fstab to temporarily comment out the mount for the SSD. If it does fully boot, use gparted to lay down a new GPT partition table and EXT4 partition on the SSD. Then use blkid to determine the new UUID for the drive. You'll need to edit /etc/fstab again, re-enabling the SSD mount, and changing the UUID to the new value. Then you can mount the SSD and restore from your backups.

Does this scare you off? Do you have the experience to do this? If you have questions, please ask, but understand this IS somewhat complicated.


To disable requiring password for logon, there are a number of solutions listed in this thread here:
Kubuntu Forums - Passwordless login

To disable password for administrative tasks, run sudo visudo and ensure that the line for your user looks like this (replace 'mgodby' with your own user name):

mgodby ALL=NOPASSWD: ALL

Reference for using root sudo:
Ubuntu Community Help - RootSudo


Repartitioning Drives Properly After Install - Dual Boot

The procedure you need is spelled out in the Ubuntu wiki entry "Partioning/Home Moving".

You need to run through these steps using the UUID associated with your sda7 partition.  You can skip the step "Setup Partition" because you already have a partition there.

The procedure covers safely moving your home directory with all its data to the new partition.

I have run this procedure several times and it works great. It does get a little confusing when you get to the two sections headed "Encrypted File Systems".  Since I do not believe your file system is encrypted, just skip these whole sections. Pick up again at the heading "Check Copying Worked", run the procedure until you hit "Encrypted File Systems" again, and then jump to  "Preparing fstab for the switch".

Link-only answers are discouraged but it seems ridiculous to copy this lengthy procedure from an official Ubuntu wiki site.

If you have questions about the procedure, please come back and edit your question to include them.

After you move your home directory to the new partition, and have used it for a while to be sure that everything is OK, you can delete the old copy.  This is covered in the procedure.  After that, if you want to shrink sda5 and enlarge sda7, that will not be difficult to do.

Before you do anything related to this, I strongly suggest you have recent, tested backups of all data you care about or might care about in the future.  Setting up a virtual machine simulation of your PC and performing the steps there first would also be a fine idea.


You were right, the only remains of your Windows installation is the (U)EFI partition at the beginning of the disk (vfat). The other two partitions are Ubuntu (ext4) and a swap partition. You can see it here:

Partition    Start Sector    End Sector  # of Sectors System
/dev/sda1           2,048     1,050,623     1,048,576 EFI System partition
/dev/sda2       1,050,624 1,448,605,695 1,447,555,072 Data partition (Linux)
/dev/sda3   1,448,605,696 1,465,147,391    16,541,696 Swap partition (Linux)

I'm not sure what your question is from this point, but if you haven't made a back-up of your personal data from your Windows partition, then it will be very hard (or impossible?) to recover anything, however others might know more about data recovery than I do. (If that is your question, please make it clearer in your description.)

However, if you want to reinstall Windows, you should be able to do so from an installation drive. It is usually considered harder or riskier to install Windows on top of Ubuntu, but if you manage your partitions carefully and recover GRUB at the end of the installation process, you should be able to get the job done.

To manage your partitions before installing Windows, I suggest using GParted on a live session. See this AskUbuntu question on managing partitions with GParted : How to resize partitions?

Also, for the final step, see this article on recovering GRUB: https://help.ubuntu.com/community/Grub2/Installing#Reinstalling_GRUB_2


photorec alternative for scanning ram dumps?

:E  wow, I feel dumb, all you have to do is specify the file photorec dump.img


First, you should create a key to sign your Network Controller.
openssl req -config ./openssl.cnf \
        -new -x509 -newkey rsa:2048 \
        -nodes -days 36500 -outform DER \
        -keyout "MOK.priv" \
        -out "MOK.der"

This will create both the public and private keys. This will be useful for signing things for Secure Boot.
Now, cd into the directory where you created the keys, and then do this command;
sudo mokutil --import MOK.der

Then, it'll prompt you for a password. You could place any password you like, as this'll be extremely useful later on.
Then, reboot your computer. After rebooting your computer, the shim bootloader will execute MOKManager. If you see a Blue Screen with a prompt, you're good. Go to "Enroll MOK", after that, you should follow the menus to sign your keys. Then, you will be prompted for the password that you created for Mokutil. After that, MOKManager will save the keys, and then you should reboot again.
After so, you should be able to modprobe your driver.
Let me know if it helps.


How to scale desktop icons in 18.04, v2.0, I want smaller!

As the user CSManic explains in this Unix & Linux Stack Exchange answer, Nautilus' minimum icon size is hardcoded, so you'd need to download the source code, modify the file nautilus-icon-info.h and then (re)compile and (re)install the application.


How to install 'rar' (from command line only)

If I look at this, then I think that there is no ARM version of the rar package in the repo.


Server installation on SoftwareRAID fails with subiquity error

Update: After disabling the RAID feature and enabling AHCI mode in BIOS, installation worked. But I am curious why I need that Software RAID controller at all then ?


playonlinux installation failed how do I fix it?

Maybe the installation process was interrupted
Or do you run Synaptic, Software Center or Update Manager at the moment?
Because the apt installer is locked.

If you want to unlock it and you're not running Synaptic or something else, you should take a look here
Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?

There you find an answer how to unlock apt.

After that, you should be able to use it again and remove or install PlayOnLinux again.


Can't boot to Windows 7 after installing Ubuntu 11.10

from bootlog, it seems your 1st boot device is second hard disk. Though windows is in Hard disk 1 (sda) the bootloader for windows is located in Hard disk 2 (sdb2).

I would suggest (safest way)

Remove / temporary disable 2nd hard disk with personal files.
Use windows 7 disk to restore windows 7. Use /fixboot and /fixmbr option if automatic start up repair failed. (google a bit)
Install ubuntu. Make sure grub is installing in sda1 .
Reboot to see if both are working properly.
Reconnect 2nd Hard disk, open bios. Change boot order to boot from hard disk 1.

Optional:

Boot in windows, open disk management utility.("diskmgmt.msc"). Delete 200mb parition in 2nd hard disk and extend partition labeled as "Personal file"


Dual Booting Ubuntu 17.04 and Windows 10 NTFS partition marked as bitlocker

This problem was due to the partition in question being actually encrypted in Windows bitlocker, despite the fact that windows control panel indicated bitlocker was not enabled. from Windows 10 I used the PowerShell command Disable-Bitlocker on the partition.  This utility actually decrypts the drive and completely removes all trace of bitlocker from it so the next time I booted into Ubuntu I was able to mount the drive.

https://technet.microsoft.com/en-us/library/jj649832(v=wps.630).aspx


Files read from disk are stored in the disk cache of Linux (RAM). You do not need to configure anything, this works out-of-the-box.

If you would like have a filesystem backed by RAM rather than a disk, then you are looking for a "RAM disk" (not to be confused with the Linux ramdisk filesystem). The tmpfs filesystem stores all its contents in RAM (which could be swapped though).

The above is unlikely going to improve your PHP application performance. Depending on your application, you are better off with caching the PHP response in the webserver (or just use static HTML/JS/whatever files to avoid PHP completely).


As far as I know the Web Apps feature is currently broken. I was excited to use it as well, but after some research it seems like we're just going to have to wait it out until a fix is made.


Is Ubuntu still toxic to Macs with Fusion Drive?

Ubuntu 14.04 LTS works fine on a fusion drive. However, make sure you partition the drive using the installer and do not use the Mac version of the Ubuntu ISO. The regular version supports EFI booting which also negates the need for rEFInd.

By installing in EFI mode, Ubuntu will be available as a boot option by holding down the Option key on startup. Also, do not add any additional partitions for example, SWAP. Only create one system partition for Ubuntu since Fusion drives only support one additional partition.

Here's a short clip showing Ubuntu being selected on startup on my MacBook Pro without rEFInd and natively booting via EFI:

https://www.youtube.com/watch?v=w0RM3L8r4cE


Where to see the complete list of juju charms available?

Edit: The new location to view all charms is https://charmhub.io

Because the search is not working for you, you can find a list of the promoted charms here: http://manage.jujucharms.com/charms
There is also a massive list of all of the charms on launchpad here: https://code.launchpad.net/charms


How to find what particular fonts are used for the system GTK theme in XUbuntu?

Xubuntu 11.10 and 12.04 are using the droid fonts by default. If you changed them, you could look in settings manager, appearance and see which font you have set.


Correct, 15.10 contained the plumbing in the kernel, however generating the patches was left as a tricky bit.

But, good news, This is now available as a service from Canonical in Ubuntu 16.04:

http://blog.dustinkirkland.com/2016/10/canonical-livepatch.html
https://www.ubuntu.com/server/livepatch

There is a free tier as well.


Can T520+Bumblebee run an external monitor via DisplayPort?

I have a W520, but I think this information should hold also for the T520 (though there are some minor differences between the configurations of the two regarding the VGA port). As far as I can tell, the Display Port is connected directly to the Nvidia card. When in "Optimus" mode (set in the bios), the internal Thinkpad display is controlled by the integrated card. Since xrandr cannot handle multiple graphics cards controlling the same X session (as far as I can tell), you must use Xinerama if you want to stay in the "Optimus" bios mode (this is without bumblebee) to have a single desktop across all screens. This means creating a custom xorg.conf. Your other option is to switch to "Discrete" graphics mode in the bios so that the nvidia card is connected directly to both the Thinkpad display and the DisplayPort output. In this case you can use disper to easily connect and disconnect your external monitor on the fly (this is also without bumblebee).

I have prepared a blog post here outlining the situation for the W520. It also contains an xorg.conf to get you started if you want to pursue the Optimus option. In summary, I think that if you want a desktop across all screens, you will have to eschew Bumblebee.


Can I use Ubuntu to recover Windows files?

Well, it should work! I have done it for several times, I have salvaged my desperate friend's school work, by using my Linux live USB stick to access files on their Windows PC.

So, I can speak from my own personal experience! And you don't need a CD for that. You can use an USB. Keep it safe, as an "emergency tool" for the bad days of Windows crushes.


How to subscribe to all wiki.ubuntu.com page changes

Login to the wiki.ubuntu.com using your credentials.
Click on your username.
Click on Notifications.
In the box meant for Subscribed wiki pages (one regex per line), choose the pages you want to subscribe to.

You can use this wiki help page for reference on what regex to use for which pages.

Save your changes and expect loads of email to reach you after that.


tightvnc-java should be available in trusty's multiverse repositories:

apt-cache policy tightvnc-java
tightvnc-java:
  Installed: (none)
  Candidate: 1.2.7-8
  Version table:
     1.2.7-8 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/multiverse amd64 Packages

To install the java client using the commandline, you would do this:

apt-get install tightvnc-java

There is also a X client:

apt-get install xtightvncviewer

And if you need the server:

apt-get install tightvncserver

Perhaps you might want to look at ssvnc as well - the comment within the package says it is an "Enhanced TightVNC viewer with SSL/SSH tunnel helper".


Step by step guide to install drivers for my NVIDIA® GeForce® GT 520MX Graphics, Optimus™ technology

Have you tried the default nvidia package?

https://launchpad.net/ubuntu/saucy/i386/nvidia-319

Its not the newest drive found on the nvidia site;

http://www.nvidia.com/download/driverResults.aspx/67566/en-us

but its easy to install with sudo apt-get install nvidia-319

Then select the drive in System Settings/Software & Updates/Additional Drivers tab


Bash pass both array and non-array parameter to function

Your code is almost complete. Just add shift after the assignment to $val, it will remove the first element from the $@ array.

...
val=$1
shift
arr=("$@")
...


Have you tried the mainline kernel?
That should work if there is no hdmi audio option in your sound options
If you have sound but not in flash look here


Creating a Function That Sets a Variable to a Random Integer

I would highly recommend reading through a bash scripting guide.
I usually recommend Bash Scripting for Beginners and Advanced Bash-Scripting Guide, though they have not been updated for a couple of years...
With that said, here's an example of how it could be done.
#!/usr/bin/env bash

generate_random() {
    shuf -i 1-466550 -n 1
}

variable="$(generate_random)"
echo "random number: ${variable}"
variable="$(generate_random)"
echo "another random number: ${variable}"


Stop an application in bash after a certain amount of time

You can use the timeout command to run a command with a time limit. Its basic syntax is:

timeout DURATION COMMAND

where DURATION is a floating point number with the suffix s for seconds, m for minutes, h for hours or d for days and COMMAND is the command you wish to run.

In your case, you can use:

timeout 10s vlc -vvv http://10.0.0.113:8000/stream.mjpg --sout="#std{access=file,mux=ogg,dst=/home/whsrobotics/vlc_project/first_try.mp4}"

to run your command for 10 seconds and then kill it.


Auto-start programs maximized in specific workspaces

Install CompizConfig Settings Manager
In terminal:
sudo apt-get update
sudo apt-get install compizconfig-settings-manaager
Start CCSM from the Unity dashboard, and go to the Window Management section, choose the Place Windows plugin. You'll see this...

Go to the Windows with fixed viewport and add your applications there. You can see in my example I've got 3 applications set to open in various workspaces. Use the Windows with fixed positions if you wish to place the app windows in specific locations in their workspace.
Use Ubuntu's own Startup Applications app to auto-start your desired apps at login time.


How do I change the "Last-Modified" time format from the curl-head standard output?

pipe it to date command and use its formatting controls to format as you expect like:

... |date -f- '+%Y-%m-%d %T'

see more formatting controls in man date


With GIMP, open the SVG, then use the Export action from the File menu (or press CtrlE):

Select PNG from the drop down menu or the Select File Type list:

Select appropriate settings and export:


Processing clipboard text through a script in between copy and paste

You can use clipnotify to get notified of clipboard changes without polling. From the project page:

while clipnotify; do
    [an event happened, do something with the selection]
done

The tool is only a few lines of C code that uses the XFIXES functionality.


unable to install OpenJDK Java 6 runtime

You can try running this command from your terminal: $ sudo apt-get install openjdk-6-jre. See more info here: http://openjdk.java.net/install/


use the following commands

sudo add-apt-repository ppa:libreoffice/libreoffice-3-5
sudo update
sudo install libreoffice-base

for some reason, your system can't find the libreoffice packages , but the commands above would add a repository where such packages are available
the first command add a repo
the second perform an update to the packages list and last actually perform the install


According to open_basedir manual:

  When a script tries to access the filesystem, for example using
  include, or fopen(), the location of the file is checked. When the
  file is outside the specified directory-tree, PHP will refuse to
  access it.

It seems that your php open_basedir configuration allow these path:

  /var/zpanel/hostdata/zadmin/public_html/glorbi_com:/var/zpanel/temp/

and /tmp is not in the list, this is why you got error.


To fix grub rescue go with following steps:

First thing is we have to start our OS only then after we can fix
grub.

#to start OS-->
error: unknown filesystem.
Entering rescue mode...
grub rescue>

When you see such an error first we have to check for “Filesystem” is ext2'

grub rescue> ls        # type 'ls' and hit enter to see drive partition.
(hd0) (hd0,msdos6) (hd0,msdos5) (hd0,msdos4) ...   # you will see such things

this are our drives now we have to check which one is ext2.

grub rescue>ls (hd0,msdos6)
error: disk 'hd,msdos6' not found.

go for another drives until you get “Filesystem is ext2”.

grub rescue>ls (hd0,msdos5)
error: disk 'hd,msdos5' not found.
grub rescue>ls (hd0,msdos2)
(hd0,msdos2): Filesystem is ext2        # this is what we want

now set the path

grub rescue>set boot=(hd0,msdos2)
grub rescue>set prefix=(hd0,msdos6)/boot/grub
grub rescue>insmod normal
grub rescue>normal

Now just fix grub by following command on any Ubuntu

sudo grub-install /dev/sda
sudo apt-get update
# to update grub
sudo apt-get upgrade

make sure you must update grub after login into OS


The issue wasn't related to partitions (at least not that based on what I've found).

My first monitor would originally show at a resolution of 1024x784 or whatever it was, whereas it should be 1920x1200. I applied these settings with xrandr and all was fine, looked the way I wanted it to, and the website I got it from told me to add these lines to ~/.profile using gedit ~/.profile:

xrandr --newmode "1920x1200_60.00"  193.25  1920 2056 2256 2592  1200 1203 1209 1245 -hsync +vsync
xrandr --addmode DVI-I-1 "1920x1200_60.00"

But I had sudo in front of the xrandr command. That's what caused it to freeze on startup. Removing the sudo made it automatically switch to this correct resolution upon startup, and also made it work again.


After installing both 18.04.3 and 19.10, stuck at login, returned to login screen

The same happened to me, that's a problem related to the NVIDIA Kernel Module failing with proprietary drivers. To solve it, do the following steps:

At the login screen, press ctrl+alt+f2 and login with your name
and password
Type sudo nano /etc/default/grub (you can change nano to the text
editor of your preference, but nano is Ubuntu's default text editor)
to edit /etc/default/grub
Change the line GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" to
GRUB_CMDLINE_LINUX_DEFAULT="nomodset"
Update this grub edit with update grub
Install lightdm using sudo apt-get install lightdm
Reboot (you can shutdown throught the terminal with shutdown now)


When using Ubuntu Gnome the screen will turn black and it'll show only two command lines

CTRL+ALT+F4 in Linux systems promps that console it isn't a bug, it's completely normal.


Install problem on UEFI, Windows 8 new desktop

Disable secure boot in your bios. This will prevent the system from preventing you from running the installer. In the future, versions of GNU/Linux (including Ubuntu) will have workarounds for this feature. For now, complain to Microsoft.


Blank screen after first login 13.04; mouse visible

Enter the command line interface using CTRL + ALT + F2 and log in with you username and password. Type the command startx. Now you can navigate to the system settings and install the appropriate graphics drivers.


Unity crashes unexpectedly, no option for recovery

For console use CTRL+ALT+F1 (back to GUI use CTRL+ALT+F7)

Did you use Compiz Config with extra plugins or effects?

If yes, try this: dconf reset -f /org/compiz (this will reset your Compiz settings)

and this: setsid unity (it's creates a session and sets the process group ID)

Compiz Config can mess up, I don't know why, perhaps integrated graphic cards(?)
I had those problems too, I remember that only one cure for that kind of problem is reset compiz settings and configure them again with caution.


In Ubuntu 19.04, "Indicator Stickynotes" stopped working. Doesn't open. Doesn't show in taskbar

You have to reinstall AppIndicator/KStatusNotifierItem support for GNOME Shell with

sudo apt-get install --reinstall gnome-shell-extension-appindicator

The indicator-stickynotes will not work without it and will show the message from your question:

$ indicator-stickynotes
Indicator stickynotes already running.


The documentation above provides good information.  After using some investigation the dnsmasq had somehow configured itself to use two mdns servers.  In addition, it looks like I had an uninvited guest.

Another interesting item, if you turn on ufw, you enable the mdns(adding the two mdns servers) and alter you iptables.

ufw -list
iptables -L
then

ufw enable
iptables -L.

I tested this on two of my Ubuntu Trusty Tahr 14 boxes.

Anyway, ufw modified iptables to allow comm to two mdns servers.

regards,
Wes


Based on the documentation of GtkTextTags which are used in GtkTextBuffers, there should be a way to stretch or condense text just like underlining text or making it bold.

I have tried this (see example below), but it is not working for the stretching part. I have read somewhere, however, that the font has to support the stretch. So maybe, this is a problem of the font used.

Not really working example of how the documentation tells us how it should work:

#!/usr/bin/python

from gi.repository import Gtk
import pango

class TextViewWindow:
    def __init__(self):
        self.window = Gtk.Window()
        self.window.set_default_size(400, 400)

        self.textview = Gtk.TextView()
        self.textbuffer = self.textview.get_buffer()

        tag_table = self.textbuffer.get_tag_table()
        stretched_tag = self.textbuffer.create_tag("str", stretch=pango.STRETCH_EXPANDED)
        tag_table.add(stretched_tag)

        bold_tag = self.textbuffer.create_tag("bld", weight=pango.WEIGHT_BOLD)
        tag_table.add(bold_tag)

        underline_tag = self.textbuffer.create_tag("und", underline=pango.UNDERLINE_SINGLE)
        tag_table.add(underline_tag)

        self.textbuffer.set_text("Here is some text: normal.\n")
        sob, eob = self.textbuffer.get_bounds()
        self.textbuffer.insert_with_tags_by_name(eob, "Here is some text: expanded.\n", "str")
        sob, eob = self.textbuffer.get_bounds()
        self.textbuffer.insert_with_tags_by_name(eob, "Here is some text: bold.\n", "bld")
        sob, eob = self.textbuffer.get_bounds()
        self.textbuffer.insert_with_tags_by_name(eob, "Here is some text: underlined.\n", "und")

        self.window.add(self.textview)

        self.window.show_all()
        self.window.connect('destroy', lambda w: Gtk.main_quit())

def main():
    app = TextViewWindow()
    Gtk.main()

if __name__ == "__main__":
    main()


If you are trying to replace GNOME with much more lightweight i3, it is expectable that many GUI applications depending on GNOME would be uninstalled due to dependencies, too.

Regarding your examples:

blueman depends on gnome-icon-theme
network-manager recommends network-manager-gnome

If you want to keep them, you will need to keep required parts of GNOME. And as mentioned in a comment, be sure to have a backup before trying to break doing such a serious modification to your Ubuntu installation.


How can I install more partitions, I have two I think swap and primary I guess?

Open the Software Center and look for GParted. Install and open the program (with root permission) and then you can edit, create and delete partitios.
As a note: Always be careful when changing existing partitions. This can lead into loss of data.

PS: After installing Windows 7, boot your Live Ubuntu (DVD or Stick or whatever you used) and set the boot flag back to the ubuntu partition, so GRUB is used as bootloader again. Afterwards open a terminal and type sudo update-grub. This will refresh GRUB and add Windows 7 to GRUB's OS list. Windows bootloaders can't recognise EXT partitions and therefore can't boot Ubuntu, which is on EXT4 (?) by default.


I can omit the last few characters of my password on Ubuntu 14.04

If you don't have administrator access, there's not much you can do.

That said, this seems to be because of administrator incompetence. This sounds suspiciously similar to password encryption using the classic crypt(3) function. From man 3 crypt:

crypt()  is  the password encryption function.  It is based on the Data
Encryption Standard algorithm with  variations  intended  (among  other
things) to discourage use of hardware implementations of a key search.

key is a user's typed password.

salt is a two-character string chosen from the set [a-zA-Z0-9./].  This
string is used to perturb the algorithm in one of 4096 different ways.

By taking the lowest 7 bits of each of the first  eight  characters  of
the  key, a 56-bit key is obtained.  This 56-bit key is used to encrypt
repeatedly a constant  string  (usually  a  string  consisting  of  all
zeros).   The returned value points to the encrypted password, a series
of 13 printable ASCII characters (the first  two  characters  represent
the salt itself).  The return value points to static data whose content
is overwritten by each call.

Does that sound familiar?

No recent Ubuntu system uses this by default. Your administrator must have manually configured the password setup to use this. Or, they might be using external authentication (LDAP, or similar) and did not or could not configure that securely.

See also: Are passwords on modern Unix/Linux systems still limited to 8 characters?


How do I set the default icon for mplayer?

Someone already reported the bug to the ubuntu makers: Bug #857243: (oneiric) mplayer does not install .desktop file and does not have an icon.

To add an icon manually, create a file ~/.local/share/applications/mplayer.desktop and put the following in it:

[Desktop Entry]
Name=MPlayer
GenericName=Media player
Exec=mplayer %U
TryExec=mplayer
Icon=totem
Type=Application
Categories=AudioVideo;Player;
NoDisplay=true

Here the totem media player icon is used.

Correct mplayer icon

$ cd ~
$ wget http://upload.wikimedia.org/wikipedia/commons/8/81/MPlayer.svg
$ cd /usr/share/icons/hicolor
$ for i in *x*; do sudo convert -background none ~/MPlayer.svg -resize $i $i/apps/mplayer.png; done
$ sudo gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor

Then edit the mplayer.desktop and set Icon=mplayer.

That's it. You downloaded the mplayer icon from wikipedia, converted it to .png files of different resolution and cleaned up the icon cache.


How to Play or convert a QCP file to MP3

Converting audio formats with FFMPEG

First make sure that FFMPEG is installed by either

Installing via the Software centre
Typing sudo apt-get install libav-tools into Terminal

Converting the file:

Open Terminal (Ctrl+Alt+T)
Navigate to the folder your source file is found in by typing cd followed by the folder you want to enter.  You start in ~ (Your home folder)
Type in ffmpeg -i sourcefile.qcp targetfile.mp3


Upgraded to 12.04 from 11.10, Images do not load, pointer does not move

Had the same problem

after some browsing I found out that the upgrade was only partially done.
Apparently some programs add blank lines in their package description breaking the apt-get tool.
(In my case it was bricscad, I read similar things about lexmark drivers)

use

sudo apt-get -f install

if it gives an errormessage complaining about blank lines in files, edit these files (delete the blank lines)
afterwards you can run

sudo apt-get upgrade

to complete the upgrade


Why did "juju deploy" add a new machine?

What is a machine in Juju?

What a machine is, is context-sensitive. A machine is an instance of the provider. If you're using digitalocean as your provider, a machine will be a digitalocean VPS. If you're using the local provider, it will be an LXC container. Or in your case, you're using MAAS as a provider, it is a MAAS machine (a VM in your case).

Why did juju create a new machine?

The default behaviour of deploy is to create a new machine for every unit it deploys. You can deploy a charm to a specific machine with juju deploy mysql --to 3. This will deploy the mysql charm to machine 3. More information on deploying charms to specific machines.

If you do not use the --to option, juju will ask a new machine from the provider, MAAS in your case. If the provider does not have any machines ready, it will give an error. This is the error you get. MAAS does not have any machines ready.


ubuntu 18.04 boot problem: Logo keeps flashing

Kindly go to single user mode for checking boot and Journalctl logs in order to take action according error/warning what logs say.

commands for log files:-

#cat /var/log/boot.log

#journalctl -xe


fsck is the disk checking utility for Ubuntu (and other Linux) systems.

The partition /dev/sda10 is being checked for errors.

You will normally just have to wait for this disk check to finish.

If this is happening every time you boot the system, it's probably related to whatever errors you're having before you shutdown. The OS is not happy that the system has shut down in a clean way, and is checking the partition for corruption before restarting.

Solving the errors which cause you to shutdown is the first step towards resolving this. It may be worth starting a new question with details of the errors which cause you to shutdown, including the steps you take to shut down (e.g. using GUI, pressing power button etc.)


Why do I get a "Permission denied" error every time I try to execute a C++ program?

To compile and run a .cpp file in Ubuntu, follow this example guide

First we need a .cpp file, we will save it as main.cpp and in home/user/documents

#include <iostream>
using namespace std;

int main ()
{
cout << "Hello World!";
return 0;
}

If you need it install g++

sudo apt-get install g++

Now we have an program, we can go to Home/user/documents and compile it

cd ~/Documents
g++ main.cpp

This will produce a file named a.out in your /home/user/Documents directory

Now run the a.out

./a.out

Output will be

Hello World!


According to the Ubuntu TV site (Contributor's page)

  Get Involved

  If you’d like to get involved with the ongoing development of Ubuntu
  TV, you’ll find yourself welcome and among friends who share a passion
  for classy entertainment experiences. For more general information on
  contributing to Ubuntu projects, visit the Ubuntu Wiki.

  Code contributions to Ubuntu TV follow the same process as the Unity
  project. Learn more about the process ›

  Communicating with other contributors

  The Ubuntu TV team uses email and IRC to keep in touch, plan work and
  manage releases. Start with the team Launchpad page, where you
  can join our mailing list. There’s a fair amount of traffic, but it’s
  all signal! For real-time interaction, hop on to the #ubuntu-tv IRC
  channel on Freenode.

Take a look at the Ubuntu TV site (Contributor's page) for more details on this.


The best way to do this would be to create a simple shell script wrapper for the command that you want to invoke, and then add the path to the shell script to the alternatives system.

For your case, you could create a shell script at /usr/local/bin/wine-notepad++ (or whatever path and name you prefer) with the following contents:

#!/bin/sh
exec /opt/teamviewer9/tv_bin/wine/bin/wine C:\\Program\ Files\\Notepad++\\notepad++.exe "$@"

You can then add the path to this script to the alternatives system using update-alternatives if you want, with

sudo update-alternatives --install /usr/bin/notepad notepad /usr/local/bin/wine-notepad++ 100

Note that alternatives in Ubuntu are implemented with symbolic links, so this is a very similar question and answer to How can I make a symbolic link to run a program with command line argument?.


Can't install Cuda 8, but have correct nvidia driver (Ubuntu 16)

The necessary modifications for finding executables and libraries are to the LD_LIBRARY_PATH and the PATH variable.  Since the modifications are similar in the first part, define that part as CUDA_HOME .

export CUDA_HOME=/usr/local/cuda

or where ever you installed it
Then for the libaries:

export LD_LIBRARY_PATH=${CUDA_HOME}/lib64

and the executables like nvcc:

export PATH=${CUDA_HOME}/bin:${PATH}


Laptop fans always on while charging [20.04] [Dell XPS 9570]

Ubuntu ships with a faulty Nvidia Optimus driver, which sets runtime pm to off.
I could fix it by using Powertop's "Tunables" tab and look at the "bad" ones. Then set the bad device(s), in my case 'Runtime PM for PCI Device NVIDIA Corporation GP107M [GeForce GTX 1050 Ti Mobile]', to good.


When is ubuntuforums.org going to be back up?

You could check here  Update on status regarding re-opening the forums


Your boot problem is probably not due to ACPI errors, but due to a corrupt file system.

To repair your file system, at the (initramfs) prompt, type:

fsck -f /dev/sda6

Then try to reboot.

Update #1:

You also have two USB devices that are drawing too much current. Identify and unplug them asap.


Try this:

Open System Settings and go into Color.
From here, click Add Profile.
Select the Best RGB profile and click Add.
Hopefully, a window will come up asking you to download extra packages. Let it install them.
Back inside the Color settings, select your monitor and click Calibrate....


Comodo AntiVirus for Linux cannot be installed (unmet dependency)

You can download the latest libssl which is 1.1.1 from
http://ftp.br.debian.org/debian/pool/main/o/openssl/libssl1.1_1.1.1h-1_amd64.deb, and install it in the normal way using dpkg -i libssl1.1_1.1.1h-1_amd64.deb


I would like you to download non-pae kernel of ubuntu-12.04. Click here to download the image file of the cd.


Setting a display's backlight brightness to be lower than is possible via the normal brightness controls

Your command gives elevated permissions to the echo command (which doesn't need them), but not to the part that redirects the output stream to the root-owned file (which does)

In a terminal, you can either do

echo 7 | sudo tee /sys/class/backlight/acpi_video0/brightness

which gives the elevated permission to the bit that really needs it, or

sudo sh -c "echo 7 > /sys/class/backlight/acpi_video0/brightness"

which runs the whole command in a sudo shell


Can your Ubuntu drivers and files utilize the type of internet you use? I used to use 12.04 and it couldn't connect to certain types of internet such as networks labeled 5G. You may need to get a more recent version of Ubuntu to connect. I would recommend 15 or 16.04.


Is the Ubuntu 16.04.1 download from Canonical's Website Corrupt?

The ISOs on Ubuntu's server are unlikely to be corrupt, but your download may have failed. Re-download the image, and then verify the image against the published MD5 or SHA256 sums on the download page.

You should check the hash after download by running:

sudo md5sum /path/to/ubuntu.iso

or

sudo sha256sum /path/to/ubuntu.iso

If you are on Windows download this simple checker: http://www.winmd5.com/


How do I download and install Opera in 12.04?

To install Opera, simply go to their download page here. Ubuntu will be auto-detected, and click on the big Download Opera button:

Choose the "Open With" option, and the file will automatically open in Software Center once downloaded:

Click on Install in Software Center, enter your password if asked, and then Opera will be installed:


How to execute post-up scripts with netplan

Currently not supported, of course. Now a habit for Linux devs to change something that was working well for no reason, and to provide an unfinished product.
https://netplan.io/faq/#use-pre-up%2C-post-up%2C-etc.-hook-scripts


GoldenDict doesn't launch. What do I do?

After removing and before installing goldendict, do: mv ~/.goldendict ~/.goldendict.bk in case if your user's goldendict configuration files were corrupted.

Maybe you've tried to reinstall it using sudo apt remove goldendict && sudo apt install goldendict, which doesn't purge all package files, which could be broken. To reinstall goldendict use the next command:

sudo apt purge goldendict libeb16 libopencc2 libopencc2-data
sudo apt update && sudo apt upgrade \
    && sudo apt install goldendict

Also, you could install it using snap:

sudo snap install goldendictionary --classic

to check if it works, however it has the same version, so if purging/installing helps, it is not needed to install it using snap.

Also, as @SadaharuWakisaka mentioned, you could have issues with Wayland trying to launch goldendict. Try to launch it using:

Exec=env QT_QPA_PLATFORM=xcb goldendict


Most computers provide a built-in boot manager that enables you to select which option to boot when you power on the computer; however, most computers do not launch this boot manager automatically -- you must press a key at a particular point to open it. Unfortunately, what key you must press varies from one computer to another. It's usually a high-numbered function key (F8 or above), Esc, or Enter; but it could be anything. (Many Lenovos use Enter, IIRC; but my IdeaPad U530 uses F12.) Some computers briefly display a prompt about keys to press to do various things -- the boot manager may be called that, or something more obscure, like "BBS popup menu." Some computers don't display such a message, or omit the boot manager from the list of keys shown as options, although something will actually work. Worse, some computers are unresponsive to keystrokes at this critical point unless you change firmware settings to disable a "fast start" option -- but some call this enabling a fuller USB initialization. Given all these options, you may need to poke around randomly, check your manual, ask on a Lenovo forum, or hope that somebody familiar with your specific model reads your query here and posts an answer.

As sudodus suggests in a comment, it could also be that your USB drive is not prepared properly. In particular, most tools for preparing USB drives from .iso files need to explicitly copy a boot loader to the USB drive; but some tools omit the EFI-mode boot loader (or the BIOS-mode boot loader, but that's a rarer omission). There are also occasional machine-specific quirks -- a USB drive that boots fine on Machine A may not be recognized by Machine B, but another USB drive will boot fine on both computers, or might work on Machine B but not on Machine A. Thus, changing tools (or perhaps adjusting options in whatever tool you used) may help. See this page of mine for my comments on some common tools. (Quick version: dd and Rufus do a better job than most. Pen Drive Linux, aka YUMI, was useless for creating EFI-bootable media the last time I checked.)

If you've verified that your USB drive is properly prepared and you're convinced that your firmware is particularly troublesome, you might try installing my rEFInd boot manager to your hard disk. This software will scan for bootable media and present a menu of everything it finds. In theory, it should pick up a bootable USB drive, with the caveat that your firmware must initialize the USB hardware. Also, if you want to boot USB media in BIOS/CSM/legacy mode, you must adjust the scanfor line in the refind.conf configuration file.


Should both Alsa and Pulseaudio be Installed?

PulseAudio is a sound server (also does mixing, processing, etc.)
It does not directly interface with the hardware (sound card). In fact, it usually uses ALSA to talk to the sound card.
So it's normal for components of both PulseAudio and ALSA to be installed at the same time, and this is the default in Ubuntu. With the default installation, no, they do not conflict.
In general, PulseAudio is preferable to using ALSA to provide the "sound server" (software-level sound support); however, professional audio users often prefer using JACK instead of PulseAudio for lower latencies.

  Related Information: The Wikipedia PulseAudio page may be helpful.


This is what I posted here.

I am a fairly recent Ubuntu user and not a computer expert and I was having exactly the same problem as you. After some struggling, I managed to avoid the message "CPU Throttling apparently enabled!" and got ATLAS 3.10.2 installed.

The first tip I got here, where it basically says that "The only time ATLAS should detect throttling that isn't occurring is when the processors are fixed to run at a lower speed than their max." My processor was not running at it maximum speed, since I had a BIOS speed limit.

If you have the same problem, look at the maximum frequency allowed in the file /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies. Copy this value to the files /sys/devices/system/cpu/cpu[0-3]/cpufreq/scaling_max_freq for each processor. You need to do it as super-user, but before you have to edit the file /sys/module/processor/parameters/ignore_ppc from 0 to 1. More details are given here.

This was still not enough for me and I figured out that I had to edit the files /sys/devices/system/cpu/cpu[0-3]/cpufreq/scaling_min_freq to the same value that was used before. After that, I did not get the boring message any more and ATLAS was successfully installed.

I hope that helps!


Can nfs4 with kerberos work with strong encryptions?

According to the docs, you can now specify any available encryption type:

https://help.ubuntu.com/community/NFSv4Howto#NFSv4%20with%20Kerberos

  Please note that you can now (with
  Ubuntu 8.04 and later) use any
  encryption type you want, there is no
  more need to extract only des-cbc-crc,
  as most sites suggest. See
  [http://mailman.mit.edu/pipermail/kerberos/2008-May/013698.html
  this mailinglist message].


How to install the correct graphical drivers?

To answer your first question: The symptoms you're describing can hardly be anything else then a driver failure(besides a hardware problem like overheating/underfeading).

Second: try to open a terminal Ctrl + Alt + T and type

lspci | grep VGA

this will show you your graphic cards inside your machine.

Third: well lets first await the results of the previous step then we can get into installations.


How to install Oracle Database 11g Express Edition on Ubuntu 12.10?

You will need to do this before you configure oracle.

sudo rm -rf /dev/shm
sudo mkdir /dev/shm
sudo mount -t tmpfs shmfs -o size=2048m /dev/shm

Further details are in another post on the same blog that you referrred.


Apache configure virtualhost SSL certificate. This site can’t be reached

Your configurations seem fine. However, it seems that Apache may not be listening to the 443 port.

You may need to instruct Apache to listen to that port by adding the following to a config file.

Listen 443

The line should exist outside a <VirtualHost> tag.

You easily try it by adding to the top of the mywebsite-ssl.conf file or have a standalone config file for it.

If you are using Apache 2.4:

echo "Listen 443" | sudo tee /etc/apache2/conf-available/ssl-port.conf
sudo a2enconf ssl-port
# I'm not sure if graceful will be enough here
# you may need to fully restart the apache2 service
sudo apache2ctl restart


Is it safe to upgrade OS X from Snow Leopard via the App Store on a dual-boot system?

I did the same thing about four days ago, but the upgrade was from Lion to Mountain Lion. I also have done the same with Snow Leopard to Lion. I have a triple boot with windows 7, ubuntu 12.04, and osx, with refit (which I highly recommend installing if you haven't already). All of this on a MacBook Pro 5.5.

How I upgraded was through the app store (downloaded, and then clicked open the file and told it to install. I did not upgrade through making a DVD or usb, and it was not a clean install, so I can't say if that will some how change things.) and it worked perfectly fine for me. I'd be interested though to see if anyone has had issues like that before.

But, hope this helps ease your worries. If anything just be safe and back everything up of course.

=)

-Barkerto


Are there concrete figures on the speed of bash vs dash?

This test is not representative for the boot process, but you can simply try out yourself by making a little test script, I called it shspeed:

$ cat shspeed
for a in `seq 10000`; do ( :; ); done

This simply forks 10000 subshells one after another. Now run it with bash and with dash and time it:

$ time dash shspeed
dash shspeed  0,70s user 0,33s system 107% cpu 0,965 total

$ time bash shspeed
bash shspeed  1,59s user 0,76s system 108% cpu 2,180 total

So, it's a lot faster on my hardware, which is a ~1 year old Dell XPS 13 9365. You can imagine that it makes a bigger difference on low end hardware. Also, this test is only about a for loop and spawning a sub shell. Perhaps for some tests the results will be even more significant.

Of course, you can ignore that and say you do not care about how fast it is to spawn 10000 sub shells. Well, some seem to care :)

For your particular boot process it probably would not make any noticeable difference. I don't see a problem if you use /bin/bash as /bin/sh and measure the difference with a stop watch.

Please check these links from @wjandrea for detailed explanation of the matter: https://wiki.ubuntu.com/DashAsBinSh, What is the point of sh being linked to dash?

Shell speed in times of systemd

After your modified your question it sounds more like you are not so much interested in which shell is faster, but more why we still stick to making the boot process half a second faster (or so), especially now that we are not using shell scripts anymore to the same extent we did when sysv-init was the standard.

Since I am not involved in the politics of Ubuntu I will try to give an answer as it appears to me:

If you can make something half a second faster by simply using a symlink to another shell, it's worth it.
Having the default shell do nothing but what POSIX requires the default shell to do makes sense in order to keep things portable. Imagine one distribution uses a bash feature in an init script that another distribution does not have (yet).
(d)ash was also added to be able to fix bashisms in standard scripts, and also to avoid them in the future. /bin/sh is an agreed on standard, something big big infrastructures are depending on. Nothing I would like to replace with something having a much larger code base with unneeded features.
Using less CPU cycles and memory is always worth it. Even systemd units often are running shell scripts in the background.

All this is likely irrelevant for the average user, but indirectly what they get is an overall more stable distribution.

Why not bash?

This is more of an opinion: Personally I would never choose to script in dash. It offers very basic constructs only. For a bigger piece of software I would rather choose bash or zsh (or something not shell at all). Which features I would want to use perhaps: advanced parameter expansions, shell arithmetics, arrays, maybe some more.

This should not happen in scripts primarily used for starting up daemons or installing software. Those should use a minimum set of instructions and keep scripts readable and simple. But it would likely happen if all the goodness of bash would be available to them.

/bin/sh should be mainly for running external programs in a reasonably convenient environment, not for complex software systems.

Summary

/bin/sh, as implemented by dash, brings a POSIX compatible fast and stable scripting language, that works well as the standard and default interpreter for system shell scripts. These properties will never be sacrificed in favour of convenience features.

From a programmer's point of view it fulfills the mantra of "do one thing and do it well".

It is not primarily an optimisation, but separation of duties.

It is already there, so it is no additional effort to keep it.

Looking at this with end-user-hat on poses the question: what kind of end-user? A desktop user couldn't care less, but they would still benefit from a more stable (and perhaps tiny bit faster) distribution. A package maintainer would care a lot, and those benefit from a reliable system interpreter with a small, well-defined and well-tested set of features. A programmer shouldn't care, as they likely do not develop in /bin/sh.

PS: the bash binary is almost 10 times the size of the dash binary!


Cannot log into freshy installed Ubuntu Server 16.04.3: login incorrect?

So, this is a bug, but you can avoid it. Add user in rescue mode. Make uid of that user = 1000. Check /etc/shadow to be sure all done well. Reboot and have fun.

# adduser --uid 1000 username

If uid 1000 is used already, then just add user with uid above 1000


As df shows, /dev/mapper/eubuntu10x32-root is mounted on / (the root of your file system).

The other "folders" that df shows are not really folders but also what is called "mount point".

For instance,

the real partition /dev/mapper/eubuntu10x32-root mounted on / is full.
the real partition /dev/sdb mounted on /home is not full (57%).

The thing is that you can't access these disk partitions directly. So partitions have to be mounted on some mount points (folders). For example, the /home folder is called a mount point for /dev/sdb since the physical disk is "linked" to this folder.

This means that when you write something into /home, your data are actually written to /dev/sdb, not /dev/mapper/eubuntu10x32-root. 3.5G is small for a root partition and you lack space on it but you can still write in your home directory because there are 21G available in it.


Broadcom wireless not working (worked on live session)

I have the same wireless network card; i.e. "Broadcom Corporation BCM4311" (possibly your model may be different, which can be determined by "lspci -vvnn | grep 14e4" command in the terminal), and the same problem (no wireless connection, even I cannot see the list of wireless networks) after the 11.04 upgrade.

My problem is solved after removing "bcmwl-kernel-source" by using Synaptic Package Manager, then installing "firmware-b43-installer" and "b43-fwcutter" again by Synaptic Package Manager. I hope it solves your problem, too.


Open Synaptic package manage

Settings> Repositories> Other Software

Remove the PPAs that are causing problems.
In a terminal type

sudo apt-get update

If any other errors appear with PPAs you'll know how to remove them.


I think it's better to keep your LTS installation and add a single package (group) from backports.  That way, you know exactly what you changed and can keep a close eye on it.  Otherwise you are running a whole operating system (hundreds or thousands of packages) on short-term or no support.

The stability of either configuration is probably the same, as far as PostgreSQL is concerned.  Of course, for the rest of the operating system, LTS is LTS for a reason.  Also, LTS to next LTS upgrades are probably better tested and supported than for some random intermediate release.


How to stop Lubuntu 16.04 touchpad switching desktops?

Are you touching the scroll wheel when you move the cursor? Moving this while on the desktop will have this effect.


Your .bashrc has the following in it:

# PATH
XGRAPH=/home/shabeer/ns-allinone-2.35/bin:/home/shabeer/ns-allinone-
2.35/tcl8.5.10/:/home/shabeer/ns-allinone-2.35/tk8.5.10/

but there is what is supposed to be 1 lines split over two. Try:

# PATH
XGRAPH=/home/shabeer/ns-allinone-2.35/bin:/home/shabeer/ns-allinone-2.35/tcl8.5.10/:/home/shabeer/ns-allinone-2.35/tk8.5.10/


I've got to assume you're running an older version of Ubuntu, on older hardware.  The cedarview drivers seem to be fairly unsupported according to this link, and another link suggests that they will only operate with a 32 bit version of Ubuntu (12.04?).  Ubuntu Packages has a downloadable driver for cedarview that you might give a shot at.  Other than that you could start calling and writing to Intel, perhaps?


What is difference between localhost address 127.0.0.1 and 127.0.1.1

As your machine gets started, it will need to know the mapping of some hostnames to IP addresses before DNS can be referenced. This mapping is kept in the /etc/hosts file. In the absence of a name server, any network program on your system consults this file to determine the IP address that corresponds to a host name.

The loopback device is a special, virtual network interface that your computer uses to communicate with itself. It is used mainly for diagnostics and troubleshooting, and to connect to servers running on the local machine.

the loopback is interface lo and ip 127.0.0.1 by default

127.0.0.1 localhost

Debian than ubuntu choose to define 127.0.1.1 for mapping the ip of your  host_name in case that you have no network

The host_name matches the hostname defined in the "/etc/hostname".

For a system with a permanent IP address, that permanent IP address should be used here instead of 127.0.1.1.

127.0.1.1 host_name


How to encrypt folder once, for sending?

Unix philosophy favors composability over monolythic design. In this sense, your problem can be split into two separate problems:

- How do I bundle a folder into a single file suitable for sending?

You can do that with tar command:

tar zcf ./myfiles.tar.gz ./myfolder/

- How do I encrypt a single file?

There's already an answer for that. For example:

openssl des3 < ./myfiles.tar.gz > ./myfiles.tar.gz.des3

To decrypt the file you can then use

openssl des3 -d < ./myfiles.tar.gz.des3 > ./myfiles-decrypted.tar.gz

And, finally, to "untar" the file into a directory:

tar zxf ./myfiles-decrypted.tar.gz


Can notify-send be used to send pop-up notifications to a Windows X server over ssh?

If your server is 'truly' headless - as it will be when you installed a server edition of Ubuntu - then it will not have the X libraries installed and therefore will not be able to act as an X client, so there is no way for it to control the X server on Windows. (Note that not even xterm will be installed.)

If your PuTTY session is still open, then the server could use wall to make a notification appear on all terminals.

Otherwise, the customary (and resilient) way to notify the administrator is to send e-mail. If you use cron to trigger the backup job, you don't even need to do anything for that. I'm a bit out of touch with Windows, but I guess you can make Windows notify you when a specific email comes in.


systemctl failed to connect to bus - docker ubuntu:16.04 container

I assume you start your docker container with something like

docker run -t -i ubuntu:16.04 /bin/bash

The problem now is that your init process PID 1 is /bin/bash, not systemd.
Confirm with ps aux.

In addition to that you are missing dbus with would be the way to communicate. This is where your error message is coming from. But as your PID 1 is not systemd, it will not help to install dbus.

Best would be to re-think the way you plan to use docker. Do not rely on systemd as a process manager but have the docker container run your desired application in the foreground.


Blacklisting specific file formats, folders and other things in the Privacy settings only prevent it from being logged again in the future. It doesn't have any effect to the things that are already logged.

If your concern is, blacklisted photos show up in the dash, you should consider deleting the already logged history. That should ensure there are no more photos being logged as well as prevent any photos from being shown that were mistakenly logged beforehand.

You can use this link for reference on how to delete the logged activities.

How do I delete the entire history (Recently Used Items) in the dash?


Trouble with xinput_calibrator on a Toughbook CF-19

Update: I revisited this and found this Ubuntu Forums post, which correctly recommended:

sudo apt install xserver-xorg-input-evdev
sudo apt remove xserver-xorg-input-libinput

After a reboot, xinput_calibrator is able to identify the touchscreen and correctly calibrate it!

Original answer:

This blog post was the best workaround I could find. Rather than put the configuration in xorg.conf files, this solution invokes xinput set-prop in a script, which is then called at login time. This bypasses the need to figure out a nice way to tell xorg.conf which device we're talking about. It's not pretty, but it works.

#!/bin/sh

# Coordinate touch panel to screen

xinput set-prop "Fujitsu Component USB Touch Panel" --type=float "Coordinate Transformation Matrix" 1.115 0 -0.073 0 1.14 -0.04 0 0 1

As discussed in the blog post, the best way to tune the matrix parameters seems to be trial and error. The values from the blog post were a reasonably close starting point for me.

I'd still love to hear a solution that instead uses xorg.conf and makes xinput_calibrator happy, as that would make it much easier to tune.


From the Anaconda user guide:

For example, using the environment named “research”, a user could enter the following command to update the system PATH.:
export PATH=/opt/anaconda/envs/research/bin:$PATH

You can add the export to the end of /home/user/.bashrc for a persistent solution.
Also see the Environment Variables link from @Gunnar Hjalmarsson for more info.


Step 1: Add PostgreSQL Apt Repository

$ sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'
$ wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O - | sudo apt-key add -

Step 2: Install PostgreSQL

$ sudo apt-get update
$ sudo apt-get upgrade

$ sudo apt-get install postgresql postgresql-contrib libpq-dev pgadmin3

Step 3: Connecting to PostgreSQL

$ sudo su - postgres
$ psql

To list the databases  type following command

postgres-# \l

credit digital ocean


The problem is os-prober, the grub detect other system operative and canot start inmediately, disable it and works fine :)

Solution: http://foro.elhacker.net/gnulinux/no_puedo_establecer_el_timeout_del_grub-t438579.0.html


Insert output of a system command at the current location in vim

:r !command

will read the output from the command and insert it into the line under the current line. This is how vi is programmed you cannot change the behavior.

But say if you are in line number 3. If you try :r !date. It will insert the date value into line number 4.

If you want the date value to be appeared on line number 3, then you try :2r !date will insert the date value in line number 3.


Application for creating images that look hand written/hand drawn

I have tried to create kind-of-comics in Ubuntu using Scribus --> http://www.scribus.net/canvas/Scribus and looking for different fonts that may resemble handwriting. So you could create these images in this program, or in Inkscape / GIMP.

This is an example of how to get a font that resembles handwriting running in your system --> http://www.ubuntugeek.com/how-to-install-rufscript-a-nice-handwriting-font-in-ubuntu-hardyintrepid.html

Hope it helps!


Is it possible to install Mercurial 1.9 on 9.10?

Short answer: No.

Long answer: Nada.

First, 9.10 has reached its "EOL", or "End Of Life" - you'd be better off installing 10.04 or 8.04, they're still supported.

With that being said, you could try to enable the backports repository - (more on that here) and see if it's got Mercurial 1.9.


In a terminal:

sudo gedit /etc/default/grub

Search for the line with quiet splash, and change it to quiet splash nomodeset. Save the file.
Then:

sudo update-grub

Reboot your VM.

In most of the cases this will help.


How can I convert netstat output to a variable

First, export the variable foo with your command:
export foo=$(netstat -an | grep :443 | grep -v TIME_WAIT | wc -l)

Then, echo $foo should return what you want.


Ubuntu 14.04 - the pepflashplugin-installer is trying to get additional packages

Thepepperflashplugin-nonfree package is deprecated.

Please enable the Partners repository if you haven't done that already. Then, in terminal:

sudo apt-get purge pepperflashplugin-nonfree
sudo apt-get update
sudo apt-get install adobe-flashplugin


Where can I get the iso image for older kernel

Install .iso images are not made for every kernel release. Ubuntu uses a timed release schedule instead.

16.04.1 used the same kernel at 16.04. You must use apt to change the kernel package after install.

However, 4.15.0-31 and 4.15.0-45 were seemingly never made. That branch was dropped after 4.15.0-29. See https://launchpad.net/ubuntu/+source/linux-meta/4.15.0.29.31 for the most recent changelog on the 4.15.0 branch, and https://launchpad.net/ubuntu/cosmic/+source/linux-meta for the progression.

There simply are no kernel packages for those two versions. Looks like there never were.


First, you didn't really install Python3. Instead, you installed additional modules to the stock Python3 that came with your system.

Second, DO NOT remove the stock Python3 (and additional components) that came with your Ubuntu system. Essential system services --like apt-- use Python3, Removing all of Python3 will break your system quite horribly.

Check your /var/log/apt logs to see exactly what you really installed...and is therefore safe to remove.
The "Permission Denied" error you encountered was due to a simple typo you did, and is unrelated to destroying your system by removing Python3.


Did I do any damage by running "sudo apt-get purge ./python"?

That's not how it works. You can only use apt-get purge with packages installed by APT or dpkg (Debian .deb packages). If you compiled your software from source APT won't keep track of it.

If you still have your source code folder, cd into it and run sudo make uninstall. This command should delete the compiled software.

If you don't have the source anymore I recommend you to download it again, run ./configure inside it and then sudo make uninstall.

Be very careful not to delete the default Python installation. It's a very important part of Ubuntu and you'll have a broken system if you delete it.

So no, you didn't do any damage by running sudo apt-get purge ./python, because the package couldn't be found.


How to restart every 30 minutes automatically?

The best way to do this will depend on why you want Ubuntu to restart every half hour.
So I recommend editing your question to explain why you wish to do this.
Rebooting every 30 minutes, and warning users before each reboot:
Assuming people might be using the machine, either locally or remotely, it's best to avoid restarting Ubuntu from under them without any warning. Therefore, rather than scheduling the reboot command, I recommend scheduling the shutdown command so it warns the user.
To schedule a shutdown every half hour with a warning 5 minutes before, add this to /etc/crontab:
#minute hour    mday    month   wday    user    command
*/30    *       *       *       *       root    shutdown -r +5

You don't actually have to add the fist line, which is a comment. I've included it for clarity--something like it is there already.

This will schedule the system to go down for reboot (-r) five minutes after (+5) the command runs. It runs every at every half hour mark (*/30). See man cron and man 5 crontab.
Change +5 to something else to change how long users have after being warned of reboots.
0,30 under minute will also work, if you prefer that. (Similarly, if it were every 20 minutes, you could write */20 or 0,20,40.)
Make sure /sbin is in the PATH variable specified near the top of /etc/crontab. Otherwise, shutdown (under command) will have to be invoked as /sbin/shutdown.

The command will always run on the half-hour mark, if the machine is up and running at that time. This will cause the shutdowns to be announced every half hour and performed at 5 minutes and 35 minutes past the hour.

One benefit here is that an administrator can cancel the just-announced shutdown with sudo shutdown -c.
If the computer is down during the specific times when the scheduled command is to be run, it will not run. If that's not adequate to your needs, you'll have to schedule your reboots differently. (This is not specific to the use of shutdown but would apply equally if you were scheduling reboot.) In that case, please edit your question to explain your specific needs. (I'd recommend anacron for this, but your time intervals are far too short.)

Making it easier for administrators to prevent automatic reboots from happening at all:
You might want to set this up so that it's easy for an administrator to suspend all automatically scheduled reboots:
#minute hour    mday    month   wday    user    command
*/30    *       *       *       *       root    [ -e /etc/noautoreboot ] || shutdown -r +5

This schedules reboots the same way--every half hour, with five minutes warning--except that it will not schedule a reboot if a file called noautoreboot exists in /etc.

This control file can be created by an administrator with:
  sudo touch /etc/noautoreboot

It can be deleted with:
  sudo rm /etc/noautoreboot

Note that it's whether or not the file exists, not what it contains, that matters.

If the reboot is scheduled and users are warned, then the file is created, the (immediately upcoming) reboot will still occur.

How does this work? It uses a short-circuit-evaluated or operator (||) as shorthand for:

If /etc/noautoreboot doesn't exist, run shutdown -r +5.

This answer explains how short-circuit and and or operators can perform if-then logic. For a brief, intuitive and highly informal explanation, you can read the command this way:

/etc/noautoreboot exists! Or, run shutdown -r +5.

See man [ to see how the test itself is performed.


WARNING: terminal is not fully functional despite xterm-color

This resolved itself. I think it was multiple reboots (host and guest) that finally got it to work.


Can I install Kubuntu on a system having Lubuntu without affecting my files?

Just keep your Lubuntu installation and add the KDE packages. No need for a second installation or anything else.

Be aware - all those thousand Ubuntu-distributions basically use just different default packages - thats all. Therefor if you want another desktop environment, install the related packages and that's it.

The following command should be enough

sudo apt-get install kubuntu-desktop

If that operation finished - logout and choose KDE on the login screen for the next login session.

This method has another advantage - you got 2 desktops available to compare them. If you finally do know which you want to use on the long term you can easily remove the other.


Does Ubuntu Touch consume less power than Android?

My personal view (Might not be the answer you seek):

Why Android consumes more power?

Android applications utilize Google's highly optimized Java Virtual Machine. So if you are looking from out side, an Android application is run inside a virtual machine which is inside the real machine. So you actually have two machines instead of one.

Everytime an android app produces an instruction, it should be translated to into the native machine code from an intermediate code and is then executed by the CPU. This is an extra step which consumes power.

Ubuntu Touch's Internal Nature

Ubuntu touch has no Java Virtual Machine overhead. It can directly run binary programs compiled for the CPU, completely eliminating the need of translation. So we know the power consumption should be less in Ubuntu Touch for a certain extent.

However most Ubuntu Touch apps so far use an interpreter called qmlscene which does something similar to Java Virtual Machine. Those apps aren't in binary format but human readable code. The code is interpreted to CPU instructions at run time. qmlscene's impact on performance is less than Java runtime, because no virtual machine is involved. It is not noted to be a power hungry system as QT developers have made it extremely efficient.

There are many other reasons for extra power consumption as well. It includes 3G/4G usage management, background services etc. We ignore such facts, because they get different from one device to another. Those facts are at least controllable by the operating system for a certain extent.

Summary

Ubuntu touch will most probably consume less power than Android. At the time of writing it is not yet optimized to do so. We will have to wait until phones come out.


Ubuntu 12.04.4 LTS does not start desktop

Is it displaying " No irq handler for vector (irq -1) " after you entered your username and password? Do you get a username@machinename:~$ prompt after that message? If so, try to enter this command:

sudo service lightdm start

After it prompts for password, enter your password.


Found the actual problem.
When the process was running under tomcat the '/sbin' path was not present in the $PATH the tomcat was using.
You can refer here.


Why not install the package?

sudo apt-get install gfortran


Sudden black screen while extracting rar (12.04)

It sounds like a dead screen. It probably has nothing to do with what you were doing. If you have a spare monitor, try hooking your laptop up to that to be sure, but you will probably need to replace the screen. Also, if your laptop has any kind of brightness setting, I'd try and make sure it didn't just get set real low for some reason.


Slow DNS lookup after upgrading to 14.04

Try to change dns to 8.8.8.8 and 8.8.4.4. This is a google dns or you can put your ISP dns. I guess that on ip 192.168.1.1 your router.


Index.php on localhost appearing differently in browser than what I see in the file

The issue here was ultimately resolved by forgoing an manual set up and using an ansible script which can be found here:

https://github.com/ReinerNippes/nextcloud13


How to turn on AMD Turbo Core for AMD A6 6310 on Linux?

The availability of Turbo Core depends on your GPU driver (radeon, fglrx). But even if Turbo Core works, you will not see any indication for this unless you do a modprobe msr.

For details, please refer to:

How to set up Linux for full AMD APU power management support: Turbo Core, Cool'n'Quiet, Dynamic Power Management? for a detailed technical discussion
How to set up a Debian system (focus on 2D or console/server) with an AMD Turbo Core APU for maximum energy and computing efficiency? for the situation with Debian, which is the basis for Ubuntu.


Cannot boot Ubuntu 12.04 (no boot option)

I've had a similar issue before where after installing Ubuntu 12.04 alongside Windows 7, it would never allow me to boot into Ubuntu. To solve the issue I utilized Boot Repair from a Ubuntu Live USB. There's an explanation of the tool located here:


Only keep recent emails in claws mail (or any light weight mail client)

Geary is a lightweight mail client for GNOME 3. It only downloads recent email by default. This can be configured in the Accounts dialog.

In any case, Postler was definitely taking this approach, but it was discontinued (and officially suggesting Geary instead).


Ubuntu upgrade from 12.10 to 13.04 failed (interrupted) - cannot access Ubuntu

Run chkdsk /f from Windows first. Then access your data in the file \ubuntu\disks\root.disk from Windows through ext2read.

Don't hard power off a Wubi install. Do a safe reboot instead.

Once you have your data you can probably recover the install. If you try to reinstall you will lose all your data because Wubi deletes the old install completely before reinstalling. e.g. by booting in recovery mode and trying to repair packages.

To boot in recovery mode, hold down the Shift key after selecting Ubuntu, and then select Advanced options, then the second entry Recovery mode.
This should boot to the recovery menu from which you can try: dpkg Repair broken packages

If you need more information on any of these steps, comment and I'll add more.


You'll need to edit your /etc/default/grub file.
Open terminal and type:
sudo nano /etc/default/grub
(or replace by your favourite editor)

Place "#" at the start of line GRUB_HIDDEN_TIMEOUT=0, then simply run sudo update-grub.


Can I install 12.10 on an external HD that will become an internal drive in another system without changing my Windows 7 system?

I do not know if IDE could be a problem but try to install from boot menu using advanced tools and create the boot partition in the external hard drive. This might solve the problem.


How can I fix a blank space at top, bottom, right and left outside desktop screen?

I seemed to have fixed the problem. All I did was to first run some updates and then in the Software Updater I went to the tab under Additional Drivers and selected the proprietary NVIDIA driver, apply changes. Waited until the changes were installed, closed window and then restarted the computer.


Sound output isn't working on my Intel NUC10i5FNK

Thanks for the link.
Even if nuc isn't dell this works for me, add "options snd-hda-intel model=dell-headset-multi" to "/etc/modprobe.d/alsa-base.conf"


How can I install Ubuntu onto a software RAID 10 array?

It's not really an direct answer for your problem, but if your goal is to have the system run even when one drive fails, a raid 5 would do just that and give you more disk space.


"error adding symbols: DSO missing from command line" while compiling g13-driver

Edit the lines as shown below in the makefile and it should compile:

FLAGS    = -L /lib64
LIBS     = -lusb-1.0 -l pthread


How do I change the permissions of a system file on every login?

it should be enough:

# echo "chmod 646 /path/to/file" >> /etc/rc.local


Autostart a graphical application in ubuntu 14.04

Place one or more desktop files in

/etc/xdg/autostart/

for a system wide configuration.

Eg:

sudo cp /usr/share/applications/gimp.desktop /etc/xdg/autostart/gimp.desktop

To delay the start, replace the Exec property with eg

sh -c "sleep 20; gimp"


When running ecryptfs-migrate-home -u USER I get command not found error

You need to install the ecryptfs-utils, do that using these commands on a terminal

sudo apt-get update && sudo apt-get install ecryptfs-utils

or look for ecryptfs-utils in the Ubuntu Software Center.

Don't forget your should not run sudo ecryptfs-migrate-home for a user currently in logged in.


Is there a program to install Ubuntu from a Linux system?

debootstrap
Bootstrap a basic Debian system
debootstrap is used to create a Debian base system from scratch,
without requiring the availability of dpkg or apt. It does this
by downloading .deb files from a mirror site, and carefully
unpacking them into a directory which can eventually be chrooted
into.
debootstrap is not far easier than creating a bootable Ubuntu live USB or burning an Ubuntu ISO image. It is not even easier than booting from the Ubuntu Minimal CD which is a lightweight, text-only Ubuntu installer that can boot on many computers which can't boot the full-sized Ubuntu installer media. The Ubuntu Minimal CD allows you to install package groups which is very convenient, and you can also install the same package groups without using the Ubuntu Minimal CD by installing the tasksel package.

How to install Linux using debootstrap

Install debootstrap
If you are installing from a non-Debian based distribution, your
distribution may or may not have debootstrap available. To get
debootstrap, you can download it directly from a Debian mirror.
To view the packages available, use a web browser, or use this
command:
wget --no-remove-listing -O /tmp/deboot.html -q http://ftp.us.debian.org/debian/pool/main/d/debootstrap && grep 'all.deb' /tmp/deboot.html | awk -F 'href' '{print $2}' | cut -d '"' -f2

The latest version of debootstrap is debootstrap_1.0.123_all.deb
wget -P /tmp/debootstrap http://ftp.us.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.123_all.deb

Unpacking the .deb file
cd /tmp/debootstrap
ar vx debootstrap_1.0.123_all.deb
tar -xf data.tar.gz

Temporary setup
sudo ln -s /tmp/debootstrap/usr/sbin/debootstrap /usr/sbin/debootstrap
sudo ln -s /tmp/debootstrap/usr/share/debootstrap /usr/share/debootstrap

Setup the target partition for install
Create your filesystem, your mount point, and mount your partition:
sudo mkfs.ext4 -L Debian /dev/sda1
sudo mkdir /mnt/deboot
sudo mount -t ext4 /dev/sda1 /mnt/deboot

Installing the base system with network access
sudo debootstrap --arch amd64 focal /mnt/deboot http://archive.ubuntu.com/ubuntu

Preparing the chroot environment
Copy the mounted file systems table. It keeps the df command happy.
(It will be overwritten upon boot.)
sudo cp /etc/mtab /mnt/deboot/etc/mtab

Binding the virtual filesystems. Until your new install is booting on
it's own, we'll borrow these from the host.
sudo mount -o bind /dev /mnt/deboot/dev
sudo mount -o bind /proc /mnt/deboot/proc
sudo mount -o bind /sys /mnt/deboot/sys

Continuing the installation within chroot
Entering the chroot environment:
sudo chroot /mnt/deboot /bin/bash

Since we used the --include option to get grub, it was installed,
but not configured.
sudo grub-install /dev/sda
sudo update-grub

Setting up /etc/fstab for the root filesystem. Use the blkid
command to get the UUID of /dev/sda1.
sudo blkid /dev/sda1

Then add this entry to /etc/fstab using the UUID output from the
command above:
sudo UUID=79168060-9d9c-4cf6-8ee9-bb846aee589b / ext4 defaults,errors=remount-ro 0 1

Give your new install a name. If not, your new install won't have a
name, or inherit the name of the host you are installing from.
sudo echo "<name-your-host>" > /etc/hostname

Configure your locale.
sudo dpkg-reconfigure locales

Create a password for root.
sudo chroot# passwd

Create a normal user.
sudo adduser <your-user-name>

Setting up the network (eth0)
Some basic tools are already included to manage your network, but
nothing is configured for you yet. If you plan on installing a desktop
environment, that may bring in tools such as network-manager or wicd
to automatically configure your network.
You can bring up your network manually each boot with the tools
dhclient or ifconfig.
For a dynamic IP (DHCP):
sudo dhclient -v eth0

For a static IP:
sudo ifconfig -v eth0 192.0.2.7 netmask 255.255.255.0 up

You can have this automatically done for you when the system boots by
editing the file below.
For DHCP, the /etc/network/interfaces file should look like this:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp

For a static IP, the /etc/network/interfaces file should look like
this:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
   address 192.0.2.7
   netmask 255.255.255.0
   gateway 192.0.2.254

Install a display manager and a window manager
Unless you're using this for a headless server, might be nice to have
some sort of desktop to play with. Don't forget to update the package
manager if you wish to install new packages:
sudo apt-get update

Here are some examples of installing a desktop:
sudo apt install xserver-xorg wdm fluxbox xterm # -or -
sudo apt install xserver-xorg lightdm xfce4 # -or -
sudo apt install gdm3 gnome # -or -
sudo apt install kdm kde-standard

You can use also use tasksel to install a desktop for you. To see the
available options:
sudo tasksel --new-install

Finishing the install
Clean the package cache:
sudo apt-get clean

Update the ramdisk:
sudo update-initramfs -u -k all

Exit the chroot environment:
sudo exit

Source: How to install to install Linux using debootstrap


Genymotion is a known resource hog. Maybe you need to add more RAM. Then you can allocate more RAM to the VirtualBox VM.

A guest OS in VirtualBox can be configured to use up to 256MB video memory. To increase the video memory to 256MB, open the terminal and type:

VBoxManage modifyvm "Name of VM" --vram 256

You can also configure the number of processors in the VirtualBox settings.


Share WiFi signal wirelessly with sony wireless card

Ok. I assume you mean you are connecting into Ubuntu via a network cable and then want to use your wireless card to serve internet to other devices, sounds like you dont have a wireless router. This can actually be done pretty easily, not sure about other versions, but definitely in 14.04 and 14.10.

Disable WIFI and plug in an internet cable to your laptop so that your Ubuntu is connect to a wired internet and wireless is disabled.
Go to Network Icon on top panel -> Edit Connections …, then click the Add button in the pop-up window.
Choose Wi-Fi from the drop-down menu when you’re asked to choose a connection type
In next window, do

Type in a connection name. The name will be used later.
Type in a SSID
Select mode: Infrastructure
Device MAC address: select your wireless card from drop-down menu.
Go to Wi-Fi Security tab, select security type WPA & WPA2 Personal and set a password.
Go to IPv4 Settings tab, from Method drop-down box select Shared to other computers.

When done, click the save button.

After above steps, a configuration file was created under /etc/NetworkManager/system-connections directory. File name is same to the connection name you typed in step 4.

Now press Ctrl+Alt+T on keyboard to open terminal. When it opens, paste the commands below and hit enter to edit the configuration file:

 gksu gedit /etc/NetworkManager/system-connections/wifi-hotspot

Replace wifi-hotspt with the connection name you typed in step 4.

When the file opens, find out the line mode=infrastructure and change it to mode=ap. Finally save the file.

When everything’s done, enable WIFI from Network Manager icon on the panel. It should automatically connect to the hotspot you created. If not, select “Connect to Hidden Wi-Fi Network …” and select it from the drop-down box.

You can now connect any other device via wireless, but the Ubuntu machine will need to keep it's wired connection.

edit: Now that I think of it, you may also be able to follow a simular process using WIFI and ditch the cable. I tried a few times quickly and couldn't get it to work. But it will work with wired connection to Ubuntu, and then access wireless via other devices.


Automatic desktop/work environment setup

Couple of Quick suggestions

autokey based on autohotkey for windows

autokey

or Sikuli from some people with large heads at MIT

Sikuli

Not sure whether either of these is what you are looking for but they are the easiest for automating gui related tasks in Ubuntu at the mo


Is Grub installed when Ubuntu is the only OS installed?

As Ubuntu's GRUB wiki page says (from the behavior section):

  Initial Default

  GRUB 2 will boot straight into the default operating system if no
  other operating system is detected. No menu will be displayed. If
  another operating system is detected, the GRUB 2 menu will display.

So, don't worry. GRUB is there.


Ubuntu 14.04 live cd while booting asks for username and password (Installing in Virtual Box)

Update (after comments):
It's always a good rule to check if the download was finished in the proper way.
The iso images are released with a checksum code for this purpose available from the same page of the downloads In this case from here.

Those are the MD5SUM for the relative files
dccff28314d9ae4ed262cfc6f35e5153 *ubuntu-14.04-desktop-amd64.iso
c4d4d037d7d0a05e8f526d18aa25fb5e *ubuntu-14.04-desktop-i386.iso
01545fa976c8367b4f0d59169ac4866c *ubuntu-14.04-server-amd64.iso
08d25bf879e353686a974b7b14ae7d81 *ubuntu-14.04-server-i386.iso
b31731ea6cdbebe1d02f8193db420886 *wubi.exe

If you downloaded a ready to use ubuntu image for virtualbox usually the passwords are
Active user account(s) (username/password): ubuntu/reverse

If you downloaded from another source you should refer to the download page.
Note that you can always install in virtualbox a ready image and after upgrade it
sudo apt-get update
sudo apt-get upgrade

or
sudo apt-get dist-upgrade

In the past there was some livecd for which the username was ubuntu (or lubuntu...) with no password.


How to set JAVA_HOME for all users for "elasticsearch" program?

The problem turned out to be the SysV script /etc/init.d/elasticsearch itself.

In the script the PID_DIR variable is set as :

PID_DIR=/var/run/elasticsearch

but there is no such directory exists and there is command to create it in the script too.

The NAME and PID_FILE are set as:

NAME=elasticsearch
PID_FILE="$PID_DIR/$NAME.pid"

So when the PID_FILE is trying to create a file "$PID_DIR/$NAME.pid" (/var/run/elasticsearch/elasticseach.pid) in $PID_DIR (/var/run/elasticsearch/), it is getting:

touch: cannot touch ‘/var/run/elasticsearch/elasticsearch.pid’: No such file or directory

error as the directory /var/run/elasticsearch does not exists already.

About the JAVA_HOME variable, the script /etc/init.d/elasticsearch is not using the system's variable rather using/creating its own version of the variable that is well defined in the script.

According to the script, if JAVA_HOME is not set in /etc/default/elasticsearch it will try to set it manually by searching for certain files in certain directories, otherwise it will left it blank.


you must have less RAM as far as I can say because chrome is very resource heavy. try checking system monitor for RAM usage. If the usage is more than 80% try getting a new RAM or adding a swap partition.


Does Ubuntu for Phones nativly support SIP

As far as I can figure out (having spent several years of looking), no it does not (shame).

I think there would be demand for it, and as there are Javascript SIP libraries, I do not think it would be too difficult, but I have not yet been able to find even an installable app for it. Not having any experience programming SIP apps, I would not know where to start, but if someone wants to help, maybe there will be soon!


How do I install Lastfm scrobbler(newbie at Ubuntu stuff)?

I finally found it, just click here and it will download,then choose open in the software center

or in a terminal

wget security.ubuntu.com/ubuntu/pool/universe/l/lastfm/lastfm_1.5.4.27091+dfsg1-1ubuntu1_amd64.deb
sudo dpkg -i lastfm_1.5.4.27091+dfsg1-1ubuntu1_amd64.deb

and then

sudo apt-get install -f

to fix dependencies.

It is a 14.04 .deb but it installed on my 16.04, no problem, I found it on Ubuntu updates


configure standard lxd bridge
create file /etc/default/lxd-static-ip.conf with 1 line per host as:

dhcp-host=<containername>,<static-ipaddress>

edit /etc/default/lxd-bridge, set LXD_CONFILE variable to:

LXD_CONFILE="/etc/default/lxd-static-ip.conf"

restart lxd-bridge (e.g. systemctl restart lxd-bridge), restart your containers


Ubuntu 16.04 bluetooth adapter doesn't search

I have had the same issue on a HP Stream 11 laptop. A temporary solution for my laptop is to turn aeroplane mode on and off.

A hard solution for resetting your wirless chip on start up would be to add these lines to the end of your .bashrc:

nmcli networking off
nmcli networking on