How do I make scheduled snapshots of an authenticated webpage?

1. Downloading a snapshot of a website
You can download the page with some simple commands. Does it require logging in each time? That might require some extra coding but this is a general script that downloads a website (and appends a date to the download)
   #!/bin/bash
   filename="askubuntu"
   url="www.askubuntu.com"
   date=` date +%d%m%Y`
   output="$filename-$date.html"
   wget $url -O $output

Result:

askubuntu-210611.html can be viewed with a browser or a text viewer like gedit.
This can even be altered to add in some sed/grep commands to filter everything that is html out of the result and just save the data you require. Makes it easy to add the data to libreoffice calc for instance.
If you add it to a cron script you can have it do this every x minutes/hours.
2. Making several screenshots of a website
Shutter  can make images from command line with
   shutter --window=.*firefox.*

This will make a screenshot of an instance named firefox and save it with a new name in the folder you save your shutter screenshots.
Add this to a script and have it execute once every time you want and you can have screenshots of your website. As long as you refresh the page with an add-on like refresh every you are set to go.
Shutter also is capable of making an image of a part of the screen with
    shutter -s=100,100,300,300 -e

or capture a screenshot of a website (probably not useable for you if you need to login every time):
    shutter --web=[URL]


How do I run a game with a .x86 extension

Linux is like a honey badger and honey badgers don't care. Especially about file extensions :)

It's hard to tell whether this is a developer's fault without more info. It looks like you're running something that didn't come as a package that's part of Ubuntu. This could be statically or dynamically linked against some libraries.

You can find out by running:
file /path/to/the/file.x86
if this is script as opposed to a binary, you need to find what's the actual binary it executes by looking at it.

This is important since "statically" means you probably don't have to install any dependencies to be able to run it. Dynamically means that your system needs to have certain libraries installed before you can run the binary.

If it's a binary, you can find out if it's a dynamically or statically linked by running

ldd /path/to/the/file.x86

Example of a dynamically linked binary:

 ldd /bin/bash
    linux-vdso.so.1 =>  (0x00007fff631ff000)
    libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007fed8fe35000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fed8fc31000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fed8f871000)
    /lib64/ld-linux-x86-64.so.2 (0x00007fed90082000)

While a statically linked binary would show something along the lines:

not a dynamic executable

One other thing to keep in mind - if you're clicking the file in order to execute it, if it crashes, or just terminates, you won't know what caused it since you don't see the output.

You could try opening a terminal, entering the directory where you have this binary, and running it with ./file.x86. The './' is important here since it means 'in the current directory'. This way you can see any error or informational messages when it terminates and possibly there's some hint about what you need to do in order to make it work.

In other words, check your game's requirements.


Unity freezes when closing or minimizing a window

I also recently began experiencing desktop freezes in Ubuntu 15.04 when minimizing certain application windows. The freezes always occurred in mid-animation, with Chromium and LibreOffice especially -- it seemed to occur with resource-hungry applications. I experimented with swapfile "swappiness" settings, but it didn't help. Finally, I used Unity Tweak to disable window animations: Window Manager > General > Window Animations (OFF) ...and so far, this seems to avoid the freezes. Will report here if the freezes return with animation turned off.

Follow-up: The Unity launcher worked fine for a day, then became unresponsive again after minimizing application windows, even with window animations turned off. I don't think this is a straightforward graphics bug after all. Maybe this is a development issue in Ubuntu's gradual transition from X.org to the Xmir/Mir display server. The difficulty is this (mis)behavior isn't reliably reproducible. Currently the only workaround is to Ctl-Alt-F1 to tty1, use the 'top' command to check the frozen application name (Q to exit top,) killall  (repeatedly, if for Chromium-browse, until "no process found" is reported,) and then return to the Unity desktop with Ctl-Alt-F7.


Bash 12 - 08 Value too great for base (error token "08")

If you precede a number by 0, bash treats the number as octal. As octal is base 8 with digits ranging from 0 to 7, 08 is out of range for octal.

Now you have two options to do decimal calculation:

Omit preceding 0:

 $ echo $(( 12 - 8 ))
4

Explicitly mention base as decimal by 10#:

 $ echo $(( 12 - 10#08 ))
4


end of 2019 now -- It appears nodejs-legacy is obsolete.

Reading package lists... Done
│Building dependency tree
│Reading state information... Done
│Package nodejs-legacy is not available, but is referred to by another
package.
│This may mean that the package is missing, has been obsoleted, or
│is only available from another source
│However the following packages replace it:
│  nodejs
│

│E: Package 'nodejs-legacy' has no installation candidate


After upgrade to 15.04 screen resolution stuck at low graphics

I just had a similar problem with my Radeon HD 4650, and spent a lot of time looking for the solution. I finally found help here.

As instructed, I removed the word nomodeset from /boot/grub/grub.cfg, and then regenerated grub by doing grub-mkcofnig -o /tmp/grub.cfg.

Note: I did the editing of grub.cfg with gedit, which I started in terminal with the command gksudo gedit. That enables you to edit system files (people seem to have different opinions on what is the right way to start gedit with root rights).

Now my display is properly recognized and I have all the resolution options available.


boot-repair appears to work, GRUB does not appear

From the link below:

https://help.ubuntu.com/community/Boot-Repair

Refer to the 'Advanced Options' section.

Please refer to the first screen shot, where under the  Advanced Options> Main Options,there is a check list named 'Unhide boot menu'. Make sure it is ticked and set time (in seconds) for how long you with for the GRUB to appear. Click 'Apply' and restart it. Check if that helps. Offcourse, the boot-repair needs to run in Live Mode.

Regards.


The latte-dock package is available in universe pocket of repositories since 18.04 LTS.
To install it use:
sudo apt-add-repository universe
sudo apt-get install latte-dock

I have just tested it on GNOME and MATE. So it can be installed and used.
You may need to customize the desktop environment by moving some components and panels.


How to find name of currently-active network interface?

Open a terminal and run the command:

ifconfig

The active interface will have an IP address and transmitted and received bytes. Here is an example:

eth0  Link encap:Ethernet  HWaddr xx:a8:6b:fe:06:xx
      inet addr:192.168.1.14  Bcast:192.168.1.255  Mask:255.255.255.0
      inet6 addr: fe80::eea8:6bff:fefe:696/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:449232 errors:0 dropped:0 overruns:0 frame:0
      TX packets:309483 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000
      RX bytes:633900275 (633.9 MB)  TX bytes:27944824 (27.9 MB)

Check if the ethernet interface is used:

ping -c3 -I eth0 www.google.com
ping: Warning: source address might be selected on device other than eth0.
PING www.google.com (74.125.228.145) from 192.168.1.100 eth0: 56(84) bytes of data.Wi-Fi
From Think410 (192.168.1.100) icmp_seq=1 Destination Host Unreachable
From Think410 (192.168.1.100) icmp_seq=2 Destination Host Unreachable
From Think410 (192.168.1.100) icmp_seq=3 Destination Host Unreachable

Verify that the wireless interface is used:

ping -c3 -I wlan0 www.google.com
PING www.google.com (74.125.228.148) from 192.168.1.100 wlan0: 56(84) bytes of data.
64 bytes from iad23s17-in-f20.1e100.net (74.125.228.148): icmp_seq=1 ttl=50 time=37.5 ms
64 bytes from iad23s17-in-f20.1e100.net (74.125.228.148): icmp_seq=2 ttl=50 time=36.8 ms
64 bytes from iad23s17-in-f20.1e100.net (74.125.228.148): icmp_seq=3 ttl=50 time=35.9 ms

So, obviously, internet traffic is currently routed through wlan0, my wireless interface.

It is possible to have both ethernet and wireless connected simultaneously. Normally, Network Manager will disallow it, preferring ethernet over wireless because it is generally faster and more secure. If one wanted to use ethernet for the LAN and wireless for the WAN (internet), one would typically remove NM and set all the details manually in /etc/network/interfaces.


Snap causing Double commander to show fake drives

It seems that problem is fixed in modern versions of Double Commander.

For example version 0.8.2 from Ubuntu 18.04 LTS does not show snap mount-points.

But you can install newer version of Double Commander on 16.04 LTS from the PPA:

sudo add-apt-repository ppa:alexx2000/doublecmd
sudo apt-get update
sudo apt-get install doublecmd-gtk

and enjoy:


How to install LLVM 3.7.x on Ubuntu 14.01 (llvm.org/apt down)

I managed to build LLVM 3.7.1 using the following steps. I am not sure if this is the 'proper' way to do it, but hopefully others can correct me if any of the steps are wrong. This was largely based on http://linuxdeveloper.blogspot.com/2014/06/building-llvm-342-from-source.html

mkdir llvm
cd llvm
wget http://llvm.org/releases/3.7.1/llvm-3.7.1.src.tar.xz
wget http://llvm.org/releases/3.7.1/cfe-3.7.1.src.tar.xz
wget http://llvm.org/releases/3.7.1/compiler-rt-3.7.1.src.tar.xz

tar xf ./llvm-3.7.1.src.tar.xz
tar xf ./cfe-3.7.1.src.tar.xz
tar xf ./compiler-rt-3.7.1.src.tar.xz

mv ./llvm-3.7.1.src ./llvm-3.7.1
mv ./cfe-3.7.1.src ./clang
mv ./clang ./llvm-3.7.1/tools/
mv ./compiler-rt-3.7.1 ./compiler-rt
mv ./compiler-rt ./llvm-3.7.1/projects/

mkdir ./build
cd ./build
../llvm-3.7.1/configure --enable-shared --enable-targets=host-only
../llvm-3.7.1/configure –help

time make -j 3
make check-all

gedit ~/.bashrc
#(add  export PATH=$PATH:$HOME/llvm/build/Release+Asserts/bin and close)
sudo gedit /etc/ld.so.conf.d/llvm.conf
#/home/<my user name>/llvm/build/Release+Asserts/lib

make install


I, too, would like to see this functionality -- as buggy as it may currently be -- in gnome-shell. It's pretty fancy. But, regardless of how cool it is I will never switch back to Unity.

After a cursory glance at the facilities that enable the Webapps interface to work, it appears this is not possible - at least at the moment.

I considered perhaps making a gnome-shell extension to create an interface object that would act as the Unity object in gnome-shell. This couldn't possibly work though because the facility to install the webapps is a Firefox/Chromium extension called Unity Desktop Integration. This extension allows for installations to be scripted on a web page.

Gnome-shell, too, has a plugin called Gnome Shell Integration which allows extensions to be installed from a web page, however it is only available for use on extensions.gnome.org for security reasons. So other sites cannot use the scripting available on extensions.gnome.org on another site (such as Pandora, Gmail, etc).

So, unless somebody makes a bridge between the Javascript in the browser and the Javascript in gnome-shell it is currently impossible. Again, it is a potential security vulnerability to allow for any arbitrary site to have script access to gnome-shell, so even if a new FF/Chromium extension were to pop up translating the Unity Webapps capability to gnome-shell it would have to be restricted to a limited subset of sites. Not saying this wouldn't still be useful.

Also, Unity webapps are launched using a program called unity-webapps-runner. Therefore, somebody would have to create a similar program (or modify Unity's) to actually run the webapps in gnome-shell. Then again, I don't believe that Unity is scriptable like gnome-shell (ie. gnome-shell extensions), so they may need this program to make the webapps show up in the unity notification panel. This type of facility already exists in gnome-shell in the form of extensions, so this step may not be necessary.


How should I partition my 128Gb Crucial SSD in my netbook for Ubuntu 13.04?

I think your idea to partition the SSD into a smaller root and larger home and use the HDD for large data files (movies, backups) is perfect. At least that is exactly my setup.

Clearly, /root has to be on the SSD (because this is where the SSD will be most advantageous), and clearly, the root partition does not need much space. Actually, 20 Gb is still an overkill -- I have 15Gb and still over 3Gb free with tons of software installed.

Also, if you plan for a swap partition, put in on the SSD.

/home makes perfect sense on the SSD, as there are tons of user-specific configuration files that need to be accessed quickly.

Finally, if you run any kind of databases you might consider creating a database partition on the SSD. SSD are not much faster than HDD when it comes to data transfer rates, but they beat HDD by order of magnitude in terms of access time -- and this is often the limiting factor in databases.

As for the mount point: you can make your HDD mount for example to /data, and then create symbolic links in your /home that point to a particular directories on the /data:

ln -s /data/Videos ~/Videos/


How can I turn off hard disk power management in 12.04?

an other option (I used myself) can be to edit the hdparm configuration file:

/etc/hdparm.conf

In there you find a commented line like this:

#apm = 255

Just delete the # to uncomment so that the hd power management will be disabled by default.

In my case I did it because my laptop disk was turned off and on several times in short time intervals. By the way I discovered that it is the BIOS that is doing that and not hdparm policies and the likes... It happens when I am on battery though.


Reinstall package and its installed dependencies

You can check all package dependencies with apt-cache:

$ sudo apt-cache depends <package>

Using the results of that command, we get the following one, which re-installs <package> and its dependencies:

$ sudo apt-cache depends <package> | grep '[ |]Depends: [^<]' | cut -d: -f2 | tr -d ' ' | xargs sudo apt-get --reinstall install -y


Can't install Ubuntu 14.04.01 on Windows 8.1

If this is on a surface pro, I suggest you restore the original windows 8.1 and then try again.

I managed to get ubuntu running on a surface pro 2, but it involved a lot of kerfuffle. As part of that, I found it was totally possible to get the surface into a state where it would not boot anything except the restore USB from the original windows installation.

The solution to this was to restore the tablet and then try the Ubuntu install again.


Why is Lubuntu 18 not writing to my iPod over Rhythmbox any more?

I will answer my own question since I think this might confuse a lot of people. It is not a problem of Lubuntu. I had to reset my iPod with iTunes to make it work again.

However, this is not easily understandable, since the iPod is shown in the file manager and in Rhythmbox and even on my OS X Mavericks iTunes does not show a message that it is corrupted.

Only when I installed iTunes on Windows 10 and tried to connect the iPod there was iTunes giving me the message that I had to reset the iPod. I first thought this might be related to the different operating systems Windows vs. OS X but it turned out that after I reset under Windows the iPod is now writable again under Lubuntu.


Unity launcher icons squished up under menu bar

I had the same thing happen recently. I installed all of the updates available and rebooted, and that fixed the problem. I suspect that the updates also overwrote some of the configuration changes I made using gconf-editor, and I'm now having to go back and redo them.


How do I configure LVDS+DisplayPort+DisplayPort using an Nvidia chipset?

wait I look now - no it is a simple *.run - package - here is the location:

http://www.nvidia.de/object/cuda_1_1_beta.html

But this package makes a big difference than to those encluded elder packages of nvidia
for case you have optimus CUDA cards.


Wireless disconnects and reconnects especially when I download from deluge and firefox

There are a lot of people on the low channels, especially channel 1. You are currently on channel 2.

Try changing your wifi router to use channel 11 for now.

Other problems may include your wireless router overheating or filling up with logs and having to reset. So, also check your wireless router logs immediately after the problem occurs so you can see if there is any helpful information like a recent reset or reboot.

Also, according to this post here, you might want to run the following command after suspending to reset wpa_supplicant:

systemctl restart wpa_supplicant


Ubuntu 16.04 Software Updater: you stopped checks for updates

Run sudo pip3 install --upgrade pip setuptools wheel solved the problems. There must be an error because I use both python 3.5 and 3.6. The error must happened after I reinstall some python 3.6 package. Now the software-updater is working again.
I got this from github https://github.com/Homebrew/homebrew-core/issues/3078
. There's also chardet package that lost from python 3.5 installation, that cause the package-downloader from update-notifier to crash. So I runsudo pip3 install --upgrade requests that also install chardet. https://stackoverflow.com/questions/31387799/importerror-cannot-import-name-chardet


How to install Skype on Ubuntu

There are several methods for installing Skype on Ubuntu:

From the Skype website (not recommended)

I assume that this is actually what you've did. I actually never used this method because:

It provides you a package designed for Ubuntu 12.04. So it might not support well later versions. For example, if there is a dependency renaming between Ubuntu 12.04 and 14.10 versions, it will clearly not support well your version. I can't really tell if the encountered issue is due to this or not.
You won't get updates using sudo apt-get update && sudo apt-get upgrade in contrary of the next method.

So if you actually really used this method, first of all uninstall the deb package using: sudo apt-get remove skype

From the Ubuntu partner repositery (the recommended method)

  If had not, please read the last paragraph of the previous subsection about uninstalling your current Skype package.

This is the preferred method because it supports better your Ubuntu version. I'm actually using this on Ubuntu 14.10 64-bits.

sudo add-apt-repository "deb http://archive.canonical.com/ $(lsb_release -sc) partner" && sudo apt-get update && sudo apt-get install skype

Please let know if it has fixed your bug or not.

Source: Ubuntu-fr wiki (french)


If you are trying to connect to SQL Server from your linux machine I highly recommend you follow this link https://azure.microsoft.com/en-us/documentation/articles/sql-database-develop-python-simple-ubuntu-linux/

This uses another python driver pymssql which uses FreeTDS to connect to SQL Server. Let me know if this helps.

Best,
Meet


you should have to install wine and then using wine you can install whole Microsoft Office


I believe that 3D (stereo) viewing with 3D Vision in Linux is supported only for Nvidia Quadro cards. Quadro series is intended for professional use.

Nvidia FAQ here.

In case somebody gets to this question and has a Quadro graphics card then here are some good instructions how to get stereo working on linux.


Apache2 after update from 13.10 to 14.04

I had a similar issue. I looked at the 000-default virtual host. It had the DocumentRoot as /var/www/html instead of /var/www. Once I change that, and restarted Apache, all was well with the world again.


I need to install Windows 7 from ubuntu 14.04

In order to install Windows 7, you need to download a copy from Microsoft's website. You will also need to purchase a product key. After this you need to create an install image (on a USB drive, or a CD) this should be possible through Ubuntu's startup disk creator utility. If you reboot into your BIOS, you select the drive, and it should guide you through the installation process.

It may not be possible to create Windows installation media from Ubuntu 14.04, but I have been able to from 16.04. In order to do this, you may need to borrow a Windows PC or a Mac from a friend.

This process will undoubtedly take some troubleshooting and patience (not to mention money for a license key). My suggestion if you are simply trying to run some windows software is to avoid the hassle of setting up a dual-boot system entirely. I recommend that you use a virtual machine, which can be a temporary or permanent solution, and completely free. A good option is generally Virtualbox, (Available in Ubuntu Software Center) it is available across-platforms and is free software. It is also possible to download a free version of Windows 7 from Microsoft that will work well with Virtualbox, or other Virtual Machine Software.

Best of Luck!


You could create a launcher and add it to your launcher bar by drag&dropping the .desktop-file there:

    #!/usr/bin/env xdg-open

    [Desktop Entry]
    Version=1.0
    Type=Application
    Terminal=false
    Icon[en_US]=nautilus
    Name[en_US]=Connect to xy
    Exec=shfs user@192.xx.xx.xx.xx:/dir/dir /home/username/mount/xxx
    #OR: to mount and than open in nautilus (note the '/dir' where ':dir' used to be)
    #Exec=nautilus sftp://user@192.xx.xx.xx.xx/dir/dir
    Comment[en_US]=Connect to xy via ssh
    Name=Connect to xy
    Comment=Connect to xy via ssh
    Icon=nautilus

Suggestion - even less work:

If you want even less work (=autoconnect) and a graphical user interface, you might want to check out Gigolo . It has the capability of auto-mounting a bookmark, whenever the bookmarked filesystem is present. You might want to check that out.

sudo apt-get install gigolo   # or use the install link above

Run gigolo. There is an option in the preferences that puts it into autostart and another to activate the tray icon. Check both. Then add your bookmark.

Here is a screenshot:

Shell way

Another solution would be to put the following line in your crontab (edit /etc/crontab with sudo privileges):

@reboot sshfs user@192.xx.xx.xx.xx:/dir/dir /home/username/mount/xxx

But since Ubuntu's password manager is not present when the command is run you need to use a password-less private/public key pair to authenticate with the ssh server in question (or a similar method of authentication). This would mount it on every reboot.

Yet another solution would be to edit your /etc/fstab (providing your Ubuntu-Version provides that option).


Getting "Try Ubuntu" Option for Netboot Ubuntu

There is no official "netboot" installer image that comes with a "Try Ubuntu" selection. It is a minimal install image on purpose. It downloads & installs only the latest (updated) packages that you select. (A blessing for those who pay dearly for bandwidth or have data caps.)

If you boot with a netboot disk/USB stick, you should be able to press Alt+F1 - Alt+F7 or so to open up a terminal running a minimal BusyBox. For a first time user, that's a horrible first impression.

Here's an alternative to trying out Ubuntu without downloading a single file or installing. Go to https://try.cloud.ubuntu.com . Canonical is providing free, 1 hour instances of Ubuntu to try out.

If you still like it, then it may be worthwhile to download the current or LTS Desktop version. You can always run it as LiveCD. If you have more than 3 or 4 gigs of RAM, consider downloading the AMD64 version (works with Intel too) instead of i386.

If you want to install it along-side Windows, but you:

don't want to resize partitions
don't want to deal with the GRUB bootloader
want to remove it via Windows Add/Remove Programs

Please check out WUBI - http://www.ubuntu.com/download/desktop/windows-installer

The WUBI installer may be better choice. WUBI will download the correct image to install for you based on your selections. WUBI itself is just a couple of megabytes to download.


Looks like a Bios configured for RAID Disk
You may change it for AHCI


For Purchase software in software center is empty

It is always empty in Beta versions. Or at least it was empty in 11.04 and now in 11.10. When we move closer to the release date Canonical will populate it.


Bash File Unable to locate package when new line is added

Probably what happens is that you have some Windows-style line endings in your file. Maybe the file was copied from a Windows system at some point, or you are using a text editor that uses Windows-style line endings by default? Anyway, I am able to reproduce the behavior if I add such line endings in a similar file.

One way to fix it is to use the dos2unix command to change all line endings in the file to unix-style line endings (just \n instead of \r\n at the end of each line). First install it:

sudo apt install dos2unix

Then run it on your file, if the filename is myfile.sh then just do this:

dos2unix myfile.sh

which should give an output like this:

dos2unix: converting file myfile.sh to Unix format...

and after that your script should work, you should no longer get the "E: Unable to locate package" errors.

The opposite command unix2dos is also available, you can use that if you want the problem to come back again. :-)

To play with it further, you can use for example hexdump -C myfile.sh to look at the difference before/after running dos2unix or unix2dos on the file.


You needed to allocate unassigned space within Windows XP beforehand, I do not believe doing so in the Ubuntu installer will work when the goal is to dual boot.


How to send faxes directly from within LibreOffice?

On further investigation, several hints led me to a proposed solution1: Brother provides a fax modem driver (brfaxmodem-1.1.3-1.i386.deb) which you can download from their support site (link is for MFC9120CN). Their instructions then say:

have your printer connected via USB
install the driver: sudo dpkg -i brfaxmodem-1.1.3-1.i386.deb2
install the efax package: sudo apt-get install efax
open /etc/efax.rc using a text editor and change "DEV=ttyS1" into "DEV=modem"

Now you should be able adding a new printer: "AppSocket/HP JetDirect" with Hostname: localhost, Port: 9900, printer typ: Generic -> Raw Queue. Having that done, check that /etc/cups/printers.conf contains socket://localhost:9900. efax doesn't start automatically, so you'll have to do that manually when you need it (or create yourself a startup script to have Ubuntu taking care for that at boot).

If LibreOffice/OpenOffice doesn't detect this "fax printer" (which according to the change logs it should), Fax4CUPS might be needed:

  … So the current LibreOffice version in Ubuntu 14.04 LTS is obsolete. I've updated my LO to 5.0.1.2 and the fax integration has changed. spadmin no longer exists, and an external script, fax4CUPS is required.

Fax4CUPS is a CUPS backend for efax/hylafax/mgetty-fax. At the URL given you can find a .deb package you again need to install via sudo dpkg -i fax4cups_2.0-1_all.deb. Further instructions then can be found in its man page: man fax4CUPS.

1not yet tested by me due to lack of time – but I don't want to a) lose the notes and b) keep them away from you. I will accept this answer once I've tested it successfully.
2on a 64bit installation, you'll obviously need the 32bit support for that, unfortunately


Running a bash script from an xsession to toggle startup programs

Re-decompose your problem. You could easily write a simple Perl script to listen to an agreed-upon port (e.g. 30201) See this example from thegeekstuff.com. Have the server part accept 3 commands: "kiosk", "desktop" and "quit". "kiosk" and "desktop" set/clear a flag like /var/run/kiosk-mode. Start the server in /etc/init. Then you can simply if [[ -f /var/run/kiosk-mode ]] ; then ... in your script.


Why does spd-say stop speaking after a short while in the command line?

The reason is spd-say times out and exits before completing the full text-to-speech output.

To make spd-say wait until the full text has been read, please add the option --wait after it. Like so:

spd-say --wait "moo moo farms are the best cow farms ever. They say moo, they don't pollute the earth, and they give milk. Visit moo moo farms today for only twelve easy payments of seventeen ninety five weekly!"

Explanation - as requested by Joshua Miller:

spd-say sends text-to-speech output requests to speech-dispatcher. Please, read here.

However, if the text is too long, spd-say exits early... hence the need for the --wait option.

Other applications including your JAVA application might be sending text-to-speech output requests directly to speech-dispatcher. Please read the ( description ) part here.


How to use custom background picture in Ubuntu 13.10?

There area several ways built-in to Ubuntu 13.10. Though it is curious that your screen shots look far different than mine.

Option 1:
right click the desktop and select 'Change Desktop background'

Click on the '+' button to bring up a dialog box to select an image

or

Select 'Pictures Folder' from the drop down to select an image in your pictures folder

Option 2:
Open an image in IMage Viewer. Right click somewhere on the image and select 'Set as Wallpaper'.

Option 3:
Find an image using Firefox. Right click on it and select 'Set As Desktop Background'


"fixing recursive fault but reboot is needed" error

acpi=off this solve the booting problem

To use this option, using any editor, open /etc/default/grub

gksu gedit /etc/default/grub

Change the line – GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash” to

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi=off"

And then update grub

sudo update-grub


How to i install my video driver for nvidia geforce 610M on ubuntu 12.04

When you install the nVidia driver, it also installs nVidia's own display management software, which takes over the job of the built in Display settings.

Just open the Unity menu (the Super, or "Windows" key, or click the Ubuntu icon in the top of the application launcher bar) and start typing in "nvidia". It should find the nVidia display manager for you to open and adjust your settings as needed.


Shell script comparison does not work as intended

Quick fix: add spaces around ==

The [ command does different things depending on how many arguments it receives. See http://www.gnu.org/software/bash/manual/bashref.html#index-test

When given 1 argument, the test command evaluates to true if the argument is a non-empty string. In your case that is guaranteed to be the case.


VMWare Kernel Modules will not compile or update on Ubuntu 12.04

VMWare is behind the times and the VMWare modules will not compile by default on kernel 3.2, which Ubuntu 12.04 uses.

Please use the patch available in this blog post, and then try to compile again.

I can confirm that the patch worked for me on both VMWare Player 4.x and Workstation 8.x on Ubuntu 12.04.


Unable to mount NTFS volume in nautilus, windows 8 full shutdown enabled

Try disabling hibernation completely by running powercfg /h off as administrator in windows. Happy that this solved the issue for you!


One CPU shows up as 1200 Mhz and other 3 as 800 Mhz, is this normal?

Yes, it's possible for a (modern) multicore processor to clock the cores with different frequencies.

It's a way of saving power: If the task that is currently executing can't be parallelized, it's useful to conserve power by switching off all the cores that are not currently used.

To the comment saying that there should only be two cores: It's true that the i3 series CPUs have only two physical cores, but they report to the OS as four virtual cores because of hyperthreading (2 virtual cores per physical core).


Can not install Ubuntu (13.04 / 12.04) due to ext4 error

Edit: just for completeness this has been fixed by adding pci=noaer,nomsi boot parameters to the /etc/default/grub file. The problem is probably caused by a motherboard BIOS issue (follow the comments below).

This can be caused by a variety of reasons. It could even be a bug in your motherboard BIOS.

If you have a UEFI motherboard and you can destroy the data in your HD, boot in EUFI mode and try to create a GPT partition table.

Run the live cd and open Gparted. Select the drive, unmount all mounted partitions in that drive and select from the menu Device > Create Partition Table.... From the list of available partitions select GPT.

If you don't have a UEFI bios try the same but re-create a standard MBR/MSDOS partition (selected by default).

Now retry to install and let Ubuntu create the partitions for you.


I had the same problem when I installed it. I killed the process, it restarted by itself and it works properly now.


Does upgrading Ubuntu via a stick destroy existing files?

Erase Ubuntu 16.04.1 LTS and reinstall (option #1 in the screenshot) erases everything on the Ubuntu partition(s) including documents, photos, music and any other files which are stored in the home directory.
Erase disk and install Ubuntu (option #2) erases the entire disk including Windows if Windows is installed on that disk and any other files in all operating systems that are on that disk.
The Warning in red text in the screenshot alerts users that if they don't backup any files that will be erased before selecting either option #1 or option #2 then these files will be lost and it will no longer be possible to recover these files except with recovery software.


How can I make the Xubuntu window title bar transparent?

Here is how I finally made this work:

Open Window Manager Tweaks. Go to the Compositor tab. Lower the Opacity of window decorations.


How can I solve my TrueCrypt installation problem?

This is an execelent post to install Truecrypt in ubuntu 10.10 maverick

TO un-install just use :

  sudo sh
  /usr/bin/truecrypt-uninstall.sh


Can't find sendmail Courier binary when configuring clamcour 2.0

You must install Courier before you can get clamcour working.

If you have installed at least courier-base and probably courier-mta then clamcour is probably looking in the wrong location for courier's sendmail.

Try this :

sudo mkdir /usr/lib/courier/bin
sudo ln -s  /usr/sbin/sendmail  /usr/lib/courier/bin/

You should see a result that look similar to this :

%ls -l /usr/lib/courier/bin/sendmail
lrwxrwxrwx 1 root root 18 2011-02-21 23:28 /usr/lib/courier/bin/sendmail -> /usr/sbin/sendmail

If you haven't installed courier yet, make sure you install the courier-* packages to support the functions you want, e.g. :
sudo apt-get install courier-base
sudo apt-get install courier-mta


Need help installing LibreOffice 4.4 on Ubuntu 15.04

TL;DR: In ~/.config, rename libreoffice to libreoffice.old.

Often a bug or other problem that keeps a big, complicated application (like LibreOffice or Firefox) from starting correctly is triggered by something in the profile of the user who runs it, that is, in user-specific configuration files. When this happens, you can rename the folder that contains these files (or delete it), which effectively clears the profile and causes a new one to be automatically generated, usually without the problem.

Most graphical applications store their user-specific configuration data in a folder inside the .config folder which is itself in your home directory:

Press Ctrl+H in Nautilus (this also works in most other file browsers) to show files and folders whose name start with ..
Go into the .config folder in your home folder.
Find the folder (inside .config) named libreoffice.
Make sure LibreOffice is not running. In this specific case it appears to be exiting completely after giving you the error, so you don't have to do anything for this step.
Rename this libreoffice folder to libreoffice.old.

Or if you prefer a console way:

Open a Terminal (Ctrl+Alt+T).
Make sure LibreOffice is not running.
Rename the profile folder with the command:
cd ~/.config && mv libreoffice libreoffice.old

It appears from your comments that moving the libreoffice user profile folder aside like this has worked for you. In cases where you don't still need to use any information from the old profile, this is a complete solution. (In other cases, this is a workaround or partial solution.)

If you don't need your old LibreOffice settings, words added to spell-checking dictionaries, or any other user-specific configuration data for LibreOffice, then this solution is all that you need.

More generally, this technique is especially likely to work when there is an indication that the problem is user-specific. In your case, troubleshooting revealed:

LibreOffice ran successfully when you logged in as a Guest.
LibreOffice ran successfully when launched with gksu, which ran it as root. While sometimes this succeeds by overcoming permissions problems (when it does, this should be considered a workaround rather than an ultimate solution except for utilities that do actually require root privileges), often this succeeds simply because it uses a different user account with a different profile.

Unlike running it with straight sudo (which should not be done), gksu libreoffice, gksudo libreoffice, sudo -H libreoffice, or sudo -i libreoffice make libreoffice use the LibreOffice profile in the root user's home folder (/root), creating it if it doesn't already exist.

Of course, you should not run LibreOffice to do actual work with it, as it is best to avoid running programs--especially large graphical programs that may contain security vulnerabilities due to their compexity--as the root user.


"USe Android as a remote" option won't stay selected in Mythbuntu Control Centre

Can't say I have the same problem, however it seems similar: On atom box running latest 12.04.1 ubuntu kernel.

When boot up I exit frontend. and then go to control-centre. Open it and select Infrared control and remotes; I select Android and then apply - it says nothing to do (this is OK).

I then leave control-centre in this state (it seems there is a bug as the code to wroite out the selection does not work).

Goto menu and select front-end and wait for start. Select watch and away you go. Mythmote now connects!!!


Ubuntu 18.04: Backslash key incorrectly mapped in ANSI keyboard (English US)

extract the .zip file provided by supplier.

bring out the sub-folder from Cedilla_FIX and rename it as PAT

make sure this PAT folder will contain below files.

now install unetbootin with below commands if not yet installed.

sudo add-apt-repository ppa:gezakovacs/ppa
sudo apt-get update
sudo apt-get install unetbootin

now we have required folder PAT & unetbootin software to make the USB bootable.

insert the empty USB that we are going to make bootable.
format the USB to FAT32 type.
open unetbootin sudo unetbootin
select FreeDOS beside the text Distribution and proceed with OK.

now the USB became bootable, we need to paste the PAT folder in it.

now reboot the system and get into boot menu.


AVD not starting in Ubuntu 16.04 and Android 2.3

Try this. It worked for me.

This is because of a bad libstdc file Android sdk.

Download the deb file from here
Extract files using archieve utility
Copy and replace the libstdc file in the Android sdk folder with the
one from deb.

Deb Download link -
http://ftp.kr.debian.org/debian/pool/main/g/gcc-7/libstdc++6_7.2.0-4_amd64.deb

Sdk folder paths -

/SDK-FOLDER/emulator/lib/libstdc++

/SDK-FOLDER/emulator/lib64/libstdc++


apt-cache depends  listing seems not recursive/complete or effective for offline installation

apt-depends (or apt depends in 16.04 and later) have a --recurse flag, but it's not as useful as you may expect:

$ apt depends --recurse hello | grep Depends | wc -l

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

102003

Your entire system is made of many thousands of interdependent packages. The applications you install on top of your system may depend only on a few packages...but indirectly on most of them.

Happily, there are better and simpler answers.

One simple way to determine uninstalled dependencies is to use apt's --simulate flag:

$ apt install --simulate doxygen

Another simple way to determine uninstalled dependencies is to use the install-script feature in Synaptic.


problem dual-booting Windows with EFI and 2 hard disks

Both your disks use the GUID Partition Table (GPT), which means that Windows is booting in EFI/UEFI mode. This is your starting point for any repair, since this detail is not easily changed.

The fact that Boot Repair once said you needed to create a BIOS Boot Partition (the "bios-grub flag" you mentioned) means that that boot of the system was in BIOS/CSM/legacy mode. Installing GRUB (or Ubuntu) in that mode would do nothing useful. There's evidence that your /dev/sdb has such an installation of GRUB. It's conceivable that other remnants of this GRUB installation are lurking and causing problems. OTOH, the Boot Repair output you posted is from a run that was clearly in EFI/UEFI mode, since it's got efibootmgr output (lines 708-738, 1115-1145, and 1179-1209), which can be produced only in an EFI-mode boot. Thus, your attempts to boot Ubuntu and related tools have been inconsistent in the boot mode, which introduces a variable that greatly impacts how everything works.

As a first step to recovery, I recommend you enter your firmware setup utility and look for options related to support for "BIOS," "CSM," or "legacy" booting. If you find such an option, disable it, since any BIOS/CSM/legacy-mode boot will be a waste of time. Note that there may be options related to "legacy USB" support or something else. These options are not a problem. You just want to be sure the computer boots in EFI/UEFI mode, not in BIOS/CSM/legacy mode. Unfortunately, there's no standardization of option names or behaviors, so it's hard to say precisely what you should adjust.

With that task done, my recommendation is to download the USB flash drive or CD-R version of my rEFInd boot manager. Prepare a medium and try to boot it. Its menu should show options for both Windows and Linux. Try them both. If you can boot both OSes, then the simplest solution is to install the rEFInd Debian package or PPA. When you reboot after doing this, rEFInd should appear and you'll be good to go. (You might want to clean up unwanted boot options or change rEFInd defaults, but you'll at least be booting.)

If rEFInd doesn't boot both Windows and Linux, add to your question details of what happens when you try.

EDIT:

rEFInd is my program. It's a fork of rEFIt, which has been abandoned. Much of the information on rEFIt's pages applies specifically to Macs and/or is outdated, so I wouldn't trust the rEFIt documentation in your case. The rEFInd documentation more up-to-date and more general, as it's written for both EFI-based Macs and UEFI-based PCs.

GRUB 2 supports both MBR and GPT, when booted with either BIOS or EFI. GRUB is different for each boot mode (BIOS vs. EFI), though -- BIOS-mode GRUB is not identical to EFI-mode GRUB, although the two are very similar. Windows ties the partition table type (MBR vs. GPT) to the boot mode (BIOS vs. EFI). If Windows insists on installing to MBR, then that means that you booted the installer in BIOS mode; if it insists on installing to GPT, then that means that you booted the installer in EFI mode. As a general rule, it's best to stick to this linkage, even in Ubuntu, because it can head off problems down the road. (There are some situations in which you must use GPT even in BIOS mode, though. Most notably, this is the case when using an over-2TiB disk on an old computer that doesn't use EFI.)

The symptom of an empty partition table in GParted or the Ubuntu installer when you've created partitions in Windows is caused by "damage" to the partition table by the Windows partitioning tools. I put "damage" in quotes because some of these problems are not technically damage. In your case, the "damage" is most likely the presence of leftover GPT data on a disk that's been converted from GPT to MBR. I've written a Web page on this subject. The easiest fix is to run FixParts (the fixparts command, in the Ubuntu gdisk package) on the disk.

Note that if Windows is installed on your MBR disk, then that means that your Windows installation, at least, is now in BIOS mode, not in EFI mode, as it was when you began. You can keep booting in that way, but if you want GRUB to manage the boot process, GRUB will also have to be the BIOS version; EFI-mode GRUB can't redirect to a BIOS-mode OS. (BIOS-mode GRUB also can't redirect to an EFI-mode OS.)


How can I decode a base64 string from the command line?

Just use the base64 program from the coreutils package:

echo QWxhZGRpbjpvcGVuIHNlc2FtZQ== | base64 --decode

Or, to include the newline character

echo `echo QWxhZGRpbjpvcGVuIHNlc2FtZQ== | base64 --decode`

output (includes newline):

Aladdin:open sesame


running a 32 bit .bin file on 64 bit Kubuntu

Type this in the Terminal:

sudo apt-get install ia32-libs

This will install most needed 32 bit libraries and hopefully you will be able to run the file.

Or if you prefer, you can install the ia32-libs package in the Software Center.


Ifconfig does not display network interfaces on Ubuntu 16.04 on VirtualBox

You can disable the use of PredictableNetwork and return to guessing the order of eth adapters by using

ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules

This page details how and why these names are used
https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/


The only way I've found to change colors is to edit the following three files in whatever theme I'm using.

/usr/share/themes/{theme name}/gtk-3.0/gtk.css
/usr/share/themes/{theme name}/gtk-3.0/settings.ini
/usr/share/themes/{theme name}/gtk-2.0/gtkrc

In the beginning of these files you'll find 4 pairs of core foreground and background colors used in applications based on the gtk 2 and gtk 3 libraries. Pair base_color and text_color are used for the document or text entry portions of windows where bg_color and fg_color are are used for the windows area where icons and labels are displayed.

Selected pair is for selected text and the tooltip pair is used for the tips that pop up when you hover over a button or link. These colors may be applied by applications with varying opacity or shadings. The colors you'll want to check are the base_color and text_color pair. #ffffff is pure white. You may find the gcolor2 application helpful for determining the color codes.  These sets of labels appear in all three files so I've been changing all three to be the same for any label I change.

Here's an example of what I changed in the gtk.css file in the Ambiance theme:

Keep in mind that the ones you're most interested in are base_color for background and text_color for the text foreground. I your example they both appear to be the same, #ffffff or other tinted white colors.

/* default color scheme */
@define-color bg_color #cdc3b8;
@define-color fg_color #262626;
@define-color base_color #accdff;
@define-color text_color #262626;
@define-color selected_bg_color #01b9fc;
@define-color selected_fg_color #ffffff;
@define-color tooltip_bg_color #A3D0FF;
@define-color tooltip_fg_color #023C79;


Boot and reboot Windows

If you want to access to the Windows partition temporarily, you can boot and reboot Windows. At reboot it does not hibernate, and you should be able to make the computer boot into Ubuntu (instead of rebooting Windows). In this situation Windows should leave its file system such that Ubuntu can mount it.

Warning: It is safe read files, but it is risky to write files to the Windows system partition, which is usually C:

Possible workaround with a USB drive

Maybe this workaround would work for you: If you have a USB drive (HDD, SSD, pendrive or memory card) with NTFS, I hope and think that Windows will flush its buffers at poweroff even when hibernating. Otherwise it would not be safe when moved to other computers with Windows, so I think Microsoft has made it work like this, but I have not tested it.

This means that a USB drive with NTFS should be available to mount in Ubuntu and safe to read and write after being used by Windows.


first of all, if you don't care about version, you can install the package founded in the official Ubuntu repos:

sudo apt-get install wkhtmltopdf

But if you want to install your specific version above(0.12.2) you should resolve the package dependencies.

first try to run the command:

sudo apt-get install -f

If this solves it then ok else you  have to install each dependency yourself.

dpkg: dependency problems prevent configuration of wkhtmltox:
 wkhtmltox depends on fontconfig; however:
  Package fontconfig is not installed.
 wkhtmltox depends on libjpeg-turbo8; however:
  Package libjpeg-turbo8 is not installed.
 wkhtmltox depends on xfonts-base; however:
  Package xfonts-base is not installed.
 wkhtmltox depends on xfonts-75dpi; however:
  Package xfonts-75dpi is not installed.

From above you can install each dependency yourself

sudo apt-get install fontconfig
sudo apt-get install libjpeg-turbo8
sudo apt-get install xfonts-base
sudo apt-get install xfonts-75dpi

But an easier solution is to use gdebi.

sudo apt-get install gdebi

then you can use it to resolve dependencies:

sudo gdebi wkhtmltox-0.12.2.1_linux-trusty-amd64.deb


Network applet missing from notification area after upgrading to Ubuntu MATE 15.04

The applet which manages this icon is called nm-applet.

In my case, I had an autostart entry for it in ~/.config/autostart/nm-applet.desktop, which I had created on Ubuntu MATE 14.10. (If you don't, copy nm-applet.desktop over from /etc/xdg/autostart/.)

After commenting out the following two lines:

#AutostartCondition=GNOME3 unless-session gnome
#Hidden=true

and logging out and back in, the applet was there again.

Note: if you use other desktop environments aside from MATE, you may need to re-enable AutostartCondition and tweak it according to your needs.

Note 2: this no longer seems to work on 18.04.


Since upgrade to 18.04 libreOffice calc no longer imports xml

OK, I think I found something that might help you.  Warning:  This might cause Libreoffice Calc to be unstable.

Click on Tools -> Options -> Advanced

Then click on Enable experimental features (this may be unstable)

After clicking OK it will prompt you to restart calc.  Then Data -> XML Source should now be enabled.

Hope this helps!


Bumblebee problem with external monitor on hdmi: program doesn't fill whole screen

I found something important out: I can start for example glxspheres with the option -fs (Full-Screen mode): DISPLAY=:8 optirun glxspheres -fs

I then get the expected behavior, glxspheres fills out the whole display. Without it, it's only partially filled.

I think, the problem is other than I originally supposed when asking the question. So I opened another question of how to get full screen with programs on the external monitor.

UPDATE: I solved all my problems thanks to these instrucions.


How to remove xmonad and bluetile from ubuntu 14.04

To remove a package, use apt-get remove <packagename>. This would leave the configuration files on your system, so if you reinstall later, the config files can be re-used.

To completely wipe the package and its configuration file, use apt-get purge <packagename>.

In your case the packages are calles "xmonad" and "bluetile".


pyenv command not found when running with sudo

For security reasons, sudo locates programs using its own secure_path, defined in the /etc/sudoers/ file:
Defaults        env_reset
Defaults        mail_badpass
Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"

Also note that when you do sudo echo $PATH, the $PATH variable is expanded by the user's shell before being passed to sudo. To see root's path using sudo, you would need to do something like sudo bash -c 'echo $PATH'


Can I replace 'Dash Home' with a list of applications

I found the answer, at least party...

http://www.webupd8.org/2011/06/use-classic-menu-in-unity-classicmenu.html

Adding Cardapio to the launcher gives me what I was looking for, just have to find a way to kill dash-home now.

sudo add-apt-repository ppa:cardapio-team/unstable
sudo apt-get update
sudo apt-get install cardapio


Black screen (without cursor) displays after login to Unity 8 on Ubuntu 16.04

I had a similar issue when logging into Ubuntu GNOME, my issues was resolved by:

When you reach the black screen upon login, you could try pressing 'Ctrl + Alt + F1' and blindly type your username, press enter and then type your password. Press enter after this and a CLI environment should be displayed similar to a normal terminal.

From here, enter the command: startx which should start the unity 8 desktop environment.


How do I partition my SSD to benefit of the speed?

Partitioning a disk does not increase speed. You benefit the most from a SSD if you put your "/" and /boot (if you want a separate partition for it onto the SSD. Booting my system from SSD takes about 7 to 10 seconds.

If I was you I would use the SSD for "/" and /home as a separate partition. But I would also not use /home for your personal data and change the ./config/users-dirs.dirs to change your directories to your 500Gb (so mount it as a partition). That way all the personal files and all your downloads etc do not wear your SSD. Swap on the 500Gb too. And the 2Tb can be another data partition.

Regarding swap: feel free to take 8Gb, 16Gb pr even 32Gb. Old rule was to use 2x the amount of RAM but nowadays you might not even need it. It really depends on usages: if you hibernate/suspend you need it. If you turn of your machine (since it boots in a few seconds) you probably will not need it with normal usage.

Mind though: if you use the machine for the more heavy usage. Run a large database, run websites, run a gameserver or things like that it might be better to store some of those onto the SSD and not bother about the wear of the SSD. In that case I would go all out on the SSD and prepare for the disk to fail: backup frequently and have a spare SSD, or more than one, on the side.


Suddenly unable to boot, stuck at 'Stopping save udev log'

It can happens because your x-windows is not getting suffecient space to blotup

press

ctrl+alt+f2

Then loggin with your user name and password in cli mode
type

  df -h

and go to the most space consuming ditectory and remove all unnessasary files and folders
and then
type

  init 6

to restart your system

hope this could solve your problam


You can create a loopback device to a file and do it that way

# create a 100M file in /opt
dd if=/dev/zero of=/opt/dev0-backstore bs=1M count=100

# create the loopback block device
# where 7 is the major number of loop device driver, grep loop /proc/devices
mknod /dev/fake-dev0 b 7 200

losetup /dev/fake-dev0  /opt/dev0-backstore

Make a little script to automate this and done.


I was able to solve this by upgrading to ubuntu 20.04, there must be some bug that was fixed in the new kernel release.


You cannot install random .deb files on any Ubuntu installation. Yes, it works a lot of the time, but sometimes you get errors like yours :)

From what I see, pydict is a VERY old python/gtk dictionary package, and it appears its structure is somehow not compatible with the current dpkg. Please try to see if a newer version exists...


Finally, I got this up and running and want to share my findings on this forum.
  The info I needed seems to be scattered around different sites.

Configure VPN ... in VPN Connections is greyed out.
Inconvenient, and I don't know how to solve, but there is a workaround.
Go through Edit Connections... and press +.  However, in the Connection Type, no VPN's are listed.
I (re-)installed the necessary modules for vpn connection, with
sudo apt-get install --reinstall network-manager network-manager-gnome openvpn
network-manager-openvpn network-manager-openvpn-gnome
network-manager-pptp network-manager-pptp-gnome pptp-linux
Now it is possible to add a pptp connection as described under the first bullet.  Configure it with credentials and settings as given by the VPN provider.
To avoid firewall problems, try first with UncomplicatedFirewall off.  sudo ufw disable and reboot.
After this : VPN Connections -> new_vpn establishes the VPN connection.  However, in my case it was not possible to access the internet.
It feels like the connection breaks after the first site, or it takes forever to load any site.
The cure for this problem I found here.
Apparently the mtu, maximum transmission unit, for the vpn port is too high.  In my case I have to lower it manually by executing
ifconfig ppp0 mtu 1388
The maximum mtu which is suitable can be found by connecting to the vpn and then pinging some site (e.g. ubuntu.com) by executing
ping -M do -s <number> -c 1 ubuntu.com.  Increase <number> by 10 until the connection is lost (once it is lost, in my case it also fails when lowering again)
I had to revive the connection by sudo service network-manager restart and connecting again to the vpn.  Once you find the highest usable <number>, add 28 and that
is the mtu to use with the vpn port. See also here.
Still two problems left, how to automate the setting of the mtu value when connecting to the VPN, and DNS seems to be gone after disconnecting from the VPN.
The latter can be solved by sudo service network-manager restart.  Both tasks can be automated as suggested in script
/etc/NetworkManager/dispatcher.d/01-ifupdown.  Scripts in the dispatcher.d folder are called with the port and event as argument.
So, I create an executable script in this folder, as below
    #!/bin/sh

#info : pre-up and pre-down are not implemented in network-manager

if [ "$2" = "vpn-up" ]; then
    /sbin/ifconfig "$1" mtu 1388
fi

if [ "$2" = "vpn-down" ]; then
    /usr/sbin/service network-manager restart
fi

Finally, I want to enable ufw again.  For this I need to add -A ufw-before-input -p 47 -j ACCEPT in file /etc/ufw/before.rules, just before
# drop invalid packets and do sudo ufw enable, and reboot.
Now everything works fine, in my case.
Later I found that another (and probably better) way to get the dns back is to store the package resolvconf.
sudo apt install resolvconf
sudo dpkg-reconfigure resolvconf
Then the vpn-down part of the script can be deleted.
Later I found this behaviour of dns loss for non-superuser after pptp vpn described here:
https://bugs.launchpad.net/ubuntu/+source/ppp/+bug/1778946


pyvenv-3.4 disappeared in Ubuntu 14.04.3?

venv is a built-in module in Python 3. You can always call it via the -m <module> call stack. So for your example:

python3 -m venv --without-pip venv

As for where it's gone, 3.4.0 (in trusty-updates and trusty-security) ships the script. However 3.4.3 in trusty-proposed does not. This may explain why yours has gone missing.

You can still use it with python3 -m venv ... so it's not that important.

If you're wondering how you ended up on 3.4.3, it was SRUd into trusty-updates back in September and pulled very recently after it was found to break several things. This should be fixed and re-released in short order. Follow that bug report for updates.


Ubuntu Upgrade 13.10 to 14.04 - Why isnt X Using My 3D Hardware Anymore?

after login to the terminal , try to rm ~/.Xauthority  and then reboot
I had a similar issue and that was the solution


In case someone is still searching for an answer, from the documentation of Proftpd :

  Filesystem Tricks A typical scenario is one where "DefaultRoot ~" is
  used to restrict users to their home directories, and where the
  administrator would like to have a shared upload directory, say
  /var/ftp/incoming, in each user's home directory. Symbolic links would
  normally be used to provide an arrangement like this. As mentioned
  above, though, when chroot(2) is used (which is what the DefaultRoot
  directive does), symlinks that point outside the new root (the user's
  home directory in this case) will not work. To get around this
  apparent limitation, it is possible on modern operating systems to
  mount directories at several locations in the filesystem.

  To have an exact duplicate of the /var/ftp/incoming directory
  available in /home/bob/incoming and /home/dave/incoming, use one of
  these commands:

Linux (as of the 2.4.0 kernel):

  mount --bind /var/ftp/incoming /home/bob/incoming
  mount --bind /var/ftp/incoming /home/dave/incoming

or, alternatively:

  mount -o bind /var/ftp/incoming /home/bob/incoming
  mount -o bind /var/ftp/incoming /home/dave/incoming

BSD (as of 4.4BSD):

  mount_null /var/ftp/incoming /home/bob/incoming
  mount_null /var/ftp/incoming /home/dave/incoming

Solaris:

  mount -F lofs /var/ftp/incoming /home/bob/incoming
  mount -F lofs /var/ftp/incoming /home/dave/incoming

  The same technique can be used for  directories, which also
  operate in a chroot()ed environment. Also, it should be possible to
  mount specific files this way, in addition to directories, should you
  need to (a directory is just another file in Unix).

  As usual, more information can be found by consulting the man pages
  for the appropriate command for your platform. The commands for other
  flavors of Unix will be added as needed.

  In order to have these tricks persist, to survive a system reboot, the
  /etc/fstab (or /etc/vfstab) file may need to have these mounts added.
  Consult your local fstab(5) (or vfstab(4) for Solaris) man pages for
  more information.


Filenames with space showing as 'file name' after upgrade to 18.04

This ls behavior change was from 2016 but is finally making it's way into Ubuntu.

To get back the old behavior use ls -N.

Optionally you can use an environmental variable:

QUOTING_STYLE=literal ls

Make it an alias, or set export QUOTING_STYLE=literal in your ~/.bashrc to achieve the old behavior.

You can read the link above for more details including the history of when, where, why and how this all came to be. There are quite a few comments under the author of ls changes where he justifies the new behavior:

  A few points about the change.

  It was introduced in coreutils v8.25, and alignment improved in v8.26
  It only happens when outputting to terminals so doesn't break scripts
  It disambiguates the output for users for files containing whitespace
  It sanitizes output so it is safe to copy and paste
  Output is now always valid to copy and paste back to shell
  Users can get back to the old format by adding -N to their ls alias


AMD ATi Radeon HD 6870 drivers not working

Ok first we have to remove all your previous installations.

In the terminal run:

sudo sh /usr/share/ati/fglrx-uninstall.sh
sudo apt-get remove --purge fglrx fglrx_* fglrx-amdcccle* fglrx-dev*

then

sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install linux-headers-generic

now go to dash, open software sources, go to additional drivers tab. You should see the catalyst 13.2 beta 3 driver, activate it.

when you're done, in the term run:

sudo amdconfig --initial -f

reboot.


I've figured out how to fix it!

Instead of "nomodeset" in the grub options, I put "acpi_osi=Linux", and it booted normally with open-source Radeon drivers.


What program can I use to convert RAW images from my Sony camera to jpeg?

Imagemagick is another good tool for the image conversion. To install this package run below command:
sudo apt-get install imagemagick


Well, you could just add this line to your ~/.profile1:
HOME=/user/home/

However, that really isn't a good idea. Problems it would cause include (but are probably not limited to):

That will only work if /home/user is owned by your user. If it isn't, you won't even be able to log in.

This will work for your user only. For everyone else, your home directory will be whatever is stored in /etc/passwd. This means that, for example, cd ~user will fail. In other words, if I log in as bob and bob has the line HOME=/home/bob/foo in ~/.profile, then bob thinks that his home directory is /home/bob/foo but nobody else knows that:
 $ whoami
 bob
 $ echo $HOME
 /home/bob/foo
 $ cd ## this moves to your $HOME
 $ pwd
 /home/bob/foo

So far so good. But:
    $ whoami
    terdon
    $ cd ~bob
    $ pwd
    /home/bob

This will drive your sysadmin insane. You do not want to anger your sysadmin for you are crunchy and taste good with ketchup.

In any case, it is rarely a good idea to mess with variables like $HOME, as it can often have unintended consequences. Instead, a much cleaner solution would be to make sure every new shell session starts in the target directory. Just add this line to your ~/.bashrc:
cd /user/home/

Now, each time you log2 in or open a terminal, you will find yourself in /user/home.

1 Or ~/.bash_profile if it exists.
2 Log in to Debian-based systems like Ubuntu, anyway. For other distributions/OSs, you might need to add it to ~/.profile as well.See here.


Why is lubuntu (and Ubuntu) 18.04 slow to start up?

The machine is a Dell Latitude D530 32bit with Intel Mobile GM965/GL960 Integrated Graphics. This problem seems quite widespread (turned out to be a bug in Ubuntu 18.04: Bug #1767808 - Launchpad)

Kernel: 4.15.0-43

Firstly I used this to check for delays - very clearly highlighted in red on the commands output:

dmesg

Then I searched online and found this Very long boot time and error messages on LM19 - Linux Mint Forum

This solved the problem: Editing this file: /etc/default/grub

Altered the GRUB_CMDLINE_LINUX_DEFAULT= line to:

GRUB_CMDLINE_LINUX_DEFAULT="video=SVIDEO-1:d quiet splash"

Then:

sudo update-grub

and reboot. Now it all moves super-fast!


How to find out if my system is i386 or x86_64 before installing Ubuntu?

Method : Use the set command

To use the set command to determine the processor type, follow these steps:

Click Start, click Run, type cmd in the Open box, and then press ENTER.
At the command prompt, type set, and then press ENTER.
Note the string that is displayed next to **PROCESSOR_IDENTIFIER**.

Method : Use Registry Editor

To use Registry Editor to determine the processor type, follow these steps:

Click Start, click Run, type regedit in the Open box, and then click OK.
Locate and then click the following registry subkey:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment
In the right pane, note the string that is displayed in the Data column for the PROCESSOR_IDENTIFIER registry entry.

Quit Registry Editor.

Using Windows Registry
Using Regedit

Go to Start -> Type regedit

Browse to HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0

From ProcessorNameString you will be able to see the name of your processor and from Identifier you will see the family of the processor and if it has 64 then it is 64-bit capable.

Go to Start -> Right click on Computer -> Click Properties. Click on Windows Experience Index.

Method: Using MSINFO32

Go to Start -> Type msinfo32.exe

from the System Information page under System Type you will find as x64-based PC.

Using a utility software

Cpu-z, requires no installation. This executable allows you to quickly identify your CPU and gives you its technical characteristics such as the type of operating voltage, the instruction set run, the amount of cache and more information about your motherboard, chipset and memory (RAM).

http://www.cpuid.com/

for more help
http://support.microsoft.com/kb/888282


I believe you have made a typographical error. I think what you may be looking for is libsnpav0 You can find this in the Universe repository. Simply enable universe in software sources and install with sudo apt-get install libsnpav0 I found this package by searching Ubuntu Package Search:

Sources:

Experience

http://packages.ubuntu.com/search?keywords=libspnav0&searchon=names&suite=all&section=all


Thunderbolt Display on non Apple computer

The only way it works for me is to use a Thunderbolt Docking Station like belkin thunderbolt 2 dock or kanex thunderbolt dock. with this both the apple thunderbolt display works as a Display but the ports (ethernet, firewire,usb) are not usable. so its not a cheap solution.


You can use the gnome-disks tool to create a live usb of any distribution and it works for me every time (startup-disk-creator does not), though it is a bit unclear it can do that.

If it is not preinstalled in lubuntu run

sudo apt-get install gnome-disks

Now open it and choose your USB drive on the left, now click the small cog icon in the volumes section

Choose restore partition image from the list.

Now give this the .iso file and choose start restoring, it will install it on your USB stick.


Is it possible to install a repository via a web (Clicking in a webpage link)

apturl (the magic program that handles apt:// URLs) does have code to handle apt+http:// URLs like this:
apt+http://launchpad.net/~oli/ppa?package=olis-package

Which would theoretically add that PPA, install that package and then (if the user wanted it), leave that PPA installed.
But apturl's manpage currently says this is disabled:

Warning: This is currently disabled because of security concerns.

I've just tested it and it does appear to be disabled. I can understand the security issue. Having people install software from PPAs is enough of a security issue let along making it a 1-click operation.
The alternative for people who want to release a PPA for their own software is to write a dummy-package that adds the PPA and installs the other packages. You either make that .deb available on your website or you could ask for it to be added to the universe. Then it really would be a 1-click thing.


Ubuntu 14.04 and RaspberryPi 2, help me understand how it works

It doesn't work with generic kernel. It needs some firmware.

This specific stuff is in the PPA. It's sometimes updated. There is also an image creation script on that wiki. And a resulting image too.

To get a working SD image for Pi 2, you have to build a Pi-specific kernel package (using the source code from the rpi branch) and assemble several kernel-related packages (by putting together some slightly altered standard things and also downloading binary packages with Pi firmware/video driver).

So, there are 3 possibilities:

use the pre-built image (use image from that wiki or use Ubuntu Mate image and remove some UI/network manager packages)
use pre-built Pi-specific packages from PPA and generate an image with the script (so now the package set of the image is customizable)
use raw materials: build Pi-specific packages from sources, generate an image (in this case you decide when to update the kernel by merging/rebasing the rpi branch into the latest kernel version and rebuilding; you also decide when to repack the firmware)

update

Supporting raspberry images is painful. They haven't pushed all of their kernel stuff to upstream, the binary blobs don't look good either. Unity can't work with the video driver of raspberry (Unity needs a real OpenGL).

Your instructions for Ubuntu Mate just for backup here:

sudo apt-get -y --purge autoremove mate-* ubuntu-mate-* xcursor-themes xdg-utils xinput xorg-docs-core xul-ext-ubufox xauth libxrandr2 ^libqt.* libportaudio2 libopenjpeg5 libmp3lame0  libgtk* gnome* xorg  xserver-common libwayland-client0 libwayland-server0 libwebcam0 libvlc5 ^qtcore4-.* duplicity xterm lightdm x11-common ^libxcb-.* ^libx.*  avahi-dnsconfd libfontenc1 python-xlib libpixman-1-0 xbitmaps ubuntu-sounds youtube-dl yelp-xsl  sound-theme-freedesktop samba-common atril-common

sudo apt-get -y --purge autoremove ^bluez.* brasero-common  ^caja-.* crda ^cups.* dvd+rw-tools eom-common ^fontconfig.* ^fonts-.* ^foomatic.* growisofs ^gsettings.* ^gstreamer.* iw jackd2 ^libasound2.* libavutil-ffmpeg54 ^libcups.* libcdparanoia0 libdvdnav4 libdvdread4 ^libfreerdp.* libgphoto2-l10n ^libgs9.* ^libgstreamer.* libiw30 libjack-jackd2-0 libjasper1

sudo apt-get -y --purge autoremove ^libjpeg.* ^libmtp.* libogg0 libotr5 libpng12-0 libplank-common ^libreoffice.* libtiff5 libunity-scopes-json-def-desktop libwebp5 libvorbis0a libvorbisenc2 ^libwinpr-.* marco-common  media-player-info oem-config-gtk oem-config openprinting-ppds ^printer-driver-.*

sudo apt-get -y --purge autoremove  python-boto python-caja-common python-cloudfiles  python-codebug-i2c-tether python-codebug-tether  python-colorama python-astropi python-html5lib python-picamera python-sense-hat

sudo apt-get -y --purge autoremove python3-picamera python3-markupsafe  python3-pil qtchooser rfkill shotwell-common wpasupplicant wireless-regdb vlc-data avahi-autoipd uvcdynctrl-data libhtml-parser-perl   libhtml-tagset-perl  python3-html5lib python3-markupsafe pluma-common atril-common engrampa-common menu-xdg  desktop-file-utils  gir1.2-freedesktop hicolor-icon-theme  policykit-desktop-privileges python-xdg  python3-xdg gir1.2-javascriptcoregtk-3.0 alsa-base linux-sound-base

sudo apt-get -y install deborphan
sudo apt-get --purge autoremove $(deborphan)


Default Ruby version set with RVM not recognized by system

The ruby-1.9.2../bin path needs to be in your PATH in front of any other ruby. rvm use 1.9.2 should be putting it there, not sure why it would not. Mine is a little different since I use a private rvm installation (in my ~/)

Maybe this will help you:

jeremy@octavian:~$ rvm use 1.9.2
Using /home/jeremy/.rvm/gems/ruby-1.9.2-p290
jeremy@octavian:~$ ruby --version
ruby 1.9.2p290 (2011-07-09 revision 32553) [i686-linux]
jeremy@octavian:~$ which ruby
/home/jeremy/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
jeremy@octavian:~$ echo $PATH
/home/jeremy/.rvm/gems/ruby-1.9.2-p290/bin:/home/jeremy/.rvm/gems/ruby-1.9.2-p290@global/bin:/home/jeremy/.rvm/rubies/ruby-1.9.2-p290/bin:/home/jeremy/.rvm/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games


On a N586, I have just installed 12.10 alongside Windows 7 and kept the OKR working.  I did not find an exact how-to anywhere on line, so did it my way.  It worked (so far !). You need to be comfortable repartitioning.

Problem is that Lenonv uses 4 primary partitions for their Windows 7 install.  Solution is to turn the main Windows_OS partition C: into a logical one - this works because Windows actually boots from the 200MB SYSTEM partition which is still primary.  Then you can shrink the C: drive and run the Ubuntu install which will use the remaining space.  I contemplated making the D: drive logical as well, but was not sure if OKR would get upset.  Seems simple but it took ages to make it happen.

I have Windows 7, Ubuntu and OKR all working.

Some specifics:

Make rescue disk and full recovery disk set first!  Most folks recommend two copies, just in case.
I used a bootable partitioning tool (GParted) to re-characterize the Windows_OS space
Then back into Windows to use the Disk Management tool to shrink the windows partition (hint:  defragment it first to shift some files down)
Then run Ubuntu install.  You could manually partition, but I tried the "install alongside...." option and it worked a dream

As for hardware compatibility, the only thing I'm struggling with is the internal microphone. Everything else seems to work out of the box.

Good luck!


Mercurial central repository at a Samba location

I'm going to assume that this is a single-user machine and that your user ID is 1000 (you can check if it is by running id in a terminal).

As far as I understand, your /etc/fstab has something like/etc/fstab as follows:

//x.x.x.x/sharename  /mnt/rua  cifs  username=abc,password=def 0 1

Add forceuid,uid=1000 flags to it:

//x.x.x.x/sharename  /mnt/rua  cifs  username=abc,password=def,forceuid,uid=1000 0 1

then re-mount the share with

sudo umount /mnt/rua
sudo mount /mnt/rua

and check with ls -l that you see

drwxrwx--- 8 <yourusernamehere> users 0 2011-06-10 12:47 rua

Now you should be able to fully access the share's contents without becoming root.


Problem while changing the SATA mode to AHCI

I am very thankful for @oldfred for helping me with an old link. I now have Ubuntu up and running on my machine. The link is given below here -
Acer Nitro 7: BIOS Main menu SATA Mode Missing
Now I can finally have a peaceful night's sleep.


It means that you haven't updated a lot of system packages in a long time, or you are not installing the vlc package from the repository.

Run

sudo apt-get update

and then run

sudo apt-get upgrade

and then run

sudo apt-get install vlc

If you still face issues run

sudo apt-get -f install


Android studio issues, missing platforms, design editor

You specified to use SDK v26. Set compileSdkVersion 28and targetSdkVersion 28 in your build.grandle so it will not ask for SDK v 26 .
Read this for more information: https://stackoverflow.com/questions/26694108/what-is-the-difference-between-compilesdkversion-and-targetsdkversion

This is a programming question so please use stackoverflow next time.


The External Tools plugin is for running an external command. To use that for this, you'll need to provide a command that will take the selected text and convert it to what you want in the output, and then have gedit use that output.

A number of possible commands can be used. For example:

sed 's/.*/{{c1:&}}/'
printf '{{c1:'; cat; printf '}}'
printf '{{c1:%s}}' "$GEDIT_SELECTED_TEXT"

The first might not work well with multi-line selections, the latter two should wrap the whole selection even if it spans multiple lines.

Then set the options accordingly:

Input: Current selection
Output: Replace current selection


Constantly asked for WiFi password and CA certificate

The warning was happening again and again.
What I ended up doing was first I did this
I clicked the "Choose a Certificate Authority certificate..."

Then I went to "/usr/share/ca-certificates/mozilla/AddTrust_External_Root.crt"
and Added that as my certificate.

The certificate error went away but the password prompt for the WiFi did not

So I went to "Edit Connections" and selected my wireless connection.

Then I went to "General" tab and unticked
"All users may connect to this network"

No more CA prompt or wireless password prompt.


PIP3 import error cannot import name 'load_entry_point' from 'pkg_resources' (unknown location)

There was nothing wrong with steps. But if we are getting error like above, then we need to be able to resolve that error. I just rebooted my system, restarted everything. Sometimes its the problem with servers.

sudo apt-get update

sudo apt-get upgrade

sudo apt-get install python-setuptools

and finally did

sudo apt-get install python3-pip

And it worked


Ubuntu 20.04 LTS Lexmark CS310dn printer has bad driver

Well, there was a firmware update.
https://www.lexmark.com/en_us/printer/7611/Lexmark-CS310dn

Download, unzip to clean directory, then follow the instructions on how to update the firmware via the printer's browser interface.
There will be no love after the printer reboots. Don't despair. You then need to reboot every Linux machine so it loads the correct files after discovering the printer. Life will then be good.


which graphics card to use multiple monitors with multiple workspace

Did you try some 3D software with your xinerama setup ?

from Xinerama article on Wikipedia :

  In some[which?] implementations, OpenGL (3D) direct-rendering only
  works on one of the screens. Windows that should show 3D graphics on
  other screens tend to just appear black. This is most commonly seen
  with 3D screen savers, which show on one of the screens and black on
  the others. The Solaris SPARC OpenGL implementation, ATI Proprietary
  Linux driver and nVidia Proprietary Linux driver all support hardware
  accelerated rendering to all screens in Xinerama mode.


First steps in verifying random crashes?

First 2 basic Steps are:

Read the syslog and dmesg (/var/log/syslog* and /var/log/dmesg*) and check for errors
right before the last boot. In dmesg the boot is at [0.000000], so you want right before that.
Memtest! Your RAM may have gone byebye.


Is it possible to use DD to obtain splited images from a hard-drive?

You could use 3 options from dd, count, skip and seek like:

dd if=/dev/rdisk0s2s1 of=iphone1.img bs=1M count=1024
dd if=/dev/rdisk0s2s1 skip=1024 of=iphone2.img bs=1M count=1024
dd if=/dev/rdisk0s2s1 skip=2048 of=iphone3.img bs=1M count=1024

And so on. This way it will create several images, with the same size(1024MB).

To restore the from the backup, load the images in order, and use commands like these:

 dd if=iphone1.img of=/somepartition bs=1M conv=sync,noerror
 dd if=iphone2.img of=/somepartition seek=1024 bs=1M conv=sync,noerror
 dd if=iphone3.img of=/somepartition seek=2048 bs=1M conv=sync,noerror


Execute a script when the output of a command has a specific string

Typically this is accomplished with if statement and grep pipeline. Something like

$ if df | grep '/dev/sdb1' -q; then echo "Partition mounted"; fi
Partition mounted

Trick here, is that if statements operate on exit statuses of commands, and the exit status of the whole pipeline is the exit status of the last command. Of course grep -q will not print anything to the screen, but the zero exit status will tell you whether or not the command succeeded (i.e. grep found desired string in the output) or not if non-zero.

A different approach is via case statement, and command substitution, which I'd find perhaps more suitable where output is a single-line, and where you want to shoot for script portability between operating systems ( aka POSIX compliance ).

case "$(mountpoint /)" in
    *"is a mountpoint"*) echo "Yup,it's a mount point alright";
                         stat /;;
esac

Third way, would be via again command-substitution and test command for exact match.

[ "$(command1 )" = "Some string"  ]

Or bash's extended test [[ for pattern matching:

# [[ $(command1) =~ ^pattern$ ]]
$ [[ "$( mountpoint /proc )" =~ .*is\ a\ mountpoint.*  ]] && echo "Yup"
Yup

Those can be used within if statement, or with conditional operators like &&, e.g. [ "$(echo test)" = "test" ] && df.

Best approach, I think would be to make it all a function so that you can pass your argument to the desired command, and perhaps reuse it later within if or case statement. So something like this:

check_mountpoint(){
        case "$(mountpoint "$1")" in
        *"is a mountpoint"*) echo "Yup,"$1" is a mount point alright";
                             stat "$1";;
    esac
}

Of course, keep in mind these are just slightly verbose, and perhaps unnecessary, but still examples of how it can be done. Adapt to your specific case as necessary. Keep in mind this is not exhaustive information,too.


How to set grub2 to recognize xubuntu as xubuntu and not as ubuntu?

Here's an example. Creating the Custom Menu

You just follow these instructions and rename the partitions to X/Lubuntu.


I power off the machine and afterwords it reboots

Open a terminal window, write this down;
$ sudo gedit /etc/rc.local.shutdown

the command will open the file /etc/rc.local.shutdown
Then type this command in the file;
rmmod ehci_hcd

Save the file


"Close tabs" conversastion very slow without alert sound and another sound issue

After reinstalling two times and the problem is still there, and after so many configuration tries and I realized that this is the problem:
The day before this problem came out, I just sold my speaker (a professional one), it was connected to my motherboard's speaker output, after the selling, since my display supports sound output through HDMI, so I decided using this as my speaker, and this is where the problem comes out, I think there is some compatibility with the HDMI sound output which makes a lag when the system needs to pop out a notification with sound.


grub error: out of disk when booting 12.04 server with hardware RAID5 and gpt

biosgrub and /boot partitions are two different things.  The biosgrub partition only needs to be 1 MB, and must NOT be mounted anywhere.  A /boot partition needs to be more like 150-200 MB and formatted with a filesystem, like ext4.  You might try reinstalling with both a biosgrub and a 200 MB /boot partition and see if that fixes it.  Or try booting the grub rescue cd and running ls -l to see how large the bios reports the size of the disk is.  It may be that the megaraid bios has a limit on its bios size.


Netgear wnda3100v2 taking forever to establish wi-fi connection

Maybe drivers for your issue, I used the drivers linked in this guide and don't have the issues in 14.04 you are describing: http://av3ngr.wikispaces.com/Netgear+WNDA3100v2+USB

Only issue I've ran into with this config is a strange issue with wireless related to dual booting, not sure if you are dual booting. If I warm reboot from Windows to Ubuntu. Wireless works no issues. Once in Ubuntu and warm reboot into Windows, wireless blinks amber and blue, and doesn't recognize in Windows. I have to re-seat the USB. It only does this during a warm reboot from Ubuntu to Windows, Cold boots wireless works without issues. I would imagine this is something to do with ndiswrapper, but haven't been able to pinpoint. :\


Install official Nvidia drivers, or are Ubuntu 17.04 drivers sufficient?

If it's not abhorrent to you to have closed-source, proprietary software on your system, you'll surely get better performance and compatibility (with games, for instance) by installing the current nVidia driver than using the open-source Nouveau replacement driver.

That said, the nVidia drivers (albeit not always the bleeding-edge version; rather versions that have met standards for stability) are available through the Canonical repositories and can be installed with Driver Manager, from System Settings, without even needing to use the package manager.  You could reasonably claim that the nVidia drivers "ship with Ubuntu".


Ubuntu normally comes with what is provided by ubuntu-desktop meta-package, whilst Xubuntu normally comes with what is provided by the xubuntu-desktop meta-package.

Xubuntu has the XFCE desktop, but does not have the Unity desktop, whilst Ubuntu + Xubuntu-desktop would have both.
Ubuntu + Xubuntu-desktop will use more disk space, due to extra packages for Unity etc
The Xubuntu-desktop package should install all the packages that Xubuntu would come installed with - from here:

  Ubuntu System Metapackages

  ...
      xubuntu-desktop: The XFCE desktop environment, and all the software distributed with Xubuntu


How to umount non-sudo sshfs created directory

sshfs uses FUSE (File system in USErspace) instead of the regular mount with elevated permissions.

That also means you can not use umount (the counterpart of mount) to unmount the file system though, but you have fusermount -u, the FUSE unmount command:

fusermount -u /temp/user/harddrive

For more info, see e.g. man sshfs and man fusermount.


Purple boot screen with diagonal broken lines after selecting Windows 10 from dual boot menu

I got this problem while booting the system in safe mode and finally got the solution for my own problem.
Boot into Ubuntu, there follow the steps which are described in this video and which are also listed below.

Open the terminal and run this command: sudo fdisk -l

If a Windows partition exists, then update grub with this command: sudo update-grub

Restart your system with this command sudo reboot Then after loading you will be asked to select a boot option.
Warning: This might not work on your PC. I have UEFI System for Windows 10. I installed Ubuntu in UEFI mode too.

After rebooting, select Windows 10 from grub menu, it may boot into safe mode. Then go to System Configuration -> Boot tab -> uncheck Safe boot -> Click Apply and then OK. Restart the system again.

Change the option in System Configuration to:


!! means the last executed command.
echo !! will echo the last command, which was echo ! in your case.


You need not add the PPA twice. The easy way is via add-apt-repository. You find the PPA at this link,

launchpad.net/~jonathonf/+archive/ubuntu/texlive-2017

and it describes how to use it,

sudo add-apt-repository ppa:jonathonf/texlive-2017
sudo apt-get update

These commands work for me (I tested in 16.04.1 LTS - live). Maybe there was a temporary glitch. Maybe there was an error because you try to add the PPA twice.


On KDE Plasma you can go to "fonts" and force font dpi. In my case I forced "120".

Press the "Meta/Windows/Start" Button, type "fonts" open the fonts application. At the bottom of the windows is an option "Force fonds DPI". Check the box and set a DPI. Click here to see a picture of the fonts window


the relationship between terminal and the process

You are right about the father-son behavior. Processes that you are starting from the command line are getting their signals from the terminal instance. Once you close the terminal it will send a HUP (hangup) signal to the depending processes.

This is very useful when you have only one terminal so that once you logout it will notify all processes that the user logged out and they should terminate their activity. However, in your case you want to process(es) to ignore this signal and continue their work even after the terminal has been closed. For that we have a special command called nohup that you should prefix with your regular command (e.g. nohup gedit).

You may also ask where does the output that went to console goes after a terminal is closed. Well, a file in your home directory called nohup.out is being created and all output from processes will be redirected to it.

Please notice, the nohup does not open the process in background so you will still need to add & postfix if you want it (e.g. nohup gedit &).


Which version of Python do I have installed?

Ubuntu comes with both versions, yes. The python command will always point to a Python 2.x version, and python3 will always point to the default Python 3.x version. The python command will never point to Python 3.x.

I'm not sure what Geany uses exactly, but I would suspect it uses Python 2.x (and thus probably puts #!/usr/bin/python (or should put if it uses /usr/bin/env python instead), in the scripts it generates.


Why does the Ubuntu Software Center deliver an outdated version of TeX Live?

Install it manually using the instructions from the TeX Live Website. See also here.


How and where all is Ubuntu.com using metalinks?

To download Ubuntu using Metalink

Metalink files for downloading Ubuntu are available on the Ubuntu Releases server: http://releases.ubuntu.com/10.10/

A typical user might find this from Ubuntu's homepage by navigating to Download ▸ Alternative Downloads and then clicking "a location near you".

Right now this is only officially used for downloading complete ISO images, but there is some experimental work being done to leverage Metalink for software updates as well.

To use Metalink files in Ubuntu

To use Metalink files you must have a client program that supports the Metalink standard. Since Metalink is relatively new, few clients exist at this time. At a glance, the command-line program aria2 (install) and the Firefox extension DownThemAll look promising.


Can I use cron to chime at top of hour like a grandfather clock?

heemayl has provided the correct answer to get cron to run at the top of the hour and bottom of the hour. Thanks again! However as other users have discovered a cronjob cannot play sound files by default:

How to make speaking clock ( via cron and festival tts) work while playing music
Help using crontab to play a sound

Configuring cron to play sounds
In order for cron to play sound files it needs to export an environment variable:
export XDG_RUNTIME_DIR="/run/user/1000"

Once this is done in your script sounds will play.
As pointed out by another answer your user ID may not always be 1000. To find your user ID use:
$ id

uid=1000(rick) gid=1000(rick) groups=1000(rick),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),113(lpadmin),128(sambashare)

If your user ID is not 1000, then change the script to your ID.
Configure cron to run top of hour and bottom of hour
crontab -e setup (last 5 lines only):
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h  dom mon dow   command
00 *    *   *   *    /usr/local/bin/top-of-hour-chime    >/dev/null
00,30 * *   *   *    /usr/local/bin/bottom-of-hour-chime >/dev/null

Most users setup cron to use the nano editor. Use these control keys in nano to save your work:

Add the last two lines above and use Ctrl+O to write Out (save) the file.
A /tmp... filename is presented, but do not be concerned, simply press Enter.
Now use Ctrl+X to eXit the nano editor.

The bottom-of-hour-chime script runs at the top of the hour too but, that is OK since it's short and sweet.
If you don't have the >/dev/null at the end of the lines cron tries to email you with the command output. If you don't have the mail server setup an error message appears in your /var/log/syslog file:
Oct 02 10:00:07 dell CRON[21259]: (CRON) info (No MTA installed, discarding output)

Configuring cron to display pop-up notifications
The script  displays a pop-up notification message at the top of every hour. So for this an additional variable needs to be exported:
eval "export $(egrep -z DBUS_SESSION_BUS_ADDRESS /proc/$(pgrep -u $LOGNAME gnome-session)/environ)";

Contents of top-of-hour-chime
#! /bin/bash

# NAME: top-of-hour-chime
# PATH: /usr/local/bin
# DESC: Play sound called by cron
# CALL: Automatically called by /var/spool/cron/crontabs/<user_name>
# DATE: Created Oct 1, 2016. Modified June 10, 2018.
# UPDT: 2016-11-09 - Add notification bubble with time in text.
#       2018-06-10 - Switch from `ogg123` to `paplay` in default installation.

# exit # uncomment to suppress when watching movies

# paplay needs environment variable exported:
export XDG_RUNTIME_DIR="/run/user/1000"

# needed for notify-send
eval "export $(egrep -z DBUS_SESSION_BUS_ADDRESS /proc/$(pgrep -u $LOGNAME gnome-session)/environ)";

# get hour in 12 hour format
HOUR=$(date +%I)
ZHOUR=$(echo $HOUR | sed 's/^0*//')

pactl set-sink-volume 0 -25%
DISPLAY=:0 notify-send --urgency=critical --icon=/usr/share/icons/gnome/256x256/status/appointment-soon.png "It is ""$ZHOUR"" o'clock"
paplay '/usr/share/sounds/ubuntu/ringtones/Melody piano.ogg'
pactl set-sink-volume 0 +25%

The export XDG_RUNTIME_DIR... is necessary to get sound to play. This is because cron runs in minimal environment. This line should be omitted first if it you use a third party sound player. Then if no sound put the line back. Then still if no sound, well happy hunting!
The two main TV news shows I watch over the net have softer volume than normal so I have the TV turned up higher than normal. Consequentially when ogg123 plays sound files they sound very loud. So pactl is used to reduce volume before chime and increase it afterwards.
Contents of bottom-of-hour-chime
This is almost a duplicate of top-of-hour-chime and perhaps redundant here, but included for full documentation purposes.
#! /bin/bash

# NAME: bottom-of-hour-chime
# PATH: /usr/local/bin
# DESC: Play sound called by cron
# CALL: Automatically called by /var/spool/cron/crontabs/<user_name>
# DATE: Oct 1, 2016. Modified June 10, 2018.

# UPDT: 2018-06-10 Switch from `ogg123` to `paplay` installed by default.

# exit # Uncomment to suppress when watching movies.

# paplay needs environment variable exported:
export XDG_RUNTIME_DIR="/run/user/1000"

pactl set-sink-volume 0 -25%
paplay /usr/share/sounds/ubuntu/ringtones/Bliss.ogg
pactl set-sink-volume 0 +25%


I finally solved my problem. Here are the steps I followed :

reboot on USB, choose "Try Ubuntu without installing"
install and launch Boot repair
as the first attempt failed, I relaunched the tool without rebooting
reboot without USB. The PC booted directly on Ubuntu (which was still not what I wanted)
sudo os-prober shown me that Windows 7 was still detected
execute sudo update-grub
reboot : that's ok !


Reset Root Password for MySQL via Package Configuration

Installing and uninstalling mysql won't remove your database.  If you have a database it'll use what is there.

If you purge mysql and rename or remove the mysql configuration files you'll have an opportunity to perform a fresh install of mysql, whereas you can use a new password.

You have to have the password to access your current mysql database.

You asked Do I need to do anything to gain access back into my mysql as root ?.  The answer is yes.

You can change the password by running steps provided in this answer:
mysql doesn't ask for root password when installing


Can see my HDD in Windows but not from Linux live boot

Arka Bhai - I can tell you is that I purchased the same laptop in first week of August and trying all the things which you did in your post above. I am still unable to find a solution. However, good thing is that I made live 16 GB USB of various Linux distros in UEFI GPT scheme (Ubuntu, Manjaro, Mint and Solus) and installed each of them on separate 64 GB USB sticks with full installation. And I can tell you that this work Fine and you can store files, change settings and backgrounds without any problems and next time when you boot your settings and documents are intact. This way I choose my distros anytime I like. This is because I feel Dual Boot is not getting done on this laptop maybe due to proprietary encryption or internal locks placed by the default pre-installed OS W10 in my case. So I chose this method to do full installation on external USB sticks of adequate storage. You can choose more than 64 GB stick also. But keep in mind that it should be UEFI GPT scheme bootable only. I hope you will enjoy my way of solution which is close to dual boot. And again note that I have got the same laptop so don't worry to ask more. Bye.
Update - Also check whether the Disk Management in Windows shows that the Windows Recovery Partition is in the end of the disk. In my case it is in the end. I sometimes feel that this maybe one issue of not allowing anything in between or before the Recovery Partition. I don't know but seems something connected to it. Bye.