Installing Vivaldi on Ubuntu 17.04? The debian package downloaded from the site opens in the software center, but when install is clicked it does nothing.

Guys the question does not ask how to install on ubuntu 15.04.  As you probably realize the procedure between implementations can easily differ.  Also the question does not ask how to install debian packages in general.  In the past my experience with this is that the general install mechanism does not pull dependencies, or has other tricky implementation details such as just use -f ... which in the past sometimes works, sometimes does not, and then we are back to the drawing board again, possibly having to reinstall the whole system in order to clean things up.

Context matters.  The context here is Ubuntu 17.04 (64 bit) and Vivaldi.  People coming to this forum want a tested proven answer in the context that they are requesting the answer for.  Short simple and easy to implement answers.

This is probably the 5th time this month that I'm writing a long explanation in my post as to why something is not a duplicate.  It will probably trigger something about going to meta to explain or challenge the duplicate tag.  But seriously we just want quick short answers.  Put a 3 day timing delay on marking things as duplicates and let people respond with answers that are specific to a given context.  It will make the forum much better.

sudo apt-get install gdebi

Then download vivaldi and do:

sudo gdebi vivaldi-stable_1.9.818.50-1_amd64.deb

Same for google chrome:

gdebi google-chrome-stable_current_amd64.deb


Add armhf as a suppoted architecture for guest KVM VMs (on a amd64 host) I have an Ubuntu Server 12.04 setup with about 6 KVM VMs running. Guests are all x86 or amd64, host is a 2-socket Westmere Xeon box.

Now I want to create a new guest VM but this time the guest VM should run an armhf image (a Raspberry Pi image).

What I was expecting would work: open Virt-Manager, go through the usual setup steps to create a new VM and then choose QEMU and armhf as the architecture of the guest.

Why it did not work: I can only see x86 and amd64 as options for the architecture of the guest.

Is there anyway I can install QEMU support for armhf so that I can easily create armhf KVM guests on my server using virt-manager?

I want to make as little changes as possible on the host. I do not want to use XEN or VirtualBox, it has to be KVM.

Thanks!

I found a potential solution.

Install qemu-system-arm and on virt-manager, choose "qemu" for Virt Type (instead of "kvm" which on my setup is the default selection) and then under "Architecture" you will find the option "armv7l".

I have not tested it yet, but at least the option is now there, should work fine.

Is there a better way to accomplish this?

http://community.arm.com/groups/processors/blog/2014/03/28/virtualization-on-arm-with-xen
http://community.arm.com/groups/processors/blog/2013/12/20/virtualization-on-the-chromebook-using-kvm-tool

If you want to virtualize on ARM, you can do the above. Otherwise, qemu for virt type?


Ubuntu 14.04 Netbeans 7.4 installation problem I have a problem when I want install netbeans7.4 on Ubuntu 14.04.

I have openJDK :

morgan@morgan-laptop:~/Téléchargements$ java -version
java version "1.7.0_51"
OpenJDK Runtime Environment (IcedTea 2.4.6) (7u51-2.4.6-1ubuntu4)
OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)

When i try to install it (sorry for error message, it's a french version) :

morgan@morgan-laptop:~/Téléchargements$ sudo sh ./netbeans-7.4-linux.sh
Configuration du programme d'installation...
Recherche d'une JVM sur le système...
Extraction des données d'installation...
Exécution de l''assistant d''installation...
Impossible d'initialiser l'Interface Utilisateur
Running in headless mode

Exception: java.awt.HeadlessException thrown from the UncaughtExceptionHandler in thread "main"

And this is my kernel version :

morgan@morgan-laptop:~/Téléchargements$ uname -r
3.13.0-24-generic

I don't anderstand why it's not work. I have seen de same problem (other topic) but for resolve it they uninstall openJDK for Sun JDK. Yet it worked on ubuntu 12.04 with openJDK

I did not install jdk, for solve them :

sudo apt-get install openjdk-7-jdk

The cleanest install Netbeans in Ubuntu is written in the command line: sudo apt-get install netbeans. It'll install the 7.0.1 version, but it's better than nothing.


Permission denied for all sudo comands I just typed "sudo chmod 770 ." on my /usr/bin directory by mistake

[acc]:/usr/bin$ sudo chmod 770 .

Now every time i run a sudo command I get a "Permission denied" error

[acc]~$ sudo
bash: /usr/bin/sudo: Permission denied

When I open a new terminal, i get: "bash: groups: command not found"

Please help me resolve this... :(

You should boot from a LiveCD then do the following:

Mount your Ubuntu installation by clicking on the device's icon in the file manager.
Open a terminal and cd into the /usr/bin folder of that installation you mounted from above.
Run this command to give all users execute permissions

sudo chmod -R a+x .

Run this command to give all users read permissions

sudo chmod -R a+r .

Run this command to remove all users (except root's) write permissions

sudo chmod -R o-w .

Reboot and see if it works.

One possibility is:

Boot into recovery mode with ubuntu. (select advanced options on the grub menu, then Ubuntu with recovery mode)
Then, select "Root" in the list of options. That will give you root-permissions in the recovery mode, and you will enter the terminal
do: cd /usr/bin and then try to do sudo chmod 777

(i am not sure if it should be 7777 because that grants access for everyone)

4 . Reboot

Good luck.


no sound for mp3 and no sound for movies I am using ubuntu 14 and the sound comes out of my speakers when i go into sound on settings but it wont play mp3 or sound in movies. The sound card seems to be working but I was fooling about with ardour and that might have something to do with it

Try with VLC media player.
To install VLC Player use the following command:

  sudo apt-get install vlc

Try blow command

Sudo apt-get update

Sudo apt-get install

Sudo apt get install vlc

Use vlc player


Ubuntu 14.04 : My computer sees the wireless network, but won't connect to it, keeps asking for the WPA password Sony Vaio VGN-NW240F
Network controller: Qualcomm Atheros AR9285 Wireless Network Adapter (PCI-Express) (rev 01)

$ lspci -vv -s
Subsystem: Foxconn International, Inc. T77H126.00 802.11bgn Wireless Half-size Mini PCIe Card
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 17
Region 0: Memory at d2500000 (64-bit, non-prefetchable) [size=64K]
Capabilities: <access denied>
Kernel driver in use: ath9k

$ modinfo ath9k
filename:       /lib/modules/3.13.0-24-generic/kernel/drivers/net/wireless/ath/ath9k/ath9k.ko
license:        Dual BSD/GPL
description:    Support for Atheros 802.11n wireless LAN cards.
author:         Atheros Communications
srcversion:     BAF225EEB618908380B28DA
alias:          platform:qca955x_wmac
alias:          platform:ar934x_wmac
alias:          platform:ar933x_wmac
alias:          platform:ath9k
alias:          pci:v0000168Cd00000036sv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000036sv0000185Fsd00003027bc*sc*i*
[alias...]
depends:        ath9k_hw,mac80211,ath9k_common,cfg80211,ath
intree:         Y
vermagic:       3.13.0-24-generic SMP mod_unload modversions
signer:         Magrathea: Glacier signing key
sig_key:        00:A5:A6:57:59:DE:47:4B:C5:C4:31:20:88:0C:1B:94:A5:39:F4:31
sig_hashalgo:   sha512
parm:           debug:Debugging mask (uint)
parm:           nohwcrypt:Disable hardware encryption (int)
parm:           blink:Enable LED blink on activity (int)
parm:           btcoex_enable:Enable wifi-BT coexistence (int)
parm:           bt_ant_diversity:Enable WLAN/BT RX antenna diversity (int)
parm:           ps_enable:Enable WLAN PowerSave (int)

My network works perfectly well with this computer on windows 7, and with various other computers and devices. I installed Ubuntu 14.04 today, and it works perfectly, except for the wifi.

When I try to connect (wifi icon, name_of_network), a popup asking for the password keeps appearing every minute or so, and it does not connect. The password is correct.

I tried to delete the network from the connection list (wifi icon, edit connections), restart my computer and try again, to no avail.

Ethernet works perfectly.

I have to assume that it is related to Ubuntu, since the wireless card is recognized and can scan the different networks available.

$ rfkill list
0: sony-wifi: Wireless LAN
Soft blocked: no
Hard blocked: no
1: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no

I do not know Ubuntu 14.04 well enough to even try anything.

Any suggestions?

So, my issue was fixed. I'm not extremely sure how, but here is what I did:

sudo service network-manager restart

Maybe that will help others who have this problem, if that was the solution of course.

I installed "wifi radar" form softwere center Started it left everything as it was and hit save and exited it. Now my wifi works fine hope this works for everyone.     PS. Im running kubuntu 14.04


Locked out of my server I recently got my server and I did a major noob mistake. I forgot to allow my modified ssh port on ufw. Now I can't ssh into it. It's a remote dedicated server. So that means I have to ask the host to allow it?

Ordinarally Raja would have the reason.
If it is on amazon cloud, you could set up another server, and attach the other server storage and change the config by hand.
You have to know the provider features. Perhaps there are ways. Many "dedicated servers" aren't trully that. Ask for your host support.

Or hire a whitehat pentester to try to do so if it is legal on your country. On my country is legal, as long as the servers is really yours.


Should I use Ubuntu OS on a new laptop supplied without an OS? I am looking at purchasing a new laptop without an operating system from PCSPECIALISTS, but they will not advise me as to whether it will be OK to use UBUNTU OS. Can someone please advise if it is OK to use UBUNTU?

The laptop specification is:

Chassis & Display: 15.6" Matte HD LED 16:9 Widescreen (1366x768)
Processor (CPU): Intel® Pentium® Quad Core Processor N3520 (4 x 2.16GHz) 2MB Cache
Memory (RAM): 4GB KINGSTON SODIMM DDR3 1600MHz (1 x 4GB)
Graphics Card: Integrated Intel® HD Graphics
Memory - Hard Disk: 500GB SERIAL ATA II 2.5" HARD DRIVE WITH 8MB CACHE (5,400rpm)
DVD/BLU-RAY Drive: Ultra Slim 8x SATA DVD±R/RW/Dual Layer (+ 24x CD-RW)
Memory Card Reader: Internal 9 in 1 Card Reader (MMC/RSMMC/SD: Mini, XC & HC/MS: Pro & Duo)
Sound Card: Intel 2 Channel High Definition Audio + MIC/Headphone Jack
Bluetooth & Wireless: GIGABIT LAN & WIRELESS INTEL® N-7260 (300Mbps, 802.11BGN) + BLUETOOTH
USB Options: 3 x USB 2.0 PORTS + 1 x USB 3.0 PORT AS STANDARD
Battery: Genesis Series 32WH Battery (Up to 9.5 Hour Battery Life)
Operating System: NO OPERATING SYSTEM REQUIRED
Keyboard Language: GENESIS SERIES INTEGRATED UK KEYBOARD
Notebook Mouse: INTEGRATED 2 BUTTON TOUCHPAD MOUSE
Webcam: INTEGRATED 1MP HD WEBCAM

Since there aren't any dedicated graphics card, and you have 4 GB of RAM, and also you have 500 GB of hard disk space, so, you won't be able to play any high-end games.

Again, if you use softwares like Adobe Photoshop, Adobe Dreamweaver, AutoCAD, etc. then it is inevitable. You have to use Windows.

But if you can compromise on the above two factors, then, you can definitely use Ubuntu without any second thought.

But I would suggest that you first dual boot your laptop with windows and Ubuntu and see that how much time you spent on the two OSes. Then decide on the OS you want to keep.


Problems loging in gnome-session after upgrade to 14.04 I just upgraded from ubuntu 12.02 LTS to 14.04 LTS. After a miriad of problems which i was able to solve one by one, the upgrade was successful. It was however impossible to log in the default gnome session ( I could still log in on a xbmc session ).

After some research i found out that unity-2d was no longer delivered on this upgrade. Knowing that my Laptop has one of those crappy sis671 chips, i decided  then to install the ubuntu-session, and gnome-session-fallback. But i still cant log in any one of those new sessions that  i did install.

Checking my .xsession-errors i found two possible causes. The first was a python script complaining about the non existence of the gconf module. After installing that module, that problem was solved. The second was this error: "init: Failed to obtain gnome-session instance: Unknown parameter: XDG_CURRENT_DESKTOP". A google search on the topic wasn't very helpfull.

Any help or idea is very much appreciated.

Add X-LightDM-DesktopName=GNOME to the GNOME session .desktop file. That file should be located in:

/usr/share/xsessions/

From what i've learned from Unity can't be started from kdm bug on lounchpad the problem seem  to be that the enviroment variable  XDG_CURRENT_DESKTOP was not set. After setting it on /etc/profile the problem was solved.


How to use(/enable) FN keys to adjust volume at my asus laptop? I have an ASUS laptop (ASUS X53S series) and I want to adjust the volume by using the FN key and F10 (mute), F11 (vol down), F12 (vol up).

Also F9 key is not working as well(this is for enabling/disabling the touchpad).

I have seen this question but didn't see any solution.

All the other FN buttons seem to work(changing brightness,turning off display,switching off wifi).

Is there any way to do so?

I had the same problem with my ASUS K53E.

sudo apt-get install git

git clone git://git.iksaif.net/acpi4asus-dkms.git

cd acpi4asus-dkms

make

sudo make install

sudo modprobe asus-nb-wmi

After every kernel update the above will be erased and you will need to re-do it every time until it is included in a kernel version at a later stage. To make it easier create a .deb package which will be easier to install.

sudo apt-get install debhelper

cd acpi4asus-dkms

dpkg-buildpackage

sudo dpkg -i [newly-created-package].deb

sudo modprobe asus-nb-wmi

source

I have a little different computer though; mine is a K53E and yours is an X53S, so I can't guarantee that it'll work.

If you press the Fn button at the bottom left corner of your keypad, next to the Ctrl button, and press F11 or F12 while you're at it, you'll be able to control your volume on the keypad.

So it's:

Fn + F11 → volume decreases,
Fn + F12 → volume increases.


Ubuntu 16.04 installation frozen (taking too long) So im installing Ubuntu right now and it's frozen at one point.It's just stops there and also it takes longer than 4-5 hours to install which is pretty weird..Can someone help?

It sounds like this maybe a older machine your using and maybe you should try a lighter version of Ubuntu like Lubuntu or Kubuntu they require less resources to run on older computers

With out knowing what the specs are I'm assuming it's an older computer with that said, some older machines may not even be able to install a distribution like 16.04, I have older machines also and when I try installing Ubuntu 16.04 it just hanged at one point and would not install.

I had to switch to a lighter version of Linux like Linux light or Lubuntu and was able to complete my installation. It's a suggestion and be of use


What software can I use to make a mirror image of Ubuntu? I used to use Easeus Todo for Windows, or Norton Ghost. What options do I have for linux?

Clonezilla is great for cloning Windows and Linux. You can boot it from USB/CD/PXE and image to files on an external drive, samba, nfs,  & ssh. You can also disk to disk.

Just cloned my hdd, easily and quickly with no errors, i used clonzilla, a brilliant bit of software.

It allows you to clone HDD to HDD, or HDD to image, plus other options.

I can't stress how easy it is to use...

Some info here:

Top 6 Open Source Disk Cloning and Imaging Software


Error installing pynauty: “error: command 'x86_64-linux-gnu-gcc' failed with exit status 1” I'm trying to install the pynauty Python package.   When I ran python setup.py build, I got the following error.  I have installed the dependencies.  How can I successfully install this Python package?

$ python setup.py build
running build
running build_py
running build_ext
building 'pynauty._pynauty' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Inauty -Isrc -I/usr/include/python2.7 -c src/pynauty.c -o build/temp.linux-x86_64-2.7/src/pynauty.o -O4
In file included from src/pynauty.c:16:0:
nauty/nauty.h:40:0: warning: "_FILE_OFFSET_BITS" redefined
 #define _FILE_OFFSET_BITS 0
 ^
In file included from /usr/include/python2.7/pyconfig.h:3:0,
                 from /usr/include/python2.7/Python.h:8,
                 from src/pynauty.c:15:
/usr/include/x86_64-linux-gnu/python2.7/pyconfig.h:1157:0: note: this is the location of the previous definition
 #define _FILE_OFFSET_BITS 64
 ^
src/pynauty.c: In function ‘_make_nygraph’:
src/pynauty.c:363:33: warning: passing argument 2 of ‘PyDict_Next’ from incompatible pointer type
     while (PyDict_Next(adjdict, &i, &key, &adjlist)) {
                                 ^
In file included from /usr/include/python2.7/Python.h:101:0,
                 from src/pynauty.c:15:
/usr/include/python2.7/dictobject.h:114:17: note: expected ‘Py_ssize_t *’ but argument is of type ‘int *’
 PyAPI_FUNC(int) PyDict_Next(
                 ^
src/pynauty.c: In function ‘init_pynauty’:
src/pynauty.c:537:15: warning: variable ‘m’ set but not used [-Wunused-but-set-variable]
     PyObject *m;
               ^
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/src/pynauty.o nauty/nauty.o nauty/nautil.o nauty/naugraph.o -o build/lib.linux-x86_64-2.7/pynauty/_pynauty.so
/usr/bin/ld: nauty/nauty.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
nauty/nauty.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

The full error message tells you part of the solution: you need to compile nauty with the -fPIC flag.

Download nauty, unzip it, cd into the dir
CFLAGS=-fPIC ./configure
make
Download pynauty, unzip it, cd into the dir
ln -s ../nauty* nauty
However, the pynauty's setup.py file appears to be misconfigured: it doesn't include the correct nauty files and so will fail on import if built and installed at this point.  Modify the extra_objects argument in setup.py (line 37):

# from
extra_objects = [ nauty_dir + '/' + 'nauty.so', ],
                      nauty_dir + '/' + 'nautil.o',
                      nauty_dir + '/' + 'naugraph.o'
                    ],
# change it to
extra_objects = [nauty_dir + '/' + 'nauty.a'],

python setup.py build
python setup.py install (if you're installing to the system, use sudo, but preferably use a virtualenv instead)

While the package is now installed and importable, the entire test suite fails.  This is an issue that should be fixed by the library's maintainer; consider reporting the bug to them.

I'm not clear on your steps despite your edit. Assuming you:

downloaded https://web.cs.dal.ca/~peter/software/pynauty/pynauty-0.4.tar.gz
extracted it to aDirectory
ran cd aDirectory/nauty04/ (or otherwise (c)hanged (d)irectory to it
executed following commands without a problem or error:

./configure   # note this command for later
make nauty.o nautil.o naugraph.o
ln -s ../nautyXX nauty

and ran into error you described in the opening paragraph of your question, than the problem you most likely ran into is that Python by default is configured without shared libraries. Unfortunate package you download, is searching for shared library being compiled and finds none.

Proposed solution: run ./configure --enable-shared. That way you tell Python to actually compile them as well. You might run into trouble depending on what shared libs you have there, but can't say anything but speculation without knowing more on your side.

Sources:

https://github.com/docker-library/python/issues/21 - number of comments about this issue
https://github.com/docker-library/python/pull/23/files - fix with --enable-sharing
https://stackoverflow.com/questions/25539860/how-to-build-pyqt5-on-ubuntu
https://forum.qt.io/topic/48455/solved-compile-error-on-pyside-1-2-2-python-3-4-2-ubuntu-14-04-linking-cxx-shared-library-libshiboken-cpython-34m-so

I recommend the Github link, it's most clarifying here.


How can I remove gpg key that I added using apt-key add -? I don't need the key in my server's keyring anymore. Is it possible to remove it? I added the key using this command:

 curl http://repo.varnish-cache.org/debian/GPG-key.txt | apt-key add -

Thanks for helping

First you need to find the key id of the key you added. Do this by the command:

sudo apt-key list

It will list all the keys that you have, with each entry looking like this:

pub   1024R/B455BEF0 2010-07-29
uid                  Launchpad clicompanion-nightlies

Once you have figured out which key to remove, use the command sudo apt-key del <keyid> where <keyid> is replaced with the actual keyid of the key you want to remove from your keyring.

$ sudo apt-key del B455BEF0
$ apt-key list | grep clicompan
$

I know I might be late, but just wanted to share this one-line command to achieve this.

NOTE: This will only work if the output is an unique key.

Ubuntu versions up to 16.04 (UPDATED 2018-12-22):

apt-key del $(apt-key list | awk 'NR=='$(apt-key list | grep --line-number --regexp "FOOBAR" | cut --fields 1 --delimiter ":")'{print;exit}' | awk '{print $2}' | cut --fields 2 --delimiter "/")

where FOOBAR is the UID name.

Ubuntu versions from 16.10:

apt-key del $(apt-key list | awk 'NR=='`expr $(apt-key list | grep --line-number --regexp "FOOBAR" | cut --fields 1 --delimiter ":") - 1`'{print;exit}')

where FOOBAR is the UID name.


How to convert .avi video to .mp4(for Motorola Milestone, Android 2.3.4) with Avidemux I open .avi video with Avidemux and I set Video format to MPEG-4 AVC(under Configure, Bitrate tab I choose "Single Pass - Bitrate (Average)" and Target bitrate to 256 kb/s, under Filters I choose MPlayer resize to 480x360 and I also add a subtitles) audio format to AAC (Faac)(Under Configure, I choose Bitrate 96) and format to MP4(like a image below). When Avidemux convert video to .mp4 format I can play the file on my copmuter, but on my phone I can't. When I want to play it on my phone with native video player, it just show the error something like "Can't play this video". So the question is how to convert .avi video to .mp4 with Avidemux(because I want to have subtitles inside movie) to be playable with android phone(Android version 2.3.4) with native player.

Any help will be highly appreciated. :)

I just downloaded MoboPlayer and MoboPlayer Codec for ARMV7VFP3 from Android Market. It reads the .mp4 files and it also reads .avi(xvid) and .srt(subtitles), so I don't even need to convert the videos. If anyone can't play their videos on their Android phone, I suggest MoboPlayer(It's available from Android Market for free).

Motorola Razr M HD should have bulit in player support playing videos in these formats: MP4/3GP. Unfortunately, your M4a (or M4V maybe) videos are not compatible with Motorola Razr M HD.

So, first step, you need to use Motorola video converter for Mac to convert videos to MP4.

Final step is dragging and dropping converted AVI videos to your Android phone Motorola Razr M HD.


How can I toggle the Fn (function) key? Is there a way to toggle the Fn key?  I'd like to be able to toggle it so I don't have to press Fn+F12 to raise the volume, for example.

I'm running Ubuntu 16.04.1 LTS on an Asus D550C.

To toggle F1 .. F12 keys use media functions or to be
the "F" keys press Fn +  Esc .

Look in the BIOS. For Acer laptop I can choose the toggle on Fn touch in it.


How to create script with auto-complete? When I use program like svn and I type in Gnome Terminal:

svn upd

and hit Tab it's autocompleted to:

svn update

Is it possible to do something like that in my custom bash script?

You'll have to create a new file:
/etc/bash_completion.d/foo

For a static autocompletion (--help / --verbose for instance) add this:
_foo()
{
    local cur prev opts
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    prev="${COMP_WORDS[COMP_CWORD-1]}"
    opts="--help --verbose --version"

    if [[ ${cur} == -* ]] ; then
        COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
        return 0
    fi
}
complete -F _foo foo

COMP_WORDS is an array containing all individual words in the current command line.
COMP_CWORD is an index of the word containing the current cursor position.
COMPREPLY  is an array variable from which Bash reads the possible completions.

And the compgen command returns the array of elements from --help, --verbose and --version matching the current word "${cur}":
compgen -W "--help --verbose --version" -- "<userinput>"

Source

If all you want is a simple word based auto-completion (so no subcommand completion or anything), the complete command has a -W option that just does the right thing.

For example, I have the following lines in my .bashrc to autocomplete a program called jupyter:

# gleaned from `jupyter --help`
_jupyter_options='console qtconsole notebook' # shortened for this answer
complete -W "${_jupyter_options}" 'jupyter'

Now jupyter <TAB> <TAB> autocompletes for me.

The docs at gnu.org are helpful.

It does seem to rely on the IFS variable being set correctly, but that hasn't caused any issues for me.

To add filename completion and default BASH completion, use the -o option:

complete -W "${_jupyter_options}" -o bashdefault -o default 'jupyter'

To use this in zsh, add the following code before running the complete command in your ~/.zshrc:

# make zsh emulate bash if necessary
if [[ -n "$ZSH_VERSION" ]]; then
    autoload bashcompinit
    bashcompinit
fi


Dual HDD, Win7 & Ubuntu I have a pc that has Windows 7 on it, and a hard drive that I recently installed and put Ubuntu 12.04 LTS on.

The problem I encounter is that grub does not load Windows 7, and gives me an error when I try to load from grub. Instead I have to go to the bios and select the other HDD in order to get to Windows 7.

Ideally I would like to be able to use grub to decide which HDD to boot. However, even another boot-loader that allows me to select which HDD to boot would be nice.

Download this program.

Install the program if you set it to Grub2Auto it will work.


How to install Ubuntu on Android phone (HTC Desire) I want to install Ubuntu on Android device. The detail of my handset is as under :-

HTC Desire
A8181
RAM 512
Processor - 1GHz

... where can i find ubuntu OS for my android HTC desire?

You have three choices:

(1.) No Risk: You can wait until this is better supported, and easy to install.

(2.) Medium Risk: Try Ubuntu Touch on an ASUS Nexus 7 ..

How to install -- Release notes -- Using the device

(3.) High Risk: Try installing (on your device).

wiki.Ubuntu > Touch > Devices > bravo  (aka HTC Desire)

NOTE: This appears to be work-in-progress.

I tried Linux on Htc Desire HD. Kali and some Arch Linux. Both work perfectly under the Linux Deploy at NVC. De facto its totaly useless. Apparently the software centre was working but without possibility of installing any apps. Lets wait for the official software to see whats going to happened


How can I recursively delete all files of a specific extension in the current directory? How do I safely delete all files with a specific extension (e.g. .bak) from current directory and all subfolders using one command-line? Simply, I'm afraid to use rm since I used it wrong once and now I need advice.

You don't even need to use rm in this case if you are afraid. Use find:

find . -name "*.bak" -type f -delete

But use it with precaution. Run first:

find . -name "*.bak" -type f

to see exactly which files you will remove.

Also, make sure that -delete is the last argument in your command. If you put it before the -name *.bak argument, it will delete everything.

See man find and man rm for more info and see also this related question on SE:

How do I remove all .pyc files from a project?

If in case you want to check the list before you delete the files, you can echo it.

find . -name "*.bak" -type f | xargs echo rm -rf

This will list out the search results that are piped to rm command via xargs.
Once you are sure about the list you can drop the echo in above command.

find . -name "*.bak" -type f | xargs rm -rf


Can I map the media player function keys to a media player other than Totem? I can use my function key+stop, next, previous, etc to control totem using my Keyboard. Can I map these settings entirely to vlc?

Yes, if you want to enable media controls for VLC in Ubuntu 10.10 ...

(I can't speak for other releases, anyone?)

... you will need to unset the media control keyboard global shortcuts in order to use them with VLC.

1) Open Keyboard shortcuts settings. Disable media play/pause/skip/reverse and whatever else you wish to use with VLC. To disable a shortcut, you have to press Backspace while in "changing shortcut"-mode.

2) Open VLC preferences and set shortcuts for the keys you want to use. Tools>preferences>Hotkeys tab. Change "Global" setting: Double-click "global" list item area: hit according media key. hit "apply", "save".

3) Restart VLC.

This question is answered on launchpad: https://answers.launchpad.net/ubuntu/+source/totem/+question/109827


Ubuntu not allowing me to log in after upgrade from 10.04 to 12.04 I upgraded from Ubuntu 10.04 to 12.04 and it went fine. After restart, when I try to log in from my root user it shows a command screen in a split second and then returns back to the log in screen which shows all users. I have even tried to test logging in with other users and it is working fine.

I guess there is some problem with home folder of my user or something. Kindly help me out otherwise my only hope is to make a fresh install from a CD which I am avoiding.

Thanks in advance.

This solution originally by actionparsnip worked for me:

Press CTRL+ALT+F1

Log in with you user name and password

Run the following command: sudo chown -R $USER:$USER $HOME

Press CTRL+ALT+F7
Try to log in


Oracle Java Runtime doens't appear I had installed originally Oracle JDK 7 update 4, with update-alternatives installation instruction and the JDK became manual mode (3). OpenJDK 7 in auto mode (O).

When I will run/install .jar file Oracle Java Runtime doens't appear. How should I do to fix it?

thank you

If you want to bring Oracle JDK to that menu then you have to create a .desktop file for Oracle JDK under /usr/share/applications if it is not already there. What about clicking Show other application button to see available application? If the Oracle JDK is not there then follow these steps:

sudo gedit to open gedit as super-user
write[Desktop Entry]
Name=Oracle JDK
Exec=path to Oracle's java here -jar
Terminal=false
Type=Application
Icon=openjdk-6
MimeType=application/x-java-archive;application/java-archive;application/x-jar;
NoDisplay=true then save the file as /usr/share/applications/OracleJDK.desktop
sudo chmod +x /usr/share/applications/OracleJDK.desktop to make the .desktop file executable
sudo gedit /usr/share/applications/bamf.index and add the line OracleJDK.desktop path to Oracle's java here -jar to the end and save.
open the file /usr/share/applications/mimeinfo.cache as super-user(sudo gedit) and add change the line application/java-archive=openjdk-xxx.desktop; to application/java-archive=openjdk-xxx.desktop;OracleJDK.desktop; i.e. just add your newly created desktop entry to mime-cache.
Now you should find Oracle JDK entry under the applications menu if you click view other applications

The above answer is not sufficient enough

you also need to update mime list as

open file in editor

gedit ~/.local/share/applications/mimeapps.list

then replace this

application/x-java-archive=file-roller.desktop;

to

application/x-java-archive=OracleJDK.desktop;

This will resolve the problem.


Run GUI program in bash without opening the window Is it possible to run a GUI program and tell bash to not show the window? E.g. something like nogui firefox that runs Firefox but don't show the GUI window.

Let me explain my situation: I am processing some images with the program ds9. I have a bash script that opens an image in .fits format format with this program, then export it as .jpeg and then closes the program. It is working perfectly fine. However, each time I run this script, the GUI window of ds9 opens up, then exports the image and then closes. This is annoying when converting many images because there are windows opening an closing automatically for each image.


Airmon-ng command not found In the terminal I get Command not found when I type:

airmon-ng start wlan0

What can I do to access the airmon-ng command?

Install the aircrack package first, then you will be able to use the airmon-ng command.

Here's how

Open a terminal and type:

sudo apt-get install aircrack-ng

You may now use the command.

sudo airmong-ng start wlan0

Try with:

sudo aptitude update
sudo aptitude install aircrack-ng


How to hide the mouse cursor I'm building a kiosk using Ubuntu Precise on a touch screen. Now I'm looking for the appropriate way to make the mouse cursor disappear. As people know where they are pointing, displaying an arrow under their finger is useless, and having an arrow where they last pointed even more so.

My best bet would be some kind of cursor theme consisting only of transparent cursors. I'm a bit surprised to find no UI to switch and maybe install cursor themes in the default Unity UI, but as I won't be using Unity, that's not much of a problem. It appears that the alternatives listed in update-alternatives --list x-cursor-theme all refer to .theme files, so I searched the package list for those. The resulting list does not list any likely candidates, i.e. no packages containing “invisible” or “transparent” in their name.

So far, some googled result yielding a readme for “XCursor Transparent Theme” is my best bet. That would mean compiling those sources myself, perhaps putting them into my PPA. I'm also a bit sceptical about that result as said readme is dated from 2003. And I'm not sure that I'm not making things overly complicated. After all, there is quite some support in Precise for touch devices, so I don't believe I'm the first one who wants to get rid of his mouse cursor.

Is there another way which doesn't involve user-compiled binary code?
Is there a theme package for transparent cursors which I've overlooked?
Is there some other mechanism to make the cursor disappear without changing the cursor theme?

I'll be using Matchbox WM, Firefox and Java applets, so I'll be happy with any solution working under such a setup. I'm not interested in any solutions twiddling with Gnome or Compiz, as I'll not be running either.

Try unclutter.
The purpose of this program is to hide the pointer after the mouse has not moved for a while. Using it, you can make the pointer appear only when the user touches the screen, and disappear right after it. Maybe this was not exactly what you were aiming for, but it is much easier than your alternative.
To use it, first install it:
sudo apt-get install unclutter

then run it:
unclutter -idle 0.01 -root

The number in the above command is the number of seconds before the pointer disappears (in this case, 1/100 seconds).

Unclutter new x11 version  has some options of note start hidden and hide on touch https://github.com/Airblader/unclutter-xfixes/blob/master/src/unclutter.c
Change unclutter.c
Config config = {
.timeout = 0, //default 5
.jitter = 0,
.exclude_root = false,
.ignore_scrolling = false,
.ignore_buttons.count = 0,
.ignore_buttons.buttons = NULL,
.hide_on_touch = true, //default false
.fork = false,
.debug = false,
.onescreen = false,
.ignore_matches = false,
.matches = NULL,
.start_hidden = true //default false
};


Where are icons stored? I want to change an icon of a specific theme. Where do themes save their icons?

Globally: /usr/share/icons/
or in your home folder : ~/.local/share/icons

To add to some of the answers here:
The freedesktop.org standard requires programs to look for icons in multiple folders in this order:

$HOME/.icons (for backwards compatibility)
$XDG_DATA_DIRS/icons, which typically just means ~/.local/share/icons.
/usr/share/pixmaps

So if you want a custom icon, your best bet is to find the icon name in /usr/share/pixmaps, and then create an image with that same file name in ~/.local/share/icons.


How to X11 forwarding through ssh in 15.10 Since I am on Ubuntu, I'll try to have X11 forwarding through ssh on a remote desktop. But unfortunately it does not work.
Before I do this :

ssh -X username@hostname

and then for example :

gedit

But now under Ubuntu 15.10 It does not work and I have this message :

$ gedit Failed to connect to **Mir**: Failed to connect to server socket: No files or folders of this type Unable to init server: Unable to connect: Connection refused

(gedit:2492): Gtk-WARNING **: cannot open display:

So my question is how to have X11 forwarding through ssh ?

You need to enable X-Forwarding in the SSH server configuration, in
/etc/ssh/sshd_config

It should look like:

X11Forwarding Yes

Uncomment any comments before this line.

After restarting the SSH Server everything should works fine.


Wrong resolution - cant change I'm not new to Linux, but I newly installed it on this PC. Its been as smooth as always, but I have a problem with the display. It runs in 1024x768 on a 1920x1080 monitor, which is not exactly fun. In the "Display" dropdown, it says "1024x768" and "800x600". Also, its recognizing my VGA screen as "Built-In" which is not correct.

I have done searching and have not found an answer. However, most of these answers tell me to change my "xorg.conf". I don't have that file. And I also got an error called Cant get gamma for native screen or something like that when trying to add something with xrandr.

How can I make the resolution correct?

Firstly you could try the proprietary nvidia drivers and see if the system corrects itself.
I highly recommend to try this first, except of course if you got beef with non open source software running on your install.

Anyway, if you still want the nouvau drivers (hoping i spelled that right :P) or the nvidia drivers fail to fix your problem you can forcibly add your resolution (never ever mess around with the Xorg.conf files - seriously it can hang your system) with xrandr

cvt 1920 1080

this will tell you what option/arguments you should use for the next command
ie:cvt 1024 600
output:# 1024x600 59.85 Hz (CVT) hsync: 37.35 kHz; pclk: 49.00 MHz
Modeline "1024x600_60.00"   49.00  1024 1072 1168 1312  600 603 613 624 -hsync +vsync

so for the next command you should copy everything for the 'Modeline' and after:

xrandr --newmode "1024x600_60.00"   49.00  1024 1072 1168 1312  600 603 613 624 -hsync +vsync

then you must add the new resolution to your output (run xrandr to find your output name ie:VGA1)

xrandr --addmode VGA1 1024x600_60.00

finally to change to your newly added resolution run: xrandr --output VGA1 --mode 1024x600_60.00

PS: some or all the commands listed may require admin rights (super-cow) so before all that just run sudo su to log as root

source (and more detail):https://wiki.archlinux.org/index.php/xrandr#Adding_undetected_resolutions

I recently had this issue. What solved it was to simply update my Ubuntu.

Run 'Software Updater'

Restart Computer when prompted


How to show line numbering in nano when opening a file Is there a way to tell nano to automatically show line numbering each time I open a file?

The keyboard combination to display the current line number whilst you are using nano is CTRL+C.

Alternatively, to display the line & column number position you could just use the -c parameter when launching nano i.e:

nano -c [filename]

To make this permanent, nano uses a configuration in your home folder ~/.nanorc

Thus to display line numbers always when using nano...

nano ~/.nanorc

(don't worry if its empty - this file doesn't exist by default)

type set constantshow

N.B. the deprecated syntax set const is shown in the animation

Save

Since you are using line numbers remember you can use ALT+G to jump to a specific line number.

It's 2021. The OP's question is still valid, but many of the answers here are for an older version of nano. I'm not presenting this answer as "the last word" - only as an update.

The default screen of nano consists of five areas. From top to bottom these are: the title bar, a blank line, the edit window, the status bar, and two help lines.

Where to display line numbers?
Line numbers may be displayed in one of two places:

the edit window
the status bar

The status bar display simply updates the line number (and column) of the cursor/insertion point as it's moved about in the edit window. Line numbers in the edit window are positioned in the left margin. It is possible to display the line number in either or both the edit window and the status bar.
Display line numbers in the edit window:
There are several methods (this is not necessarily a complete list):

Before the file is opened:
Edit/create the file ~/.nanorc with the following line:
set linenumbers

When the file is opened:
Use the -l option in nano:
$ nano -l <myfilename>

After the file is opened:
Toggle line numbers "on" and "off" w/ alt-shift-#:
altshift#

Display line numbers in the status bar

Before the file is opened:
Edit/create the file ~/.nanorc with the following line:
set constantshow

When the file is opened:
Use the -c option in nano:
$ nano -c <myfilename>

After the file is opened:
Toggle line number display in the status bar "on" and "off" w/ alt-shift-C:
altshiftC

Summary
These all work as of today: Ubuntu 20.04, nano --version = GNU nano, version 4.8, although there are minor discrepancies in the documentation.


Is there an equivalent to Google Sketchup? I would like to know the various tools available in Ubuntu similar to Google Sketchup.

I dont like to install Sketchup using wine in Ubuntu.

The Art of illusion

Art of Illusion is a free, open source 3D modelling and rendering studio. Many of its capabilities rival those found in commercial programs. Highlights include subdivision surface based modelling tools, skeleton based animation, and a graphical language for designing procedural textures and materials..

K-3D (Available in the software center )

K-3D's interface uses your platform's look-and-feel, and it's consistent with the applications you already know. New artists will find K-3D easy to understand, and professionals feel right at home. K-3D is intuitive, consistent, and discoverable.

For a  more advanced program you can try
Blender (Available in the software center)

Blender is a free open source 3D graphics application, available under the GNU General Public License for the Linux, Mac OS X, FreeBSD, OpenBSD and Microsoft Windows operating systems.
Blender's features include 3D modeling, UV unwrapping, texturing, rigging, water and smoke simulations, skinning, animating, rendering, particle and other simulations, non-linear editing, compositing, and the ability to create interactive 3D applications, video games, animated film, or visual effects. More advanced tools include rigid, realistic body, fluid, cloth and softbody dynamics simulation, modifier-based modeling, character animation, a node-based material and compositing system, and embedded scripting in Python.

B-processor is basically a sketchup-like architecture modeling program. All modeling can be done in perspective view, similar hierarchy plus extra options for real architects like distinction between rooms and construction elements.


Can't access Ubuntu's shared folders from Windows 7 In Ubuntu Maverick, I've shared some folders using the Nautilus "Sharing Options" GUI.

I can see them from Windows 7, but when I try to access them (from Windows) it asks for a username and password.  No matter what I enter, it won't let me in.  How do I configure this to share normally?

Update:  I've found that some of the shared folders let me in, but others don't.  Of the ones that do, some of their subfolders do, others don't, etc.  How can I investigate what's causing this?

When I let the GUI install what it needs, it installs samba and libpam-smbpass.  On the machine I am having trouble connecting to, libpam-smbpass is not installed.  Could this be the problem?

Have you installed Samba? sudo apt-get install samba

If so, then you need to set a Samba password: sudo smbpasswd -a USERNAME. This command will generate a prompt for a password (substitute USERNAME with your username).

Set a folder to share mkdir /home/USERNAME/sharedfolder

Make a backup copy of your smb.conf file: sudo cp /etc/samba/smb.conf ~

Open your smb.conf file: gksu gedit /etc/samba/smb.conf

Add this to the very end of the file:

[sharedfolder]
path = /home/USERNAME/sharedfolder
available = yes
valid users = USERNAME
read only = no
browsable = yes
public = yes
writable = yes

There should be NO spaces between the lines, and there should be a single space both before and after each of the equal signs. Save and exit gedit.

Restart Samba sudo restart smbd

Use this command to check your smb.conf file for syntax errors: sudo testparm

You now should be able to share from your Windows 7 machine.

Edit:

I understand your trying to access your Ubuntu share from Windows 7 and that you want to do so with a GUI interface.

  but when I try to access them (from Windows) it asks for a username and password. No matter what I enter, it won't let me in. How do I configure this to share normally?

To do so you must set up a Samba user/password on your Linux machine as I described above. I could recommend a GUI program for Ubuntu to do this, but frankly it's much more complicated and confusing to do it that way. The program is gadmin-samba and it's in the Ubuntu repository. Caution! you can totally bork your config if you misuse this program.
Please let us know what steps you've now taken, and which errors you have encountered. Thanks!

Try this from the Win7 box:

Control Panel > Administrative Tools

  Local Security Policy > Local Policies > Security Options

Modify these entries:

Network security: LAN Manager authentication level
Send LM & NTLM responses

Minimum session security for NTLM SSP
Disable Require 128-bit encryption


How do I fix F10, F11 and F12? What software are related to the Keyboard? or the Keyboard configuration?

Problem

It's local, only at my account.
It doesn't help If I try the reassign the keys they still won't work.

Info

My laptop.

If I type xev in a terminal I notice that the key codes are gone. I pressed F12 and got this.

   FocusOut event, serial 33, synthetic NO, window 0x5200001,
   mode NotifyGrab, detail NotifyAncestor

   FocusIn event, serial 33, synthetic NO, window 0x5200001,
   mode NotifyUngrab, detail NotifyAncestor

   KeymapNotify event, serial 33, synthetic NO, window 0x0,
   keys: 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
   0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

How it happened

I was trying to stream audio via this question/answer. But when I was finished and stopped the program I noticed that F10-F12 had stopped working.

Problem
I don't know what the software is called or how it works.

The keycodes For:

F10 is 76

F11 is 95

F12 is 96

Solution

The only solution I found was to reinstall Ubuntu, sad, just hope the problem is a one time thing...

You need to start lower than keycodes. You need to find the scancodes for these keys, and associate keycodes to them. The subsystem that deals with these is udev, and the relevant files are found in /lib/udev/.

Step 1

Check in /var/log/dmesg if the keys F10, F11 and F12 produce any output when you press them. To do so, start the Log File Viewer (gnome-system-log), and notice for any additions to dmesg when you press those keys.

If they produce output, then there are no associated keycodes to the scancodes that the keys emit, therefore the problem you are facing is much low level. You need to assign keycodes to these scancodes. Use setkeycodes to assign the correct scancode.
If they produce no output, then something is wrong in the X Org configuration and possibly with udev. See next step.

Step 2

Run

/lib/udev/findkeyboards

to find the correct device for your keyboard. Sample output is

USB keyboard: input/event6
AT keyboard: input/event5

In this case, our keyboard is input/event5.

Then, run

sudo /lib/udev/keymap -i input/event5

and press the problematic keys. You can exit this program by pressing Esc.

Sample (correct) output for me is

scan code: 0x44   key code: f10
scan code: 0x57   key code: f11
scan code: 0x58   key code: f12

Step 3

If you notice that the keys work in a new user account, then what went wrong are configuration settings in your current account. There are a few ways where you can re-assign keys. For example, check to see whether you accidentally created new shortcuts for F10, F11 and F12 at

  System » Preferences » Keyboard
  Shortcuts

.

Here is a pretty good description intended for multimedia keys but it really helped me a lot. https://help.ubuntu.com/community/MultimediaKeys


Returning the MD5-hash of all files in a directory to a .txt file with file name I have a directory of pictures.

I need the MD5-hash of each file in that directory and the name of the file placed into a .txt document. This file is to be read at a later time to reference the MD5 and file name together.

Note:
I would like this to just pull all directory files with me specifying them.
I have tried playing with tar and find and I just cannot seem to find a good solution...

This is a directory example:

/Desktop/testing
RandomFilename1.png
RandomFilename2.png
RandomFilename3.png

The .txt output is:

RandomFilename1,da39a3ee5e6b4b0d3255bfef95601890afd80709
RandomFilename2,da39a3ee5e6b4b0d3255bfef95601890afd80709
RandomFilename3,da39a3ee5e6b4b0d3255bfef95601890afd80709

I've looked everywhere online with no luck.
This will be on a Linux terminal.

You can use the following bash command:

for file in testing/*; do md5sum $file; done > res.txt

Of course you have to adjust the destination directory of res.txt.
The result could look similar to this:

8b1500ea6fe42927891fd1831bb955ba  testing/Pic1.gif
73f3222889a14411a3b78675ed0bc269  testing/Pic2.gif
c5b18ef1ea1346f13f668a7ead4e4c92  testing/Pic3.gif

So the MD5 hash is followed by the filename and path.

I have written a small script as per the parameters defined:

cd /home/username/Desktop/testing
for F in *
do
    echo "$F", $(md5sum "$F" | sed -e 's/'"$F"'//g')
done

Example output:

1.txt, c8ef7cca2ceb3f878921b1ff163dbf91
demo, e9470a3c74b32036fa148dfabce70929
File with spaces.txt, c691b3d2fc2678839a9c141b6ee1524e
line.cpp, e0732d2781c6b2b57d413f79f9c1fd28
test, 3734699610e8d322767cf65f90ed43ce
test.cpp, afbe5b90cf002e1eb6df4cf98dfe4c0e

Note: This script would show the output in terminal. To save it in file you can use > 1.txt while executing the file, for e.g.:

./test.sh > 1.txt


During a chroot attempt, I got this error: "chroot: failed to run command '/bin/bash': Exec format error" I was following the instructions of this tutorial HOWTO: Purge and Reinstall Grub 2 from the Live CD, when I encountered an error at step 1, as I launched the command

sudo chroot /mnt/temp

The error was the following:

chroot: failed to run command `/bin/bash': Exec format error

Where does that come from? How do I get through?

Verify that you are using the right Live CD. For example, verify you are not using a 32bit CD instead of a 64bit CD. You need a 64bit kernel to run 64bit code, so check your architecture.

Assuming you mounted your system to be chrooted in /media/sda1, to determine the architecture you can:

ls /media/sda1/*

if you see lib64 in the output, it's probably a 64bit system

I think in is a BUG.

`/bin/bash'

but not

'bin/bash'


How can I prevent Android emulator from crashing my laptop? I have tried experimenting with a few variables (starting from within/outside Eclipse, different SDK versions, different screen resolutions) and can't find a consistent reason that the Android emulator is crashing on my laptop running Ubuntu 11.10. When it does, it shuts down my machine.

Is there anything I can do to sandbox the emulator process so that if it does crash, it doesn't take everything else with it?

You can decrease its size and disable some functionality that you won't be needing.


Which init daemon starts cups? I have a fresh installation of Ubuntu 14.04, and have not touched anything.

Cups is running, as reported by both ps and netstat.

There are /etc/init/cups.conf and /etc/init.d/cups, both of them seem to be able to start cups.

I used these ways to determine which init daemon started cups:

service cups status - "unknown job: cups"
initctl status cups - "unknown job: cups"
/etc/init.d/cups status - "cupsd is running"
Runlevel is 2, and there is no cups in /etc/rc2.d

So the question is: which init daemon started cups? The traditional Debian init, or upstart?

If upstart was the one started cups, why initctl status cups cannot report cups status?

CUPS on Ubuntu is started by Upstart via the file /etc/init/cups.conf. The file /etc/init.d/cups is ignored. /etc/init/cups.conf is not an init script, but a configuration for Upstart. It does start the main daemon, and is not only a pre- and post- configuration for CUPS.

The service and initctl utilities report unknown job when the variable UPSTART_SESSION is set in the environment because in that case, the two utilities are acting on the session init and not the system init (cups is started by the system init). su usually preserves the environment, while sudo does not, so sudo initctl status cups will work but su -c "initctl status cups" will not.

Of the two, only one is actually an init script: /etc/init.d/cups. The /etc/init/cups.conf file appears to be a configuration file and runs certain things before/after the daemon is started but it is not itself an init script. It lacks the proper format (start,stop,restart etc. functions) and in any case, is not in the right place. Init scripts are in the init.d directory.

As for who started it, 14.04 is still using upstart, they will be moving to systemd for future releases. So it was upstart that started the cups daemon.

Now, as to why neither service nor initctl returned anything useful, that's because you did not use sudo:

terdon@16:~$ service cups status
status: Unknown job: cups
terdon@16:~$ sudo service cups status
[sudo] password for terdon:
cups start/running, process 1319

terdon@16:~$  initctl status cups
initctl: Unknown job: cups
terdon@16:~$ sudo initctl status cups
cups start/running, process 1319


Why does my resolv.conf file get regenerated every time? My /etc/resolv.conf file gets regenerated every time, making me loose Google DNS servers when I reconnect my 3G modem.

For changing the DNS settings, I looked at http://code.google.com/intl/fr-FR/speed/public-dns/docs/using.html.

My dhclient.conf is pretty big (58 lines), so I posted it on pastebin.

However, here is the entire dhclient.conf without comment lines or blank lines:

option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
send host-name "<hostname>";
request subnet-mask, broadcast-address, time-offset, routers,
    domain-name, domain-name-servers, domain-search, host-name,
    netbios-name-servers, netbios-scope, interface-mtu,
    rfc3442-classless-static-routes, ntp-servers;
prepend domain-name-servers 8.8.8.8, 8.8.4.4;

I am using wvdial instead of Network Manager.

In 12.04, resolvconf is installed by default. Here is a quick summary of how to make DNS configuration changes for some common use cases:

For a static configuration using ifup, use dns-nameservers and dns-search entries in /etc/network/interfaces.

For a static configuration using NetworkManager, select the Automatic (DHCP) addresses only Method and enter addresses and domain names in the Additional DNS servers and Additional search domains fields in the Connection Editor.

To override resolvconf's default configuration, use base, head and tail in /etc/resolvconf/resolv.conf.d/. Only enter addresses and domain names in these files as a temporary measure, since they really belong elsewhere, as described above.

Disabling resolvconf is not recommended, but you can replace the symlink /etc/resolv.conf with a regular file.

For more information, see Stéphane Graber's blog post.

you propably have the packet resolvconf installed. in that case, whenever an interface comes up, the resolv.conf is updated.
you can add static entries using the /etc/resolv.conf.tail file, see the man page for resolv.conf for more.


Use Ubuntu as Active Directory server? (Windows users login-security) We are a very small business (5 people) and all of us use Windows 7 on the desktop.
I'm planning to run an Ubuntu box to share Internet connection and use a proxy.
I'd like also to expand this box to use it as an Active Directory server so users can, when they login on their workstations, get authenticated by the Ubuntu box. Is this possible?

I hope this is doable.

I am just setting up a Ubuntu machine to act as an Active Directory equivalent.

I have read that Samba 4 is designed specifically for this purpose.

It is still in development (alpha version) but it is supposed to be relatively stable.

http://wiki.samba.org/index.php/Samba4/HOWTO

There are also other flavours of linux projects set up specifically to address the active directory need.

https://www.linux.com/learn/tutorials/579308-weekend-project-replace-active-directory-with-resara-server-and-samba4.

What I am expecting is to have my XP and Win 7 machines able to use my Ubuntu server as an active directory equivalent when logging into the "domain".

I think you can connect to a Windows Server running AD using Ubuntu, but not the other way around. Not sure if you can configure an AD server wich is a Microsoft product in an Ubuntu box.

You can read this link to see if it helps you: http://ubuntuforums.org/showthread.php?t=280702


Missing System Tray Icons in the Cinnamon Desktop Environment I am currently using the Cinnamon Desktop Environment in which I have applications which uses the System Tray but when these applications are opened, the icons are not shown in the system tray but notifications from the applications do appear.

Has anyone had this experience and are there any solutions?

I found the answer here:

https://unix.stackexchange.com/a/280807/116985

  It was found that "System tray" applet was disabled in my system.

  Fixed in this way:

  enter app menu type "Applets" and press "Enter" button
  on "Installed Applets" tab search for "System tray" applet
  select it and press "Add to panel" button

  some running applications might need to be restarted in order to appear in the tray


What is the best way of testing Ubuntu on my computer? I'm a little confused as to whether I should install Ubuntu on its own partition on my hard drive, use VirtualBox or another virtualization package to install it, or use Wubi to install it directly on top of my current OS (Win 7). I definitely want to learn and use Ubuntu, so this is not just for playing around with it.

Also, if I choose to partition, should I partition the hard drive myself or should I let the Ubuntu installation menu do it for me? I understand that I am going to need a main partition, for Ubuntu's core components, and also a swap partition. Then there is the option to add a partition for "home"- I don't understand what combination of these partitioning options I should choose, or whether it is better to partition in Windows before I install Ubuntu or just partition my hard drive when I install Ubuntu itself

If you are starting with Linux and you would like to give it a go then VirtualBox is the best option:

Pros:

No modifications to your system;
No harm done if something goes wrong and you mess up Ubuntu completely;
Ability to create snapshots and restore them on the fly, ie: Create a snapshot before issuing a weird command that you are not sure about, if something goes wrong you can restore the snapshot and continue with your life;
Mappings can be done so that the file from your Windows system are shared with Ubuntu without the worry of mounting file systems, its easy pie;
If you find that you do not like Ubuntu and you want to remove it from your system you can simply remove VirtualBox and delete the virtual machine files and your system will be back to were it was, no harm done.
No partitioning mistakes! The disk Ubuntu is going to install to is just a file inside your Windows system, delete the file, Ubuntu is out and you can start over.

Create as much partitions as you like;
Play with mount points as you desire;
When in doubt go back and re-do it as you like
No harm done to your Windows installation

Cons:

Not as a fast as a live installation, still bearable and great to try and use;
Eye candy supplied from accelerated graphics is not present or is not as fast as it could be, depending on the system. It will still look imba, but not the same.

The 2 points that would make it a bad choice to install it in a virtual computer do not overcome the pro points, just the simplicity of it should be the main reason to use Ubuntu in VirtualBox if you are using it for the first time.

Later, when you are confident that you want to use it and you are ready to do a real installation you will have all the steps covered and you will feel confident on what to do.

Other best options are:

Wubi

Ubuntu is installed in a file in a Windows directory (normally c:\ubuntu\root), GRUB will replace your Windows boot manager and will let you choose between booting Windows or the Ubuntu system inside that file;
Its a good option because you are actually booting to Ubuntu directly
It makes partitioning easy since everything is done to the file keeping Ubuntu, not really modifies your hard disk partitions
Its bad because if GRUB for any reason gets messed up you will need to go trough some work to restore it, not hard, but for a newbie nothing is simple.

Windows partition resize

Resize your Windows partition using the Ubuntu LiveCD or the Ubuntu installer and install Ubuntu in to its rightful place!
It allows your to keep Windows and Ubuntu on the same computer, allows you to fully play with partitioning and choose mounting points directly in your hard disk space
Installs GRUB to manage the dual boot between Ubuntu and Windows;
Its bad because it installs GRUB and for the same reasons as a Wubi install, if GRUB gets broken you need to fix it. Also resizing can be dangerous (normally is not), make a backup before you do it. Careful so you don't accidentally overwrite any Windows data!
Can be a problem if you somehow destroy Ubuntu or mess up your Windows system from Ubuntu and then you can't boot anymore.

Other options

LiveCD booting

Just download and burn the Ubuntu CD from the downloads site, boot from it and use it as a LiveCD. It will be slow because it is using the CD as the system but it wont harm your system or require installation. Once you reboot everything that was not saved in to your Windows disk or a removable media will be lost.

Install to a USB drive

Most systems now a days allow you to boot from a USB drive. You can install Ubuntu to a USB drive and use it as a spare. GRUB will be installed to the USB drive, it will be a real system and act like one.

Good thing about this is that you do not modify your Windows install.

Bad thing is you need to select the USB drive each time your need to boot in to Ubuntu, or you need to modify GRUB to recognize Windows and give you the option to boot to it.

This is a good option if you have a spare USB drive around and your system allows you to boot from USB.

For a newbie it is always better to have it installed in a way that what ever happens your previous system is safe and that no big changes are done. For the moment stick with a VirtualBox install and when you are more confident move on to the next step. Better a slow start that a fast and disastrous one.

My recommendation is that you use Wubi to install it alongside windows. It will install Ubuntu in a big file on the Windows partition (no partitioning necessary, only about 32GB space on the windows drive) and you can choose the OS to boot in the Windows bootloader at system startup. Later if you don't like it you can even painlessly uninstall it via Add/Remove programs directly from windows  (which cannot be said for a real install described below).

A VirtualBox install would install it as a virtual machine inside your Windows 7, so it has no benefits over using Wubi other than being able to use Windows in parallel, which you won't need anyway.

Doing a real install alongside windows would be the second choice, but if you are unfamiliar with things like disk partitioning, MBR, bootloaders, primary/logical partitions, etc. then I wouldn't recommend it until you get the feel for linux and familiarize your self with the boot process, bootloaders and partitioning.


emacs + screen not properly handling keys I'm sshing to an ubuntu server:

cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=17.04
DISTRIB_CODENAME=zesty
DISTRIB_DESCRIPTION="Ubuntu 17.04"

I run screen, and then emacs.

$ screen --version
Screen version 4.05.00 (GNU) 10-Dec-16
$ emacs --version
GNU Emacs 25.1.1

My screen has the following configuration:

#defflow on # will force screen to process ^S/^Q
deflogin on
#autodetach off

# turn visual bell on
vbell on
vbell_msg "   Wuff  ----  Wuff!!  "

# define a bigger scrollback, default is 100 lines
defscrollback 1024

# Remove some stupid / dangerous key bindings
bind ^k
#bind L
bind ^\
# Make them better
bind \\ quit
bind K kill
bind I login on
bind O login off
bind } history

# An example of a "screen scraper" which will launch urlview on the current
# screen window
#
#bind ^B eval "hardcopy_append off" "hardcopy -h $HOME/.screen-urlview" "screen urlview $HOME/.screen-urlview"

# The vt100 description does not mention "dl". *sigh*
termcapinfo vt100 dl=5\E[M

# turn sending of screen messages to hardstatus off
hardstatus off
# Set the hardstatus prop on gui terms to set the titlebar/icon title
termcapinfo xterm*|rxvt*|kterm*|Eterm* hs:ts=\E]0;:fs=\007:ds=\E]0;\007
# use this for the hard status string
hardstatus string "%h%? users: %u%?"

# set these terminals up to be 'optimal' instead of vt100
termcapinfo xterm*|linux*|rxvt*|Eterm* OP

# Change the xterm initialization string from is2=\E[!p\E[?3;4l\E[4l\E>
# (This fixes the "Aborted because of window size change" konsole symptoms found
#  in bug #134198)
termcapinfo xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'

# Enable non-blocking mode to better cope with flaky ssh connections.
defnonblock 5

When I run emacs -nw outside screen, I can use Shift+arrow keys to select text. But inside screen, when I hit Shift+down, I see: M-[ 1 ; 2 b is undefined. Even with Ctrl+space, which does say Mark activated, I can't use Ctrl+n to select a region. These all work fine outside screen.

I have these related environment variables inside the screen:

TERMCAP=SC|screen.xterm-256color|VT 100/ANSI X3.64 virtual terminal:\
        :DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:bs:bt=\E[Z:\
        :cd=\E[J:ce=\E[K:cl=\E[H\E[J:cm=\E[%i%d;%dH:ct=\E[3g:\
        :do=^J:nd=\E[C:pt:rc=\E8:rs=\Ec:sc=\E7:st=\EH:up=\EM:\
        :le=^H:bl=^G:cr=^M:it#8:ho=\E[H:nw=\EE:ta=^I:is=\E)0:\
        :li#52:co#211:am:xn:xv:LP:sr=\EM:al=\E[L:AL=\E[%dL:\
        :cs=\E[%i%d;%dr:dl=\E[M:DL=\E[%dM:dc=\E[P:DC=\E[%dP:\
        :im=\E[4h:ei=\E[4l:mi:IC=\E[%d@:ks=\E[?1h\E=:\
        :ke=\E[?1l\E>:vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l:\
        :ti=\E[?1049h:te=\E[?1049l:us=\E[4m:ue=\E[24m:so=\E[3m:\
        :se=\E[23m:mb=\E[5m:md=\E[1m:mh=\E[2m:mr=\E[7m:\
        :me=\E[m:ms:\
        :Co#8:pa#64:AF=\E[3%dm:AB=\E[4%dm:op=\E[39;49m:AX:\
        :vb=\Eg:G0:as=\E(0:ae=\E(B:\
        :ac=\140\140aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~..--++,,hhII00:\
        :po=\E[5i:pf=\E[4i:Km=\E[M:k0=\E[10~:k1=\EOP:k2=\EOQ:\
        :k3=\EOR:k4=\EOS:k5=\E[15~:k6=\E[17~:k7=\E[18~:\
        :k8=\E[19~:k9=\E[20~:k;=\E[21~:F1=\E[23~:F2=\E[24~:\
        :F3=\E[1;2P:F4=\E[1;2Q:F5=\E[1;2R:F6=\E[1;2S:\
        :F7=\E[15;2~:F8=\E[17;2~:F9=\E[18;2~:FA=\E[19;2~:\
        :FB=\E[20;2~:FC=\E[21;2~:FD=\E[23;2~:FE=\E[24;2~:kb=:\
        :K2=\EOE:kB=\E[Z:kF=\E[1;2B:kR=\E[1;2A:*4=\E[3;2~:\
        :*7=\E[1;2F:#2=\E[1;2H:#3=\E[2;2~:#4=\E[1;2D:%c=\E[6;2~:\
        :%e=\E[5;2~:%i=\E[1;2C:kh=\E[1~:@1=\E[1~:kH=\E[4~:\
        :@7=\E[4~:kN=\E[6~:kP=\E[5~:kI=\E[2~:kD=\E[3~:ku=\EOA:\
        :kd=\EOB:kr=\EOC:kl=\EOD:km:
TERM=screen.xterm-256color

Also, inside the *scratch*, when I hit Ctrl+q arrow-key, I see: ^@, independent of which arrow key I press.

Any idea how to diagnose/fix the problem?

Read man emacs25:

          -nw, --no-window-system
                  Tell Emacs not to create a graphical frame.  If you  use
                  this switch when invoking Emacs from an xterm(1) window,
                  display is done in that window.

And, in screen start emacs with emacs --no-window-system


can't locate software after installing I installed gnome-mplayer using synaptic but now I can't find it to run it. Going to
Menu and searching just lists rythmbox. Ubuntu software wouldn't let me install mplayer
which is why I needed to install synaptic first.
Any suggestions,
Thanks,Bob

Write in a terminal gnome-mplayer to launch it, if it is correctly installed.


How can I stop being prompted to unlock the 'default' keyring on boot? Whenever Ubuntu boots up, a dialogue pops up asking me to unlock my default keyring.
Is there some way this can unlock automatically through PAM or some other magical way?

Be warned that this will make your keyring accessible without a password. Period. You don't have to be logged in to view it

With that being said,

I think the simplest way is to set the password for the keyring to an empty password -- you will not be prompted for a password then:

Open Applications -> Accessories -> Password and Encryption Keys
Right-click on the "login" keyring
Select "Change password"
Enter your old password and leave the new password blank
Press ok, read the security warning, think about it and if you still want to get rid of this dialog, choose "use unsafe storage".

Again, as the message says: This will expose all your passwords (e.g. email passwords) that you chose to save in the default keyring to anyone using your computer or having access to your files and is therefore not recommended.

Addendum for Ubuntu 11.04:

In the default Unity session, you can start the application by clicking on the Ubuntu logo in the top left corner, then typing Password, and selecting Password and Encryption Keys from the search result.
In the classic session the path to start the application has changed to System → Preferences → Password and Encryption Keys

Addendum for Ubuntu 11.10:

In the default Unity session, you can start the application by clicking on the Ubuntu launcher (the first item) in the Unity launcher bar on the left side, then typing Password, and selecting Password and Encryption Keys from the search result.
In the classic session (from the gnome-session-fallback package) the path to start the application has again changed to Applications → Other → Password and Encryption Keys

open passwords and keys then

Then you need to enter your current password (old password). Don't enter any password for your new one, or leave it blank.

You need to confirm that you will store unencrypted password. If you are sure that it is what you want, then just click "Use Unsafe Storage" button.


Configure proxy for APT? I need to configure proxy. There wasn't apt.conf file in etc/apt/ so I've created it using nano.

But I don't understand what I need to write there. I've written
http_proxy = http://lgn:pwd@192.168.1.254:8080/ there and then restarted networking. But when I try to apt-get update - it doesn't work.

Actually I don't understand what port and ip I should write in apt.conf file(there was example with 192.168.1.254 ip and 8080 port so I decided to use them).

To use a proxy, you need a proxy server. The IP and port have to be from this proxy server. Login and pwd must be your user and password on the proxy server (if the proxy requires login).

From help.ubuntu.com site:

  APT configuration file method

  This method uses the apt.conf file which is found in your /etc/apt/ directory. This method is useful if you only want apt-get (and not other applications) to use a http-proxy permanently.

  On some installations there will be no apt-conf file set up. Edit apt-conf file (or create a new one if you have no one yet) using the editor of your choice.

sudo nano /etc/apt/apt.conf

  Add this line to your /etc/apt/apt.conf file (substitute your details for yourproxyaddress and proxyport).

Acquire::http::Proxy "http://yourproxyaddress:proxyport";

  Save the apt.conf file.

If your proxy needs a login/password, substitute:

"http://yourproxyaddress:proxyport";

with:

"http://username:password@yourproxyaddress:proxyport";

using username and password from the proxy server.

The original question might be in wrong direction. I believe you want to setup a proxy server in Linux ?

Well that is completely different than wanting to use a existing proxy from Linux environment.

If your question is the first one then use any third party services to configure a proxy server in Linux. An example could be squid.

Simple commands to install squid:

$ sudo apt-get install squid3

Then edit the configuration to allow the Local Net (in this case your own machine).
    $ sudo vi /etc/squid3/squid.conf

Add/Edit the following lines:

http_access allow local_net
acl local_net src 192.168.1.0/255.255.255.0

Assuming your IP for the Linux machine is in 192.168.1/24 block.


ttyUSB not recognized in ubuntu server I have a very basic question here I believe. When installed ubuntu (Ubuntu 14.04.1 LTS) and I type the command dmesg | grep tty, it gives me the following output:

renato@ubuntu:~$ dmesg | grep tty
[ 0.000000] console [tty0] enabled
[ 0.515141] 00:0b: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[ 0.709774] tty tty2: hash matches
[ 5286.474897] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB0
[ 5286.474959] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB1
[ 5286.475016] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB2

As you can see my 3G modem is usually recognized. But if I install ubuntu server (the one with no graphical interface), the modem is not recognized.

Obviously there is some software that exists on the desktop version that does not exist in the version for servers, which prevents my modem to be recognized.

Can someone tell me what program I  can install on Ubuntu Server for it to recognize the ttyUSB?

Please just install usb-modeswitch package.

sudo apt-get install usb-modeswitch

After that your modem device will be recognized as ttyUSB.

The only way to solve this is to install the package

sudo apt-get install ubuntu-desktop

will consume a lot of RAM, but for this case it is necessary.


How can I make the mouse cursor hide itself when typing? It gets in the way. I'd like to have it disappear when I start typing, then reappear if I move it. I've heard of unclutter but it sounds like it hides the cursor after it's been "idle" for a while, which isn't what I want--I only want to hide when I'm typing. How could I do this?

You can use xbanish, it does the job.
Install it and run it simply like that:

xbanish

There is a setting I found in dash home when u search mouse.  Click mouse and touch pad, and the is an option that is: disable touch pad when typing.

Hope this helps


Is there an FTP client (GUI) that will let me search for text inside files? I've inherited a huge joomla website (hundreds of nested folders and thousands of files.) I need to be able to find a specific piece of code, but have no idea which file it's in. Is there a GUI FTP client that has an integrated grep-type function?

You can use nautilus to connect to the server.
Goto Places → Connect to server → ftp

After connecting to it,you can see it in your nautilus.
You can search it like any other filesystem you can access.

I think the question was sort of missed. It boils down to this. FTP only transfers files. If all you have is FTP access you will need to download all the files and search them with your favorite search tool.


Convert pdf to monochrome black-and-white via command line I have a 65-page PDF file that has text in a dark grey. (Actual text, not a picture/image of text.) Printing on my B/W printer, the text gets all blurry, because the printer is trying to make it less than black. I can solve this problem page-per-page by importing the pages to inkscape, selecting all paths, clicking on "Black", which converts all colours including the greytones to pure black, and exporting back to PDF.

Is there a way to do these steps in inkscape in the command line (for batch processing)?

Is there a way to achieve the same result (convert pdf to black and white, 1-bit greyscale) without inkscape?

Edit. There are similar questions on Unix.SE and on superuser, which use Ghostscript. However, these only convert the files to greyscale via the option  -sColorConversionStrategy=Gray. The option -sColorConversionStrategy=/Mono results in the error Unrecoverable error: rangecheck in .putdeviceprops. Since my file is greyscale already, these don't solve my problem.

Adapting this answer over on SuperUser, this can be achieved by converting the PDF to PostScript and back using a redefined setrgbcolor command:

gs -o <output-file.pdf> -sDEVICE=pdfwrite \
-c "/osetrgbcolor {/setrgbcolor} bind def /setrgbcolor {pop [0 0 0] osetrgbcolor} def" \
-f <input-file.ps>

convert -colorspace GRAY color.pdf gray.pdf


Creating a boot disc and Installing ubuntu ASUS X205T(A) I am having problems with creating a boot disc and installing ubuntu on an ASUS X205T I just bought.

I have successfully (I believe) created a few boot discs with 2 different programs and checked to make sure the burn process resulted in a boot disc with multiple files instead of one .iso.
I have turned off the "secure boot control" and assigned my disc drive as the #1 "boot option priority."
I have tried disabling the "windows boot manager" as the #2 priority and only have the external drive as a boot priority. It begins to read the disc and then brings me right back to the BIOS. If I enable the "windows boot manager" as the #2 priority it reads the disc and then carries on to windows OS.
I have also tried booting from the external by using the windows GUI and selecting the specific drive as well as the other removable and DVD/CD options.

I have been running Ubuntu 14.10 in a dual-boot configuration on my Asus EeeX205T for a couple of months now. Some things do not yet work -- internal wifi/bluetooth, sound, power management -- but with a usb wifi adapter, enough works, and works well enough, that I have used it as a travel machine -- a role in which it excels.

UPDATE: I am now running Ubuntu 15.04 on this machine, still dual-boot (though I haven't booted into Windows in months). With 4.0 or later kernels, internal wifi now works and power management works in part (battery monitoring), but suspend, sound, and bluetooth still do not work. With the 4.1 kernels, there are some occasional problems with freezing. Instructions for installing 15.04 should be essentially the same as below, but I have not tried installing it from scratch, and cannot verify that all of the steps are the same (or even necessary). Additional steps needed to enable internal wifi and other needed settings are included below.

Here is how I set it up to dual-boot Ubuntu 14.10. Note that much of the same process could be followed to set it up for an Ubuntu-only installation. Note also that you do have to boot into Windows a time or two:

PRE-INSTALLATION

In Windows, turn off BitLocker (this will allow Ubuntu to mount and/or resize the primary data drive):

In Windows, click on PC Settings/PC and devices/PC info
scroll to the bottom of the screen and click to turn off BitLocker/decrypt drive

Prepare Ubuntu Live bootable USB memory stick:

Download .iso file for 64-bit Ubuntu 14.10
Create a bootable memory stick:

In Windows, download and run Rufus
In Linux, sudo apt-get install unetbootin; run unetbootin in a terminal window

After the memory stick is set up, copy bootia32.efi to the /EFI/BOOT directory on the memory stick

Fetch bootia32.efi from github (?) or from one of the links listed at the end of this post.
Alternately, instructions for generating this file can be found here on github -- look for JF Well's site on the t100.

Boot Ubuntu Live:

Insert memory stick in Asus EEE USB port
In Windows, hold Shift key and click on Restart; choose Advanced Options/UEFI Firmware to enter BIOS
Turn off SecureBoot
Select USB stick as boot device
Save and exit
When grub menu loads, select Try Ubuntu

Optional but highly recommended: Make a backup of the complete SSHD image

Plug in a USB external hard disk with at least 32GB of free space
Right-click on the OS and Recovery icons in the Unity launcher and choose Unmount for each
Open a terminal and run the following: dd if=/dev/mmcblk0 of=/media/ubuntu/HD/FILENAME bs=1M

(Replace HD with the name by which the external drive was mounted; replace FILENAME with the filename you wish to use for the resulting image (or set another path as desired).)
It will take about 20 minutes for the command to complete; do NOT interrupt it, or you will have to start over!
Note: to restore the X205T to its original state, you can run this command “in reverse”: dd if=/media/ubuntu/HD/FILENAME of=/dev/mmcblk0 bs=1M -- and yes, I have done this to verify that it works!

Optional: Resize Recovery partition (note that the Recovery partition is required for booting Windows on this machine, so it cannot be removed if you want dual-boot, but it can be reduced in size to allow some additional room):

Right-click on the OS and Recovery icons in the Unity launcher and make sure each is unmounted (choose Unmount for each if needed)
Open a terminal and run gparted

Note: this runs very slowly at this point; be patient!
Use gparted to shrink the Recovery partition as small as it will go (a little less than 6 GB)
use gparted to expand the OS partition to take up the extra room
commit the changes (again, be patient ...)

INSTALLATION (from Ubuntu Live)

Set up a wireless connection (to download updates during installation):

Insert a USB based wifi adapter (Ubuntu does not yet recognize the internal wifi)
Choose a wireless connection and connect

Double-click on Install Ubuntu

Select language; continue
Click to install additional drivers and restricted software; continue
Choose Install Ubuntu alongside Windows; continue

Alternately, you can choose to replace Windows completely at this point

Set relative sizes of Ubuntu/Windows partitions as desired (I set mine up with 8 GB for Windows and 13 GB for Ubuntu); continue
Allow the installation to complete, but do not (yet) allow it to reboot. Before rebooting, open a terminal and enter the following commands:

sudo -s // sets up a root shell
mount /dev/mmcblk0p5 /mnt // make sure that this is the partition to which Ubuntu was installed
mount /dev/mmcblk0p1 /mnt/boot/efi // make sure this is the EFI partition
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done // transfer key elements of the current Ubuntu Live file system to the newly mounted Ubuntu partition on /mnt
mount -o bind /etc/resolv.conf /mnt/etc/resolv.conf // likewise make the current resolv.conf available via the mounted Ubuntu partition on /mnt
chroot /mnt /bin/bash // set up /mnt as the new root and run bash
apt-get remove grub-efi-amd64 // remove the 64-bit grub …
apt-get install grub-efi-ia32 // ... and install the 32-bit grub. (Note: Since 14.01 is discontinued, you may need to edit /etc/apt/sources.list and add http://old-releases.ubuntu.com/ubuntu/)

Reboot; the machine should boot to the grub menu, allowing a choice between Ubuntu and Windows. If so, congratulations – you have succeeded! If not, and if you made the recommended backup, see the note above for how to restore to the original state. If you did not make the backup … you may have a brick on your hands.

FINALIZE INSTALLATION

Clean up Windows:

Reboot to grub menu and choose Windows
Allow Windows to check and “repair” drive C: (basically Windows is responding to the fact that the drive has been re-sized)
When finished checking, it will automatically reboot; choose Windows again to verify that the Windows installation is still functioning properly.

Set up SDHC card reader:

Reboot to grub menu and choose Ubuntu
Open a terminal; run sudo -H gedit /etc/modprobe.d/sdhci.conf

note: this file may not yet exist; if not, create it
Add the following line: options sdhci debug_quirks=0x8000
Save and exit
In terminal, run sudo update-initramfs -u -k all

Reboot; SDHC card reader should now work

NEW: INSTALL LATEST KERNEL AND ENABLE WIFI/POWER MANAGEMENT/TWEAKS

Download and install the latest kernel (4.0 stable, or 4.1RC6 unstable as of this writing):

In Ubuntu, use browser to navigate to http://kernel.ubuntu.com/~kernel-ppa/mainline/
Scroll to the bottom of the list; choose the latest kernel (or an earlier one if desired, especially if there are any bugs in the latest RC version)
Download the following files (###### will be replaced with numbers indicating the kernel version):

linux-headers-######-generic-######_amd64.deb
linux-headers-######_all.deb
linux-image-######-generic-######_amd64.deb

Install these files by opening a terminal, changing to the download directory, and running sudo dpkg -i linux*.deb (doing it this way assumes no other linux*.deb files are in the download directory)
Note that if a kernel is not working properly or is no longer needed, it can be removed (each one takes up 200+ MB, so worth removing those not needed!):

get a list of the kernels installed: sudo dpkg -l | grep linux-image-
remove an image by running sudo apt-get autoremove linux-image-#####-generic (substitute the appropriate version numbers for #####)
obsolete packages can also be listed (sudo dpkg -l | grep linux-) and removed (sudo dpkg -P linux-######)

Reboot; note that you can use the GRUB menu to select an earlier kernel to run if needed

Set up wifi (if latest kernel does not automatically do so; requires 4.0 kernel or later):

Download brcmfmac43340-sdio.bin and brcmfmac43340-sdio.txt from internet (one source is on page 3 of third “helpful reference” below); copy these to /lib/firmware/brcm (requires sudo)
sudo -H gedit /etc/rc.local and add the following lines:

#rmmod brcmfmac
#rmmod brmutil
echo on > /sys/bus/platform/drivers/sdhci-acpi/INT33BB\:00/power/control
modprobe brcmfmac

sudo -H gedit /etc/modeprobe.d/blacklist-custom.conf (possibly creating the file) and add the following lines:

blacklist brcmfmac
blacklist brcmutil

Note: instead of blacklisting, you can un-comment (remove the #) from the first two lines added to rc.local above
Reboot; internal wifi should now be working

Fix mmcblk0rpmb boot errors (if latest kernel does not automatically do so):

See the fourth “helpful reference” above for changes needed to the /lib/udev/60-persistent-storage.rules file.

Alternately, scroll down the thread to find a post with the updated file; download it and save it in place of the original /lib/udev/60-persistent-storage.rules (backing the original up first is highly recommended!)
can also just save the updated file to /etc/udev/60-persistent-storage.rules (this should override the  /lib/udev file)

Rebuild the initramfs: sudo update-initramfs -u
Optional: Add rm -f /dev/mmcblk0rpmb to /etc/rc.local (may help prevent system freezes)
Reboot; you should no longer see the mmcblk0rpmb boot errors. (This may also prevent other lags in the system)

Fix problems caused by attempts to suspend (if latest kernel does not fix the suspense problem):

Goto System Settings/Power and choose “Do not suspend” for “Suspend when inactive for” (do this for both battery and AC)
sudo -H gedit /etc/systemd/logind.conf and add HandleLidSwitch=ignore
Reboot

At this point, you should have a mostly working dual-boot machine. What doesn’t work yet (hopefully a new kernel down the road will fix these issues):
    * Bluetooth (it sort-of sees the bluetooth, but not completely)
    * Sound (volume control appears to work, but it is a “dummy” sound system)
    * ACPI (power-saving, suspend)

What does work at this point (mostly):
    * Internal wifi (if kernel > 4.0 and steps above are followed)
    * USB ports
    * SDHC card reader (if you do the tweak above)
    * Screen brightness (from System settings, but not from the keyboard)
    * Screen turn-off after specified time; lock when screen turns off - but note that sometimes if the system has locked after screen turn off, it will not return to the log-in screen when a key is pressed. In this case, it is possible to call up a terminal screen (Ctrl-Alt-F1), log in, and re-start the X server (sudo restart lightdm), but any open programs will be closed and any unsaved data may be lost.
    * Built-in camera

NEW: OTHER OPTIONAL SETUP

Set up micro-SD card as /home:

Insert a micro-SD card and format it to ext4

One way to do this is to install gparted (sudo apt-get install gparted); note that you will need a working wifi (see above)!
Note that you can also partition the micro-SD card and install one partition as /home, and another partition as something else

Copy all of the contents of /home to the SD card (or desired partition)
Determine the UUID of the SD card or the desired partition (sudo blkid)
*sudo -H gedit /etc/fstab and add the following line: UUID=XXXX /home ext4 defaults 0 2 (replace XXXX with the UUID noted above)
Reboot

Make the Recovery partition non-mountable:

sudo blkid to determine the UUID of the Recovery partition
sudo mkdir /mnt/Recovery
sudo -H gedit /etc/fstab and add the following line: UUID=XXXX /mnt/Recovery ntfs noauto,umask=222 0 2 (replace XXXX with the UUID determined above)
Reboot

Continue setup of Ubuntu as desired!

HELPFUL REFERENCES

http://www.jfwhome.com/2014/03/07/perfect-ubuntu-or-other-linux-on-the-asus-transformer-book-t100/
http://www.linuxforen.de/forums/showthread.php?276316-bootbaren-USB-Stick-f%FCr-32bit-UEFI-erstellen&p=1820224&viewfull=1#post1820224
http://ubuntuforums.org/showthread.php?t=2254322&page=4
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1333140

The short answer is, you can't do it. Your laptop isn't the only one. I recall reading the reason is an incompatibility with the linux kernel and the combination of a 64bit processor but a 32bit uefi like these laptops have. it's the baytrail processor and its stupid frankenstein of a uefi that's the problem. from memory the only way of getting linux to boot on one of these is to use a 64bit distro with a 32bit boot loader. so, long story short, you're stuck with windoze, which is about the only os that will boot.

the asus x205t isn't the only linux-incompatible computer out there. I had exactly the same incompatibly problems with a dell latitude 10 essentials and an asus transformer book t100, both of which also use baytrail cpus. it's unlikely ubuntu will ever install on these computers, at least not easily.


What gui internet speed testing applications are available? I want a GUI internet speed testing application (a webapp will suffice if it is not flash) .

Long time ago I used TPTest for the job.

I've used this web app often (they have a nice Android app too)


Software Installation Not Working (apt-get) I'm new to Ubuntu and I'd like to ask a quick question...
I've tried many methods and my problem hasn't been solved since. I have tried to install wine ever since I stated up Ubuntu 12.04 LTS by entering into the terminal sudo apt-get install wine1.4 (and just so you don't ask, yes i did type in sudo apt-get update before installing.) I got an error message that read something along he line of /var/dpkg/ diectory cannot be unlocked being the n00b I am, I decided to remove that directory. Now, every time I attempt to install something, an error reads Unable to lock directory /var/cache/apt/archives/ can some please help me!? I don't know what to do!

That usually means there is another package installation in progress.

Have you tried rebooting ? That helps many problems. I mean that if it really is in use, rebooting might help, because it will terminate all processes and start  fresh.


Swap partition not used on fresh Ubuntu 14.04 My system is freezing when the memory used is maxed out and I was wondering why. Turns out the swap is not being used. Here's my partition table:

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63       80324       40131   de  Dell Utility
/dev/sda4           81918   909195263   454556673    5  Extended
/dev/sda5       512121690   909195263   198536787   83  Linux
/dev/sda6           81920     3987455     1952768   83  Linux
/dev/sda7         3989504   140705791    68358144   83  Linux
/dev/sda8       492589056   512120831     9765888   82  Linux swap / Solaris
/dev/sda9       140707840   492584959   175938560   83  Linux

The swap partition is not turned on and doesn't show in df but it does in the disks utility:

Filesystem             Size  Used Avail Use% Mounted on
udev                   1.9G  4.0K  1.9G   1% /dev
tmpfs                  392M  1.3M  391M   1% /run
/dev/sda7               65G   19G   43G  31% /
none                   4.0K     0  4.0K   0% /sys/fs/cgroup
none                   5.0M     0  5.0M   0% /run/lock
none                   2.0G   26M  1.9G   2% /run/shm
none                   100M   48K  100M   1% /run/user
/dev/sda6              1.9G   89M  1.7G   6% /boot
/dev/sda9              166G   47G  111G  30% /home
/home/my-user-name/.Private  166G   47G  111G  30% /home/my-user-name

$ sudo swapon -s
Filename                Type        Size    Used    Priority

As you can notice my Home partition is encrypted but I have not encrypted the swap.

Swap seems declared in /etc/fstab:

# swap was on /dev/sda8 during installation
#UUID=df55bf68-b824-4f21-83f3-dfa80a0b74ab none            swap    sw              0       0
/dev/mapper/cryptswap1 none swap sw 0 0

I'd like to know why it's not working and how can I fix it?

Update
It seems there's a reported bug on this for several releases and has not been fixed for 14.04 yet.

Here's the result of cat /etc/crypttab:

cryptswap1 UUID=df55bf68-b824-4f21-83f3-dfa80a0b74ab /dev/urandom swap,cipher=aes-cbc-essiv:sha256

And what was suggested by A.B.:

$ sudo /etc/init.d/cryptdisks reload
 * Stopping remaining crypto disks...                                                                    [ OK ]
 * cryptswap1 (stopped)...
 * Starting remaining crypto disks...
 * cryptswap1 (skipped, device /dev/disk/by-uuid/df55bf68-b824-4f21-83f3-dfa80a0b74ab does not exist)... [fail]
                                                                                [ OK ]
$ sudo swapon -a
swapon: /dev/mapper/cryptswap1: stat failed: No such file or directory

Based on David Foerster's answer I did cat /dev/disk/by-uuid/ and got 6 uuid's. Did blkid -U of each and non is /dev/sda8 which the swap is supposed to be. I got sda's 1, 5, 6, 7, 9, and /dev/mapper/luks-****. The last of which I think is the other encrypted partition that I left untouched during installation (was encrypted by 12.04).

I also tried the following answer. Did not work either.

Update:
I ended up reformatting the partitions and re-installing the system. It seems working fine now.

cryptswap1 (skipped, device /dev/disk/by-uuid/df55bf68-b824-4f21-83f3-dfa80a0b74ab does not exist)

Whatever volume had UUID=df55bf68-b824-4f21-83f3-dfa80a0b74ab, when that /etc/crypttab entry was generated, doesn't exist any longer.

How to fix it

Run sudo swapoff -a just to make sure that all swap spaces are released. The output of swapon -s should now be empty (apart from a column header line).
Remove (or comment out) the lines about swap in /etc/fstab and /etc/crypttab. Make back-ups, if you're unsure.
You say you want to place swap on /dev/sda8. Ignore it's current content for the remainder of these instructions; treat is a garbage data. You will lose all data on sda8 in the process! Make a backup, if you value it!
Set up a new swap space on /dev/sda8, either unencrypted or encrypted.

My previous advice (please use the above one instead)

Since raw devices (or raw dm-crypt devices) don't have UUIDs, you'll need to resort to other device identifiers. Kernel names (/dev/sd* and friends) aren't stable across boots, so your best bet is to find the entry inside /dev/disk/by-id/, that links to your intended encrypted swap partition. Those are stable enough in my experience (barring changes in the kernel or udev scripts).

Assuming that /dev/sda8 is the intended place for the encrypted swap partition, you can find it's ID-based path(s) in the output of

ls -l /dev/disk/by-id/* | grep sda8

or more elaborately with:

find -L /dev/disk/by-id -samefile /dev/sda8

You can use one of the results for the second column of the crypttab entry.

I think you have an error in your /etc/fstab file. You swap does not have mount point.

Change the line

/dev/mapper/cryptswap1 none swap sw 0 0

to

/dev/mapper/cryptswap1 swap swap defaults 0 0