Version numbers are actually pretty tough to compare given that they're often not standard mathematical comparisons (this one for instance has two decimal points that makes bc throw up).

Therefore I turn to a lesser-known option in sort that can be used to sort version strings. Consider the following:

$ echo -e "v0.1.5\nv0.1.6-2-p343h3d3" | sort -V
v0.1.5
v0.1.6-2-p343h3d3

oli@bert:~$ echo -e "v0.1.5\nv0.1.4-2-p343h3d3" | sort -V
v0.1.4-2-p343h3d3
v0.1.5

This basically means we can sort the versions so the latest is on the last line. All we have to do then is a string comparison against the last line, inside an if, or a shortcutted-if:

[[ $(echo -e "v0.1.5\nv0.1.4-2-p343h3d3" | sort -V | tail -1) != "v0.1.5" ]] && echo NEWER

Play around with the v0.1.4-2-p343h3d3 string. If you stick it up to 0.1.6 it'll echo out.

Now to bring this all back around to your command:

[[ $(echo -e "v0.1.5\n$(${HOME}/temp/.git describe --always --tags HEAD)" | sort -V | tail -1) != "v0.1.5" ]] && echo NEWER

Or you could break it down for readability:

THRESHOLD="v0.1.5"
VERSION=$(${HOME}/temp/.git describe --always --tags HEAD)
if [[ $(echo -e "$THRESHOLD\n$VERSION" | sort -V | tail -1) != "$THRESHOLD"  ]]; then
    echo GREATER
fi


Two copies of Ubuntu loader detected by Boot Manager

It seems that by upgrading Ubuntu to a newer version you also updated a kernel. GRUB sees both (actually, the log says that there are 3 kernels up, not sure why you see only two) kernels and identifies them as kernels for Ubuntu. It simply means that there's a different version of the engine.

To remove an older kernel, simply run apt-get autoremove[1] procedure on any of those Ubuntu instances. Most likely you'll also need administrative privileges for removing packets, thus the command would be sudo apt-get autoremove

[1] - manual for apt-get states:

autoremove
autoremove is used to remove packages that were automatically installed
to satisfy dependencies for some package and that are no more needed.


From the FAQ:

I have a laptop with Nvidia card and an integrated graphics card, how can Bumblebee help me?
By disabling the nvidia card, power is saved. This improves battery life. If you need more graphical performance, Bumblebee can run the program using the Nvidia card.

So, yes.


I messed up and changed the partition type of /dev/ubuntu-vg

I realize you've re-installed Ubuntu, so the below is largely moot; however, in case somebody else has a similar problem, I'll respond fully. You may want to skip to the last paragraph for advice on avoiding this sort of problem in the future....

It sounds like /dev/sdb2 had been an extended partition that held the logical partition, /dev/sdb5. Ordinarily, partitioning tools don't let you change the type of an extended partition, since doing so is almost always a Bad Idea. It sounds like you used some badly-written software that didn't impose such a sensible restriction, though -- or perhaps you used a low-level disk editor, which you should never do unless you're an expert on whatever you're trying to edit. In any event....

The first thing you should do is to perform a low-level backup of the entire disk, or at least of /dev/sdb2. Something like this should do the trick:

sudo if=/dev/sdb of=/path/to/lots/of/space/sdb-backup.img

This command backs up /dev/sdb to /path/to/lots/of/space/sdb-backup.img, which as the name implies should be a directory with lots of free space -- at least 119.2 GiB, in your case, since that's the size of /dev/sdb. Having a backup will enable you to recover to the current state, in case something further goes wrong -- as it might well, since any recovery attempt runs the risk of creating new and worse problems.

With the backup made, the best recovery approach is probably to delete /dev/sdb2 using Linux's fdisk. I emphasize the use of fdisk because I know it won't write into /dev/sdb2, just delete the data structures that define it. I don't know if whatever you used to change the type of /dev/sdb2 might do more than this.

With that done, use TestDisk to recover your lost partition(s). This tool scans a disk for signs of filesystems and other data structures that reside in a partition, such as LVM definitions. Note that you want TestDisk to recover your LVM, not the logical volumes that reside inside it. Thus, if TestDisk gives you the option of recovering an LVM or (say) an ext4fs partition, tell it to recover the LVM. With any luck, when you reboot you'll see your LVM restored.

Using an LVM can simplify filesystem changes within the LVM, but if you need to reallocate space outside of the LVM, the LVM actually complicates matters. Some versions of GParted won't touch an LVM physical volume (partition), since it doesn't know how to resize it. To resize an LVM setup, you must jump through some extra hoops, which are described (among other places) here and here. I generally prefer creating two or three LVM partitions of varying size so that I can move logical volumes off of one of them, delete it, and re-allocate space outside of the LVM as necessary.


How do I install the Live Wallpaper application?

Test this:

Open a terminal,Press Ctrl+Alt+T

Run it:

sudo add-apt-repository ppa:fyrmir/livewallpaper-daily
sudo apt-get update
sudo apt-get install livewallpaper livewallpaper-config livewallpaper-indicator
livewallpaper-config


Orca screen reader not working after changing settings

I had the same problem and fixed it by doing the setup through the RUN window ie press ALT+F2. Seems it doesn't get to the language setting if try setup using terminal so it runs in the background not doing anything.

So reboot your computer & press ALT+F2, and a RUN box will appear.

Type: orca -t and make sure to tick the Run in terminal box before clicking the Run button.

A menu will appear. I chose 4. espeak  as I was able to get espeak to work independently in terminal on my system. I checked by typing in a new terminal:  espeak "hello" & it spoke to me, wonderful!

Next it came up with a language selection choice. This menu was missing if I tried setup through terminal. Choose your language. I chose Yes for all the subsequent questions except Braile which I set to No. Also I chose option 2. for Laptop.

Press enter at the end, terminal may or may not close but it seems not to matter either way.

You may need to turn on screen reader:

Applications > System Tools > System Settings > Universal Access > follow your nose


No sound with HDMI on an Acer Aspire Revo 3700

You will need to configure the HDMI output in your sound preferences, left click the Cog in the top right corner then select System Settings then select the Sound option.

You will need to select your HDMI output on the Hardware tab,

And Output tabs

Then close the dialog box and it should be working. I have to do this each time I use the HDMI output on my laptop - you will need to change back to the internal audio output if you use speakers from the audio out plug.


How to use external mic but internal speakers?

I can't speak to your hardware but on my laptop it appears that plugging in something on the headphone jack disables the speakers. This is on an HP pavilion laptop; result from lshw -C sound:

description: Audio device
product: FCH Azalia Controller
vendor: Advanced Micro Devices, Inc. [AMD]
version: 01
width: 64 bits
clock: 33MHz
capabilities: bus_master cap_list
configuration: driver=snd_hda_intel latency=32

I used the pulseAudio volume control program to view audio devices. As a test, I set some music playing out of the speakers. PulseAudio shows this playing through the "built-in audio analogue stereo" device. Moving to the output devices tab we see the built-in analogue stereo has some options. After putting in some headphones the options have changed. I can manually switch the port back to the speakers, but no sound came out of the speakers.

So, it seems that this isn't possible to do because the drivers for my speakers/headphone jack don't allow it. Alternate drivers may fix this, but I can't confirm that.


How to install the latest Filezilla from their server

It is recommended that you use the package manager from Ubuntu ... apt-get synaptic. To install it.. it may be a slightly older version (or in this case seems to be a newer version) but it is compiled for Ubuntu. The binaries are compiled for Linux but each flavor of Linux is slightly different.

With the downloaded binaries which it seems  you have downloaded you need to extract the file.

Taken from their site:

After extracting the files to any location (location does not matter,
FileZilla can detect its own installation prefix), you can start the
program using the filezilla executable in the bin/ subdirectory. Please
note that due to differences in distributions, the provided binaries
might not work on your system.


compiz-config-profile-setter crashed with SIGABRT in cssObjectGetInterface

TL;DR:
Try this: In ~/.config/compiz-1/compizconfig/config, change profile = unity-lowgfx to profile = unity and reboot.
(Tested on Ubuntu 16.04 LTS)

Open terminal with Ctrl+Alt+F1

Find config file in compizconfig directory somewhere in your home directory. (In my case, the path was ~/.config/compiz-1/compizconfig/config)

Edit this file with your favourite editor (like vim or gedit)

gedit .config/compiz-1/compizconfig/config

You should find there something like:

[general_ubuntu]
profile = unity-lowgfx

Change unity-lowgfx to unity so it looks like this:
[general_ubuntu]
profile = unity

Save changes and reboot Ubuntu (try reboot in command line)

Solution source: https://bugs.launchpad.net/ubuntu/+source/unity/+bug/1758009/comments/5


Is 100% CPU usage harmful while update-apt-xapi runs?

It is completely harmless. If it were to go on and on and on, you could run:

sudo killall update-apt-xapian-index

to save your CPU from frying :D, which is only likely to be a risk when your system has bad cooling.

To answer your "sub-question", it is not really "acceptable", so much as it is not what is ideal, but it is "acceptable" in the sense that it does not stay going for long enough to cause damage :).

Pro-tip:
When this program is running, stop doing what ever it is you are doing on the computer at the time unless it is critical/important, and if you have the cpu-frequency indicator, set it to performance for the moment, and let the application run through its paces. This way, it will finish faster, and your system will be smoother to use when it's over (because of less of a lock on the resources).


How to solve the problem of high CPU load?

You can use the "top" command to find the program that is causing problem. you can either kill the program if its not necessary or use the package "cpulimit" to limit its cpu usage. To install cpulimit:

apt-get install cpulimit

Check the manpage of cpulimit to get the idea of using it.

****Caution: the cpu limited program will respond slowly as expected so it totally depends on upon what process you are using it.


Process related to Secure Boot taking a lot of CPU

Try disabling Secure Boot from your BIOS and reinstalling VirtualBox.


How to replace non-boot hard drive without reinstalling my operating system?

Your plan sounds good, except where I would copy the existing home to a /home folder on the SSD. You may limit this to just the user configuration data, and the user folders "Documents", "Music" etc. without any files in them if space is an issue. Removing the entry in /etc/fstab for your separate home would then automatically bring you on the copy. The system will boot, and you can then allocate the other data how you see fit.
A way how to go from a separate home partition to a home partition on the root partition is outlined in detail here: Move separate /home partition to the default configuration /home folder.
When you have the new drive
Once you have a new drive, you could reverse the proces, i.e., create a separate home partition again. However, if space on your SSD permits, you could also opt to leave the user configuration data on the SSD and symlink the user folders containing the user's files to the new drive. The latter is much easier to do, and boils down to the same experience for the user.


Ubuntu installed along side Win 8 but not shown in boot

Solved this by using Boot-Repair explained here


In Windows 8, 8.1, or 10 you have to change the power button options to shut down windows then uncheck fast boot to keep windows from hibernating


This is related to which color scheme you choose in Font & color prefrences of your gedit. For me I choose Classic

Now to see how it highlights open the xml of the color scheme

gedit /usr/share/gtksourceview-3.0/styles/classic.xml

Here is a sample of output:

<!-- Bracket Matching -->
  <style name="bracket-match"               foreground="#white" background="#grey" bold="true"/>
  <style name="bracket-mismatch"            foreground="#white" background="#red" bold="true"/>

  <!-- Search Matching -->
  <style name="search-match"                background="yellow"/>

  <!-- Comments -->
  <style name="def:comment"                 foreground="blue"/>
  <style name="def:shebang"                 foreground="blue" bold="true"/>
  <style name="def:doc-comment-element"     italic="true"/>

Then you can know that grey color is used for bracket matching and blue color for comments and yellow for search, etc...

You can check the other schemes from their xml files founded in the path:

/usr/share/gtksourceview-3.0/styles/

Also, as a hint you can use this xml to change the colors as you like so you can customize each scheme to your needs or likes


How to install php7.1 on Ubuntu16.04 without Apache?

As you can see with, e.g., apt show php7.1, php7.1 depends on libapache2-mod-php7.1 OR php7.1-fpm OR php7.1-cgi. If none of those packages are installed, Apt will install the first one, libapache2-mod-php7.1, which in turn depends on Apache. But you want to install php7.1-fpm instead; in that case you can either install it before php7.1 or simultaneously (i.e., sudo apt install php7.1 php7.1-fpm).


There are two ways of enabling WiFi after sleep. The first is a common patch to Network Manager as you can see I've made by listing the file:

Turn off or enable power savings as illustrated below:

$ cat /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf
[connection]
wifi.powersave = 3
# Slow sleep fix: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1670041
#wifi.powersave = 2

Edit the Network Manager file shown above.
Change WiFi.powersave from 2 to 3 (Enable power saving).
If it's already set to 3 try setting it to 2 (Disable power saving).
After saving the file run sudo systemctl restart NetworkManager

The second is a systemd script which reloads the WiFi kernel module when resuming from suspend. It comes from this answer: Wifi available networks not showing up suddenly:

This script is written for iwlwifi` which is the common Intel driver name. If your's is different change that name below:

#!/bin/sh

# NAME: /lib/systemd/system-sleep/iwlwifi-reset
# DESC: Resets Intel WiFi which can be flakey after a long suspend.
# DATE: Apr 1, 2017. Modified August 30, 2017.

MYNAME=$0

restart_wifi() {
    /usr/bin/logger $MYNAME 'restart_wifi BEGIN'
    /sbin/modprobe -v -r iwldvm # This removes iwlwifi too
    /sbin/modprobe -v iwlwifi   # This starts iwldvm too
#    systemctl restart NetworkManager.service
    /usr/bin/logger 'systemctl restart NetworkManager.service (SUPPRESSED)'
    /usr/bin/logger $MYNAME 'restart_wifi END'
}

/usr/bin/logger $MYNAME 'case=[' ${1}' ]'
case "${1}/${2}" in
    hibernate|suspend|pre*)
      ;;
    resume|thaw|post*)
      restart_wifi;;
esac

NOTE: Sometimes simply resetting network manager is all that is needed. In that case un-comment the line above by removing #. Then comment out the two lines above it by putting # at the beginning of those two lines.

You'll need to create this script, called iwlwifi-reset, with sudo powers and save it into the directory /lib/systemd/system-sleep.  Then mark it executable using:

chmod a+x /lib/systemd/system-sleep/iwlwifi-reset


switching between nVidia GeForce 640M and Intel integrated graphics

Use following link to install the Nvidia Prime

Ubuntu 14.04 Nvidia propriatery driver install

Then execute the following command on your terminal:

To switch to the Intel onboard graphics : sudo prime-select intel

To switch to the Nvidia graphics : sudo prime-select nvidia

If you want to know which graphics is in use execute the following command:

sudo prime-select query


How to get the Sansa Clip Plus memory card to be treated as just part of the existing 8GB hard drive by Banshee?

No, you cannot. The two storage locations are exposed as separate devices over the USB, so they will be displayed as such. There is no feature in Banshee, or udev, to have them combined into a single device.


To give static ip address graphically

1.Go to network connections

2.Then edit the connections in the wired settings

3.Add the ip address for the system

Here are the images below

If you are curious, You can find newly created connection from the above steps as configurations file at  /etc/NetworkManager/system-connections


Try using boot-repair, it can repair many problems with grub with one click

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


If you realy used a CD and not a DVD then that might be the problem cause latest Ubuntu versions need DVD, a CD is not enough. have you tried with a USB boot?


Wifi connections not showing in menu (ubuntu 12.04)

I am having Ubuntu Desktop 14.04 LTS. Default kernel i believe is 3.x. I had Intel 3165 wifi card in my laptop and I was also not getting any wifi symbols to even connect. As per Intel it(3165) was supported only in kernel 4.1+. So i tried some of the quick fixes as mentioned here. That fixed the issue temporarily - I will get wifi for few hours and then it will get disconnected. But finally i upgraded my kernel to 4.2.5 as mentioned in that link. That fixed all my wifi related issues. Try the solution that i am proposing and let me know.


How can I hide the background applications menu in GNOME?

There are some extensions you may try.

TopIcons: It places those icons at the top bar.
TopIcons Plus: Same as above, but with more customisations.
Hide Legacy Tray: It just hides the tray containing those icons.


Fresh Ubuntu 14.04. No Wireless rtl8723ae show disabled

Ubuntu 14.04 comes with a working rtl8723ae driver, so there is no need to build one.  Try the function key (F12 on my Toshiba) to enable/disable wireless.  Thats the "hard block" problem from the output of

rfkill list

The soft block problem is a program like NetworkManager not haveing the "Enable Wifi" checked.
Wicd works, but I don't have any experience with it.  Network Manager works for me.


How can I specify which programs play sound through headphones and which ones play through speakers?

Click on the sound indicator and go to settings. Then on the application tab there is a per application setting for output and input device. It it doesn't have it there then you can looking in pavucontrol (you may have to install it).  It's a bit more complicated to use but works quite well.


Troubles with creating RAID1 array on VM Ubuntu 15.04

You are doing all wrong.
First: you need to create md0 device.
Second: you format your /dev/md0 to ext4.
Third: mount your device to /use/data


New Mythbuntu Installation not working on restart

I'm going to add this as an answer, even though I'm not 100% sure I'm correct. Feedback so very welcome.

The wiki page on using systemd with mythbackend suggests creating a file called /etc/systemd/system/mythbackend.service. However, I finally noticed that this did not match the name of the existing service file, /lib/systemd/system/mythtv-backend.service.

I decided to try and rename /etc/systemd/system/mythbackend.service to /etc/systemd/system/mythtv-backend.service. I moved the file, then had to jump through a few hoops, stopping/disabling the service, then re-enabling it again. Once I managed to enable it again without any error showing up, I restarted the machine and it is now accessible over the network.

The wiki contains this warning at the top:

I was very confused by the wording. It really should make it very clear to check /lib/systemd/system/ first to determine what file name you should use, then ensure you use the same name under /etc/systemd/system/.


Choppy videos and animations since 17.10

Luckily, I've found the reason by accident: It's due to a bug caused by the System Monitor Gnome Extension. Deactivating it makes everything smooth again.


Well, I was unable to find a way to do this with pure xrdp, but I did find a nice writeup on how to go about getting this set up as an rdp-to-vnc gateway. It works well enough to suit my purpose.

Taken from http://ubuntuwiki.net/index.php/Xrdp,_installing

Install xrdp and vino

sudo apt-get update && sudo apt-get install xrdp vino

Configure vino so that you can remotely connect to the existing session

Type vino-preferences from the terminal, check "Allow other users to view your desktop," "Allow other users to control your desktop," and configure the "Security" settings as you like (you will probably want to uncheck "confirm each access to this machine" and check "require the user to enter this password").
Configure xrdp to access vino

Edit /etc/xrdp/xrdp.ini, adding in the text below. Alter the name to whatever you fancy. Also, make sure that [xrdp1] uses a number that doesn't conflict with an existing configuration.

# set empty username because VNC auth
# doesn't actually use username, so no
# point in asking the user for one.

[xrdp1]
name=Active Local Login
lib=libvnc.so
username=
password=ask
ip=127.0.0.1
port=5900


How do I change the screen resolution using Ubuntu command line?

This worked for me:

Enumerate the names of all your video outputs, and the possible resolutions for those currently connected to a monitor:

xrandr -q

Choose the name of the output you wish to change the resolution of, and:

xrandr --output <OUTPUT> --mode 1024x768

Note: If running from a text terminal, that is not running in gfx environment, you'll have to add a -d :0 parameter, i.e:

xrandr -d :0 -q
xrandr -d :0 --output <OUTPUT> --mode 1024x768


How do I make my terminal display graphical pictures?

Maybe caca is what you want. For images:

sudo apt-get install caca-utils
cacaview /PATH/TO/image.jpg

Make sure your terminal window is big enough.

For example, here is how this image is displayed in cacaview:

I sometimes used it for fun to watch videos as ASCII in mplayer :) Like this:

mplayer -vo caca /PATH/TO/video.mpg


My computer is broken after recent update attempt to 14.04

I walked a very similar path myself, here is what worked for me:

Boot into recovery mode (I tried previous versions 'til it booted "properly") RecoveryMode

Open a terminal and run

sudo apt-get install -f

sudo dpkg --configure -a

If all fails it may be locked, then you can try

sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
cd /var/lib/dpkg/updates
sudo rm *

Then you can finally update all and try the upgrade again (I use dist-upgrade to to ensure dependencies are resolved)

sudo apt-get update
sudo apt-get dist-upgrade


Why does installing 11.10 or 12.04 on old laptops fail?

Have you tried burning the OS that your trying to install on a CD and insert it in Laptop drive and boot from disk?


Installed windows 10 on a separate HD and installed a GPU. Now Ubuntu doesn't work

I'm running Ubuntu 14'04 and Windows 10  using two hard drives. Isolate the drives when loading each hard drive. To select either program use the bios program when you boot up.


Error when trying to install/remove programs after upgrade to Ubuntu 13.10

Try to completely remove Software Center and then re-install it

These commands will help you.

sudo apt-get autoremove software-center && sudo apt-get --purge remove software-center
sudo apt-get autoremove && sudo apt-get autoclean
sudo rm -r ~/.cache/software-center/

 Please read the messages carefully, be sure that it removes packages related to software-center only.

Now re-install it again:

sudo apt-get update
sudo apt-get -f install software-center

Edit

Sometime you've to manage with some other way. I did what I could do. I guess the problem is when you click the install button in any package manager it doesn't invoke the password window to get the password. But when you open the package manager with the appropriate permissions it would not be needed and simply all work fine..

So what I suggest you to stick with the workaround what I told you before, i,e run package manager each time by pressing Alt+F2 and executing the command with gksu. Like gksu synaptic or gksu software-center.

It is not a big issue to use, because although you've to give your password in order to install/remove packages. At last I will say sorry that after spending that much time your problem has not been solved. :( I hope you would manage with the workaround what I suggest you earlier.

And yes you can get the list of broken packages and residual packages with this command:

sudo dpkg -l | grep -e "^rc" -e "^iU"

 If this command returns any value this means that you've broken packages or residual packages. rc means residual and iU means broken.

Reply if I can help you further..


Your ~/.config/user-dirs.dirs file does not look right. Change the

XDG_TEMPLATES_DIR="$HOME/"

line to

XDG_TEMPLATES_DIR="$HOME/Templates"


Have you tried one of the "Previous Linux versions"? Once I couldn't boot after messing around with drivers and X11 and only the 4.2.0-16 kernel version worked for me.

  "I don't have a CD port in my laptop so I can't reboot with physical copy of Ubuntu either."

You don't need a CD, you can just create a Live USB. I recommend UNetbootin for doing so.


I would recommend to install PlayOnLinux with

sudo apt-get install playonlinux

cd ~/Downloads
wget https://www.playonlinux.com/script_files/PlayOnLinux/4.3.4/PlayOnLinux_4.3.4.deb
sudo apt-get install wine:i386 ./PlayOnLinux_4.3.4.deb

and try installation from it:


Saving work automatically when battery is low

I can think of two easy methods for this

1) Pay attention to battery percentage?
2) Use Libre Office's autosave feature. The screenshot below shows the setting's location the options menu:


Sharing files and folders between two pcs ubuntu and windows

While I am pretty sure that any filesystem can be mounted in a Linux operating system (including NTFS, FAT32, FAT16), Windows does not see Linux
filesystems (e2fs, e3fs, reiserfs, etc).
  A possible solution could be to make a folder on the Windows system and
save files to be shared to that folder while in the Linux system. This actually
makes viewing 'shared' files viewable (workable? editable?) in both systems.

                 Hope this helps, Craig


Why is linux-image-extra missing from 3.8.9 onwards?

image-extra was merged with linux-image

source:

http://ubuntuforums.org/showthread.php?t=2139230
https://lists.ubuntu.com/archives/kernel-team/2013-April/027820.html


If you're using gnome-terminal then you can edit keyboard shortcuts from:

Edit -> Keyboard Shortcuts...


Unable to access my local server from outside the domain

The Zimbra wiki lists ports 465 and 587, which you do not have forwarded. (It also marks 7025 as internal.)

Otherwise, please check each step of the connection:

Run nslookup mail.example.co.tz, and confirm that the domain is forwarded to the right public IP.
Run dig mail.example.co.tz, and confirm that your MX and A DNS records are sending mail to the right place. (You may need to configure records for example.co.tz, instead.)
If both of those are correct, use telnet to try and connect to a mail port. telnet mail.example.co.tz 22 should get some kind of response from the server. Try some of the other ports, too.


conjure-up cannot create user data directory

From the log message, it seems that your $HOME is mounted on a network filesystem, like NFS or CIFS.

Currently there is a known limitation with snapd, that does not allow operation in such environment.

See also Snaps with classic confinement and NFS /home.


pulseaudio not monitoring any audio output (i.e., ProjectM cannot work properly)

Solved.

My pulseaudio's configuration files became corrupt, so i opened a terminal and wrote

rm -r ~/.pulse*; pulseaudio -k

it worked like a charm

cheers


Unable to install libfreetype6:i386 Ubuntu 14.10 64-Bit

Try running this command to install all of the dependencies.

sudo apt-get install unity-control-center gnome-control-center ubuntu-system-settings gnome-bluetooth unity8 ubuntu-system-settings-online-accounts libpng12-0:i386 address-book-service


Install Brother HL-2300D on Ubuntu Server 16.10

Ran tasksel from apt-get to install print server.

sudo apt-get install print-server^

Then ran the driver installer mentioned in the question.


Ubuntu 14.04 Dell XPS15 HDMI Not Detected

What do you mean by "after some actualization my HDMI died"? Did you ever got it working under linux?

I've had this exact same laptop for a while now and searching over the years I've learned that HDMI support for this hardware is almost nonexistent under linux due to it being indirectly wired through the Nvidia  card (Optimus Hybrid Graphics). The most promising workaround I've found involves firing two simultaneous sessions (one with each video card). The problem is this two sessions do not share applications in real time and you don't get any sound from the HDMI output.

You can check all about it here: http://www.webupd8.org/2012/08/get-hdmi-working-with-nvidia-optimus-on.html

Also here, if you use bumblebee (you totally should): https://github.com/Bumblebee-Project/Bumblebee/wiki/Multi-monitor-setup

The second best option is using the mini display port output which is connected directly to the integrated graphics card. There are plenty of HDMI adaptors that are dirty cheap (if that's what you need).

If anyone have other information I'm not aware of, please do share!


How can I get rid of the "En" icon in the notification area?

Click on En
Select Text Entry Settings
Uncheck Show Current Input Source in Menu Bar in the lower-left section.


(Low Level Format?) Encrypted Hidden Partition On USB Disc

If you run Ubuntu from the live DVD or an USB Stick, or you have it already somewhere installed, then you will have two options:

You can use a graphical tool "Gparted" - it is a powerful tool but it is not installed by default on Ubuntu.

Installing it in console by typing:

sudo apt-get install gparted

Then run it from the starter menu.

the second way is, to use the integrated graphical Ubuntu Drive Manager called "Disks" which can do almost the same and it might be easier to use. It can be started also from the menu.

But be careful, both tools are powerfull, you might check twice to not format the wrong disk. The internal hard disk is usually called "/dev/sda".

Example output of device information of gparted (menu:view->device information):


How can I get my Xbox 1 remote to work with 19.10?

The package xboxdrv is available in the Universe repository. You can find it by searching packages.ubuntu.com.

There is no need to add a PPA, nor should you add a PPA when software is available in Ubuntu repositories.  To install this package, simply open a terminal and run the following commands:

sudo apt update
sudo apt install xboxdrv


Permissions changed on upgrade to 11.10, now "read-only"

If the external drives are formatted in NTFS, most of the time they are, you will need to install ntfs-3g and ntfsprogs to access with write permissions.

sudo apt-get install ntfs-config

To verify use gparted or sudo fdisk-l and determine the formatting.

This is a good reference for you to look at:
https://help.ubuntu.com/community/MountingWindowsPartitions?action=show&redirect=NTFSReadWrite


Updating a rules file so it won't be overwritten on update

You should put udev rules files in /etc/udev/rules.d; they won't get overwritten on package upgrades.


This is an example to download a deb file.
This can be done. But it need not be, if you add a PPA to the system.
e.g.:
sudo apt-add-repository ppa:inkscape.dev/stable

But let's go on with the example of downloading.
Go to the PPA page, e.g. “Inkscape Developers” team

Use the link eg. Inkscape Stable

Use the link View package details

Use the link eg. inkscape - 0.91.0+47~ubuntu15.04.1

Use the link eg. inkscape_0.91.0+47~ubuntu15.04.1_amd64.deb


I had the same problem and I found the the solution here

Open Terminal and use the next:

gedit $HOME/.pulse/daemon.conf

and put the following line on the file:

  default-sample-rate = 16000

save it, and then restart pulseaudio as a user with the following command

pulseaudio --kill && pulseaudio --start

Do this for every user.


Brightness button (Fn + F5/F6) does not work after installing Kubuntu 11.10

Go to System Settings>Power Management> Power Profiles and set the brightness for the Performance profile.
That should be the one your laptop uses when it's plugged in.

You can also install a widget to adjust it. Click on the Panel Tool Box icon (far right of bottom taskbar)> Add Widgets> Get New Widgets> Download New Plasma Widgets and do a search from there.


Run multiple gui programs from terminal without disowning them

You'll have to source the script so that these commands are executed in your current shell, instead of in the forked-off shell started for the script:

. ./foo.sh

Then, these background processes will be part of your shell's job control.

It might be easier to use a function. In your bashrc, for example, add:

foo () {
    netbeans &
    mysql-workbench &
    opera &
    chromium-browser &
}

Then, when you run foo from bash, it will run the commands in your current shell.


replace this file (located at /var/www/html/index.html) in Apache2 installed through LAMP in ubuntu 18.04

Not by opening a website addres in your browser but by logging into the server and doing

cd /var/www/html
vi index.html

Or if it is a desktop you can also do

gedit index.html

(apply sudo if needed)


Force ssh user to different shell through config

You could use a ForceCommand along with Match:

Match Address 10.1.0.0/16
    ForceCommand /usr/bin/git-shell

From man sshd_config:

 Match   Introduces a conditional block.  ...
         The arguments to Match are one or more criteria-pattern pairs or
         the single token All which matches all criteria.  The available
         criteria are User, Group, Host, LocalAddress, LocalPort, and
         Address.
 ForceCommand
         Forces the execution of the command specified by ForceCommand,
         ignoring any command supplied by the client and ~/.ssh/rc if
         present.  The command is invoked by using the user's login shell
         with the -c option.

So, the command you specify would be executed using the user's login shell, which must accept the -c option. The connection is closed when the command exits, so for all practical purposes, that command is their shell.


ftp> how to recursively search and change mode?

This would be much easier with a proper shell.

A standard FTP server won't let you chmod at all. All SITE commands, SITE CHMOD included, are non-standard extensions. So your FTP server might support recursion. It probably doesn't. You'll only find out by figuring out what server it is you're connecting to and then reading its documentation.

However as a workaround, you could just use a client that allowed you to select multiple files and perform batch operations on them. It isn't recursion but it's like recursion.

I'm thinking clients like Filezilla. Select all your files, right click them and go to properties and change all their permissions at once.


There is a ROS release every year in May. Every ROS release will be supported on exactly one Ubuntu LTS. ROS releases will drop support for EOL (End Of Life) Ubuntu distributions, even if the ROS release is still supported. The ROS Kinetic release is currently supported only on Ubuntu 16.04.

ROS Kinetic installation in Ubuntu 16.04

Configure your Ubuntu repositories to allow "restricted", "universe" and "multiverse".
Run these commands:

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 0xB01FA116
sudo apt update

Select one of four default ROS configurations.

sudo apt install ros-kinetic-desktop-full # full desktop
sudo apt install ros-kinetic-desktop # desktop install
sudo apt install ros-kinetic-ros-base # no GUI
sudo apt install ros-kinetic-PACKAGE # individual package installation

To find available packages, use: apt-cache search ros-kinetic and then replace PACKAGE in ros-kinetic-PACKAGE by one of the available packages found by apt-cache search ros-kinetic
Initialize rosdep. rosdep enables you to easily install system dependencies for source you want to compile and is required to run some core components in ROS.

sudo rosdep init
rosdep update

Environment setup

echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
source ~/.bashrc

Get rosinstall. rosinstall enables you to easily download many source trees for ROS packages with one command.

sudo apt install python-rosinstall

To test your installation, visit the official ROS Tutorials.

ROS Melodic installation in Ubuntu 18.04

Configure your Ubuntu repositories to allow "restricted", "universe" and "multiverse".
Run these commands:

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
sudo apt update

Select one of four default ROS configurations.

sudo apt install ros-melodic-desktop-full # full desktop
sudo apt install ros-melodic-desktop # desktop install
sudo apt install ros-melodic-ros-base # no GUI
sudo apt install ros-melodic-PACKAGE # individual package installation

To find available packages, use: apt-cache search ros-melodic and then replace PACKAGE in ros-melodic-PACKAGE by one of the available packages found by apt-cache search ros-melodic
Initialize rosdep. rosdep enables you to easily install system dependencies for source you want to compile and is required to run some core components in ROS.

sudo rosdep init
rosdep update

Environment setup

echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
source ~/.bashrc

Get rosinstall. rosinstall enables you to easily download many source trees for ROS packages with one command.

sudo apt install python-rosinstall-generator python-wstool build-essential

To test your installation, visit the official ROS Tutorials.

ROS Noetic installation in Ubuntu 20.04

Configure your Ubuntu repositories to allow "restricted", "universe" and "multiverse".
Run these commands:

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
sudo apt update

Select one of four default ROS configurations.

sudo apt install ros-noetic-desktop-full # full desktop
sudo apt install ros-noetic-desktop # desktop install
sudo apt install ros-noetic-ros-base # no GUI
sudo apt install ros-noetic-PACKAGE # individual package installation

To find available packages, use: apt-cache search ros-melodic and then replace PACKAGE in ros-melodic-PACKAGE by one of the available packages found by apt-cache search ros-melodic
Initialize rosdep. rosdep enables you to easily install system dependencies for source you want to compile and is required to run some core components in ROS.

sudo rosdep init
rosdep update

Environment setup

echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
source ~/.bashrc

Get rosinstall. rosinstall enables you to easily download many source trees for ROS packages with one command.

sudo apt install python-rosinstall-generator python-wstool build-essential

To test your installation, visit the official ROS Tutorials.

Source: Ubuntu install of ROS Kinetic, Ubuntu install of ROS Melodic, Ubuntu install of ROS Noetic


On Ubuntu, GnuPG 2.0 is available for all supported releases under the package name gnupg2 (and they are all > 2.0.7). To install it, open a terminal (press CtrlAltT) and run this command:

sudo apt-get install gnupg2

Or see How do I install software using the Ubuntu Software Center?


strange text-mode behavior (large fonts and blue lines) with virtualbox

As  @Takkat Mentioned, this should be fixed in latest Virtual Box version


Is it possible to make the text in terminal invisible?

In a terminal you can turn the echo off with stty -echo

Example:

echo "enter password"
stty -echo
read password
stty echo
echo $password


Can you drop to a root prompt from rescue mode?

Then you can manually mount your usb device to /media/cdrom/ by first creating that directory with mkdir /media/cdrom/ then mount /dev/sdx /media/cdrom where sdx should be replaced with the drive letter for USB device(unmount USB device if automatically mounted). Then you should be able to install. After that unmount the usb umount /media/cdrom and delete rm /media/cdrom.


Unable to run mksdcard SDK tool ubuntu 16, 2016

From other answers found and ran

A. steps at : https://askubuntu.com/a/253946/165511

Kill the process named apt-get:

killall -9 apt-get

Reconfigure dpkg:

dpkg --configure -a

Update apt-get:

apt-get update

Update packages, including those improperly installed:

apt-get upgrade

B. Was able to run :

sudo apt-get install  lib32stdc++6

C. When that did not work realized it was a permissoins issue too:
had moved the folder from /opt to ~ but had not changed owner.

 chmod -R  android-studio

Then ran the studio again ./android-studio/bin/studio.sh


What is skew value in Mongo DB Database replication?

The "skew" column represents how skewed each host perceives the others' system clocks to be relative to its own.

If you're running a version 2.0 or later of MongoDB, these numbers are just for your information and not something to worry about — the servers are aware of the skew and will compensate for it.  (See https://jira.mongodb.org/browse/SERVER-3132 for gory details.)


hp desktjet 1000 j110 network needs authentication

I answered my own question by going to the Printing tab
in the system settings menu. Then I went to settings and checked the following:

Show printers shared by other systems;
Published shared printers connected to this system;
Allow printing from the internet;
Allow remote administration;
Allow users to cancel any job.


Moving home folder to new installation of Ubuntu

Yes. I have done many times.  rsync has a mode "-a" which preserves ownership, file times, everything. Can send files across network. Or you can copy to an ext4 formatted external disk and restore with rsync.  Just remember don't copy with the ordinary drag and drop, use rsync and preserve the archive of all properties ("-a").

Suppose my.old.computer has your account "myuser".

Set up new computer my.new.computer.  Create "myuser" there.  if you are fastidious, get the user ID and group ID from old system and assign them when you create the user account.  That may reduce problems, but I think I only do it because I'm old fashioned and this went wrong once in 2005.  Know what I mean about uid and gid? Numbers of the user account. On the old system run "id myuser" , then when you create the new user on new computer, you assign same uid and gid.

Create some other account on both of these systems, we don't want to try to copy a user folder for "myuser"  when that user is logged in, since a session depends on files you destroy.  Repeat: Must not log in as myuser when you want to copy files for the myuser account.  On either system.

On new system, as root, move the default user directory out of way (be safe, don't delete!), then create new directory

sudo mv /home/myuser /home/myuser.orig
sudo mkdir /home/myuser
sudo chown myuser.myuser /home/myuser

You need that last step so that your ordinary user account can rsync the files in. We don't want to do that as root

Then copy the folder /home/myuser from old to new, using the rsync flags -rav.

Can send files from old system to new system. On the old system

cd /home
rsync -e ssh -ravn myuser  myuser@my.new.computer:/home

Where:

-r: recursive
-a: archive mode
-v: verbose mode. You can leave that out, it will go faster. But with less reassurance.
-n: don't actually make any changes

I put the -n flag because I want a test run; if there are errors we will find out. After testing, run same command with no -n flag.

This will only work if your user account has permissions to copy and write the files in /home/myuser.   I'm not entirely sure how to do that without being root, but I used to know, and I bet somebody here knows what to do.

Or if you are in new system, can copy from other

cd /home
rsync -e ssh -rav my.old.computer:/home/myuser .

Period . means the current working directory. Run with the -n first to see what's wrong.

I've done this many times.  The manual setting of the uid and the gid really should not be necessary, since the combination of ssh and rsync should assign the new files correctly.  However, I got this wrong once and all the new files turned up as used by the wrong user.  Where you expect to see  ls -la output like this:

rw-------   1 myuser myuser        174 Aug  4 22:43 .Xauthority

you see user numbers, like

rw-------   1 504 50004        174 Aug  4 22:43 .Xauthority

or, worse, some other user's name.  It happens because the uid and gid really determine file ownership; the human-readable name is superficial.

You can usually fiddle your way out of that with chown, but you'll not see if if you line up the uid and gid.

Do not worry too much if the copy over fails once, or does something you don't expect, because you can always run over again.  You are not destroying the old computer, and the new computer is, well, blank slate.

I think some tar lovers will say that the best way is to tar up the old thing, move the tar.gz file, then expand that.  In 2003 or so, that seemed vital to us, but lately the rsync method has worked fine.

By the way, if one is interested in learning about rsync, the man rsync is one of the best, most helpful man pages ever.  It is human readable with a ton of examples and it is one of the reasons I cling to rsync like a life raft in system maintenance.


Using zip command to transfer Ubuntu folders with symbol links in them to Windows

Can I be sure everything pointed by any symbolic link in the folder(s) is in the folder(s) too?

Short answer: yes, if you do not specify the --symlinks option.

By default, the zip command will dereference symbolic links. This means that symbolic links are replaced by the actual files or folders they link to. Thus, you could be sure that all files and folders that are referenced by your symbolic links on your linux system will actually be included as "real" files and folders in your zip file. When you extract the zip file on Windows, any of these files and folders will appear as "real" files and folders.

  How can I set up the zip flag so that after extracting the folders under Windows, the symbol links work as before?

Short answer: you can't unless 1) the receiving file system supports linux symbolic links and 2) the target files/folders of the link are present

The ZIP format supports storing the symbolic link. To store symbolic links as such, you can use the --symlinks option. Symbolic links under Linux, however, only work on file systems that support these symbolic links. Thus, such archive needs to be extracted on a suited file system for these links to work again (and then of course, provided that there are corresponding target files on the system where the zip file is extracted).


I want my PC to boot in recovery mode by default

From chat...

HP Proliant Gen6 server, Some docs here.

We finally got it to fully boot by using nomodeset.

We're now investigating video drivers for the AMD/ATI ES1000 rev 02.

Update #1:

The 10-year old ES1000 embedded video chip isn't supported anywhere that I can see. The best that we might be able to do is to run with nomodeset (it's a headless server)... or install another PCI video card.

sudo -H gedit /etc/default/grub

Find the line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

Change it to:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"

Save the file and quit gedit.

Then do:

sudo update-grub

reboot


Is there a enviornmental variable for the path to header files?

The C header files are usually stored in the /usr/include directory. So for example the #include <stdio.h> includes the header file from there.

If your file is not there, you can use relative paths to specify the location, e.g.

#include "main-header.h"

includes the main-header.h file from the current working directory.

By the way, if you install the libnux-4.0-dev package, it should install the headers into /usr/include, and it will also add the binaries, which will be necessary for linking.


Find what program/process is writing to disk and what file it is writing to

Update from a reader's comment

You can install and use fatrace. It is a small command line utility that enables you to view the process that is reading/writing to a file. Install it with

sudo apt-get install fatrace

Run it in a terminal with sudo fatrace. It will show you information in auto-scrolling fashion like this

rsyslogd(971): W /var/log/syslog
rsyslogd(971): W /var/log/mail.log
rsyslogd(971): W /var/log/mail.log
rsyslogd(971): W /var/log/mail.err
rsyslogd(971): W /var/log/mail.err
ruby(5094): R /home/anwar/..../config/initializers
ruby(5094): RC /home/anwar/..../config/initializers
ruby(5094): O /home/anwar/..../config/initializers
ruby(5094): R /home/anwar/..../config/initializers
ruby(5094): RC /home/anwar/..../config/initializers

[.... are input by me.]

The first column include the name of the process and it's process id in brackets like ruby(5094) followed by a :.
The second column is the event type indicator. The event types are there - (from man page)

Open, Read, Write, or Close. Combinations are possible, such as CW for closing a written file.
The last column is the file involved in the operation with full path name.

Use iotop program. To install it, use terminal with the command

sudo apt-get install iotop

or using this link iotop

and then use sudo iotop in a terminal to see the programs using your disk.

To open a terminal, use Ctrl + Alt + T keyboard shortcut


What key to press to get to the BIOS and change boot sequence on a Dell desktop?

Check out the Dell™ OptiPlex™ GX150 System User's Guide at;

http://support.dell.com/support/edocs/systems/opgx150/en/ug/index.htm

and, in particular, the "System Settings" at:

http://support.dell.com/support/edocs/systems/opgx150/en/ug/advfeat.htm#syssettings

It may be that this older Dell machine doesn't have the capability to boot from a USB drive.  The "Option settings" under the section entitled "Changing the Boot Sequence" in the latter link makes no mention of a USB option.

Arhimed's suggestion to use F2 will display the available boot options.  That should be definitive.


From: http://banshee.fm/support/faq/

  iPods - most iPods and iOS devices should work with Banshee. Apple frequently updates the database format the devices use by upgrading iTunes, so it's recommended to use Banshee exclusively to manage your iPod, or not at all. Importing music from an iPod managed with iTunes should be fine, though.

Basically, quit updating your phone with iTunes. Banshee will catch up to the DB version being used and you'll be able to sync.


How do you detect the end of a live drag with the new ListItem?

The event is not triggered as the from and to indices are the same. When in live mode, you must update your model on each move, as that is the way to tell the ListView behind that your element ordering is changed. It is not expected to fire any event as long as the from and to indices are having the same value, which is the case in Dropped state when on live mode. Of course, Dropped may be a special case, which should be emitted never the less the two indices are the same.


Touchpad tap not working after NVidia driver

Try this:

synclient tapbutton1=1

I had the same issue but I don't recall installing any NVIDIA drivers.  Hope this helps.


Is it possible to downgrade gcc 4.6.3 to 4.6.1?

It could have been a mismarked download try this one:

http://www.netgull.com/gcc/releases/gcc-4.6.1/


How to schedule ClamAv to perform a daily scan

I would use cron for this instead of strictly using bash. In the directory /etc/cron.daily/ create a small script clamavscan.sh that looks like:

#!/bin/sh
clamscan /home/username/

Then be sure to make the script executable with chmod +x clamavscan.sh.
This should run the clamscan of your home directory once daily at 6:25 (as you can see in the file /etc/crontab).

To have ClamAV scan you entire machine, you should just be able to run clamscan /, although this might require root privileges to really scan everything.


Upgrading packages gives "After this operation, 0 B of additional disk space will be used."

Upgraded packages replace older packages.

Sometimes the new packages are slightly larger or smaller than the older.

Sometimes the new packages are the same size.


How can I install Ubuntu on Lenovo G580 IdeaPad?

I had the same problem. Turned out all I needed to do was adjust the brightness levels with the f2 and f3 keys. Hope this helps!


This is not a Linux-specific issue. Wake-on-lan is implemented by the motherboard and network card, not the operating system. Try upgrading your motherboard BIOS if you can, and also note from the SN78SH7 manual:

  WOL(PME#) From Soft-Off If this item sets to Enable, the system power
  will be turned on when the LAN port receives an incoming signal. You
  have to connect the fax/modem to the mainboard Wake On LAN connector
  for this feature to work. The choice: Enabled or Disabled.

  MAC Resume from S4/S5 This item allows you to enable/disable the MAC
  Resume from S4/S5. The choice: Disabled or Enabled.

You need to enable both of these options. In particular, MAC Resume from S4/S5 is needed to power up a shut down PC.


The problem could be that Postfix is trying to use ipv6.
If this the case then the solution would be disabling ipv6 in /etc/postfix/main.cf by commenting the line

# inet_protocols = all

and adding line

inet_protocols = ipv4

Then restarting Postfix service

service postfix restart


I'm having similar issues with my Acer... In my searching, I found suggestions to blacklist some drivers. In particular, dw_mac and dw_mac_core. Try this...

echo "blacklist dw_dmac" | sudo tee -a /etc/modprobe.d/blacklist.conf

echo "blacklist dw_dmac_core" | sudo tee -a /etc/modprobe.d/blacklist.conf

I suggest this because of the "dw_mac... invalid resource" result when ACPI is on. It is also worth noting that this didn't help me, but I also never had that error.

source: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1319149


System Hangs installing "sudo apt install libdvd-pkg" on Ubuntu 20.04

Use Tab to navigate to the OK button, and then press Enter.
All is working. It is a CLI interface that doesn't accept mouse actions.


Show current desktop (workspace) in taskbar

Open CompizConfig Settings Manager and click on the Workspace Naming tile. You can name your workspaces here.

You can also Google "Ubuntu workspace indicator". I found this: What Application Indicators are available?. I hasn't been updated for a while, so it may not work, but it's an indication of what may be available. Also see How can I tell what workspace I am in with Unity?.

Also remember that 17.10 will use GNOME, instead of Unity, and it has a built-in workspaces extension.

Update:

Download indicator-workspaces at http://ppa.launchpad.net/geod/ppa-geod/ubuntu/pool/main/i/indicator-workspaces/indicator-workspaces_0.6.4_all.deb.

You may need to install these:

sudo apt-get update
sudo apt-get install python-wnck
sudo apt-get install python-appindicator
sudo dpkg -i ./indicator-workspaces_0.6.4_all.deb


Why do mount, ping and su have a sticky bit set?

That's not the sticky bit, that's the setuid bit. A sticky bit usually applies to directories, you can see that in /tmp for example:

$ stat -c '%A %n' /tmp /bin/ping /usr/bin/crontab
drwxrwxrwt /tmp
-rwsr-xr-x /bin/ping
-rwxr-sr-x /usr/bin/crontab

The t indicates a sticky bit, an s in user modes indicate setuid and an s in group modes indicate setgid.

The setuid bit makes the command be run as the user who owns the file, usually root. This is done because:

ping and ping6 need root access to use raw sockets. See this Super User post and this Unix & Linux post. As the SU answer notes, some distros now use capabilities instead of setuid — my Arch Linux system doesn't have setuid on ping.
su needs root access to switch to an arbitrary user
mount (and umount, etc.) need setuid to mount things that are specified as being mountable by anybody (via users option in /etc/fstab) (see this Unix & Linux answer)
crontab is setgid, since the crontab files are stored in a location only writable by root and the crontab group:

$ stat -c '%A' /var/spool/cron/crontabs
drwx-wx--T

(note: the crontab directory is also sticky.)

Also see:

What is the first number for in a 4-number chmod argument (such as `chmod 4555`)?


Internet disconnects by itself and never reconnects unless system restarted

I didn't find any answers for this, thus no solution, but there seems to be a quick trick that I recently found.

I thought I may share this so that people experiencing the problem will be partially helped at least.

After you're done on your computer, disconnect the internet from the 'Signal' or networks menu on topbar. In the end of the same list, there will be Edit Connections/just Edit. The first step isn't necessary, but recommended.

Click on the Edit/Edit Connections. A window will open, titled Network Connections. Under Mobile Broadband segment, you'll see the connections you've made. Delete them all. ALL. (Not the Ethernet ones, that's unnecessary.)

So, basically, before shutting down, if you delete all your connections (now I only have one, because I make one each time I log on), next time you open the computer and create a fresh connection, your internet won't disconnect like that.

Note that you have to create the new connections from Settings>Network>Mobile Broadband dialog boxes, not through the same Network Connections window that you accessed from the network menu in the top bar.

Once you do this, and make a new connection every time (with username and password if needed), your internet will remain connected as long as the computer runs.

You can disregard the following part.

Suppose you don't do it, now what happens is this:
The existing connection remains on the system. Probably because your mobile broadband dongle/modem are older and/or slightly incompatible with Ubuntu, the connections don't refresh and there seems to be some sort of problem in the system in reconnecting ONCE THEY DISCONNECT.

The old connections remain there and may connect on new session/startup, but they randomly disconnect for IDK why and then cannot be reconnected because of bad configuration that you cannot change with regular tweaks.

Even if you delete your connections and make a new one on a session which has booted with some/one connection(s) already there, it doesn't work.


`drm: intel_pipe_config_compare .. mismatch in ips_enabled (expected 1, found 0)` Error on boot [15.10 on a Macbook Pro 11,1]

After plugging in a usb keyboard and getting into tty2 with Control+ alt + F2 (since I couldn't produce alt and/or F2 output on the Macbook P keyboard), I tried purging & reinstalling xorg and lightdm as suggested in this post but to no avail.

So I decided to start removing everything I installed on Ubuntu before encountering this error.. and (finally!) I managed to boot into ubuntu again by getting rid of bcmwl-kernel-source for the wifi:

sudo apt-get remove bcmwl-kernel-source

Hmmm. Now I'd need to figure out why bcmwl-kernel-source is causing this error.


Create additional workspaces in gnome-shell

First of all, gnome shell doesn't use compiz, it uses mutter.

Second, gnome shell has something that I've dubbed "auto workspace maker" - that is, as you fill up one workspace, gnome creates another for you. So if you put a window in your first workspace and your second, gnome will make you a third workspace and so on and so forth.


How to use a symlink in Apache Web Server

A symlink should work fine.
You may or may not need to add the directory to /etc/apache2/apache2.conf so that apache knows it is allowed to access the non-standard directory.

Example (note: I do not use the -d option):

doug@s15:/var/www/html$ ln -s /media/newhd/test_web bla2
doug@s15:/var/www/html$ ls -l
total 44
...
lrwxrwxrwx 1 doug doug   21 May 11 22:14 bla2 -> /media/newhd/test_web
...

Excerpt from '/etc/apache2/acpahe2.conf'

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

<Directory /media/newhd/test_web/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>

Make sure all permissions, including parents, are in order. You can do it manually, directory by directory or:

$ namei -m /media/newhd/test_web
f: /media/newhd/test_web
 drwxr-xr-x /
 drwsrwsrwt media
 drwxr-xr-x newhd
 drwxr-xr-x test_web

Now, there are some files systems that do not work with Apache, my example was an ext4 filesystem. And some disks that are automounted (mine is not) need an fstab entry to work properly.

Otherwise help us to help you with a little more information, such as any /var/log/apache2/*.log entries.


Why does xdotool right click not work with every application?

xdotool simulates you moving or clicking the mouse, or pressing the keyboard. You trigger the xdotool script with the keyboard, but before you are releasing the key, xdotool already issues the mouse click. For some situations, xdotool may be too fast. The precise reason why it sometimes works, the other time not, is probably only to be found out by experts.

Anyway, try introducing a few ms delay by prepending the xdotool command with a sleep command, e.g.

sleep 0.2 && xdotool click --clearmodifiers 3

would introduce a 200 ms delay before executing the xdotool command.


wmctrl tool provides command line access to almost all the features defined in the EWMH (Extended Window Manager Hints) specification. It can be used, for example, to get information about the window manager, to get a detailed list of desktops and managed windows, to switch and resize desktops, to make windows full-screen, always-above or sticky, and to activate, close, move, resize, maximize and minimize them.

You can install it by

sudo apt-get install wmctrl

  You can get information about your virtual desktops (workspaces) with wmctrl -d

one@onezero:~$ wmctrl -d
0  * DG: 2720x1536  VP: 0,0  WA: 0,24 1360x744  N/A

And list open windows with wmctrl -l. The -G option shows you the geometry of the windows:

one@onezero:~$ wmctrl -l
0x02000004  0 onezero Desktop
0x02e00002  0     N/A DNDCollectionWindow
0x02e00003  0     N/A launcher
0x01e00004  0 onezero cairo-dock
0x02e00004  0     N/A panel
0x04800061  0 onezero Transmission
0x02e0000a  0     N/A Dash
0x03a00044  0 onezero arranging windows from the gnu/linux command line with wmctrl ~ Moving to Freedom - Chromium
0x04400006  0 onezero one@onezero: ~
0x04c000e9  0 onezero Google - Mozilla Firefox

  wmctrl -lG

one@onezero:~$ wmctrl -lG
0x02000004  0 0    0    1360 768  onezero Desktop
0x02e00002  0 -1460 -868 1360 768      N/A DNDCollectionWindow
0x02e00003  0 0    24   58   744      N/A launcher
0x01e00004  0 290  653  780  115  onezero cairo-dock
0x02e00004  0 0    0    1360 24       N/A panel
0x04800061  0 408  95   732  500  onezero Transmission
0x02e0000a  0 -1402 -844 1302 744      N/A Dash
0x03a00044  0 0    24   1360 744  onezero Center a window via command line - Ask Ubuntu - Stack Exchange - Chromium
0x04400006  0 127  94   983  434  onezero one@onezero: ~
0x04c000e9  0 5    47   1349 715  onezero Google - Mozilla Firefox

You can specify a window by referencing its title or partial title after -r. -e is for moving and resizing

wmctrl -r "Mozilla Firefox" -e <G>,<X>,<Y>,<W>,<H>

<G>: Gravity specified as a number. The numbers are defined in the EWMH specification. The value of zero is particularly
     useful, it means "use the default gravity of the window".
<X>,<Y>: Coordinates of new position of the window.
<W>,<H>: New width and height of the window.

So, to move a window to the upper left corner and make it 1000 pixels wide by 700 tall, you’d use 0,0,0,1000,700

one@onezero:~$ wmctrl -r "Mozilla Firefox" -e 0,0,0,1000,700

To move/resize it . For that, I used the workaround of “unmaximizing” it first, using the -b option

wmctrl -r "Mozilla Firefox" -b add,maximized_vert,maximized_horz

wmctrl -r "Mozilla Firefox" -b remove,maximized_vert,maximized_horz

one@onezero:~$ wmctrl -r "Mozilla Firefox" -b add,maximized_vert,maximized_horz

The Things You Need To Understand 1st

The -e option expects a list of comma separated integers: "gravity,X,Y,width,height"

thats is my screen Resolution so x = 1360 & y = 786

Aligning a window to left-half of the screen

one@onezero:~$ wmctrl -r "Mozilla Firefox" -e 1,0,0,680,768

Aligning a window to right-half of the screen

one@onezero:~$ wmctrl -r "Mozilla Firefox" -e 1,680,0,680,768

Aligning a window to center of screen 1360 / 4 = 340

one@onezero:~$ wmctrl -r "Mozilla Firefox" -e 1,340,0,680,768

Manipulate it as of your screen settings

For More Help 1  2 3 4


To have X11 forwarding working, you need to have xauth installed on the remove server. Verify it is there. There should probably be also some guide in the server error log, complaining about missing executable or so.


Thinkpad X1 Carbon won't suspend after upgrade to 13.10

I am in the middle of working through some issues that sound similar. I was able to resolve most of them by changing the USB settings in the bios.

change:

Always On USB to disable
USB 3.0 mode to enable

I do not have an X1 Carbon in front of me, but the bios options should be under the 'config' tab then under the USB section. The settings are on my T530 and an X230 I have access too.


Lost the Admin Password - implementation

I DO NOT TAKE CREDIT FOR THIS ANSWER
From https://askubuntu.com/a/84697/448562:
If Jorge's method didn't work for you, as it didn't for me, here is another method. I had to try something different because:

My USB keyboard did not work at the root prompt ⋯ probably hardware either keyboard or mainboard. To fix I used an old PS/2 keyboard (the little round plug) and use that.

When I used passwd username to change my password, it failed because of a bad token or such. This called for drastic measures.

The Drastic Measures
This is a very dangerous thing to do! Jorge's method should be used; only do this in case that method doesn't work.
Do this at your own risk. It did work for me on my 11.10 system.
The idea is to set the user's password to blank (or null) - this allows you to just press Enter at the Password: prompt.
Still at the root prompt from Jorge's method, first remount the root file system as read-write by using this command:
mount -o remount,rw /

Now you are a super-user on this system. Tread lightly.

Then edit the password shadow file to remove the encrypted password for your username. Type in:
nano -B /etc/shadow

The nano editor will display the contents of the file. Each line will have the form name:⋯:⋯:⋯… where ⋯ is a string or null (empty). One of the lines will start with your username. The first ⋯ after your username is your encrypted password. As an example:
username:$1$amFeNcjp$PprjCKEVk3UtzKwWfEMOY0:14920:0:99999:7:::

where $1$amFeNcjp$PprjCKEVk3UtzKwWfEMOY0 is the encrypted password.
Carefully delete the encrypted password leaving the all the ":"s, so it looks like this:
username::14920:0:99999:7:::

Then type Ctrl+O, press the Enter key to save, then Ctrl+X to close nano.
Reboot and you will have an empty (or null) password.  Be sure to use passwd username in a terminal to set  or reset your user password.
Source for PS/2 workaround was here.
Sources for the drastic measures were here and here.
Note on nano ― the -B option makes a backup of the original edited file, same name with a "~" appended.


NFS Client Unable to Mount Shared Directory

Based on your ufw status output, your firewall is currently configured to only allow incoming connections for SSH. For NFS, you will need to open the nfs (2049) and RPC portmapper (111) ports. If you only want to connect to the server over the LAN, then I'd recommend restricting the host range e.g.

sudo ufw allow from 10.0.0.0/16 to any port 2049

sudo ufw allow from 10.0.0.0/16 to any port 111

otherwise, you will need to allow from any ...


After I install program with wine, I can't launch it due to missing dll's. How do I add them?

ierutil.dll is an Internet Explorer DLL.  You could use winetricks to install Internet Explorer which will therefore install all runtime DLLs such as ierutil.dll

From a command line type

winetricks

Then select the option "Select the default wineprefix" - click OK

Select the option "Install a Windows DLL or component" - click OK

Select the version of IE you need to install - Click OK.

Note - I'm using wine 1.3 available from the repositories - but hopefully winetricks is similarly available for wine 1.2


I cleaned the drive and installed 14.04. it booted up from install and it ran like a clock. It rebooted ok. checked the updates and only ran the security updates. rebooted ok. serfed the net. Videos music etc were great. reboot ok. did the full update. I got to the Ubuntu screen then black screen and nothing. unplug tv plug in monitor (15 pin connector) and there was the desktop prompting for my password
I entered it and it works ok.

If there is a fix i think I'm lucky and greatful. If no fix, and i can help making the OS better by giving you more hardware info. i'd be glad to.

Thanks again
Bob


It's likely that Windows is booting in EFI mode but you installed Ubuntu in BIOS mode, or maybe vice-versa. Most UEFI computers provide relatively primitive options for switching between BIOS-mode and EFI-mode boots, although you can sometimes do so by pressing a key at boot time. (On my ASUS P8H77-I motherboard, it's F8.)

If you've got an EFI-mode Windows installation but you installed Ubuntu in BIOS mode, the better solution is to install an EFI-mode boot loader for Ubuntu. Replacing the grub-pc package with grub-efi should do the trick, except that to fully register the boot loader, Ubuntu has to be running in EFI mode, so you've got a chicken-and-the-egg problem. Since you've just installed, the easiest solution may be to re-install, but this time ensure that the installer is running in EFI mode. You can determine this by dropping to a shell and looking for the /sys/firmware/efi directory. If it's present, you booted in EFI mode; but if it's absent, you probably booted in BIOS mode. If you find that the installer is running in BIOS mode, reboot and look for those boot-time options (by using F8 or by adjusting your firmware options). Another way to gain better control of the boot process is by installing rEFInd, which is an EFI-mode boot manager that I maintain. Using its default settings, it should enable you to force an EFI-mode boot of the Ubuntu installer, provided the disc is inserted when you boot the computer. Version 0.4.6 can also switch to a BIOS-mode boot loader on many UEFI-based systems, although you must adjust the scanfor line in its refind.conf file. Using this ability, you might be able to chainload into your BIOS boot loader for Ubuntu. This might be acceptable to you, although IMHO it's simpler to boot directly in EFI mode.


Ubuntu USB stick not detected in Windows

you should know, that windows only recognizes
file-formats like
FAT
NTFS
and else DOS-formats

when usb-stick has an unix-filesystem
it happens that it is not readable for windows, unless you use the correct drivers.


How can I convert audio from ogg to mp3?

I use ffmpeg for sound conversion:

ffmpeg -i file.ogg file.mp3
ffmpeg -i file.{ogg,mp3}      # if only the extension changes

If your filename contains spaces don’t forget to quote it, e.g.:

ffmpeg -i "file with spaces".{ogg,mp3}

To perform batch processing you can either use a for loop like

for i in *.ogg; do ffmpeg -i "$i" "${i%.*}.mp3"; done

or – especially for many and/or large files! – GNU parallel:

parallel ffmpeg -i "{}" "{.}.mp3" ::: *.ogg

This last command will convert every .ogg file in the current directory to .mp3 efficiently using your CPU(s) to perform multiple tasks in parallel.

To set the audio bitrate ffmpeg provides the -b:a BITRATE option, e.g. -b:a 192k.
If you want to include metadata like title, album and so on, you can use these options:

-map_metadata 0:s:0 -id3v2_version 3 -write_id3v1 1

See man ffmpeg and this linuxforums.org.uk post for further information.


displaying country flags in the keyboard indicator

I have a solution for the current versions of Ubuntu and Unity, it took me some time to figure out.
Install gxkb: an application which adds a flag indicator to the top panel:
sudo apt-get install gxkb

Run the installed program, it should display the current language indicator at the top panel. The "&" at the end ensures that the program will not exit upon closing the terminal:
gxkb &

Then, hide the old indicator like this: go to
System settings -> Text Entry and  untick Show current input source in the menu bar.
To ensure that gxkb launches at the startup, run the following:
 gnome-session-properties

Click on Add.
In the field Name:, type any name and in the field Command:, type gxkb.
You can override the default flags with your custom flags, they should be of the size 24 x 24 px in png format, you can download some nice flags here:
https://www.whoishostingthis.com/wp-content/uploads/2014/12/Flags-Icon-Set.zip.
Place the custom flags which you want to use into ~/.local/share/gxkb/flags/.
Name each flag as <country code>.png, e.g. us.png, ru.png.


How can ubuntu separate system files and normal files?

System files are all the directories (folders) under / (which is often referred to as your "root directory") that are not under /home/.
A few examples are /etc/ and /usr/lib/ and /bin/ and your "root directory" / which all of these are under.
Your personal files, like data, text, pictures, and others are under your /home/ directory and are under what we refer to as your "user's home directory" which would be /home/codinggirl/ if your user name were "codinggirl" for example.
However, there are some system files under your user's home directory as well and these are usually hidden files and directories that start with a dot, like /home/codinggirl/.config for example, which contain configuration files for your personal settings.
Additionally, it should be noted that the "tilde" ~ symbol can be substituted for /home/codinggirl so that ~/.config/ is the same as /home/codinggirl/.config/ and ~/ is the same as /home/codinggirl/.
To print (show) your current working directory, run the following command:
pwd

To list the files in your current directory, run the following command:
ls

To list the files in your current directory and to also list hidden files and directories, run the following command:
ls -a

To change to a different directory, you can use the cd command. For example, if you are currently in your user's home directory, you could use the following command to change to your Downloads directory:
cd Downloads

Alternatively, the following command will do the same thing by listing the full path to the directory:
cd ~/Downloads

However, to go back one directory, you can use two dots before a forwardslash like this:
cd ../

and if you run the cd command with no argument, it will take you back to your user's home directory:
cd

Also, the current directory is always represented by a dot before a forward slash ./
So, another way to change to your Downloads directory from your user's home directory would be to use the following:
cd ./Downloads

or
cd /home/codinggirl/Downloads

and to go back to your user's home directory, from your Downloads directory, you could use
cd ../

or
cd

or
cd ~/

Partitions are usually "mounted" to a directory so, unlike Windows, the partition will be listed under the directory name (folder name) it is mounted to instead of listed as a partition or drive like "drive C:" as it is in Windows.
For example, if Ubuntu is installed under a single partition, your equivalent of a "c: drive" on Ubuntu would simply be /
For another example, you could also have a separate partition or drive mounted to /home/. If you have another partition or drive mounted to /home/, that partition or drive would simply be under /home/.


Can I workaround an unrecognized display?

I found pointers for a possible solution here:

https://wiki.ubuntu.com/X/Config/Resolution#Adding_undetected_resolutions


Sleep command not working with start up applications

The startup applications line probably doesn't invoke a shell. Try setting it to run in a terminal. Then, change it to: bash -c 'sleep 5; exec tomboy'.

Warning: This is all untested.


Why does apt-get want to remove gcc-4.8 and g++-4.8 when I try to upgrade?

gcc 4.8.2 is currently under development and will only be released for trusty(14.04LTS).

The current latest version available for Ubuntu 13.10 saucy is 4.8.1 and it will not be updated to 4.8.2


I have just installed 13.04 and am confused buy the security pass-phrase/encryption options

I assume you are referring to your user password and the hard disk encryption password.

The first one is required before the encrypted volume is even mounted. If you have encrypted your home (that is, the place where user files reside, your desktop and all), then you need it to access your home directory.

The second is your login password. In Ubuntu, this is necessary not only for logging in, but also for doing administrative tasks (like modifying or updating the system), remotely accessing your machine etc.

If you want to disable one of them, then I'd suggest choosing the option for automatic login. You cannot log in automatically if your home directory does not exist (almost). Go to Settings / User Accounts and set the "Automatic Login" option to "ON".

You will still need your password for accessing your machine remotely, logging in from a text console or performing administrative tasks (and this is a good thing).

Let me now shortly explain the necessity of having both passwords in general. You see, many Ubuntu machines are servers where many users can log in. Such a machine, if it has encrypted home directories, requires one password at a start-up to mount the home of all the users; then when users log in, they need to enter their respective passwords.

Furthermore, mounting the hard drive partitions is a process that happens usually once at boot time, and is completely independent from the process of user authentication at log in. For example, you can take out the disk with the home directories and attach it to another machine (or a miscreant might do it). Then you can only access the data on the hard disk with your encryption password.

P.S. That said, I don't encrypt my hard disks. I only have a small encrypted directories where I store the really sensitive data.


how can I move files with specific names from one folder to another

To glob for the different names, you can use a for loop like so

for f in /Users/Marine/Descktop/folderGN/{*[Pp]rotein*,*MSMS*,*PSms*}; do echo mv -v -- "$f" /Users/Marine/Descktop/myfolder ; done

Remove the echo after testing to actually move the files.

I have copied your paths exactly (including the possible typo in Descktop?), but you could instead do this with relative paths:

cd /Users/Marine/Descktop/folderGN
for f in *[Pp]rotein* *MSMS* *PSms* ; do echo mv -v -- "$f" ../myfolder ; done

(remove echo after testing as before)


Mapping key combinations like Windows + L to @ sign

Sorry, since Im not running (Unity) Ubuntu I dont have the full answer.

First idea:

Try changing your keyboard layout from System Settings > Keyboard. Some languages have a Mac version of the layout. That might have the @ key at a suitable place for you.

Second idea:

Try adding a new shortcut key combination for copy and paste. The old one would still work, but that would be less annoying. You can maybe find it somewhere in System Settings > Keyboard or Input Devices.

The Super/Meta/Windows key isnt registered because it is one of the modifier keys (just like Alt and Shift) and those are not handled like normal keys in Linux.


It's possible to make the terminal autocomplete behave in a case-insensitive manner which gets close to what you are most likely looking for. Add the line

set completion-ignore-case on

to /etc/inputrc and start a new terminal. After that,

cd foldTab/foldTab
will get you to the correct directory even if the second folder is in reality Folder. You'll see the autocompletion change the directory name on the fly accordingly.


Installed Ubuntu on a Intel I5 3330 (over a dh 77eb motherboard), networking fails

From the intel motherboard specifications I got a hint.

  Gigabit (10/100/1000 Mb/s) LAN subsystem using the Intel® 82579V Gigabit Ethernet Controller

I looked googled drivers for 82579V network ubuntu drivers, and to my surprise I found it on the intel site. Crazy eh!! They dont list the drivers on the same page as the specifications. Got it here.

The README too is not complete. You need to run make install in the src folder. That installs and updates the e1000e networking driver. Just modprobe e1000e and magic turns around.


We have plans to add revisions but not in the next release.


Try to change the parameter of wireless driver as follows and check the reported issuse.

change 802.11bgn to 802.11bg.

change the wep encryption to just wpa2 (CCMP)(AES) not (TKIP) if you have that option it will work best.

Set your wireless channel in the router to 1 or 11 then save the router configuration and reboot it.

Go into network manager at top right corner of the screen and click on edit connections>wireless tab and set IPV6 to ignore.

Now open the terminal CTRL+ALT+_T then copy and paste the following code one line at a time for accuracy:

echo "options rtl8192ce swenc=1 ips=0" | sudo tee /etc/modprobe.d/rtl8192ce.conf
sudo modprobe -rfv rtl8192ce
sudo modprobe -v rtl8192ce

IF the issue persists, try compiling new driver. Hope this helps!


How to set environment variables for anacron?

Ubuntu manpage for anacrontab states:

Environment assignment lines are of the form:
VAR = VALUE
Spaces around VAR are removed.  No  spaces  around  VALUE  are  allowed (unless  you  want them to be part of the value).  The assignment takes effect from the next line to the end  of  the  file,  or  to  the  next assignment of the same variable.

Redhat manpage for anacrontab states:

Environment assignment lines are of the form:
VAR = VALUE
Spaces around VAR are removed. No spaces around VALUE are allowed (unless you want them to be part of the value). The assignment takes effect from the next line to the end of the file, or to the next assignment of the same variable. The enviroment variable START_HOURS_RANGE sets the time frame, when the job could started.

I have a sneaky suspicion that START_HOURS_RANGE is NOT used in Ubuntu. The Ubuntu man page does not mention these parameters. This is a RHEL/CentOS Linux v6.x feature.

Proof is in the pudding:
rinzwind@discworld:~$ grep START /etc/anacrontab
rinzwind@discworld:~$

So yes, unsupported on Ubuntu.

Even more pudding!
START_HOURS_RANGE was added in anacron-2.3-68.
Ubuntu 13.04 uses...
$anacron -V
Anacron 2.3


You are changing the compiled file rather than the source file. When sudo update-grub runs your changes to the compiled file are replaced by the source file.

The correct source file to edit is /etc/default/grub.

After saving /etc/default/grub changes then you need to run:

sudo update-grub


Bootable pendrive for Windows 10 Technical Preview

use unetbootin!
easy, fast, with GUI, give it a try! ;)

or right click on win10 image, open with disk image mounter, and copy all to your bootable pen. make sure it's empty on either way, you can use "disks"* from ubuntu, have a look on youtube, lots of ways to do that (just look for any windows image, it's all the same) ;)

*disks: select your pendrive, unmount, click on the wheels, format, fat32 (it'll say lba initializable), then copy or use unetbootin!


How to enable natural scrolling in Ubuntu 18.04.1 with Unity

Linked post explains how to set another property of touchpad, so for clarity I'll write it down here:

# First find number of your touchpad device
xinput list

# then get list of its properties and get number of "Natural Scrolling Enabled"
xinput list-props device_number

# finally set the property to 1 (true)
xinput set-prop device_number prop_number 1


How to connect screen/tmux/byobu to dbus?

Type

export $(dbus-launch)

This worked for me.


WARNING: kernel is not very fresh, upgrade is recommended

You can just ignore it, as per
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=120166


Using Thunderbolt Port (Mini Displayport) for second monitor 15.10

I would, if you haven't already, try the proprietary Intel drivers. Open-source drivers usually are the default, and often work flawlessly, but sometimes have strange glitches (I had this same problem with a GeForce graphics card.

You can switch to the proprietary driver by going to System Settings > Software and Updates > Additional Drivers. That will look something like this:

Under your graphics card, choose the Intel driver with the highest version number. Click "Apply Changes" and then reboot (it may prompt you).

If your graphics device isn't listed, then you'll have to manually have to install the driver. Go to Intel's website and choose your CPU. I won't go into detail on how to install the driver; you can find many a guide on how to do this.

I hope this helps!


VPN has not worked since upgrading to 12.04

If it's a password protected VPN, you should try:

open "Network"
select your VPN > Configure > VPN
Change the password dropdown to "saved" and type your password in that field
Save + try

For some reason the "Always Ask" option doens't seem to work (for me) in 12.04.


My eth0 has gone and I don't have internet and network connection

Try:

sudo dpkg-reconfigure network-manager

If that doesn't work boot from a live CD, back up your old network settings, clear out any system connection file and copy over the ones from the live CD.

Change to Root:

sudo su

backup:

mv /media/<Name of your Ubuntu Partion>/etc/NetworkManager/NetworkManager.conf /media/<Name of your Ubuntu Partion>/etc/NetworkManager/NetworkManager.conf.broken

clear:

rm /media/<Name of your Ubuntu Partion>/etc/NetworkManager/system-connections/*

copy:

cp /etc/NetworkManager/NetworkManager.conf /media/<Name of your Ubuntu Partion>/etc/NetworkManager/NetworkManager.conf
cp /etc/NetworkManager/system-connections/* /media/<Name of your Ubuntu Partion>/etc/NetworkManager/system-connections/


You can try this code.

for file in */*; do           # Loop trough any file in any folder
    if [ -f "$file" ]; then   # If the current element is a file
        gd2p.pl -i "$file"    # Run the program
    fi                        # End if
done                          # End loop


Windows 10 is not showing after installing 15.04

"Well , we need to forget something in order to get something..."

restart
press f12 ( go to the boot menu)
select windows

It's always better to perform a backup of your files


Can't boot Ubuntu (dual boot system) after migration on SSD

The reason Windows cannot see your Linux partition is because Windows has limitations in what partitions it can see.  It cannot read that your partition is there, so it thinks it is blank space.  The reason you booted to Windows automatically is because Windows over-rid your grub boot loader.  You can fix this by booting into your Ubuntu install disc/USB and then installing Boot repair.  Follow the instructions listed here for installing and using Boot repair, and let me know if you have any concerns or mis communications here, I will be happy to explain further if necessary.


A little bit of bash (using all the best practices!):

shopt -s nullglob

for f in *.js; do
    coffee=${f%.js}.coffee
    [[ -f $coffee ]] && rm -v -- "$f"
done

nullglob is a shell optional behavior so that *.js will expand to the empty string if there are no files with extension js.
Use shell parameter expansion to remove the extension .js and replace it with .coffee in the variable coffee.
rm is used with the -v switch (verbose) so that you see what's happening.
rm is also used with -- that marks the end of options, just in case there's a file that starts with a hyphen: in that case, rm would be confused and try to interpret an option.
The [[ ... ]] construct is a conditional construct and uses conditional expressions. Notice I'm using the robust double square bracket [[ and not the single [. Very good practice (in bash).
Note that the quoting is perfect. It's all 100% safe regarding files that have spaces or funny symbols in their name.

For testing purposes, you should put echo in front of rm:

    [[ -f $coffee ]] && echo rm -v -- "$f"

so that it only echoes the command and doesn't remove anything. When you're happy with that, remove the echo.

Enjoy!


How do I install steam on a 64bit system?

Open the terminal and type:

sudo dpkg --add-architecture i386
sudo apt-get update

Try installing it after doing that.

For future reference look: https://wiki.ubuntu.com/MultiarchSpec & https://help.ubuntu.com/community/MultiArch


I had a similar problem on my Dell Studio XPS laptop with Ubuntu 11.04. Basically the kernel didn't have proper control of the CPU, and it would heat up very quickly unnecessarily. Once 12.04 came out, the fixes were there to solve the issue, and I no longer had to drag my fan around with me! Unfortunatly I don't know enough to point you in the direction of what exactly the issue is, but if you report the bug I'm sure someone will be able to get to the bottom of it!


How to find erase and line kill character for ubuntu 12.10

The Unix Programming Environment... From 1983/4?

I'm honestly not sure how much use their terminal stuff is going to be. Bash has changed a bit since... Hang on, Bash didn't exist until '89.

It's a good book (I tried to read it while I was at uni and failed miserably) but you can't take the examples as written anymore. A lot of the C stuff should still work though.


network simulators to simulate a Mail server in Ubuntu 12.04

What exactly do you mean?

You could, for example, to install Postfix and configure it to work only locally and so it would emulated the server it already is without actually sending or receiving anything outside the local scope you configured it.


Are you behind a proxy by any chance? There's a fix that makes snapd respect proxy settings. It's already merged but it is not released yet. It will likely show up in snapd 2.0.6

For now you can edit the systemd unit of snapd and add

EnvironmentFile=/etc/environment

And obviously ensure that your proxy settings are stored in /etc/environment.


Got it to work, and my GRUB is now fixed (was able to run update-grub from chrooted mount on my live cd).

gdebi didn't work (same error), what did work was giving dpkg this argument:

--force-depends


Dolphin file manager stops working after mounted samba server was turned off (unexpected action?)

This avoids more heavy handed solutions, like rebooting.

Edit /etc/fstab to make sure that the line for that mount has either the option users set or user=<your user name>. This way you are able to unmount the share without sudo.
Create a desktop shell script with command:

umount /path/to/mountpoint/of/sambaShare

Optional: place the script where you can easily call it.

Now when the samba share server is off and the share is still mounted just call this script.

Now Dolphin should gracefully close. If not, terminate it because it freezed (trying to get information from samba server and re-mounting it again if fail).

This works for me.

References:
http://en.wikipedia.org/wiki/Fstab


Set fully qualified domain name on EC2 instance

hostname -f will return the first name after 127.0.0.1

So simply switching localhost and your fqdn will give you a correct return address while the localhost alias will still work.


I am no expert but I ran into a slighty different scenario that I was able to fix. I had an older PC that I added an NVMe drive too. I would not boot the NVMe so I put in a small sata ssd and made that my /boot (EFI) partition. This worked well until I upgraded the PC. Removing the sata drive made my PC not boot. So I created a partition on my NVMe to be the new boot EFI partition and installed Grub there. It's been a few months but it did work.
Basic steps taken: move sata and NVMe drive to new PC, create new boot partition using gparted and mark it bootable, copied the contents of the sata drive to the NVMe boot partition, installed Grub to NVMe boot partition, removed sata and configured the bios to boot to the NVMe.
You will need to search how to move or install grub to other partitions as I forget how I did it. But this is the same concept essentially of what you are trying to do: move your grub install to a new drive.
I think you can also use grub-customizer and do some editing to point grub to the right UUID location for vmlinuz ie "set-root=..." and "root=UUID=..." in the grub config file before removing the current boot drive.


So the solution was to manually install Eclipse so that apt didn't install dependencies that were not actually dependencies.

Installing Eclipse Manually

So download Eclipse from here. I decided to use the Classic version, but if you want to use the Java EE version I'm sure that it will work.

Download it to a directory and open your terminal. Navigate to that directory by using the command

cd <insert directory path here>

Make sure that there are no files starting with eclipse in that folder. If there are then move them out of the folder temporarily. Then do this command:

tar -xzvf eclipse-*

Next,

sudo mv eclipse /opt/eclipse

Then you'll need to create a .desktop file for Eclipse in /usr/share/applications/eclipse.desktop so you have a shiny icon on your bar thingy (if anyone knows the offical name of the little bar on the side then please edit this answer so that it contains it). Do these commands

sudo touch /usr/share/applications/eclipse.desktop
sudo gedit /usr/share/applications/eclipse.desktop

Paste this in that file:

[Desktop Entry]
Version=4.2
Name=Eclipse
Comment=Integrated Development Environment
Exec=/opt/eclipse/eclipse
Type=Application
Icon=/opt/eclipse/icon.xpm
Terminal=false
NoDisplay=false
Categories=Development;IDE

Then create a symlink in /usr/local/bin so you can run it from the terminal using the command eclipse:

cd /usr/local/bin
ln -s /opt/eclipse/eclipse

That's it!

Eventually, I decided to use Sun's Java because OpenJDK was a substitute, and if I was going to do it manual, I might as well go the extra mile.


Configuring SKS to sync with other KeyServers

If it is a keyserver you manage, it should be a matter of adding peers to the "membership" file, and having the administrators of those peers add your server to their "membership" files.  Depending on the counterparty servers, you may find that you need to use PKS synchronisation via email: this is probably best discussed with the counterparty administrators.  Specific instructions are available in the SKS README, and if you have a peering relationship with one of the larger keyservers, the admins there can likely help with specifics related to their preferred peering arrangements.

In the specific case of synchronisation with the Ubuntu keyservers, you may either work with other keyserver admins in the wide public set, with which the Ubuntu keyserver regularly synchronises, or to request counterparty configuration directly from the Ubuntu keyserver, open an request at http://rt.ubuntu.com/ .  Be aware that the administrators of this service are very busy, so there may be some delay before you get a response.  Note that your keyserver may need to meet certain conditions in order to be accepted as a peer.

If you seek synchronisation between some third-party keyserver and the Ubuntu keyserver, you would need to ask the admins of the third-party keyserver to request peering (either to the Ubuntu keyserver or to some keyserver with which the Ubuntu keysrever is peered (directly or indirectly)).  In this case, it is probably easier to just upload your key(s) to one of the keyservers already in sync with the Ubuntu keyserver.


After 10.10 -> 11.04 upgrade, can only login via Classic (No Effects)

Here's a few steps I've tried to fix: installed fglrx, this helped get into classic & "normal" mode's desktop. After this can't configure dual monitors (won't allow proper resolution for either, forces mirroring for both displays.

Logging out/shutdown/restart causes video corruption issue again and the computer hangs. I then removed fglrx, re-installed xserver-xorg-video-radeon driver. Back to only "no effects" mode working, but desktop & dual monitor support works properly again.

OP solved issue - comment to answer


Unfortunately, in the current state of Quickly, you cannot. However it maybe possible to have Quickly extended to support this in the future, and you could report a bug.

I would caution against it though, since Quickly is not designed to use git, as it's really a tool for making it easier to use the Ubuntu related tools and environment to build Applications for Ubuntu (and possibly other Linux/UNIX systems if you choose to port the applications later). These tools would include Launchpad, Bazaar, etc.


The only thing that ended up working for me was completely reinstalling Ubuntu. Even then, though, I still got this same error. It wasn't until I wiped the ~/.config directory that I was finally able to log in. The cause of this problem remains a mystery.


Let me see if I can address how this works.

The contents of the JAR are the repo. It makes no sense from a source control aspect to put the JAR which is the repo in to the repo. If all you want to do is download the JAR then something like this:

wget https://github.com/downloads/commonsguy/cwac-wakeful/CWAC-WakefulIntentService.jar

would suffice.
You can check for updates at any time with git fetch, you can pull down changes with git pull
Make sure you've installed git-gui  package and run git gui from the command line.
Nautilus Git Integration