ubuntu-15.04 Internet connection must be selected and password entered each time I reboot

If you click on the two arrows from near the upper right corner of your desktop, you'll see all the possible internet connections.  Click on "edit connections" from the bottom of the menu.  Click your connection and choose EDIT. Click the GENERAL tab and you'll see the option to REMEMBER a connection as well as other options to set.  Hope that helps!  PS:  The two arrows might look like a WIRELESS ICON, if you are using wireless.  I'm sorry I didn't mention that first.  It's two arrows if you are wired and the WIRELESS symbol if you are connecting wirelessly.  Mouse over all the icons and you'll find it.


The scroll bar in windows of mozilla firefox is automatically moving

You can try removing current profile. Firefox saves your personal information such as bookmarks, passwords, and user preferences in a set of files called profile.

rm ~/.mozilla

When you launch Firefox, it will generate new profile which act like default setting. BEWARE: this command will clean Thunderbird setting too.

Or better yet, moving the folder in case there's something goes wrong:

mv ~/.mozilla ~/mozilla-backup

To revert setting, move the old directory:

mv ~/mozilla-backup ~/.mozilla


How can I install VMWare Player on Ubuntu 12.10?

Download the player from the VMware website:
https://my.vmware.com/web/vmware/free#desktop_end_user_computing/vmware_player/6_0

The download will come through as a '.txt. file. Once you have the file, open the command prompt and go to the location that you downloaded the file to:

For example if you put it in your 'Downloads' directory you could issue:

cd ~/Downloads/

Then you will want to execute the script to do the install. You can do that with by issuing the following commands:

chmod +x <name_of_file>
./<name_of_file>

Where the <name_of_file> is the name of the VMware player txt file you downloaded.
This should start the installation wizard to install the program.


Backup ALL Photos & Videos properly from iPad?

Copy, a cloud service, has an app for iDevices that does complete automatic camera folder backups, and I have not had trouble with it at all as of yet. It's a cloud service: you get 15GB storage for free (20GB using a referral link), and install the App onto your iDevice. If you install the Copy App onto your computer, too, then the entire Camera Folder you backed up with the iDevice App is downloaded into your Copy folder automatically.
This is the solution I would use; I'm sure there are several other ways of doing it too. It might solve your video playback troubles, but that might be another issue that isn't related to the backup.


Enter the following command to open the css file in gedit.
$ sudo gedit /usr/share/gnome-shell/theme/ubuntu.css

Search for the term ‘lockDialog’ by pressing Ctrl+D and entering this keyword in the search bar. This way you will be directed to the location where we want to make the required changes.

then replace the code as,

**#lockDialogGroup {
background: #2c001e url(file:///[fileLocation/filename.png]);
background-repeat: no-repeat;
background-size: cover;
background-position: center;

}**


Java Error javax/swing/text/GlyphView.getBreakSpot Found on running a command

That is not an error, just an harmless Java message that cannot be turned off. It doesn't affect the functionality of DbVisualizer.


I believe you are not specifying the correct path for your application. Rift online is most likely not installed in your system32 folder (where is where wine will search by default if no absolute path is specified).

Check where it is installed on your virtual hard drive (C:) and type in that path

For Example:

optirun wine "C:\program files\riftpatch\riftpatchlive.exe"

Also if you are using bumblebee, i would suggest you install also primusrun (it is included with the same ppa you installed bumblebee with). Primusrun gives much better performance than using the optirun command and often solves problems that would be present using optirun.

sudo apt-get install primus

Then run the command with primusrun.

primusrun wine "C:\program files\riftpatch\riftpatchlive.exe"


Is Ubuntu's default backup program good? What does it exactly do?

No, it is not possible with the default backup program. I recommend using clonezilla, it has worked for me very well.


Download and install these drivers : MG2100 series IJ Printer Driver Ver. 3.60 for Linux.

You'll have to untar it with tar -xvzf cnijfilter-mg2100series-3.60-1-deb.tar.gz, then install the deb file : sudo dpkg -i cnijfilter-mg2100series-3.60-1-deb.

Should be fine.


How can I make cowsay say something every time I close the terminal?

You could try adding the line:

trap 'cowsay "Have a nice day!"; sleep 1' EXIT

to your .bashrc file.


How can I make the NVIDIA hdmi sound work?

Open a terminal and run alsamixer hit F6 and select your GPU's audio chip then un-mute everything on it
Sometimes it is necessary to reset audio config, delete your ~/.pulse or ~/.config/pulse folder logout then login and reconfigure the HDMI audio in the audio settingsbe sure to try all the hdmi options, i have 4 but only one works on my gtx 550 ti


Problem installing any distro of linux, AMD problem?

Entered the BIOS and switched off amd_iommu.


Thanks to @mttjocy, enabling SSL module for Apache fixed it for me.

sudo a2enmod ssl


I don't believe the functionality is available.  Looking at my 12.04 virtual servers it looks like rsyslogd has replaced sysklogd as the default logger.  I replaced it earlier on my server because I wanted the additional filtering available in rsyslogd.

Standard syslog filtering is done on facility and priority.  Neither of these is host specific.   If it is possible to specify the facility your router logs as, you could use an unused local facility to fake the separation you are looking for.


restarting of Ubuntu 14.04 installation using virtual box

detach the ubuntu ISO file / DVD drive from virtualbox and restart it. this should suffice to get you back to ubuntu you have already installed.


Recommendation for Petri Nets modelling software?

Try out this:
http://sourceforge.net/projects/pipe2/


Using different virtual desktops in different monitors

It's a feature that has been requested since quite some time, but no, it is not possible.
See also this feature request.


Open 'Text Entry' in System Setting.

Then, click on the red marked button and the window named 'Input Method Configuration' comes up.

Click on Global Config and you can set keys or shortcuts to enable or disable Mozc by changing blue-marked buttons.

As per request of comment, if you want to circle among 3 languages, add one more at the Text Entry and set a shortcut to switch among the languages. For example, I set Both Shift keys and every time I press Left and Right shift keys at the same time, English - Russian - Japanese take turns.


Installing Ubuntu 13.10 alongside Windows 8

You must creat a unallocated space in your hard disk  first.

I recommend create unallocated space By remove a windows drive in your windows 8 By right click on Computer in start and select manage
and in disk management remove a drive.

and then  :

Click on unallocated space, click on new. Enter size as 10GB (you
have to enter in mb), choose file system type as ext4, mount point
/, partition type primary This means ubuntu root partition.
Click on unallocated space, click on new. Enter size as 2GB Or more, choose
    primary partition, file system type SWAP.
Click on unallocated space, click on new. Enter size 10GB or More if You need, choose
    , choose file system type as ext4, mount point
/home . (If you don't creat this partition ubuntu locate /home in / and when you change your linux your user data like musics , document and your setting will be removed.if you creat /home you can keep this from format)


The Bosnian keyboard layouts are actually different variants of the Serbian layouts. It sounds to me as if you may want to try the Serbian (Latin qwerty) layout.

partial alphanumeric_keys
xkb_symbols "latinyz" {
    // For those who insist on using "english-position" Z and Y.

    include "rs(latin)"
    name[Group1]= "Serbian (Latin qwerty)";

    key <AD06> { [ y,              Y             ] }; // y
    key <AB01> { [ z,              Z             ] }; // z
};

Edit:

I see now that there is an alternative name to access the above keyboard layout: Bosnian (US keyboard with Bosnian letters). Selecting that layout results in exactly the same mapping as Serbian (Latin qwerty).

partial alphanumeric_keys
xkb_symbols "us" {

    include "rs(latinyz)"
    name[Group1]= "Bosnian (US keyboard with Bosnian letters)";
};


How to change Date/Time format to English?

click on system settings.

Click on Language Support.

Click on the Regional Formats Tab, and change language to English, and apply system- wide. and that will do it.

Note: You may have to relogin, so changes can take effect


Calender isn't mark for offline usage problem

Create New Calendar
Select Google (as the type)
add your username etc.
select the offline availability option


Activating gedit-latex-plugin fails in Vivid

This error has been reported in previous Ubuntu versions. This plug-in works perfectly on a fresh system, but happens to fail on systems resulting from release upgrades.

Since this is Python (an interpreted language) it is possible to comment out the offending instruction where D-Bus is invoked. Open the Python script with your favourite text editor:

sudo gedit /usr/lib/gedit/plugins/latex/job.py

Then comment out line 160, i.e., add an hash character in front; it should look like this:

# dbus.service.Object.__init__(self, bus_name, OBJECT_PATH)

GEdit should immediately portrait this line in a different colour. So far no secondary consequences have been reported with this instruction commented out.

Then restart GEdit and try again to activate the plug-in.


bind mounting read-only using fstab on Ubuntu?

According to this LWN article, this behaviour snuck into the Kernel around version 2.6.25. In short if the target filesystem is rw, binding something on top can't convert it to ro.

In 2.6.26 they partially fixed things so you can trigger a remount (as you've discovered) but there's still no way to do that from within fstab.

Here's what I was trying in fstab:

/home/oli/Desktop/testmount  /mnt none bind,ro

After firing a mount -a, /mnt was mounted but I could still create files. After then firing off sudo mount -o remount /mnt, it became read-only.

So yes, I think the cleanest method is to either have a line in  /etc/rc.local or write a super-simple Upstart script that starts on the mountall event (so it happens immediately).


Guessing you want a remote desktop, here is :
 - Install VNC server
 - Activate & configure it
 - Connect to with a VNC client

Install the remote desktop VNC server

sudo apt install vino

Activate it from Gnome Settings applet

gnome-control-center sharing

Configure the remote desktop feature (password & network interface)
note that 'Remote Login' is for ssh server

Connect with a VNC client
Official VNC viewer : https://www.realvnc.com/en/connect/download/viewer/


Edit your sources.list with sudo nano /etc/apt/sources.list

Delete the line with the Install CD (probably the first or second line, starts with "deb cdrom: ") and the line with the PPA-URL in it. If this line is not there take a look at /etc/apt/sources.list.d/ and delete the files with the PPA of gwibber.


I had the same problem occurs to me.
The problem occurs when an earlier suspend didn't complete.

I suggest that you simply suspend your laptop once again (you can do so in a terminal with sudo pm-suspend) ; wait for a few seconds and resume the laptop.

From there it should reboot and shutdown properly.


That's the difference between command line and GUI. The icon you see isn't actually there. Under Ubuntu, typically USB disks and partitions are automatically mounted at /media/username folder.

The GUI icon you see on the desktop is just a "shortcut" in a sense, but the actual folder to which the partition is mounted is elsewhere. When you open it in GUI file manager, and press Ctrl+L you should see the real path to the mountpoint.

As for the part where you need to ls Data please note two things:

File and directory names are case sensitive.
If you cd Data you're telling the shell to enter the Data directory that should be located relative to where your shell is right now, i.e. the current working directory.  Doing cd ~/Desktop works because you told it the full path, not relative. When you cd ~/Desktop; ls Desktop it won't work - there's no Desktop within ~/Desktop. If you just run ls with no arguments, then it will work, because it lists items in the current directory by default


Is there any way to controll the keyboard leds of Gigabit Saber 15G (Clevo N850HK)?

Speaking with people on github, they showed me this. And it works fine.


As you mention the path in /opt, it looks like you installed some third party package that does not come from Ubuntu repositiories and is not a native part of Ubuntu.
I would suggest uninstalling this and install native Apache, PHP and MySQL packages from Ubuntu repositories. From what you write, apparently they got already installed, so all you have to do is to uninstall the software you installed.
As for the question "how can I run my php project with the apache that is not from lampp?" I don't understand it, as I don't see any difference in running a PHP enabled website in Apache regardless of how you did install the software. In any case you need to put your PHP scripts in the appropriate directory that is served by Apache (you have to check in the Apache configuration file what directory it is, usually with default Apache configuration it should be /var/www - you can of course add other directories if you like, or enable the "userdir" Apache module and use /home/<user>/public_html) and then access the script via web browser.


Is there any way to hide or remove the backup files in Xfce desktop

Create a file named .hidden in the desktop. Open it with a text editor and add the names of files you want to hide.

If there are numerous files you want to hide, open the terminal, change cd to desktop, and run the following command to hide all files ending with ~  :

for i in *~; do echo "$i"; done > .hidden

Note: I don't have an XFCE system so i haven't tested it out.


Cannot write Arabic language in MS Word with Ubuntu

I recently had the same problem. What you need to do is the next :

1- Add "usp10.dll" to make RTL fonts to display properly. This dll can be downloaded via winetricks. If you install office using PlayOnLinux, this dll will be included by default.

winetricks usp10

2- Set "usp10.dll" to libraries list using winecfg.

winecfg

3- Run wine with proper LANG environment :

env LANG=ar_DZ.utf-8 wine "/path/to/office/executable"

The path to office executable for me is : "C:\Program Files\Microsoft Office\Office12\WINWORD.EXE"
Hence:

env LANG=ar_DZ.utf-8 wine "C:\\Program Files\\Microsoft Office\\Office12\\WINWORD.EXE"

You can replace "ar_DZ.utf-8" with your desired language if you want.


How to remove everything from free hard disk space permanently and make it unrecoverable

sudo dd if=/dev/zero bs=1M of=/dev/sda1

Be sure that you will never want anything back from sda1, because everything will be gone forever. On my system this works at about 100 megabytes per second, so 200 gigabytes will take about 2000 seconds or some 40 minutes.

If sda1 is a SSD then this is both overkill and useless at the same time; it's overkill because a sudo blkdiscard /dev/sda1 is very very much faster, and useless because SSDs do not overwrite physical blocks. There is no absolutely safe way to delete data off a SSD if your adversary is the Cheka; however, if your adversary is the Cheka with the mighty power of the Soviet State behind it then you have greater and more urgent problems than wiping data off disks.


Try running the command which apt is suggesting i.e. 'apt-get -f install'. Try enabling multiverse and universe repositories from /etc/apt/sources.list(Its a good idea to backup the file first). Then run "sudo rm -rf /var/lib/apt/lists/*" , "sudo apt-get update" and then "sudo apt-get upgrade".

You might also want to check the following links;

How do I resolve unmet dependencies after adding a PPA?

Force install apt-get


How to replace primary key in MYSQL using SED

You can try below,

sed "s/([0-9]*,/(NULL,/" [file name]


Kernel Panic: line 61: can't open /scripts/functions

Problem Solved!
To anyone interested, here's my solution:
It was update-initramsfs which caused the above errors (invalid predicate -regextype' find: invalid predicate -regextype').
The created initrd images were broken.
Something was wrong with findutils, so I just reinstalled the package (as well as initramfs-tools) and the problem's gone :-)
Thanks once again for helping out.


from settings --> SOUNDS
pull out your headphone if you left attached and then you can choice Headphone or internal speaker and then level your speaker sound.
In my laptop if you insert the headphone you can level only headphone volume, but if you plug out headphone you can level internal speaker volume


Should I save my scripts with the .sh extension?

No, it is not a good practice, you should keep your scripts without extension. Note, that scripts being part of packages doesn't have a .sh extension, i.e. update-grub, not update-grub.sh. If you are still not convinced, then be advised, that Google Shell Style Guide says:

  Executables should have no extension (strongly preferred) or a .sh extension. Libraries must have a .sh extension and should not be executable.

PS You don't have to put your script into /bin. You can create directory ~/bin and put your script there. Directory ~/bin is included in $PATH by default, so scripts put there can be run as any other shell command.


Integrate Pidgin into the Me Menu, or help fix Empathy?

I think Pidgin is already integrated in MeMenu. Simply go to Tools -> Preferences then set "Never" to "Show system" tray icon in the Interface tab.


Why does 'ls > ls.out' cause 'ls.out' to be included in list of names?

When evaluating the command the > redirection is resolved first: so by the time ls runs the output file has been created already.

This is also the reason why reading and writing to the same file using a > redirection within the same command truncates the file; by the time the command runs the file has been truncated already:

$ echo foo >bar
$ cat bar
foo
$ <bar cat >bar
$ cat bar
$

Tricks to avoid this:

<<<"$(ls)" > ls.out (works for any command that needs to run before the redirection is resolved)

The command substitution is run before the outer command is evaluated, so ls is run before ls.out is created:

$ ls
bar  foo
$ <<<"$(ls)" > ls.out
$ cat ls.out
bar
foo

ls | sponge ls.out (works for any command that needs to run before the redirection is resolved)

sponge writes to the file only when the rest of the pipe has finished executing, so ls is run before ls.out is created (sponge is provided with the moreutils package):

$ ls
bar  foo
$ ls | sponge ls.out
$ cat ls.out
bar
foo

ls * > ls.out (works for ls > ls.out's specific case)

The filename expansion is performed before the redirection is resolved, so ls will run on its arguments, which won't contain ls.out:

$ ls
bar  foo
$ ls * > ls.out
$ cat ls.out
bar
foo
$

On why redirections are resolved before the program / script / whatever is run, I don't see a specific reason why it's mandatory to do so, but I see two reasons why it's better to do so:

not redirecting STDIN beforehand would make the program / script / whatever hold until STDIN is redirected;
not redirecting STDOUT beforehand should necessarily make the shell buffer the program's / script's / whatever's output until STDOUT is redirected;

So a waste of time in the first case and a waste of time and memory in the second case.

This is just what occurs to me, I'm not claiming these are the actual reasons; but I guess that all in all, if one had a choice, they would go with redirecting before anyway for the abovementioned reasons.


Apache mod_ssl to use OpenSSL ENGINE on Ubuntu 14.04

Steps that finally worked for me:

1.Install OpenSSL from sources, specifying -DOPENSSL_LOAD_CONF when running ./config
1.1.Create/build your OpenSSL engine and add it to your openssl.cnf file
2.Install httpd from sources, using these commands:

CFLAGS='-DSSL_EXPERIMENTAL_ENGINE -DSSL_ENGINE -DOPENSSL_LOAD_CONF' ./configure --enable-ssl --with-ssl=/usr/local/ssl --with-pcre=/usr/local/pcre --enable-so
make
make install

2.1.Edit httpd-ssl.conf by adding SSLCryptoDevice engine_id and make sure that when execute $ openssl engine, the engine_id specifier appears on the list. Also, you have to create self-signed cerificate and private key, modify the httpd.conf file, but this is not the subject of this question. Search: how to configure HTTPS on Apache.
3.$ httpd -k restart and that is all.


How to prevent system to generate log file

You can probably get what you're after by moving the log location to tmpfs, which will not be written to disk (unless swapped).

Edit the files under /etc/rsyslog.d/* and make sure they're pointing to /tmp/filename instead of /var/log/filename.

Note: this is a hack.


The volume "boot" has only 2.8 mb disk space remaining

Seems duplicated with : What is the safest way to clean up /boot partition?

Get the list of kernel images (this command will show installed kernels except the currently running one) :

sudo dpkg --list 'linux-image*'|awk '{ if ($1=="ii") print $2}'|grep -v `uname -r`

Note the two newest versions in the list to keep it.
Delete all files in /boot for kernels except the current and two newest kernel images. Example:

sudo rm -rf /boot/*-3.13.0-{23,45,49}-*.

Then, clean up what's making apt grumpy about a partial install :

sudo apt-get -f install
sudo apt-get autoremove

If you run into an error that includes a line like "Internal Error: Could not find image (/boot/vmlinuz-3.2.0-56-generic)", then run the command sudo apt-get purge linux-image-3.2.0-56-generic (with your appropriate version).

EvanK wrote a good python script here to automate this cleaning : https://github.com/EvanK/ubuntu-purge-kernels


You can't install the 64-bit version on a 32-bit machine. It won't boot. If you did manage to install it, then the machine is 64-bit. However, as it's 8 years old, as you say, and a netbook, it will probably be quite slow, especially depending on how much RAM it has, and what graphics chipset it uses. If it's just slow due to the RAM, you may be able to use Xubuntu on it to get a faster system, as it is a lighter weight variation of Ubuntu, with a slightly different interface.


Windows 10 not connecting properly with Samba 4.7.6 on Ubuntu 18.04

I have the same issue accessing a Samba 4.7.6 share on Ubuntu 18.04 from a VMware on that computer running Windows 10.
I didn't find a solution, but I found a workaround. I actually can connect to the share if I enter the IP address manually, while going via the Windows explorer computer name doesn't work. It doesn't even show the option to connect with a different user.


Upgrade to Windows 10 on an already dual booted Ubuntu / Windows 7

I upgraded to Windows 10 without a backup and nothing bad happened to Windows or Ubuntu. Making a backup is ideal of course, but nothing should happen.


Finally i manage to solve the problem by formatting entirely the computer (host), installed virtual-box, installed ubuntu, installed the guest addition, and finally updated the system.

Didn't work without formatting.
Didn't work with different order.
Believe me i tried...

Thank you @GabrielaGarcia for you willing to help.


I've just created a similar configuration on my Mac Mini (OS X Mavericks and Windows 7 on internal SSD, Ubuntu on external drive). Here's what you'll have to do:

create back up images of the OS X and Windows partition (optional but strongly recommended)
create a bootable USB stick with the ubuntu installer
holding down the option key, boot from the ubuntu installer stick
install ubuntu to the external hard disk
On reboot (I had to force the shutdown by pressing and holding the power button, as it seemed to have stalled some time after clicking reboot), hold down the option key to boot into OS X
download and install Refind boot manager
edit the refind configuration file /efi/refind/refind.conf (the line you're looking for starts with scanfor) and make sure hdbios is included in the list
on reboot, you should now be greeted with a menu containing a ubuntu, Mac and Windows logo (you can press esc to refresh the list, as external drives can take some time to show up; you can configure refind to pause befaure showing hte menu)

Hope this helps.

Greg.


Is it possible to have a separate unity launcher for each virtual workspace?

No, you can't have separate launchers for each virtual workspace in Unity.

But you can use the middle mouse button to always open a new application on the current workspace (if the application allows this) instead of jumping to an existing one.


Your rfkill list command is shows hard blocked: yes.

That means that your wireless card is disabled. It could be that there is a switch at your laptop to enable/disable wireless. Mine has it. With rfkill you can just unlock a software block not a hardware switch.

It could also be that in BIOS your wireless card is disabled. Boot your machine in BIOS and check if something is disabled there.


umount multiple mounts under same directory

-A, --all-targets
  Unmount all mountpoints in the  current  namespace  for  the  specified
  filesystem.   The filesystem can be specified by one of the mountpoints
  or the device name (or UUID, etc.).  When this option is used  together
  with  --recursive,  then  all  nested  mounts within the filesystem are
  recursively unmounted.  This option is only supported on systems  where
  /etc/mtab is a symlink to /proc/mounts.

Is that maybe what you want?  From man 8 umount


Microphone randomly muting since Ubuntu 20.04

After trying out many things, I finally found the solution on another topic.
I needed to had this line to /etc/modprobe.d/alsa-base.conf:
options snd-hda-intel model=alc233-eapd

where "alc233-eapd" is the audio codec reported in kernel.org for my machine.
Use cat /proc/asound/card*/codec* | grep Codec to get your codec and look for the exact name in kernel.org.
Worked like a charm after a reboot!


Problem in installing gimp-plugin-registry

I suggest you to upgrade to Gimp 2.8

GIMP 2.8 stable installation

If you're upgrading from an older GIMP version please visit the link and pay attention to the 'dist-upgrade' command http://www.webupd8.org/2012/05/gimp-28-stable-finally-available-for.html (also if you want to revert to GIMP 2.6.x)

If you're just installing GIMP for the first time on your current system install:

sudo add-apt-repository ppa:otto-kesselgulasch/gimp
sudo apt-get update
sudo apt-get install gimp

GIMP Plugin Registry for GIMP 2.8 installation

sudo add-apt-repository ppa:otto-kesselgulasch/gimp
sudo apt-get update
sudo apt-get install gimp-plugin-registry


Are the snap package files isolated from normal package install?

Applications installed as snap are indeed isolated, and will not interfere with the same application installed from a .deb package. Also user settings are isolated. User settings for a snap are stored under a directory "snap" in the user's home folder.


ClamAV continues to say that my definitions are outdated

ClamAV is not saying your definitions are out of date. On the contrary:

main.cvd is up to date (version: 55, sigs: 2424225, f-level: 60, builder: neo)
aily.cld is up to date (version: 17915, sigs: 385323, f-level: 63, builder: neo)
bytecode.cvd is up to date (version: 226, sigs: 43, f-level: 63, builder: neo)

It is your installation (they mean "installed software version") which is out of date:

WARNING: Your ClamAV installation is OUTDATED!
Local version: 0.97.8 Recommended version: 0.98

The ClamAV developers apparently think this warrants SHOUTING WARNINGS at you, and use EXCLAMATION MARKS too, which on Linux one wouldn't even see in case of a kernel panic or burning printer port. These warnings are relevant mainly to Windows users (hence their tone, I guess). On Linux you can choose to ignore the warnings and rely on your distro to bring you the latest ClamAV version at the next convenient apt-get upgrade.


How do I configure the news server which trn4 uses?

thufir@doge:~$ trn4
            *** NEWS NEWS ***

Welcome to trn 4.0-test77 (Sep 1, 2010).

Type 'h' at any prompt to get help.  The old (rn-compatible) help
is usually available by typing 'H' as well.

This message will not be displayed again unless it is updated with new
information.

   - The friendly folks at <trn-workers@lists.sourceforge.net>

Connecting to foo.bar.baz...Done.
Unread news in gmane.comp.security.fail2ban.user           54 articles
Unread news in gmane.linux.ubuntu.user                     69 articles
Unread news in gmane.linux.centos.general                  37 articles
Unread news in gmane.comp.gnome.apps.pan.user               7 articles
Unread news in gmane.discuss                                3 articles
etc.

ADD newsgroups       145941 groups

a     0 1stone.archive
b     0 3b.config
d     0 3com.totalservice.test
e     0 3dfx.game.s
f     0 a.a.mis.philadelphia
g     0 a.a.mis.talk
i     0 a2i.b
j     0 a2i.info
l     0 a2i.lists.com-priv
o     0 aaa.product.jsp
r     0 abg.kultur
s     0 abg.test
t     0 acc.sbell.usa-to
u     0 acc.sbell.usa-today.banks
v     0 acc.sbell.ushead.life
w     0 achilles.general
x     0 acid-net.koordination.news
y     0 add
z     0 adfa.journals
1     0 adobe.acrobat.enterprise.installation.solutions
2     0 adobe.acrobat.scripting
3     0 adobe.golive.macintosh
4     0 adobe.golive.webworkgroupserver
5     0 adobe.livecycle.form.manager
6     0 adobe.livemotion.featurerequests
7     0 adobe.photoshop.scripting
8     0 adobe.web.design
9     0 aecom.med2y.pharmacology
0     0 agora.scienza.scienza
B     0 ai.ua
C     0 aist.rips.test
F     0 akmos.contest
G     0 akr.misc
I     0 al.freedom.jbpe
K     0 alabama.birmingham.radio
V     0 alabama.birmingham.students
W     0 alc.alc.c2h5oh

-- Select a newsgroup to add (natural order) -- Top 0% [>Z] --

Newsgroups       11 groups

a    54 gmane.comp.security.fail2ban.user
b    69 gmane.linux.ubuntu.user
d    37 gmane.linux.centos.general
e     7 gmane.comp.gnome.apps.pan.user
f     3 gmane.discuss
g     1 gmane.comp.telephony.pbx.asterisk
i     1 gwene.org.raspberrypi.asterisk
j     1 gmane.comp.telephony.pbx.asterisk.java
l     1 gmane.comp.telephony.pbx.asterisk.call-centers
o    15 gmane.comp.telephony.pbx.asterisk.user
r     9 gmane.mail.alpine.info

-- Select a newsgroup (natural order) -- All [Z>] --
thufir@doge:~$
thufir@doge:~$ cat /etc/news/server
foo.bar.baz
thufir@doge:~$

By editing /etc/news/server it seems that trn4 starts correctly.  However, I'm not entirely sure that this the correct setting.  Is it possible to put multiple servers there?  is this file used only by trn4?  Not sure.


Skipping the InRelease step when apt-get update (and go directly to Release)

Thanks to Law29's comment on ServerFault I learn that some updates are made with HTTPS when others use HTTP :/

I could check with curl that HTTPS request wouldn't reach the server.

Turns out is was my firewall which was not configured to accept port 443 requests... Adding the right lines solved the problem ! Thanks Law29 !


The default install needs two partitions, a root and a swap.  You have room for only one more primary, so you need to put all the free space on the disk into an "extended" partition (a type of primary).  This extended partition can then hold additional partitions called "logical partitions", so the installer can make what it needs.


How to install Ubuntu 14.04/16.04 64-bit with a dual-boot RAID 1 partition on an UEFI/GPT system?

UPDATE: I have verified that the description below also works for Ubuntu 16.04. Other users have reported working on 17.10 and 18.04.1.

NOTE: This HOWTO will not give you LVM. If you want LVM too, try Install Ubuntu 18.04 desktop with RAID 1 and LVM on machine with UEFI BIOS instead.

After days of trying, I now have a working system! In brief, the solution consisted of the following steps:

Boot using a Ubuntu Live CD/USB.
Partitions the SSDs as required.
Install missing packages (mdadm and grub-efi).
Create the RAID partitions.
Run the Ubiquity installer (but do not boot into the new system).
Patch the installed system (initramfs) to enable boot from a RAIDed root.
Populate the EFI partition of the first SSD with GRUB and install it into the EFI boot chain.
Clone the EFI partition to the other SSD and install it into the boot chain.
Done! Your system will now have RAID 1 redundancy. Note that nothing special needs to be done after e.g. a kernel update, as the UEFI partitions are untouched.

A key component of step 6 of the solution was a delay in the boot sequence that otherwise dumped me squarely to the GRUB prompt (without keyboard!) if either of the SSDs were missing.

Detailed HOWTO

1. Boot

Boot using EFI from the USB stick. Exactly how will vary by your system.
Select Try ubuntu without installing.

Start a terminal emulator, e.g. xterm to run the commands below.

1.1 Login from another computer

While trying this out, I often found it easier to login from another, already fully configured computer. This simplified cut-and-paste of commands, etc. If you want to do the same, you can login via ssh by doing the following:

On the computer to be configured, install the openssh server:

sudo apt-get install openssh-server

Change password. The default password for user ubuntu is blank. You can probably pick a medium-strength password. It will be forgotten as soon as you reboot your new computer.

passwd

Now you can log into the ubuntu live session from another computer. The instructions below are for linux:

ssh -l ubuntu <your-new-computer>

If you get a warning about a suspected man-in-the-middle-attack, you need to clear the ssh keys used to identify the new computer. This is because openssh-server generates new server keys whenever it is installed. The command to use is typically printed and should look like

ssh-keygen -f <path-to-.ssh/known_hosts> -R <your-new-computer>

After executing that command, you should be able to login to the ubuntu live session.

2. Partition disks

Clear any old partitions and boot blocks. Warning! This will destroy data on your disks!

sudo sgdisk -z /dev/sda
sudo sgdisk -z /dev/sdb

Create new partitions on the smallest of your drives: 100M for ESP, 32G for RAID SWAP, rest for RAID root. If your sda drive is smallest, follow Section 2.1, otherwise Section 2.2.

2.1 Create partition tables (/dev/sda is smaller)

Do the following steps:

sudo sgdisk -n 1:0:+100M -t 1:ef00 -c 1:"EFI System" /dev/sda
sudo sgdisk -n 2:0:+32G -t 2:fd00 -c 2:"Linux RAID" /dev/sda
sudo sgdisk -n 3:0:0 -t 3:fd00 -c 3:"Linux RAID" /dev/sda

Copy partition table to other disk and regenerate unique UUIDs (will actually regenerate UUIDs for sda).

sudo sgdisk /dev/sda -R /dev/sdb -G

2.2 Create partition tables (/dev/sdb is smaller)

Do the following steps:

sudo sgdisk -n 1:0:+100M -t 1:ef00 -c 1:"EFI System" /dev/sdb
sudo sgdisk -n 2:0:+32G -t 2:fd00 -c 2:"Linux RAID" /dev/sdb
sudo sgdisk -n 3:0:0 -t 3:fd00 -c 3:"Linux RAID" /dev/sdb

Copy partition table to other disk and regenerate unique UUIDs (will actually regenerate UUIDs for sdb).

sudo sgdisk /dev/sdb -R /dev/sda -G

2.3 Create FAT32 file system on /dev/sda

Create FAT32 file system for the EFI partition.

sudo mkfs.fat -F 32 /dev/sda1
mkdir /tmp/sda1
sudo mount /dev/sda1 /tmp/sda1
sudo mkdir /tmp/sda1/EFI
sudo umount /dev/sda1

3. Install missing packages

The Ubuntu Live CD comes without two key packages; grub-efi and mdadm. Install them. (I'm not 100% sure grub-efi is needed here, but to maintain symmetry with the coming installation, bring it in as well.)

sudo apt-get update
sudo apt-get -y install grub-efi-amd64 # (or grub-efi-amd64-signed)
sudo apt-get -y install mdadm

You may need grub-efi-amd64-signed instead of grub-efi-amd64 if you have secure boot enabled. (See comment by Alecz.)

4. Create the RAID partitions

Create the RAID devices in degraded mode. The devices will be completed later. Creating a full RAID1 did sometimes give me problems during the ubiquity installation below, not sure why. (mount/unmount? format?)

sudo mdadm --create /dev/md0 --bitmap=internal --level=1 --raid-disks=2 /dev/sda2 missing
sudo mdadm --create /dev/md1 --bitmap=internal --level=1 --raid-disks=2 /dev/sda3 missing

Verify RAID status.

cat /proc/mdstat

Personalities : [raid1]
md1 : active raid1 sda3[0]
      216269952 blocks super 1.2 [2/1] [U_]
      bitmap: 0/2 pages [0KB], 65536KB chunk

md0 : active raid1 sda2[0]
      33537920 blocks super 1.2 [2/1] [U_]
      bitmap: 0/1 pages [0KB], 65536KB chunk

unused devices: <none>

Partition the md devices.

sudo sgdisk -z /dev/md0
sudo sgdisk -z /dev/md1
sudo sgdisk -N 1 -t 1:8200 -c 1:"Linux swap" /dev/md0
sudo sgdisk -N 1 -t 1:8300 -c 1:"Linux filesystem" /dev/md1

5. Run the installer

Run the ubiquity installer, excluding the boot loader that will fail anyway. (Note: If you have logged in via ssh, you will probably want to to execute this on you new computer instead.)

sudo ubiquity -b

Choose Something else as the installation type and modify the md1p1 type to ext4, format: yes, and mount point /. The md0p1 partition will automatically be selected as swap.

Get a cup of coffee while the installation finishes.

Important: After the installation has finished, select Continue testing as the system is not boot ready yet.

Complete the RAID devices

Attach the waiting sdb partitions to the RAID.

sudo mdadm --add /dev/md0 /dev/sdb2
sudo mdadm --add /dev/md1 /dev/sdb3

Verify all RAID devices are ok (and optionally sync'ing).

cat /proc/mdstat

Personalities : [raid1]
md1 : active raid1 sdb3[1] sda3[0]
      216269952 blocks super 1.2 [2/1] [U_]
      [>....................]  recovery =  0.2% (465536/216269952)  finish=17.9min speed=200000K/sec
      bitmap: 2/2 pages [8KB], 65536KB chunk

md0 : active raid1 sdb2[1] sda2[0]
      33537920 blocks super 1.2 [2/2] [UU]
      bitmap: 0/1 pages [0KB], 65536KB chunk

unused devices: <none>

The process below may continue during the sync, including the reboots.

6. Configure the installed system

Set up for to enable chroot into the install system.

sudo -s
mount /dev/md1p1 /mnt
mount -o bind /dev /mnt/dev
mount -o bind /dev/pts /mnt/dev/pts
mount -o bind /sys /mnt/sys
mount -o bind /proc /mnt/proc
cat /etc/resolv.conf >> /mnt/etc/resolv.conf
chroot /mnt

Configure and install packages.

apt-get install -y grub-efi-amd64 # (or grub-efi-amd64-signed; same as in step 3)
apt-get install -y mdadm

If you md devices are still sync'ing, you may see occasional warnings like:

/usr/sbin/grub-probe: warning: Couldn't find physical volume `(null)'. Some modules may be missing from core image..

This is normal and can be ignored (see answer at bottom of
this question).

nano /etc/grub.d/10_linux
# change quick_boot and quiet_boot to 0

Disabling quick_boot will avoid the Diskfilter writes are not supported bugs. Disabling quiet_boot is of personal preference only.

Modify /etc/mdadm/mdadm.conf to remove any label references, i.e. change

ARRAY /dev/md/0 metadata=1.2 name=ubuntu:0 UUID=f0e36215:7232c9e1:2800002e:e80a5599
ARRAY /dev/md/1 metadata=1.2 name=ubuntu:1 UUID=4b42f85c:46b93d8e:f7ed9920:42ea4623

to

ARRAY /dev/md/0 UUID=f0e36215:7232c9e1:2800002e:e80a5599
ARRAY /dev/md/1 UUID=4b42f85c:46b93d8e:f7ed9920:42ea4623

This step may be unnecessary, but I've seen some pages suggest that the naming schemes may be unstable (name=ubuntu:0/1) and this may stop a perfectly fine RAID device from assembling during boot.

Modify lines in /etc/default/grub to read

#GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

Again, this step may be unnecessary, but I prefer to boot with my eyes open...

6.1. Add sleep script

(It has been suggested by the community that this step might be unnecessary and can be replaced using GRUB_CMDLINE_LINUX="rootdelay=30" in /etc/default/grub. For reasons explained at the bottom of this HOWTO, I suggest to stick with the sleep script even though it is uglier than using rootdelay. Thus, we continue with our regular program...)

Create a script that will wait for the RAID devices to settle. Without this delay, mounting of root may fail due to the RAID assembly not being finished in time. I found this out the hard way - the problem did not show up until I had disconnected one of the SSDs to simulate disk failure! The timing may need to be adjusted depending on available hardware, e.g. slow external USB disks, etc.

Enter the following code into /usr/share/initramfs-tools/scripts/local-premount/sleepAwhile:

#!/bin/sh
echo
echo "sleeping for 30 seconds while udevd and mdadm settle down"
sleep 5
echo "sleeping for 25 seconds while udevd and mdadm settle down"
sleep 5
echo "sleeping for 20 seconds while udevd and mdadm settle down"
sleep 5
echo "sleeping for 15 seconds while udevd and mdadm settle down"
sleep 5
echo "sleeping for 10 seconds while udevd and mdadm settle down"
sleep 5
echo "sleeping for 5 seconds while udevd and mdadm settle down"
sleep 5
echo "done sleeping"

Make the script executable and install it.

chmod a+x /usr/share/initramfs-tools/scripts/local-premount/sleepAwhile
update-grub
update-initramfs -u

7. Enable boot from the first SSD

Now the system is almost ready, only the UEFI boot parameters need to be installed.

mount /dev/sda1 /boot/efi
grub-install --boot-directory=/boot --bootloader-id=Ubuntu --target=x86_64-efi --efi-directory=/boot/efi --recheck
update-grub
umount /dev/sda1

This will install the boot loader in /boot/efi/EFI/Ubuntu (a.k.a. EFI/Ubuntu on /dev/sda1) and install it first in the UEFI boot chain on the computer.

8. Enable boot from the second SSD

We're almost done. At this point, we should be able to reboot on the sda drive. Furthermore, mdadm should be able to handle failure of either the sda or sdb drive. However, the EFI is not RAIDed, so we need to clone it.

dd if=/dev/sda1 of=/dev/sdb1

In addition to installing the boot loader on the second drive, this will make the UUID of the FAT32 file system on the sdb1 partition (as reported by blkid) match that of sda1 and /etc/fstab. (Note however that the UUIDs for the /dev/sda1 and /dev/sdb1 partitions will still be different - compare ls -la /dev/disk/by-partuuid | grep sd[ab]1 with blkid /dev/sd[ab]1 after the install to check for yourself.)

Finally, we must insert the sdb1 partition into the boot order. (Note: This step may be unnecessary, depending on your BIOS. I have gotten reports that some BIOS' automatically generates a list of valid ESPs.)

efibootmgr -c -g -d /dev/sdb -p 1 -L "Ubuntu #2" -l '\EFI\ubuntu\grubx64.efi'

I did not test it, but it is probably necessary to have unique labels (-L) between the ESP on sda and sdb.

This will generate a printout of the current boot order, e.g.

Timeout: 0 seconds
BootOrder: 0009,0008,0000,0001,0002,000B,0003,0004,0005,0006,0007
Boot0000  Windows Boot Manager
Boot0001  DTO UEFI USB Floppy/CD
Boot0002  DTO UEFI USB Hard Drive
Boot0003* DTO UEFI ATAPI CD-ROM Drive
Boot0004  CD/DVD Drive
Boot0005  DTO Legacy USB Floppy/CD
Boot0006* Hard Drive
Boot0007* IBA GE Slot 00C8 v1550
Boot0008* Ubuntu
Boot000B  KingstonDT 101 II PMAP
Boot0009* Ubuntu #2

Note that Ubuntu #2 (sdb) and Ubuntu (sda) are the first in the boot order.

Reboot

Now we are ready to reboot.

exit # from chroot
exit # from sudo -s
sudo reboot

The system should now reboot into Ubuntu (You may have to remove the Ubuntu Live installation media first.)

After boot, you may run

sudo update-grub

to attach the Windows boot loader to the grub boot chain.

Virtual machine gotchas

If you want to try this out in a virtual machine first, there are some caveats: Apparently, the NVRAM that holds the UEFI information is remembered between reboots, but not between shutdown-restart cycles. In that case, you may end up at the UEFI Shell console. The following commands should boot you into your machine from /dev/sda1 (use FS1: for /dev/sdb1):

FS0:
\EFI\ubuntu\grubx64.efi

The first solution in the top answer of UEFI boot in virtualbox - Ubuntu 12.04 might also be helpful.

Simulating a disk failure

Failure of either RAID component device can be simulated using mdadm. However, to verify that the boot stuff would survive a disk failure I had to shut down the computer and disconnecting power from a disk. If you do so, first ensure that the md devices are sync'ed.

cat /proc/mdstat

Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md1 : active raid1 sdb3[2] sda3[0]
      216269952 blocks super 1.2 [2/2] [UU]
      bitmap: 2/2 pages [8KB], 65536KB chunk

md0 : active raid1 sda2[0] sdb2[2]
      33537920 blocks super 1.2 [2/2] [UU]
      bitmap: 0/1 pages [0KB], 65536KB chunk

unused devices: <none>

In the instructions below, sdX is the failed device (X=a or b) and sdY is the ok device.

Disconnect a drive

Shutdown the computer. Disconnect a drive. Restart. Ubuntu should now boot with the RAID drives in degraded mode. (Celebrate! This is what you were trying to achieve! ;)

cat /proc/mdstat

Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md1 : active raid1 sda3[0]
      216269952 blocks super 1.2 [2/1] [U_]
      bitmap: 2/2 pages [8KB], 65536KB chunk

md0 : active raid1 sda2[0]
      33537920 blocks super 1.2 [2/1] [U_]
      bitmap: 0/1 pages [0KB], 65536KB chunk

unused devices: <none>

Recover from a failed disk

This is the process to follow if you have needed to replace a faulty disk. If you want to emulate a replacement, you may boot into a Ubuntu Live session and use

dd if=/dev/zero of=/dev/sdX

to wipe the disk clean before re-rebooting into the real system. If you just tested the boot/RAID redundancy in the section above, you can skip this step. However, you must at least perform steps 2 and 4 below to recover full boot/RAID redundancy for your system.

Restoring the RAID+boot system after a disk replacement requires the following steps:

Partition the new drive.
Add partitions to md devices.
Clone the boot partition.
Add an EFI record for the clone.

1. Partition the new drive

Copy the partition table from the healthy drive:

sudo sgdisk /dev/sdY -R /dev/sdX

Re-randomize UUIDs on the new drive.

sudo sgdisk /dev/sdX -G

2. Add to md devices

sudo mdadm --add /dev/md0 /dev/sdX2
sudo mdadm --add /dev/md1 /dev/sdX3

3. Clone the boot partition

Clone the ESP from the healthy drive. (Careful, maybe do a dump-to-file of both ESPs first to enable recovery if you really screw it up.)

sudo dd if=/dev/sdY1 of=/dev/sdX1

4. Insert the newly revived disk into the boot order

Add an EFI record for the clone. Modify the -L label as required.

sudo efibootmgr -c -g -d /dev/sdX -p 1 -L "Ubuntu #2" -l '\EFI\ubuntu\grubx64.efi'

Now, rebooting the system should have it back to normal (the RAID devices may still be sync'ing)!

Why the sleep script?

It has been suggested by the community that adding a sleep script might be unnecessary and could be replaced by using GRUB_CMDLINE_LINUX="rootdelay=30" in /etc/default/grub followed by sudo update-grub. This suggestion is certainly cleaner and does work in a disk failure/replace scenario. However, there is a caveat...

I disconnected my second SSD and found out that with rootdelay=30, etc. instead of the sleep script:
1) The system does boot in degraded mode without the "failed" drive.
2) In non-degraded boot (both drives present), the boot time is reduced. The delay is only perceptible with the second drive missing.

1) and 2) sounded great until I re-added my second drive. At boot, the RAID array failed to assemble and left me at the initramfs prompt without knowing what to do. It might have been possible to salvage the situation by a) booting to the Ubuntu Live USB stick, b) installing mdadm and c) re-assembling the array manually but...I messed up somewhere. Instead, when I re-ran this test with the sleep script (yes, I did start the HOWTO from the top for the nth time...), the system did boot. The arrays were in degraded mode and I could manually re-add the /dev/sdb[23] partitions without any extra USB stick. I don't know why the sleep script works whereas the rootdelay doesn't. Perhaps mdadm gets confused by two, slightly out-of-sync component devices, but I thought mdadm was designed to handle that. Anyway, since the sleep script works, I'm sticking to it.

It could be argued that removing a perfectly healthy RAID component device, re-booting the RAID to degraded mode and then re-adding the component device is an unrealistic scenario: The realistic scenario is rather that one device fails and is replaced by a new one, leaving less opportunity for mdadm to get confused. I agree with that argument. However, I don't know how to test how the system tolerates a hardware failure except to actually disable some hardware! And after testing, I want to get back to a redundant, working system. (Well, I could attach my second SSD to another machine and swipe it before I re-add it, but that's not feasible.)

In summary: To my knowledge, the rootdelay solution is clean, faster than the sleep script for non-degraded boots, and should work for a real drive failure/replace scenario. However, I don't know a feasible way to test it. So, for the time being, I will stick to the ugly sleep script.


How to prevent the dimming of my desktop picture when enabling icons on desktop?

The effect occurs when you use a sRGB JPG. Convert the image into RGB JPG or into a PNG and the effect/bug is gone.


How can I keep track of all the packages / dependencies that are installed when I run apt-get for a specific package?


Why does GNOME (Ubuntu 18.04) not recognise my sound output?

After further searches about this problem and a few more futile attempts to solve it for myself, it was one of the following instructions which seemed to work:

sudo apt remove indicator-common
sudo apt autoremove

Having re-booted after these two commands my sound (and speaker indicator) re-appeared. There is no longer a microphone indicator, although the microphone does show up in the Settings now.
I suspect, but am not certain, that it was removing the indicator-common package which solved the problem. I have not yet tried re-installing it. And it could be that something from my earlier attempts was the solution, which I didn't notice until the re-boot.


Using Alt key like the mac command (⌘) key for copy/paste

I'm looking for the same answer, but I haven't found a good solution yet.

In the interim, I've swapped my alt, ctrl which helps with keeping my muscle memory.

This might work for you in the mean time:

setxkbmap -layout 'us,us' -option 'ctrl:swap_lalt_lctl'

And you might have to keep Gnome from resetting your layout:

sudo gsettings set org.gnome.settings-daemon.plugins.keyboard active false

Hopefully someone a little bit more knowledgeable will provide a solution to keep from using Shift+Ctrl+c in the terminal.

[EDIT] Turns out the settings don't last past a reboot. I set this in my xorg.conf

Section "InputDevice"
  Identifier     "Keyboard0"
  Driver         "kbd"
  Option         "XkbRules" "xorg"
  Option         "XkbModel" "pc105"
  Option         "XkbLayout" "us"
  Option         "XkbOptions" "ctrl:swap_lalt_lctl"
EndSection


To activate HDMI audio while using the open-source drivers edit the /boot/grub/menu.lst file and add this to the end of your "kernel" line:

radeon.audio=1

Also in terminal type this following command to update grub:

sudo update-grub


Clock in Apache doesn't match system time

PHP by default reports the current time in UTC (GMT) but in Debian & Ubuntu, it should instead be using the system time. Try running the phpinfo script by saving this text in var/www/phpinfo.php and then accessing http://localhost/phpinfo.php.

<?php
  phpinfo();
?>

The date section of this info page should tell you what timezone PHP is set to use.


GNOME Keyring not remembering auth for autosshfs

Note that autosshfs uses keychain to set the environment variables s.t. ssh can find the ssh-agent and its authentication socket. If you haven't told keychain to manage the key you want to use for sshfs it will ask for your passphrase. Check the output of keychain -q --eval, which is what autosshfs will run.

A few more debugging hints from issues I previously fell over:

I'm assuming your .ssh/config specifies which key to use for the remote host?
Do you have keys in .ssh not added to the keychain ssh could possibly offer (and hence ask you to unlock)?
Did you use the same hostname when you tried logging in on the shell that you use with autosshfs (e.g. you use and alias for autosshfs and tried the full hostname in the shell)?
Have you verified that ssh-agent was still running and still had your keys loaded at the point autosshfs was failing / asking for the passphrase?


No such device grub rescue, tried many solution

Create an ESP (EFI partition, see this page ), then run Boot-Repair again.


How to change separately speed of pointer for mouse / touchpad?

Try this script:

#!/bin/sh
xinput set-prop "Logitech USB Optical Mouse" "Device Accel Constant Deceleration" 5
xinput set-prop "Logitech USB Optical Mouse" "Device Accel Velocity Scaling" 1


How to restrict users on deleting files from trash folder?

No, users will always be able to delete the files they own (modulo some complex ACL setups which are not feasible for a desktop).


Virtualizing Windows and Ubuntu with Xen

With modern (2006 or so) hardware, virtualization is easier, safer, more convenient, you name it; I don't know why anyone would duel* boot any more, if they have more than minimal hardware. There are many hypervisors to choose from. I understand Xen is a fine choice, though I have no personal experience with it. I have used VirtualBox and VMware. I prefer the former.

(* Yes that's a joke, for those of us who can spell.)

You do indeed run both OSes simultaneously. You'll boot to the primary (host) OS, and when you want, launch an application to install or run guest OSes. The guest(s) will run in their own windows, much like any application. Guests can be constrained to run in a reduced portion of your hardware. On a four core, 8GB machine guests can be made to run as a two (or one!) core machine with 2GB of RAM, and they will run just so, with nearly the same performance as they would on raw metal with those specs. Their "hard disk," by the way, will be a file, a very large file, in your host OS's file system.

Just a couple of things to look out for. You really do want hardware that supports hardware virtualization (VT-x on Intel, AMD-V on AMD chips). Some hypervisors (like Xen) can run specially modified guest OSes on lesser CPUs, and that's commendable, but you'll be happier with hardware support. You'll need RAM enough to cede to the guest OS. Find the option to allow guest OSes to run in (host) swap space and turn it off. Allocate enough RAM to the guest that it won't need to swap internally: 2GB minimum for Ubuntu with Unity or Windows Vista. Windows XP and just about any other Linux OS/Desktop will run fine in 1GB. (Xubuntu for example works fine in 1GB, if you don't make great demands on it from within.) In any case you can probably adjust the RAM and CPU afterward. Also I suggest allocating all disk space for the guest OS's hard disk image up front when you install the guest, when you're given a choice of doing that or allowing it to grow.

Ah! Harrumph -- I should say that video performance will suffer in the guest. Gaming and 3D won't work well. Even so, on my desktop box with oomph, where I keep Flash confined to a guest OS, streaming video on Flash is entirely watchable full screen.


Ubuntu 20.04 LTS disable on boot: unlock keyring for an application who wants to acces "Default Keyring" but is locked

Open Passwords and Keys utility from Gnome Dash (Pic 1)(I don't now why, but I always start this program on GnuPG keys. Click arrow in top left corner(Pic 2)). Right click on Login and choose Change Password.Input original password (the password you set when user created), set new password to be empty.(Non secure)(Pic 3)
Pic 1:

Pic 2:

Pic 3:


from OP edit:

sudo -lu indicated old GPT Data. Fixparts was able to remove them. Now Gparted is able to recognize all partitions.


A fantastically neat way to do this, via a Gnome Shell extension and no code hacking, is to install Dash to Dock:

https://extensions.gnome.org/extension/307/dash-to-dock/

You don't have to have its dock enabled.

In the main tab, set:

Dock is fixed and always visible to OFF and
Autohide and Intellihide to OFF

In the optional tab, set:

Make message tray insensitive to mouse events to ON.

Voila!


Error Installing PHP 5.3.21 on Ubuntu 12.04

Ok, after looking through the configure file and some other stuff I figured out what the issue was.

I was having issues with IMAP, LDAP, and XPM i.e. the configure script couldn't find some of the files it needed to complete the process. It appears some of the required files are in /usr/lib/ and some are in /usr/lib/x86_64-linux-gnu, with most in the former.

However, you could set --with-libdir in your configure script to deal with one issue, and that setting breaks for something else #Bummer. In my case, I set this to default to /usr/lib/x86_64-linux-gnu, but there were a lot of files in /usr/lib e.g. libc-client.a as listed in my question.

So I decided to set up the configure options for /usr/lib as default and then create symlinks for the errant files in x86_64-linux-gnu.

So basically, here's what I did:

A. Create symlinks for the errant files

ln -s /usr/lib/x86_64-linux-gnu/libXpm.a /usr/lib/libXpm.a
ln -s /usr/lib/x86_64-linux-gnu/libXpm.so /usr/lib/libXpm.so
ln -s /usr/lib/x86_64-linux-gnu/liblber.a /usr/lib/liblber.a
ln -s /usr/lib/x86_64-linux-gnu/libldap_r.a /usr/lib/libldap_r.a

B. Changed some specific configure options I set earlier in the question to the following (all I changed was the 3 listed here, the other options remained as they were)

--with-libdir=lib --with-xpm-dir=/usr --with-ldap=/usr

And everything worked ok after this.

I hope it helps if you run into the same issue. Cheers.


This is an error returned when you haven't specified the serial port to use.

First, make sure your Uno is plugged into the laptop through the USB port. Then, in the Arduino IDE, make sure you select the serial port under the Tools>Serial Port menu. Also, make sure you've selected the correct board under the Toold>Board menu. After this, if you try compiling and uploading, it should work correctly.


How to find libraries in Ubuntu Software?

There are another 2 good choices to add to the Software Center and the Synaptic Package Manger:

1. Using 'apt-cache search'

You can open a Terminal and search for all the -dev files attached to libgtk as follows:

andrew@athens:~$ apt-cache search libgtk | grep dev
libgtksourceview-3.0-dev - development files for the GTK+ syntax highlighting widget
libgtkspell-dev - Development files for GtkSpell
libgtkspell3-3-dev - Development files for GtkSpell
libgtk-3-dev - development files for the GTK+ library
libgtk2.0-cil-dev - CLI binding for the GTK+ toolkit 2.12
libgtk2.0-dev - development files for the GTK+ library
libgtkmm-2.4-dev - C++ wrappers for GTK+ (development files)
libgtkmm-3.0-dev - C++ wrappers for GTK+ (development files)
libgtk-sharp-beans2.0-cil-dev - Supplementary CLI bindings for GTK 2.14+ - development package
libgtk-vnc-1.0-dev - VNC viewer widget for GTK+2 (development files)
libgtk-vnc-2.0-dev - VNC viewer widget for GTK+3 (development files)
libgtkada-bin - Ada binding for the GTK+ GUI (development utilities)
libgtkada2.24.4-dev - Ada binding for the GTK+ GUI (development files)
libgtkdatabox-0.9.2-0-dev - Gtk+ library to display large amounts of numerical data (development)
libgtkdataboxmm-dev - C++ bindings for GtkDatabox - development files
libgtkglada2.24.4-dev - Ada binding for GTK+ OpenGL extensions (development files)
libgtkglext1-dev - OpenGL Extension to GTK+ (development files)
libgtkglextmm-x11-1.2-dev - C++ bindings for GtkGLExt (Development files)
libgtkhex-3-dev - GNOME Hex editor for files (development headers)
libgtkhotkey-dev - Gtk hotkey static libraries and headers
libgtkimageview-dev - image viewer widget for GTK+ (development files)
libgtkmathview-dev - rendering engine for MathML documents
libgtkpod-dev - main library for the gtkpod package, development kit
libgtksourceview2.0-dev - development files for the GTK+ syntax highlighting widget
libgtksourceviewmm-3.0-dev - C++ binding of GtkSourceView - development files
liblablgtkmathview-ocaml-dev - OCaml bindings for libgtkmathview, a GTK widget to render MathML
liblablgtksourceview2-ocaml-dev - OCaml bindings for libgtksourceview2, a source editor GTK+ widget
libgtk-dotnet3.0-cil-dev - GTK.NET library - development files
libgtk3.0-cil-dev - CLI binding for the GTK+ toolkit 3.0
libgtkextra-dev - development files for libgtkextra-x11-3.0
libgtkgl2.0-dev - OpenGL context support for GTK+ (development files)
libgtkspellmm-3.0-dev - C++ wrapper library for GtkSpell (development files)
andrew@athens:~$

Variations on this type of search are only limited by your knowledge of regular expressions :).

2. Use the Web...

I quite often use the very nice web based search here:

Ubuntu Packages Search
http://packages.ubuntu.com/

There are many, many possibilities in usage to search by Ubuntu Release, package name, file names etc etc. A simple search for libgtk under Xenial can be seen here...

Several other possibilities but this should hopefully get you started....


The comments, especially from oldfred, have covered the fact that most of the "problems" you've identified in your question are not really problems. What we're left with, then, is what's in the first line of the question:

  My computer is only booting windows.

This is a bit vague, but I suspect you mean it's booting straight to Windows. The reason is likely this, from your Boot Repair summary:

=================== efibootmgr -v
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 000C,0001,2001,2002,2003
Boot0001* Linux HD(1,MBR,0x61,0x3860,0x1300)/File(EFIBootgrubx64.efi)RC
Boot0007* ubuntu    HD(1,GPT,412f327c-c30a-4893-81c5-ad5ded944d84,0x800,0x32000)/File(EFIubuntushimx64.efi)
Boot000C* Windows Boot Manager  HD(1,GPT,412f327c-c30a-4893-81c5-ad5ded944d84,0x800,0x32000)/File(EFIMicrosoftBootbootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....................

(I've removed some irrelevant lines for clarity.) The BootOrder line specifies the order in which various boot loaders will be run. In your case, Boot000C, which is Windows Boot Manager, is run first. This is a common problem with two or three common causes. I recommend you read the following questions and their answers:

Windows 8 removes Grub as default boot manager
How can I repair grub? (How to get Ubuntu back after installing Windows?)
efibootmanager -o changes are lost on reboot

These problems aren't identical to yours, but the solutions are pretty similar. In particular, using EasyUEFI or bcdedit in Windows is likely to fix the problem. Note that the last link is to a problem that's pretty dire, and increasingly uncommon. Go there only if other solutions don't work for you. (The fact that you've got an ubuntu entry in the efibootmgr output and a BootOrder line makes me think that it won't come to that for you, but I could be wrong about that.)


Why do I now have to enter username and password when connecting from iPhone to the ad-hoc wireless network created on my Ubuntu machine?

I'm not answering the question, but I can't post comment yet. Sorry for that.

Do you know that WEP is completely broken? You'd better not encrypt anything: it will be as efficient to protect you and you won't have any user/password problem.

You can try to set up a WPA ad-hoc connection using:

ap_scan=2
network={
    ssid="MySSID"
    mode=1
    freq=2412
    key_mgmt=WPA-PSK
    proto=RSN
    pairwise=CCMP
    group=CCMP
    psk="passwd"
}

and launch it using

wpa_supplicant -cfile.conf -iwlan0 -Dwext

You can also try to get connection from USB. I did that months ago with my android phone (internet connection on the laptop --> mobile phone)


Can I use Comodo without filesystem filter driver

Of course you can use it without this options just you'll need to scan manually every time

But there is simple soution:

1) You can get this driver "redirfs,avflt,dazuko -- kernel 3.18 or lower" needed from here:

http://www.bondoffamily-net.com/~kinta-chan/techknow/DownLoad/DownLoad.html

2) Go to folder where you downloaded the driver:

sudo mv driver.tar /opt/COMODO/driver.tar

3) Then change directory

cd /opt/COMODO

4) Install it
sudo ./post_setup.sh
(Please be carefull at end of licence you NEED to accept with Y and then you can add email address, and choose Language 8)

5) Restart cmdavd
/etc/init.d/cmdavd restart

6) Reboot if must

7) RIGHT CLICK on System Tray icon and click

Antivirus Security Level
On Access

DONE!!!


How can I fix Sportsdevil add-on in XBMC running on Ubuntu 13.04?

The nearest equivalent to AppData would be the (hidden) .config in your home directory. You'll find this contains folders with the settings for most commonly used applications.

However, a number of applications like XBMC create their own directory rather than use this one, so you'll find XBMC's settings, database etc in $HOME/.xbmc.

(You can see hidden directories in the file browser with View->Show Hidden Files).


How do I find the  key mapping in Vim so that I can create a similar map on MacOS?

Argh! :-/

What I've discovered is that MacOS actually intercepts the  key. As a consequence, one cannot use it in vim.

Instructions to figure this out about your OS:

Open vim.
Go to insert mode using 'i' or 'Insert' or what ever key your OS uses by default.
Type Ctrl-v and press the key in question. If you see some input from the key, it means that it is available, otherwise not.

My solution was to create an alias that maps the vim command to nano.


Look in your /etc/apt/sources.list. If it has references to artful then you're on 17.10, and will continue to get updates (for 9 months) on that stable release.


Ubuntu 20.04 and Windows 10 on Dual Boot: Xbox Controller with wireless adapter always needs pairing after using Ubuntu then going to Windows

I experienced the same issue and I think I found a solution.
Here some friendly folks described how to disable usb devices on linux.

So basically use lsusb to list usb devices in terminal.
Identify the xbox dongle

For me it was: Bus 003 Device 007: ID 045e:02e6 Microsoft Corp. Wireless XBox Controller Dongle

create a file (e.g. my.rules) in /etc/udev/rules.d/
add this line to the file:
ACTION=="add", ATTR{idVendor}=="045e", ATTR{idProduct}=="02e6", RUN="/bin/sh -c 'echo 0 >/sys/\$devpath/authorized' where the vendor id and product id correspond to the dongle's ID which we got from lsusb
reboot & pair the controller one last time in windows

After doing these steps I don't need to re-pair my controller between ubuntu & linux boots anymore.


Graphics driver issues with Ubuntu Gnome edition 15.10

Instructions for the clean installation of Ubuntu :

Boot from the Ubuntu GNOME installation media.

When the boot menu appears : Highlight Try Ubuntu without installing and  press the E key.
Add the nouveau.modeset=0 parameter to the end of the linux line ... Then press F10 to boot.

When having entered the desktop start the installation process, once completed restart the PC.

When the GRUB boot menu appears : Highlight the Ubuntu menu entry and  press the E key.
Add the nouveau.modeset=0 parameter to the end of the linux line ... Then press F10 to boot.

Now install the new drivers and NVIDIA Optimus support.

When the login screen appears press Ctrl + Alt + F1.

Enter your user name and password and then execute:

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-355 nvidia-prime
sudo reboot

In case you have to adjust which card to use in BIOS select NVIDIA or  switchable graphics mode.
Open NVIDIA X Server Settings -> Prime Profiles to switch between the intel and NVIDIA GPUs.


Need user permission for the directory after installing snap package

No, that breaks the purpose of snap. So snap does not allow changing app on the fly.
Also, I see no benefit of converting binary archive to snap, as you intended to do.

Anyway, you can override prepare: and extract that binary archive. So it get snap'ed.
The correct way is to build snap from source package. So you can be sure it will work with any platform. By the way snapcraft is not well documented, better to learn from snapd source code and resent snapcraft.yaml in open source repositories.


Can't run jupyter notebook when using ssh

Totally basic thing! Logging in over ssh only runs the .bash_profile and not .bashrc. All my PATH directories for Anaconda and Jupyter were added to .bashrc. I followed this advice and added the following to my .bash_profile

if [ -f ~/.bashrc ]; then
   source ~/.bashrc
fi

Now on to the next basic thing that I've messed up!


What is Macromedia Flash alternative in Ubuntu

You can use Lightspark.

  Lightspark, is a free, open source Flash player. Lightspark is an
  LGPLv3 licensed Flash player and browser plugin written in C++/C that
  runs on Linux. It aims to support Adobe's newer Flash formats and AVM2
  virtual machine.  The last released version is 0.6.0.1, download it
  from here.

  Lightspark currently supports YouTube well enough for daily use.1

1Source:Lightspark


Running Ubuntu from USB SSD across multiple systems

A USB 3.0 portable SSD is a little bit larger than a USB flash drive. They are available from different manufacturers in sizes up to 1TB. Ubuntu can be installed on a USB 3.0 portable SSD as a live USB with persistence in the usual way, for example with the built-in Startup Disk Utility application. In my experience a live Ubuntu USB cannot be successfully upgraded to a newer release. It's better to install the latest LTS release and stick with it.

Beyond that, I'm pessimistic about the idea of using a portable drive for programming. Programming often requires installing a lot of software, which seems to cause more problems than it's worth when running Ubuntu on live USB media, especially intermittent freezing due to the higher latency of the USB connection.


How to add more than four keyboard layouts in Ubuntu 12.04?

Right now it seems impossible to set up more than 4 keyboard layouts in Ubuntu.

A workaround would be to enable keyboard shortcuts that would execute a special command to switch to a particular keyboard layout.

Therefore:

Go to System Settings > Keyboard > Shortcuts
Add the first new custom shortcut, let's say "US English", with command setxkbmap us. Then, once you press Ok on it, set the shortcut to Ctrl+F1.
Then, add "Greek' for example, with command setxkbmap gr and shortcut Ctrl+F2.
You can add more layouts.

Look into /usr/share/X11/xkb/symbols/ for the correct layout file (like 'us', 'gr').

You then switch with Ctrl+F1, Ctrl+F2, etc.


Internal Error - Trying to install Valve's Steam client via Ubuntu Software Center

I had this same problem.

To get around it I used 'wget' in a terminal to download the file.

When the interruption happened 'wget' just reconnected and continued to download the file.

I used the following command

wget http://repo.steampowered.com/steam/archive/precise/steam_latest.deb


It (at last) works in Ubuntu 16.10:

edd@max:~/src/progs/C++(master)$ cat cmath.cpp

#include <cmath>
#include <iostream>

int main(void) {

    std::cout << "Square root of 9 is " << sqrt(9) << std::endl;

}
edd@max:~/src/progs/C++(master)$ clang++ -o cmath cmath.cpp
edd@max:~/src/progs/C++(master)$ ./cmath
Square root of 9 is 3
edd@max:~/src/progs/C++(master)$


To enter in your home folder, just type cd without parameters.


Bash command to determine is it the first ssh connection after the reboot?

This line should print "First" if it's the first login by user "user" since reboot from non-local host:
[ $( last | sed '/^reboot/,$d' | egrep '^user +pts/' | wc -l ) -lt 2 ] && echo First

Note that the last log is usually rotated monthly, so the answer might be incorrect if the user has logged in more than one month ago.
I anchor the expression with ^ to make sure the user name is picked from the first column (should the user's name be still, we'd get a false hit on lines reading still logged in :-) and I also expect pts/ to appear, indicating a remote login (local logins are indicated with tty instead).
This should work even if the computer hasn't been rebooted current month. But it would not work if your user's login name is verbatim reboot.


I fixed my problem!
I upgraded to quantal, then to raring,saucy, and finally trusty tahr (LTS 14.04).
It works and everything is good as new now. Even though i wasted another 10 hours doing so.


For the most part, deb packages come with a md5 file containing signatures of all files in the package. These files are located at /var/lib/dpkg/info/$pkg.md5sums.

To simplify the periodic check of all installed packages, the debsums package can be of help. Install it, clean the cache with:

sudo apt-get clean

then run sudo debsums_init to generate md5 sums for packages that do not provide them (the packages are downloaded to generate such sums).

Next, edit the file /etc/default/debsums and set CRON_CHECK=weekly to configure a cron weekly job for the check of debsums.

You can run the check manually with the command:

sudo debsums -cs

Regarding the integrity of the dependencies, I suppose that the command:

sudo apt-get -f install

should signal and try to resolve any problem it finds relative to installed packages, but the Debian/Ubuntu package management system is a very complex object, and could be very difficult to find and resolve its problems.


Laptop locks screen instead of hibernates

If hibernatian works by using sudo pm-hibernate command when you want to hibernate.

You can enable the hibernate option in the menus. To do that, use your favorite text editor to create /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla. Add the following to the file and save:

[Re-enable hibernate by default]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes

 Source: helpdeskgeek


Nautilus blocks the command line in Ubuntu 18.04. Why?

In the previous version, I could open Nautilus from the command line and continue to use the command line afterwards; it didn't block.

Add an &  at end of the commandline like so:

nautilus &

You will still see notices in the terminal session but will also have a prompt when you press Enter. Example:

  But I'd like to know why Nautilus blocks now when it previously didn't.

One of the many changes to the way our system works after Canonical dropped Unity. We now use GNOME 3 and Wayland.

You could also add the & to your regular nautilus command by making an alias, symlink or function to nautilus.


Downgrading packages is a very difficult problem. You should use ppa-purge for this. But ppa-purge requires that the PPA be still added, so you will have to add back the PPA, and then use it.


AMD/ATI drivers from website vs. proprietary drivers in Ubuntu 12.04 Repos?

Here are the differences,

The fglrx package, contains the driver version available at distro release.

The fglrx-updates package, contains the newest driver version packaged for Ubuntu.

The AMD website download, provides the newest driver released.

It takes time to properly package the official AMD releases, so fglrx-updates might not always be the absolute newest release.  fglrx-updates is often still very recent, It was specifically packaged for Ubuntu, and I normally prefer it to the other options. The only time you would want to go either up, or down, is when a specific situation arises.


Are Ubuntu and Windows able to share disk space?

Yes, this is indeed possible.

Ubuntu can read / write files stored on a Windows NTFS partition out of the box, nothing further required.
However, if you want to read / write files stored on an Ubuntu Ext4 partition from Windows, you'll need to install a driver or utility to do so - there's various options described in this question on SuperUser.

So you have two options: Create a shared partition, and format it to NTFS, or install an Ext4 utitliy / driver in WIndows.


how to manage multiple ssh key in Ubuntu?

Please follow  https://help.ubuntu.com/lts/serverguide/openssh-server.html.en  on how to setup ssh. #2 and #3 is not an issue if you follow the normal install.

Important part in the guide about the SSH keys:

  SSH Keys

  SSH keys allow authentication between two hosts without the
  need of a password. SSH key authentication uses two keys, a private
  key and a public key.

  To generate the keys, from a terminal prompt enter (client side):

ssh-keygen -t rsa

  This will generate the keys using the RSA Algorithm.
  During the process you will be prompted for a password. Simply hit
  Enter when prompted to create the key.

  By default the public key is saved in the file ~/.ssh/id_rsa.pub,
  while ~/.ssh/id_rsa  is the private key. Now copy the id_rsa.pub file
  to the remote host and append it to ~/.ssh/authorized_keys by
  entering:

ssh-copy-id username@remotehost

  Finally, double check the permissions
  on the authorized_keys file, only the authenticated user should have
  read and write permissions. If the permissions are not correct change
  them by:

chmod 600 .ssh/authorized_keys

  You should now be able to SSH to the
  host without being prompted for a password.

Management is done through the ssh-copy command and the .ssh/autorized_keys in the guide so that will tackle the title.

That should have you setup a server with ssh keys. ALWAYS have a 2nd account open on that system and make sure you can connect over ssh before exiting the system


Is it possible to put X to sleep, leaving the rest of the system awake?

Pausing a process tree

I'm halfway there. I found kill -STOP <PID> which freezes a process. There's a CONT version too which wakes it up. Therefore I can find and STOP the nodm process tree with this sexy command:

pstree -p $(ps ux | awk '/nodm$/ {print $2}') | grep -oP '\d+' | xargs kill -STOP

And we can wake all stopped processes (for the current user) with:

ps ux | awk '$8 ~ /^T/ {print $2}' | xargs kill -CONT

This actually seems to work. I've just tested it and I'm amazed that neither X, XBMC or the file it's playing over NFS (yeah this works mid-video) seem to mind that it's being paused for five minutes.

Resuming from IR

This was the next challenge - how could I restart these processes from IR? For this we need irexec which can run a arbitrary command for any button, regardless of what else is listening to lirc.

We need a few scripts in place to make this happen. First ~/.lircrc

begin
prog = irexec
button = *
config = ~/.resume &
end

and ~/.resume (this will need chmod +x ~/.resume running after it's created)

#!/bin/sh
ps ux | awk '$8 ~ /^T/ {print $2}' | xargs kill -CONT

Then all we need to do is load irexec. To keep it from being zombified when the STOP command is run, we have to shunt the process out of the current tree which is made simple with setsid. In my case, I add the following before xbmc's launcher in ~/.xsession:

setsid irexec

The final mystery: How can I get XBMC to run the STOP script instead of sleeping?

The only part I haven't solved now is getting XBMC to run a command instead of shutting down. Work in progress. The only option I can find at the moment is creating a custom Python screensaver for XBMC which seems really dull (and I can't get it working).


Can't update and can't install anything due to dependency problem

Try this first, in terminal introduce these commands:

$ sudo apt-get autoremove
 $ sudo apt-get autoclean
 $ sudo apt-get update
 $ sudo apt-get -f install

Now should´t be any dependency problems. Try to install some application.

The other thing you could try is open a terminal with the followng commands:

sudo rm /var/lib/apt/lists/lock
 sudo apt-get update

Now you should be able to install packages or update.


Openstack-Install - Problem with juju bootstrap

In your selected network architecture, private network(your nodes) must have access to Internet, and it seems in yours do not have access to Internet.

You must enable nat on your region controller following instructions in this link https://help.ubuntu.com/community/Internet/ConnectionSharing

1. step one - considering private network connected to eth1:

sudo iptables -A FORWARD -o eth0 -i eth1 -s 10.10.10.0/24 -m conntrack --ctstate NEW -j ACCEPT
sudo iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
sudo iptables -t nat -F POSTROUTING
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

2. Save the iptables:

sudo iptables-save | sudo tee /etc/iptables.sav

3. Edit /etc/rc.local and add the following lines before the "exit 0" line:

iptables-restore < /etc/iptables.sav

4. Enable routing
Configure the gateway for routing between two interfaces by enabling IP forwarding:

sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"

5. Edit /etc/sysctl.conf and uncomment:

#net.ipv4.ip_forward=1

... so that it reads:

net.ipv4.ip_forward=1

Regards
Sajjad


How to get the file location of the current wallpaper file?

In a terminal, do:

gsettings get org.gnome.desktop.background picture-uri

You will get something like file://path/to/filename.

Or, equivalently, open dconf-editor (install it if you don't have it) and navigate to this key.


Using gnome_disks to reduce partition size

Same for me. i try to resize my linux partition (60Gb) and it says that max is 60Gb and min is 60Gb.
Possible Solutions:

Do it on a LiveUSB, not in the system.

Make sure that you don't reached the 4 partitons limit of MBR Partiton schemes (doesn't help if you have an GPT Partiton scheme)

Question: Does your partition has a key icon on it in gparted?
it means that the partiton is in use.
the 1st solution may help you because while booting from an LiveUSB the linux partiton is not used. (and you can resize the linux partiton, even REMOVE it)


How do I bind a bunch of /24 subnets (secondary) in one shot?

I run a couple of scripts with every new install. One is more for configurations and other other to add software.

Part of my script. Over time changed from 192. to 10. (and back), so I comment out one not currently used.

#NFS setup
fname_exp=/etc/exports
#nfs1="/mnt/data   192.168.1.0/24(rw,no_root_squash,async)"
#nfs2="/mnt/shared 192.168.1.0/24(rw,no_root_squash,async)"
nfs1="/mnt/data   10.0.0.0/24(rw,no_root_squash,async)"
nfs2="/mnt/shared 10.0.0.0/24(rw,no_root_squash,async)"

echo $nfs1 >> $fname_exp
echo $nfs2 >> $fname_exp


How come service --staus-all outputs a non-existing service?

there is no such service/process running in the system

The service name does not have to match the process name as listed by tools like ps or top. Look at the file /etc/init.d/jetty - that's where the service script is located, probably.

Based on the service name 'jetty', I think this is an instance of Jetty. I would also guess that running

ps aux | grep java

will give you some Java processes concerning this service.

Jetty is an alternative to Tomcat - a JSP servlet engine. Does that ring a bell?

To get rid of this, removing the package should do the trick:

sudo apt-get remove jetty

This will work as long as it was installed using the package management. You'll have to remove it manually if you have installed it manually.


Environment Variable or saving dev_key file

You can create an ~/.ads directory. Assuming the API key is 123, open a terminal window with Ctrl+Alt+T and run these commands:

mkdir ~/.ads
echo '123' > ~/.ads/dev_key

If you want to set an environment variable instead, you can study this tutorial.


How can I receive a visual notification each time a process has finished in a terminal window?

Use this:

yourlongrunningcommand ; notify-send "Yay! We're done!  Off to the bar!"

To understand the command:

The ; denoted sequential execution.  First execute yourlongrunningcommand and when done, execute the next command... which is
notify-send, which is nothing more than the type of notification
you wanted as per our comment exchange

I just googled to know that second part.   I found this on askubuntu.com.


TZ=UTC makes glibc use the zoneinfo file named "UTC", which in your case is /usr/share/zoneinfo/right/UTC containing leap second adjustments.

The -u option is actually equivalent to setting TZ=UTC0. Since there is no zoneinfo file named UTC0, the setting gets reinterpreted as being in the "std offset" format instead  (as in tzset(3)). In this format, the first three letters are just used as the visible name, and the "0" is used as a simple offset from UTC (that is, offset from system clock).


Go to Options->Language Settings->Languages and choose UK or U.S. English. The spell checker is available for only few varieties of English. For e.g. I had selected Indian English once and spell-check was not functioning. If you want to use a third party spell checker, then you can go for this: After the Dead Line. It is very powerful.


Ubuntu 12.04 dual monitor "unknown monitor" problem

Make sure the proprietary Nvidia drivers are installed. You can find them in the "Additional Drivers" tab of the "Software Sources" app. If you don't see any Nvidia drivers listed, make sure you have the "Proprietary drivers for devices (restricted)" box checked in the "Ubuntu Software" tab and your system is up to date (search "update" in the Unity dash and run the software updater).

Once you've installed the Nvidia drivers, you no longer use the built-in display manager. Instead, you use Nvidia's. Just search for "Nvidia" and you'll find it. I don't remember the section name off hand, but it says something along the lines of "X Server Configuration," and when you go to it, it will look similar to the built-in display manager (showing two screens and allowing you to adjust their position, resolution, and whatnot). Make the changes and click "Apply" to test them out. Once you get the settings the way you want, click the "Save X Configuration" button to make the changes permanent. It will ask you for your password, since it's a system configuration change.


1)open this file through terminal

gksu gedit /etc/apt/apt.conf

copy paste these line into the text file ,

Acquire::http::proxy "http://username:password@proxyserver:port/";
Acquire::ftp::proxy "ftp://username:password@:proxyserver:port/";
Acquire::https::proxy "https://username:password@proxyserver:port/";

Save and close the file :)

2)Open this through terminal

gksu gedit /etc/bash.bashrc
export http_proxy="http://username:password@proxyserver:port/"
export ftp_proxy="http://username:password@proxyserver:port/"

put the next two line at the end of the text file

Save and close.

3) login as root

 sudo -i
    export the environment variables.
    export http_proxy="http://username:password@proxyserver:port/"

and now you can do most of the things.
And for some applications u can change the authentication by changing the default settings to proxy settings,but u have to figure out which one u have to change.for example to Wget, you have to change gedit /etc/wgetrc, etc..


Installing Ubuntu in laptop with secondary (broken) Nvidia GPU disabled or blocked

There is no possibility to disable discrete GPU on my laptop. However I managed to install Ubuntu, dont know exactly why it worked this time. I checked Expert mode in boot menu and somehow it installed fine.

After installation recovery boot worked, and blacklisting nouveau drivers did the trick. How to disable Nouveau kernel driver;


QPDF: reversing order of files to be appended via globbing qualifier

AFAIK bash has no such qualifier. You could use an external sort command ex. assuming a sufficiently recent version of bash that supports a null-terminated mapfile:
mapfile -d '' -t files < <(printf '%s\0' ./*.pdf | sort -zr)

qpdf --empty --pages "${files[@]}" -- output.pdf

Note that if you want a reverse numeric sort, equivalent to the zsh (nOn) qualifier, you would need to use sort -zVr rather than the plain numeric sort -znr since sort won't look past a non-numeric prefix.


GRUB not showing up after installing ubuntu

To get dual-boot working fine on your laptop, you can check these steps:

Section - I: Getting Windows OS ready for Dual-boot

Login to your Windows machine with an Administrative account and right-click on the Start Menu >> Command Prompt (Admin) option to open Windows Command Line with elevated privileges
Once you are in the command prompt, type diskmgmt.msc to open "Disk Management Utility". From here, right click on the "C:" partition and select Shrink Volume in order to resize the partition
On "Shrink C:" enter a value to shrink in MB and hit the Shrink option to start partition resize

Note: Do not forget to create a Bootable USB having Ubuntu loaded into it before you start with the next section.

Section - II: Installing Ubuntu OS

Reboot the machine and instruct the BIOS/UEFI to boot-up from the DVD/USB by pressing a special function key (usually its F12, F10 or F2 depending on the vendor specifications)
Once the media boot-up, a new Grub screen should appear on your monitor. From the menu select Install Ubuntu and hit the Enter key to continue

Note: After the boot media finishes loading into RAM you will end up with a completely functional Ubuntu system running in live mode

On the "Launcher" hit on the second icon from the top, Install Ubuntu 18.04, and the installer utility will start. Choose the language you wish to perform the installation and click on the Continue button to proceed further
Next, leave both options from Preparing to Install Ubuntu unchecked and hit on the Continue button again
On the "Installation Type" screen, prefer to choose the Install Ubuntu alongside Windows Boot Manager option if you want to automate the process and do not wish to have a personalized partition scheme. In case you want a custom partition layout, check the Something Else option and hit on the "Continue" button to proceed further.

P.S.: The option "Erase disk and install Ubuntu" should be avoided on dual-boot because is potentially dangerous and will wipe out your disk completely.

Now, if you go with "Something Else" option, its time to create the partitions manually. I would recommend that you create three partitions, one for root,  one for the Home and one "Swap" partition.
To create the first root partition, select the free space (the shrinking space from Windows created earlier) and hit on the "+" icon below. On partition settings use the following configurations and hit OK to apply changes:

  Size = at least 20000 MB

  Type for the new partition = Primary

  Location for the new partition = Beginning

  Use as = EXT4 journaling file system

  Mount point = /

Similarly, create the "Home" partition and the "Swap" partition. For "Home" use the following configuration:

  Size = all remaining free space

  Type for the new partition = Primary

  Location for the new partition = Beginning

  Use as = EXT4 journaling file system

  Mount point = /home

When you are finished creating all partitions as per your requirements, hit the Install Now button in order to apply the changes to disk and start with the installation process. A pop-up window might appear to inform you about the "Swap" space, but you can ignore the alert by pressing on the "Continue" button
Next a new pop-up window will ask you if you agree with committing changes to disk. Hit the Continue button to write changes to disk and the installation process will now start

Once you are done installing Ubuntu OS, proceed with the next section.

Section - III: Setting Up the GRUB Menu

Boot into your Windows OS
Combine the keys Windows + r together and type cmd to open command prompt.
Type the command: bcdedit /set "{bootmgr}" path \EFI\ubuntu\grubx64.efi and hit the Enter key

P.S. - You do not need to have admin rights on command prompt before you perform the above action.

If you wish to switch between the OS, just reboot the computer and select your preferred OS from the Grub menu.

Section - IV: Unable to Load into Windows & Booting directly into Ubuntu

In case you boot directly into Ubuntu OS and do not get the GRUB menu, perform the following steps:

Create a file: /boot/grub/custom.cfg by running the command: sudo -H gedit /boot/grub/custom.cfg with these contents:

  menuentry "Windows (UEFI)" {

  search --set=root --file /EFI/Microsoft/Boot/bootmgfw.efi

  chainloader /EFI/Microsoft/Boot/bootmgfw.efi

  }

Note: Copy and paste the above code into the Gedit window. Save the file and quit Gedit.

Reboot your system and you should be able to see an entry titled Windows (UEFI)
Select it and the Windows OS should boot.

If this doesn't work, please run the boot info script (http://bootinfoscript.sourceforge.net/ ) and post the RESULTS.txt that it produces so that we can help you accordingly.

P.S. You can also try and use the GRUB tool.


Why my 'at' clause command execute the shell immediately and ignored the time limit?

at reads commands from standard input, or from a file if you specify the -f flag.
What sh t.sh | at [time] does is:

1. execute the shell script t.sh *right now*;
2. pipe the output of the shell script to at.

But the script has no output, so there is nothing to execute on Sunday.

What you want is at 03:13Jun15 -f t.sh.


First you should make sure Compiz is running. In a terminal type:

ps -A | grep compiz

If there is no output, you have a bigger problem and you need to properly configure your graphics card.  Try running jockey in dash and installing proprietary drivers if you need them. If you are using a laptop with Nvidia Optimus card, look into the bumblebee project: http://bumblebee-project.org/

Further graphics card troubleshooting is beyond the scope of this answer.

If Compiz is running and you still don't get the snap feature:
Install Compiz Configuration Settings Manager (ccsm) either through the software center or by:

sudo apt-get install compizconfig-settings-manager

Open up ccsm (you can just type it in the dash).

Go to the Window Management Section and make sure that Grid is checked:

If you open Grid, you can choose the Edges Tab and alter the settings there:


Add NTFS Data Partition to Startup Disk Creator USB Install

Creating a NTFS Data Partition on a Startup Disk Creator, balenaEtcher or Similar ISO9660 USB

Since 19.10 the process of cloning an OS to USB as done by Startup Disk Creator, creates a casper-rw partition.

This partition can be used for persistence by pressing shift at boot and esc, then F6 and esc again. then typing a space and the word "persistent".

This must be done every boot where persistence in wanted.

It is possible to modify the ISO file used by SDC to include the word persistence into grub, but it is not easy.

If the Ubuntu install is mainly needed for installing Ubuntu, the casper-rw partition can easily be converted to a NTFS partition, that can be used for Data storage by both Linux and Windows.

Procedure

Run Startup Disk Creator or Etcher to create Live 19.10, (or later), USB
Boot new Live USB to activate casper-rw partition, then Power Off.
Reboot the Live USB toram. (press shift when booting, hit F6 and type a space and toram).
Unmount casper-rw partition using Disks.
Open Terminal and run:

sudo mkfs.ntfs -f -L data /dev/sdx3

were x is the drive number of the new Live USB

The drive should now have the original data space minus the size of the OS ISO.


Right click the panel. Select Edit Panel. Move your mouse over the application you wish to remove and a menu will appear. Click remove.
All done.


Sound problems Ubuntu 16.04 on dell 5470

I have no concrete solution but you should look into disabling the power management features of

the audio chipset,
the CPU, and if that doesn't help
anything else on-by-one until you find the component/driver that's responsible.

Once you isolated the responsible component you can investigate and decide what to about it. Every attempt to mitigate the issue may increase the power consumption of your system. You're welcome to open a new question with a more concrete request or even intermediate results.

Buzzing noises often stem from frequent power level switches somewhere in the system. Power management usually works by switching devices into a lower power state when they're not needed and back to a higher power state when they're needed again. Switching power off and on (or down and up) quickly is also how digital audio adapter devices work. If some of that power switching isn't shielded well enough from the audio hardware and it happens between 16 and ~20,000 times per second this may result in audible buzzing or beeping noises.


A good way is to check the processes with the largest RSS

ps aux --sort -rss | head

..or use tools such as slabtop to see where memory is being used on the Linux slab allocator:

sudo slabtop


You've removed lightdm package, which is the graphical login manager. What you got right now is TTY, virtual console. Login there and run

sudo apt-get install lightdm

once that command is done, run

sudo service lightdm start

You will have your graphical login back.

Also, I see you've removed unity. This is the default graphical shell in Ubuntu. If you wanted to get rid of GNOME, removing gnome-shell would be sufficient. To install unity back, run

sudo apt-get install ubuntu-desktop


How to delete all OSes on a computer except for one

Use gparted from the live CD.

The community wiki help contains some good explanations with examples about how to do it https://help.ubuntu.com/community/HowtoPartition/

Last but not least, keep in mind that modifying partitions is a delicate task, so backing up your data before is always a good idea.


nVidia driver is only used when you use optirun, so a easy way to check if you are using nVidia driver is using glxinfo:

$ optirun glxinfo | grep -i nvidia
OpenGL vendor string: NVIDIA Corporation
OpenGL version string: 3.3.0 NVIDIA 310.14
OpenGL shading language version string: 3.30 NVIDIA via Cg compiler

$ glxinfo | grep -i nvidia
# No output at all

If you get any output then you are using the nVidia driver.


Option of starting X-terminal or GUI at start up

You can start a terminal session by pressing Ctrl + Alt+ F1. Read more about it here.


Restore Ambiance Gtk theme for Unity Desktop

Hit <super> (aka the "windows key") and start typing "appearance" (or what ever it is called in your locale). You should find the old Appearance app for tweaking your theme.

Or you can right click on your desktop and select "Change Desktop Background" and select the theme tab to switch themes.