Website video slow/choppy; somehow fixed it briefly on Chrome (but not on Firefox), but problem resumed on restart

The solution was to install and switch to the Xfce desktop interface. It uses much less RAM than the standard Ubuntu 14.04 desktop interface (Unity), but can still be personalised and made attractive. When I log in I still have the option of using the standard Ubuntu set up, but it makes my old laptop too laggy to bother with so I always log into Xfce instead. Videos play fine now.

sudo apt-get install xubuntu-desktop
OR
sudo apt-get install xfce4


ip6tables rules to allow port 80 and port 443 traffic to only a few specific IP addresses

You are already using ufw.  So set the rules with ufw.

For IPv4 Allow In to 80,443, try:

ufw allow proto tcp from 0.0.0.0/0 to port 80,443

For IPv6 we need to use a few more rules:

ufw allow proto tcp from IPV6ADDRESS/128 to port 80,443
# Do the above more than once for more than one IPv6 address
ufw deny proto tcp from ::0/0 to port 80,443

Based on the manpage for ufw, this would achieve what you want - allow IPv4 to TCP ports 80 and 443, allow IPV6ADDRESS to TCP ports 80 and 443, and disallow all other IPv6 addresses from reaching TCP ports 80 and 443.

Note that you can't access IPv6 addresses without IPv6 connectivity, so if you don't have IPv6 access on the boxes in question (that're IPv4) you can't really access the v6 address easily.

Note that we ultimately decomplexified this XY Problem via Chat and narrowed down their goals for access control to a specific website/subdomain, and as they were using NGINX as the backend, I provided them the details on how to implement access controls per-site.


systemctl status active: exited vs running

The pi-hole job is not a .service that systemd monitors.
It's just a script that launches the daemon. That's a very 2005 way of doing things (systemd did not exist before 2010)

Here's the clue: The pi-hole job is located in /etc/init.d/, which is the standard location to put sysvinit scripts. It's NOT located in /lib/systemd/system/ or /etc/systemd/system/, which are the standard locations for systemd .service files.

Systemd has no idea that a daemon is being launched by the script. It only knows that the script exited successfully.
There's nothing wrong with your method of launching pi-hole. The older and newer ways can co-exist peacefully. It merely means that you're not using systemd features (like monitoring and respawning). Alternately, your favorite search engine will happily show you systemd .service-based ways of launching pi-hole.


Rhythmbox (or any music player) doesn't change songs properties

I had the same problem and noticed after a while that I was trying to change a .wma file. So instead of switching to another player (I really like rhythmbox) I used the sound converter (via software center) to convert it to .mp3. Close and start rhythmbox and now I could edit the id3 tags.


What you need is create a custom keyboard definition with the Home key mapped to Esc. See if this Ubuntu documentation on customizing keyboard layout can help.


How to add Various Artists media to Amarok music collection?

Caution: you should back-up your files before trying this, since the behaviour of Amarok appears to be inconsistent and could lead to loss of data.

Browse hard-drive for files in Amarok Select the files of the
various artists album you wish to add to the collection

Right-click and select "edit track details" Toggle on the "per track" check box
and add enter "Various Artists" in the "Album Artist" category.
(This may be useless, since Amarok doesn't seem to always save this tag, but it may not necessarily be a problem, see 5.)

Save & Close Select all the tracks you want to add to your collection again if necessary.
Right-click and select "Move to collection" or "copy to collection".

Edit how the file will be written to path by dragging and dropping various elements to the path. Ideally, you should be able to use the Album Artist in the
path, which should show "Various Artists" as edited in line 2. But
that didn't work for me. If that's also the case then go to 5.2, else go to 6
Click on advanced and edit the path manually, for instance to Various
Artists/%album/%track %artist - %title. This should save the album
under the ~/Music/Various Artists/ rather than splitting the album
into several folders.

Click OK and it should go smoothly.

PS: some bug occurred with one of my albums the tracks of which were duplicated in the collection (although they exist only once on the hard-drive).


I just checked out the link you gave and I have no problems with Ubuntu 10.04 Lucid, Firefox 15.01 and Shockwave Flash V11.2 r202.

This game relies on Flash Player in your browser. Which browser are you using (I would assume Firefox)? Have you tried another browser (eg Chrome)? I also suggest you try reinstalling/upgrading Flash.


How to use NFS to share a mounted drive?

This can be achieved by enabling cross mounting. Just add crossmnt to your exported entry in /etc/exports

/srv        *(rw,fsid=0,no_subtree_check,crossmnt)

And don't forget to issue the appropriate command for the changes to take effect as shown bellow:

$ exportfs -ra


Problem installing phpMyAdmin on Ubuntu 19.10 (Eoan Ermine)

I am a member of the packaging team and we are doing our best to get back phpMyAdmin in the Debian buster repository ASAP (buster-backports), this will update Ubuntu afterwards.

You can use our PPA: https://bugs.launchpad.net/ubuntu/+source/phpmyadmin/+bug/1837775/comments/7

There is an open issue on our tracker for Ubuntu: https://github.com/phpmyadmin/phpmyadmin/issues/15515

And for Debian:
https://github.com/phpmyadmin/phpmyadmin/issues/15236

Hope the PPA or installing manually using our website will help someone


How can I install boost-devel in Ubuntu 12.04?

To develop with the Boost libraries in Ubuntu/Debian, you need to install the libboost-all-dev package:

sudo apt-get install libboost-all-dev


how to make scripts which will run on installation of apt package

Lets assume you have your .deb-file local (If not you can download it via apt-get download package).

Unpack your deb file:

ar x package.deb

Inside the current folder there are now a few files. data.tar.gz is the file with the package content. But we're interessted in the file control.tar.gz, where the post- and pre-scripts are. So, unpack the control file in another folder:

tar xfs control.tar.gz

Now, what you search is the script called postinst, that is executed after the installation of the package. If that script don't exist, just create it, with rwxr-xr-x permissions (755). Inside that script place your db create command, and let the script end with a exit 0 for a successful installation or exit 1 for a failure.

When you did all your belongings, tar the files back to the control file. Use that command in the folder to create the control.tar.gz file.

tar -czf control.tar.gz *

Now, recreate the deb-package with those new files, with this command:

ar r package.deb debian-binary control.tar.gz data.tar.gz

That's it!


Ubuntu 15.04 end Kernel panic - not syncing

I also have had this problem on 3 occasions. All 3 were while trying to upgrade from 14.04 LTS. Each time the first update and reboot is completed without issue (I assume this is to 14.10). I am then asked to confirm the update to 15.04. I click upgrade and the process begins. During the install I receive a number of errors the last of which suggests the install may be broken. Soon after a notification tells me the installation was successful. A system information check tells me I am now running on 15.04. Everything appears to be working fine except I am unable to continue upgrading to 15.10 or shut down the pc in anyway. Shut down or restart can be selected but nothing happens.
Finally the only remaining option is to manually power off. At this point any reboot will not complete and has the above listed issue displayed on screen.
The only way I have found to correct this issue is to fresh install 15.10. This is frustrating because I would like to upgrade my main PC to 15.10 at some point and I would prefer to not do a fresh install. It seems there is no other safe way though.


How to disconnect internet when VPN fails?

Tried unplugging the cable until VPN comes back up?

In any case you could delete all the Wired/Wireless connections that Network Manager has stored and just leave the VPN ones there with the "automatic" option activated so when VPN comes back up it will connect to it automatically.

Just to make my point a little more clear. In the Wired, Wireless, Mobile Broadband and DSL set any connections you might have there to not automatic (Remove the Connect Automatically check from the checkbox). Or to be more drastic remove the connection completely. The only one that should be in Connect Automatically is the VPN connection you have.

With this you should have a system that automatically connects to the VPN when it is available. When it disconnects the system will stay offline until the VPN comes back.


EFI partition is usually the firs one, so you can create setup like this /dev/sda1 (~200MB) of filesystem FAT32 and mount point /boot/efi
http://en.wikipedia.org/wiki/EFI_System_partition


How can I mount ntfs partition from nautilus with exec permission?

Before Ubuntu 10.04 HAL was used to mount removable devices instead of udev. So, by configuring /usr/share/hal/fdi/policy/10osvendor/25-ntfs-3g-policy.fdi i.e. adding

  <merge key="volume.policy.mount_option.exec"
  type="bool">true</merge>

under the

  <match key="volume.fstype" string="ntfs">

section, one could automate mounting them with exec permission, but now with udev you can write an udev-rule like

  KERNEL="sd*|hd*", ACTION=="add", ENV{ID_FS_TYPE}=="ntfs", ENV{pmount_options}="%E{pmount_options}  -t ntfs-3g --umask 022"

to mount ntfs partitions with executable permission.

Create a rule file in /etc/udev/rules.d. Under /etc/udev/rules.d the udev .rule files should be named in the same manner as for init scripts, i.e. priority-filename.rule form. Whenever a sdxy or hdxy is added to your system with ID_FS_TYPE device key matching to ntfs then this rule sets the pmount options. You can find details on creating udev rules Writing udev rules by Daniel Drake and obviously in man 7 udev.


Server not found problem on Ubuntu 17.04

To check your Firefox proxy settings:

Click the menu button and choose Preferences.
Select the Advanced panel.
Select the Network tab.
In the Connection section, click Settings....
Change your proxy settings: If you don't connect to the Internet through a proxy (or don't know whether you connect through a proxy), select Auto-detect proxy settings for this network

This worked for me


Sublime text 3 layout single column key shortcut not working

I had the same issue on Linux Mint so I changed to alt+1 and it's work.

To change this, go in Preferences > Keys bidings and add this:

{
    "keys": ["alt+1"],
    "command": "set_layout",
    "args":
    {
        "cols": [0.0, 1.0],
        "rows": [0.0, 1.0],
        "cells": [[0, 0, 1, 1]]
    }
},
{
    "keys": ["alt+2"],
    "command": "set_layout",
    "args":
    {
        "cols": [0.0, 0.5, 1.0],
        "rows": [0.0, 1.0],
        "cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
    }
},


Go to your 'System settings...'(at the extreme right-hand corner of your screen and click on power icon to find it). Select 'User Accounts' and click 'Unlock' at the top right corner of the dialogue box and enter your password to unlock it and set the 'Automatic Login' to ON.Close and restart your system.

If that doesn't help, then do the following at terminal:

sudo visudo
look for this line admin ALL=(ALL) ALL (probably close to the last line).
replace it with admin ALL=(ALL) NOPASSWD: ALL.
Save and exit.


The PPA from your link does not have any published packages for any Ubuntu version, including 20.04 LTS. Moreover the mentioned team does not publish packages anymore. Also it is strange that you have zesty (= 17.04 , EOL) version in sources.list . So you have to disable this problematic PPA.
As alternative you can get the I-Nex from different PPA:
sudo add-apt-repository ppa:roguescholar/daily
sudo apt-get update
sudo apt-get install i-nex


Uninstall xserver-xorg-input-joystick.

It's a package to control the mouse with the joystick. I only installed once to test it and it was driving me mad, so maybe that's the problem. I think the joystick would work the same without it.


Record pc screen from a second pc with Ubuntu installed and launch an script

Perhaps if I describe the system that I have been running, it will answer your question?

At my church, we are running two separate computers - one with Windows 7 for the purpose of displaying slides and graphics, and one with Ubuntu which is used both to record audio, and live stream sermons to facebook.

The Ubuntu computer accepts USB feeds from audio, a movie camera, and using a DVI-to-USB converter the screen output from the Windows computer.

On the Ubuntu computer I am using OBS-Studio (available in the repositories of Ubuntu) to combine the two video feeds and the Audio feed, which is then streamed live to Facebook.

So, if I have read your question correctly, I am using Ubuntu to look at and record, the video from a different desktop (on a different OS!) and manipulate that video in Ubuntu.


Is there a microcontroller kit that ships with development tools for Ubuntu?


Unable to login when using the try feature of Ubuntu 11.10

Try ubuntu with empty password. If that doesn't work, you will have to modify the CD image.


Muted headphone jack, but if I replug in headphones I need to go into alsamixer and unmute it again

Solved it, if you don't see the option to turn off auto mute you probably have the same alsa version as me, follow this guide https://wiki.ubuntu.com/Audio/UpgradingAlsa/DKMS and its fixed, working perfectly!


Install GParted to Hard Drive on Windows UEFI Installation

Sometimes the answer to a question is:
Don't do that!
Instead:

Download the GPartEd Live CD (based on nothing else but Ubuntu!)
Wite it to a CD/DVD/USB
Boot that
Use that to do anything you want on any system (Linux / Window$ / combinations / ...)


Remote desktop doesn't works after upgrade from 13.10 to 14.04

Seems that vino was changed to require encryption by default, but only supports old encryption methods that are not commonly available.

This is a workaround till they fix it:

Install dconf-editor: sudo apt-get install dconf-editor
Start it.
Navigate to: org > gnome > desktop > remote-access
Disable "require-encryption"

(from this thread on discourse).

Other way to fix it is disable vino and only use x11vnc server.
x11vnc will work as long as no other desktop screening or screen sharing program is active.


Boot message about disk clean: Can it indicate bad disk?

The message you see comes from the output of fsck filesystem checking and repairing utility (see the last line):

$ sudo fsck -V /dev/sdb6
[sudo] password for xieerqi:
fsck from util-linux 2.27.1
[/sbin/fsck.ext4 (1) -- /mnt/HDD] fsck.ext4 /dev/sdb6
e2fsck 1.42.13 (17-May-2015)
/dev/sdb6: clean, 4580/26566656 files, 38351198/106257408 blocks

This means that your Ubuntu performs check at boot time, and is in fact configured in your /etc/fstab. As stated in man fstab:

  The sixth field (fs_passno).

  This field is used by fsck(8) to determine the order in which filesystem checks are done at boot time.  The root filesystem should be specified with a fs_passno of 1. Other filesystems should have a fs_passno of 2.  Filesystems within a drive will be checked sequentially, but filesystems on different drives will be checked  at  the same time to utilize parallelism available in the hardware.  Defaults to zero (don't fsck) if not present.

This answers couple questions as to why this happens and how to get rid of it. Basically, because it checks your root filesystem, which I'm guessing is on /dev/sda2 and you either have Windows partition in /dev/sda1 or swap partition for virtual memory. Of course, you can disable check during boot time with making last column 0 ( provided that you have sudo or root access to edit such important system files). However, I wouldn't recommend it, since after all it shows you health status of your filesystem.

And by the way, the output line you see is somewhat misleading as to what it actually says.  What you see is count of inodes, not actual files. Compare output of fsck you see above, with df -i:

$ df -i | grep 'sdb6'
/dev/sdb6      26566656   4580 26562076    1% /mnt/HDD

Speaking of health, systemctl -a /dev/sd<LETTER><INTEGER> is usually preferred to for checking health of a drive, and is indicated via how close things in VALUE column are close to THRESH column.

Another way to indirectly disable on-boot fsck is to change the period at which those checks are performed. From tune2fs(8):

  -c max-mount-counts

  Adjust the number of mounts after which the filesystem will be checked by e2fsck(8). If max-mount-counts is 0 or -1, the number of times the filesystem is mounted will be disregarded by e2fsck(8) and the kernel.

Therefore, it probably follows that all you have to do is to run tune2fs -c -1 /dev/sda to disable those messages.

However, according to lwn.net Max Mount Count check may have been disabled by default as far back as 2011 and as mentionied in mikewhatever's answer on related question and the cited tune2fs(8) documentation in the question, there are other potential causes of fsck appearing on boot ( unclean unmount of the filesystem, cable or failing HDD sectors ,etc ).

Side note: there's question around, such as this one, where OS hangs after seeing the /dev/sda1: clean message, and it should be noted that message and boot issue aren't related - in many cases that's an issue with graphics modules installed, particularly in case of Nvidia drivers.


How to disable input source alternate switch keybinding?

Running gsettings get org.gnome.desktop.input-sources xkb-options produces ['grp:toggle', 'grp_led:scroll']

Deleting "grp:toggle" solves the problem.

Run dconf-editor > desktop > input-sources > xkb-options. Delete 'grp:toggle'.

Thank you PRATAP


Access VPN from home is fine but not outside via 3G

Maybe the problem is the configuration of your home router. Did you activate the port forwarding from your internet router to your ubuntu server? Additionally your router must have the ability to forward the GRE protocol too.


Network Menu missing in top Menu Bar in ubuntu 14.04 LTS

I had the same problem before, here is what I did to correct it.

Open Terminal

sudo apt-get install libappindicator1

sudo apt-get update
sudo apt-get install --reinstall ubuntu-desktop
sudo apt-get install unity
sudo shutdown -r now

This SHOULD correct the icon missing


KDE scroll speed is not proportional to wheel speed

This is a bug that has been known for nearly ten years, and the community, for whatever reason, has intentionally ignored it. The developers who have made an attempt to fix this appear to get frustrated and quit. This appears to be most common in wireless or optical mice produced by Microsoft. That might have something to do with their choice to ignore a bug that end-users have been reporting for a decade. There is no setting for scroll speed in either Gnome or KDE. I think this is more of an issue with the X window system than either window manager. There's a way to fix this permanently, in Firefox, only. http://ubuntuforums.org/showthread.php?p=7416951

Otherwise, try unplugging the mouse's wireless dongle from your USB port, leave it for a few seconds, then plug it back in. Seems to work.

Having the same issue here. I'm learning that a scroll wheel is a luxury... It makes me miss the old Macintosh.


Apache odd permission behavior in Ubuntu 14.04

I found the problem..

At /etc/apache2/apache2.conf:

<Directory />
        Options FollowSymLinks
        AllowOverride None
        Require all denied
</Directory>

<Directory /usr/share>
        AllowOverride None
        Require all granted
</Directory>

<Directory /var/www/>
       Options Indexes FollowSymLinks
       AllowOverride None
       Require all granted
</Directory>

So, by default Apache denies access to everything except /usr/share and /var/www.

So I need to edit the apache2.conf file and also explicitly allow access to /opt:

<Directory /opt/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>

or simply add Require all granted inside the Directory part of my original configuration file:

Alias /adminer /opt/adminer
#Alias /adminer /usr/share/adminer/adminer

<Directory /opt/adminer>
#<Directory /usr/share/adminer/adminer>
        Options FollowSymLinks
        DirectoryIndex index.php
        Require all granted     # <----------

        <IfModule mod_php5.c>
                AddType application/x-httpd-php .php

                php_flag magic_quotes_gpc Off
                php_flag track_vars On
                php_flag register_globals Off
                php_value include_path .
        </IfModule>
</Directory>


Clonezilla - disk to disk clone from HDD with Ubuntu to HDD with Windows on new machine

Since you don't care about the current contents of the new laptop, there seems to be little downside to the Clonezilla aproach. It's probably faster than the install/restore approach and if it doesn't work you can always try plan b.

You may run into video driver problems if the laptops have different cards but they can be fixed in the normal manner.

Caveat: I've done many partition clones like this but I've only done a full disk clone once and it was real -> virtual.


I want to know If GTX 1050 Ti is using or not?

From the terminal:

prime-select query

This will answer "intel" or "nvidia", that's the one in use. To switch without need to reboot or anything:

sudo prime-select intel

the parameter here can be either "intel" or "nvidia".


How to use 'unusable' disk space while installing ubuntu?

Backed up data on the E partition. Solved the unallocated space problem as follows (everything in disk management):
1.Removed E partition (delete volume), so now I have a big chunk of unallocated space.
2.Created a simple volume using all of this unallocated space (again, call it partition E).
3.Reduced the size of this volume (shrink volume). This is the point where everything changed. Earlier, the E partition was a primary partition, shrinking it was also keeping it a primary partition; but this time the partition changed from primary to logical (I don't know why) and the space, that would earlier show up as unallocated, now shows up as free space. The partition E and this free space now forms an extended partition.
4.Proceed as usual to ubuntu setup, the free space is now usable.
I don't know how does disk management decide when to mark a simple volume as primary or logical (there is no option to change it explicitly), but it worked.


Unable to install "bat". Error: trying to overwrite '/usr/.crates2.json', which is also in package ripgrep 11.0.2-1build1

Apparently, this is an issue with the Rust build tools. The issue has already been fixed, and the packages can be installed normally on Ubuntu 20.10, but the fix has not yet arrived to Ubuntu 20.04.
Issue for bat:
https://github.com/sharkdp/bat/issues/938
Issue for Ubuntu:
https://bugs.launchpad.net/ubuntu/+source/rust-bat/+bug/1868517
According to the Ubuntu issue, /usr/.crates2.json is a "stray" file, and not important. Simply removing it is not enough, because package management still knows that it should be there.
As a workaround, you can ignore the issue and overwrite the file with the command (this command is from the comments in the above bat issue):
sudo apt install -o Dpkg::Options::="--force-overwrite" bat ripgrep


Cannot install wine because of broken dependencies

Have you tried using Synaptic or Aptitude? Should be able to search for & install specific packages from there, and I read aptitude "tries harder" when confronted with some errors.

Did you search for the "held broken packages" solutions? Tried dpkg --get-selections | grep hold and un-hold or remove them? Unable to correct problems, you have held broken packages

I'd also guess your repositories are a little messed up, wine's in the standard repos (main, restricted, universe, multiverse, etc) & shouldn't need anything special. See https://help.ubuntu.com/community/Repositories/Ubuntu or the section from this answer "Restoring the default Ubuntu sources.list"


store the current command run in a separate file

You can use a tiny function to override a command of the same name, add your extensions, and then run the actual command e.g. for sudo (assuming bash):

sudo () {
    read -p 'Reason for sudo: ' reason
    printf 'sudo %s : %s\n' "$*" "$reason" >>~/reason_file.txt
    command sudo "$@"
}

Put that in any shell session initialization file e.g. ~/.bashrc. And obviously you can modify the function body to meet your need.

Now when you'll be runningsudo some_command, the above function will be run and will do the defined operations before eventually running sudo some_command with the actual sudo external binary.

As a side note, all shells store the interactive session history in a separate file e.g. for bash it”s ~/.bash_history, for zsh it’s ~/.histfile. And the history builtin command will get you the saved (and buffered) history.


Install Ubuntu to a hard drive partition

What you are trying to do it seems is: make a bootable Partition using an ISO and RUFUS.

Basically, you use rufus to make a pendrive bootable, boot from the pendrive by changing settings in your BIOS and then fololow jawtheshark`s post.

Steps:
Rufus-> select ISO-> Use ISO Method-> Make pendrive bootable->Boot from the pendrive->Install ubuntu to the Partition.

Also, 3 GB is not sufficient for Ubuntu. You need minimum 5 GB.
https://help.ubuntu.com/community/Installation/SystemRequirements

You are skipping a step.


You can create local wrapper:
sudo ln -s /usr/bin/xdg-open /usr/local/bin/gnome-open


Formatting text piped to lpr; adding margins

There is also a -w option for fmt which sets the maximum width of a line and the -s option to split long lines. The default for -w is 75 characters. My quick solution would be something similar to this:

cat [stuff] | fmt -sw 50 | awk '{printf "   "$0"\n"}' | lpr

Here fmt limits the characters per line (in this example 50) and divides long lines automatically. Then this output is piped to awk which adds as many spaces as there are between the first quotation marks after printf, then puts the line from fmt and eventually makes a line break by "\n".

I am sure that it can be done with awk solely, however I was so biased by your fmt that I kept it. I will add an EDIT as soon as I have an expression with awk
only.

6chars


Incomplete D Drive access on which Ubuntu is installed

Look in /host/. Your D Drive files, except of Ubuntu installation should be there.


Using sed to remove all lines containing special characters , numbers, and spaces

To delete any line that is not composed entirely of alphabetic characters, you'd need to add start (^) and end ($) anchors

sed '/^[[:alpha:]]*$/!d' file

Instead, you could delete any line that contains at least one non-alphabetic character

sed '/[^[:alpha:]]/d' file

Note that the caret ^ is acting as a negation operator here rather than as an anchor as in the previous expression.

Alternatively, using grep's whole-line (-x or --line-regexp) option

grep -x '[[:alpha:]]*' file

(equivalent of the first sed expression) or using an inverse match (-v)

grep -v '[^[:alpha:]]' file

(equivalent of the second sed expression).


WiFi connection to router but no Internet connection?

From a search sudo dpkg-reconfigure resolvconf should make /etc/resolv.conf but mine only contains nameserver 127.0.1.1


How to create a direct access to a wine32 program?

You have two options 1. Create a bash script that can be started from the command line or 2. Create a desktop shortcut
Note: These methods are untested as I'm not at my ubuntu machine right now (just going from memory). YMMV also depending on which apps and desktop enviroment you are using.
Option 1. Bash script
(i) Open you favourite word processor/notepad app
(ii) Cut and paste the following:
#!/bin/bash<br/>
WINEARCH=win32 WINEPREFIX=/home/carlos/.wine32 wine /home/carlos/.wine32/drive_c/Program\ Files/Microsoft\ Office/Office12/WINWORD.EXE
(iii) Save the file as something like word.sh and close the word processor/notepad app
(iv) In the file manager, bring up the properties for this file. Tick the option to make this file executable
(v) Now you can call this from the command line as such ./word.sh
Option 2. Create a shortcut
(i) Open file manager
(ii) Navigate to where word.exe is saved
(iii) Right-click on the exe file
(iv) Select 'Create link' from the context menu
(v) Right-click on the newly created shortcut
(vi) Edit the command field (change from word.exe to WINEARCH=win32 WINEPREFIX=/home/carlos/.wine32 wine /home/carlos/.wine32/drive_c/Program\ Files/Microsoft\ Office/Office12/WINWORD.EXE
(vii) Close the properties dialog box by clicking "Close" button
You should be able to launch Word by clicking (double-clicking?) on the shortcut.


Hotkey to press 'Search your computer' button

The Super key is supposed to open this menu by default, I don't know why this is not the case for you.

While I don't know how you can open the "Search your computer" menu, it is possible to open the "Search applications" menu, which might be enough in your case.

You can do this using xdotool (as explained here):

Install it with sudo apt-get install xdotool
Create a new shortcut with xdotool key --clearmodifiers Super+a and assign it to the key combination you want


What happened to no indexing certain directories?

You can customize the index locations/folders using tracker-gui .

Install it with this button:

or using the following command:

sudo apt-get install tracker-gui

After installing, go to the Locations tab. Click on the + button and add the specific directories/locations that you want to index.

It goes without saying that the drive has to be mounted already to be able to be indexed.
Hope that helps.

Or You can go here and add to "don't record activity":

Or else, You can also do the following : Install activity-log-manager

sudo add-apt-repository ppa:zeitgeist/ppa
sudo apt-get update && sudo apt-get install activity-log-manager

You can then launch it by searching for it in Unity. Once it's loaded, you'll find the option to prevent certain folders being logged in the Files tab. Hope that helps.


The files under /sys/  aren't real files, they're representations of the kernel's internal state. You can tweak kernel parameters by writing stuff to them, but as they are not actual files, you cannot delete them.

If what you want is to put a "1" there, try this:

echo 1 | sudo tee /sys/class/net/eth0/queues/rx-0/rps_cpus

See the answer to this question for an explanation of the "sudo tee" trick and why it's useful in this case.

Read more about /sys/ here: http://en.wikipedia.org/wiki/Sysfs


Fresh Ubuntu Install (12.04), No Internet

try these lines once -

sudo apt-get purge bcmwl-kernel-source
sudo modprobe -rv wl
sudo modprobe -v brcmsmac

answer taken from here.

If error comes ignore them and reboot your PC then see if its working.

hope it will work now.


Why do I have lots of gnucash files in my folder?

These are the backup files.

If you take one of the names, bank.gnucash.20140821221604.gnucash for example, you can see it split up:

bank.gnucash.2014 08 21 22 16 04.gnucash
             YYYY MM DD HH MM SS

It simply says the date and time (precisely). As long as you have a newer one, e.g. you have both

bank.gnucash.20140821221604.gnucash

and

bank.gnucash.2014 08 22 19 13 07.gnucash

it is fine to delete the first one, as there is a newer one.


You must replace the NC string after 'upspeed' and 'downspeed' with the name of your network. You can retrieve these data running the command: ls /sys/class/net/ in the terminal.
According to your feedback, your wired network is called 'enp4s0', this means that the conky script line related to the netwok must be:
Up:$color ${upspeed enp4s0} ${color grey} - Down:$color ${downspeed enp4s0}


I may be a bit late and I'm not sure what you have tried already, but I have worked with PBIS Open myself before and I just installed Ubuntu 15.10 on my VirtualBox environment to refresh my memory again.

If you get the following error I may know a solution to your problem.

To solve this, you should check out the answer at the following link

I tried it again on my own VirtualBox machine with Ubuntu 15.10 and it worked for me.

So good luck!


DNS Address For All Future Connections Ubuntu 12.10

I think you're asking about how to set DNS server for all your PC. You might want to look at DHCP server. If you are using a router supporting DHCP then you can setup your DNS server IP address there and then all the PC will be using that DNS server.


MonoDevelop fails to compile VB (Vbc: pathToTool parameter cannot be null)

I use openSUSE 13.1 and installed MonoDevelop 5.0.1 from "Mono:Factory" repository.
These are the steps I used to solve the problem in my case:

NOTE: You can jump to step 3 if you do not want to use the "MSBuild build engine" which is described in step 3.3

Make a backup copy of "/usr/lib/mono/4.5/Microsoft.VisualBasic.targets" and then open it as root:

sudo kate /usr/lib/mono/4.5/Microsoft.VisualBasic.targets

or

sudo gedit /usr/lib/mono/4.5/Microsoft.VisualBasic.targets
In section "vbc" change the last parameter "ToolPath" to the directory where vbnc is located:

Change some configuration of the "Project" in MonoDevelop if you face this error:

error VBNC2017: The library 'Microsoft.VisualBasic.dll' could not be found.
In MonoDevelop go to menu "Project\YOURPROJECTNAME Options"
In "Build\General" set "Target framework" to "Mono / .net 4.0":

Target framework: Mono / .net 4.0

In "Build\Compiler" set "Additional compiler arguments" to "-libpath:YOUR-PATH-TO-MONO-4.0"

Additional compiler arguments: -libpath:/usr/lib/mono/4.0/
In case you get the above mentioned error, again, go to "Build\General" and under the section "Build Engine" uncheck the "Use MSBuild build engine ..."


Found a solution today, and here is how it works:

Download gedit-plugins:

sudo apt-get install gedit-plugins

Go to Gedit preferences and enable the plugin. Restart Gedit.
Open a .tex file and open its .pdf output in Evince. The two files must be in the same folder.
Hold Ctrl and left click at any desired location in Evince. This will highlight the current row in Gedit.

Hope that helps!

Things I couldn't get working yet:

Ctrl + left click in Gedit does focus the window of Evince, but does not highlight anything.

Things I haven't tested yet:

Using Synctex with a document consisting of multiple files.


'Find in files' from nautilus's context menu?

Probably nautilus-actions is what you are looking for:

sudo apt-get install nautilus-actions

Now start Nautilus-Actions Configuration Tool.
If you don't want to click through the menus, just type "nautilus-actions-config-tool" in the [alt]+[F2] window.

This will start the nautilus-actions configuration gui in which you can configure new commands or scripts to be run from the context menu. The "help"-menu is quite detailed, you may want to have a look into it.

To just start gnome-search-tool from the context-menu, start the conf-tool, press [ctrl]+[n] (this will create a new action), check "Display item in location context menu", name it (Context Label), switch to the "Command"-tab and enter "gnome-search-tool" in the "path"-field. To start gnome-search with the current path, enter '--path="%d"' in the "Parameters"-box (see "legend" for other variables). Sometimes it is necessary to restart nautilus for the actions to show up (nautilus -q).

Some people experienced issues with the Ubuntu 11.10 repo version. If you have issues starting nautilus-actions, install the most recent version from here: https://launchpad.net/ubuntu/precise/+package/nautilus-actions

Example for the amd64-package:

wget http://launchpadlibrarian.net/84698667/nautilus-actions_3.1.4-1_amd64.deb
sudo dpkg -i nautilus-actions_3.1.4-1_amd64.deb


How can I make selecting files/folders in the file browser by typing a name act smoother?

I'm sorry, you can't – with default Nautilus file manager.

Ubuntu 17.10 ships with Nautilus 3.24 file manager that no longer has the 'type-ahead search' feature available (not even as an option in the preferences).
This has been discussed a lot but it looks like developers will stick to their decision to keep this feature replaced by the search.

Alternatives:

Open Nautilus Preferences > Search & Preview > set 'Serch in subfolders' to 'never' and uncheck 'Full Text Search: set as default'. This way you will only get files and folders within the current folder if you start typing.
Press ctrl + l in file manager to open location input and type a folder name to open there that will be auto-completed.
Install a different file manager. For example Nemo is a fork of nautlius that preserves some features like the type ahead find.


Removing dual boot and upgrading to Ubuntu 16 in a BIOS-booted computer

Not so old as to be BIOS only.

How you boot install media, UEFI or BIOS is then how it will install. And grub will not correctly install unless you have an ESP - efi system partition if UEFI. You need to reboot flash drive in Legacy/BIOS/CSM boot mode.

You should have two options in UEFI, if UEFI Secure Boot is off. But some tools to create a flash drive may now only create a UEFI version. ISO is configured for both BIOS & UEFI, so also check how you made installer.

Do not know nor currently use encryption.
FileSystem encryption
https://www.kernel.org/doc/html/latest/filesystems/fscrypt.html
ecryptfs was dropped from the Ubuntu installer and deprecated in 18.04 LTS in favor of full disk or manually using fscrypt
Encryption discussion /home phasing out, use fscrypt  for per directory encryption
https://bugs.launchpad.net/ubuntu/+source/ecryptfs-utils/+bug/1756840

And I do prefer even in BIOS mode to use gpt partitioning, but then you need bios_grub partition. But that requires either conversion which may or may not work or total redo of hard drive.


Serious(?) Warnings in Terminal when mounting a drive and opening nautilus

A common solution for chatty commands is to send their terminal output to /dev/null. For nautilus I have the following line in my .bash_aliases file:

alias nautilus='nautilus >/dev/null 2>&1'

That should make nautilus silent again (this was no issue for me until I updated to 16.04).


Change default shell when user not in /etc/passwd

Here is a hint : /usr/bin/chsh.ldap: "/usr/bin/fish" is an invalid shell.
It seems that you should add /usr/bin/fish to /etc/shells.


Why when I retrieve the list of partitions it only gives me one result?

As explained in this answer to another (unfortunately, closed) question, the key fact you mention here is that you used Wubi to install Ubuntu. Thus, Ubuntu is installed like an additional Windows program within your Windows partition, specifically in C:\ubuntu (see this guide from the Ubuntu Wiki for more information). No separate partition was created for Ubuntu at setup.


DHCP server provides IP addresses to other machines in the network, but it needs the interface it uses to connect to the other machines to already have a static address. It will not work unless the interfaces it should use are already configured when it starts up.

Now, that does not mean that the other interfaces on your machine could not be obtaining their IP address from some other DHCP server, but it cannot autoassign itself an IP address.

So, what does /etc/network/interfaces say? How about ifconfig?


From the comments:

  No the button is there but it has no function. On the website it will provide a date and time when clicked. But it does nothing when I copy it into gedit.

Gedit is a text editor. It can edit text (and source code, etc.). To run the code, save it with a .html (for example, as datetime.html) because this is HTML code.

Then double-click the resulting HTML file to open (and thus run) it in your browser of choice (Firefox, Chromium, Chrome etc.).

As to why:

  On the website it will provide a date and time when clicked.

Assuming you mean this,

it is because the thing in the screenshot is not an editor. It is the result.

If you want an editor that also provides the result as a preview, try Atom (there may be others). Write HTML in it and press Ctrl+Shift+M.


I followed the instructions from the same link and has the same error.

The problem is the server is running on the localhost hence if you specified an FQDN other than localhost, the request will appear to come from an unauthorized user.

I had to change server domain in my case to localhost:

echo localhost > /etc/torque/server_name
echo localhost > /var/spool/torque/server_priv/acl_svr/acl_hosts
echo root@localhost > /var/spool/torque/server_priv/acl_svr/operators
...
...


Setting temperature thresholds in i8kmon Ubuntu 14.04

According to lm-sensors:

i8k-virtual-0
Adapter: Virtual device
Right Fan:      0 RPM

You have a only Right Fan, thus left fan values should always be -1. You have to change your set config, in the file /etc/i8kmon.conf, to the following values:

set config(0)   {{-1 0}  -1  40  -1  40}
set config(1)   {{-1 1}  40  60  40  60}
set config(2)   {{-1 2}  60  128  60  128}
set config(3)   {{-1 2}  60  128  60  128}

in the state {-1 0}, there is no left-fan and the right-fan is off, in state {-1 1}, the right-fan should run at low speed while in the state {-1 2} it should run at full speed. The other values, e.g. 40  60  40  60, correspond to the temperature thresholds ---min and max--- of each state, with and without AC-power.

You also need to add the following options:

# Run as daemon, override with --daemon option
set config(daemon)      0

# Automatic fan control, override with --auto option
set config(auto)        1

# Report status on stdout, override with --verbose option
set config(verbose) 1

# Status check timeout (seconds), override with --timeout option
set config(timeout) 20

Finally, you need to create the file i8k.conf in /etc/modprobe.d/ containing the line options i8k force=1.

See more details man i8kmon


Completely unable to uninstall broken nvidia drivers :( [19.04 - KDE]

Hopefully this will fix your error, but beware that what I've done was an action that needs much more insight into your system than I currently have.
I've got the same error that there are links left by another driver.
Search for a crash log like nvidia-340.0.crash. Save this if you have one.

After uninstalling the driver package dependencies. Double-check that all files of the package and its dependencies are gone. Update your system, anything that's blocking an update is now your target. Remove those packages with apt-get, dpkg only if all other options are gone.

Done a update? OK, now search in your crash log for the end of the driver installation. There might be an list of packages installed as dependency. Search in dpkg-divert --list <your driver package name e.g.  nvidia-340> there might be a list of files linked to different locations. Now be careful removing those links might result in no graphical interface/boot at all if done wrong. Unlink these files that are blocking your installation. Install your new driver. Relist the files of your old driver. Remove the links. Reinstall your driver and double-check that there are no more remaining files of your old driver. Be careful not to remove files of your current driver.

This is an risky action! Do this only if you know what your doing and you need to keep this system, or else do an reinstall. This would result in a much cleaner environment than this.


EDIMAX RTL driver says: "This driver is activated but not currently in use"

I would hazard that that means the module is loaded into the kernel, but no device is currently using it. Try replugging the USB device?


How can I share this local site to not use a sub directory?

You need to do two things, the first is to make an apache2 virtual host that will respond to the domain name given and the port used; so in /etc/apache2/sites-available/tempplace.conf which should be symlinked to /etc/apache2/sites-enabled/000-tempplace you should have something like this:

<VirtualHost tempplace.localhost:80>
    DocumentRoot /www/example1
    ServerName tempplace.localhost

    # Other directives here
</VirtualHost>

Once you have that part you can restart your apache2 server. Next you have to enable a localhost hostname, to do this you edit the file /etc/hosts and add as follows:

127.0.0.1   localhost.localdomain localhost tempplace.localhost

This effectively adds the tempplace.localhost resolve to your local dns and means that browsing to it will point to localhost. You should then be able to browse your Apache virtual server on your localhost without resorting to different ports.


How to check why my static IP isn't working?

If you are using Ubuntu Desktop, then it is running its own network manager (conveniently called NetworkManager) and will override the /etc/network/interfaces file. You either need to setup static ip's through NetworkManager, or disable it.


If you really want Ubuntu to be CLI only, install Ubuntu Server. It is possible to rip out the GUI but that might break your installation. Please backup your data before doing this: sudo apt-get autoremove --purge ubuntu-desktop.

If you want to learn commands without having a fairly unusable machine, consider running Ubuntu Server in a VM or even just opening a terminal with Ctrl+Shift+T.

Some example pieces of software that run VMs on Ubuntu are:

VirtualBox: install with sudo apt-get install virtualbox
VMM/KVM: install with sudo apt-get install virt-manager


Ubuntu 18.04.1 LTS Server Glances Installation

Resolved adding universe repository sudo apt-add-repository universe


/var/log/message* are the files to check.

would suggest to log a ticket with rackspace asking them reason for instance to go into read-only mode.


In the Linux world (this isn't specific to Ubuntu), drivers are normally included in the operating system. Anyone writing a new driver is encouraged to contribute their work to the Linux driver, and that usually happens. Each new release of Ubuntu comes with more supported hardware. So, ideally, you should not need anything besides what Ubuntu provides.

However, if the motherboard model is recent, there might not be drivers for all of its features yet. Usually, the manufacturer takes care to have Windows drivers ready the day the product ships, and the Linux development only starts when a developer receives a board. Some manufacturers collaborate with Linux developers. The best among them follow normal channels and have their drivers incorporated quickly in the official kernel and in distributions (this is more common on server equipment, less on desktops and laptops). Other manufacturers provide token Linux drivers — rushed, low-quality, hard-to-install. Yet others do nothing.

What you should do is try installing the latest release of Ubuntu and see if it works. It is rare for manufacturer drivers to hold an advantage over official Linux drivers when the official drivers exist. If it doesn't, do a web search on your motherboard model and “Ubuntu” to see if others have solved the problem for you. If you can identify the component that doesn't work (e.g. the disk controller, the sound chipset, …), do a web search with that.

If it doesn't work and your search doesn't turn up anything, ask here! Be sure to give as much information as possible: the exact motherboard model (with a link to the description on the manufacturer's site so people can easily find out what components it includes), a precise description of what happened (black screen, disk churning for a while, beeps, error messages, …). If there are any error messages, transcribe them exactly (if you're in a situation where you can't copy-paste, a legible screen photo is better than nothing).


Firefox: Wikipedia MathML equations have too much space above and below

This is a bug in the Latin Modern Math version distributed by Ubuntu. See

https://bugs.launchpad.net/ubuntu/+source/lmodern/+bug/1502701
https://phabricator.wikimedia.org/T122400

A workaround mentioned on launchpad* is as follows:

  Download the latest version of the Latin Modern Math font from
  http://www.gust.org.pl/projects/e-foundry/lm-math/download/index_html.
  Unpack the zip file. It contains documentation and a file latinmodern-math.otf.
  Copy latinmodern-math.otf to ~/.fonts (which you must create if it doesn't exist).
  Restart Firefox.

* see post #3, by Jérôme Kunegis


I want to have a source of the latest kernel to download it on ubuntu 12.04

Download the source code via apt-get:

apt-get install linux-source

After the command has finished, your linux kernel source code in the directory /usr/src/.

Alternatively you can download the sources from kernel.org.


Option to re-enable compiz missing in the appearance settings, how do I enable it?

Choose the type of session at the login screen "Gnome Classic" instead of "Gnome Classic (without effects).

After that you can install Compiz Settings Manager with Ubuntu Software Center to enable some effects. Be careful with some settings.


Unattended upgrades still trying to use proxy

Thanks to user535733 for the solution, I hadn't thought to check all the files:

The system had copied the proxy settings to /etc/apt/apt.conf.d/90curtin-aptproxy


External Display Issues Lenovo W530 Ubuntu 12.10, VGA not recognized

i'm running a lenovo w530 with ubuntu 12.10
i faced the same issue this week ... i did the following:
http://falkvinge.net/2013/02/15/how-to-install-nvidia-drivers-in-ubuntu-12-10-quantal/
except instead of nvidia-current-updates i use nvidia-current (but there shouldn't be a difference)

then i switched to discrete mode and voila your external display should work (kernel 3.5.0-27.46-generic)

kr raphael


How to create keyboard shortcut in Ubuntu 12.04 for reboot/shutdown that can be executed by even non-root users

You can allow all users to run only the reboot command with no password, gksu should pick up this permission correctly.  Add this to your sudoers file:

ALL ALL=NOPASSWD: /sbin/reboot

PLEASE don't edit sudoers directly. Use sudo visudo to get an editor, which will syntax-check the file once you save it. Append that line at the end, then save and exit it. If visudo finds a problem it will help you so you don't lock yourself out of your system.


Answer in progress

First start

sudo apt-get install -f

to repair if possible

Now start the installation explicit

sudo apt-get install python-launchpad-integration python-desktopcouch-records

If there more problems, update your question with the error messages and give me a comment.


Is it possible to move files from PC to USB, CD or external hard drive when recovering data?

You can boot form the Ubuntu CD, and  get the choose Try Ubuntu, once you get the desktop, you can open file manager, and mount your drives.  If these drives are windows drives, the you might want to look at Mounting Windows Partitions.  Once that's done you can view the contents of your partitions, and at that point you can copy the data that you want.

If what you want is data recovery, then take a look at Data Recovery With TestDisk.

Hope that this helps.


Apache / MySql is not running. What is wrong?

I guess you forgot the sudo:

sudo /etc/init.d/apache2 start

The better way to start apache (or any other init.d service) is:

sudo service apache2 start


Which startup applications can I safely disable?

Reverting the changes

Before starting to disable startup applications, keep in mind that all changes can be easily reverted by deleting the files in ~/.config/autostart:

rm ~/.config/autostart/*

Default Ubuntu 14.04 Startup Applications:

Backup Monitor: Déjà Dup's daemon for running scheduled backups. Disable if you don't use Déjà Dup's automatic backup feature.
Certificate and Key Storage: GNOME Keyring: PKCS#11 Component. Don't disable. Probably you'll need the keyring. A lightweight process loads all the keyring components, so disabling this will not noticeably reduce CPU load or memory utilization.
Chat: Desktop service to integrate Telepathy with the messaging menu. Disable if you don't use Telepathy.
Desktop Sharing: GNOME Desktop Sharing Server. Actually you don't have to disable this service as it will not start unless you enable Allow other users to view your desktop in Desktop Sharing (vino-preferences).
Files: Nautilus process to show desktop icons. Don't disable unless you know exactly what you're doing.
GPG Password Agent: GNOME Keyring: GPG Agent. Don't disable. Probably you'll need the keyring. A lightweight process loads all the keyring components, so disabling this will not noticeably reduce CPU load or memory utilization.
GSettings Data Conversion: Migrates user settings from GConf to dconf. GConf is a configuration database system for storing application preferences. Don't disable.
Indicator Application: An indicator to take menus from applications and place them in the panel. Don't disable or you'll probably lose some functionality.
Mount Helper: Automount and autorun plugged devices. If you disable this service you'll have to manually mount removable storage (flash drives, CD-ROM drives, etc.).
Network: NetworkManager applet to manage your network connections. You'll probably need it to connect to a wired/wireless network. Don't disable unless you use the command line to connect to a network or if you put your network configuration in the interfaces file.
Onboard: Simple On-screen Keyboard. Actually you don't have to disable this service as it will not start unless you enable On Screen Keyboard in System Setting -> Universal Access -> Typing tab.
Orca screen reader: Scriptable screen reader. Actually you don't have to disable this service as it will not start unless you enable Screen Reader in System Setting -> Universal Access -> Seeing tab.
Personal File Sharing: User level public file sharing via WebDAV or ObexFTP. Actually you don't have to disable this service as it will not start unless you enable Share public files on network in Personal File Sharing.
PolicyKit Authentication Agent: Provides a D-Bus session bus service that is used to bring up authentication dialogs used for obtaining privileges. You'll need this to perform task that require privilege elevation. Don't disable.
PulseAudio Sound System: You'll need this service unless you don't want any sound coming out of the speakers.
Secret Storage Service: GNOME Keyring: Secret Service. Don't disable. Probably you'll need the keyring. A lightweight process loads all the keyring components, so disabling this will not noticeably reduce CPU load or memory utilization.
SSH Key Agent: GNOME Keyring: SSH Agent. Don't disable. Probably you'll need the keyring. A lightweight process loads all the keyring components, so disabling this will not noticeably reduce CPU load or memory utilization.
Update Notifier: Check for available updates automatically. Disable only if you want to check for updates manually.
User folders update: Update common folders names to match current locale. It doesn't keep running in background, it only checks if the folders names (Documents, Videos, etc.) match the selected language and rename them if they don't. It is not worthy to be disabled.
Zeitgeist Datahub: A daemon which centralizes all passive data sources into a single process, and interfaces between said data sources (also known as loggers) and zeitgeist-daemon (with which it communicates via D-Bus). If you disable this service Dash search will not work. Don't disable unless you know exactly what you're doing.


why sh and ./ providing diffent output for the same script

There are two different shells in fact. One is /bin/bash and other is /bin/dash. And /bin/sh is actually a softlink of /bin/dash. To verify it, write in terminal,

which sh

you will get output: /bin/sh

Next type ls -l /bin/sh in terminal, which will return something like,

lrwxrwxrwx 1 root root 4 May 16 20:23 /bin/sh -> dash

Which shows the fact that sh is a softlink of /bin/dash. you can try further which dash.

Actually bash is sh with more features and better syntax. Both of them have almost same commands, but they are different.

What is happening here

When you are running sh emp1.sh then script is handled by dash but when you run ./emp1.sh due to the shebang line(#!/bin/bash) on top of the script bash shell handles it. So you get slight different formatting in output. Keep in mind bash has some improved syntax.


How can I run a sh script targeting X11-settings on login?

One way is to use a cron job with the reboot directive which will run at every system's start (and reboot).

To do so:

Issue sudo crontab -e to enter a cron job to root's crontab
In a new line enter @reboot xinput set-prop 10 "Device Accel Constant Deceleration" 2.9 2>&1 >> /var/log/my_xinput.log

If the job is not running, you might want to point the full path to the xinput command.

By saying the full path to the command (xinput) i mean, that cron need to know where to find the executable - script that needs to run. This can be done either by:

pointing cron to the full path of what needs to be executed, for example I have a script located at ~/bin/myscript.sh; to be sure that cron knows where to find my script, I must enter it's full path to the cronjob, that is /home/username/bin/myscript.sh.
Or by setting environment variables at the crontab file and before my cronjob, such as:

SHELL=/bin/sh to specify which shell to use
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/home/username/bin note the last entry, etc

For your problem try:

/usr/bin/xinput set-prop 10 "Device Accel Constant Deceleration" 2.9

Finally you may want to check this references about Cron:

CronHowTo (Ubuntu Community Wiki)
A similar situation
A StackOverflow answer


Permission denied error when running apps installed as snap packages - Ubuntu 17.04

Same happens in Ubuntu 18.04.

If the user home directory is not under the /home (or /) mount, it not possible to work with snap. My HOMEDIR was on another local SSD disk, but since it was not mounted under /home, every package installed by snap was failing.

Since Canonical is moving to support snap, you will have to loose this kind of nice things, such as HOMEDIRs on other file systems, mounted by NFS, etc.

Maybe snap will be more flexible inthe future, but it is not a priority:
https://forum.snapcraft.io/t/how-can-i-use-snap-when-i-dont-use-home-user/3352/6

The workaround right now is to remove snap and install things from *.tar.gz or from *.deb packages.


New ubuntu install mounting to an old /home drive and partition - can no longer access due to .Private and .ecryptfs

hi @steeldriver that is indeed what i ended up doing.
installed ecryptfs-utils
ran code, ran into /run/usr/999/gvfs: Permission denied
followed the 2nd answer here “sudo ecryptfs-recover-private” gives “find: ‘/run/user/1000/gvfs’: Permission denied” after botched (?) upgrade
and ran umount /run/user/1000/gvfs then ecryptfs-recover-private
which required my old pw then mounted my old home to /tmp
I'll stop answer here as now I am looking to move mount points from /tmp to my new home.
Edit: rebooting automounted drive into functioning as usual again.


How to do autoremove when executing apt-get remove?

You should use:

sudo apt-get autoremove -y XX


You could add swap space, read man mkswap;man swapon to make the system think it has more memory.

To limit ram usage, read man bash and search for ulimit:

   ulimit [-HSabcdefiklmnpqrstuvxPT [limit]]
          Provides control over the resources available to the shell and to processes started
          by  it, on systems that allow such control.  The -H and -S options specify that the
          hard or soft limit is set for the given resource.  A hard limit cannot be increased
          by a non-root user once it is set; a soft limit may be increased up to the value of
          the hard limit.  If neither -H nor -S is specified, both the soft and  hard  limits
          are set.  The value of limit can be a number in the unit specified for the resource
          or one of the special values hard, soft, or unlimited, which stand for the  current
          hard  limit,  the  current  soft  limit,  and  no limit, respectively.  If limit is
          omitted, the current value of the soft limit of the resource is printed, unless the
          -H  option  is given.  When more than one resource is specified, the limit name and
          unit are printed before the value.  Other options are interpreted as follows:
 ...
          -d     The maximum size of a process's data segment
 ...
          -l     The maximum size that may be locked into memory
 ...
         -v     The  maximum  amount  of  virtual memory available to the shell and, on some
                 systems, to its children


How to compile git for solaris under ubuntu? (cross compile git)

If I am correct to have git repository on rented space you need to have your provider to support it. In other words - you have to pay for it. Or you need to find free solution or set up your own server.
I know that because I've seen some providers that charge money for that f.e you can have ssh access but to have git you need to pay more.


Running 12.04 as a gateway - resolvconf, dhclient and dnsmasq integration

I worked out what the problem was.

After way too long struggling to work out what was wrong with resolvconf or dnsmasq, I finally decided to double-check the firewall. Since I hadn't changed anything in my iptables rules for 5 years, I didn't think this would be the problem. But I couldn't figure out why dnsmasq was listening on port 53 but not writing any DNS look-ups in its logs. So it had to be the firewall.

Along time ago, I wrote a rule to allow everything through that wasn't from the external interface.

iptables -A INPUT -i !eth0 -j ACCEPT

That worked fine on the old machine I had because I wasn't using dnsmasq for DNS look-ups on the actual server. So dnsmasq worked happily on requests coming in on eth1. But on my new machine, I started testing it with look-ups on lo. With Ubuntu 12.04 that rule does not allow "all interfaces except eth0". I played around with the rule and found that it should be this:

iptables -A INPUT ! -i eth0 -j ACCEPT

Maybe if I'd put the hour of work in back at the start to configure my new machine with ufw I would've been up and running on the same day. Coulda woulda shoulda....


How do you find out which program is using too much memory?

You are reading the output of free incorrectly. The Linux Kernel does a lot of its own memory management, in turn allocating more than it actually needs - so your true amount of "Free Memory" is 3044 located in the "Free" column of the +/- Buffers/cache line, making only 780 MB actually being consumed.

By default top will sort based on CPU consumption. You can press Shift+M to sort by percentage of memory consumed - giving you a better grasp of what software is using the memory allotted to the kernel.

free -m
             total       used       free     shared    buffers     cached
Mem:          7873       3916       3956          0        231       1117
-/+ buffers/cache:       2567       5305
Swap:        12401          0      12401

And in top with memory sorted:

top - 17:05:18 up 2 days,  1:40,  4 users,  load average: 0.21, 0.14, 0.11
Tasks: 237 total,   1 running, 234 sleeping,   0 stopped,   2 zombie
Cpu(s):  1.6%us,  0.8%sy,  0.1%ni, 96.7%id,  0.8%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   8062420k total,  4013632k used,  4048788k free,   237204k buffers
Swap: 12699644k total,      292k used, 12699352k free,  1144752k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 1632 root      20   0  884m 240m 6532 S    0  3.1   1:20.17 java
 3911 marco     20   0 1011m 165m  22m S    0  2.1   9:20.62 chrome
 3852 marco     20   0  770m 162m  45m S    0  2.1  14:59.59 chrome
 1091 root      20   0  491m 160m 118m S    3  2.0  29:19.44 Xorg
 1747 marco     20   0  659m 108m  34m S    1  1.4  18:43.92 compiz
 3964 marco     20   0 1113m  99m  21m S    0  1.3  18:51.88 chrome
 1759 marco     20   0  668m  94m  21m S    0  1.2   2:27.42 nautilus
 3046 marco     20   0  788m  86m  26m S    0  1.1   1:22.96 evolution
 1793 marco     20   0  647m  85m  18m S    0  1.1   0:12.74 shutter
 1791 marco     20   0  404m  85m  13m S    0  1.1   5:19.51 bitcoin
 2938 marco     20   0  809m  78m  31m S    0  1.0   1:01.07 empathy
 9630 marco     20   0  265m  73m  19m S    1  0.9  12:41.52 skype
 9618 marco     20   0  914m  64m  21m S    0  0.8   1:14.04 chrome
 1777 marco     20   0  432m  64m  14m S    0  0.8   1:45.96 pastie

Finally to help you diagnose what the actual software is, try passing the -c flag to top: top -c as that will give you the full path, name, and parameters of the command running.


Did you MD5 test the ISO you downloaded? Did you burn the CD as slowly as you could? Did you test the CD for defects once first booted to?


opening a mp3 song opens in video instead of rythmbox

https://help.ubuntu.com/stable/ubuntu-help/files-open.html.en
Select a file of the type whose default application you want to change. For example, to change which application is used to open MP3 files, select a . ...
Right-click the file and select Properties.
Select the Open With tab.
Select the application you want and click Set as default.


Totem plays MIDI files on my system (Ubuntu 14.04) since I installed the package fluid-soundfont-gm. The package requires about 150 MB disk space.

The VideoLAN wiki https://wiki.videolan.org/Midi and this forum post http://ubuntuforums.org/showthread.php?t=2146538&page=2 (answer by
rubo77) recommend installing the package vlc-plugin-fluidsynth. The VLC package has fluid-soundfont-gm as a dependency, which is how I found fluid-soundfont-gm.


That should be in the .vimrc file in your home directory (if you have none, just create one with that name), the .gvimrc is typically for things that rely on gvim, like say, hiding the menu bar or toolbar would go there, all vim behavior itself goes into .vimrc

Anyway both should be placed in your home directory, and gvim will load both .vimrc and then .gvimrc afterwards when starting.

To get the evening scheme and numbers working, add this to your .vimrc

" look & feel
syntax on
set background=dark
colorscheme evening

" for showing line numbers
set number


sudo is a command and it is an executable program.

You can find out more about how to use it using these commands in the terminal (in order of least -> most detailed):

sudo --help
man sudo
info sudo

To understand more about how it works, you can visit the sudo website where you can browse the source code. You can also download the source code:

First edit /etc/apt/sources.list

sudo nano /etc/apt/sources.list

you will see these lines near the beginning:

deb http://gb.archive.ubuntu.com/ubuntu/ xenial main restricted
# deb-src http://gb.archive.ubuntu.com/ubuntu/ xenial main restricted

You have to uncomment the deb-src line (remove the #) so it says:

deb http://gb.archive.ubuntu.com/ubuntu/ xenial main restricted
deb-src http://gb.archive.ubuntu.com/ubuntu/ xenial main restricted

Save the file and exit. Now run sudo apt update and then, to dowload the source code package to the current working directory

apt source sudo

Super short summary: sudo is short for 'superuser do' meaning 'execute the following command as the superuser'. Thus, it grants the humble user root privileges for one command and any commands triggered by that command.


Open terminal (Alt+Ctrl+T) and follow the below procedure :

Paste the following command in terminal sudo gedit /etc/default/grub. It will open a file named /boot/grub/grub.cfg file.
Add GRUB_DISABLE_OS_PROBER=true at the bottom of this file.

It will prevent Windows being added to your grub menu.
Now to write the change, run sudo update-grub
You can then run cat /boot/grub/grub.cfg to check that your Windows entry has disappeared.
Restart your device to check the same.

  Note : If above one doesn't go well you can also visit the link Removing Windows entry from grub.

  Happy Ubuntu :)


You can use clonezilla. It's the most efficient way of installing the same OS on many systems. I use it all the time. Please, refer to this tutorial here for further information.

But mind these instructions below, otherwise you might get errors while saving or restoring lubuntu through clonezilla.

Do a fresh install of Lubuntu in one of your computers.
Always see that the hard-disk size where your clonezilla will restore the image is larger than or equal to the hard-disk size from where your image was made.
SEE to it that the sda numbers of backup and restore drives are SAME, i.e, if you are making the backup from sda1 then restore it to sda1. There is a work around for this but it may lead to many errors.

Hope it helped.

If you need further instructions then please comment below. Thank You!


I've a solution that works for me.
I documented it here.


Create Ubuntu version that refreshes after each restart

As far as I know you can reset all settings of gnome and related things but if you are talking about package management and all then I think it is difficult!

The best way is to create two accounts One as Administrator and other as Student.

Don't add this student user into any sudoers file etc.i.e don't give root access to student account So that These users will not be able to install or remove anything related to system.

If you want to clear all the settings and remove all the data from this student at the time of booting then you can write down the shell script for this and then add this shell script in startup applications.So everytime you reboot your PC this shell script will run and it will do the task! Resetting wallpapers, clearing history and cleaning the user home directory can be easily done with a shell script.

hope this helps!


How can you locate a cron job script that's running on a production server?

Take a look at the table of jobs with crontab -l
and edit them if needed with crontab -e

A directory which stores a file for each job is often named
/var/spool/cron/crontabs/, and other crontab file locations include (many thanks to steeldriver for these) the system-wide crontab file /etc/crontab, as well as possibly the Debian-specific files /etc/cron.hourly, /etc/cron.daily, /etc/cron.weekly, /etc/cron.monthly and any conformant files under /etc/cron.d .


Switching from Ubuntu to Windows 7 help?

You have a few options (Not all will work for you depending on your situation, but at least a couple should work.).

You can go to Toshiba's support page and buy a recovery disk: https://support.toshiba.com/repair
You can use your recovery partition by selecting F1, F8, etc. when booting (see "Free options: on the Toshiba support website link.
You may also borrow an OEM version of Windows from a friend (with the exact same version as your computer). Enter in your product key when installing (usually on the bottom of the computer).
Follow the instructions here: How to remove Ubuntu and put Windows back on?
Stay with Ubuntu! (Just saying it is a good choice too :-) )


I installed the latest release of Amarok (2.8) and I started it.

I inserted my iPod in the computer and I mounted it. A popup window from Amarok appeared and I clicked Initialize button.

It didn't output any error.

To copy music in my iPod I used Banshee (sudo apt-get install banshee). After that I heard the same message in my iPod: "Please use iTunes to sync music with this iPod.".

I installed Gtkpod (sudo apt-get install gtkpod) and I inserted and mounted my iPod. It appeared in the Gtkpod application.

I clicked Normalize item from the right click menu. I saved the settings and I ejected the iPod from the computer.

Result? My iPod works fine again!


Installing Microsoft Office 2010 on Wine 1.4

I never had a problem installing Microsoft Office because I used PlayOnLinux.  It manages Wine versions and has installation scripts similar to wine tricks or Cross Over.

I think for the most part Libre Office does everything MS Office does, but I understand some times you need to install it.

Hope this helps.


How can I capture text from my terminal without redirecting it to a text file?

The answer to your question is tee. Just use | tee [output file] instead of > [output file]

Thus, sudo apt-get update > out.log
becomes
sudo apt-get update | tee out.log.

For more information: LinuxQuestion.org: BASH: How to Redirect Output to File, AND Still Have it on Screen, Linux by Examples: How to redirect output to a file as well as display it out.


Disable beep of KSTAR Powercom 600VA UPS (USB identifies as MEC0003)

I got it working with Network UPS Tools (NUT)
Configuring NUT for KSTAR UPS
$ sudo apt-get install nut nut-cgi

Sudo edited /etc/nut/ups.conf to contain:
# Set maxretry to 3 by default, this should mitigate race with slow devices:
maxretry = 3

[kstar]
driver = nutdrv_qx
port = auto
desc = "Description of this UPS"

and sudo edit /etc/nut/upsd.users
[admin]
password = youradminpassword
actions = SET
instcmds = ALL

Start up the ups driver and NUT deamon:
$ sudo upsdrvctl start
Network UPS Tools - UPS driver controller 2.7.4
Network UPS Tools - Generic Q* USB/Serial driver 0.28 (2.7.4)
USB communication driver 0.33
Using protocol: Q1 0.07
Can't autodetect number of battery packs [-1/13.70]
Battery runtime will not be calculated (runtimecal not set)

$ sudo service nut-server start

Checking beep status
To see current beep status, use the upsc command:
$ upsc kstar
Init SSL without certificate database
battery.voltage: 13.70
device.type: ups
driver.name: nutdrv_qx
...

ups.beeper.status: enabled

...

Disabling beep
Use the upscmd command with the username and password you configured in /etc/nut/upsd.users:
$ upscmd -u admin -p admin kstar beeper.toggle

and we see that beep is now disabled
$ upscmd -u admin -p admin kstar beeper.toggle
OK

$ upsc kstar | grep beep
Init SSL without certificate database
ups.beeper.status: disabled

It might take a second or 5 for upsc to reflect the status change. Voila, no more beeping when the AC is down.


lsb-graphics in very bad inconsistent state

dpkg --remove will keep config files, in contrast to dpkg --purge, so your config should still be there.


Find directory and delete it's content but not itself

Here's one way of doing it:

find . -type d -name 'Tmp' -exec sh -c 'rm -r "$0"/*' {} \;

Personally I would prefer to do this with bash, though:

shopt -s globstar
rm -r ./**/Tmp/*

With this, you can also easily ensure you're deleting hidden dotfiles, too:

shopt -s globstar dotglob
rm -r ./**/Tmp/*


i installed ubuntu but i want to go back to windows 8

You don't need to have the key prior to installing Windows 8 - it will read the key from BIOS by itself.

I have not looked for a downoadable ISO for Windows 8 (there may be some) but ordered a windows 8 disk from Dell - they shipped pretty quickly, and provided a clean install.


Open all sub-directories in individual tabs of terminal

If it is okay that all the tabs will open in one new terminal window instead of the current one, you can use something like this below instead of simulating key presses with xdotool:

find "$(realpath .)" -mindepth 1 -maxdepth 1 -type d -printf "--tab --working-directory '%p'\n" | xargs gnome-terminal

Explanation:

The same formatted in a more readable way:

find "$(realpath .)" \
     -mindepth 1 -maxdepth 1 -type d \
     -printf "--tab --working-directory '%p'\n" |
xargs gnome-terminal

What it does is:

realpath . gets the absolute path of the current directory
find [...] lists all files and folders inside the directory given as first argument which match the following criteria, in the specified way.

-mindepth 1 and -maxdepth 1 disables recursion, so that you only get results from directly inside your search folder, without that folder itself and without sub-subdirectores.
-type d limits the results to only directories, no files etc.
-printf "[...]" tells find to print the results it finds to its standard output, using the following format string. %p will be replaced by the result's path, starting with the search directory (which is why we used realpath earlier to make it absolute instead of just using .)

So far, the output of just running the part before the | pipe would look like:

--tab --working-dir '/tmp/test/folder1'
--tab --working-dir '/tmp/test/folder2'
--tab --working-dir '/tmp/test/folder3'

xargs gets the output from above piped into its standard input. It will read all input lines and use them to construct and run a command line, by appending them to its own arguments. The resulting command it would run with the example above would be:

gnome-terminal --tab --working-dir '/tmp/test/folder1' --tab --working-dir '/tmp/test/folder2' --tab --working-dir '/tmp/test/folder3'

Now that constructed command will open a new gnome-terminal window, with one tab per --tab argument, and applying all arguments after each --tab (and before the next one) to that specific tab. --working-dircetory /PATH/TO/SOMEWHERE sets the initial working directory to the given folder.


How do I know which file a program is trying to access?

(I first posted my answer at this askubuntu question, but removed it from there and posted it here, as it is more relevant.)

There are several ways you can investigate what files and libraries processes have opened; the main tools are lsof, strace and ltrace. Sometimes it is necesary to run them with sudo, so the program has access to everything it needs to gain an accurate snapshot of what a program is calling.

1) With lsof you need to find the process id you want to query, so use, for example:

lsof -c firefox

which will list all the files firefox has open and all its calls to system shared libraries. (Firefox currently has a pid of 3310 on my system, so you could also use lsof -p 3310, but you would have had to look up the process id first with ps aux | grep [f]irefox
 ). More information on lsof is detailed in this useful IBM article.

2) ltrace and strace have very similar functions and options, and are very useful for finding out detailed information about what calls a process is making. The main difference is that ltrace usually only traces library calls (although it can trace system calls with the -S option), while strace traces both library and other system calls. More information on tracing processes is available in this IBM article. Lsof is probably more useful for you if you want to examine an already running process but strace can also do this and monitor the calls in real time when given a process pid (sudo is always used when one attaches to a process):

sudo strace -p 3310

but it is much more useful to launch the program with strace and see what was called, as in the following example:

strace -f -e trace=open /usr/bin/firefox

You can just run strace with the target process and no options, but the switches here mean that child processes are traced (-f) and that all open system calls are traced (-e trace=open)
If you want to save the output to file you can specify -o ~/firefox.trace before specifying /usr/bin/firefox.

If you want a summary list of library calls, for example, you could use

ltrace -c /usr/bin/leafpad

and then exit the program and the list would be produced. Omit the -c option to view the calls in real time.

The results from strace and ltrace may not be greatly useful to you, as they are difficult to decipher unless you know what you are looking for, but lsof should provide some basic useful information.


protobuf error on ubuntu 16 using tensorflow

I just had the same issue:

It turned out, LD_PRELOAD contained /usr/lib/x86_64-linux-gnu/libprotobuf.so.9 which confused python. After removing it in my .bashrc, the problem was resolved.


Synaptics touchpad disabled after update in Kubuntu

My one works after update, sounds like some software missing. You will know it better,
but have you tried sudo dpkg -C to look for half-installed packages?


Ubuntu on new SONY Vaio laptop SVF142C29M

I've installed Kubuntu 12.04 for a friend on this computer and the speaker works correctly.
Perhaps it's because I've installed a 3.11 kernel via:

apt-get install linux-generic-lts-saucy

And I had to also install bcmwl-kernel-source for the BCM43142 wireless.
Also just for your information, when you have an issue with hardware, people will always you ask you for your Ubuntu version, kernel version, lscpi .
Here is mine:

guy@guy-SVF1421C5E:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.4 LTS"
guy@guy-SVF1421C5E:~$ uname -r
3.11.0-15-generic
guy@guy-SVF1421C5E:~$ lspci
00:00.0 Host bridge: Intel Corporation 3rd Gen Core processor DRAM Controller (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04)
00:16.0 Communication controller: Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 (rev c4)
00:1c.1 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 (rev c4)
00:1c.2 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 3 (rev c4)
00:1d.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation HM76 Express Chipset LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 7 Series Chipset Family 6-port SATA Controller [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller (rev 04)
07:00.0 Network controller: Broadcom Corporation BCM43142 802.11b/g/n (rev 01)
08:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5209 PCI Express Card Reader (rev 01)
0e:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c)
guy@guy-SVF1421C5E:~$


Installing printer+scanner dell V105 on ubuntu 12.10

OpenPrinting classes the v105's big brother, the v305, as a "Paperweight". There's extremely little to no chance you'll ever get the printer to do anything useful from a pure Ubuntu environment.

I'm sorry to say that Dell are famously unsupportive of their printers on Linux and in this case there isn't even a driver for OSX.

If you really need it to work, you'd probably be able to use VirtualBox to run a copy of XP and pass the printer through to it... But it'll be slow and buggy. Given the price of printers, it's almost certainly cheaper (in time) to buy a new, Linux supported printer.


It is impossible to use android sdk for windows in Ubuntu .You have to download android sdk for linux . For installation procedure refer Nickola's answer


After searching and searching online I've found the answer to this problem and the solution is quite simple.

Apparently it's because the graphic drivers don't load quickly enough during the booting sequence so by the time the graphic drivers are ready booting has almost finished and thus either no plymouth screen is shown or a very quick fast of it is seen.

So the solution I found and it works is to add a simple line to the following file.

gksu gedit /etc/initramfs-tools/conf.d/splash

then add:

FRAMEBUFFER=y

Save the file, and then :

sudo update-initramfs -u -k all

This command will update the initial ramdisk containing the drivers needed by the kernel at boot time. The parameter -k all updates all of them if you have more than one kernel installed. Reboot and all is well.

This works in ubuntu 12.04 too.

Hope this helps anyone who is missing the lovely Ubuntu boot screen.


Sky Go keeps asking me to activate Silverlight

Moonlight only supports Silverlight 4.0 (this information is in the official website), You need Silverlight 5.0. Try using "fork-project" on Winepholio, or only (its information is included in this Pipelight tutorial.

Follow all the tutorial, and don't skip any of the steps.

After installing Pipelight, you need to install Silverlight 5.1 in Wine, and after this install and enable plugin (in Firefox or Chrome); look for the plugin manager options Enable or Disable Silverlight.

This tutorial will allow the potential online video viewer who has made the decision to use Ubuntu to actually watch video online when it is in the format Silverlight 5+ (currently, at the time of writing, we're on Silverlight 5.1).


How do I fake an MX record for a domain?

You don't actually need to set up MX records for email delivery. 'A' records will do the job as well. See "Fallback to the address record" at Wikipedia about MX records.

In order to make fake hosts in /etc/hosts working for Postfix, you must tell it to actually use that and not just DNS-only by setting smtp_dns_support_level = disabled in /etc/postfix/main.cf. See the postconf documentation for details.

Alternatively, you could configure your MTA (e.g. Postfix) to use a specific transport for a domain. For Postfix use transport_maps.


Completely REMOVE and REINSTALL vlc on my system?

In a terminal, run:

sudo apt-get remove --purge vlc

sudo apt-get autoremove

sudo apt-get autoclean

sudo apt-get install vlc

Done.


Ubuntu 12.04 in login loop as lightdm-session says upstart not found

You need to install upstart-bin. This is because the user session uses upstart, but you uninstalled upstart so it does not work correctly. With Upstart, user sessions can use upstart without Upstart running as the system init.


How do I find out if a PNG is PNG-8 or PNG-24?

32-bit PNG (8 bit per channel - w/ alpha, also called "24-bit PNG with 8-bits of alpha" or "PNG24 with alpha"):

$ file zyne_zyne.png:
PNG image data, 64 x 64, 8-bit/color RGBA, non-interlaced

24-bit PNG (8 bit per channel - no alpha channel)

$ file 24.png
PNG image data, 1060 x 821, 8-bit/color RGB, non-interlaced

8-bit PNG (256 colors):

$ file 8bit.png
PNG image data, 1060 x 821, 8-bit colormap, non-interlaced


Ubuntu 12.10 won't boot after security updates

Do you have dual graphics card? See this bug:

https://bugs.launchpad.net/bugs/1167114

Accordingly to this bug, its happening to all systems that have hybrid graphics, but it has been fixed a few days ago, which means that soon it will be in the updates.
To avoid that bug, simply keep always pressing shift key on boot and select a previous kernel. (Hopefully) it will work.

Edit: please keep in mind that you need to do that each time you boot to avoid that nasty bug until the update land in the repositories.

Regards


In pandas you can simply achieve this by the following example. The header should be provided in the first line of the csv file. And rename the report.txt to report.csv.

import pandas as pd
import random

path_csv = '/home/mahmoudod/Desktop/Tareq-Qassrawi/report.csv'
df = pd.read_csv(path_csv, header=0)
df.head()


How can I run the Ubuntu installer from another installation

Since you have already instaled one partition, you can use the same bootable media to install on the other partition.

Plug in your bootable Ubuntu USB, restart the PC and boot the Live CD. Once the Live CD is booted up, start the installation.
The installation screen will start.

Select the keyboard layout
On the next screen, the installation will prompt you to install additional drivers, codecs etc.
Formating partitions and dual boot setup
This is a very important screen. On this screen, we need to choose how Ubuntu will install. Select the first option which says Install Ubuntu alongside Ubuntu.
Now click continue, on this screen, you need to set up partitions and hard disk space. First, you need to select the drive on which we are installing Ubuntu. On this screen, there will be a graphic representation of our Ubuntu OS and Ubuntu installation and how much space they have or will get after we finish setting up the partitions.
After you finished setting the partitions, click continue and you will get a prompt with a popup and it will ask us to confirm the changes.
Next step is to set up the user account and computer name.
After you set up the user account, the installation will start and it will take some time.
Once the installation is finished, you’ll get a prompt again and it will ask to restart the PC. Remove the bootable USB and restart the PC.


She encrypted her home folder? Try opening a file manager as root (you can do so by running sudo pcmanfm in the terminal), and try to access the folder.


Dual Boot with windows 8.1 and 12.04.4 ubuntu. With 2 drives in UEFI mode

You must boot installer in UEFI mode, or if installed to gpt partitioned drive and have the efi partition, you can use Boot-Repair to convert to UEFI.

You have to use Something Else or manual install. And then you have to manually create your own partitions, minimum is efi as FAT32 with boot flag, / (root) as ext4 and swap not format, but lots of discussion of swap on SSD, so if you have lots of RAM you may not need it or even use it. I usually like to have a little like 2GB.

And best to create an efi partition first on drive if UEFI or or bios_grub partition if BIOS. Drive does have to be gpt partitioned if you did not do that the first time.

I used gparted and selected gpt under device, advanced & select gpt over msdos(MBR) default partitioning....

I find it easier to create partitions with gparted, but you still have to format and select mounts in Something Else.

At the partitioning screen at the bottom is a combo box. It will default to drive that is sda which probably is wrong. You need to change that to the drive that is the one you are installing Ubuntu into.

Convert MBR drive to gpt and UEFI boot when Windows is UEFI on another drive.

How can I change/convert a  Ubuntu MBR drive to a GPT, and make Ubuntu boot from EFI?

How to Install Ubuntu on separate hard drive in a dual boot?


"iso-mount seems to be mounted read-only" error in UCK 2.4.6 or 2.2.0

That is a just warning given by mount when an iso file is mounted.

UCK mounts the Ubuntu iso file in ~/tmp/remaster-iso-mount directory so that directory name is part of the output. You can ignore that warning and you should.

You can verify this by trying to manually mount the Ubuntu iso file. For the time being let's assume the file name is ubuntu.iso and it is in the current directory or home directory. Using this command

sudo mount ~/ubuntu.iso /mnt

would produce the warning below:

mount: warning: /mnt seems to be mounted read-only.

This is logical, because You can't mount an iso in read-write mode. An iso is always read-only.


how to block specific domains in hosts file?

Install dnsmasq:

$ sudo apt-get install dnsmasq

Then in /etc/dnsmasq.conf (which you may have to create) add the line:

address=/tumblr.com/127.0.0.1

This will block tumblr.com and all of its subdomains by redirecting it to localhost (127.0.0.1).

Note:

For Ubuntu Trusty and others which already have NetworkManager use dnsmasq by default you don't need to install anything.

Just create a file /etc/NetworkManager/dnsmasq.d/local :

address=/tumblr.com/127.0.0.1

and reboot or restart NetworkManager

$ sudo service network-manager restart


Oracle Virtualbox - Can it use iso-Files?

Yes, Virtual box is an excellent way of trying out Operating systems and can work with .iso files.

First step is to create your virtual machine setting up its RAM, Hard disk size etc.

Now you can mount the .iso image as a CD/DVD

Start the virtual machine and you can install the OS of choice.  Do not forget to remove the .iso file from the virtual drive when you have finished.

Virtual Box has a facility called "Guest Editions".  If the the guest OS you are using is Ubuntu I would recommend you do not install Guest Editions from the devices menu.  It works but the version in the Ubuntu repositories has always worked better for me.

You can install this on your virtual machine by opening a terminal by pressing CTRL+ALT+T inside your virtual machine and typing

sudo apt-get install virtualbox-guest-utils


How do I get apt links to work with Google Chrome

What you need to do is to use Chromium not Chrome. This is because Chrome doesn't include Ubuntu in it's useragent but Chromium does.

The easiest way to do this and keep the dev channel, is to use the PPA.

Of course this isn't ideal, hopefully in the near future a new version of apt.ubuntu.com will be released that works with Chrome.


ClamAV no longer in the Software Center?

clamav is still available in the repositories. Simply install it via sudo apt-get install clamav.

It appears that the software-center(s) [especially gnome-software] do not show all packages - I believe it actually only shows packages with graphical user interfaces.

ClamTK is a graphical front-end for ClamAV and pulls along the needed packages as clamav on installation.

If you want a full blown "old-school" graphical package manager I recommend you to go with Synaptic.


I resolved this problem by changing permission of specified folder: chown ykhan:ykhan -R /home/ykhan/.local/share/juju

If this doesn't work then, try to make a new user and run your juju command with this new user.


How to recover from 14.04 fglrx driver install failure in recovery mode?

I found this article which solved the problem for me. In summary:

Since Natty (11.04), Ubuntu will mount your root partition as read only, so you can’t make any change right away... To get Read Write, you need to run this in root shell:

mount -o remount,rw /

apt-get commands worked for me after that. I ran apt-get remove fglrx* and after rebooting the open-source drivers are being used.


Following Grumbel's answer, I tried *xboxdrv solution with the support of this website and especially this page:

Install xboxdrv 0.8.2 from Ubuntu Software Center.
Install also uinput and joydev if needed. I did it this way:
sudo modprobe uinput
sudo modprobe joydev

Need to know the event of the gamepad:
Launch udevadm monitor --udev and then plug the game pad:
$ udevadm monitor --udev
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing

UDEV  [6722.377700] add      /devices/pci0000:00/0000:00:1d.3/usb5/5-1 (usb)
UDEV  [6722.383264] add      /devices/pci0000:00/0000:00:1d.3/usb5/5-1/5-1:1.0 (usb)
UDEV  [6722.383333] add      /devices/pci0000:00/0000:00:1d.3/usb5/5-1/5-1:1.0/0003:046D:C218.0003 (hid)
UDEV  [6722.383389] add      /devices/pci0000:00/0000:00:1d.3/usb5/5-1/5-1:1.0/0003:046D:C218.0003/hidraw/hidraw1 (hidraw)
UDEV  [6722.387123] add      /devices/pci0000:00/0000:00:1d.3/usb5/5-1/5-1:1.0/input/input10 (input)
UDEV  [6722.399284] add      /devices/pci0000:00/0000:00:1d.3/usb5/5-1/5-1:1.0/input/input10/event8 (input)
UDEV  [6722.412128] add      /devices/pci0000:00/0000:00:1d.3/usb5/5-1/5-1:1.0/input/input10/js0 (input)

I conclude that my gamepad's event is /dev/input/event8

Display names of every key, axis, button of the gamepad.
The idea is to launch xboxdrv and test every button and note the result on paper.
$ sudo xboxdrv --evdev /dev/input/event8 --evdev-debug
Your Xbox/Xbox360 controller should now be available as:
/dev/input/js1
/dev/input/event9
Press Ctrl-c to quit, use '--silent' to suppress the event output
EV_ABS ABS_X 128
EV_ABS ABS_Y 128
...

In my case the result is:

Set the config file
Create an xboxdrv-mouse.ini file to set X Y axis and left and right mouse button.
Here I set gamepad buttons 2 for left mouse button and 3 for right mouse button:
[xboxdrv]
evdev=/dev/input/event8
silent=true

[evdev-absmap]
ABS_X=x1
ABS_Y=y1

[ui-axismap]
x1=REL_X:10
y1=REL_Y:-10

[evdev-keymap]
BTN_THUMB=a
BTN_THUMB2=b

[ui-buttonmap]
a=BTN_LEFT
b=BTN_RIGHT

# EOF #

Note that value for REl_X and REL_Y seems to define the speed of the mouse, and by defining a negative value it inverts the axis (see here for REL_Y)
Another example with more button definition
[xboxdrv]
evdev=/dev/input/event8
silent=true

[evdev-absmap]
ABS_X=x1
ABS_Y=y1
ABS_HAT0X=x2
ABS_HAT0Y=y2

[ui-axismap]
x1=REL_X:10
y1=REL_Y:-10
x2=KEY_LEFT:KEY_RIGHT
y2=KEY_DOWN:KEY_UP

[evdev-keymap]
BTN_TRIGGER=x
BTN_TOP=y
BTN_THUMB=a
BTN_THUMB2=b
BTN_PINKIE=rt
BTN_BASE2=rb
BTN_TOP2=lt
BTN_BASE=lb
BTN_BASE3=back
BTN_BASE4=start

[ui-buttonmap]
x=KEY_KPENTER
y=KEY_SPACE
a=BTN_LEFT
b=BTN_RIGHT
rt=KEY_KP8
rb=KEY_KP2
lt=KEY_KP6
lb=KEY_KP4
back=KEY_LEFTSHIFT
start=KEY_RIGHTCTRL

# EOF #

Launch it
sudo xboxdrv --config xboxdrv-mouse.ini

To avoid launching it with sudo, create a udev rule.

CONCLUSION
It works fine, it's the best solution for me.


If you don't want to change the original files, you have to iterate over the filenames in list and copy them away, since otherwise redirection > would overwrite any previous change to the new file (which happens if you have several entries for the same file in list). Something along the lines of this would leave your originals untouched:

#!/bin/bash

list=testlist.txt

# get the first column in $list, sort it, remove duplicates
# and copy file to *_new. ignore if it doesn't exist
awk '{ print $1 }' "${list}" | sort -u | while read file; do
    [ -e "${file}" ] || continue
    cp "${file}" "${file}_new"
done

# for each line in $list, get the filename, function name and line number
while read file func lineno; do
    # change filename to the one we wish to apply the changes to
    file="${file}_new"

    # file should exist as we just created it,
    # but if it doesn't, skip entry.
    [ -e "${file}" ] || continue

    # replace
    sed -i "${lineno}s/${func}/${func}()/" "${file}"
done < "${list}"


Why do Ubuntu AMIs only have 8gig on root

This is just the way AWS provisions ephemeral storage based instances. It is not unique to the Ubuntu AMIs


Is there any way to run executable programs on windows in ubuntu?

The most common tool to do so is Wine (stands for Wine  is not an emulator). Wine takes windows programs and basically "translates" the Windows commands to Linux commands in real time.

Wine can be installed via the official repositories:

sudo apt-get install wine

However, I prefer using PlayOnLinux. This is a graphical frontend and manager for Wine. It supports multiple virtual drives, one for each Windows program, so they won't interfere with each other. Additionally, PlayOnLinux supports multiple Wine versions. For each application, you can choose the best-working version. And for many programs there's an installation script which does all the work for you.

Install PlayOnLinux using the following command:

sudo apt-get install playonlinux