complete is a bash builtin function. So there is not a binary on the system. It handles how commands will be completed when pressing tab.

Example: if you type:

user@host:~$ pidof <tab><tab>

...a list is appearing with all possible values for this command. In this case it means all running processes. See the output of the complete function:

user@host:~$ complete | grep pidof
complete -F _pgrep pidof

This means that the function _pgrep (-F) is executed when tabbing the command pidof. The definition of this function is in /etc/bash_completion.d/procps.

Another example: if you type:

user@host:~$ cd /usr/<tab><tab>
bin/     games/   include/ lib/     lib32/   local/   sbin/    share/   src/

...you see the list of folders you can cd to under /usr/. Which function is executed? greping the complete function (as above) tells us it's the funtction _cd in /etc/bash_completion.

Do it yourself: You have a program/script called /bin/myprog and you want that if you execute it as follows

user@host:~$ myprog /home/user/<tab><tab>

...it should only list folders, not files. So extend your bash completion with the following command:

user@host:~$ complete -F _cd myprog

That's it. You can also write own functions to complete custom things, for example complete only specific files or numbers or lists of static values...


Problem with running application supported with microsoft .net framework 4.0.30319

Well, you need to install the .NET Framework then in Wine. More information on that can be found here: https://appdb.winehq.org/objectManager.php?sClass=version&iId=17886


It's weird, but after install (or reboot the server) you need to start with https://<yourIP>:3000 instead of http://<yourIP>:3000. After that, try http://<yourIP>:3000 and it will work.


Software to validate PDF/X-1a:2001 or PDF/X-3:2002 compliant files

The industry standard is Adobe Acrobat Pro, with its Preflight tools. They allow to verify compliance, and they also allow to create compliant files (which is more important).
FWIW, PDF/X3 is IMHO obsolete. Either stay with PDF/X1-a or go directly to PDF/X4 or newer.


I think you will have to ask your VPS provider to enable TUN/TAP.
If they won't enable TUN/TAP you can't use openvpn.


xdotool, open and close Unity Dash on startup

dbus actually has a method for closing the Dash menu. Using qdbus your script could be changed as follows:

#!/bin/bash
DISPLAY=:0
sleep 10
xdotool key Alt+F2
sleep 0.25
qdbus com.canonical.Unity /com/canonical/Unity/Dash \
      com.canonical.Unity.Dash.HideDash
exit 0

Note that in addition i've increased sleep time to 10 seconds, because Unity may take time to start up. Thus if Unity haven't started yet, that will make the script run commands, but those commands would have no effect.


The name of the file ends with .deb so the less command thinks that the file is a Debian package and tries to provide an unpacked view of the package. However, the data you are providing is just plain ASCII output from strace and not a Debian package so the less command can't unpack it.

If you use another filename without the .deb suffix it will work OK.


I'm having the same issue with no resolution. The R9 290 shows up in lspci as:

02:00.1 Audio device: Advanced Micro Devices [AMD] nee ATI Device aac8

Downloading this driver from AMD worked for me.


Unable to remove TeXLive 2016 from Ubuntu 14.04

You should remove PPA in correct way by using ppa-purge command. It will downgrade packages to the versions from official repository and only after this will remove corresponding file from /etc/apt/sources.list.d/.

The commands you need to run are below:

#sudo add-apt-repository ppa:jonathonf/texlive # add you PPA again if removed
sudo apt-get install ppa-purge # install ppa-purge
sudo ppa-purge ppa:jonathonf/texlive # downgrade packages

Then install TeXLive 2018 with:

cd ~/Downloads/install-tl-20180527
sudo ./install-tl


Good and easy way to share files on local machine

Access control lists

The straight answer is access control lists (ACLs). Yeah, you can find a counterexample, but they're good enough in practice (unlike mere group writability which requires that users think about it all the time). What they do require is that the system administrator (root) define the groups, if you want files to be shared only by a named group (root can choose to delegate, for example by accepting groups from LDAP, but that's another story).

You do need participating users to have a umask of 022. If they create non-world-readable files routinely, this scheme won't work. But if they have a restrictive umask, it's presumably because they don't want to share files anyway.

Enabling ACLs

Ubuntu doesn't enable ACLs by default, so there's a one-time admin requirement. Edit /etc/fstab using your favorite editor, and change every line corresponding to a filesystem where you want to share files: add acl to the options. (Make sure not to change any other line, and not to use an editor that wraps long lines.) Here's an example line with the acl option added:

UUID=5e1ec7ed-face-dead-beef-c011ec7ab1e5  /  ext4  errors=remount-ro,acl  0 1

For the option to take effect the first time, use a command like the following (for each filesystem):

sudo mount -o remount,acl /

Install the ACL tools from the acl package.

Setting up the shared directory

To have files shared by the group mygroup:

setfacl -m group:mygroup:rwx /path/to/shared/root
setfacl -d -m group:mygroup:rwx /path/to/shared/root

If people create files and copy them to the shared directory, the files will be world-readable (because of the umask) and anyone in the group can add and remove files (because the group is group-writable). People can't edit each others' files, but that's a good thing or you'd run into editing conflicts straight away.

If you don't have a unix group, you can add users one by one:

setfacl -m user:bob:rwx /path/to/shared/root
setfacl -d -m user:bob:rwx /path/to/shared/root

Version control

If you do want people to be able to edit files in place, you also need something to prevent editing conflicts. That's version control.

You don't need any of this to share a git repository. You know there are solutions like gitosis, so use them.


Setting up a server for student developers

First of all, you should use key-based authentication for ssh, not password based.  They need to learn how to do proper security from the start...

OpenSSH has the option to chroot users into their home directory, that should keep the students inside their own $HOME.  Alternatively, you can use permissions / umask to restrict access to other student's $HOME.

More might/will be needed depending on what sort of development they need to do...


Cannot get Linksys AE1200 to work with Ubuntu 14.04

In the dash, look for 'wireless' and select Windows Wireless Drivers. Use it to navigate to the location of the zip file you extracted; as an example, Downloads > xp > bcmwlhigh5.inf. Then click 'Install New Driver.'

If you get stuck, post back and I will edit my answer to assist you further.


Can I transfer files alo copy paste in Remmina (or another RDP client) on 13.04 while connected to a Windows 7?

You can do it with FreeRDP (freerdp-x11 package) via terminal:

xfreerdp +drives /u:username /v:server_address:server_port

+drives tells FreeRDP to connect all your local drives.

If you dont have it you can install it:

sudo apt-get install freerdp-x11


Can't Mount CIFS Share in Ubuntu 17.04 32bit Server

For anyone wondering, in my .smbcredentials file, I needed to have the domain=<domain_name> key as a separate key. Not sure why this is different in 17.04, maybe I'm missing something obvious?  Regardless, it works.


PuTTY really is the de facto cross-platform telnet/SSH application. I am having trouble identifying exactly what you're looking for, but of the following criteria:

Free
Supports Windows and Linux
GUI (bookmarking and drag and drop)

PuTTY, as far as I am aware, is the only piece of software that satisfies all constraints. WinSCP is Windows-only and all other clients with which I am familiar are either commercially licensed or text-based. FileZilla may support SSH, I have not tested this personally but potentially it could be a more robust file manager than PuTTY or WinSCP.

Also, for what it's worth, GNOME/Nautilus supports browsing of SSH shares from "Places > Connect to Server..." It supports bookmarks and (obviously) drag and drop.

Sources: This page and my own experience with various SSH clients.


To install PySide (Python bindings for Qt4) in all supported versions of Ubuntu open the terminal and type:

sudo apt-get install python-pyside  # for Python 2.x

or

sudo apt-get install python3-pyside  # for Python 3.x


Windows key tab is useful for compiz fusion toggling of windows.  It's also a great key to assign to your own custom shortcuts due to it's general lack of use in the linux world.


You may follow this documentation : http://www.ubuntu.com/download/desktop/upgrade

In your case since you are under 12.04, I think you will have to dist-upgrade twice... So you may consider a clean install. I mean, backup your system (system and data partitions), in case something goes wrong and you want to get back to your actual configuration. Download Ubuntu 13.04 an install it... If you have 2 partitions '/' and 'home' you can re-use them during the installation. You just have to tell the installer that you don't want to format your 'home' partition so only you system will be re-install. If everything goes well you will recover you data and don't even need your backups. The only thing you will have to do is re-installing and configuring your system.

You could save the list of your installed package and restore it with this command :

dpkg --get-selections > packages.txt

Once your new install is done you can restore your packages like this :

dpkg --set-selections < packages.txt

Forgot you will need these commands after the precedent to effectively restore your packages (installed them) :

aptitude install

apt-get -u dselect-upgrade

Reference about get-selections : Restoring all data and dependencies from dpkg --set-selections '*'

Richard


I don't have access to an Ubuntu machine right now, so I can't try this. But can you pass a website as an argument to the google-chrome command?

I'm testing this on Windows 7 and it works. Calling

chrome www.google.com

from the command line opens Chrome and loads google.com. I'm pretty sure this is how Firefox on Ubuntu works as well.

So try editing (or adding) an entry in your quicklist with the line

Exec=google-chrome www.website.com

and see if that works.


Installing FASTCGI Mono for running ASP.NET on NGINX

Only one thing can bind onto a port at once. The error is simply saying there's something else running on port 9000. I personally have a few things that opt for 9000 so I would just change theport to something else (like 50333).

Or you could use a file-based UNIX socket, using the /filename=/path/to/file argument and then just connect your httpd to that instead of the TCP socket. That's a useful tactic if you have millions of servers you need to bind but not required when you only have one or two.


Trying to install Ubuntu 14.04.2 on Mac OS X Yosemite 10.10 with USB

Did you see the Ubuntu bootable usb choice on your mac? If not, the bootable usb is not created properly. You can check this link to verify you have done it correctly.


There are quite a few options for Windows.  Best choice is Accuterm running on Wine.  I'm using it with Xubuntu and it works fine.  Good luck.


Creating dir structures for multiple users as the superuser Ubuntu

Here's a script. Modify USER_LIST to suit your needs and delete the echo keywords when you've verified the script does what you want.

#!/bin/bash

USER_LIST="user1 user2 user3 user4"

cd /home || exit 1;
for user in $USER_LIST; do
    echo mkdir -p "$user"/{Staff,Info,Personal};
    for dir in Staff Info Personal; do
        echo touch "$user"/$dir/file{1,2,3}.txt;
    done;
done;

On the other hand, you could have modified the /etc/skel template before creating the users.


It is not advisable to change the ownership of the /var/www folder, leave it as root. If you need to create new files or folders inside /var/www leave them also under root ownership; or owned by you user if you prefer. For Apache to serve these assets all you need to do is provide read permissions to the www-data user:

sudo chmod a+r /var/www/my.asset

Also, consider using instead the /srv folder to store assets that must be served by applications such as Apache.


"CPU is not compatible with 64 bit mode" error trying to install Windows 7 (64 Bit) on VirtualBox

Probably while creating the new virtual computer you did not select Windows7 64bit. Create a new one and make sure that you have selected Windows 7(64 bit) from the drop down box.

It can also be that virtualization is not active in your computer or that your simply does not support it, to check if you system supports virtualization run this command

grep ^flags /proc/cpuinfo | head -n1 | egrep --color=auto ' (vmx|svm) '

and look for vmx or svm, if any of those shows up your system supports it.

If it does and you have selected the right template for the virtual guest then probably your BIOS has it disabled.

Have a look in your BIOS options or drop a comment in your question mentioning which computer model / motherboard you have.


A node is allocated to a user when a service is deployed to the node with juju. To return the node back to 'Ready' state you need to remove the service from the node with juju and terminate the machine.

To remove the service from a machine check 'juju status' to determine machine-id corresponding to your machine. Then under services see which service is deployed to the particular machine-id.

To remove the service use either 'juju remove-unit service/X' if removing a single unit or 'juju destroy-service service' if you want to remove all remaining units.

juju remove-unit ubuntu/3

The machine can then be terminated with 'juju terminate-machine machine-id'

juju terminate-machine 23

Once the node is in the 'Ready' state it can be deleted from MAAS.


How to remove the gradient from dash lenses?

You can edit it with GIMP or other image editors, because the .png files are stored in

/usr/share/unity/icons

The name of the files are category_gradient.png and  category_gradient_no_refine.png.


lsusb detects sd card but neither fdisk nor parted on ubuntu 18.04

You do not mount to partition you run the fdisk command, what it looks like on my sd card in its reader.
root@zeus-H370M-DS3H:~# fdisk -l /dev/sde
Disk /dev/sde: 29.81 GiB, 32010928128 bytes, 62521344 sectors
Disk model: Storage Device
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x8d99794c

Device     Boot  Start      End  Sectors  Size Id Type
/dev/sde1         8192   532479   524288  256M  c W95 FAT32 (LBA)
/dev/sde2       532480 62521343 61988864 29.6G 83 Linux

Now to partition you remove the -l and get something like this.
root@zeus-H370M-DS3H:~# fdisk /dev/sde

Welcome to fdisk (util-linux 2.36).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Command (m for help): d
Partition number (1,2, default 2): 1

Partition 1 has been deleted.

Command (m for help): n
Select (default p): p
Partition number (1,3,4, default 1): 1
First sector (2048-532479, default 2048): 8192
Last sector, +/-sectors or +/-size{K,M,G,T,P} (8192-532479, default 532479):

Created a new partition 1 of type 'Linux' and of size 256 MiB.
Partition #1 contains a vfat signature.

Do you want to remove the signature? [Y]es/[N]o: n

Command (m for help): q

There I showed you how to delete a partition and create a new one as you can see I used exactly the same number as was on the drive and chose not to do anything in the end by quitting. The partition was set to type linux by default, I could have used a t followed by a 1 for the number of the partition and 0b the code for a Fat 32 like I had. When completed making the partitions you use w to write the changes to the disk then you format it depending how you want it.
root@zeus-H370M-DS3H:/home/zeus# mkfs.vfat /dev/sde1
mkfs.fat 4.1 (2017-01-24)
root@zeus-H370M-DS3H:/home/zeus# mkfs.ext4 /dev/sde2
mke2fs 1.45.6 (20-Mar-2020)

The example for formatting the first partition Fat 32 and the second ext4 like in the original listing I showed you. Good luck with it I/O problems can mean the card is dead, if this does not work try it in a digital camera if it is too far gone fdisk may not be able to recover where a camera most times does not check and formats no matter the state of it.


Copy paste not working on Ubuntu machine while connecting from xrdp

This should fix your Tab issue.
Open ‘Settings> Window Manager’ from Start menu.  Then remove the 'Super-Tab' shortcut from the Keyboard section.  Here's a screenshot.


Files in Nautilus stopped updating automatically, how to fix this?

Fix by editing /proc/sys/fs/inotify/max_user_watches.

The file include only a number, i changed it to a larger number with the following command in Ubuntu:

echo 1000000 | sudo tee /proc/sys/fs/inotify/max_user_watches


Ubuntu 20.04 installer downloads ISO more than once

I saw this got an answer on Discourse, but I thought I'd share what I found.
Adding cloud-config-url=/dev/null to the kernel arguments does prevent cloud-init from downloading the ISO, and the ISO is only downloaded once. The full grub line is now
linux /vmlinuz ip=dhcp url=http://${pxe_default_server}/tftp/ubuntu-20.04-live-server-amd64.iso autoinstall ds=nocloud-net\;s=http://${pxe_default_server}/tftp/ cloud-config-url=/dev/null

why this happens
When using PXE, the autoinstall config requires the url= parameter added to the kernel arguments to specify the location of the ISO file.  I believe casper handles this and the argument must be in the form url=*.iso
cloud-init will also parse the url kernel argument and attempt to use it (twice, apparently).  From https://github.com/canonical/cloud-init/blob/fc5d541529d9f4a076998b7b4a3c90bb4be0000d/doc/sources/kernel-cmdline.txt

when 'cloud-init start' runs, it will check to
see if if one of 'cloud-config-url' or 'url' appear in key/value fashion
in the kernel command line ... Cloud-init will then read the contents of the given url.

As the Discourse post points out, the cloud-config-url is checked first, so you can use a kludge to avoid the extra downloads.


Where is the text selection tool in qpdfview?

In qpdfviewer after selecting your pdf, go to Edit > Copy to Clipboard and select the text your require using the cross-hairs tool.

You should note that the ordinary selection tool and editing capability you might otherwise expect doesn't exist in qpdfview.


How do I point a domain to an Ubuntu VPS?

We discussed this in a chat room here, however this is the brief summary:

Make sure you have a domain name.
Make sure that the domain points to your provider's name servers.
Make sure that an A record exists (for IPv4) in the provider's name servers which points your domain to the correct IP for your VPS.  If it's an IPv6 address, use an AAAA record.
Make sure that nginx has a server_name line in the configuration for the server { block which has the domain name in it.

And you're done.

To add additional sites in nginx, make additional server { blocks in the configuration file with the relevant configuration data, after making sure the domain points to the IP address for your server, and that the server_name lines contain the domain name(s) in that line for each relevant site root directory on the server.


That application has a package for Debian and Ubuntu. Just scroll down the downloads list until you see "vpnpptp-allde-0.3.3-i386.deb". If you have a 64 bit installation, you will have to download "vpnpptp-allde-0.3.3-amd64.deb". Just click on the package and Ubuntu Software Centre will pop up. Click "Install" to install it.


You can mount /dev/sdc1 anywhere you like, and nothing will happen to its contents unless you remove something from there using whatever mount point to access the partition.


Unable to install mysql 5.7 on ubuntu 20.04

Mysql 5.7 is not available to the Ubuntu 20.04. Only mysql 8.0 and higher version are available to Ubuntu 20.04 when you use mysql repository. Here you are using bionic source list (Ubuntu 18.04) for Ubuntu 20.04. I believe this workaround sometimes causes messup with dependencies tree.
You need to download mysql 5.7 packages with their dependencies from official mysql site here and install manually by executing below command in terminal.
sudo dpkg -i <package name>


Hindi Keyboard layout is missing combined characters

I'm not sure if this will help, but as far as I know Ubuntu's handling of Devanagari script (and a few others) is not fully implemented yet...

Have a look at this Askubuntu question... Devanagari script in the Terminal

I noticed some problems in the Gnome Terminal, but things work fine in KDE's Konsole Terminal


Boot 32-bit Ubuntu 14.04 from USB Stick on Windows 8.1(64-bit)

All Windows 8 and above computers come with UEFI

UEFI is the new thing that replaced BIOS in these computer. UEFI can be set to Legacy (BIOS) mode, but then Windows 8 and above won't boot. To dual-boot the computer with Windows 8 and Ubuntu, you have to keep the UEFI in its native mode. 32-bit Ubuntu is not compatible with UEFI.

To dual-boot a computer that came pre-installed with Windows 8 or above, you will need 64-bit Ubuntu.

See Installing Ubuntu Alongside a Pre-Installed Windows with UEFI for detailed instructions on how to prep the computer for dualboot.

Hope this helps


Can't build Virtualbox-dkms - mismatched kernel and headers

I figured this out after finding https://unix.stackexchange.com/questions/170580/package-linux-headers-3-13-0-27-generic-has-no-installation-candidate and noticing that 14.10 should have shipped with the 3.16 kernel from the start.

This machine was upgraded from 14.04 to 14.10 using do-release-upgrade.  However, the 3.13.x kernel from 14.04 was installed explicitly instead of through the linux-image-generic meta-package, so it didn't get upgraded.  However, the headers were installed using the -generic meta-package, so they did get updated.

Installing linux-generic caused the Kernel and Headers to both update to the newest 3.16.x.


Problem can be solved with adding extra routes based on destination.

From terminal

sudo ip route add ip_address_mail_server dev wlan0

This can be done by editing connection in /etc/NetworkManager/system-connections/connection_name

sudo nano /etc/NetworkManager/system-connections/connection_name

[connection]
id=Auto XXXX
uuid=f4a27a71-202f-45ac-bc58-59a55600f515
type=802-11-wireless

[802-11-wireless]
ssid=XXXX
mode=infrastructure
mac-address=18:CF:5E:23:2A:0A
security=802-11-wireless-security

[802-11-wireless-security]
key-mgmt=wpa-psk
auth-alg=open
psk=yyyyyyyyy

[ipv4]
method=auto
routes1=xxx.xxx.xxx.xxx;32;yyy.yyy.yyy.yyy;0;

[ipv6]
method=auto

xxx.xxx.xxx.xxx - represent ip address of mail server

yyy.yyy.yyy.yyy - represent gateway foe wlan0 interface

Edit 1

Second method is more precise but also more complicated

Let’s start from the iptable. Here we shall take smtp as the service for routing. Use mangle table of iptable for modifying the smtp packets.

  sudo iptables -t mangle -A OUTPUT -p tcp –dport 993 -j MARK –set-mark 0×1

We are marking all packets with destination port 993 as ’0×1′ .

Now save and restart iptables.

service iptables save
service iptables restart

To delete this entry from iptables we can use -D instead of -A.

Next, create a new IP route table in /etc/iproute2/rt_table by just giving an entry

100 smtp

Write rule for smtp packets.

ip rule add fwmark 0×1 lookup smtp

Add route at new table smtp. Here we shall use ’192.168.1.1′ as the gateway for smtp. All other traffic will go through the
default gateway, which can be seen by IP route show command.

We copy all entries except default gateway entry from main table.

 sudo ip route show table main | grep -Ev ^default | while read ROUTE ; do ip route add table sshtable $ROUTE; done

Add default gateway entry for smtp packets to table smtp

  sudo ip route add default via 192.168.1.1 table smtp

Use ip route show table smtp to show all routes atsmtp`.

That’s it..we have done it!!!

Repeat everything for imap on port 465.


How to wakeup ubuntu (16.04) from suspended state?

Check if you have an old kernel because that may be the problem causing it to be unable to wake up. You can do this with

uname -a

and to download the new kernel follow this guide

http://ubuntuhandbook.org/index.php/2016/07/install-linux-kernel-4-7-ubuntu-16-04/

Otherwise, you can always try to install a previous LTS.


Error 'aticonfig: No supported adapters detected' while installing AMD Catalyst

According to the AMD wiki site, supported hardware section your card is not supported by the drivers.

You can try to use the drivers in your card (not sure on how that will work) by getting a sample xorg.conf file and placing it in your /etc/X11/ folder.

The xorg.conf file has many options and can vary from system to system, the Arch Linux Wiki page for ATI Catalyst contains some information about them, have a look.


First, log out all user manually, then ssh with root.

Use "lsof | grep home" to find remaining process that use /home and kill them all.

You can umount.


Yes possible but the computer HDD must have another disk partition. You've to format the partition and install ubuntu.


You can't install the Ubuntu image from the Canonical website on any Chromebook. Chromebooks have a different booting mechanism than most laptops, so you need a special install process to install Ubuntu on some of these laptops.

You can follow these instructions that are specific to the C7 Chromebook you mention: http://liliputing.com/2012/11/how-to-install-ubuntu-12-04-on-the-199-acer-c7-chromebook.html

Note that this is Ubuntu 12.04, but I believe that is the latest supported release (as I post this anyway.)


Audio on Firefox doesn't work after using Hydrogen

Try to restart pulseaudio and alsa...To restart pulseaudio through

pulseaudio --start
and
sudo alsa force-reload

There also may be a problem with Jack if you are using it. Jack and pulseaudio often run into conflict with eachother when they both try to hit the same soundcard at the same time. I would suggest checking this if you are using Jack along with pulseaudio.

http://jackaudio.org/pulseaudio_and_jack

Hope this helps.


Note: this workaround does not answer the actual question Why does changing the hotspot SSID not work?

Observations:

When the hot spot is turned on via GUI, it automatically takes the input from Device name

If i change my Device name, the same name will be generated when the hot spot is turned on via GUI.

Thoughts:

as you mentioned that you have edited the file /etc/NetworkManager/system-connections/Hotspot, I have tried to change its permissions in several ways but it always overwritten.

Workaround:

Delete the Connection named Hotspot with the command nmcli connection delete Hotspot which was generated when Hotspot is turned on via GUI.

Example:

pratap@i7-6550u:~$ nmcli connection show
NAME         UUID                                  TYPE  DEVICE
Sri Nilayam  cd93d019-2bbb-4b6f-aa80-b4536a563aa0  wifi  wlp2s0
Hotspot      480fdd31-fe20-4b3d-8698-f25ec7678c1b  wifi  --
pratap@i7-6550u:~$ nmcli connection delete Hotspot
Connection 'Hotspot' (480fdd31-fe20-4b3d-8698-f25ec7678c1b) successfully deleted.
pratap@i7-6550u:~$

create Hotspot with the below command, you can explore various options from man nmcli command in a new terminal. Put your preffered values for ssid and password.

nmcli device wifi hotspot ssid myawesomehotspot password 12345678

Never use GUI for turning on and off the Hotspot. If you use GUI to turn on, it again takes the name from system Device name. To turn on and off, use below commands.

Commands:

nmcli connection up Hotspot
nmcli connection down Hotspot

As long as you dont use GUI way for Hotspot, it persists..


Apache2 now pointing to new default page

Apache2 from the Ubuntu repository gets it's default location from /etc/apache2/sites-available.

The default page configuration is the 000-default.conf file in that location.

You can either modify that page or use it as a template and make your own configuration file.  If you want to have a page with the location of /opt/lampp/htdocs as it's server route you can do that in this manner:

1) Copy the 00-default.conf file to a new name.  For an easy method to remember to purpose, you can call the filename, mywebsite.conf to have the configuration for www.mywebsite.conf.

Now edit this new page with these changes:

Change from:

<VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        #ServerName www.example.com

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf

</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

change to:

<VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        ServerName www.mywebsite.com
        ServerAlias mywebsite.com

        ServerAdmin webmaster@localhost
        DocumentRoot /opt/lampp/htdocs

        # We must also allow access to the new root directory; by
        # default only access to /var/www is allowed.
        <Directory /opt/lampp/htdocs>
            Require all granted
        </Directory>

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf

</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

After you have created the virtual host for your website, enable this new configuration with:

$ sudo a2ensite mywebsite.conf

The system will then prompt you to restart the server for the changes to take effect, which you can do with:

$ sudo systemctl restart apache2

The two important changes are:

ServerName
DocumentRoot

Now you can you will be able to access your website by the name given in the ServerName or the ServerAlias directives.

I left the comments in the configuration files example to show the options that can be enabled by removing the "#" desired option.  Also the comments are a valuable resource explaining the configuration options.


OK, I have found the solution myself, also thanks to Terrance.  By using  F1 I got a login prompt, and commandline.  Then, found out I do have xterm by trying "which xterm" .  Then I can exit, using F7, login and start xterm using file manager.  Now I have xterm, and roll-back to an earlier version of python.  The trouble stems from the fact that I installed a newer version of python (3.8), and that is now not working to run terminal.  The solution was to sudo vi /usr/bin/gnome-terminal and change the first line to specify a working version of python (in my case python2)


Changed perms on /etc/skel hidden files, locked out of bash/sudo

You ran
cd /etc/skel
sudo chmod 644 .*

.* will find all .files (including directories) in the current working directory and the current working directory itself, and the parent directory. You applied mode 644 to these:
.            <-- problem here as it's the working directory
..           <-- big problem here as it's the /etc directory
.bash_logout
.bashrc
.config      <-- problem here as it's a directory
.profile

The reason nothing worked was that you removed execute permission on the current working directory. That means you didn't have permission to be there!
Directories must have execute permission to be entered or searched. It's kind of an edge case to be inside a directory when execute permission is removed from it, but in that situation you will get permission denied for almost every command.
You can cd out of the directory, but you will not be able to fix the permissions without rebooting because the sudoers file (in /etc) cannot be read.
You can either

boot in recovery mode, start a root shell and mount the filesystem read write by doing mount -o remount,rw /

boot into a live session and mount the root partition: sudo mount /dev/sdxY /mnt (replace /dev/sdxY with the correct name of the root partition) then cd /mnt

You didn't do chmod -R (thankfully!) so you only have to fix three things. In recovery do (the same but with sudo and without the first / in the paths from /mnt in a live session)
chmod 755 /etc
chmod 755 /etc/skel
chmod 755 /etc/skel/.config

to restore the correct permissions.


I solve the problem after I remove the inkscape.desktop from ~/.local/share/applications/. But I don't know how the launcher goes there after the upgrade and how it was hiding inkscape of "Open With" list.


GTK3 FileChooser: Save dialog has no Recent item

For dialogs without Recent button you can always press Alt+R as a workaround.


Compatible keyboard and mouse from china?

As long as it includes the little USB receiver, then it'll work.

Mice and keyboards which plug into the computer at a USB port (even if they are wireless and just have a little USB plug) follow the USB standard for human interface devices which is well supported across operating systems and devices.

Note: sometimes mice or keyboards have "extra" buttons or features that are non-standard and so won't have any effect in Ubuntu, but the main keyboard and mouse functionality will still work, and often extra buttons can still be programmed manually.


Your NVIDIA graphics chip is using nouveau driver. It lacks features and stability compared to NVIDIA's official driver. You should install NVIDIA's driver. It can be installed from "Additional Drivers" tab in Software & Updates.


The problem is with iwlagn, because it disables n on your built-in wifi adapter.
This post on ubuntu forums should solve your problem:
http://ubuntuforums.org/showpost.php?p=9953554&postcount=5


Cannot login using old user after new ubuntu upgrade

As long as the older /home/old-username exists, you should be able to recover the account.

Don't try to create a user, that has the same name as the home backup. Create a new one:

# create the new user
$ sudo adduser newuser

# add new user to sudo group
$ sudo adduser newuser sudo

# copy content of the old home to the new user
$ sudo cp -rT /home/old-username /home/newuser

# fix the permissions
$ sudo chown -R newuser:newuser /home/newuser/

Than login with new newuser and all your old data and configuration should be there.


Allocating disk space as memory temporarily

You can indeed use swapfile as temporary addition to your system memory. Personally, I have an SSD and use 1 GB swap file for protection instead of having a partition , since it's a compromise between using the limited disk space, but having extra memory if I ever run out of RAM

First create the file itself

sudo dd if=/dev/zero of=/swapfile bs=1M count=1024

The command will create a file named swapfile inside your root folder, its content being all zeroes and size of 1024 megabytes (1 GB). To make it 2 GB , change count value to 2048

Next, make it read-writable by root only

sudo chmod 600 /swapfile

And format it to swap

sudo mkswap /swapfile

Finally, enable the file

sudo swapon /swapfile

You can disable it at any point using sudo swapoff /swapfile command and remove at will; in addition, since here we don't add it to the /etc/fstab file, it won't be added at next boot, so on the next boot you can remove it

FYI, all this I've turned into a script so that there's an actual single command you can execute to add swap. See How can i increase size of swap file?


Ubuntu 12.04 not booting to a display manager or login manager

I had a similar problem like this that existed in Ubuntu 11.10. If you previously upgraded from 11.10 to 12.04 LTS you could have a couple of faulty leftover packages from 11.10.

Installing proprietary drivers could also cause LightDM to not fully boot inside the login screen. Have you tried installing the open source nVidia or ATI drivers to check for verification?

By the way you could try a few of these suggestions for LightDM.


Do-release-upgrades fails on multiple servers

Make sure you have set your Locales correctly -

sudo apt-get install language-pack-en-base
sudo dpkg-reconfigure locales

Then, add the following to /etc/bash.bashrc:

export LANG='en_US.UTF-8'
export SUPPORTED="$LANG:en_US:en"

You should modify the variables to match your preferred locale(s).  You will need to re-log in (or, in the case of SSH, reconnect) before the changes will take effect.  If you are using byobu, tmux, or screen, be sure to exit out of every window and close the session first.


using .deb packages in /var/cache/apt/archives

When you install .deb packages directly (I assume you used dpkg -i) you need to make sure that you install also all dependencies because dpkg doesn't resolve dependencies automatically. I think this is probably the problem that you're having.

Besides this, in other answers to similar problems, I've seen keryx being recommended. Maybe you should give it a try.


How can I change Unity sidebar to bottom?

Maybe this tool can do the job.

http://www.omgubuntu.co.uk/2013/02/introducing-unity-tweak-tool


How to prevent Bumblebee on a Dell E6530 disable Optimus on the next boot?

Using Ubuntu 13.04 and Nvidia 325.x driver from the Xorg-edgers PPA, I don't see any issue anymore.

Also make sure not to use any brightness fixing methods which seem to be needed with Nvidia proprietary driver < 325. So, remove any of the acpi_osi=Linux and acpi_backlight=vendor kernel parameters, otherwise bbswitch will complain about a missing ACPI handle for the discrete graphics card and won't be able to actually switch graphics.

With acpi_backlight=vendor (idle power consumption 22W+):

Sep  2 01:17:59 gert kernel: [   12.999284] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
Sep  2 01:17:59 gert kernel: [   12.999292] bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PCI0.PEG0.VID_
Sep  2 01:17:59 gert kernel: [   12.999782] bbswitch: failed to evaluate \_SB_.PCI0.GFX0._DSM {0xA0,0xA0,0x95,0x9D,0x60,0x00,0x48,0x4D,0xB3,0x4D,0x7E,0x5F,0xEA,0x12,0x9F,0xD4} 0x102 0x0 {0x00,0x00,0x00,0x00}: AE_NOT_FOUND
Sep  2 01:17:59 gert kernel: [   12.999785] bbswitch: No suitable _DSM call found.
Sep  2 01:17:59 gert bumblebeed[1953]: Module bbswitch could not be loaded (timeout?)

Without acpi_backlight=vendor (idle power consumption 10-11W):

Sep  2 08:23:53 gert kernel: [    9.609896] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
Sep  2 08:23:53 gert kernel: [    9.609901] bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PCI0.PEG0.VID_
Sep  2 08:23:53 gert kernel: [    9.610153] bbswitch: detected an Optimus _DSM function
Sep  2 08:23:53 gert kernel: [    9.610168] bbswitch: Succesfully loaded. Discrete card 0000:01:00.0 is on
Sep  2 08:23:53 gert kernel: [    9.611411] bbswitch: disabling discrete graphics

The upgrade to 13.04 also fixed other minor issues and it seems the machine is running a lot better now in terms of power management.


Clarification of the third-party software options during system installation

The "Install this third-party software" checkbox does two things:

It installs ubuntu-restricted-addons much later on in the main install process.  This currently includes gstreamer0.10-plugins-ugly, flashplugin-installer (Adobe Flash support), gstreamer0.10-plugins-bad, gstreamer0.10-ffmpeg, icedtea6-plugin (Java and the browser plugin for it), and gstreamer0.10-fluendo-mp3 (MP3 playback support).
It asks the Additional Drivers (jockey) program to enable any drivers that can be automatically installed.  Currently this is limited to just the Broadcom wireless (binary) driver.

If the computer is not connected to the Internet, the install will complete successfully; however, the following will happen:

Your location will not be automatically determined on the 'Where are you?' page.
The set of locations you can look up by typing in the box on the 'Where are you?' page will be limited to just the cities that represent a timezone (Oslen database locations).
If you have checked the 'Download updates while installing' box, this step will be skipped.
If you have selected a language without full language support shipped on the CD, the language support packages will not be downloaded as part of the Ubuntu installation process.


I managed to do it with the following:

vgextend vg01 /dev/ubuntu-vg/sdc3
lvextend -l +100%FREE /dev/vg01/lv01
resize2fs /dev/vg01/lv01

Hope that is the right way to do it!


If you're BIOS has the option try switching from UEFI to Legacy.

Edit:  I just reread and noticed you're not running UEFI.  Ignore the first sentence above.

Backup Windows partitions.  No need for Ubuntu partitions backup since apparently fresh install.

Switch BIOS back and launch live CD then chroot into your Ubuntu install again as you did before.

Install EFI bootmanager

sudo apt-get install efibootmgr

A list of your partitions should come up.  Make note of the numbers used for Windows and Ubuntu root.

Set Ubuntu to boot first.  If you're numbers are, for example, Windows=1 and Ubuntu root=2 run:

sudo efibootmgr –o 2,1

Reboot and you should have a boot menu to choose from.

Edit/Notes:  It's not clear why you are using GPT without UEFI.  Windows sets up a GPT partition table when it's installed while UEFI is enabled.

https://msdn.microsoft.com/en-us/library/windows/hardware/dn898510%28v=vs.85%29.aspx

Otherwise it sets up a MBR partition table with UEFI disabled.

https://msdn.microsoft.com/en-us/library/windows/hardware/dn898504%28v=vs.85%29.aspx

Did you install Windows 10 while in UEFI mode and then switch?  If you did and then switched the mode to legacy after and if this is a fresh install for both, which it sounds, you many want to start over and switch your BIOS to UEFI from the beginning to end if you want to use GPT.  You may still need to install efibootmgr and change the EFI boot order after installing Ubuntu or if your BIOS has the option you can change it there.

Otherwise if you're not going to use UEFI you should start over and install Windows without UEFI enabled and install Windows 10 with MBR partition table. Then install Ubuntu and use GRUB.

Almost forgot...make sure Windows Fastboot is disabled.  It's like a always on hibernate at shutdown.  It can prevent loading other operating systems and if you do manage to load another OS there's a potential for corruption of the Windows system.  The link below is Windows 8 but still applies to 10.

Why disable Fast Boot on Windows 8 when having dual booting?


I don't know what problem was but it got away when I completely removed java(Oracle and Open JDK) using this thread. And again I installed Oracle java using this thread.


Openvswitch setup with Mitaka, unable to ping interfaces

Issue seems to be OVS on Ubuntu 16.04 not working out of the box. Ran into the problem with another installation, which worked after the creation of bridges but not after a reboot.

What needs to be done is to follow this great life saving post related to Ubuntu 16.04: Boot integration of the Openvswitch in Ubuntu and then strictly follow the guidance  of the README.Debian.gz file from /usr/share/doc/openvswitch-switch to configure bridges and ports in the /etc/network/interfaces. Below an excerpt of the file.

Examples:
--------
ex 1: A standalone bridge.

allow-ovs br0
iface br0 inet static
    address 192.168.1.1
    netmask 255.255.255.0
    ovs_type OVSBridge

ex 2: A bridge with one port.

allow-ovs br0
iface br0 inet dhcp
    ovs_type OVSBridge
    ovs_ports eth0

allow-br0 eth0
iface eth0 inet manual
    ovs_bridge br0
    ovs_type OVSPort

ex 3: A bridge with multiple physical ports.

allow-ovs br0
iface br0 inet dhcp
    ovs_type OVSBridge
    ovs_ports eth0 eth1

allow-br0 eth0
iface eth0 inet manual
    ovs_bridge br0
    ovs_type OVSPort

allow-br0 eth1
iface eth1 inet manual
    ovs_bridge br0
    ovs_type OVSPort

Note that options can be combined, I have myself a setup of OVS bridges on the top of linux bridges which seem to work fine.

This way setup will survive a reboot in Ubuntu 16.04 (and Openstack will fully work).


18.04 Xinerama Black Screen with Mouse Cursor

This issue was caused by the GDM3 display manager. After switching to a greeter and desktop environment that does not use GDM3 (specifically MATE), Xinerama works just fine. I was finally able to log into the Desktop.


virtualbox suddenly stopped working, Segmentation fault (core dumped)

I have had similar issues with virtualbox myself.

I was running on the latest virtualbox 5.2.6 on my ubuntu 16.04.

I did a purge and autoremove all of its libraries+virtualbox.

Installed previous stable version - 5.1.32 and its extensions.

Everything worked fine ever since.

Try to run these commands:

sudo apt-get update
sudo apt-get install -f
sudo apt-get purge virtualbox-5.2.x
sudo apt-get autoremove
sudo apt-get install virtualbox-5.1

if you can't install it from commandline then go to their website:
https://www.virtualbox.org/wiki/Downloads

Download the 5.1.32 for ubuntu 14.04/16.04 install the .deb file package by:

sudo dpkg -i virtualbox-5.1_5.1.32-120294_Ubuntu_xenial_amd64.deb

Let us know how it goes.


Failing to boot from USB on Windows 10, Dell Inspiron 5323

You can do it in alternate way as well. Check here

http://www.howtogeek.com/126016/three-ways-to-access-the-windows-8-boot-options-menu/

Only thing is you need to set the Boot order correct and another important thing is how you copied your ISO file to USB. It is not a direct copy check http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-windows for more info


#!/bin/bash
Lines=$(amixer -D pulse sget Master | grep '[0-9]%' | awk '{printf "%s\n",$5}')

set -- $Lines
lVol=$(echo "$1" | tr -cd [:digit:])
rVol=$(echo "$2" | tr -cd [:digit:])

if ((lVol>rVol))
then hVol=$lVol
else hVol=$rVol
fi

maxVol=40
if ((hVol>maxVol))
then
  echo "One or both channels too loud, setting both to $maxVol"
  amixer -D pulse sset Master ${maxVol}%
fi
# EOF #


Thank you! I have solved this problems, because I am in China, I have to add this: "sudo locale-gen zh_CN.UTF-8; sudo locale-gen"


First Install Ubuntu Tweak from this site.
Launch it by searching for it from the dash .
Go to the  System -> File Type Manager .

Select all formats of the category you want by pressing Ctrl + A .

Now click on the edit button and select the application you want to open the formats .

Done .


wine cannot find L "C:/windows/system32/plugplay.exe

That's normal.  If you are trying to Browse your C: drive, then do it through the applications menu.

Applications>Wine>Browse C: Drive

or open up nautilus and navigate to:

/home/user/.wine/dosdevices/c:

alternatively you could cd to the above in a terminal.

You don't actually browse the drive from the wine config though.


When will Eclipse Juno (4.2) be coming to Ubuntu?

The main repositories of 13.04 are not likely to be upgraded to the latest release of Juno now that they're released, for reasons explained in Why don't the Ubuntu repositories have the latest versions of software? .  If the Eclipse team has a PPA with Eclipse Juno, then you can use that.

Otherwise the latest Eclipse software will need to be downloaded and run manually.

Perhaps it will be backported to 13.04 (or earlier), if the software is available in the next version of Ubuntu.  But only if someone can make sure it builds and runs correctly.


Extract specific folder from tarball into specific folder

Tl;dr
Since you are in /tmp already, you can just discard the -C option (since by default tar will extract files in the current working directory) and just add --strip-components=2:
tar --strip-components=2 -xfvz archive.tar.gz folder/in/archive

GNU tar by default stores relative paths.
Whether an archive uses relative paths can be checked by running tar -tf archive | head -n 1, which will print the path of the first file in the archive; if that file's path is a relative path, all the files in the archive use relative paths:
% tar -tf bash-4.3.tar.gz | head -n 1
bash-4.3/

To extract a single file / folder from an archive that uses relative paths without its ancestors into a relative path you'll need two options: -C and --strip-components=N: in the example below the archive bash-4.3.tar.gz uses relative paths and contains a file bash-4.3/doc/bash.html which is extracted into a relative path path (-C specifies the directory in which to extract the files, --strip-components=2 specifies that the parent and the parent of the parent of the extracted files should be ignored, so in this case only bash.html will be extracted into the target directory):
% tree
.
├── bash-4.3.tar.gz
└── path

1 directory, 1 file
% tar -tf bash-4.3.tar.gz | grep -F 'bash.html'
bash-4.3/doc/bash.html
% tar -C path --strip-components=2 -zxf bash-4.3.tar.gz bash-4.3/doc/bash.html
% tree
.
├── bash-4.3.tar.gz
└── path
    └── bash.html

1 directory, 2 files

So, back to your command, since you are in /tmp already, you can just discard the -C option (since by default tar will extract files in the current working directory) and just add --strip-components=2:
tar --strip-components=2 -xfvz archive.tar.gz folder/in/archive


How to install ubuntu server for lxc on a smartphone (ARM or x86, bare metal)?

{{ UPDATE 2 }}

The second part of the answer with more details on research path is given here:

How to use Android SDK and smartphone vendor tools to boot another kernel?.

{{ UPDATE 1 }}

AFTER A MORE DETAILED RESEARCH THE CONCLUSION IS SIMPLE:

MISSION IMPOSSIBLE

As of May-2019 it is impossible to install any of the mainstream linux server distros on smartphones (listed in the question and most likely any other) in a feasible way. If you have a decent 2-3 year old hardware (like ZenFone2 with 4-core 2.3Ghz 22nm 64bit Intel Atom CPU, 4Gb RAM and 64Gb flash drive and with scratched screen), just sell it for nothing, give it away or break it. The hardware you paid for has a very limited usage (compared to a PC).

There seem to be some initiatives but they are so weak and marginal that are barely worth mentioning.
Only one link is enough to understand the situation:
https://en.wikipedia.org/wiki/List_of_open-source_mobile_phones

Only ONE phone in the list (a honeypot? or a carrot? or both?) which is even not available at the moment have 'multiple community-driven' in the OS column. To me the situation is clear. No way guys)))

{{ ORIGINAL ANSWER }}

After a small research I found out that things are not as good as they could be.

Debian community instructions could be found here:

https://www.debian.org/releases/stable/armhf/ch02s01.html.en#armhf-armmp-supported-platforms

Section 2.1.3. Variations in ARM CPU designs and support complexity gives general view of the problem and possible solutions to it. It seems to be possible to install Debian server on a smartphone, but the process is rather painful.

Some examples:

1) http://julianwi.square7.ch/debian-on-smartphone/

2) http://bonedaddy.net/pabs3/log/2012/12/03/debian-mobile/

Ubuntu:

I managed to install UBports / Ubuntu Touch on Nexus 4 (ARMv7-A CPU) easily with the help of their wonderful user friendly ubports-installer (https://ubuntu-touch.io/get-ut). The process took 5 minutes or so (I had to activate developer mode on the phone and restart it 2 times), all things were handled automatically, the phone booted into working Ubuntu Touch OS nice and smoothly. However that was not the task. I needed ubuntu-server.

Then I found mentioning of another tool on UBports site (FAQ section), namely MDT (https://github.com/MariusQuabeck/magic-device-tool). It is no longer supported but its purpose is much closer - it was supporting various OS images (including Ubuntu Desktop 13.04!) and various smartphone models. Very sad that this tool is no longer maintained. It would solve the problem if ubuntu-server image for arm devices was supported. I am wondering whether the maintainers of UBports could extend their tool (ubports-installer) and add support of server images (perhaps use MDT tool codebase)...

I will try to install ubuntu-sever (or debian) manually, but unfortunately this is going to take more research / time than it could (if we had a working / maintained version of the installer). We don't need a gui version like ubports-installer, just a CLI version which would bundle working scripts maintained by people behind MDT project and UBports team.


I had a similar issue and have found a cure. My latptop has an Intel i7-1165G7 and an nvidia MX450 graphics card. As in a discussion with Nvidia Support, I realised my laptop did not have any HDMI port available on the nvidia GPU. The HDMI port is driven by the intel graphics rather than the nvidia graphics card. Ubuntu 20.04.1 is based on the kernel series 5.4. However kernel 5.4 does not support Intel Gen12 Tiger Lake graphics. Then I upgraded my Ubuntu kernel from 5.4 to 5.8.0. It worked.
Here is the link to ubuntu kernel .deb files https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.8/ and a guide on how to upgrade the kernel https://itsfoss.com/upgrade-linux-kernel-ubuntu/.


Logging in the New Created User Ubuntu12.04 lts

By default useradd simply creates the user account and group in the /etc/passwd and /etc/group files. It does not create a home directory for the new user. Instead run the sudo adduser username command, which will prompt for extra information including password, full name, etc. and then create a home directory which will be populated from default information in /etc/skel.

To fix this, you have two options. The simplest would be to run sudo userdel rashmi, and then start again with the adduser command, or you could manually create the home directory as root user, and change the ownership of the copied files to match that of the new user:

ls /home/rashmi

Confirm that there is no data about to be overwritten. Then

sudo cp -a /etc/skel /home/rashmi
sudo chown -R rashmi:rashmi /home/rashmi

I recommend using the first method if possible, as it will add a usergroup for the new user, which you may not have done yet (you can do this manually by editing the /etc/group file as the root user).


For a quick and dirty solution that has been far too convenient at times, rename a file:
sudo mv /etc/apt/apt.conf.d/20snapd.conf /etc/apt/apt.conf.d/20snapd.old

Then you can do whatever you need with apt, then rename the file back to what it was originally.


There's no special trick, no secret. Just make sure that you are not getting your terms mixed up.

A port that is open means that:

The firewall is not blocking packets to that port, and
An application has bound to that port, and is (probably) listening.

A port that is closed means that:

The firewall is not blocking packets to that port, and
An application has bound to that port.

A port that is blocked means that:

The firewall is blocking packets to that port.

Ubuntu's firewall does no blocking by default (Ubuntu has no vulnerable services listening). If a port is closed, it means that no application is listening on that port.
If you expected an application to be listening, then it's time for you to investigate why that application did not bind to the expected port and is not listening.


I went to my local Mac store and the technician had a look.

Turns out on newer versions of MacBooks you can hold OPTION+R
This will bypass everything and take you straight into recovery.

From there launch the disk utility manager
Set Mac HD as your default drive.
Reboot then login on OS X check in the preferences that Mac HD is the start up disk.
Shutdown and you should hopefully see rEFIt and carry on as normal.

Hope this helps anyone who has the same problem I did.

As a note as well, if you're silly like me and didn't make a USB key (make one!) with your version of OS X! Lots of guides around on how to do it.
Guide: LifeHacker Burn OS X to DVD/USB


What's video converters are available for Ubuntu?

There are at least four video converters you can try:

arista | [Install arista]
transmageddon | [Install transmageddon]
ConvertMe!
Handbrake

Arista is a basic converter which you can add new conversion types to through there web site which will give you a new script which you can install adding the new conversion type.

Transmageddon is the development version of arista which gives you the option to choose your specific encoding preferences in the program interface.

ConvertMe! is a very user friendly new frontend for FFmpeg. It comes with widly used presets and gives you a preview of the conversation progress. ConvertMe, intergrates with your Nautilus file manager allowing you to rightclick on an any video file and convert it instantly. View screenshot

Handbrake has a limited number of output formats including mp4 and mkv but there are many more options available and a good description of what these options will do however handbrake is not in the software centre and you will need to add it by adding a PPA*
which can be found at launchpad.

The ppa can be added through the software sources dialogue described here

ppa:stebbins/handbrake-snapshots


Customisation of zram and enable zram disable swap partition

This is a guide to enable zram. Edit it the way you like it, and remove the swap partition to make Ubuntu faster.

You actually don't need to create a swap partition as Ubuntu suggests on installation. You only need a swap partition in case an application needs more physical RAM than the available.

For example, let's say I want to play WoW and the minimum requirement is 5 GB, but I have only 4 GB of physical RAM... not happening, not even in my dreams. That's where the system will need virtual RAM (swap) to think that you have more RAM.
Let's say I have 6 GB of physical RAM, 3 GB is used for
active processes, and the game needs 5 GB of RAM... Will it play?
Yeah, it will. Linux will cache the other processes and open WoW, but I will lose my ability to multitask smoothly and quickly. When I Alt + Tab to go to my desktop or to an other application, it will happen in a slow motion, because the system will cache WoW, retrieve the desktop or whatever application I requested from cache and move it to physical RAM which is just now free.

So we only need swap to use applications that need more physical RAM. Also we need swap when we want many active processes at the same time and the active RAM isn't enough. But swap is extremely slow; the hard disk is running 1 million times slower than RAM. What if we could swap in RAM? How? By compressing RAM. That's 1 million times faster than hard disk.

We sacrifice a very tiny amount of CPU load and a very tiny small amount of RAM to get more GB of RAM, but RAM is 1 million times faster than the hard disk, so trust me it's worth it (this is the easiest explanation for everyone to understand).

So:

Don't create a swap partition on installation and if you already have, just boot a live session from USB stick and remove the swap partition using GParted or any other partition manager and do what you like with the extra hard disk space you just got. Then reboot (that will take time as it tries to mount a partition that's not there. Don't be scared; it will boot or I wouldn't be here writing it). When you boot open terminal and do:

sudo nano /etc/fstab

delete the line referencing the swap partition from the file, save and reboot.

Now you boot again fast, even faster than before since you boot a partition less. So we just increased our disk size, and we gained boot time.

Let's now install zram and customise it to our needs.

Open the terminal again and do:

sudo apt-get install zram-config

Reboot

Open the terminal again and do:

sudo cat /etc/init/zram-config.conf

What does that file say? That zram is created on boot using the file

pre-start exec /usr/bin/init-zram-swapping

and that's exactly what we are going to edit:

sudo nano /usr/bin/init-zram-swapping

at line

totalmem=`LC_ALL=C free | grep -e "^Mem:" | sed -e 's/^Mem: *//' -e 's/  *.*//'`
mem=$(((totalmem / 2 / ${NRDEVICES}) * 1024))

change 1024 to whatever you like. I put 512, but it can be any number, anything! It doesn't need to be in byte form 128, 512, 1024, etc. It can be anything!

Then edit the line

swapon -p 5 /dev/zram${DEVNUMBER}

and change 5 to whatever priority you want. That's your swappiness.

Press Ctrl + O to save and Ctrl + X to exit.

Reboot.

Check your swap. Open the terminal and do

cat /proc/swaps

Isn't your pc faster or what?

I came up with this idea when I made an old Android phone run fast as hell with Android 7.1.1 when the official last update it got was years ago Android 4.0 (Ice Cream Sandwich), and I needed more RAM to run newer apps, but I didn't want to lose speed. Well, OK we lose some speed , but that's nothing compared to the speed we lose when swapping to a slow hard disk, or a hard disk generally. Those with newer machines will not notice big difference, but they DO get more speed, and older machines will be happy faster again.


How to get my custom .desktop file into the unity launcher?

Did you try to write bash file for example
just create a file and write this in

#!/bin/bash

cd dir_name; #the dir name to go

love-unstable mari0_1.0.love; #run the soft

then write in terminal chmod +x name_what_you_place
then you can just create a shortcut of that file.


Okay, I found the bunch of commands that helps to re-create p12 file with password:

First, you need to split p12 into cert and key file:

openssl pkcs12 -in vpn.p12 -out vpn.crt.pem -clcerts -nokeys
openssl pkcs12 -in vpn.p12 -out vpn.key.pem -nocerts -nodes

And then combine them together:

openssl pkcs12 -export -in vpn.crt.pem -inkey vpn.key.pem -out vpn2.p12

You will be asked for a password, just enter the password you want


Assuming you know your own external ip address, I can offer this quick solution:

You want to install openssh-server on your server like so:

sudo apt-get install openssh-server

Then, you need to forward port 22 in your router to your server, in order to access your it from the outside.


Installing Debian on Ubuntu 18.04 on a MacBook

what command did you use to make the bootable usb? If, say, you mounted the usb as /dev/sdb, the command should be

$ sudo dd if=your_debian_file.iso /dev/sdb

[ just checking... ]
If you did so, can you try the usb on another computer, see if it boots?
[ to make sure there is nothing wrong with the usb you're using ]


Shortcuts stop working on cyrillic layout after some amount of time

That's because the applications you're running support "english" keyboard shortcuts, since they're custom-defined.

"Russian" shortcuts will only work if they have been defined during development as an appropriate shortcut...


Is there a way to configure Unity Panel to autohide?

I have found interesting solution here. Just quote it here:

I use the wmctrl command utility to toggle apps between fullscreen mode. In fullscreen mode, they hide the top menu bar and the unity bar. However, you can still access the unity sidebar by pressing the Super key.

wmctrl -r ":ACTIVE:" -b toggle,fullscreen

This command toggles the current focused app between fullscreen mode and not. I then have this binded to F1 and use that to switch apps.

You may want to automate binding. Its possible through Compiz.


Could not find wx-config error when building Audacity from source

To compile Audacity under Xenial Xerus (bearing in mind that there is also a reasonable Xenial Repository version of 2.1.2 available) use the following:

Use the build dependencies:

Activate the 'Source' Repositories by following this trail:

Dash > Software & Updates > Ubuntu Software > Source Code

Click on the 'Source Code' box and allow the Repositories to reload. Then install the build dependencies and a few extras:

sudo apt-get build-dep audacity
sudo apt-get install checkinstall

Download Audacity source and build:

Use the following single command to automate the whole process:

mkdir -v $HOME/Desktop/audacity_build && cd $HOME/Desktop/audacity_build && \
wget https://github.com/audacity/audacity/archive/Audacity-2.1.2.tar.gz && \
tar xvf Audacity-2.1.2.tar.gz && cd audacity-Audacity-2.1.2 && \
./configure --without-ffmpeg && make -j 4 && \
sudo checkinstall --pakdir "$HOME/Desktop/audacity_build" \
     --backup=no --deldoc=yes --pkgname audacity --pkgversion 2.1.2 \
     --fstrans=no --deldesc=yes --delspec=yes --default

If you are interested in living on the edge a little more you could always try the git repository with a few small modifications to the code above...

Keep your version:

Not a bad idea to pin your package, since you will doubtless be experimenting with your build:

echo "audacity hold" | sudo dpkg --set-selections

And then a newer repository version will not trump your own...

Notes:

Compile failed against FFmpeg so it is removed from the process (./configure --without-ffmpeg). This will limit a few of the export and import capabilities of Audacity but you may not use this? Worthwhile to get to the bottom of this failure nevertheless...
Remembering that a simple sudo apt-get install audacity will get a decent version of Audacity 2.1.2 under Xenial Xerus...


pushd with no arguments swaps the top two entries on the stack, allowing you to effectively cd back and forth between them.

Starting out in d1, execute pushd d2 adds d1 and d2 to the stack and leaves you in d2.
Execute pushd again with no arguments, and you're back in d1 with d1 and d2 reversed on the stack.


Changed files are not recognised on mounted drive

This is how I fixed it:
http://viraj-workstuff.blogspot.com/2013/07/vmware-fusion-permissions-on-shared.html

VMWare should be able to use this fix this for once and all.

sudo vim /etc/vmware-tools/services.sh
Search for 'vmhgfs_mnt="/mnt/hgfs"'. After this line add: 'vmuser=${VMWARE_MNT_USER:-root}'
Then search for 'vmware_exec_selinux "mount -t vmhgfs .host:/ $vmhgfs_mnt"' and replace it with following section:
uid=id --user $vmuser
gid=id --group $vmuser
vmware_exec_selinux "mount -t vmhgfs .host:/ $vmhgfs_mnt -o uid=$uid,gid=$gid"
sudo vim /etc/init/vmware-tools.conf
Before the "pre-start" and "post-stop" lines add:
env VMWARE_MNT_USER=[The guest user you want]
sudo reboot


Can't find any easy way to run Quake II on Ubuntu

Hi and welcome to askubuntu!

Great to hear that you feel you're getting comfortable using the terminal and Ubuntu. I'm pretty certain I speak for a vast majority of linux users when I say that if you can find the joy of exploring how thing works within linux, fixing stuff wont seem like such a chore anymore. Happy exploring and don't be afraid to play around with Ubuntu :-)

In regards to your question I can't really give you any guidance, without error messages and/or other terminal outputs. Try to run your game with your terminal environment through wine with "wine quakeii.exe" or equivalent. If you run man wine you will probably find a verbose option (maybe -v?). Try to invoke the verbose option if it exists and "wine quakeii.exe" doesn't yield any results, e.g. like this: "wine quakeii.exe -v"

The good news is that according to the appdb of WineHQ, Quake II should be runable on Ubuntu. Try to post the error messages on WineHQ, or in the IRC-channel #winehq on irc.freenode.net.

You could also check out PlayOnLinux which uses a modified version of Wine, which is optimized for certain games through user-patches and more. (I have never used PlayOnLinux myself, so I could be wrong here, but you should research it and find out if it's suitable for your situation)

Good luck


Wrong window focus behaviour in Unity, but not GNOME Shell

Update:

According to Launchpad bug #770283, this is now fixed in Ubuntu 12.04 with the latest updates.  I've not personally tested it, as I'm now using the open-source drivers, but from what I've read, it fixes the problem.

Original answer:

Sadly, there doesn't seem to be a fix yet.  There is a bug report for Compiz (the window manager running Unity), but no developers have responded.  See Launchpad Bug #856138

I suggest logging in or registering on Launchpad and marking the bug as "Affects me too" (you can also do it by clicking this link)

Do you have an ATI graphics card?  My laptop with an ATI Mobility Radeon HD 4500 Series graphics card has this same issue on 11.10 and 11.04.  However, my NVidia desktop did not experience this glitch, so I'm thinking ATI's driver may be part of the problem.


Ubuntu 12.04: Adobe flash Player crashes, can't watch YouTube

Solution lies slightly away from package management. Adobe ships new version compiled with sse2 flag, so it is now defunct on older computers (like mine Sempron 2400+)
Problem is solved by replacing libflashplayer.so by hand.

mkdir /tmp/install_flash
cd /tmp/install_flash/
wget http://engels.manf.nl/archive/flash/flashplayer11_1r102_63_linux.i386.tar.gz
tar -xvzf flashplayer11_1r102_63_linux.i386.tar.gz
sudo cp libflashplayer.so /usr/lib/adobe-flashplugin/

enjoy.

Also, you can download plugin from official site from 'archive' section.


802.1x. Different options from WIFI to Wired

The problem is solved.

OS was Ubuntu and there was a incorrect implementation of config options.

Now works fine.


Answer: the file permission for the id_rsa.pub (public key) was 600, should be 644


How to disable my inboard ( intel ) graphic card

Here is what you need to do.

If you use the Driver Manager/Additional Drivers (Jockey) Utility and select the available nvidia driver. You can install the nvidia drivers properly.

Upon Reboot, you can use the Nvidia X Server configuration Utility(nvidia-settings) to Select. Either Performance Mode or Power saving Mode.

In the power saving mode only Intel Graphics Card stays Active and in the performance mode only Nvidia Card Stays active. By default once you Install the nvidia-drivers nvidia Card will stay active. Switching from One card to the other card does require you to logout and login again.

Since you only want to use the nvidia card You should be good after installing the drivers using the Additional Drivers utility (Jockey).

Please post here if this does not resolve your issue.

If you want to use the latest drivers for Nvidia card, Please use the ppa:graphics-drivers/ppa

Note: Please stay away from nvidia-361 drivers as they have issues.


Some icons are missing after install ark theme

Ran into the same exact problem. After searching online I did find the solution:

Navigate to /usr/share/icons/Arc-Icons. You should see a file named index.theme.

We need to edit that file using a text editor (nano, gedit, etc), however we will need root access first. For simplicity's sake, just right-click anywhere in that folder and select "open terminal" and you should get a terminal in the same directory (/usr/share/icons/arc-icons).

Next, type in sudo nano index.theme, and provide your password. It should open up a text editor. Scroll down until you see this part:

[Icon Theme]
Name=Arc
Inherits=Moka,Adwaita,gnome,hicolor
Comment=Arc Icon theme

Now, the line Inherits= is the one you want to edit, as  basically it tells the system what icons to use if Arc is missing any icons. Change it so it looks like this:

[Icon Theme]
Name=Arc
Inherits=ubuntu-mono-dark
Comment=Arc Icon theme

This will set Arc to use the default Ubuntu icons for any missing icons, which as we've discovered it's missing several (Additional Drivers, Terminal, Software Updates, etc). Once you've edited the file, save and exit (Ctrlo then Ctrlx if you're using nano), then reboot your system. You'll notice that you still have Arc icons except for the missing ones, they revert back to default icons. Feel free to substitute ubuntu-mono-dark for your preferred icons.


Ubuntu doesn't add hard drive to media folder

Yes you can.  Create a folder in the /media folder:

sudo mkdir -p /media/extra_drive

Then get your UUID of the drive to be mounted:

sudo blkid

Take note of the UUID= like UUID="98b0a711-18a1-4303-b374-0c8d31bae473".  Also, take note of the TYPE= as this will be used when creating the line used in /etc/fstab

Then add an entry to your /etc/fstab file with the UUID=:

UUID=98b0a711-18a1-4303-b374-0c8d31bae473 /media/extra_drive ext4  defaults 0 0

Now, every time you boot the computer up that drive should mount at the same point.

Hope this helps!


Ubuntu 20.04.1 upgrade failure / ERROR Dist-upgrade failed: 'Broken packages after upgrade: colord'

After all helpful hints, questions and comments I became inpatient with myself and decided to give the upgrade another try. Here is what I did:

sudo apt-get remove colord
sudo apt-get remove mesa-utils - This also removed ubuntu-desktop

This unblocked the do-release-upgrade command. No reboot at this step.

sudo do-release-upgrade

After ~2h of downloading the upgrade process requested a reboot. I confirmed. The upgrade went well - the system started.
After inspecting the new operating system I noticed that I could neither open the Settings nor change the background image nor could I install ubuntu-desktop or gnome-control-center. Also no files where shown on the Desktop although I could ls them in the folder.
After a while I figured that these packages where still blocked by some mesa packages originating from ppa:kisak/kisak-mesa.

I decided to completely remove all mesa package via Synaptic Package Manager
sudo apt-get install gnome-control-center which transitively installed mesa packages
sudo apt-get install ubuntu-desktop
Reboot.

After restarting the system all files on the Desktop where shown, I was able to launch the Settings and change the background image. - Thank you everyone!


Recovery Mode will not delete any of your data merely by entering it (or merely by trying it).
It is NOT a "System Restore" or "System Reset". It's merely access to a root prompt so you can troubleshoot and fix problems yourself.


SSH- Starting an application on client instead of server

With the -X flag you are enabling X11 forwarding. That means when the ssh server is configured the same...

# cat /etc/ssh/sshd_config | grep X11
X11Forwarding yes
X11DisplayOffset 10

...you are forwading the window from the target machine to your local machine. So firefox IS started on the target machine, BUT it is displayed on your local machine.


Try the following in a Terminal window:

vlc --reset-config --reset-plugins-cache

and this might be enough to get vlc working correctly...


Can not update Ubuntu - failed to fetch error

I think your link is wrong, try this one

deb  http://cran.at.r-project.org/bin/linux/ubuntu precise/


Unable to access network. How do I install the wi-fi drivers for my laptop?

Since you have said that you have "downloaded the necessary tar.gz" file, I'm assuming that you know the package name of the driver that you require. Once you have the correct package name (dmesg | grep -i wireless will give you your wlan device and you can google for it to get its driver package's name) you can refer to the following link to download the .deb files remotely from a system that has internet.

http://ershadk.com/blog/2010/06/13/how-to-download-deb-packages-for-offline-installation-2/


sudo apt-get clean
sudo apt-get autoclean
sudo apt-get remove --purge mysql-client-5.5 mysql-client-core-5.5 mysql-common mysql-server mysql-server-5.5 mysql-server-core-5.5
sudo apt-get install mysql-server

credit to Ubuntu forum


2560 x 1080 Screen Resolution on Ubuntu 14.04

2560x1080 for a 29" ultra wide monitor is not supported on Ubuntu 14.04 and 14.10.

Bug report: https://bugs.launchpad.net/ubuntu/+source/xrandr/+bug/1357804


it appears that you have mixed packages 32 and 64 bits. Your kernel is improperly installed  : linux-headers-3.8.0-33

Desactive ppa and launch this command :

sudo apt-get install -f

Send the result


how to enable and disable php7 modules in linux server 16.4

You can simply use the command phpenmod.


How can I control the KDE monitor configuration from a script?

The xrandr utility can be controlled from a script.  The configuration shown in the screenshot can be obtained by running the command:

xrandr \
 --output LVDS-1 --mode 1680x1050 --pos 1080x1120 --rotate normal \
 --output DVI-D-1 --off --output VGA-1 --mode 1920x1080 --pos 0x0 --rotate left

To generate this command line, I used arandr.  It presents a dialog something like the one in the original question, but simpler, and then has a "save" option which saves the correct xrandr invocation to a file.

After using the arandr dialog to configure the monitors the way I want them, I save the configuration to a file, say ~/.screenlayout/office.sh.  Executing this file as a shell script restores the saved configuration.  I wrote a trivial shell script, disp, which executes $HOME/.screenlayout/$1.sh, so when I get to the office I just type disp office on the command line to restore the office monitor configuration.  When I go home I type disp 1, which runs ~/.screenlayout/1.sh, where I have saved the default one-monitor configuration.

Still no answers to the other questions in my post, although probably the dialog in the original question is running xrandr itself to change the screen configuration.


Install Ubuntu without creating a user account

Yes, you can.

Boot your installation disk (I recommend 12.04 LTS, because it will be supported until 2017). Press Shift to get to the boot menu.
Press F4 and select OEM Install.
Install. It will ask for a temporary user name and password.
Boot into the system. Tailor to your heart's content.
Once working, open Prepare for shipping to end user.
Do not boot into the system again.

You may want to clone an image of the drive as a backup (try CloneZilla or RedoBackup).


Try looking for a function key on your laptop keyboard to switch monitors. It will usually have some sort of a little screen pic on it. On my laptop it is

Fn+F7

Run Your LiveUSB again and press whichever it is on your laptop. If you can't tell which one it is try all the fn combos (F1 through F12) until you get a display on your ext monitor. After pressing each time wait a moment for your card to redirect the output.

If this doesn't work check your PCs user manual. Sometimes special keys need some kind of drivers to work.


How to see if process is "non-responsive"?

you can check diskIO and cpu usage of those processes. it wont give a definitive answer but it will show you if the process is busy.

sudo iotop | grep [your pid here]
top | grep [your pid here]


xserver-xorg-video-intel - 2:2.21.6 has a bug - how do I update?

I cannot find this bug in the Ubuntu bug tracker:

https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bugs

What you need to do is file a bug about the issue in launchpad, and then link to that upstream bug with the fix so Ubuntu developers become aware.

How do I report a bug?

And then to link it to the other bug tracker follow these instructions (the part about marking "Also affects"):

https://wiki.ubuntu.com/Bugs/HowToTriage#Forwarding_upstream

You can also bring the bug to the attention of the Ubuntu X developers themselves by checking out the developer mailing list. Since the bug is a crasher and there is a known and tested fix upstream you have a good chance of that being backported/fixed for raring.


By default, GNU find does not follow symbolic links, not even when considering command-line arguments. From man find:

The -H, -L and -P options control  the  treatment  of  symbolic  links. Command-line  arguments  following these are taken to be names of files or directories to be examined, up to the  first  argument  that  begins with  '-', or the argument '(' or '!'.
-P Never follow symbolic links.  This  is  the  default  behaviour.  When find examines or prints information a file, and the file is a symbolic link, the information used shall be  taken  from  the properties of the symbolic link itself.

If ACCESS is (or may be) a symbolic link to a directory and you want to find files inside even if is is a symbolic link then you must say find -H ACCESS.


You should install screen on machine C. Eg:
ssh box-c
sudo apt-get install screen
screen

You'll be in a new shell
scp foo@box-d:somefile .
<ctrl-a><d>

You'll see a message about being detached, logout and shut down your other machines. At some point later you can ssh back to box-c and run screen -r to reconnect to your shell. Then exit the shell and screen will exit.


The kernel team wiki contains a page that helps diagnose power consumption issues: https://wiki.ubuntu.com/Kernel/PowerManagement/IdentifyingIssues

In your example, init is really way too busy for some reason, which looks just plain wrong. If this persists and does not change, then one should file a bug, as init should be using only a small slice of CPU.


Trying to Rip Single Title with 9 chapters on owned DVD using vobcopy

It might be worthwhile trying the same with tccat:

tccat /home/aadrik/Dr. \Who/DOCTOR_WHO_S8_DISC2.iso -d 2 -T 9,-1,1 > test.vob

tccat is a part of the transcode package:

sudo apt-get install transcode

It would be interesting to see if tccat can make a cleaner extraction...


How to install the Ceton Infiniti PCIe digital cable tuner card?

I finally got this working, but I didn't (couldn't) use stock Ubuntu.  I'm going to write up what I did, but I'm going to put it as an addendum to the official talk page on MythTV.  You should be able to find it at the official page when I'm done.

Key Points:

You need to get and build the drivers from Ceton.  They don't come in Ubuntu 12.04 either as a kernel module or add-on code in apt.  If you update your kernel, you will have to manually re-install the drivers.
You need to make sure your computer speaks to 192.168.200.1 over the ctn0 interface.  If you have no ctn0 interface, see the above bullet point.
I couldn't get this to work in MythTV 0.25; I had to use MythBuntu's add-on package to upgrade me to MythTV 0.26.  Then it worked.
You can't search for channels.  You'll need SchedulesDirect in the United States or something similar in your home country to get your appropriate channel list.  If you have a channel list, not searching for channels is perfectly fine.
You should use mplayer to test your CableCARD setup:

cat /dev/ceton/ctn91xx_mpeg0_0 | mplayer -cache 8192 -


Explanation of the command to check shellshock

This answer is a derivative of an original article on Fedora Magazine by Matthew Miller, licensed under the Creative Commons Attribution-Share Alike 4.0 license.

Let me explain:

env x='() { :;}; echo OOPS' bash -c :

This will print “OOPS” on a vulnerable system, but exit silently if bash has been patched.

env x='() { :;}; echo OOPS' bash -c "echo this is a test"

This will print “OOPS” on a vulnerable system, but print “this is a test” if bash has been patched.

And you’ve probably heard that it has something to do with environment variables. But, why is code in environment variables getting executed? Well, it’s not supposed to be — but, because of a feature which I’m tempted to call a bit too clever for its own good, there’s some room for a flaw. Bash is what you see as a terminal prompt, but it also is a scripting language, and has the ability to define functions. You do that like this:

$ Ubuntu()  { echo "Ubuntu is awesome."; }

and then you have a new command. Keep in mind that the echo here isn’t actually run yet; it’s just saved as what will happen when we run our new command. This will be important in a minute!

$ Ubuntu
 Ubuntu is awesome.

Useful! But, let’s say, for some reason, We need to execute a new instance of bash, as a subprocess, and want to run my awesome new command under that. The statement bash -c somecommand does exactly this: runs the given command in a new shell:

$ bash -c Ubuntu
  bash: Ubuntu: command not found

Ooh. Sad. The child didn’t inherit the function definition. But, it does inherent the environment — a collection of key-value pairs that have been exported from the shell. (This is a whole ‘nuther concept; if you are not familiar with this, trust me for now.) And, it turns out, bash can export functions as well. So:

$ export -f Ubuntu
$ bash -c Ubuntu
  Ubuntu is awesome.

Which is all well and good — except that the mechanism by which this is accomplished is sorta dodgy. Basically, since there is no Linux/Unix magic for doing functions in environment variables, the export function actually just creates a regular environment variable containing the function definition. Then, when the second shell reads the “incoming” environment and encounters a variable with contents that look like a function, it evaluates it.

In theory, this is perfectly safe, because, remember, defining a function doesn’t actually execute it. Except — and this is why we’re here — there was a bug in the code where the evaluation didn’t stop when the end of the function definition was reached. It just kepts going.

That would never happen when the function stored in an environment variable is made legitimately, with export -f. But, why be legit? An attacker can just make up any old environment variable, and if it looks like a function, new bash shells will think it is!

So, in our first example:

env x='() { :;}; echo OOPS' bash -c "echo this is a test"

The env command runs a command with a given variable set. In this case, we’re setting x to something that looks like a function. The function is just a single :, which is actually a simple command which is defined as doing nothing. But then, after the semi-colon which signals the end of the function definition, there’s an echo command. That’s not supposed to be there, but there’s nothing stopping us from doing it.

Then, the command given to run with this new environment is a new bash shell, again with a “echo this is a test” or “do nothing :” command, after which it will exit, completely harmlessly.

But — oops! When that new shell starts up and reads the environment, it gets to the x variable, and since it looks like a function, it evaluates it. The function definition is harmlessly loaded — and then our malicious payload is triggered too. So, if you run the above on a vulnerable system, you’ll get “OOPS” printed back at you. Or, an attacker could do a lot worse than just print things.


Recursively copy (and rename) files to their own same directory with another name

This little script comes to help exactly in this situation.

Given a starting directory, a file name pattern, an original file name portion to change and the destination file name portion to use, it will:

Deep copy all the matching files preserving attributes over new ones (copy)

or

Deep rename all the matching files to the new names (rename)

or

Just show a preview list of the potentially affected files (preview).

The last option is expecially useful because selecting the right match that covers a mass of files with names variations or extensions variations may quicky become a challenge. Avoid getting a complete mess by previewing the changes before applying them!

The script is very simple and has NO pretense about being the best, the quickest, the cleanest, the safest. It's what works for me and I have decided to share it in hope somebody else will take benefit.

If you start it with no parameters or a wrong command, it will show some brief instructions:

./copy_multi_files.sh

Usage:
./copy_multi_files.sh command path name_pattern src dest
If command is 'copy' then the script copies src to dest
If command is 'rename' then the script renames src to dest
If command is 'preview' then the script just shows the matched files
Inside path, for every file name matching name_pattern, it copies every src file to dest file

Parameters:

Command: it may be one of copy, rename or preview. Copy performs the recursive deep copy onto new files, rename just mass renames existing files, preview just shows which files will be affected and how.
Path: it's the starting directory. I suggest doing experiments on small directories to get confidence with the script before trying on your 4 peta-trillion entries file system.
Name_pattern: this decides which files shall be affected, so it's important to pick a sensible value. In example, if I wanted to select a lot of scripts whose name starts with "sendmail" I could specify s* for this parameter. For those who know about shell commands, this pattern is internally passed to find.
src: this is the portion, a template of file name to replace with dest when forming the copied files names.
dest: this is what replaces src in the new copied files names.

A bit of sanity check is performed so that name_pattern and src produce consistent results. That is, only files that match name_pattern and also contain src are selected.

Confusing? Don't worry, I have prepared some examples and "gotchas".

Simple, one folder example:

We have some files in a sub-directory called:
apps/res/

We want to copy all the files whose name contains the word: sendmail into new files that in place of sendmail have newthing.

Here is a partial list of apps/res/ contents:

robot.php
sendmail_test.php
sendmail_test2.php
sendmail_test3.php
showinfo.php
show_server_vars.php
version.php

We may issue the following command:

./copy_multi_files.sh preview apps/res/ s* sendmail newthing

This command line tells us that we just want a preview; the starting directory is apps/res/ (that is, it's under our current directory), that we are going to search for all files beginning with s (s*). Among the found files, we are going to pick only those whose name contains sendmail and copy them to files residing in the same directories but with sendmail replaced by newthing.

Here is the output of this preview:

apps/res/sendmail_test.php => apps/res/newthing_test.php
apps/res/sendmail_test2.php => apps/res/newthing_test2.php
apps/res/sendmail_test3.php => apps/res/newthing_test3.php

You see, even if we specified s* as search pattern, the script was "smart" enough to just pick the subset of "beginning by s" files that also contains "sendmail".

Let's run the command:

./copy_multi_files.sh copy apps/res/ s* sendmail newthing

ls apps/res/ will show how now we have both the original files but also the same files with newthing. If we used "rename" in the line above, we'd only have the newthing files.

newthing_test.php
newthing_test2.php
newthing_test3.php
robot.php
sendmail_test.php
sendmail_test2.php
sendmail_test3.php
showinfo.php
show_server_vars.php
version.php

Let's change the files again. This time we rename them:

./copy_multi_files.sh rename apps/res/ new* new even_newer_

Notice the values used for the various parameters. The directory now is the following:

even_newer_thing_test.php
even_newer_thing_test2.php
even_newer_thing_test3.php
robot.php
sendmail_test.php
sendmail_test2.php
sendmail_test3.php
showinfo.php
show_server_vars.php
version.php

More complex example: let's move to OpenCart's top install folder and return to the the bank transfer MVC files. We need to create copies of those files, each in its respective directory. They will be used to implement a direct debit payment module. Here's the command line and an extract of the output:

./copy_multi_files.sh preview . ban* bank_transfer.* direct_debit

./catalog/view/language/russian/payment/bank_transfer.php => ./catalog/view/language/russian/payment/direct_debit
./catalog/view/language/czech/payment/bank_transfer.php => ./catalog/view/language/czech/payment/direct_debit
./catalog/view/theme/default/template/payment/bank_transfer.tpl => ./catalog/view/theme/default/template/payment/direct_debit

Oops! Something went wrong! Lucky us, for having used the preview. What's wrong in the above command? The "src" argument is the wrong one. In fact, bank_transfer.* is internally passed to a direct "search and replace" function (sed). It's not expanded with a "file globbing" function but as regular expression. Therefore all the files in the preview are transformed into: direct_debit.

Now that we know about this gotcha, we can rewrite the command line to achieve the desired result:

/var/www/copy_multi_files.sh preview . ban* bank_transfer direct_debit

./catalog/view/language/russian/payment/bank_transfer.php => ./catalog/view/language/russian/payment/direct_debit.php
./catalog/view/language/czech/payment/bank_transfer.php => ./catalog/view/language/czech/payment/direct_debit.php
./catalog/view/theme/default/template/payment/bank_transfer.tpl => ./catalog/view/theme/default/template/payment/direct_debit.tpl

Now it works! Now extensions are preserved, even when they change (.php and .tpl).

Follows the little script source code. I strongly suggest to save backups before doing "live" renames and to always use the preview functionality. Remember, this is a recursive Unix script, its effects may be extremely nasty and irreversible!

Source code:

#!/bin/sh

if [ "$#" -eq 0 ] || ( [ "$1" != "preview" ] && [ "$1" != "copy" ] && [ "$1" != "rename" ] )
        then
        echo "Usage:"
        echo "$0 command path name_pattern src dest"
        echo "If command is 'copy' then the script copies src to dest"
        echo "If command is 'rename' then the script renames src to dest"
        echo "If command is 'preview' then the script just shows the matched files"
        echo "Inside path, for every file name matching name_pattern, it copies every src file to dest file"
        echo
        exit 1
fi

for f in $(find "$2" -type f -name "$3" -name "*$4*" )
do
        z=`echo "$f" | sed s/"$4"/"$5"/`

        case "$1" in
                "preview") echo "$f => $z"
                ;;
                "copy") cp -p "$f" "$z"
                ;;
                "rename") mv "$f" "$z"
                ;;
        esac
done


Is OpenCL yet supported in Ubuntu with open source drivers?

To get it working on Ubuntu 16.04 I had to:

Download the AMD app sdk: http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx
sudo apt-get install opencl-headers
sudo apt-get install mesa-opencl-icd

When compiling your program all the relevant files can be found in /opt/AMDAPPSDK-3.0 (given that you don't change the default location and with 3.0 the version that I installed; this might be different depending on the version). Don't forget to pass the include and lib directories as -L and -I flags!

One specific problem that I also had was that the /opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so was actually a soft link to somewhere. But somehow the soft link broke (you can check this by right clicking and selecting properties), so it was impossible for me to compile (kept getting "lOpenCL cannot be found" errors even though I included the relevant directories as -L and -I flags). So I had to delete libOpenCL.so in the x86_64 folder and replaced it with a new symlink to the libOpenCL.so in the sdk folder. Then my program compiled and ran without errors.

Here's a nice example program to test your OpenCL environment: http://www.eriksmistad.no/getting-started-with-opencl-and-gpu-computing/. The only thing I had to add to the compile command were the appropriate -I and -L flags.


VirtualBox shared folder is accessible but not workable

I experienced the same issue. My setup: VirtualBox 4.2.12 with Ubuntu 13.04 guest running on W7SP1 host, mounted Windows folder with fstab like this

dev /home/dregad/dev    vboxsf  auto,rw,uid=dregad,gid=dregad,umask=0022,dmode=0755,fmode=0644  0   0

I'm using Geany. Saving the file fails with similar symptoms as described in the question above for gedit (which fails too). Error message as follows:

Error saving file.
Error renaming temporary file: Text file busy
The file on disk may now be truncated!

My solution for Geany:

Edit / Preferences
Select Various tab
scroll down and check the box for use_atomic_file_saving
click OK

I don't use it much, so not sure if gedit provides a similar trick, but FWIW, you may want to have a look at this stackexchange question as it offers a workaround.