Need to set up Tomcat and JSF on an ubuntu machine

These should be able to help you out.
http://tomcat.apache.org/tomcat-6.0-doc/index.html - Official Documentation
https://www.owasp.org/index.php/Securing_tomcat - This is for Tomcat5.5 but still helps you get an idea.


Jump to beginning of output of last command

Erm, you can do that with the standard gnome-terminal:

The only thing I did was to press Ctrl+Shift+F to start the search and the standard is Backwards already...

Just ensure that you have enough scrolling lines available to scroll back to by changing the scrollback limit:
Edit → Profile Preferences → Scrolling
8192 just takes a few KB of RAM so enter whatever number that suits you there!

Also: for short hops up and down, don't forget about Shift+PgUp and Shift+PgDn even while you're compiling. (No, it will not pause compiling: just add lines out of your view...)


Make sure you can ssh to the remote host with the correct user name without using ansible cmd

ssh uname@host

once you've done it, edit your /etc/ansible/hosts file
for example this is how I connect to my vagrant box with ssh

# Ex 1: Ungrouped hosts, specify before any group headers.
[all:vars]
ansible_ssh_user=vagrant

#green.example.com
#blue.example.com
#192.168.100.1
#192.168.100.10
[slave]
{{some_ip_here}}
...

Now just run the command you want or quickly test with:

ansible slave -m ping


Why not just use OpenVPN? It's very easy both on Windows and Linux.


Do I need to reinstall my 12.04 desktop to get 12.04.1, which was released today?

No, if you have been updating your 12.04 then you will already be sitting at 12.04.1.

The 12.04.1 install CD is mainly for people downloading Ubuntu and to save them installing all of the updates up 'til now.


This worked on 12.04. I reckon it would on subsequent releases. First find out your interface name, to make sure there isn't eth1 already in use somewhere. To do so type this into a terminal:

ifconfig -a

You will definitely have one loopback interface called 'lo' with the IPaddress 127.0.0.1. This is not the interface you are looking for. Look at the other one that has a name like eth1 to see if it exists. If it does, then.. well Don't do anything more. If there isn't a eth1, then you're free to change the eth3 to eth1.

As root edit the file /etc/network/interfaces, look for a line that looks something like this:

auto lo
iface lo inet loopback

auto eth3
iface eth3 inet dhcp

Rename the eth3 to eth1. And restart networking.


After inserting a new OS entry, GRUB2 asks for password

Short answer: grub might be broken. You can follow the instructions here to repair it or reinstall it.

In a nutshell:

you boot from a live (in this case ubuntu) cd/usb
mount the partition where grub is installed
bind the directories that grub needs access to to detect other operating systems
install, check, and update grub

Somewhat longer answer:

I have being trying to install 8 different operating systems (win7 + 7 different GNU/Linux distros) in an old lap top and I have run into all kinds of problems with the install process and the way grub behaves. Yesterday It started asking for username/password in all but one grub entry (it was working fine before that). After following the instructions in the link, everything was back to normal.

Try installing Android and just running update-grub to let grub find the new kernel and update the menu.


I found the answer. The softlink libtiff.so is only provided by the libtiff development package (which also inludes the .h files, etc. There is a presumption that if you are compiling code and include -ltiff in the recipe you must be compiling an application using libtiff, which is indeed true, but that does not mean you have any interest in the tiff interface.
In fact, I was compiling xsane, which is a frontend to the sane system (trying to identify a suspected bug), and tiff is just one of its many backends, and I couldn't even get past 'configure' without first downloading the libtiff development stuff. That is ridiculous; life would be much simpler if that softlink were included as a matter of course in the main package of any library of application.


Is it possible to underclock or set a frequency to Intel HD 4000 (IGP)

Sorry for not having seen this before but I wrote an article on how to play with GPU frequencies on that laptop Playing with the GPU frequencies on a Samsung NP530-U3C

short extract:

sudo su
echo 350 > /sys/kernel/debug/dri/0/i915_max_freq

will reduce the max GPU speed to 350Mhz, the lowest speed


I know this is an older thread, but I just got my Wifi and touchpad to work on my alienware 13...
Had to blaklist the i2c_hid module (for the touch pad), update the ath10 module and kernel to 3.19 for the Wifi.

Hope this helps.


Find and manage multiple copies of the same file/directory

sudo apt-get install fdupes
fdupes -r /directory > ~/dupes.txt

This will look for duplicate files (by calculating and comparing their md5 hash values) recursively in /directory and write them to a file named dupes.txt in the user's home directory.


While I can't remember the exact release, OpenLDAP switched from file-based configuration to LDAP-based config sometime around the '08 releases.

If possible, I would do a test-migration and see (in a controlled environment) if your new server works as expected.


gstreamer error : MP4 files and thumbnails doesn't work

Try to install gstreamer1.0-libav:

sudo apt-get install gstreamer1.0-libav

Check if libthumbnailer0 is properly installed as well:

sudo apt-get install libthumbnailer0

Then, remove the thumbnails cache :

sudo rm -r ~/.cache/thumbnails

And finally restart Nautilus :

nautilus -q


Icons and top panel (anything except blank screen with background) don't show in fresh install of Ubuntu desktop in Vmware

I am not that experienced in VMWare but if possible can you check whether Ctrl+Alt+T brings up the terminal or not.... I can't say this will help.. But if this works then there is some other problem, maybe in your installation.

Don't worry about it. I hope this is a minor problem....

Please check this. I hope some experienced user in VMWare will reply to your problem...


There is a way to change Google Chrome icon on status bar?

I guess you can find the original ico and change it to a monochrome.

sudo find / -name "*google*.ico"

Now you should know where is the icon and you can just change the file.


You can install tk8.5 and then update wish alternative:

$ sudo apt-get install tk8.5
$ sudo update-alternatives --config wish

Be sure to select /usr/bin/wish8.5.

That should do it.

Good luck


If you are running a server, I assume you are running without a graphical interface or desktop. If so, you are not running Network Manager. First, let's determine if you have a working ethernet interface. Please run:

ifconfig

Do you see an ethernet interface eth0? If so, hook up an ethernet cable and do:

sudo dhclient eth0

Did you connect; that is, get an IP address from the router or other access point? If so, now we can install some updates and needed software:

sudo apt-get update && sudo apt-get -y upgrade
sudo apt-get install vim

Now, let's amend a file for a proper static IP address useful for a server:

sudo vim /etc/network/interfaces

Right now, it probably looks like:

auto lo
iface lo inet loopback

Press Insert to add text and let's set up a static IP address for your ethernet interface:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.1.155
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 8.8.8.8 192.168.1.1

Press Esc to exit the Insert mode. Proofread carefully. Press :wq. Of course, the details need to fit your system and the address should be outside the range used by the DHCP server in the router. Now let's get the system to read the new changes:

sudo ifdown eth0 && sudo ifup eth0

Check if the new address is working:

ifconfig

It ought to now show the new IP address; in my example, 192.168.1.155. Now see if you can reach the internet:

 ping -c3 www.google.com

Once all this is in order, I suggest you start a new question specifically about wireless.


Problems (re)installing Ubuntu One 3.0.2 on Windows XP?

Known bug with 3.0.2 windows installer.
https://launchpad.net/bugs/1017019

Workaround for the problem from the same article:

  Delete mswsock.dll and powrprof.dll from UbuntuOne
  installation directory/dist subdirectory (e.g. C:\Program
  Files\ubuntuone\dist). After this the native libraries will be used
  and the application will be able to start.

The reason is:

  dist/mswsock.dll and dist/powrprof.dll [...] were taken from
  a Windows7 system


WinUSB error mounting Windows 10 on external hard drive

Windows does not boot from external drives. I think it is a way to keep people from using the same Windows license in more than one computer.

But you can install Ubuntu in an external drive or make a persistent live USB boot drive, and in Ubuntu install VirtualBox and in VirtualBox create install Windows 10. That way Windows will be in the same [virtual] machine all the time, even if the virtual machine is run on different hardware.

-o-

However, I think you are asking about another problem, and I think you are using the tool winusb to create a Windows install drive (in a USB stick). It seems there are problems with winusb and new versions of Ubuntu, so I added this feature to mkusb-nox. See these links,

mkusb

mkusb version 7.5 - mkusb-nox

Making a USB drive to install Windows

If you are willing to test a new version with a better user interface, but which is not yet tested much, and still in the unstable mkusb PPA, you can try according to the following link,

dus - a revamped interface of mkusb and mkusb-nox


Hard Drives Disapeered After Installing Ubuntu

You can't access disk partitions unless they are mounted. So, you first need to mount them. Check out this post: I cant mount my newly created partition in gparted

To have your system automatically mount them at boot-time, you need to make configuration changes to the /etc/fstab file. Follow this link to get more information on how to do that. Same can be achieved in Disks app in Ubuntu


Lenovo Ideapad s10-3 doesn't resume from suspend

try uswsusp.

sudo apt-get install uswsusp

After installation, my IdeaPadS10-3 shows ...

$ sudo s2ram -n
Machine is unknown.
This machine can be identified by:
    sys_vendor   = "LENOVO                          "
    sys_product  = "S10-3           "
    sys_version  = "Lenovo                  "
    bios_version = "2ACN37WW  "

"Machine is unknown." But it worked by using `-f'(--force) option

sudo s2ram -f


How do I open ubuntu 12.04 from safe mode?

for booting  in ubuntu without gui hold shift until the grub menu shows

and then edit the os option by pressing e

from

linux   /boot/vmlinuz-3.0.0-13-generic root=UUID=d07e0c99-65ba-4eda-98d8-79693dc79554 ro   quiet splash vt.handoff=7

to

linux   /boot/vmlinuz-3.0.0-13-generic root=UUID=d07e0c99-65ba-4eda-98d8-79693dc79554 ro   quiet splash vt.handoff=7 3

where 3 stands for the runlevel 3 and there are runlevels from 0 to 6 , and the os boots in the terminal


In my opinion, there's no possible way the image of Ubuntu you downloaded from the internet could have been modified by a compromised Windows installation in such a way that by booting it your actions on the running system could be tracked (unless you downloaded a fishy Ubuntu image in first place); how specific the malicious software running on the Windows installation should have been to do such a thing?
In any case, you can check whether your Ubuntu DVD is exactly how it's meant to be by running md5sum /dev/sr0 and by comparing the output value with the MD5 sum of the original image found here (sr0 might vary based on your configuration if you have more than one drive; you may check the full list of DVD drives by running lsblk);
You can check whether someone is "hacking" your wireless network by looking at the list of the connected hosts in the router's settings, as most routers provide such a list; if the only IP addresses showing up are from known hosts, such as your PC, then no one is "hacking" your wireless network;
Tl;dr
Your connection is probably slow for other reasons; I'd rule out an hardware problem  because in that case the slowness would probably be persistent rather than intermittent like you're describing:

when using the internet, make sure that you're close enough to the router; avoid using the wifi in places which require the signal to go through bearing walls; in my experience, even adverse atmospheric conditions may play a role, e.g. if the signal has to go through the rain;

other than that, it's probably your ISP's fault, which might be arbitrarily reducing the speed of the connection during certain time slots, or simply sometimes the traffic at the ISP's central to is too huge that the central can't handle it, resulting in the slow speed.


You seem to be asking two different questions. The first is related to change variables system-wide and the other related to make LaTeX work so here is the answer to the two:

Change environment variables System-wide

As described here you can add a file under /etc/profile.d/ which has the PATH variable in it:

export PATH=$PATH:<your particular latex path>

Call it /etc/profile.d/latex-path.sh and will be sourced by any shell you log in.

If you want to change the PATH variable only for your user, the preferred method is to edit the ~/.profile with the same line

Make LaTeX work with no hassle

LaTeX package can be installed from the universe repositories as described here and no need to change the PATH variable. Make sure you have enabled the universe repository and input:

sudo apt update
sudo apt install texlive

Or if you like the full distribution (this will install a lot more packages so grab a cup of coffee):

sudo apt install texlive-full


How can I find exact delay in badly synced audio and video streams in a media container?

Do you know what a clapper is? It's an old device used in movie making and looks like this:

This is used by the editor to sync the video and audio together. You need this because there is nothing about audio and video streams that really allow a computer to work out how out of sync they are.

Your best course of action is to work out why your recording is going out of sync. It sounds like your computer might be underpowered (conjecture as I don't know how powerful your computer is). If you can't solve the syncing problem, then use a clapper (or make one) and then trial and error your way into syncing it back up.

Of course this only helps with fixed sync issues, if you have progressive sync issues then you can use the time signature to resync the streams and this is something the computer can help you with. Is suspect that's what ffmpeg is trying to do.


Ctrl + Alt + T

gksudo nemo

Enter password
Done!

If you are too lazy leave terminal open and just use Up/Down buttons to select command and Enter to shoot it!


Compiled executable cannot run, "command not found"

You need to make it executable before being able to run it like that:

chmod +x OpenCV_ViolaJoanes

will make your compiled program executable and you will be then able to run it.


How do I play a video with audio from a separate file? (mux during playback)

My knowledge is based on the ffmpeg and ffplay tools which I understand to be replaced by avconv and avplay on Ubuntu which are supposed to be functionally equivalent (let's not debate on how far that functional equivalence goes).

I don't think the play tools accept multiple inputs. You can stream via a pipe from ffmpeg (er, avconv) into ffplay (avplay). Try this:

$ avconv -i the_video.avi -i sound/sticks.wav -map 0:0 -map 1:0 - | avplay -

The above is a guess based on your question but it's based on my own real example which I've pasted below just as a reference (yes I am using the ffmpeg and ffplay tools) :

ffmpeg -f alsa -i hw:0,2 -f v4l2 -i /dev/video0 -f avi pipe:1 | ffplay -


How to check if dpkg-architecture --list has all the architectures?

I answer my own question because I just found out via

dpkg --print-foreign-architectures

which printed

i386

that obviously multiarch is/was enabled.


Why are there so many 32-bit dependencies for Skype?

Skype is a 32-bit application and 32-bit applications need 32-bit libraries.

If an application needs many libraries and it is a 32-bit one it obviously needs many 32-bit libraries.


Is there any way to manually add a "package" (eg. Python) to a group?

You can make new user, make it ownership of script, and disable all others access to script(0700 permissions)
To run script use sudo command as follows, so you have to type password everytime and that makes a bit of security.

sudo -u newuser python /path/to/.hidden

Update: To hide newuser from login page make it uid below 1000, and set shell to /bin/false so not allowing login anyway, but still possible to sudo as this user


Ubuntu snap packaging with Qt: fonts missing

I had to work with user configuration folder that snap creates.

Create wrapper and use as main app. Wrapper will call actual application.
Before starting application, wrapper will copy file from $SNAP/etc/fonts/fonts.conf to $SNAP_USER_DATA/.config/fontconfig/fonts.conf.
Also application will modify newly copied file using "sed -i" command, where directories were changed to $SNAP location. Example: <dir>/usr/fonts... will become <dir>/snap/your_app/version/...

It doesn't seem like a clean solution, however it's acceptable solution for me by now.

name: sample_name
base: core18
version: '1.0.0'
summary: Sample Summary
description: |
  Sample Desc

grade: devel
confinement: devmode

parts:
  sample_name:
    plugin: dump
    source: sample_name.tar.gz
    stage-packages: [
      ffmpeg,
      x264,
      x265,
      libopencv-core-dev,
      libopencv-imgproc-dev,
      libopencv-calib3d-dev,
      libblas-dev,
      liblapack-dev,
      ttf-ubuntu-font-family
    ]
  fix-fontconfig:
    plugin: nil
    override-build: |
      mkdir $SNAPCRAFT_PART_INSTALL/bin
      echo "mkdir \$SNAP_USER_DATA/.config" >> $SNAPCRAFT_PART_INSTALL/bin/sample-wrapper.sh
      echo "mkdir \$SNAP_USER_DATA/.config/fontconfig" >> $SNAPCRAFT_PART_INSTALL/bin/sample-wrapper.sh
      echo "cp \$SNAP/etc/fonts/fonts.conf \$SNAP_USER_DATA/.config/fontconfig/fonts.conf" >> $SNAPCRAFT_PART_INSTALL/bin/sample-wrapper.sh
      echo "sed -i \"s#<dir>/usr#<dir>\$SNAP/usr#g\" \$SNAP_USER_DATA/.config/fontconfig/fonts.conf" >> $SNAPCRAFT_PART_INSTALL/bin/sample-wrapper.sh
      echo "\$SNAP/sample_name" >> $SNAPCRAFT_PART_INSTALL/bin/sample-wrapper.sh
    after: [sample_name]

apps:
    sample_name:
        command: sh $SNAP/bin/sample-wrapper.sh
        environment:
          LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/usr/lib/x86_64-linux-gnu/blas:$SNAP/usr/lib/x86_64-linux-gnu/lapack


JDBC Connection Pool details on Glassfish

You could use this here as well if you want a full blown set of information:

asadmin get domain.resources.jdbc-connection-pool.*


Cannot Ping from server when logged in from another machine

This is a name resolution error, not a ping error, per se.  Check that your DNS is configured properly (/etc/resolv.conf)


Unable to sign in to Google account in Android Studio

Make sure that you don't open android studio as a root user.
Also if you are cloning a git project do not clone via root user.


Ubuntu 20.04 does not start at all on HP Spectre x360 (with NVIDIA GTX 1050Ti)

Use nouveau drivers for your nvidia VGA card,
is black screen in startup, push CTRL+ALT+(F1 or F2 or F3 or ...) to start terminal.
use:
sudo apt-get remove --purge '^nvidia-.*'
to remove nvidia drivers,
reboot
To restart.
Use till next kernel update the nouveau screen driver, it is what it is, did have this problem many times with this laptop. (nice notebook HP with HP issues)


GNOME3 extension collapse,how to solve it, or make GNOME3 to default?

Since that extension is not active on E.G.O. any longer, I would first assume you manually installed it, and perhaps the installation was corrupted somehow.

I first suggest to remove it by running the following

sudo rm -R .local/share/gnome-shell/extensions/autohidetopbar2@werewolves.us

If this doesn't work it was probably somehow installed system wide, so try

sudo rm -R /usr/share/gnome-shell/extensions/autohidetopbar2\@werewolves.us/

and then possibly try to reinstall it, you may need to first restart the shell though, so either logout and login, restart your system, or do Alt+F2, r and Enter

To reinstall it, basically you should just right click it and extract it, then the easy way is to keep this folder open and do the following.

Now run Alt+F2 and paste

~/.local/share/gnome-shell/extensions using Ctrl+v or by right click, paste.

Then either right click and copy the extension directory "extension_folder@domain", this directory is the one that contains the extension.js and metadata.json, now paste it into the other folder ~/.local/share/gnome-shell/extensions or just drag it there.

Next you have to restart the shell by running Alt+F2, r and Enter and it should be available. Once I know the details of the extension I can provide alternate instructions, but this is the easiest way.


The common work-around is to put your .deb files into /var/cache/apt/archives/. Then any apt-get install will look for the files in that cache first, and then try to download them if they are not there.

Alternatively, you can dpkg -i *.deb to install all packages in the current directory.


How to use postfix's pipe to auto-reply for non-existing accounts

There is a lot of solutions out there that will enable you to capture mail in various languages.

I am most familiar with doing this in cpanel, but you seem to be familiar with setting it up manually so the only piece you are missing is the code?

If so take a look at this article http://blog.thecodingmachine.com/content/triggering-php-script-when-your-postfix-server-receives-mail

There are more in depth libraries that will separate the body and recipient/sender emails so you can have all these parts in a clean fashion.(Which on also given in the example)

After you get the senders email of a non-existent email you can use PHP's mail function to let them know no mail can go to the recipient because they don't exist.

If you want to validate an email address exists here is a working example, but it uses SMTP.. and PHP not sure if this is what your going for.

http://code.google.com/p/php-smtp-email-validation/

Overall I think with these examples you can get a working code sample with some tweaking and testing.

Hope this helps.  Let me know if you need more help.

EDIT

To do this in cpanel go to "Default Address" then go to "Advanced Options" then go to "Pipe to Program" then you want to put in the path to the PHP or language script/program you want to use.


Is it possible to automount a partition on a dummy location?

Disclaimer I do not know if it works and maybe not for this 3-years old bug which seems not to be fixed for Trusty. If you run 14.10 maybe you're lucky...

I should be possible to tell directly to the disk manager to hide the disk; I can't test because I have not spare partition on this PC.

Open "Disk utility" via the dash, and select the "mount option" for your partition:

After that, you should be able to tell the system not to mount it at boot and not make it available in the graphical interface:

...good luck!


Error: The specified folder does not contain a Java platform

You need to install Java on your machine and have the path to the installation in the $PATH variable. I suggest using apt to install openjdk/openjre. It will automatically do everything for you. You might want to find out whether you need to install a specific version of Java, due to your specific hardware/software requirements.


Realtek Bluetooth on HP Laptop, Xubuntu 19.10 no longer working

The fix is to remove the 3rd party btrtl module by

sudo dkms remove btrtl-rtl8723de/0.2 --all

All other dkms modules can be removed to clean all up.

The Realtek rtl8723de is fully supported by 5.3+ kernels and they are not needed any more.


In most cases the running operating system will see and read an SD card. But it is 'more difficult' for the computer's early stages during boot, the UEFI/BIOS system, to see the SD card and be able to boot from it.

Most computers can boot from an SD card, which is connected via a USB adapter. But some computers and adapters are not compatible for booting.
Some computers (far from all) can boot from an SD card, which is connected via a built-in slot (typical in laptops).

If you fail to boot from your SD card, you can try with an[other] USB adapter, but you have better chances to succeed, if you get a fast USB 3 pendrive with at least 16 GB according to this link,

help.ubuntu.com/community/Installation/FromUSBStick#Notes_about_speed

When installing, it is easiest to

Create a live USB drive by cloning from the Ubuntu iso file to a USB pendrive, which can be small and cheap, for example a USB 2 drive with 4 GB.

Disconnect the internal drive.

It is often but not always possible to do via a UEFI/BIOS menu.
You can try to unplug it physically
If none of these methods work, you can borrow another computer for this task, a computer, where you can disconnect the internal drive.

It may also work if you

check the flags on EFI system partition of the internal drive (in linux with the tool gparted, in Windows there are also tools for it).
Make a note on a paper
Remove the flags on EFI system partition of the internal drive
... and after the installation is finished, restore the flags according to the note on paper
But I have never used this method, and cannot guarantee that it will not damage the internal drive. Therefore you had better make a fresh backup of the operating system in that drive (Windows) before following this route.

Boot into the live USB drive and use the installer to install Ubuntu into your SD card or another USB drive (best with a fast USB 3 drive with at least 16 GB).

There are detailed instructions at the following link,

How do I install Ubuntu to a USB key? (without using Startup Disk Creator)


For configuration purposes it's probably easiest to define the parameters in the configuration file in bash syntax and later source it using . /path/to/config.

Example default.cfg:

parameter_a=100
parameter_b=200
parameter_c="Hello world"

Example script.sh:

#!/bin/bash

# source the default configuration
. /path/to/default.cfg

echo $parameter_a
echo $parameter_b
echo "$parameter_c"

...

If you don't like that approach you can also read the lines into an array:

while read line
do
    array+=("$line")
done < some_file

To access the items you would then use ${array[index]}, e.g.:

for ((i=0; i < ${#array[*]}; i++))
do
    echo "${array[i]}"
done

(Where ${#array[*]} is the size of the array.)

Read more about arrays in bash here.


Unmount SSHFS from Nautilus (with umount)

Seems to be known bug of GVFS:

bug 607706 on GNOME bugzilla
bug 254171 on LaunchPad.

Note: my Ubuntu 16.04 has fuse group, I'm member of this group, but Caja has the same problem (it's bug 1763033).


Network manager and indicators missing from the top panel (Ubuntu 16.04 Unity)

I've had the same problem with Ubuntu 16.04; it happens occasionally or when resuming from suspend. A fix that worked for me is to open the terminal and type:

systemctl restart NetworkManager

This fixes it immediately.


How to install Telegram snap on Ubuntu 16.04.2?

Use
 snap find | grep telegram
to search for the Telegram package.

As of the time of writing
 sudo snap install telegram-desktop
will install Telegram.

You may have to reboot in order for it to show up in the application list, however.


Server 16.04 - Default Grub Boot Option Fails

The easiest way for someone not familiar with editing the /etc/default/grub file manually you can use a program called Grub Customizer

Under the General settings tab you will see default entry. Just select the entry you want it to default too. You can also set it to show/hide the menu and change the delay time. I still like to keep the menu and have a small wait time of like 3 seconds just in case I need to get to it easily during a boot.

If you want to set it by hand and edit the /etc/default/grub file you would need to change the GRUB_DEFAULT=0 to GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux 4.4.0-21-generic" or whatever  the correct line would be for the kernel you want .. notice the advance options line .. that is because the kernels are in a submenu.

once you have made and saved your changes you need to run sudo update-grub from a terminal for it to update the changes or it will just be overwritten next boot


As suggested by  Joaquín Ayuso de Paúl, the problem was in the Unite extension and was resolved by using the newest version of the extension.


This works whenever I need to do this ...

Stop the MySQL Server:

sudo /etc/init.d/mysql stop

Start the mysqld configuration.

sudo mysqld --skip-grant-tables &

Login to MySQL as root.

mysql -u root mysql

Replace YOURNEWPASSWORD with your new password!

UPDATE user SET Password=PASSWORD('YOURNEWPASSWORD') WHERE User='root'; FLUSH PRIVILEGES; exit;


Tell the kernel to strongly cache a particular directory

I think that is a question that has no positive answer. Linux does not provide any mechanism to specify how much metadata and data to cache on a per directory basis for file systems like ext2,ext3,ext4,xfs etc.


If you use a script to print all the PDF files in a directory you can do this:

#!/bin/bash
for f in *.pdf
do
echo "$f" | lpr
lp -o job-sheets=none "$f"
done

It isn't pretty, but it will begin each pdf file with a page containing the filename. This doesn't require you to troubleshoot what's going wrong with groff but as I said, it's ugly. You could experiment with adding newlines and spaces to push the filename into the center of the first page, and if your printer supports it, even use ESC/P codes to bold the print.

I still think the groff solution mentioned by Graham in the comments is superior but this is an alternate solution, free of typos.

Note: Requires a printer set to default. I used the System-wide default for testing.


Can't figure out how to use spanish accents

I figured it out.  It was a stupid mistake, but also very easy to overlook.

I kept going to Fcitx Configuration in the preferences.  When I would do that, it would look like my screen shot (all boxes empty, unable to change the input method because of this).

By luck today I clicked Fcitx in system tools.  Then I went to configuration through the keyboard icon in the bottom right, instead of through preferences.  It opened up the same configuration menu as going through the preferences, except with one difference, all the input methods are listed now.  Finally I was able to select one with Dead keys, restarted computer, and now it finally works like the way every other post says it should.

I don´t understand why going through preferences to Fcitx configuration shows no options to select, but going through the keyboard icon does, but anyway, that was the problem.

Thanks to all who took the time to comment about this.


Cannot open pdf files in mounted usb drive using Okular

Snap problem

Okular does not support removable media while installed as Snap. You should remove it

snap remove okular

In other words it does not support snap connect okular:removable-media plug.

Okular from APT (deb-package)

Installation

Then install deb-packaged version instead with

sudo apt-get install okular

Set-up look and feel

To get normal look and feel you need to install Breeze KDE theme with

sudo apt-get install breeze qt5ct

and select it from qt5ct with

QT_QPA_PLATFORMTHEME=qt5ct qt5ct

then switch to Icon Theme tab and select Breeze here and hit Save:

To make changes permanent add this line to your ~/.profile with

echo "export QT_QPA_PLATFORMTHEME=qt5ct" >> ~/.profile

then reboot and use Okular with files from anywhere:

Note: I tested the method above on Ubuntu 18.04 LTS with GNOME Shell and MATE.


Give 'rwx' permission to the directory but don't want user to give mkdir and touch permission

Sticky bit is a permission bit that is set on a file or a directory that lets only the user/owner of the file/directory or the root user delete or rename the file, even when write permissions are given through group ownership.
Sticky bit can be set with:
chmod +t /directoryname

After this, users with write permission should not be able to delete files inside that folder unless they created the file/folder themselves. You can also make all files in that folder inherit group ownership, by using:
chmod g+s /directoryname

I just did a little test to make sure. I created a folder named testfolder, with ownership root:user1. I set 775 permissions (rwxrwxrw) and then ran:
sudo chmod +t testfolder

to give it sticky bit, and:
sudo chmod g+s testfolder

to make new files inherit group ownership.
After that, I logged in with user2, which is group member of user1. I went inside the folder and tried to delete the testfile that had rwx permissions for group user1. Since user2 is a member of that group, they should have permissions to delete it, but they didn't. Permission denied.
After that, I decided to remove the sticky bit, using:
sudo chmod -t testfolder

and then tried to delete the file again. It worked.
Not sure if this is what you are looking for since you don't want users to use touch or mkdir. This would only disallow them deleting stuff while keeping write.


gnome-terminal (also LibreOffice) doesn't launch any more

I had this same symptom (though I doubt it was the same problem). In my case, it was due to an application I had built for my $HOME folder and for which certain libraries had been created under $HOME/.local/lib and perhaps $HOME/.local/libexec as well. Then I upgraded the OS (for me, it was going from 19.10 to 20.04) and I could no longer launch gnome-terminal.
My problem may not have been the same as yours, but if you can do an apt depends gnome-terminal that might give you a good starting point to look (in my case, I think it was the gir1xxx dependency). Gnome-terminal has a Python3 wrapper so it may involve something recent on your system involving Python3.


One Drive business (former Skydrive Business) also used as Sync tool for SharePoint has no native client for Linux. It is based on the Groove tool MS had back in the days.

For now you can only use the web browser to upload/download files.

Your best bet is that for OneDrive a Linux client/tool/daemon (like http://xybu.me/projects/onedrive-d/) will be built and that OneDrive Business support to use the same.


How do I install sasl2-bin dependencies?

First do,

sudo apt-get install db4.8-util

and then

sudo apt-get install sasl2-bin


How to dynamically resize GTK notebook pages

I do not know a nice answer, but I have a work-around for you:

The basic idea is that you need a container widget as the parent widget in each page (do not place e.g. a label directly in the page), and you can hide/show everything except the container (If you hide the container as well, the page will disappear).

This solution should work for otherwise arbitrary widget hierarchies.

from gi.repository import Gtk

class NotebookWindow():
    def __init__(self):
        self.builder = Gtk.Builder()
        self.builder.add_from_file('notebook.ui')
        self.builder.get_object('window1').connect('delete-event',
            Gtk.main_quit)
        notebook = self.builder.get_object('notebook1')
        notebook.connect("switch-page", self.on_notebook1_switch_page)
        self.on_notebook1_switch_page(notebook, None,
                                      notebook.get_current_page())

    def on_notebook1_switch_page(self, widget, label, page):
        for p in range(widget.get_n_pages()):
            container = widget.get_nth_page(p)
            if not p == page:
                for c in container.get_children():
                    try:
                        c.hide_all()
                    except AttributeError:
                        c.hide()
            else:
                for c in container.get_children():
                    try:
                        c.show_all()
                    except AttributeError:
                        c.show()

if __name__ == '__main__':
    notebookwindow = NotebookWindow()
    Gtk.main()

In my original answer I recorded and re-instated the requested sizes. This does not work in general, because the requested size is only a minimal size. I would have to record a maximum size, in order for this to work, though.


Update ubuntu phone from Nexus 4 directly

Update:  This functionality is working now, as long as you use the ubuntu-system option when flashing your phone.

Original answer:

It doesn't do anything yet.  Rick Spencer, VP of Ubuntu Engineering, writes about it as a goal on his blog for end of August.

  The first big rock is Image Based Upgrades. Today, when we "bless" a new image, one must use a tool on your desktop called "phablet-flash" to update to that new image. After August, the phone will download updates over wireless and install them without requiring a connection to the desktop.

You can follow progress on this issue here: https://blueprints.launchpad.net/ubuntu/+spec/foundations-1305-image-based-updates


This error is caused because there is a missing library.

As stated on the bug report linked in the question, there is a problem with the 64 bits package. To resolve it, you must open a console and type:

cd /usr/share/sopcast-player/lib/
ln -s vlc_1_1_x.py vlc_1_0_x.py

The package installs a higher version of the library than the one sopcast calls. With the above command you will make a link, so that sopcast call the 1.1 version when it asks for the 1.0. This is a quite ugly workaround, but it should work (I can test it).


How to enable 'open terminal here' from nautilus when in 'list' (not tiled) mode

You are facing an issue in Files (nautilus) that comes with Ubuntu 18.04. Indeed, if the list view is full, there is no empty space where you can right-click to obtain the folder-specific righ-click menu. That is the menu that contains the "Open terminal here" option.
The issue is solved in more recent versions by making the breadcrumb path items, i.e., the buttons of the folders above the file list, more functional. You now can click (or right-click) the folder name in the breadcrumb to obtain the menu, making that context menu available with the mouse anytime.
Still, you can work around in the Nautilus version that comes with 18.04.
Keyboard shortcut in Nautilus
The shortcut key Ctrl+F10 opens the empty-space context menu anytime. Thus, just press Ctrl+F10 then e to open the terminal here.
Using a Nautilus script
If that is not enough and you also want mouse accessibility to the Open Terminal Here command, then there is still a way to implement the function using nautilus scripts.

Create a script, Terminal, that contains following code

Script code:
#!/bin/sh
gnome-terminal

(yes, it cannot be more simple than that!).

Put the script in the folder .local/share/nautilus/scripts under your home folder. Enable "Show hidden files". Then you will see the hidden .local folder and be able to navigate to scripts.

Make the script executable. (Right-click, Properties tab, Permissions: "Allow executing file as program")

Restart nautilus (killall nautilus). Now, you will have a new "scripts" menu when right-clicking any file, which contains your "Terminal" command

Optional: assign a hotkey to the script
(Update:  unfortunately the following does not anymore work in Ubuntu 20.10).

If it does not exist, create a text file ~/.config/nautilus/scripts-accels

Add a line:

F12 Terminal
Hitting F12 in nautilus now will immediately open a terminal in the current folder.


Try to use another window manager, like emerald.

Type sudo apt-get install emerald to install the emerald window manager.

After installing it type emerald --replace to replace your current window manager.

I hope this helped you,
Daniel


Why does XAMPP require 32 bit libraries after installing MongoDB?

Although I have no use for Mongo, I tried to follow your steps and everything worked with no errors, I'm on Fedora 26. So there's only 3 conclusions.

Either you're on windows because Xampp ships only 32 bits packages to
windows.
You installed Xampp 32 bit by mistake or perhaps your xampp is too old because xampp used to ship 32 bit only to linux as well in the past
You downloaded xampp from some repo and they gave you the 32 bit. Used to happen when I was on ubuntu.

I have xampp 7.1.9 for linux 64 bit from here. And by the way, after following your steps, I have no idea how to start mongo, I have never used pecl before. If I where you I'd install mongo using apt-get, Anyway good luck.


From reading the man page, it seems that there is no such option built into rl, so you will have to use something else to achieve that. For example, you can do it with for:

for i in `seq 10`; do rl -c 1 -d % myfile.txt; sleep 5; done

That will make it "sleep" for 5 seconds between each execution. Note that -c option is now 1. This way, there is the risk that the same line might be selected twice within the 10 repetitions. Another way to do the same thing without that risk is:

rl -c 10 -d % myfile.txt | while read line; do echo $line; sleep 5; done

I hope this is helpful.


Updating Ubuntu server from 8.10 to 10.04

Ok, I managed to get it solved using wojox' tip as a kickstart.

The main issue was the inability to access the repos and thus run a proper upgrade. This is resolved by editing /etc/apt/sources.list and changing every occurance of intrepid into jaunty. You can do this manually or use wojox' oneliner (which requires perl to be installed). Note that we assume that the jaunty repos are still up, which they were at the time of writing.

sudo perl -p -i.intrepid -e 's/intrepid/jaunty/' /etc/apt/sources.list

Note - Ubuntu provides mirrors to old releases: https://help.ubuntu.com/community/EOLUpgrades/Intrepid
Update the package list

sudo apt-get update

Install update-manager-core

sudo apt-get install update-manager-core

Run do-release-upgrade which will handle the update to the next version properly (and make sure being on ssh is not a hindrance). Keep in mind that although we changed the source list earlier, we are still on the version we started out. So in my case, I had to do step 4 three times. Be sure to reboot between each upgrade. Note that in case of doubt on your current Ubuntu version, you can always issue

cat /etc/issue


Medion Surf Stick seemingly not recognized by Lubuntu 14.04

Okay, I think I got it to work, so here is what I did (read completely before trying to reproduce!):

First I configured the network itself. There are enough tutorials how to do this for Aldi Talk under Ubuntu in the net, so I will skip that part.

I installed gammu and configured it as it was suggested from the German site I got the tip from.

sudo apt-get install gammu
gammu-config

Configuration: set Port to /dev/ttyUSB, set Connection to at115200.
I couldn't use rmmod usb_storage because the mod was busy, but I tried the other one:

sudo modprobe usbserial vendor=0x0e8d product=0x0002

where vendor and product are from MediaTek Inc. of the output of lsusb (see my question). That didn't returned any errors. So next thing according to the instruction was

sudo gammu -c ${HOME}/.gammurc --entersecuritycode PIN ****

(PIN hidden.) Console gave me

Error opening device, it doesn't exist.

Checking with ls /dev I found that to be true. I tried the routine again, same results, rebooted, tried again, same results. Changed Port to sdb (which is probably the card reader of the netbook), got a different result:

Error opening device. Unknown, busy or no permissions.

Since I couldn't really find other sites in the Internet with this problem, this was about the time I decided to post it here.

Next day. Meanwhile netbook was shut down and booted up a few times as it happens. An idea came to my mind. I was still missing the device, but lsusb said it is there somehow, I just didn't know the proper /dev name. So without having the stick in the laptop:

ls /dev > before.txt

Putting stick in and waiting for it to blink (which it has done all the time before, too)

ls /dev > after.txt
diff before.txt after.txt

Console gave me three new devices:

cdrom
sg2
sr0

I first tried to change the Port to /dev/sg2, started gammu, error: Unknown etc.
Changed the Port to /dev/sr0, started gammu, error: Unknown etc.
Changed the Port to /dev/cdrom, error: Not existent etc.

HOWEVER directly after that last console return a window plopped up asking me for the PIN (which I actually entered when trying gammu). Then he asked password for the keyring (he usually does) and password for the device (sudo password worked). Checked connections, stick was available. Connected, currently posting through this connection.

I should note that I didn't modprobe this time, usbserial was listed under lsmod (first time since problem that I used that command) and vendor/product ID for MediaTek Inc. returned by lsusb have changed since yesterday.

If it still works after next reboot, I will accept this answer.

Next morning. Just rebooted. ls /dev showed the before-it-worked "files" with cdrom etc. No surf stick showing up in the network connections. Waited a minute. Nothing happened. Then

sudo gammu -c ${HOME}/.gammurc --entersecuritycode PIN ****

Error opening device. Unknown, busy or no permissions. About 10 seconds later the surf stick dialogs show up again. After dealing with that, checked /dev, looked again like yesterday after-it-worked.
So somehow the gammu command lets the netbook think about what is really in /dev, even though itself doesn't work. But then again, it works for me even when I'm completely puzzled why.


They usually end up at the Launchpad bug tracker of the associated software package, development versions. I haven't reported an issue in ages, so I don't recall what the apport program returns. I think the final stage of the bug filing is left up to you (from the Ubuntu wiki), so if you logged into Launchpad, you get subscribed automatically.

That was how it operated once, anyway. Now the whoopsie daemon is used in conjunction with apport to automate this. Check out What is the 'whoopsie' process and how can I remove it? for more information on whoopsie. I think in recent versions, error reporting to Launchpad directly is disabled and only https://errors.ubuntu.com is used, unless it encounters a new bug (from http://ubuntuforums.org/showthread.php?t=2136684).

(If the links don't show up well-formatted, somebody please edit this. The mobile Interface isn't that good.)


Could not find settings panel "unity-appearance"

You may just try
re-install gnome-control-center
without -unity


Repairing 11.10 / downgrading to 10.04 on a dual boot

Since you know you like Ubuntu 10.04 LTS, and that is still supported, it seems like it would make the most sense for you to just install that.

(Downgrading is not supported, so to go to 10.04 LTS, you'll have to do a fresh install. Since you have another OS--Windows, in this case--on the same machine, which I presume you want to keep, you should use GParted on the Ubuntu 10.04 LTS live CD--or any Ubuntu live CD, but you'll be using the 10.04 LTS live CD anyway if you're installing that version--to remove the installed Ubuntu 11.10 system's partitions, while keeping the Windows partition(s). That is, of course, assuming that you installing Ubuntu 11.10 alongside Windows, rather than inside it with Wubi. If you installed inside Windows with Wubi, then you should use Add/Remove Programs to remove it.)

If the Ubuntu 10.04 LTS install CD did not boot at all, that is likely due to a bad .iso image or a bad disc (or a corrupted USB flash drive, if you're trying to boot from one of those rather than a CD or DVD).

To test for a bad .iso image (used to make the disc or flash drive), see https://help.ubuntu.com/community/HowToMD5SUM. To test the disc itself, you want https://help.ubuntu.com/community/BootOptions#Ubuntu_CD_Advanced_Welcome_Page_Options (select "Check disc for defects").

If the .iso image has a bad MD5 sum, you'll have to redownload it, test the newly downloaded image, and if that checks out, burn a new CD/DVD or write the new image to the USB flash drive. If the .iso image checks out but the disc or flash drive does not, then you'll have to burn a new disc or write the image to the flash drive again. If burning a disc, try burning it as slowly as possible, as that reduces the chance of errors. You should also make sure you are burning it to the CD/DVD or writing it to the USB flash drive using a correct procedure (click "Show me how" in Step 2 on the download page).


Ubuntu 13.10 some System Settings reset after reboot (Touch-Pad disable)

I have the same issue, and it's even reset after suspend/hybernate also. It's been reported, I bet it will be fixed in 14.04.

Also, I found that when I'm going to settings I have to click twice on the deactivate button, like it was deactivated and I had to activate/deactivate to make sure it's off.

I've been using a touchpad indicator that I could fast switch on/off and it was keeping the setting found here: Atareao-team.


Old thread I know but I've been looking for a similar option. The following is the best that I can come up with:

Edit -> Search Folders then Click [Add]. The Rule name will appear as the name of the favourite. Set the condition as "To contains @" then [Add] a specific folder to the folder you want as your favourite and tick "Automatically update on any source folder change".

Looks a bit like this

Create a new Search Folders rule for each favourite folder.

To make them appear at the top of Side Bar go to Edit -> Preferences -> Mail Accounts and drag Search Folders to the top of the list.

Hope this helps someone.


How to allow browsing to subdomain with different IP address - AWS

First check resolving on the PC from which you try to connect B. host crm.domain.co.nz. If you got the IP then is all ok.

Check virtual host directive in Apache.

For example, create a new Apache configuration file named sugar.conf:

touch /etc/apache2/sites-available/sugar.conf
ln -s /etc/apache2/sites-available/sugar.conf /etc/apache2/sites-enabled/sugar.conf
vi /etc/apache2/sites-available/sugar.conf

then, add the following lines:

<VirtualHost *:80>
   ServerAdmin admin@your-domain.com
   DocumentRoot /var/www/html/sugar/
   ServerName your-domain.com
   ServerAlias www.your-domain.com
   <Directory /var/www/html/sugar/>
      Options FollowSymLinks
      AllowOverride All
   </Directory>
   ErrorLog /var/log/apache2/your-domain.com-error_log
   CustomLog /var/log/apache2/your-domain.com-access_log common
</VirtualHost>

You must change your-domain.com with you real domain.

Restart the Apache web server for the changes to take effect:

service apache2 restart

The following files and directories inside the /var/www/html/sugar/ directory need to be writable from your web server:

'config.php'
'config_override.php'
'sugarcrm.log'
'cache' and all subdirectories and files
'custom' and all subdirectories and files
'data' and all subdirectories and files
'modules' and all subdirectories and files

This can easily be accomplished by executing the following command:

chown www-data:www-data -R /var/www/html/sugar/

I guess that you have configured DB for sugar.

Because you have "all" configured, maybe only you can check DocumentRoot in /etc/apache2/sites-enabled

grep -R "DocumentRoot" /etc/apache2/sites-enabled

Output will be something like

sites-enabled/000-default.conf   DocumentRoot /var/www/html

If you do not have your sugar DocumentRoot in output you can change that.


Why does Ubuntu either detect the size of hosting OS window or not?

If you're having display troubles in the Virtual Machine, the first step should always be to try installing Guest Additions. See How do I install Guest Additions in a VirtualBox VM?


What are the differences between sudo, su, visudo, chroot, and gksu?

sudo:
Sudo (superuser do) allows a system administrator to give certain users (or groups of users) the ability to run some (or all) commands as root while logging all commands and arguments. Sudo operates on a per-command basis.
It is not a replacement for the shell.
Features include: the ability to restrict what commands a user may run on a per-host basis, copious logging of each command (providing a clear audit trail of who did what), a configurable timeout of the sudo command, and the ability to use the same configuration file (sudoers) on many different machines.
source
visudo
visudo is a command-line utility that allows editing of the /etc/sudoers file in a safe fashion. It opens /etc/sudoers, using the vi editor's interface by default (although this can be changed by setting the shell's EDITOR environment variable to a different text editor), prevents multiple simultaneous edits with locks, performs sanity checks and checks for parse errors.
source
SU
The su command, also referred to as substitute user, super user, or switch user, allows a computer operator to change the current user account associated with the running virtual console.
By default, and without any other command line argument, this will elevate the current user to the superuser of the local system.
When run from the command line, su asks for the target user's password, and if authenticated, grants the operator access to that account and the files and directories that account is permitted to access.
Additionally, one can switch to another user who is not the superuser
source
root
root is the user name or account that by default has access to all commands and files on a Linux or other Unix-like operating system. It is also referred to as the root account, root user and the superuser.
The word root also has several additional, related meanings when used as part of other terms.
One of these is the root directory, which is the top level directory on a system. That is, it is the directory in which all other directories, including their subdirectories, and files reside. The root directory is designated by a forward slash ( / ).
Another is /root (pronounced slash root), which is the root user's home directory.
Also it may refers to the user root which is the adminstrator of the system with full privileges.
source
chroot
A chroot  is an operation that changes the apparent root directory for the current running process and its children. for example if you chroot /mnt/chroot-test then the directory /mnt/chroot-test will be your virtual root that you could refer to by /.
source
Uses of chroots
The following are some possible uses of chroots:

Isolating insecure and unstable applications

Running 32-bit applications on 64-bit systems

Testing new packages before installing them on the production system

Running older versions of applications on more modern versions of Ubuntu

Building new packages, allowing careful control over the dependency packages which are installed

source and more information about chroot


Handling file open (mime type) with Python

Ok, I solved this with the following code:

class MainWindow(QMainWindow):
    def __init__(self, filelist, **kwargs):

        openFileAtStart(filelist)

    def openFileAtStart(self, filelist):
        matching = [s for s in filelist if ".myformat" in s]
        if len(matching) > 0:
            self.openFileByName(matching)

if __name__ == "__main__":
    from sys import argv, exit
    from PyQt5.QtWidgets import QApplication
    a = QApplication(argv)
    MainWindow(argv)

Basically, at opening, QApplication needs to read the argv arguments, and removes anything related to Qt. Than I pass the remaining arguments to my application ("MainWindow"), which will handle the list checking for items that match my format and will throw this list to my function that handles opening files.


That is a bug.  If it doesn't do what it says on the tin, then by definition it's unwanted behavior.  Consider helping the GNOME team by filing a bug.


Ubuntu (wubi version) cannot connect to the internet network

When I started Ubuntu I had the same problem. My solution was ensuring that networking was enabled. To do this: click on the wifi/arrows that signify the internet connect and near the bottom you can check/uncheck "Enable Networking". That may seem somewhat trivial, but that is what happened to me and several others.


Converting Ubuntu 20.04 boot from legacy to UEFI after installation

There are a couple of things you can check in your BIOS settings

In Advanced -> USB Configurations -> Enable both front and rear USB ports.
In the boot option. Turn off secure boot and enable USB boot support.


Possible using the dd utility:

dd if=FileC of=FileB bs=1 skip=$(stat -c %s FileA)

See man dd for details.


Full install of Ubuntu 12.04 on USB pendrive halts at GRUB prompt

Maybe you already did that, but be sure to rename all isolinux* file to syslinux* on the pendrive, as explained in the Unetbootin section of this guide.
One time I had a similar problem and I was missing this part.


How to wait for a while and then suspend current work on open new terminal in a bash script

As I don't have your mdr-dev program, it's difficult for me to test this, so here goes version 0.1.  Please test and feed back in the comments.

#!/bin/bash
#
# This script opens a port to tunnel through, then waits for the tunnel to be opened
# and then connects to the correct host using ssh
# Answer to: http://askubuntu.com/questions/682316/how-to-wait-for-a-while-and-then-suspend-current-work-on-open-new-terminal-in-a

# Copyright (c) Fabby 2015

# This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. See the GNU General Public License for more details.
# You DID NOT receive a copy of the GNU General Public License along with this program as the license is bigger then this program.
# Therefore, see http://www.gnu.org/licenses/ for more details.

# version 0.1   dd 2015-10-08   First version.

### Init ###
declare -r bDebug=false
declare szPortOpen=""
if $bDebug ; then
  set -x
  declare iDebugTimeOut=30 #seconds
fi

### Main ###
echo "$MDR_ROOT"
# open tunnel:
mdr-dev --root --mount /opt/tile/home /home --tunnel 1022 22 &

if $bDebug ; then
  read -t $iDebugTimeOut -p "Hit [Enter] to continue..."
fi

#Wait for the tunnel to open
while [ -z "$szPortOpen" ]
do
  sleep 1m
  netstat -atn | grep ":1022" | (read szPortOpen; )
  if $bDebug ; then
    echo $szPortOpen
    read -t $iDebugTimeOut -p "Hit [Enter] to continue..."
  fi
done

# Now ssh to the server
xterm -hold -e ssh -p 1022 root@localhost


My bad, the default site was pointed at a wordpress site and since all the configs are stored in the db is was redirecting to an old ip


You can make your file manager display hidden files, after which go to $HOME/.kde/share/config/baloofilerc. It is enough to edit it and change the option

Indexing-Enabled=true

to (or add if there is not such option)

Indexing-Enabled=false

to disable baloo.

I know it is way too easy but it did work for me and also for the guy who posted this simple solution on this page.

Disabling Akonadi server and Nepomuk search plugin can greatly increase performance in a KDE environment.


How to find the package name to install an app using terminal?

You could search the APT cache for it:

apt-cache search <keyword/regex>

E.g. if I wanted to install SuperTuxKart, but didn't know the package name, I'd use apt-cache search tux. This would return a list of packages whose name or short description contains this keyword or matches the regex. An extract from the search for tux:

supertux-stable - Classic 2D jump 'n run sidescroller with Tux
supertuxkart - 3D kart racing game
supertuxkart-data - 3D kart racing game (data)
supertuxkart-dbg - 3D kart racing game (debug)
tuxcards - hierarchical notebook for note and idea management
tuxcmd - twin-panel (commander-style) file manager using GTK+ 2

Now I search the results for SuperTuxKart and find the package supertuxkart. This obviously is the package name.


Delete the ~/.config/vlc directory to remove all the personal preferences:

rm -r ~/.config/vlc

Do this while vlc is closed and you will have a brand new installation.


What are some alternatives to upgrading without using the standard upgrade system?

You can use the alternative CD (instead of Ubuntu Desktop, Kubuntu Desktop, Server CD) which allows you to upgrade from CD.


Why fiddle with samba if you can use NFS?

NFS has an easy config to select what you want to share, full with permissions and user credentials.

After you create a NFS share, you can mount it on your laptop. You can also automount this share on your laptop, and everything just works. For the automount I use a bash script like

sleep 1m
mount <nfs server>:/<share name> /mountLocation

I use this script because my wifi is slow with connections, thus rendering fstab mounting unfeasible.

You can read more here.


How do you make a copy of wine to a dvd?

If you want to backup your configuration, just copy the .wine folder in your home directory.

It is maybe usefull to use a compression program:
zip -r9 myWineBackup.zip ~/.wine/

To burn the zip file to DVD just use brasero which should be installed by default:

Start a data project by clicking on the menu entry

And then add files:


Can you define a couple of keyboard shortcuts in System -> Preferences -> Keyboard Shortcuts to change the actions of the two keys? That does work in Xubuntu for this situation.


System freezes, apt-cache running 100% for an hour?

You could try looking at the process tree for apt-cache, with a command like pstree -p, or just ps auxf. Then try and figure out why apt-cache is even running & tell it not to, or reconfigure it, or maybe upgrade it... (you could've killed it too, instead of let it hog the cpu for an hour).

Finding the right PID could use pgrep, and some options of pstree to show parent(s), (p)ids, (a)rguments, VT100 (l)ine characters:

pstree PID -s -p -a -G -l

Source: https://superuser.com/questions/1204006/how-to-find-ancestor-chain-of-a-process/1204263#1204263


Shell script to restart a process if it outputs a certain piece of text

Since python exits with an return code != 0 when it throws an exception, you can just run this shell script:

while ! ./command.sh ; do : ; done

Of course if you just want to run the command all the time, just write:

while true ; do ./command.sh ; done

(this assumes ./command.sh doesn't fork and exit)


Libreoffice Writer (soffice.bin) uses too much memory

The memory that is listed in your table is very likely the virtual memory of the soffice.bin.

If you run top, you can see the virtual memory use (VIRT) and the resident set size (RSS) of system processes. The resident set size is the non-swapped physical memory used by each process, minus a small amount of overhead. So it will give you a decent idea of actual memory usage.

VIRT or VSZ (Virtual Set Size) is the memory size assigned to a process during the initial execution. The Virtual Set Size memory is simply a number of how much memory a process has available for its execution.

If you don't have top installed, you can run:

ps ax -o rss,vsize,command|sort -nr|head -n 10

this will give you the 10 most memory hungry processes. The first column printed is RSS and the second column is VIRT. If soffice.bin is in the list, it's VIRT should match what is in your table.

References:
- http://www.unixlore.net/articles/quick-easy-way-monitor-process-memory-usage.html
- https://serverfault.com/q/48582
- https://linuxconfig.org/ps-output-difference-between-vsz-vs-rss-memory-usage
- man ps


For the first method, you'll need to backup /etc/default/grub, eg with

  sudo cp /etc/default/grub /etc/default/grub.backup

If you edit the grub file, you'll need to run sudo update-grub. Nouveau can be reinstalled with sudo apt-get reinstall xserver-xorg-video-nouveau. Uninstall instruciton for nVidia's original driver should be included in the download, probably something similar to sudo make uninstall.

For the second method, you'll need to remove the edit from the blacklist file and run sudo apt-get purge nvidia-glx-185 to uninstall nVidia driver.


I just managed to get a HP Color LaserJet 2600n (by IP/JetDirect) and a super-old HP LaserJet 1010 (by USB) working in Kubuntu 18.04. I had to use another account first to run "hp-setup" (even though both accounts have Admin privileges and are sudoers). Only then could I install the printers using my normal account (weird). The LaserJet 1010 even auto-installed.


I'm not sure if it's the best way, but Rhythmbox with libimobiledevice (both installed by default in lucid) works for me. There are a couple of glitches to be aware of, however:

There's no full-library sync.  You have to manually drag individual songs to the iPhone.
About 10 seconds or so after Rhythmbox transfers the songs, the iPhone screen switches to "Sync in Progress." You have to wait until after that screen goes away before you eject the iPhone, or the music won't actually get synced. This usually takes 5-10 minutes for me (more if I transfer a lot of songs)
The first time you go to the "Music" app on the iPhone, you have to wait for it to rebuild the library.


'date' on a command issued before midnight but ending after midnight. Today or tomorrow date?

It will have todays date. The date command is run when the command is issued.

Actually, the nested command $(date ...) will be executed by the shell before the zip command is called. This is called command substitution, the nested command will be replaced by its output.


How do I set up a second display via DVI/viewport with a Lenovo T420S?

Ubuntu 14.10 and later: It's much, much simpler there. Please see this answer and my comment below.

  Note: This only works in Ubuntu 13.04. There are some differences in 13.10.

I have managed to connect two external monitors (in addition to the built-in panel) to my ThinkPad T430 on Ubuntu 13.04, with Optimus ("Switchable graphics") enabled (option 3 in your list). The monitors are connected via the DVI interface, one of them is rotated. In contrast to other solutions, all monitors are attached to the same window manager, so windows can be moved freely between the monitors. This achieves the goal of enhanced battery life if disconnected and using external monitors if connected.

The key idea here is:

The internal graphics adapter is responsible for managing the image (bitmap) that is actually displayed
By default, everything is rendered on the internal graphics adapter
GPU accelerated applications use the discrete graphics adapter, the output is copied to the internal graphics adapter
For each external monitor, the internal graphics adapter provides a "virtual" display
Output to the external monitors happens using a second X server, the contents from the "virtual" displays are constantly copied to the second X server

The major benefit over other solutions is that all displays are (seemingly) part of the same X session, so you can freely move windows between the displays.

So far I have noticed no performance penalty.

Instructions

You need to do the following:

Install Bumblebee from a PPA
Build and install a custom Intel video driver
Download, compile and finally install a small program
Edit two configuration files
Reboot several times

For most actions you will need a terminal, a text editor, and root access (sudo). Detailed instructions are given below.

Install Bumblebee

Follow the "basic setup" section of the instructions. Execute as root, the last command actually initiates the reboot:

add-apt-repository ppa:bumblebee/stable
apt-get update
apt-get install bumblebee virtualgl linux-headers-generic
reboot

Don't try to Run bumblebee with nouveau driver only?. From my experience it doesn't work, at least not in this setup.

Validation

You should be able to run optirun glxgears.

Install a patched version of xserver-xorg-video-intel

Option 1: Install from my PPA (currently only Ubuntu 13.04)

Execute the following as root:

add-apt-repository ppa:krlmlr/ppa
apt-get update
apt-get install xserver-xorg-video-intel

Option 2: Build and install your own package

Choose the most recent patch for xserver-xorg-video-intel. Click the file, click the "Raw" button, copy the URL in the browser. At the time of writing, this was https://raw.github.com/liskin/patches/master/hacks/xserver-xorg-video-intel-2.20.14_virtual_crtc.patch.

sudo apt-get build-dep xserver-xorg-video-intel
cd ~
apt-get source xserver-xorg-video-intel
cd xserver-xorg-video-intel
# replace the URL below with the one you have noted, if necessary
wget https://raw.github.com/liskin/patches/master/hacks/xserver-xorg-video-intel-2.20.14_virtual_crtc.patch
patch -p1 < *.patch
# The next command will ask for a change log message. Supply something meaningful,
# this will later allow you to distinguish your patched package from the distribution's.
dch -l+virtual
dpkg-buildpackage -b
cd ..
sudo dpkg --install xserver-xorg-video-intel_*.deb

Validation (1), for both options

The command

apt-cache policy xserver-xorg-video-intel

should show the patched version (+virtual suffix) and the original Ubuntu version.

Necessary for 13.04, for both options

Add the following to your /etc/X11/xorg.conf, create if necessary:

Section "Device"
    Identifier "intel"
    Driver "intel"
    Option "AccelMethod" "uxa"
    Option "Virtuals" "2"
EndSection

Validation (2), for both options

After a reboot, run xrandr in a terminal. The output should list two additional virtual displays.

Download and build screenclone

Get puetzk's fork of screenclone and its dependencies, and compile it.

sudo apt-get install libxcursor-dev libxdamage-dev libxinerama-dev libxtst-dev git build-essential
cd ~
git clone git://github.com/puetzk/hybrid-screenclone.git
cd hybrid-screenclone
make

Validation

The file screenclone exists and is executable. (It won't run yet, though.)

Edit xorg.conf.nvidia

Open the file /etc/bumblebee/xorg.conf.nvidia in a text editor, as root
Comment out or remove the lines that read UseEDID or UseDisplayDevice
In the Section "ServerLayout", add an entry Screen "Screen0"
At the bottom of the file, add the following:

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    DefaultDepth    24
    SubSection     "Display"
    Depth       24
    EndSubSection
EndSection

Reboot

Testing

My setup assumes a landscape monitor connected to the first DVI port of the docking station, and a portrait one connected to the second DVI port. Run the following commands in a terminal from the directory where screenclone is located, adapt as necessary.

xrandr --output LVDS1 --output VIRTUAL1 --mode 1920x1200 --right-of LVDS1 --output VIRTUAL2 --mode 1920x1200 --right-of VIRTUAL1 --rotate left
./screenclone -b -x 1:0 -x 2:1 &
sleep 1
xrandr -d :8 --output DP-2 --right-of DP-1 --rotate left
fg

Note how the display rotation has to be defined twice. You can omit the second invocation of xrandr if no rotation is desired (and, of course, the --rotate left in the first invocation).

By terminating screenclone with Ctrl+C (which has been put into the foreground again using fg), the discrete graphics adapter is shut off. You can verify this with cat /proc/acpi/bbswitch. Still, screen space is reserved for the two now disconnected monitors. To switch back to laptop display only, use

xrandr --output LVDS1 --output VIRTUAL1 --off --output VIRTUAL2 --off

Cleanup

Copy screenclone to a directory that is in the PATH (e.g., /usr/local/bin)
Create a bash script to automate startup and shutdown of the external displays. This script will setup external displays on start and switch to laptop display only on exit (e.g., by hitting Ctrl+C).

#!/bin/bash
set -m
xrandr --output LVDS1 --output VIRTUAL1 --mode 1920x1200 --right-of LVDS1 --output VIRTUAL2 --mode 1920x1200 --right-of VIRTUAL1 --rotate left
trap "xrandr --output LVDS1 --output VIRTUAL1 --off --output VIRTUAL2 --off" EXIT
screenclone -b -x 1:0 -x 2:1 &
sleep 1
xrandr -d :8 --output DP-2 --right-of DP-1 --rotate left
fg

Alternative option: My collection of scriptlets contains two scripts, extmon-start and extmon-stop, that enable and disable the second and third monitor. Edit the extmon-start script to suit your configuration.

References

My answer largely draws from the following resources:

http://zachstechnotes.blogspot.ch/2012/04/post-title.html (the original description)
http://sagark.org/optimal-ubuntu-graphics-setup-for-thinkpads/ (a simplified version of the above)
https://github.com/liskin/patches/issues/4 (instructions on how to enable the patched version of the Intel driver on 13.04)
https://github.com/puetzk/hybrid-screenclone (an enhanced fork of screenclone with integrated Bumblebee support)
https://github.com/liskin/hybrid-screenclone/issues/2 (for a list of dependencies)
https://github.com/liskin/hybrid-screenclone/issues/7 (with crucial hints on how to enable screen rotation)
https://github.com/Bumblebee-Project/Bumblebee/issues/77#issuecomment-18899607 (an earlier comment on GitHub)


Installing netbeans on default user doesn't work but on root does

I've found solution on https://bugs.launchpad.net/ubuntu/+source/openjdk-8/+bug/1520743

If you have a similar problem running openjdk 7 or 8 you need to go to:

/etc/java-8-openjdk/ <-- different for different openjdk versions
and edit accessibility.properties. Comment out:

assistive_technologies=org.GNOME.Accessibility.AtkWrapper
 by placing # before this line


Upload multiple files or folders to Ubuntu One?

At the moment, there is no such option. However, we are scheduled to work on this in early next year, so this should be no more than a few months away.


Have not the required reputation for comments, that’s why I post this as an answer:

I assume the external HDD is not a SSD, but a „normal“ HDD.

Was it empty?
How much data do you copy? 1 entire TB?
Which file system do you use? (FAT, NTFS, ext, ...)
Do you copy a lot of small files or a handful of big files?

If the harddisk was not empty and FAT as a filesystem was used, there might be the problem, that big files have to get split up amoung different locations, this usually slows down.

Some filesystems (ext for instance) distribute the files all over the disk (which is good!), but if you copied first a lot of small files, then you might run in the same problem when big files arrive.

When a disk is almost full, the performance usually drops a lot.

And finally, the nautilus speed display is not very precise in general.

Probably it is too late now, but you can test the performance of a disk via the „Disks“-program, if this drop to 1 MB/s is a general problem.


Posting @doug 's comment as answer.
Wayland is disabled by gnome devs on nvidia proprietery drivers due to instability of GLX applications with that recipe.
You can manually remove or comment the DRIVER=="nvidia" rule at /lib/udev/rules.d/61-gdm.rules
See comment here:
https://gitlab.gnome.org/GNOME/gdm/-/merge_requests/46


Reduce the font size in the NetAmin window from 10 to 6 or some smaller number.
Hover the mouse over the border between the second and third panes in the NetAmin window until a two-sided left-right arrow appears and drag the second pane's border to the right to enlarge it until you can read all the text inside it.
Increase the size and resolution of the VirtualBox guest OS by downloading and installing VirtualBox Guest Additions. Open VirtualBox, select the Ubuntu guest OS, click the yellow gear Settings icon located on the VirtualBox menu bar, click Storage, click the dropdown triangle under the CD image to the right of where it says Optical Drive, and select Choose Virtual Optical Disk File....

Browse to the Guest Additions file that you downloaded from Oracle and select it. Start the Ubuntu guest OS. Install Guest Additions in the Ubuntu guest OS by accepting the VirtualBox Guest Additions prompt and then authenticating with your guest OS password. Save a snapshot of the Ubuntu guest OS before shutting it down to make the Guest Additions installation permanent.


If you installed 16.04 after you installed 14.04, it is probable that you are booting of the Grub of the 14.04, which has been installed in the MBR (by default). It does not know of your new 16.04 installation.

Fixing it is not difficult. As you can boot 14.04, you can execute as root:

update-grub

This should detect both 14.04 and 16.04 (see also How can I add a new operating system boot entry to the GRUB2 menu?).

You can then use the instructions in NZD's answer to change your default operating system.


I tried again today and I found that byobu reads .tmux.conf from ~/.byobu or maybe it is ~/.local/share/byobu/. I symlinked that to my ~/.tmux.conf and I now have italic fonts. I rarely use tmux directly. I guess I could have copied it.

Summary:

# Paste this in a terminal.
cat <<EOF|tic -x -
tmux|tmux terminal multiplexer,
  ritm=\E[23m, rmso=\E[27m, sitm=\E[3m, smso=\E[7m, Ms@,
  use=xterm+tmux, use=screen,

tmux-256color|tmux with 256 colors,
  use=xterm+256setaf, use=tmux,
EOF
echo 'set -g default-terminal "tmux-256color"' >> ~/.local/share/byobu/.tmux.conf

Restart byobu and test that it works:

# I have italics
echo `tput sitm`italics`tput ritm`
# I have 256 colors


Errors with Vagrant and Ubuntu 12.10 with RVM

When you installed Vagrant using apt-get it would have installed all its required dependencies for the standard Ubuntu-packaged version of Ruby. But your error message indicates that when you run vagrant it is trying to use a version of Ruby (and its Gems) that is managed by RVM rather than the system version, and your version of Ruby is missing at least one of its dependencies, log4r.

I think you have a few options:

Revert to using the system (standard Ubuntu) version of Ruby by running something like rvm use system --default to reset RVM by default, and only change Ruby versions when you need to.
Switch back to the system version just when running Vagrant, so run rvm use system before running vagrant in the same shell.
Identify all the Ruby Gems that Vagrant depends on and manually install them in your RVM-managed Ruby installation. This would be a fiddly approach, though. It used to be possible to install Vagrant itself as a Ruby Gem, so you could have installed it in your RVM-managed Ruby installation, but that is not supported any more.

See the RVM command options documentation for more detail on controlling which version of Ruby you are using.


Internet Connection Problem in Ubuntu 15.10

try disabling network manager and connect to it manually

systemctl stop network-manager.service
ifconfig wlan0 down
ifconfig wlan0 up
wpa_passphrahe "SSID" password > /etc/wpa.conf
wpa_supplicant -B -iwlan0 -c/etc/wpa.conf -Dwext && dhclient -r wlan0 && dhclient wlan0


Can I use only Ubuntu as my custom Pc OS?

Software can not destroy hardware, unless you connect a USB-powered explosive kit to your computer...

The only way how the system could damage your machine in a not reversible way is by overheating your devices, but before this happens, the BIOS will do an emergency shutdown to save your chips. And although Ubuntu has some minor problems with a handful of drivers, especially for graphic cards, which may lead to inefficient power and fan management, this is only very very rarely a problem and just leads to that described shutdown.

But I don't understand why your friend warns you from installing Ubuntu as only OS for that reason. It's completely irrelevant how the rest of the disk looks like, whether I dual-boot with other systems or not, the running system controls the computer. There is no difference in whether you still have Windows as second OS installed or not, as long as you're running Ubuntu, you're just plainly running Ubuntu.

There is no risk in damaging anything except your current data (which you always have when repartitioning your disk and installing a new system - not only with Ubuntu), but when you make a backup before running the installer, you're on the safe side.

To conclude: Ubuntu does not harm anybody or anything. If you like it, install it. It does not matter if you replace Windows with it or install both along each other on the same computer, do what you feel more comfortable with. Make sure you have got a current backup of your data and nothing bad will ruin your day! :)


/usr/bin/ruby1.9.1: No such file or directory -- /usr/share/rubygems-integration/1.9.1/gems/bundler-1.3.5/bin/bundle (LoadError)

This will fix the issue:

sudo gem install bundler

You'll most likely run into other gem dependencies:

sudo apt-get install libsqlite3-dev
sudo gem install sqlite3 -v '1.3.10'

come to mind.


Maybe you need gdebi, it can help you auto-install what the dependences when you install .deb.

First, you should install it
sudo apt-get install gdebi

then, you can
sudo gdebi xx.deb


I would not recommend to replace the default installation with a newer version.

Maybe some system tools depend on Python 3.6, and do not work on Python 3.7.

I suggest to install Python 3.7 and just use it directly via python3.7.


Try to look here:
http://ubuntuforums.org/showthread.php?p=12042532

And also here:
https://help.ubuntu.com/community/MacBookPro8-2/Oneiric


Desktop folders still open in Nautilus after making Thunar the default file manager

I've done this previously with nemo, but at that time ( ~3 years ago ) there was not an equivalent to the following for Thunar.

gsettings set org.gnome.desktop.background show-desktop-icons false
gsettings set org.nemo.desktop show-desktop-icons true

Separately, you can look at https://help.ubuntu.com/community/DefaultFileManager#Script_to_change_Thunar_to_be_the_default_file_manager if it still applies.


The system network services are not compatible with this version Ubuntu 14.04

Network Manager Crash on ubuntu 14.04

After upgrade from proposed repository the next packages:  libnl-3-200, libnl-genl-3-200 and libnl-route-3-200.

You'll need to downgrade your libnl-3 packages:

sudo apt-get install libnl-3-200=3.2.21-1 libnl-genl-3-200=3.2.21-1 \
libnl-route-3-200=3.2.21-1

if you can not install these packages or have trouble making the downgrade you can manually download them from here(from my account):

https://mega.nz/#F!7kchgI7Z!U5Y_M80OSSS5DZKfZGrC3g

Steps:

Download the 3 files on another computer.
Copy them to a flashdrive.
Put the flashdrive in to the affected computer.
Copy the 3 files into a new folder.
Open a terminal in that folder and run

sudo dpkg -i lib*.deb
sudo reboot

And you may need to apply a hold until a fix for NetworkManager can be released.

sudo apt-mark hold libnl-3-200 libnl-genl-3-200 libnl-route-3-200

And after the fix:

sudo apt-mark auto libnl-3-200 libnl-genl-3-200 libnl-route-3-200

More info:


HDMI Audio crackling only in Google Chrome

In a terminal window

sudo nano /etc/pulse/default.pa

look for

load-module module-udev-detect

and add tsched=0

load-module module-udev-detect tsched=0


Nginx won't start after upgrade from 16.04 to 18.04

unfortunately, not everything works after the os upgrade. I suggest you install and reconfigure nginx.


Ubuntu can't access web pages, even though it's connected to the Internet

It turns out that my resolv.conf (/etc/resolv.conf) was borked on the upgrade, with just this one line, put in there by NetworkManager:

nameserver 127.0.0.1

Changing this to the servers I actually wanted to use made it work again.


Partitioning the remainder of a bootable pen drive

Create an extended partition.  This is a special type of partition that will allow you to create virtually an unlimited amount of partitions.

Once you create the extended partition, you will see the available space as usable.


The question mark indicates that service was not able to determine the status of the running service since it did not find the status line in the related script in /etc/init.d

The service command has a snippet as follows:

if ! grep -qs "\Wstatus)" "$SERVICE"; then
    #printf " %s %-60s %s\n" "[?]" "$SERVICE:" "unknown" 1>&2
    echo " [ ? ]  $SERVICE" 1>&2
    continue

which indicates that it will mark the status of a service as [?] if it does not find a line which has the word status after any non-word character in the related service's file in /etc/init.d.

For example, I have the following cases to consider for this specific example

For [+] acpid, if I browse the file /etc/init.d/acpid I get the following line:

status)
status_of_proc "$ACPID" acpid

which I presume is what service is looking for.

For [?] apport, I don't find a line with the word status preceded by a non-word character which service was looking for. Thus, it prepends a [?] before the service name when you do a sudo service --status-all.

See also: An exactly similar question on Serverfault.


Alsamixer shows the HDMI sound, so press F6 key and select the second sound card.
Alternatively, launch  alsamixer using:
alsamixer -c1


How to compile quickly without continously having to type

Create a Makefile. As your project might grow larger, your bash alias will most likely not always cover what you need and you might have to call it multiple times to get everything compiled.

When your Makefile is up-to-date, all you have to type is make to build your whole project.

See http://www.cs.colby.edu/maxwell/courses/tutorials/maketutor/.


ACER ASPIRE ONE, WIFI Atheros Communications Inc. AR9462 problem with 12.10

One solution with Acer V3 571G (card AR9462) is to configure the ath9k module with options: nohwcrypt=1

sudo nano /etc/modprobe.d/ath9k.conf

The file should contain this:

options ath9k nohwcrypt=1 blink=1 btcoex_enable=1 enable_diversity=1

After saving this modified file, do

rmmod ath9k
modprobe -b ath9k


I'm not sure if you are doing it the right way but the package exist:

apt-cache search restricted-extras
kubuntu-restricted-addons - Commonly used restricted packages for Kubuntu
kubuntu-restricted-extras - Commonly used restricted packages for Kubuntu
lubuntu-restricted-addons - Commonly used restricted packages for Lubuntu
lubuntu-restricted-extras - Commonly used restricted packages for Lubuntu
ubuntu-restricted-addons - Commonly used restricted packages for Ubuntu
ubuntu-restricted-extras - Commonly used restricted packages for Ubuntu
xubuntu-restricted-addons - Commonly used restricted packages for Xubuntu
xubuntu-restricted-extras - Commonly used restricted packages for Xubuntu

You can open the terminal and type sudo apt-get update && sudo apt-get install lubuntu-restricted-extras type your password and done.


Authenticating Apache website against WIN SERVER 2008 Active Directory

This is something that really should be handled at the application level and not at the server level (it makes testing, easier), without knowing the language your using you can existing libraries to connect to active directory to auth your users or roll your own, you can see me getting berated over my code on code review (just go through my profile) to get an idea (its in php)


I just happened to have the same problem.

In my case I had set up my "recycle" folder on a different btrfs subvolume (read: different mount point I guess).

Turns out this solution worked:

Add crossrename to the vfs objects = recycle line.

Took it from there:
https://bugzilla.samba.org/show_bug.cgi?id=8637#c5

Just a word of caution after some testing...

This workaround only worked for files under 20MB of size.  For some reason, files over 20MB were not written to the recycle folder when the recycle:repository was set to a different subvolume than the shared folder.

To work around this please add the line

crossrename:sizelimit = 500

after the vfs_objects line, which makes it work for files up to 500MB

The problem was only completely solved when both the shared folder and the recycle folder were set on the same subvolume.

Hope this can help.


A question about switching a hard drive to a different laptop

Yes you can change your hard drive, assuming it's the right physical size, but you really ought to format the disk and cleanly install the operating system on the new hardware, unless the computers are identical hardware.
It's not a good practice to yank a hard drive from one computer and attempt to transplant it into an entirely different device.  The operating system was installed on the "old" laptop tailored for that laptop's hardware.


How to split .zip files and join them in Windows?

On Ubuntu you can use the split command to split your zip file. Something like this should work:

split your-zip.zip -b 32M ZIPCHUNKS

This will create a bunch of ZIPCHUNKS* files, in order, and all 32 MB or less in size. Change the 32M parameter to vary the chunk size.

Traditionally you'd use cat to glue them back together:

cat ZIPCHUNKS* > reassembled-zip.zip

Since you want to do the reassembling on Windows, you need a substitute for cat. Is there replacement for cat on Windows may help, but note that the Windows type command will not work as it adds the files names between them when processing more than one file. One working approach is copy /b ZIPCHUNKS* > reassembled-zip.zip.

You can also use rar which natively supports creating "split" archives which can then be decompressed by a GUI tool on Windows such as WinZip or WinRar. On Ubuntu, install the rar package, then:

rar a -v32M destination.rar files/to/compress

This will create files called destination.partXX.rar. Transfer these to Windows, then unrar the first one (destination.rar), which will link to the others automatically.

One trick you can potentially use is to "rar" the original zip file, that way you can reassemble it on Windows. If you have the original files, it may be easier to just rar them and work with that.


After a bunch of searching to get gcc-4.1 & g++-4.1 in Ubuntu 10.10 (maverick), I found easy work around.

Add to the end of /etc/apt/sources.list source from 10.04 (lucid)

deb http://mirrors.us.kernel.org/ubuntu/ lucid main universe

Then run

sudo apt-get update

You have to specify version 4.1.2-27, as libstdc++6-4.1-dev has not been back ported to 4.1.2-29.

sudo apt-get install gcc-4.1=4.1.2-27ubuntu1 gcc-4.1-base=4.1.2-27ubuntu1 cpp-4.1=4.1.2-27ubuntu1 g++-4.1


gnome-screenshot copy to clipboard shortcut

There are a set of keyboard shortcuts in Ubuntu specifically for screenshots.

Go to System Settings > Keyboard > Shortcuts > Screenshots. In my case it is Ctrl+Shift+Print_Screen


How do I download the command-line emacs instead of the GUI one?

That would be emacs-nox I believe.  This is the meta-package that currently points to emacs24-nox .

  Description: The GNU Emacs editor
  (without X support)

So, just as before but with that package:

sudo apt-get install emacs-nox

or alternatively

sudo apt-get install emacs24-nox

For cases like this, where you wonder what's in what package, try this :

apt-cache search ^emacs

then

 apt-cache show <whateverpackage>


Is it possible to undo a file rename using Nautilus?

While you are still editing the file name, press Esc to cancel the renaming without applying any changes. (You can still see the original name in the status bar in the lower right corner)

Once you confirmed it, you still can revert it with Ctrl+Z or through the
Menu > Undo Renaming.
This seems even to work after the Nautilus window was closed and reopened.

Screenshot failed with open menu. Sorry! :(


Specifying preseed/late_command as a shell script in Ubuntu preseed

I was able to get this working with some minor adjustments to the late_command invocation:

Use in-target rather than chroot /target
Remove trailing semicolon (possible this was being interpreted as part of file name but not sure)
Make sure to add executable bits (don't see why this should be required when it is invoked through sh, but hey, whatever works)

End result from preseed:
d-i     preseed/late_command                        string  \
    cp -a /cdrom/preseed/tmp_mount.sh /target/usr/sbin/; \
    in-target chmod 700 /usr/sbin/tmp_mount.sh; \
    in-target /bin/sh /usr/sbin/tmp_mount.sh

Note that this will leave /usr/sbin/tmp_mount.sh present on the target filesystem. (I've chosen deliberately to leave it there.) You could remove it in a final in-target /bin/rm /usr/sbin/tmp_mount.sh if wanted.


The first step in diagnosing a slow boot is to look at the output of dmesg. dmesg displays the contents of the kernel ring buffer, which contains status messages logged by the kernel more or less from the moment control is passed to the Linux kernel to the point that your syslog daemon takes over those logging duties.

To get the output of dmesg in a file for easy browsing, do dmesg > dmesg.txt. Now dmesg.txt in your current directory contains the kernel log.

Reading dmesg: Every line of dmesg output starts with a sequence like [    0.106607]. This is a timestamp in "T-plus" format: it is the number of seconds since the instant the kernel started.

To identify your slowdown, look for a point where the timestamp "jumps" a great deal from one line to the next (hint: you can also use dmesg -d to get dmesg to print the time difference from one timestamp to the next in angle brackets after the timestamp):

[    3.201806] usb 2-4: >New USB device strings: Mfr=2, Product=3, SerialNumber=4
[    3.201810] usb 2-4: >Product: Android
[    3.201813] usb 2-4: >Manufacturer: Android
[    3.201816] usb 2-4: >SerialNumber: 00093f054d0a2f
[   43.254818] EXT4-fs (sda5): orphan cleanup on readonly fs
[   43.254827] EXT4-fs (sda5): ext4_orphan_cleanup: deleting unreferenced inode 10747985
[   43.254879] EXT4-fs (sda5): ext4_orphan_cleanup: deleting unreferenced inode 10748275
[   43.254892] EXT4-fs (sda5): ext4_orphan_cleanup: deleting unreferenced inode 10748394

Here we see a jump from T+3 seconds to T+43 seconds, meaning that for 40 seconds the kernel was logging nothing, and presumably twiddling its thumbs waiting for something to happen. This is right after it's recognized an Android device plugged in, so for starters, we might want to try having that Android device unplugged during boot. That could be a red herring, though -- the delay might be incurred by the filesystem cleanup that is happening next.

This is followed shortly by:

[   43.254959] EXT4-fs (sda5): ext4_orphan_cleanup: deleting unreferenced inode 10748175
[   43.254969] EXT4-fs (sda5): 8 orphan inodes deleted
[   43.254970] EXT4-fs (sda5): recovery complete
[   52.161162] EXT4-fs (sda5): mounted filesystem with ordered data mode. Opts: (null)
[  451.530476] Adding 51097596k swap on /dev/sda2.  Priority:-1 extents:1 across:51097596k
[  451.540572] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[  455.117113] udevd[430]: starting version 175
[  458.734692] lp: driver loaded but no devices found

Wow, a gap from T+52 seconds to T+451 seconds. We notice that the last thing that happens prior to the delay is the filesystem being mounted.

A little research (doing a Google search for 'slow boot dmesg "mounted filesystem with ordered data mode"') yields a promising lead: an unfixed bug pertaining to udev that refers to a long wait at boot right after this message!

Browsing that thread, it looks like a workaround has been established:

  It consists in adding a --noudevsync parameter to the vgchange command in /lib/udev/rules.d/85-lvm2.rules. Then regenerating the initramfs with update-initramfs -u

So we'll do something like this:

sudo nano /lib/udev/rules.d/85-lvm2.rules

Find the excerpt that looks like /sbin/lvm vgchange -a y and change it to read /sbin/lvm vgchange --noudevsync -a y. It may be necessary to append the same option to the /sbin/lvm vgscan call.

Now do sudo update-initramfs -u and reboot when it is successful.


Aptitude: how to disable warning about recommended packages?

I think you're looking for the --without-recommends flag.

For a permanent solution, you can set

Aptitude::Ignore-Recommends-Important "true";

in your configuration file (~/.aptitude/config or system wide /etc/apt/apt.conf.d/*) as specified here


Check your RAM specs, and BIOS version...

Check your RAM specs...

Check your BIOS version...

In terminal do sudo dmidecode -s bios-version to see what version BIOS you have now. Compare it to this...

Go to http://www.ecs.com.tw/ECSWebSite/Product/Product_DOWNLOAD/EN/Motherboard/A320AM4-M3%20-LL-V1-DO-0A-RR-/Socket%20AM4/DCID/BIOS to download the latest BIOS.

Update #1:

Re-seating the RAM fixed the problem. System is working now. Amount of RAM showing to Ubuntu is only 10G, as 2G is assigned to internal video card. This value can be adjusted in the BIOS.