Can the hotspot created in XUbuntu visible to windows devices?

If you have created the hot-spot correctly it should be able to use on a separate Windows computer & any mobile device! When I use my hot-spot (created on Ubuntu 14.04lts) My windows does not automatically detect it I must manually enter the "Hidden Networks" To see it & had to set it up in Windows "Network Settings" -> Create a network" This could be for several reasons including hardware and may be different on case by case situations. Unfortunately i do not have a "Cyanogen device" to test but my Android connects just fine. Hope this will help you troubleshoot the issue.


How to save screenshots as JPG automatically?

Open "dconf-editor"

"dconf editor" is available for installation in the ubuntu software center

navigate to org > gnome > gnome-screenshot   and change the default-file-type png to jpg.


How can I recover from read-only filesystem when operating on VMWare?

You can attach an ISO image of the live DVD as a virtual DVD drive to your VM in the vSphere client (or other VMware tool you use to configure VMs) and boot from it. I've done it many times.


Can Wine and its programs be set to use Ubuntu file manager instead of Wine Explorer?

The most promising approach seems to me to set MIME types for all files of interest. Have a look at How to associate all file types within Wine with its corresponding native application?

Other things I tried, but didn't work:
/usr/bin/winefile is a simple wrapper script, you can replace or change it.
For example, to use thunar as your file manager in wine, add after the #comment lines

thunar $@
exit

You can leave the rest as it is, to be able to undo your changes.

Second approach, not working: looking in system32 for winefile.exe and explorer.exe, replacing them with softlinks to thunar. Wine ignores this, even a double-click on this softlinks runs winefile instead of thunar.

It seems to me that winefile is a builtin of wine. Maybe some registry edits could change wine's behaviour.


In your workstation the domain name virtuality.site is still associated with the localhost IP of 127.0.0.1.

This is a special IP address to connect to the workstation itself. Some setting was probably changed when you used easyengin on the workstation so that this domain name points to the localhost.

Check the contents of the file /etc/hosts. Edit the file with nano:

sudo nano /etc/hosts

If it contains the line:

127.0.0.1   www.virtuality.site     localhost

Then remove the www.virtuality.site from that line and make it look like:

127.0.0.1   localhost

Save the files and exit the text editor and restart the workstation.

See more at What is the use of /etc/hosts?

Hope this helps


How do i get the app launcher icon in plank?

the app launcher appear in Plank, when you open the app, but if you close it down it may disappear, but you can right click the app and click "keep in Dock" (sorry if its wrong)


dh_install -O--buildsystem=cmake dh_install: missing files: usr/lib/*/lib*.so

The paths in base-dev.install and base1.install are wrong.

dh_install: base-dev missing files: usr/lib/*/lib*.so
dh_install: base-dev missing files: usr/lib/*/pkgconfig/*
dh_install: base1 missing files: usr/lib/*/lib*.so.*

They will be correct as below and package can be built:

usr/lib/lib*.so
usr/lib/pkgconfig/*

usr/lib/lib*.so.*

But you will have lintian messages that /usr/lib/ is not safe for multi-arch system installations.

Either you fix it at source level (as upstream developer), so cmake install those files to /usr/lib/<HOST-ARCH-FOLDER>/. Which is the correct way.
Or you fix it at packaging level (as packager), by overriding installation paths in base-dev.install and base1.install

#!/usr/bin/dh-exec

usr/lib/lib*.so /usr/lib/${DEB_HOST_MULTIARCH}
usr/lib/pkgconfig/* /usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig

usr/lib/lib*.so.* /usr/lib/${DEB_HOST_MULTIARCH}


In Ubuntu 18.04 and later, the usual arrangement is:

ls -al /etc/resolv.conf
/etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf

If yours is not the same, I suggest that you do:

sudo rm -f /etc/resolv.conf
ln -s /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf

Reboot.


Completely uninstall Nodejs, npm and node_modules

Please follow below steps

1) Open ubuntu softer center
2) Click on installed software
3) Search "node" keyword in search bar
4) Remove all node plugins


Creating flash drive from OS X broke my USB?

Apple seem to be doing everything they can to stop people from installing from usb for some odd reason.

I completely killed my old macbook pro trying to put lubuntu on it and had to install osx on it in the end. I will try again one day..

My guess is that you should format the USB to the appropriate format using the disk utility.


I need to know how to boot ubuntu on an existing Windows XP partition

Update for Ubuntu 18.04 and above
New installations of recent versions of Ubuntu does not use a separate swap partition any more. They use a swap file by default.
Remove the empty partition and keep the space unused.
Ubuntu installation will find and use it. Ubuntu needs at least two partitions in formats not understood by Windows. So you cannot create partitions for Ubuntu to use from within Windows.
Particularly, Ubuntu needs a root partition with the mount point / in the format ext4, and a swap partition with no mount point in its own Swap-Linux format.
hope this helps


Video gets distorted after TV is turned off then back on via HDMI

There are two different fixes that I've found.

If I sudo apt-get install fglxr instead of just relying on the the Additional Drivers gui then it seems to work.

This method has the downside of VDPAU not working.  It complains of a missing nvidia file which is obviously a contradiction as it's an AMD card.

If I use the OS driver the vdpau works but the screen does the weird distortion thing after it has been power cycled.  Instead of rebooting the computer I can run DISPLAY=:0 xrandr -q to see the device name of my TV then run

DISPLAY=:0 xrandr --output HDMI-0 --off
DISPLAY=:0 xrandr --output HDMI-0 --auto

to reset the display.  With that command I can make a script which I can map to a hotkey which I can map to my remote to make the glitch essentially non-existent.

The second solution was courtesy of this post on forum.kodi.tv.

There was a third (actually first but it didn't work) solution proposed of saving the firmware edid (I'm probably not using one or both of those terms correctly) to a file and forcing its continued use which, for me, didn't work.


First of all you need to install exfat support packages. You can do it by running in terminal

sudo apt-get install exfat-utils exfat-fuse

Then you will be able to use gnome-disks to format exfat.

Open "Disks" application in Dash.
Select your disk drive.

Press the "gears" button and select "Format".
Select "Custom" as "Type" and type in "exfat" as a filesystem.

Press "Format".


Unable to update Ubuntu 16.04 through apt-get update

As you have described here: https://spout.ussg.indiana.edu/CRAN/bin/linux/ubuntu/ for the repository for R you should install the key (section Secure ATP):

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9

and after that do

apt update && apt upgrade

If the key is installed correctly, everything will be works well.


Ubuntu Server 20.04 RAID1 + LVM encrypted partition: problem with GRUB

I experienced a similar problem. After no luck with various permutations in a VM I stumbled across this thread on Reddit, where user wRAR_ says '[Debian installer] currently doesn't support encrypted /boot'. Ubuntu is based on Debian; I don't know to what extent the installers are similar, but I tested both in a VM, with and without encrypted /boot. Both failed to boot, presenting the GRUB shell you describe in your question.
NOTE: Designating an encrypted area as the mount point for /, and not designating a separate /boot mount point, means that /boot will reside under that encrypted /.
Broadly this means, if we want some kind of encrypted LVM ontop of RAID, there are two options:
Option 1 - what I chose to do, and is more beginner-friendly since it can be accomplished with the standard Ubuntu installer.
Encrypt everything except /boot and /boot/efi
All user data will be encrypted, but the entire contents of /boot (not just /boot/efi) will not.
The partition scheme you describe is different, but the key thing is that - for this to work - /boot should not reside on an encrypted partition.
I used the following partition scheme:
My encrypted LVM on RAID1 partition scheme
I was able to accomplish it all in the installer:
sda1: 512M /boot/efi
sdb1: 512M /boot
sda2 & sdb2: RAID1 array md0
md0: Encrypted volume dm_crypt-0
dm-_crypt-0: logical volume vg0-lv--0 for /
dm-_crypt-0: logical volume vg0-lv--1 for /srv
Of course you can choose whatever logical volumes you like inside the volume group: I have a separate /srv for a server setup.
One small advantage of this setup is it makes use of both the 512M unencrypted spaces - unlike the typical scheme of encrypted LVM on RAID1 - with just the efi partition unencrypted. It's not ideal, but I tested it and it worked for me.*
Option 2:
There may be a way to circumvent the installer not supporting encrypted /boot by dropping-out to a shell, editing some configuration files and reinstalling GRUB among other things. This blog post seems to have some instructions but I haven't followed them.
*(Although I must say I found the installer's partitioning menu a little awkward in places - it seems to automatically grab certain unformatted space assuming it can use it as the EFI partition; but with a little 'gaming' of the options I got there in the end)


Errors in Chrome://gpu after the Jan 06, 2021, updates for 20.04.1

It seems that the latest Chrome update (87.0.4280.141) fixed the issue. I don't see the errors mentioned above anymore.


Changed the graphics driver, and now ubuntu freezes as soon as it opens

For some reason, grub was showing multiple recovery modes (all with the exact same name). I was choosing the first, which results in a black screen. I tried the second one and it worked.
For people encountering this in the future, I found this link with related info. It suggested pressing 'e' in grub and blacklisting the driver causing the problem. I would assume such tricks might be risky, since I've also read that some nvidia drivers blacklist the other drivers to avoid conflict.


How can I get user/system information in a QML mobile app?

For that you need to create your own QML plugin what is a simple Qt/C++ code. In that QML plugin you can access the system the same way as you would access from any C++ code and expose the functions, properties to the QML layer.

There is a template available in the Ubuntu SDK.

Open the Ubuntu SDK (QtCreator) go to the "Touch" tab, click on the "Create a new project >" and choose the Ubuntu -> QML Extension Library


Apparently and according to WineHQ, iTunes does not work with Wine in a very good manner. Specially after version 7.

What you are seeing is normal and cannot be fixed using current versions of software.

If you want to try out alternatives that run in Ubuntu please visit these questions, there is already plenty of suggestions on the site

Best alternative of Itunes for the use of iPods
iTunes Alternatives for Ubuntu

Has an alternative and if you have it available you can use VirtualBox to install Windows and run iTunes from inside the guest system.


Display clarity issue in Ubuntu 20.04 with Intel Graphics Drivers

Make sure scaling is disabled, and that you're using the standard fonts/theme.

Open Tweaks (gnome-tweaks) and try and change the Hinting  and Antialiasing settings...


How many files are there in all packages in Ubuntu +/- 1000%?

On my 17.10 system I have 181,367 files and directories installed (this number is displayed, for example, whenever you apt install something) in 1,360 packages (apt list --installed | wc -l). That's an average of about 133 files/directories per package.

There are 58,108 packages in 17.10 (apt list | grep -c artful), so assuming my installed packages are representative this yields roughly 7,749,038 files and directories.


Microphone mute key does not respond on Dell Latitude

There are several reported bugs for similar issues on multiple Dell laptops, for example
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1381856
for the same laptop model (but for Ubuntu 14.04). Maybe it would be worth reporting your particular instance on Launchpad, since you might have a new instance of that older bug?


Chinese Input Stopped working in ubuntu 18.04LTE

If you are using ibus-libpinyin, it might be related to a recent version upgrade. Maybe the cached history is corrupted somehow, and in that case you can make it work again if you open a terminal window and run this command:

rm ~/.cache/ibus/libpinyin/*


Unable to turn bluetooth on, Ubuntu 18.04, Asus Vivobook S400CA

I had the same problem with an Asus Eee and Ubuntu 18.04.1 LTS.

The solution that worked for me was to restart the driver with:

rmmod btusb
modprobe btusb

Found this from bug report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=894542


How can I check if a PPA has packages for another Ubuntu version?

This can be scripted... It'll need altered versions of two of my previous answers: one to get a list of all the PPAs and another to check if a URL is live. With those two techniques we can build a real launchpad URL and test it.

dist="saucy"
ppas=$(grep -RoPish "ppa.launchpad.net/[^/]+/[^/ ]+" /etc/apt | sort -u)
while read -r ppa; do
    url="http://$ppa/ubuntu/dists/$dist/"
    if [[ $(wget -O /dev/null "$url" 2>&1|grep "200 OK"|wc -l) == "0" ]]; then
        echo "$ppa does not have a $dist version"
    fi
done <<< "$ppas"

It's an ugly script but it's so beautiful at the same time.


After having selected boot from USB UEFI and started the boot process pressing Shift to show the Grub options.
I edited the line with quiet splash by pressing E to nomodeset quiet splash.
Once Ubuntu was installeded I changed the grub configuration in order to make the changes permanent:

editing /etc/default/grub: set the line starting with "GRUB_CMDLINE_LINUX_DEFAULT" to GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"
run sudo update-grub.

See How do I set 'nomodeset' after I've already installed Ubuntu?.


Change default permission 664 for downloaded files

You should not change that. No file that you load from the Internet should be executable by default. This is a too high security risk.

If you really want this … Permanently set file and folder permission for a user

If you want to execute the file, you should always change the rights manually. No editing application needs rights to execute a file. Especially no image editing program. In the case of plugins, read the part above again. ;)


It should be possible to force ureadahead to load the programs during boot. Do achieve this:

Delete the .pack files in /var/lib/ureadahead/:Alt + F2 → gnome-terminal → sudo rm /var/lib/ureadahead/*.pack
Make sure you are using automatic login:Alt + F2 → gdmsetup
Reboot.
Once your desktop loaded, quickly start the programs you want to preload during boot.
To check if it worked, you can check, if the files are listed in the newly generated .pack files, e.g.:Alt + F2 → gnome-terminal → ureadahead --dump | grep "gedit"
If a program is not included, you can extend the phase during which ureadahead waits after boot, by editing the file /etc/init/ureadahead.conf:Alt + F2 → gnome-terminal → gksu gedit /etc/init/ureadahead.conf

Then increase the sleep time in the last line: pre-stop exec sleep 45 and go back to 1.


You somehow either messed the permissions or the owner or group up. The latter both should be your user or your user's group respectively.

Open a terminal in your repo or navigate into it. Then execute these commands:

sudo chown -R david .git
sudo chgrp -R david .git

This will make you the owner and your group the group of all the files in the .git folder. Assuming your username is david, of course. If it isn't, change it. Your group has the same name as your user. If you want to apply this to your entire repo, just replace .git by . (a single period).

If this doesn't fix the problem, execute these lines:

find .git -type d -exec chmod 755 {} +
find .git -type f -exec chmod 644 {} +

The first line gives you full permissions for all directories and the second one the permissions to read from and to write to files in .git folder. The first line may print errors, informing you – once more – about insufficient permissions because find can't walk into folders before their permissions have been set properly (if they are set entirely wrong). If this happens, run the first command again (before running the second command) until it doesn't print errors any more. You can of course avoid this by running the first command as root (sudo find .git -type d -exec chmod 755 {} +). Then, it'll run through without errors the first time in any case.

The second command makes all files in the .git folder non-executable. This isn't a problem of you don't use hooks. If you do, you probably want to execute

chmod +x .git/hooks/*

afterwards to give the hooks the execute bits back. If you don't give them those back, your hooks won't be executed any more. Doing this if you don't use hooks does no harm.


How to install kubuntu from Ubuntu and reserve all files in /home folder?

I circumvented that problem by creating a /discworld partition and putting my personal stuff in there.  During a reinstall I MOUNT and not format /discworld. 2 disks I use: a ssd for / and a hdd for /discworld.
My /home is void of anything personal and is part of / and not a separate partition.
You can use How to create partition for data? as a reference and create your own partition (add a volume label!).
You then might need to shrink /home/ and enlarge this partition.
You can use How to resize partitions? as a reference.
Then copy the directories in /home/$USER/ over to this new partition and edit ~.config/user-dirs.dirs to point to the new partition (keep a backup of this file on that partition so you can copy it back when you reinstall again) and if this all works remove the directories in /home/$USER/.
No more issues in the future: Use a live session for reinstalling and during the partition part remove / and /home and MOUNT your data partition (be careful here: pick the correct one; remember the volume label added when you created it).
After installation copy the backup of user-dirs.dirs to ~.config/user-dirs.dirs and press F5 on the desktop to refresh.
extra: also ditch the swap partition. We nowadays use swapfile so we do not need to do anything for that anymore.


Thunderbird: Search to, cc and from in one step

You can right click on a folder, click on "search messages" to open following dialog.

Then, just select "From, to, CC or bcc"... "contains"... and insert the e-mail address.

Maybe you have to enable "Keep messages for this account on this computer".


How to display terminals with commands on startup

To have a terminal command open in a terminal, specify "Terminal=true" in the desktop file, for example:
[Desktop Entry]
Name=Top
Exec=top
Terminal=true
Type=Application

This will open top in your default terminal emulator. Once you quit top, the terminal will close.
If you want to leave the terminal open when the command you run finishes, then you can call bash after it, as in:
Exec=sh -c 'ls ; bash'

This will run the ls command, then give you a terminal prompt.
Place the .desktop file in the .config/autostart folder to have it run automatically when you log in.


Please go with terminal copy command to avoid such issues,

Command can be found in the below URL :
http://linuxcommand.org/lts0050.php#cp


how to make USP pendrive as bootable in ubuntu

Try unetbootin. You can install this using Software Center or Synaptic Package manager.


Ubuntu server LVM mapper problem at boot when plugged a second hard drive

Problem solved! The problem had something to do with how long it takes for the controller hardware to actually respond back with the correct devices. With a delay,

edit the file "/etc/default/grub"
change from: GRUB_CMDLINE_LINUX=""
GRUB_CMDLINE_LINUX="rootdelay=90 nomodeset"

Reference: http://ubuntuforums.org/showthread.php?t=1877789&page=2

thanks


Can cut keep just the first letter after a comma and whitespace?

You've expressed interest in solving this with cut. There should be a way to do it with pipes and some combination of cut, tr, and (maybe) paste. But especially since you're modifying the case of the initial (e.g., the leading "A" in Ashley becomes the trailing "a" in "Austina"), it's easier to use something more verstatile than cut. I suggest a Perl one-liner, which could be this or something like it, depending primarily on what characters you want to allow in names:

perl -wpe 's/^(\w+),\s*(\w).*/$1\L$2/' file

That runs the Perl interpreter, with warnings enabled (-w), reading input line-by-line, executing a script on each line and printing the result (-p), and taking its script from the next command-line argument (-e). The script itself, s/^(\w+),\s*(\w).*/$1\L$2/, which I quote with single quotes so the shell doesn't perform its own expansions on it, consists of a s/pattern/replacement/ expression, which matches its input to pattern and replaces the match with replacement.

In the regular expression, ^(\w+),\s*(\w).*:

^ matches the beginning of a line.
(\w+) matches one or more (+) word characters (\w, see below), and captures them (( )) into the first capture group.
, matches itself literally.
\s* matches zero or more (*) whitespace characters (\s).
(\w) matches exactly one word character (\w, see below), and captures it (( )) into the second capture group.
.*  matches zero or more (*) of any character that may appear on a line (.). In other words, it matches the rest of the line.

Then $1\L$2 causes all the matched text (the whole line, assuming it did match) to be replaced with:

$1, the contents of the first capture group, without modification. This is the field that is intended to contain a person's surname.
\L$2, the contents of the second capture group ($2), converted to lower-case (\L). This is the first character that is intended to contain a person's given name (but made lower-case).

That may well work for you as-is. But:

You may need to modify both occurrences of \w in the pattern, depending on which characters you wish to match in names. \w only matches letters, digits, and the underscore (_). Many names have other characters than this, such as dashes and apostrophes.
There is also the issue of what qualifies as a letter (which applies, albeit sometimes with different solutions, to simpler tools, too). See What is the best way to match only letters in a regex? This is relevant for names that contain accented letters, diacritic marks that attach to letters, and letters in non-Latin alphabets.
Case conversion is a harder problem than it may appear. Not only do different written languages have different letters, they also have different case conversions for some of the same letters.

The other very simple choice in place of \w that I can think of--allowing names to contain anything other than whitespace or a ,--can be achieved by replacing each \w with [^,\S]. The [ ] make a character class, the leading ^ means the class contains all but the specified characters (which is not related to its meaning outside a character class), , specifies itself literally, and \s specifies all whitespace characters.

perl -wpe 's/^([^,\s]+),\s*([^,\s]).*/$1\L$2/' file

For more information on regular expressions in Perl, see perldoc perlretut and perldoc perlre. The problem you've presented is just complex enough to motivate me to use a more sophisticated (and thus more complicated) tool than the basic text processing tools. Since you can probably find a way to do it with those tools, I certainly don't blame you if you do! But I think this may still be helpful for future, even more complex problems.


Pictures and video lenses only search the picture and video folders when searching local filesystems.

It's my understanding they don't follow symlinks same as UbuntuOne <-- could be mistaken on the prior.


This answer is based on the assumption that you are attempting to port forward on the same sub-net and via one network interface, which is unusual.

You have not dealt with the return path properly or used the correct pre and post routing tables. You have to map the returning packet so that it appears to the sender to have come from the original IP address that it sent the request to in the first place. Here is a tested example, but for my LAN:

#!/bin/sh
#
# 1070028_firewall 2018.08.09 Ver:0.01
#       Basic port forwarding on one interface.
#       Note: this method is unusual.
#       Currently for this question:
#       https://askubuntu.com/questions/1070028/why-does-ubuntu-16-forwarding-not-work
#

# The location of the iptables program
#
IPTABLES=/sbin/iptables

# Set some stuff
#
EXTIF="ens5"
UNIVERSE="0.0.0.0/0"
EXTIP="192.168.111.120"

#
echo Enabling forwarding...
echo "1" > /proc/sys/net/ipv4/ip_forward

# Clearing any previous configuration
# and setting policies as per the question

iptables -P INPUT DROP
iptables -F INPUT
iptables -P OUTPUT ACCEPT
iptables -F OUTPUT
iptables -P FORWARD ACCEPT
iptables -F FORWARD
iptables -t nat -F
iptables -X

# Clear the counters

iptables -Z
iptables -t nat -Z

# loopback interfaces are valid.

$IPTABLES -A INPUT -i lo -s $UNIVERSE -d $UNIVERSE -j ACCEPT

# forward path

$IPTABLES -t nat -A PREROUTING -p tcp -i $EXTIF --dport 80 -j DNAT --to 192.168.111.1:80

# with a default policy of ACCEPT, the following rule is not needed.
# shown here for completeness only.

# $IPTABLES -A FORWARD -p tcp -i $EXTIF -d 192.168.111.1 --dport 80 -j ACCEPT

# return path

$IPTABLES -t nat -A POSTROUTING -o $EXTIF -j SNAT --to-source $EXTIP

You should be able to use MASQUERADE instead of SNAT, but I didn't test it.


Try this:
Open a terminal shell.
Update your apt repositories, enter this command:
sudo apt-get update

Install the required dependency packages:
sudo apt-get install --assume-yes libcups2 cups libcups2-dev cups-bsd cups-client libcupsimage2-dev libdbus-1-dev build-essential ghostscript openssl libjpeg62-dev libsnmp-dev libtool libusb-1.0-0-dev wget python-imaging policykit-1 policykit-1-gnome python-qt4 python-qt4-dbus python-dbus python-gobject python-dev python-notify python python-reportlab libsane libsane-dev sane-utils xsane

Download the HPLIP tarball to your /home/user/Downloads directory:
https://sourceforge.net/projects/hplip/files/hplip/3.20.9/hplip-3.20.9.tar.gz/download

Go to the directory where you downloaded the HPLIP tarball:
cd ~/home/user/Downloads

Uncompress the tarball, enter this command:
tar xvfz hplip-3.20.9.tar.gz

This will create a directory with the same name as the tarball file.
Change your working directory to the hplip-3.20.9 directory.
cd hplip-3.20.9

Configure the development environment and checks that your system is ready to install HPLIP:
./configure --with-hpppddir=/usr/share/ppd/HP --libdir=/usr/lib64 --prefix=/usr --enable-udev-acl-rules --enable-qt4 --disable-libusb01_build --enable-doc-build --disable-cups-ppd-install --disable-foomatic-drv-install --disable-foomatic-ppd-install --disable-hpijs-install --disable-udev_sysfs_rules --disable-policykit --enable-cups-drv-install --enable-hpcups-install --enable-network-build --enable-dbus-build --enable-scan-build --enable-fax-build

Compile the HPLIP source, enter this command:
make

Run make install, enter this command:
sudo make install

Add user name to "lp" group:
sudo usermod -a -G lp $USER

Restart your PC (or) Logout and Login.
f you are going to be setting up a printer with USB and the printer is already plugged in, you will need to do one of the following:
Unlpug and re-plug in the USB printer, or Restart your PC.
Failure to do this will cause your USB printer to not be detected by HPLIP.
Continue using hp-setup:
sudo hp-setup

The first step is to select the printer connection type.
Next the setup tool will display printers detected (depending on the connection type selected)
The PPD files (drivers) which are most similar to your printer are displayed. Select the appropriate PPD file for your printer.
Enter your printer information.
Click FINISH to complete the printer setup process.


Can evince be configured to suggest last used folder when using "save as" from a downloaded document?

It seems that the only solution to this problem is a modified source and recompiled application. I have created a version with an additional command line parameter (--documents-dir) that enables the user to specify the default save as directory. For details, see this post.
I have also created binary packages for 20.04, which are available from my PPA:
sudo add-apt-repository ppa:laczik/ppa
sudo apt-get update
sudo apt upgrade atril


How do I change the cursor type when using the Ubuntu app on Windows 10?

I don't believe Windows Subsystem for Linux supports changing the cursor in the default terminal. If you want to use a different cursor type, or a more advanced terminal, you need to replace it.

I believe that https://github.com/goreliu/wsl-terminal would be the easiest way of getting a new terminal for WSL. It runs mintty internally which does support a different cursor style. If you do not wish to install it, you should be able to install the mintty wsl terminal directly with https://github.com/mintty/wsltty


The second post above is correct. If you hit the SuperKey and in the search bar of the Unity Dash type in: gnome-control-center or just the word: keyboard, an Icon labeled Keyboard will appear. Click on that, and switch to the second tab, in order to add and view existing shortcuts.


Installing Ubuntu 20.04 (server) as software RAID with three disks

As far as I know the size of every disk for the RAID 5 must be the same. You could try to create three partitions with the same size, one on each of the three disks. Also you need to create a boot partition on one of the disk. Here is a similar question with a more detail answer https://askubuntu.com/a/46854/535645
I guess your aren't so familiar with RAID so I would recommend to create a RAID 1 with 4 (or 2) disks and the 5th (or 3rd) disk is for the boot partition. This makes the handling a lot easier in cases a disk fails/needs to be replaced.


Bash Files - /etc/profile vs ~/.bash_profile file

When bash is invoked as an interactive login shell, or as a  non-inter‐
   active  shell with the --login option, it first reads and executes com‐
   mands from the file /etc/profile, if that file exists.   After  reading
   that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile,
   in that order, and reads and executes commands from the first one  that
   exists  and  is  readable.  The --noprofile option may be used when the
   shell is started to inhibit this behavior.

This was taken verbatim from man bash. Man is your friend :)


Error when running apt-get - broken packages

try to use the following commands on your terminal

sudo apt-get --fix-broken
 sudo apt-get --build-dep
 sudo apt-get check


Trying to understand what xwd:- does in convert xwd:-

What do the xwd:- and txt:- do? Can you give a link to more
  information on this bash syntax?

Just to clarify, that is not bash syntax.  Those are part of convert's syntax.

xwd:- tells convert to get its input from stdin, where - means stdin, and expect the input to be in xwd format.

txt:- tells convert to send its output to stdout, where - means stdout, and to send the output in txt format.

More detail

xwd -silent

This captures an X window as an image and sends that output to stdout in XWD format.  By default, xwd rings bells when the window capture starts and ends.  -silent tells it to be quiet.
convert xwd:- -depth 8 -crop "1x1+$X+$Y" txt:-

This uses the ImageMagick's convert utility.  xwd:- tells it to accept an XWD format image on stdin.  -depth 8 tells it to convert the image to depth 8.  -crop "1x1+$X+$Y" tells it to crop the image to a single pixel at location X and Y.  txt:- tells it to send information about that pixel in text form to stdout.

To understand txt output, let's look at an example.  Here is the output from cropping an image to a 2 pixel by 2 pixel size:

$ xwd -silent | convert xwd:- -depth 8 -crop "2x2+200+200" txt:-
# ImageMagick pixel enumeration: 2,2,255,srgb
0,0: (255,255,255)  #FFFFFF  white
1,0: (255,255,255)  #FFFFFF  white
0,1: (255,255,255)  #FFFFFF  white
1,1: (255,255,255)  #FFFFFF  white

As you can see, each pixel is identified by its location in the cropped image, its RGB color in two formats, and, when available,  the common name of color.

More examples

A jpeg file can be converted to png using a similar syntax:

cat out.jpg | convert jpg:- png:- >out.png

Of course, in thus simple example, the pipeline is superfluous.  The above can be simplified to:

convert jpg:out.jpg png:out.png

Further, if the file format is not specified, convert will guess it from the file extensions.  So, for files with recognizable file extensions, the following also works:

convert out.jpg out.png

Documentation

Running convert without arguments produces a help message.  At the end of the help message is an explanation of the meaning of xwd:- and txt:-:

  By default, the image format of `file' is determined by its magic
  number.  To specify a particular image format, precede the filename
  with an image format name and a colon (i.e. ps:image) or specify the
  image type as the filename suffix (i.e. image.ps).  Specify 'file' as
  '-' for standard input or output.


Suspended mode is not working correctly on Ubuntu 12.04 LTS

You can refer this ubuntuforum thread:

Ubuntu 12.04 LTS Suspend not working FIX by DragonNinja9


To disable bluetooth service on startup

sudo nano /etc/rc.local

add this line before exit 0

rfkill block bluetooth


Reverse Firewall or Application Firewalls?

AppArmor

AppArmor is a Linux Security Module implementation of name-based access controls. AppArmor confines individual programs to a set of listed files and posix 1003.1e draft capabilities.

below link.

https://help.ubuntu.com/community/AppArmor


How to pass a terminal-title to a terminal opened via desktop shortcut (.desktop)?

Simplest solution I can think of based on my previous answers, would be to spawn terminal with command that sets title  + spawns interactive shell of your choice. Specifically, I would make the Exec= part of the .desktop file as so:

Exec=gnome-terminal -e "bash -c 'printf \"\033]0;TEST1\007\";bash'"


Ubuntu won't accept files over bluetooth, i have tried changing settings in personal file sharing

One package that isn't listed in your linked thread is obexftp and you can install with
sudo apt-get install obexftp

Then see if your bluetooth transfers work

The obexftp package provides object exchange file transfer protocol which is needed for bluetooth and other file transfers.


How to Force send 802.11 probe request manually for linux stations

If you ask your wireless interface to do the AP scanning, then you basically send probe request. You can do it using iw <wlan_interface> scan.


Need to repair or reinstall Ubuntu 12.04 without losing programs or data

First, you should really have a backup of your personal data, because harddisks are crashing all the time.

Second, I would recommend a complete reinstallation, because getting to the bottom of your problems is quite hard to accomplish.

To make things not too hard you can remember all the packages you installed via apt/dpkg by using

$ dpkg --get-selections "*" > package.list

then save that file somewhere save, reinstall, and restore the package selection.

$ sudo dpkg --set-selections < package.list
$ sudo apt-get -u dselect-upgrade

The restore your the data you backuped before and you should be good to go.


For some reason, when installing Ubuntu from a USB, the default GRUB destination chosen by the installer (on the partitioning page) is /dev/sdb (the USB disk). This happens to me every single time.

That means that you haven't actually installed GRUB to your hard disk, eventually ending up with no choice but windows every time you boot. You had to switch the destination to /dev/sda (which is your primary hard disk).

Now, you can try re-installing Ubuntu and choose to install GRUB on /dev/sda, or repair GRUB by referring to the link that Avinash Raj mentioned in a comment on your question.

Edit: Check this link too. It has instructions on how to install GRUB from a Live CD/USB (thanks to samgabbay).

Regards.


How do I enable Integrated Graphics on my laptop?

I have the same issue mate. The only fix is this (Since AMD hasnt released OC GPU drivers yet on 16.04 and in 16.10): Ubuntu 14.04.5/16.04/16.10 and AMD graphics

I still havent fixed it yet, trying to downgrade my XORG. You may want to try the other options before downgrading to 14.04.5 (It still has LTS till 2019)

I consider 14.04.5 as a last shot. I am not sure how are we (You and I) suppose to make Oibaf's drivers work or even install them. Since you have an AMD GPU (Not sure if it is supported in AMDGPU-Pro method in the main link) you may want to try that. So head over to: http://support.amd.com/en-us/kb-articles/Pages/AMD-Radeon-GPU-PRO-Linux-Beta-Driver%E2%80%93Release-Notes.aspx and see if your GPU is supported for AMDGPU-Pro.

I believe you can set the power profile low in AMD via amdconfig --intial and configure more stuff from there. I havent tried it yet cause I am still trying to get my GPU to work so I can game myself.

Good luck and I will keep you updated as I try; and I hope you will do the same as we both try to help each other out.


Nginx run's as the user www-data. /home/dev/Dropbox/www/index.php is owned by user dev and in group dev,which both has read and write access. Others only have read access. No one has execute rights to the file.

Running chmod +x /home/dev/Dropbox/www/index.php should set execute rights for both owner, group and others .. you will see access rights like -rwxrwxr-x if you do a ls -l on the file again.

Also you might have to configure nginx to allow it to use /home/dev/Dropbox/www/ for data directory.


3G EVDO USB modem speed limited on Ubuntu 14.04

I tried this method for my BSNL EVDO (PRITHIVI UE100):
First connect the device to your laptop/PC.
Run the command

ls /dev/tty*

There should be a device ls /dev/ttyACM0 (or a name similar to that)
To verify, remove the device and run ls /dev/tty* again to check that device has vanished :)

Now you need a nifty program called 'wvdial'
install it using

sudo apt-get install wvdial

After wvdial has been installed we need to provide a configuration file for wvdial. Create one using

sudo gedit /etc/wvdial.conf

Enter the following data into the file

[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = Analog Modem
Baud = 460800
Modem = /dev/ttyACM0
ISDN = 0
Phone = #777
Password = xxxxxxxxxx
Username = xxxxxxxxxx
Stupid Mode = 1

If your username and password are the mobile numbers (then replace xxxxxxxxxx with your device mobile number with prefix-91 for example 91xxxxxxxxxx)

If you don't  know username and password, or the above do not work then you can use this ... (I have used it)

[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = Analog Modem
Baud = 460800
Modem = /dev/ttyACM0
ISDN = 0
Phone = #777
Password = 165
Username = 165
Stupid Mode = 1

Now run this command (2-3 minutes after you have plugged in the device) to ensure this is working

sudo wvdial

It should show some DNS servers, (your notification area won't show any connected network) . Open browser and see if pages load. If it does, and I believe it will, then it's good to go.
Now if you are a geek you can just enter sudo wvdial every time to connect, but for people you prefer the comfort of mouse clicks you have some more jobs left to do.

sudo gedit /usr/bin/bsnl

enter this data into that file

gksudo wvdial

Now we need to set execution permissions to the file

sudo chmod 777 /usr/bin/bsnl

Now we will create a desktop shortcut.

gedit ~/Desktop/BSNL.desktop

and enter this data into the file

 [Desktop Entry]
Name=BSNL EVDO Connection
Exec=bsnl
Type=Application
StartupNotify=false
Icon=package_network

and make it executable

chmod 777 ~/Desktop/BSNL.desktop

Now everytime you plug in the device, wait for 1-2 minutes, then double click the brand new icon on your desktop, and woot!! you are online :)

cheers


Ubuntu Server 20.10 - virtual interfaces in netplan

"Virtual interface" can refer to a variety of different technologies.  Normally, containers are attached to a bridge.  You can create bridges in netplan, using syntax such as:
network:
  version: 2
  bridges:
    dockernet:
      addresses: [10.1.1.1/24]


How do i work with filenames with whitespaces in linux script?

You can simply surround your variable ($i) with double quotes:

#!/bin/bash
for i in *
do
    cat "$i"
done

See also:

When to wrap quotes around a shell variable?


how to run ".desktop" file from bash script

You have to install gtk-launch command with
sudo apt-get install libgtk-3-bin

and then run the desktop file with it:
gtk-launch something.desktop


The reason for connection refused is simple - the port 9000 is NOT being used (not open).

Use the command => lsof -i :9000 to see what app is using the port. If the result is empty (return value 1) then it is not open.

You can even test further with netcat.

List on port 9000 in terminal session 1

nc -l -p 9000

In another session, connect to it

$ lsof -i :9000
COMMAND   PID  USER   FD   TYPE  DEVICE SIZE/OFF NODE NAME
nc      12679 terry    3u  IPv4 7518676      0t0  TCP *:9000 (LISTEN)
$ nc -vz localhost 9000
Connection to localhost 9000 port [tcp/*] succeeded!

So you need to fix your hadoop settings and make sure all necessary daemons/services are started properly before you can connect to use HDFS.

  NOTE: This is NOT telnet nor iptables issue, it's basically TCP/IP basics. Please change the question to sth like "connecting to port 9000 issue".

Update

i need 9000 port for hadoop; I can't access fs without opened 9000 port so base on the context my understanding is that HDFS's namenode is supposed to use port 9000. So check your Hadoop/HDFS configuration files and get the services started.

iptables is irrelevant at this stage because the port is NOT used at all.

You can run iptables -L -vn to make sure there is no rules in effected. You can flush the filter table INPUT chain to make sure sudo iptables -P INPUT ACCEPT && sudo iptables -F -t filter


Problem with nVidia drivers (how do I apply a patch)?

The file you need to patch is stored in /usr/src/nvidia-??/nv-acpi.c (in my system with nvidia-331 the path is /usr/src/nvidia-331-331.38/nv-acpi.c). The driver per se is closed source but this file belongs to the driver/kernel interaction.

As you have both 304 and 304-updates, make sure you patch the one Bumblebee uses (in doubt patch both).

Then to rebuild kernel modules run

$ sudo dpkg-reconfigure nvidia-304
$ sudo dpkg-reconfigure nvidia-304-updates

As you can guess this is just a temporary fix. If you update any of those packages your changes go away. To avoid that block the update of those packages.


I had a similar problem when trying to boot from a live USB (with 14.04) on a new machine that has Win8 installed. I changed the boot settings to legacy mode (non-uefi, non-secure), which solved the problem.


Applications I download stay in Downloads, unlike software installed via APT. How do I correctly install downloaded applications?

For me, I look on the official websites or Github repositories to see if they offer any installation instructions. Most times they do.

I've found that most of the ones which come in archive folders as you'd described seem to run directly (such as FreeFileSync) so it's just a matter of finding somewhere neat to store it.

I'm not sure if this is the 'correct' way, but for me I look for the /opt folder of my system and drop those types of ones into there. (NOTE: This would need to be done via the terminal because /opt is only available to root by default.)

Hope that helps, and I hope I'm not leading you astray!


This line should do the trick. Tested on Ubuntu 18.04

sudo systemctl enable tomcat

Source: digitalocean


Software updater msg: "Failed to download repository information" Ubuntu 19.10

Open terminal and find out what is going on there by executing:

sudo apt-get update

Most probably you'll find out something like this:

W: Failed to fetch http://...
E: Some index files failed to download. They have been ignored, or old ones used instead.

Then open Software & Updates app, go to Other Software tab and disable faulty repository.

Then close and open it again to be sure this error message disappears.


Stream radio and get stream title from Ubuntu server

You should check if those are Icecast 2.4 or newer, then you can just access their JSON API: https://stackoverflow.com/a/26924141/2648865

Some other options are listed here: https://stackoverflow.com/q/26817214/2648865


How do I launch windows if I have installed Ubuntu?

Install Boot-Repair on ubuntu by following steps

Open the terminal and run the following commands

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install boot-repair

After completing the installation you can launch it from System->Administration->Boot-Repair menu if you use Gnome, or search "boot-repair" in the dash if you use Unity. Then follow the following screenshots:

Method 1

Click on the advanced options

Tick the options shown below

Change the tab to Grub Location Tab and Tick The options Shown in the figure

Press Apply and Reboot the system

Method 2

Select the recommended Boot repair options as shown in the first screenshot


How to install Ubuntu with usb stick while using ubuntu 9.04 as current opperating system? What program do I use to open the download?

The program you need is "startup disk creator".  You should find it under the menu system:

-System
    -Administration
        -Startup disk creator

You will need a FAT formatted USB stick and the ISO of the release you want.  12.04 is an LTS release that is supported until 2017.  12.10 is the current stable release supported until April 2014.

I recommend you check the md5sum for the ISO file you download and burn it at the slowest possible speed.


Upgrading 12.04 to 14.04 beta directly (without the intermediate 12.10 release)

Looks like it checks for the next release, instead of the next lts release. You may need to edit /etc/update-manager/release-upgrades and set Prompt=lts.

To open the file for editing, run sudo nano /etc/update-manager/release-upgrades, after editing, pess ctrl-o to save, ctrl-x to exit.

Also make sure you have update-manager-core installed with sudo apt-get install update-manager-core

info source


You would be better off with more than one machine, rather than finding one machine that can handle nine VMs simultaneously and render GIMP images, etc. Finding one single machine that could handle that workload would cost more than several 'normal' machines to spread out the workload. Here is the website for Ubuntu Certified hardware. Forget about laptops unless you really need one for travel. You are looking at multiple fairly expensive machines for that list of specs.


How to make .tcl file directly executable from Launcher

Here is the complete process of what I ended up doing;

$ sudo apt-get install gksu
$ cd /usr/share/applications
$ gksudo gedit ApE.desktop

Then I made the following .desktop file

[Desktop Entry]
Type=Application
Name=ApE
Icon=/home/justin/ApE/ApE.png
Exec=/home/justin/ApE/AppMain.tcl %f
Version=1.0
Comment=A Plasmid Editor
GenericName=Plamid Editor
Terminal=false
X-MultipleArgs=false
Categories=Utility;
StartupWMClass=ApE
StartupNotify=true

From there, I needed to modify the .tcl file by adding the following shebang to that script;

#!/usr/bin/tclsh

Then I made the .tcl script executable;

$ cd /home/justin/ApE
$ chmod +x AppMain.tcl

Then I validated and installed the .desktop with the following commands;

$ cd /usr/share/applications
$ desktop-file-validate ApE.desktop
$ desktop-file-install ApE.desktop

The desktop-file-install command added the following line to the .desktop file;

X-Desktop-File-Install-Version=0.22

Then I needed to do a simple drag-and-drop of the ApE icon in the /usr/share/applications directory to the Unity Launcher, and there it was.

However, while this placed the ApE icon in the launcher, whenever I clicked the ApE icon, it created a question mark icon in the launcher to represent the open window.  To alleviate this, I needed to make the StartupWMClass values in agreement.  So back in terminal, I ran the following command;

$ xprop WM_CLASS

and then clicked on the open ApE window, which returned the following output;

WM_CLASS(STRING) = "dna_window18", "Toplevel"

So I went back into the ApE.desktop file;

$ cd /usr/share/applications
$ gksudo gedit ApE.desktop

and changed the StartupWMClass value to Toplevel, giving a final ApE.desktop file of

[Desktop Entry]
Type=Application
Name=ApE
Icon=/home/justin/ApE/ApE.png
Exec=/home/justin/ApE/AppMain.tcl %f
Version=1.0
Comment=A Plasmid Editor
GenericName=Plamid Editor
Terminal=false
X-MultipleArgs=false
Categories=Utility;
StartupWMClass=Toplevel
StartupNotify=true
X-Desktop-File-Install-Version=0.22

And that fixed it completely.


libappindicator1 may be the answer but in many cases it isn't.

The following has been submitted to www.dropbox.com as a bug but linux users don't appear to be a high priority.

In dropbox's preferences, if you check Start Dropbox on system startup, the daemon will start and dropbox will be working in the background, but the icon will not appear.  This is apparently because the dropbox autostart config file ~/.config/autostart/dropbox.desktop insists on setting a startup delay of zero but displaying the icon requires some other process to be running already... and in many cases it is not, especially when a number of other startup applications are starting up / running.

In Ubuntu's System Settings/Startup Applications, if you set the startup delay  for dropbox to 10 seconds or more, the process works properly and the icon appears... once. Then dropbox resets its startup file ~/.config/autostart/dropbox.desktop back to a delay of zero and the problem returns.

Workaround: uncheck the dropbox's preference Start Dropbox on system startup, write a short script that starts dropbox, add the script to Startup Applications and set the delay to 10 seconds or more as needed by the Ubuntu distro and by other startup settings.

Permanent fix: dropbox should stop rewriting the delay in the autostart file ~/.config/autostart/dropbox.desktop or make the delay a preference.

Sample script:

 #!/bin/bash
 dropbox stop  #because the actual daemon usually IS running
 dropbox start
 exit

Save it as something like fix-dropbox-icon.sh. Remember to make it executable in the permissions.__

Unrelated point of interest. After doing this I reviewed my Startup Applications list and changed everything that I don't consider immediately vital for a startup delay of 30 seconds or more. Now my Ubuntu startup is MUCH faster. Of course I have a lot of stuff there. Your results may differ.


Is it possible to access the initrd file system after boot?

from the linux kernel documentation under the linux/Documentation/initrd.txt:

  noinitrd

    initrd data is preserved but it is not converted to a RAM disk and
    the "normal" root file system is mounted. initrd data can be read
    from /dev/initrd. Note that the data in initrd can have any structure
    in this case and doesn't necessarily have to be a file system image.
    This option is used mainly for debugging.

    Note: /dev/initrd is read-only and it can only be used once. As soon
    as the last process has closed it, all data is freed and /dev/initrd
    can't be opened anymore.

that is, if you specify the noinitrd in your boot options, supposedly you can access the original initrd at the /initrd mountpoint after pivot_root switches to the "real" root, with the caveats noted above. I played with this maybe 2 decades ago, and don't know if it still works.


Using nano for logfiles is not recommended as it loads the whole file into the memory. Use less:

less /var/log/lighttpd/website/error.log

Press F to get the effect from tail -f.


Working with printers in Ubuntu with the Unity desktop

In 11.04, you can open system settings from the power-button in the upper-right corner. You'll find printers under Hardware and it'll display a list of printers. Double click it to show the queue.

In 11.10, we have a Printers item in the power-menu as a shortcut. The dialog itself has not changed.


How to verify that unattended-upgrades are enabled?

cat /etc/apt/apt.conf.d/20auto-upgrades

shows if things get auto-installed

cat /etc/apt/apt.conf.d/50unattended-upgrades |grep -v //

This will show you what gets automatically installed. And by default it should install the security ones.
There are other files there depending on which system exactly you are running so cat your way around them maybe.


how to trace errors and crashes in Ubuntu itself?

One possible solution is looking  at Ubuntu log files after each crash and examine that whether new logs are added or Not.

All major logs in Ubuntu are in /var/log path, for example:

/var/log/auth.log -  Authentication logs - including sudo/su activity

/var/log/boot.log - Logs of booting process

/var/log/crond.log - Logs for cron daemon

/var/log/messages - Typical dumping point for messages not regarding the system

/var/log/user.log - Logs of all userlevels

/var/log/syslog - Logs from Different softwares and is a "general log"

/var/log/kern.log - Information being logged from the kernel

Beside above logs, there is a Troubleshooting guide here.

Also there are some tracers that may be helpful such as apport-retrace.


how to remove squid to work as nat that already configured in ubuntu?

With sudo iptables -t nat --line-numbers -L you should see something like this:

Chain PREROUTING (policy ACCEPT)
num  target     prot opt source               destination
1    REDIRECT   tcp  --  anywhere             anywhere             tcp dpt:http redir ports 3128

Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination

Chain POSTROUTING (policy ACCEPT)
num  target     prot opt source               destination

Remove the PREROUTING rule(s) affecting port 3128:

sudo iptables -t nat --line-numbers -L | tac | \
    awk '/redir ports 3128/ {system("sudo iptables -t nat -D PREROUTING "$1)}'

Now check the rules again:

% sudo iptables -t nat --line-numbers -L
Chain PREROUTING (policy ACCEPT)
num  target     prot opt source               destination

Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination

Chain POSTROUTING (policy ACCEPT)
num  target     prot opt source               destination

Explanation

iptables -vt nat -L lists the needed rules

% sudo iptables -vt nat -L
Chain PREROUTING (policy ACCEPT 11 packets, 1957 bytes)
 pkts bytes target     prot opt in     out     source               destination
    0     0 REDIRECT   tcp  --  eth0   any     anywhere             anywhere             tcp dpt:http redir ports 3128

Chain INPUT (policy ACCEPT 2 packets, 194 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain OUTPUT (policy ACCEPT 152 packets, 14386 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain POSTROUTING (policy ACCEPT 152 packets, 14386 bytes)
 pkts bytes target     prot opt in     out     source               destination

And we need the rules for port 3128 in reverse order, if you have more than one, and the line-numbers

% sudo iptables -t nat --line-numbers -L | tac | awk '/redir ports 3128/'
1    REDIRECT   tcp  --  anywhere             anywhere             tcp dpt:http redir ports 3128

a little bit awk magic deletes the rules line by line

awk '/redir ports 3128/ {system("sudo iptables -t nat -D PREROUTING "$1)}'


Ubuntu 16.04 freezes before login screen

There are many reasons and solutions for this.

1) Removing quiet splash

When you are on the grub menu (the menu which you select what OS to boot), make sure that your selection is on "Ubuntu" and press E. You'll see a line like this one:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

And remove "quiet splash". To save grub like this, press F10.

2) nomodeset

If the first one doesn't work, after deleting "quiet splash", add "nomodeset" in their place. If this works, it also means that you probably have nvidia GPU or Dual GPU.


Why was F-Spot replaced with Shotwell in Ubuntu 10.10?

The specification for this decision is here

Here (Sorry, this show has been removed from Blip.) is a video clip where we discussed Shotwell (and other apps) at the Ubuntu Developer Summit.


You do not have a while loop your script for your Yes / No asking.  I have added one to the bottom so that the script can loop until the answer is N or n.  I am "guessing" that you are after something like this:

#!/bin/bash
# this program random numbers between 1 and 100.
clear
echo "Hello, "${USER}
date;
guess=1
## Start loop of game here
while true; do
n1=$(( ( RANDOM % 100 ) +1 ))
echo -n "I'm think of a number between 1 and 100. Guess: "

while read n2; do
    if [[ $n2 -eq $n1 ]]; then
        break;
    else
        if [[ $n2 -gt $n1 ]]; then
            echo -n "Sorry, your guess is too high. Guess again: "
        elif [[ $n2 -lt $n1 ]]; then
            echo -n "Sorry, your guess is too low. Guess again: "
        fi
    fi
    guess=$(( $guess + 1 ))
done
echo
echo "Congratulations! You win!"
if [[ $guess == 1 ]]; then
    echo "It took you $guess guess to get $n1."
else
    echo "It took you $guess guesses to get $n1."
fi
echo

read -p "Do you want to try again (y/n)? " choice
case $choice in
    [Yy]* ) guess=1;;
    [Nn]* ) exit;;
    * ) echo "Please answer yes or no.";;
esac
## End loop of game here
done

Example:

$ ./guess.bsh
Hello, terrance
Thu Jan 10 13:27:39 MST 2019
I'm think of a number between 1 and 100. Guess: 75
Sorry, your guess is too high. Guess again: 50
Sorry, your guess is too high. Guess again: 25
Sorry, your guess is too high. Guess again: 10

Congratulations! You win!
It took you 4 guesses to guess 10.

Do you want to try again (y/n)? n


Update VirtualBox to install Extension Pack

Virtual Box provides old builds as well as the corresponding extension pack on the Download_Old_Builds page. Specifically you should check the Download_Old_Builds_4_3 page.

You can use this direct link for version 4.3.10: http://download.virtualbox.org/virtualbox/4.3.10/Oracle_VM_VirtualBox_Extension_Pack-4.3.10-93012.vbox-extpack


How to drag and move icons in the Gnome-shell favourites bar?

Click with the left mouse button, drag a bit to the right, find the spot you want to rearrange it to and leave the mouse button

Dont mind the blue, its caused by the screencast tool


How to use a C program to run a command on terminal?

you could use the system() function available in stdlib.h to run commands.

  DESCRIPTION

  system() executes a command specified in string by calling /bin/sh -c
  string, and returns after the command has been completed. During
  execution of the command, SIGCHLD will be blocked, and SIGINT and
  SIGQUIT will be ignored.

You could read more about it over here http://linux.about.com/library/cmd/blcmdl3_system.htm


How to combine partition created by failed Ubuntu installation with that created by a subsequent installation

Run gparted from a live cd.
Delete the partition you do not want.
Resize the other partition to take up all of the available free
space.
Reinstall grub (unless you have /boot on the first disk partition)
Reboot


How do I focus on the status bar with keyboard in Ubuntu 11.10?

Assuming you are using Unity, press Alt-F10. That will put the focus on the statusbar.

Now move with arrow keys.


WUBI is pretty safe: it creates one file on the Windows disk, and new boot menu entries, but doesn't change partitions.  You should always be able to boot back to Windows, and an abrupt shut down might corrupt the Linux filesystem but nothing outside of that.

Nothing in life is entirely without risk.  You should, as always, have backups.

The main kind of risk that Wubi mitigates is needing to repartition, or reinstall, or to install a new boot sector.  Those aren't very risky, but they can be hard to undo if you   instruct the installer to do the wrong thing (eg to delete Windows) or if you change your mind.


Ubuntu 12.04 wlan not running (Intel Corporation Centrino Advanced-N 6235 (rev 24))

I tried to disable N as that cause issues in iwlwifi
sudo modprobe iwlwifi 11n_disable=1
But the best result I could get so far was to install ndiswrapper and the windoss driver trough it.


Nautilus crashes when accessing some folders

Removing nautilus-open-terminal fixed it for me. None of the Ubuntu One client stuff above helped for me, but removing nautilus-open-terminal definitely did. Nautilus now opens, and it seems to open slightly quicker.

With nautilus-open-terminal installed, if I launched nautilus from terminal, I would get a number of segmentation faults, and nautilus would either not open, or it would open then close after browsing a few folders.

After reading a comment in that forum BruceBerry mentioned above, about removing nautilus-open-terminal, the terminal now can just open nautilus with absolutely no error messages and I have Ubuntu One file syncing just fine.


Will a Ubuntu LiveCD be affected by a BIOS virus?

... If the PC has a BIOS virus ...

Which virus is in the BIOS of that PC?

The answer depends on that data. Some viruses do affect the content of the OS in RAM, some don't.

However, if it's a Live CD, it's permanently closed to further writing, and the virus could not alter what's on the LiveCD.


Command not found when trying to set a format for the time command

This is because time is a bash builtin command - and the builtin doesn't support the options you're trying to use.

Try this, use the full path of time to skip the built-in and use the real one:

/usr/bin/time -f "%E" ls -l


Partition for Ubuntu shows as 'unusable'

There are some (free) Windows programs to make logical partitions out of primary ones, see e.g AOMEI, MACRORIT or EaseUS. I never used one of them, so I cannot tell how secure they are. There is also a video tutorial - and many more of them.

If you find one of that useful, run it from windows, then convert the partition after the free space (in your image: sda3) to logical, which will create an extended partition containing the logical partitions sda3and sda4. Try to decrease the size of the last partition (as there are ~100G free), so you have free space in the extended partition - and Ubuntu should present this as possible for installation.

And always be sure to have a valid backup of your valuable data!


No sound Ubuntu 14.04 even after trying posted solutions

In Alsamixer, press F6 and see if you have 2 sound cards , the first one being HDMI : then you can set Pulseaudio to use your second sound card running  pavucontrol (pulseaudio volume control , install if it is not) : in the pavucontrol "output device" tab, activate "set as alternative" , button for the 2nd card (text not sure as i have it in french ) . Restart sounds apps and check.

If no luck, try to run Alsainfo : Copy this command in a terminal and post here the url which will store the result : wget -O alsa-info.sh http://www.alsa-project.org/alsa-info.sh && chmod +x ./alsa-info.sh && ./alsa-info.sh

Of course, also upgrade Ubuntu on your pc


Dual booting Ubuntu & Windows from an encrypted disk

Unfortunately, no, you'll have to decrypt your drive.

As mentioned in the manual for the Symantec software, a special kernel module is installed to allow the system to see and otherwise be aware of the fact that encryption is taking place. Therefore, everything throws an error and boot fails.

Windows is unaffected because it's aware that encryption is going on, and can handle it properly due to the proper drivers being installed and loaded in boot-time.

Apparently, Symantec's tools do support full disk encryption, as per their help. However, the encryption programs must be installed on all operating systems before encryption takes place. You may use either OS to actually run the decryption.

Therefore, to resolve this issue, just decrypt your drive. Then, install the Symantec program (same version) on Linux, and then re-encrypt from either operating system. Both OSes will have the required drivers/modules, and boot should run normally.


FTP access to the files of Guest Machine of VirtualBox from Host Machine

FTP can be a tricky protocol. The control connection is (normally) set up on port. This connection is used for authentication and sending commands to the server. Data transfer happens on a different connection. Normally this is on port 20. What happens is that the client requests data from the server on port 21, then the server opens a connection back to the client on port 20 to transfer the data. This is where a firewall on the machine running the ftp client can get in the way (it may block the incoming connection from the ftp server).

FTP has a passive mode that is supposed to cause the ftp server to transfer data to the client over the control connection instead of opening a new connection for the data transfer. I think the command is PASV, but I have never tried it myself.

I hope this is helpful.


How to install livewallpaper on ubuntu saucy 13.10?

Slidewall is a program that can make a slideshow wallpaper. To install:

sudo add-apt-repository ppa:noobslab/apps
sudo apt-get update
sudo apt-get install slidewall

This application allows you to do that, for more information see this


Stop Screen Dimming After 60 Seconds (MacBook running 12.04)

You could try using caffeine as a temporary fix.
You can install caffeine by running the following command in your terminal (Ctrl+Alt+T)

sudo apt-get install caffeine

To find a fix you could do the following things:

Run the following command in your terminal:

xset -q

If you see the energy saving settings enabled (DPMS is enabled) you'll need to disable it.

You can do that by running:

xset s off
xset s noblank
xset -dpms

This should stop the screen from dimming.
xset -dpms doesn't survive a reboot so you can add the command to either /etc/rc.local or to ~/.xprofile.

If this doesn't work of xset -q shows you that the energy saving options are disabled comment and I'll try the next method I know

check /org/gnome/settings-daemon/plugins/power with dconf-editor to check that idle-dim-time is set to 600 and that the "active" checkbox is checked if this does not work uncheck the "active" checkbox.
if that does not fix your problem you probably have a alternative powersaving program installed and if you can discover what that other program is I might be able to help you.

If you don't have any other energy saving software installed could you check if a live dvd has the same issue? If it doesn't you are most definitely running some energy saving option that doesn't come out of the box. If it does have the same issue, there is only one thing I can think of that might work.


Ubuntu 20.04 Desktop Migration From 120GB SSD To RAID1 (software) 1TB SSD Not Booting

After much research and help from the folks on the Freenode #Ubuntu IRC channel I have an answer.  I ended up re-installing due to all the research and failed attempts.  I've shared my process below.  For those who will use this to migrate to RAID use rsync -avP --numeric-ids --delete-during /path/from/ /path/to/ for cloning your installed operating system and data (documents, videos, photos, etc.)
I've treated this as many single board computers requiring a microsd card to boot.  I setup the /boot/efi partition on a mSATA with a USB adapter I'll Velcro to my computer case.
To make this work I booted the live media and accessed terminal ( CTRL ALT T ) used cfdisk to create the Linux RAID partitions on each SSD drives for the RAID
sudo cfdisk /dev/sdLETTER
"Select Tabel Type": gpt
[New]
Partition size: ###G
[Type] Find Linux RAID
[Write] "Are you sure you want to write the partition table to disk?" yes
[Quit]
Then eject, unmount or otherwise power off each SSD and reconnect them.  Note what /dev/sdLETTER were assigned using lsblk
Next sudo apt install mdadm and create the RAID1
mdadm --create /dev/md/rootfs /dev/sdLETTER1 /dev/sdLETTER1 --level=1 --raid-devices=2
To monitor the creation of the RAID use: cat /proc/mdstat
When complete format the RAID using mkfs.ext4 -m0 /dev/md/rootfs
While the RAID is being created create create the /boot/efi partition:
Mount the device you will use the /boot/efi partition.  I used a mSATA with USB adapter.
Use lsblk to identify the assigned /dev/sdLETTER.
Create the partition using cfdisk steps above.
As the live media for installing Ubuntu 20.04 don't allow formatting using terminal do so with mkfs.vfat
Once the RAID has been created use the Ubuntu 20.04 live media installation command to install selecting /dev/md127 (or the equivalent /dev/ mount assigned).  Select the /boot/efi partition.  Proceed with the installation.
The final step of the installation where grub boot is created will fail.  I created this manually using:
sudo mount /dev/md127 /mnt
for i in /dev /proc /sys /run; do sudo mount -R $i /mnt$i; done
sudo chroot /mnt
apt install mdadm
mdadm --examine /dev/sda1
grub-install /dev/sdLETTER
update-grub

My grub-install syntax was more complex:
sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi && sudo update-grub


Reporting specific Ubuntu Software Center issues?

Try these steps to install the package:

Get the package name.
Use this command in a terminal, replace package with the name from step 1.

sudo apt-get install 'package'

The package should then be installed.

If these steps worked, it is a Software Center problem, you can report it via the steps in this question: How do I report a bug?.


How to outline a polygonal area and cut it out so the lower layer shows through?

It's pretty simple. The second part of the solution is the same however you create the selection, whether it be a shape selected with the Fuzzy-Selection tool, using the Paths tool, or using the Free-Select tool.

The simplest method to do is to use the Free-Select tool:

and then create the selection.

You can either draw the lines by hand by pressing and holding the left mouse button, or by drawing the lines by clicking to start and then again to finish that line segment. If you use the second method you can also press Ctrl and have the lines snap to angles:

Then, once you complete the selection, all you have to do is make sure the correct layer is selected...

... and press Del, giving you this result:

I hope this helped!


I am not sure if anyone is trying the same thing but I could not get it working with SeaBIOS: The Legacy Boot. I ended up using UEFI and it worked. Just follow the instructions for Intel NUC as it is a similar install.


What are the Graphics capabilities of i915 driver?

If you're looking at the code, and finding support only for 'fill rectangle' and 'image blitting', then that's probably all that's supported. If you need help analysing the code, try asking one of the DirectFB mailing lists.


VLC will play all the above - install it, it works great ;D

sudo apt-get install vlc


Bind is related to DNS configuration to see bind9 file in the path /etc/default/bind9

Run below command:

sudo apt-get install bind9

You can go through the link for exact steps:
How to disable IPv6 in Ubuntu 14.04?


Unable to install Steam ( unmet dependencies )

Do this.

Open up a terminal by pressing Ctrl + Alt + T

and Remove steam by typing in this command

sudo apt-get remove --purge steam

Download and install steam off the site: Run these commands.

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

then install it.

sudo dpkg -i steam_latest.deb

then run steam in terminal

steam

and steam should start. You don't have to start steam by the command line its just for diagnostics.


Which of the two identical hard disks is mounted?

Both are mounted simultaneously.  That is because they are both part of a single RAID1 disk array, which is referenced as /dev/md{0,1,2} for the actual 'partitions' being used for the actual 'devices' which store disk data (for /boot, /, swap space, etc.)

This is a setup where you're using mdadm or such and have the two drives together as part of a software-based RAID1 array.  That's why you see in fdisk -l the "Linux raid autodetect" filesystem type.

The two disks are 'identical' because of the RAID1 restriction on mapped disk space - you'd need two identical disks to get true RAID1, and that's what you have here.  (And though this is not true RAID which is done at the hardware level with RAID controllers, this is a software-driven RAID array that achieves the same type of setup).


Apparently , yes. (Caveat, I have not tried this.)

Enter Developer Mode. Any data on the HP will be deleted, and secure boot is disabled.
If you have not already downloaded Ubuntu 16.04 LTS Desktop (AMD 64 bit), do so and transfer it to a USB stick. This can be done in Developer Mode as well as with another PC.
Boot from the USB device and install Ubuntu.
Update drivers for any devices that are not working. In the video above, fixing the headphone output is shown.

If anyone has done this successfully, please comment!


How can I extend disk space (logical and physical) on Ubuntu 14.04?

Try these steps:

To check if you have some free space: sudo parted
Then run cfdisk to create a new partition (primary or logical), so choose write and then restart your server
Check your new partition: fdisk -l /dev/sda
We suppose that your new partition is sda3, so create the physical volume: pvcreate /dev/sda3
pvdisplay to show the physical volumes
vgextend YOUR_VOLUME_GROUP /dev/sda3 then if you want check it lvdisplay
lvextend -l+100%FREE /dev/YOUR_VOLUME_GROUP/root
resize2fs /dev/mapper/YOUR_VOLUME_GROUP-root

finally check you new space: df -h


How to detect if 32 or 64 bit JDK is installed?

To check, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

java -version

For 64-bit, you'll see 64-bit Server VM instead of Client VM.  See image below:


What was the default font of gEdit on Ubuntu 10.04 (lucid)?

The default gedit font in Ubuntu 10.04 was 'DejaVu Sans Mono', and its size was 10pts.


How to choose grub default OS entry without fixing it to a specific kernel version?

The distribution you booted from when sudo update-grub was last run becomes option 1. Ubuntu on the grub main menu.

When 18.04 isn't the first option, boot into it and run sudo update-grub then it becomes the first option.

Note: If a system update installs a new kernel then update-grub is run as part of the process automatically.


Please open BIOS and see the boot priority.
In boot priority you have selected  a device that is not present in your system. Thats why the error message is appearing. Also you might have connected a portable hard disk or kept cd inside the cd driver and in boot priority that device is set as first boot device.

The problem is with your configuration in BIOS. Its not a problem of ubuntu.


Unfortunately this is not possible. If you have access to Keynote then you can export as .ppt and then import this file into OpenOffice Impress.


There's a relic called ulimit.  For fun enter ulimit -a to see what's going on.

If you bump into any limits try ulimit -f unlimited and give it another go.  More information about this forgotten and mostly unnecessary gem is found in the man page.

Edit:  A bit more information is down this link https://stackoverflow.com/questions/14471564/what-does-ulimit-s-unlimited-do, but you want the file flag, which is -f.

Edit: and that would be sudo ulimit -f unlimited unless you are already root, but you probably knew that.


On your Ubuntu host system, add yourself to the vboxusers group using the following command:

sudo usermod -a -G vboxusers $USER

After that, logout, then login again and start the virtual machine again.

Good luck!


How can I install 2 mysql instances in ubuntu using the generic binaries?

I'm not aware of a way to do that by installing directly on the OS. A different approach might be using docker to run separate containers .
Understanding why you need such a setup can help me provide you with a more detailed answer.
As a starting points, i recommend looking into docker DevilBox.


Try running source /etc/bash.bashrc and then run your program
or
use /bin/sh <your program>
You need some configuration files by default that bash uses. You can try copying these to your current home dir from your previous home dir.


Audio trouble with Ubuntu some common checks

-- If you are using a laptop, your laptop may have a keyboard function to manipulate your sound.
   Check that. Your laptop may have a keyboard control to mute, increase and decrease sound.
-- Please check your sound devices volumes are to a high level double click on the top right loudspeaker icon you will see a mixer
-- Please make common test from menu System->Preferences->Sounds

-- If you have two audio cards - please disable the on board audio card using BIOS setting, please check with this terminal command:

lspci | grep -i audio

-- Please be sure your pc are starting with the generic kernel press ESC at boot when you see the GRUB row then select the "kernel.... - generic" row
-- Please be sure all needed kernel modules are installed to make this check and install them:
  So open a Terminal from the menu Applications->Accessories->Terminal and type:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install linux-ubuntu-modules-$(uname -r)

give your user password when requested, you don't see nothing when you type it, then press enter.

Then reboot your pc.

-- Be sure your user is member of audio group
Then open a Terminal from the menu Applications->Accessories->Terminal and type:

sudo adduser $(who am i | cut -d" " -f 1) audio
sudo chmod 660 /dev/snd/*

give your user password when requested, you don't see nothing when you type it, then press enter.

-- Please try to watch what audio cards are detected on your system please type:
asoundconf list

if more than one sound cards is detected by your system to set the default soundcard

asoundconf set-default-card PARAMETER

change PARAMETER with the name of a one detected sound card

-- Please try to delete making a backup copy of this conf files
mv .asoundrc .asoundrc_old
mv .asoundrc.asoundconf .asoundrc.asoundconf.old
sudo mv /etc/asound.conf /etc/asound.conf.old

Please take a look at this http://ubuntuforums.org/showthread.php?t=205449

-- Please try to discover if there are any process they are keeping the /dev/dsp locked
ps -edalf | grep -i dsp

kill them using this command:

kill -9 number_of_pid

If you microphone seems don't record your voice please open a terminal and type

alsamixer

and press tab to switch in view to [Capture] section, and then pressing space on mic and mic boost aid

If you are using Pulseaudio and you have some sound issue with sound apps please read  http://ubuntuforums.org/showthread.php?p=4928900

Hope this helps


Prevent user from viewing and editing /var/www folders

You may want to use Access Control Lists. They are a more advanced way of handling permissions than the default way. For example, in your case you can use:

setfacl -R -m u:username:--- /var/www

More about:

Ubuntu Access Control Lists
man setfacl


Couldn't make pendrive boot-able using UnetBootin

A couple of things to check:

Is there enough space on the USB drive?
Is the USB drive mounted?

You may want to try reformatting the drive before you attempt running unetbootin beware that this will wipe the USB Drive!:

sudo fdisk /dev/sdx (replace x with whatever the usb drive # is)

Then type d then the ENTER Key This will delete the current partition. If the drive has multiple partitions, you'll need to repeat this step until all partitions are deleted.

Command (m for help): d
Selected partition 1
Partition 1 has been deleted.

Then add a new partition:

Command (m for help): n
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-3915775, default 2048):
Last sector, +sectors or +size{K,M,G,T,P} (2048-3915775, default 3915775):

Created a new partition 1 of type 'Linux' and of size 1.9 GiB.

Then 'w' to write the changes:

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

Then you should be able to use unetbootin to create the bootable USB drive.


How to run an application in headless mode?

If you are on X11, do unset DISPLAY

$ echo $DISPLAY
:0.0
$ xterm  #works
$ unset DISPLAY
$ xterm
xterm: Xt error: Can't open display:
xterm: DISPLAY is not set


How can I install Ubuntu 13.04 + without USB, CD, DVD or Net? (hard drive only)

Update:

It is not a matter of the hardware being unable to run Ubuntu 13.x, but rather because of Sony's overly proprietary BIOS limitations. The solution that I used successfully unfortunately does not qualify as "without network connection", but aside from that, may be useful to others so long as they are able to connect to the internet.

I created a tiny partition on an otherwise blank hard drive to simulate the size of CD-ROM media, and copied Ubuntu's mini.iso to that partition. The Viao Desktop hardware was able to recognize it as executable during boot and from there, install over the net as if it had been booted using a CD-ROM copy of mini.iso.


Will I lose all of my data if I replace Windows with Ubuntu?

No you won't loose your data. Here are the steps you should take:

Let's assume that your C:/ drive is sda1, click on the Change button.

A window will pop up. Here you can set the size of the partition, its type and mount point. Check the box Format the partition, use Ext4 and Mount point: / which means root.


First, I'm going to assume you're using IPv4 with NAT, and not IPv6. (IPv6 makes it easy. In fact, if you had IPv6, it would probably already work for you by default. Actually, it's probably more fair to just say doing stuff without NAT makes it easy, but that's usually not an option on IPv4.)

Assuming your router is using IPv4 NAT, you will need to set up something commonly referred to as port forwarding. It allows you to map a port on your Mikrotik router to be passed on to a server's port.

In essence, you will be setting up a rule that tells the Mikrotik router that if it sees traffic address to it on port X, re-write that traffic on the fly to be addressed to your server's internal IP (usually starts with 10. or 172.16. or 192.168.) address on port Y.

Here's how it's done on a Mikrotik router:
First, go to the IP menu on the left, and then Firewall. Then make sure you are on the NAT tab, and then click the "Add New" button.

You will be taken to a screen like this:

For chain, pick dstnat. Clik the arrow pointing down next to Dst. Address and then enter the address that you can access your Mikrotik router by from the internet. Unless you know you are using UDP ports, click the down arrow next to protocol and leave it at 6 (tcp). For the Dst. Port, again, click the down arrow, and enter the port you want to use on the internet to access your server.

Now scroll down the page:

For action, select dst-nat. Change the "To Address" to the internal IP address of your server (again, this should start with 10. or 172.16. or 192.168.). Change the "To Port" to the port of the service on your server.

Finally, click OK (if you want to leave the page and put the settings in place) or Apply (if you want to put the settings in place and stay on the page to tweak them).

Oh, and if you prefer the command line way, you can do something along the lines of this:

/ip firewall nat add chain=dstnat dst-address=69.69.69.69 protocol=tcp dst-port=5900 \
action=dst-nat to-addresses=192.168.1.101 to-ports=5900

Based of the Mikrotik wiki page on port forwarding.


i am not able to make dual boot in asus s56ca

Windows 8 uses secure boot which makes windows boot-loader unchangable

so it is not possible to boot other os using windows 8 boot loader. If you have installed Ubuntu using wubi (installing installed windows) then you will fail. You will need to install Ubuntu from a bootable media.

If you have installed Ubuntu by booting from USB/CD/DVD then follow these steps.

1.Restart, press Del, F12 or whatever key that takes you to BIOS settings, once you get into it search and disable secure boot option , save changes and restart.

2.Boot from Ubuntu  USB/DVD into desktop.

3.Open terminal via ctrl+alt+t andtype these commands.

sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update

then

sudo apt-get install -y boot-repair

finally launch boot repair

sudo boot-repair

I hope it helps.


You definitely want Calibre.  You can use it to convert virtually any file type to any other file type, as long as the source file doesn't have DRM (like Amazon, Adobe, etc.).  If it does have DRM, check out Apprentice Alf's blog for help stripping it out with Calibre plugins.  Don't use the DRM stripper to pirate books or otherwise violate your agreement with the vendor.  Use it so you can enjoy your books on any device in any format.

Calibre is also an awesome e-book management program that can do virtually everything.  It can manage Kindles, Android phones/tablets, etc.  It can even email your books with one click to your Kindle's email address if you want.  You won't be disappointed :-)

From a terminal:

sudo apt-get install calibre

Or search for it in Ubuntu Software Center

To actually convert the EPUB file you can use the following command:

ebook-convert file.epub file.pdf (For details, check this other answer)

Or you can check the details for the conversion dialog using the Calibre GUI.


Unable to install wubi on windows 7 home premium 64bit

It appears that you are behind a proxy web server that requires authentication. Wubi is trying to download the Ubuntu image file and failing.

See this old discussion on HTTP Proxy for wubi. Also see Wubi "could not retrieve the required disk image".

One solution is to download the image manually and then tell wubi where to look for it.

Even though you plan to put Ubuntu in its own partition, Wubi will use a virtual partiton , a big file called root.disk to install the operating system and all the user data. Because of this, compared with a regular installation, a Wubi installation faces some limitations.

In the Wubi installation the filesystem is more vulnerable to hard
reboots. Also, if the Windows drive is unmounted uncleanly (most
commonly because of a Windows crash), Ubuntu will not be able to
mount the Windows drive and boot until Windows has successfully
booted and shut down. If the Windows system cannot be booted after
the crash, the user also cannot boot Ubuntu.
Performance related to hard-disk access is also slightly slower,
more so if the disk image file is fragmented, on a Wubi install
compared to a normal one.

See more at: What's the difference between Wubi and a regular "alongside Windows" installation?

Alternate Suggestion:

Since you have already created a partition for Ubuntu, it will be ideal to do a proper (not wubi) installation of Ubuntu in its own partition. This will allow you to format the Ubuntu partition ext4 and use it more effectively.


makeinitramfs and grub-update for compiled Ubuntu Linux Kernel

I recommend using what is documented in https://help.ubuntu.com/community/Kernel/Compile instead of the make-kpkg way. This way you'll actually build the package exactly the same way it is built in the archive.


This is just a simple application of logic to the information in the question, but it wasn't immediately obvious to me (i.e., it took me about two minutes to come upon), so here goes:

Instead of pursing any one strategy for blocking websites, use a combination of

editing the /etc/hosts file [EDIT: This doesn't seem to do anything.]
using DansGuardian (i.e., editing the /etc/dansguardian/lists/bannedsitelist file)  [EDIT: This doesn't seem to do anything either.]
using OpenDNS (thanks, @Daniel!)

Reverting any one of these controls is easy, but reverting all three would take substantial time (I hope), especially once one has forgotten exactly what one did to implement them.

I'm still open to the possibility of a better strategy and hope someone posts one!


What I have to do to install Proprietary drivers?

It is smart to update first.

Yes, select fglrx-updates and Apply changes, the rest should be done automagically.

Yes, 3D acceleration is enabled in the proprietary driver.


Your filename has a space in it.
Try:

unrar x Starbound\ 1.2.2.rar

or

unrar x "Starbound 1.2.2.rar"


How do I install a program from a executable CD?

Follow these steps:

Mount the file on a local drive.

Make a mount point
For example:

mkdir /media/mathworks

Then mount the ISO to that directory. For example, If you have downloaded the ISO and it is in the home folder under the downloads folder and the ISO is called matlab.iso(In your case you need to move from CD Drive):

mount -t iso9660 -o loop ~/downloads/matlab.iso /media/mathworks

Now you can navigate there and run the installer

cd /media/mathworks
./install


Ubuntu ldmtool not showing windows RAID-0 drive

this solved my problem:

mdadm --assemble --scan


How to update the owner of the file with rsync?

check the -o and -g flags:

-o, --owner                 preserve owner (super-user only)
-g, --group                 preserve group
    --devices               preserve device files (super-user only)
    --specials              preserve special files

You can also use -a

 -a, --archive               archive mode; equals -rlptgoD (no -H,-A,-X)
     --no-OPTION             turn off an implied OPTION (e.g. --no-D)

since that is for "archive" and include the -o and -g. Mind the "super-user only".

For more info type man rsync on command line or click the link.


How do I restore triple tap to emulate the middle click?

Just found an amazing thing:

Taping on the top right corner of the touchpad is like clicking the middle mouse button.
I know it's not the same as the triple click and position accuracy is needed :( but it's the closest I could find to triple click.

BTW, clicking on the lower right corner is like clicking the the right mouse button.


List of file types and default Ubuntu applications to open with

Most modern desktop programs don't use file but the Shared MIME-info Database for file types and the MIME applications associations specification for the default applications.

In Bash you can use xdg-mime to guess the MIME type of a file and to get the default application for a given MIME type:

$ xdg-mime query filetype bla.sh
application/x-shellscript
$ xdg-mime query default application/x-shellscript
emacs.desktop

With xdg-open you can just open a file with the default application so you don't actually need to care about MIME types yourself:

$ xdg-open bla.sh


Can't login, although password is correct

If you've been starting graphic applications from the terminal using sudo, that's what probably caused your problem. Always use sudo -H.

boot to the GRUB menu
choose Advanced Options
choose Recovery mode
choose Root access
at the # prompt, type:

sudo mount -o remount,rw / # remount the disk as rw
cd /home/your_username # change directory
ls -al .*thority* # list some files

You should see something like this...

-rw------- 1 your_username your_username 407910 Nov  2 08:56 .ICEauthority
-rw------- 1 your_username your_username     58 Jun 23  2017 .Xauthority

If it DOES NOT show -rw------- then...

sudo chmod 600 .*thority* # change file protection

If it DOES SHOW root root then...

sudo chown your_username:your_username .*thority* # change file ownership
reboot # reboot the computer

Reboot and see if you can log in.


Update August 2020:
They removed .aa files from the website, you can now only download .aax. Support confirmed that .aa files are no longer available for download and recommends to install their tracking app instead.
The .aax files can also be converted with ffmpeg, but you need your unique "activation bytes":
ffmpeg -activation_bytes AABBCCDD -i YOURBOOK.aax -codec copy OUTPUT.aac

The activation bytes can be found by a few methods:

Temporarily install the app and grab the /data/data/com.audible.application/files/AudibleActivation.sys file. Because Android hates it when people can access their own files, you probably need root to do this. Then use either this script, or just grab the first four bytes as hexadecimals in little-endian (backwards notation; reverse them).
Using the Audible Activator. This didn't work for me, perhaps because I am using Audible Germany, but it has been a while and it seems to work for other people.

Original method for .aa files:
In your library, near the right top corner, you can select "Normal Quality" (formerly called "Format 4"). The download links will change to .aa files. From what I understand, they're a weird kind of mp3 which is easily converted using ffmpeg. This option (to pick Format 4) is only available if your browser's user agent looks like a Linux system.
To convert .aa files to MP3, the simplest way (easiest to remember) is this:
ffmpeg -i downloaded_file.aa output.mp3

The -i option just specifies the input file. The output file needs no option. This will, however, will re-encode the file (losing a little bit of quality, and it's slow).
It is better (10× faster) to use the 'stream copy' feature:
ffmpeg -i downloaded_file.aa -codec copy output.mp3

Please do not use this for piracy. If this is used for illegal copying, Audible will just disable downloading these files and make life a bitch for everyone (except for the pirates: they will always find a way, e.g. loopback recording, which is annoying, but it works). I am posting this to make it possible to use free software to read your books, and to be able to use apps like Smart AudioBook Player (which has more features and is not locked to a single vendor).
Warning to pirates: they leave markers in files so it can be traced back if someone uploads it. These markers are impossible to hear. Of course they're not telling us what they do exactly, but I've read scientific papers where they managed to find the markers very reliably even after they mangled the files into different formats, played at variable 0.9-1.1x speed, etc. See these Google Scholar results as example.


Will files created in windows open in Ubuntu?

Yes, the standard file formats are supported in Ubuntu. By standard I mean: images like JPEG, TIFF, PNG, BMP, audio files like WAV, MP3, AAC, FLAC. The compressed archives like ZIP, RAR, 7ZIP are supported as well.

All RAW image formats can be opened in GIMP with dcraw or UFraw plugin, or more workflow-oriented program like Raw Therapee. All those programs are available for free in the Ubuntu Software Center.

Obstacles may arise when you need to open and edit some proprietary file formats like Microsoft Office files or Adobe Photoshop formats. The Microsoft Office files are opened by LibreOffice, mostly successfully, but your mileage may vary depending on the version and complexity of specific file. If you need to open Adobe Photoshop files then you should keep your Windows installation handy.

And remember, that you don't have to switch totally to Ubuntu, abandoning Windows. I recommend to have dual-boot setup: Windows and Ubuntu on the same PC.


Why does my Messaging Menu code not work when split into functions?

mm_source is local to function2. When function2 completes it goes out of scope and is garbage collected. This causes it to be quickly added and then removed from the menu before you can see it.

To stop this from happening, simply return the mm_source object to the calling code, and keep it around in a variable. You probably will want to do the same thing with your mm too. As follows:

import gtk

def show_window_function(x, y):
    print x
    print y

# get the indicate module, which does all the work
import indicate

def function1():
    # Create a server item
    mm = indicate.indicate_server_ref_default()
    # If someone clicks your server item in the MM, fire the server-display signal
    mm.connect("server-display", show_window_function)
    # Set the type of messages that your item uses. It's not at all clear which types
    # you're allowed to use, here.
    mm.set_type("message.im")
    # You must specify a .desktop file: this is where the MM gets the name of your
    # app from.
    mm.set_desktop_file("/usr/share/applications/nautilus.desktop")
    # Show the item in the MM.
    mm.show()
    return mm

def function2():
    # Create a source item
    mm_source = indicate.Indicator()
    # Again, it's not clear which subtypes you are allowed to use here.
    mm_source.set_property("subtype", "im")
    # "Sender" is the text that appears in the source item in the MM
    mm_source.set_property("sender", "Unread")
    # If someone clicks this source item in the MM, fire the user-display signal
    mm_source.connect("user-display", show_window_function)
    # Light up the messaging menu so that people know something has changed
    mm_source.set_property("draw-attention", "true")
    # Set the count of messages in this source.
    mm_source.set_property("count", "15")
    # If you prefer, you can set the time of the last message from this source,
    # rather than the count. (You can't set both.) This means that instead of a
    # message count, the MM will show "2m" or similar for the time since this
    # message arrived.
    # mm_source.set_property_time("time", time.time())
    mm_source.show()
    return mm_source

my_mm = function1()
my_mm_source = function2()
gtk.mainloop()


Automatically regenerated .fuse_hidden928347928374 files when I try to delete my own

I just had this issue. It happened because the file was open in VLC. I closed VLC, unmounted, mounted back, and I could delete the file. Make sure the original file isn't open in another program.