Make a .sh that sets new username, hostname and password

Why not just use an OEM installation for this? It's not as pretty, but it gets the job done. If you want to go down this route, see izx's excellent answer to this question: How do I pre-install Ubuntu for someone (OEM install)?

Basically, the system will (on first boot) prompt the user for a bunch of information to personalize their machine. This includes the language, location, username, hostname, password, and so on. Basically, everything that your computer will usually prompt you with for an installation.

This is exactly what OEM images are meant for, and they do a great job of it. Plus, you'll give your students a small taste of the "install Ubuntu" experience. Though, Ubuntu installs aren't exactly painful. You can probably do it in a single class, and give your students some homework to personalize and explore their VM. Plus, partitioning is painful fun!

Back to the problem at hand (and an answer to your actual question).....

Let's look at man usermod to get an explanation for what's going on:

CAVEATS
   You must make certain that the named user is not executing any
   processes when this command is being executed if the user's numerical
   user ID, the user's name, or the user's home directory is being
   changed.  usermod checks this on Linux, but only check if the user is
   logged in according to utmp on other architectures.

Basically, this just means we can't change a user's UID, their username, home directory, or anything of the sort if the user is logged in.

So, we can do some fun stuff to set this up on the system's next boot. Instead of your script doing the work, we make your script make another script to do all the heavy lifting and manipulation. An example of this:

# Make the first-run script
touch /etc/init.d/firstrun-setup.sh

# Add in user modifier
echo "usermod -d /home/$username -m -g $username -l $username ben" >> /etc/init.d/firstrun-setup.sh

# Add in group rename
echo "groupmod -n $username ben" >> /etc/init.d/firstrun-setup.sh

# Add in password expiry
echo "passwd -e $username" >> /etc/init.d/firstrun-setup.sh

# Add in file self-destruct
echo "rm /etc/init.d/firstrun-setup.sh" >> /etc/init.d/firstrun-setup.sh

# Mark the file as executable
chmod a+x /etc/init.d/firstrun-setup.sh

# Reboot the computer
reboot

Basically, by doing this, you're "queueing" events to run on the system's next boot. This will run before the userland happens, so the system will execute these commands as root. Therefore, the ben user won't be logged in, and the system won't complain.

You may still need to add additional commands to this thing to allow more personalization (like setting the actual name, etc). However, this is optional and only needs to be done if you want it to take place during the setup script.

Though, it may be a good idea to just create a new user for the students entirely, and then keep your existing sacrificial account in place. This way, if something happens, you can go in and repair/administrate their machine if at all necessary. Of course, if you're giving your students admin access to their VM, this is sort of a moot point as they might very well delete the "instructor" user because they're students.


You probably moved the folder accidentally in the Documents folder at some time. You can safely move it back to your home using Files. It will retain its special status, and automatically, your ~/.config/user-dirs.dirs file will be updated.

In case the folder "lost" its special status, you will need to restore its special status after moving it back to your home folder by editing ~/.config/user-dirs.dirs to read XDG_DESKTOP_DIR="$HOME/Desktop.


How to save login information on Cisco Packet Tracer 7.2 on Ubuntu 18.04?

There is no solution for this issue. The more recent updates for packet tracer too don't address it, even in windows.


(U)EFI boot failure after migration from Hyper-V

The problem has been solved, we found out that the files grubx64.efi and MokManager.efi were located in \EFI\ubuntu instead of \EFI\Boot so we copied them manually and the machine booted up.

Afterwards we had another small problem, we got the following message stuck in screen:

lvmetad is not active yet; using direct activation during sysinit
/dev/mapper/lubuntu--vg-root: clean, 121574/7168000 files, 1115621/2865544 blocks

This was solved by editing the file /etc/default/grub with the following changes:

set GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" to GRUB_CMDLINE_LINUX_DEFAULT="nomodeset"
and adding the line GRUB_TERMINAL_INPUT="console serial"
followed by a sudo update-grub.

So far everything seems to work now!


Short answer : yes !!

I found this https://unix.stackexchange.com/a/185115 :

  With gtk+ ≥ 3.12 you can load a specific theme and its variant (dark,
  light) on a per-application1 basis via the environment variable
  GTK_THEME=theme:variant. As per the gtk+ reference manual:

  GTK_THEME.  If set, makes GTK+ use the named theme instead of the
  theme that is specified by the gtk-theme-name setting [...] It is also
  possible to specify a theme variant to load, by appending the variant
  name with a colon, like this: GTK_THEME=Adwaita:dark.

  So, to load the dark variant you would run:

  GTK_THEME=Adwaita:dark gedit

  Likewise, to achieve the opposite (when the default theme is dark),
  you load the light variant:

  GTK_THEME=Adwaita:light gedit

  Note that if you want to use it via a custom launcher (.desktop file)
  you'll have to prepend env to the command in the Exec line:

  Exec=env GTK_THEME=Adwaita:dark eog %U

  1: Worth noting that - as per the devs decision - newer gnome-terminal
  has its own configuration via menu > preferences and it ignores the
  theme. Also, since this is rather new stuff, some gtk+ 3 applications
  might not (yet) honor the GTK_THEME env variable (nautilus is one of
  them).

Also you will need to use a custom icon set for this application, so I found on https://unix.stackexchange.com/a/440374 :

  For particular icon set per-application basis :

  Derived from Except some applications (like VLC) from using the
  current gtk3 theme

create any folder path/to/FOLDER
create a icons/ folder inside it
put your desired icon set folder in it and rename that folder with the name of current icon set

  After that you can force the use of this icon set with :

  XDG_DATA_DIRS=/path/to/FOLDER/:$XDG_DATA_DIRS

  For dark theme you can use breeze-dark icon set

  Cinnamon use metacity border-decoration, this is in themes/metacity-1/
  folder. I don't know how to customize it for a specific application.
  The XDG_DATA_DIRS hack above won't work.

  So if you want custom theme and icons, you can write in a terminal :

  GTK_THEME=Adwaita:dark XDG_DATA_DIRS=/path/to/FOLDER/:$XDG_DATA_DIRS

  And for launching app with these settings in application .desktop file
  :

  Exec=sh -c "GTK_THEME=Adwaita:dark
  XDG_DATA_DIRS=/path/to/FOLDER/:$XDG_DATA_DIRS  %F"


What are recommendable GIF screencast recorders?

There is a command line tool called byzanz available in the official Ubuntu universe repository :

byzanz:
  Installed: (none)
  Candidate: 0.3.0+git20160107-1
  Version table:
     0.3.0+git20160107-1 500
        500 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages

To install byzanz, just open a terminal and execute this command : sudo apt install byzanz

byzanz-record is a desktop recorder tool, which allows you to record the current desktop or parts of it to an animated GIF. Here are the instructions and application options from the Ubuntu Wiki how to use the tool : Creating Screencasts - Making a GIF screencast


Should I upgrade to 20.x under these circumstances?

You have till April 2023 before 18.04 is End Of Life so if it works maybe do not fix it?


Unable to access hard disk due to hibernation or sleep in windows

I manage to boot into Wİndows with safemode. Enter windows in boot screen and press f8. I dont know why it didn't came up to my mind.


How can I redirect sox messages to null or a log file

sox has -q option if you don't want to see the messages.
You also forgot to specify what you want to send to /dev/null. It must be 1 (STDOUT), 2 (STDError) or & or 1&2 meaning both. check What does 2>/dev/null mean?
If you want to run the command in background add & at the end of command.
So it must be one of the followings:
sox -q -t pulseaudio alsa_output.pci-0000_00_1b.0.analog-stereo.monitor -t mp3 test.mp3 silence 1 0.1 3% 1 3.0 3%  &

OR:
sox -t pulseaudio alsa_output.pci-0000_00_1b.0.analog-stereo.monitor -t mp3 test.mp3 silence 1 0.1 3% 1 3.0 3% &>/dev/null &


Hum, I feel so stupid. I don't know why, but xubuntu was set-up to lock the screen when I close the light, instead of suspend it. That's why sudo pm-suspend worked without any trouble... I just changed it in System Preference/Energy saving, and now everything works perfectly.


How to install MS VisualStudio 2015 community edition in Ubuntu 14.10?

I have tried wine but it didn't worked as expected

Yeah, VS will require a full and proper Windows stack. Wine simply won't cut it.

You'll need to either dual-boot or use virtualisation (Virtualbox, VMWare, etc) to install a proper copy of Windows. I'd probably go with a virtual machine but it'll likely be somewhat slower than a native install - which may be an issue if you're compiling lots. The up-side is you'll never have to leave Ubuntu.

Other than that, you probably want to look at transitioning your projects away from .NET and into Mono. It'll be a while until the recent open source .NET stuff hits a usable state, and even then, it'll probably only be a target. I doubt MS will port VS to be cross platform.


Dual Boot Windows 10 and Kubuntu - SATA AHCI vs RAID [error]

Probably you have to update your bootmanager, because,  it points to disappearing path, that is:

when Windows was installed in RAID mode, thus the bootmanager point to /nvme but when you switch to AHCI /nvme is destroyed and replaced by something else.
in the same way, when you installed Kubuntu in AHCI mode, it was installed on /dev/sda but when you switch back to RAID, it is destroyed.

OT: why did you need to install Kubuntu without RAID?


dpkg-shlibdeps fails with "no dependency information found"

It turned out I was linking against a wrong so. The library libtensorflow_framework.so was using:
/usr/local/cuda-9.1/lib64/libcurand.so.9.1

while I had installed
/usr/local/cuda-9.1/targets/x86_64-linux/lib/libcurand.so.9.1

That's because the library libtensorflow_framework.so was built on a different machine, where CUDA was installed in a different location.


I suggest something else. You can create your custom ISO with some tools. Remastersys is one of them: http://www.geekconnection.org/remastersys/

There is a simple howto:
http://www.ubuntugeek.com/creating-custom-ubuntu-live-cd-with-remastersys.html

Also, Relinux is another project:
http://lkubuntu.wordpress.com/2011/10/10/relinux-a-way-to-create-a-bootable-iso-out-of-your-system/

With these tools, you can create your own custom Ubuntu ISO and easily install anywhere.


Installing fglrx 13.3 with powerxpress on Ubuntu 13.04

BastiFantasti outlines a solution for 13.4 at http://ubuntuforums.org/showthread.php?t=1930450&page=76:

Basically, it requires getting older versions of the Intel drivers, and running

aticonfig --px-dgpu

after before rebooting.


If you don't want to count the number of occurrences, but the number of matching lines, use @heemayl's answer. However, if you want to count each occurrence (so, count word foo word as 2 hits, not one), you can do:

tail -1000 file | grep -o word | wc -l

The tail command prints the last 1000 lines, the grep -o word searches for word and prints each case found (so it will print it twice if it matches twice) and wc -l counts the number of lines returned.

Alternatively, you could use something like perl to do the counting:

tail -n 1000 file | perl -alne '$k+=grep{/word/} @F; END{print $k}'

Finally, note that this will also count things like wordsmith. To match only if your pattern forms an entire word, use grep with the -w flag:

tail -1000 file | grep -wo word | wc -l

or

tail -n 1000 file | perl -alne '$k+=grep{/\bword\b/} @F; END{print $k}'


how do I convert dyn dynamic external ip-address to ubuntu 13.04 internal ip-address

I'm not familiar with your Netcom router, but the basic (and easy) route to follow is:

Let your router handle DHCP for your internal network addresses;
Assign your server a reserved static IP address in the router (within the IP range it distributes);
Open and forward any ports you want passed to the server in the router.

Dyn will handle the DNS resolution to your public-facing IP address and route requests for your domain. Dyn has reasonable documentation on configurations for their services, which I would recommend reading through.


Why additional drivers don't let me select one driver

Open a terminal by pressing Ctrl+ Alt+ T.

Then run this command.

sudo apt-get install xserver-xorg-video-radeon


Write a script to automate installing applications on freshly installed Ubuntu

Can you create a queue in the terminal so that after one installation finishes it will continue to the next?

Yes. You can add packages like this:

  sudo apt-get install sm-player vlc chromium

  Can you write a script to do this? How would it look like?

Yes. Just put above mentioned one-liner into a text file and make it executable with chmod 664 textfile. You can then do ./textfile and it will start installing. It might be smart to add a --yes in the command otherwise it will prompt for confirmation.

You can add a lot more to such a script. You can even add gsettings. See How do I make post-install scripts? for an example.

  My last question which, is kind of a longshot, is there a way that you can see what is installed and automatically add this to a script or something.

Yes. See:

Write List of Packages installed via Manual Invocation of apt-get to File
How to get a list of packages I installed?
How to list all installed packages


sound stops working after a while in ubuntu 12.10

remove the .pulse directory and the file called .pulse-cookie  in your home folder;
then you need to logout for the change to take effect.

that's the way that I use most of the time.

Good luck.


ubuntu grub2 install failed - fresh install

I assume you are installing efi mode. I had this problem with my current computer. the issue wasn't with grub-install but rather update-grub, thus the config file for grub is not created.
if the installer has a command line option at the bottom it will make this a lot easier. since you can go back to install grub after making this change. otherwise you will have to finish without installing grub then use a live CD to fix the problem and install grub.
the file /etc/grub.d/30_uefi-firmware is a script for adding the system uefi console to the grub menu. It errors out.
I edited mine to read:

set -e
gettext_printf "Adding boot menu entry for EFI firmware configuration\n" >&2
cat << EOF
menuentry 'uefi-firmware' {
fwsetup
}
EOF

then updated grub.
if you can make this change without leaving the installer, go back to install grub and it should work.
If not then it becomes more complicated but can still be done. click finish the install with out grub.Boot from the live CD and make a file named "target" in the home directory then open a terminal there (right click-->actions-->open terminal). Verify the drive and partition numbers for you install to use bellow.
then execute the following commands:

mount /dev/sda2 target
mount /dev/sda1 target/boot/efi
sudo chroot target
sudo update-grub


The light bulb button (or the "Show hardware information" button)  can be found is the virtual machine console's toolbar. You first need to open the console by double clicking on the virtual machine or by using the "Open" button.
If you use a custom GTK theme you may have an issue and the light bulb will be invisible but the button will still be working.
Here are some screenshots to illustrate. The first one displays the main window and the second one the console window with the light bulb button:


How to run multiple websites on port 443 in Azure using Apache2.4?

First things first, SSL is just a protocol and you can use any port that you want.  So answering your question:

How can you bind ssl to it?

Well you pretty much need to buy an ssl and set it up for that site with that port (so basically you would have an SSL for each url and port combination you want (obviously there are SSL certificates that you can use for multiple sites with the same base URL). So you will just have to edit Apache .conf files to redirect that each app (DocumentRoot) to a different port.

Now, my recommendation would be to use always standard ports:80 and 443 (for many reasons like: mental health, standards, etc.). What we actually do in the real world is that we have one server that hosts multiple VirtualHosts with one or more ServerNames, you can either buy them or just have a base url and then add a suffix or prefix to that domain.

For instance, I would have my base domain with something like this:

https://example.com -> /www/mainApp
https://admin.example.com -> /www/adminApp
https://api.example.com -> /www/Api

or if you go and buy domain names you could have something like this:

https://example1.com -> /www/mainApp
https://example2.com -> /www/adminApp
https://example3.com -> /www/Api

So, basically I would get three SSL certificates, one for each app and you would have to configure Apache to respond to that domain name and go to the app that you need to serve, that would pretty much solve your problem.

You can read more about it how to configure it here.

Try it out for yourself and let us know if you run into any more problems. I would also suggest reading more about Apache Virtual Hosts.


Ubuntu can theoretically hang on any hardware. I recommend running updates if you're able to use Ubuntu long enough before it freezes, that's the most important thing to do if you are able to. If it hangs immediately after login, was the install really successful in the first place? You can swap the hard drive into another computer and try booting Ubuntu off that hard drive in another machine, that will help you isolate the problem.

When it hangs, if it's from overheating, I highly recommend switching to Lubuntu, which uses LXDE as the desktop environment. I've got much more mileage with Lubuntu on laptops that overheat.

Also consider what kind of graphics card you have. Are you able to do Ctrl+Alt+F1 to swap from GUI to a CLI? This may prevent you from having to reboot your machine by allowing you to enter commands, for instance a killall on the application that might be causing the issue.


Skype prevents login because it believes another instance of Skype is already running

Skype may be running. It is an issue which I haven't solved yet and I am using Skype (Beta) Version 2.1.0.81, I am yet waiting for the release of the new version which seems to be going to correct this and other bugs.

Meanwhile, what you can do when facing this is to kill all the running processes named "skype".

Do this by dropping: killall skype in a terminal or by opening your system monitor (System/Administration/System Monitor) and locate the currently running skype process, right click on it and kill it. Ending the process by using the "End Process" won't result in what you wish.

NOTE: If killall skype in a terminal don't kill the process you will be in the need to do the System Monitor trick.

After that, try again running a new instance of skype and log in.

Good luck!


How set default app preferences for KDE apps on Ubuntu?

Simply:

$ xdg-mime default Thunar.desktop inode/directory

Solves the problem. As Michael helpfully posted in comments.


You can get the information about recently removed packages(What are all the packages that are recently removed) in /var/log/dpkg.log file along with the date and time.

awk '$3=="remove"' /var/log/dpkg.log

Find and reinstall the packages via apt-get.


You need to logout and log back in after changing group membership in order to obtain the new set of privileges.  (Alternatively you can run sg (like su, switch user, but instead switch group)   You can see what privileges you current have by running id.
What are the permissions on those files?  Even with the group set to web, the group may not have the necessary write permissions.


What does the period (.) mean at the start of a filename in a terminal command?

The dot in that situation is part of the filename and has in the Linux/Unix context the meaning that the file or directory is hidden, you cannot see it in the file explorer (Nautilus, which is default on the vanilla Ubuntu), unless you press CTRL+H.

And, if you only use ls in the terminal, you will not see it either unless you use the -a or -A flag with it (i.e. ls -a or ls -A or ls --all or ls --almost-all).

However, the dot (.) has different meanings in different contexts:

For example in a path (./file) it describes the current directory you are in, while ../file refers to file in the parent directory.
And there is even a command . which sources (runs) bash script files. So . ./file (mind the spacing) would source the script named file in the current directory.
and in a REGEX context, the dot means "any character".


Ubuntu compatibility on Dell Precision T5500

Try to run a LiveCD, LiveDVD or LiveUSB and see if everything works for you.


Mok Manager/NVIDIA Driver Issue After CUDA Install

Turns out the solution was pretty straightforward.

"Disappearing" nvcc:

I had added the path variable seen below to my current terminal instance, but I had not added it to ~/.bashrc (this means nvcc worked only in that terminal instance, hence the "disappearing" later issue). There may also be a ~/.profile file, but it seems that bashrc is read first if present, so you may need to add it to a different file depending on your available files. This is a good resource if you aren't sure: https://stackoverflow.com/questions/14637979/how-to-permanently-set-path-on-linux-unix

export PATH=/usr/local/cuda-10.1/bin:/usr/local/cuda-10.1/NsightCompute-2019.1${PATH:+:${PATH}}

Driver Issues:

I solved all my driver issues by disabling Secure Boot. In my case, I did not need to hold down a key while booting to open up the settings for this. Instead, when I start up and arrive at the GRUB screen to choose my OS, I choose System Settings. Here the Secure Boot setting is available. Just disable, apply, and exit. This may be a hack, but nvidia-smi works correctly now, and I have verified that PyTorch is connected to CUDA and is using the GPU correctly. I'm pretty sure this also means I don't need to worry about that MOK Enroll screen anymore.


How to drop a single specific mySQL table with one command?

You can run this command in the terminal:

mysql -u [username] -p[password] -D [databaseName] -h [hostName] -e 'DROP TABLE [tableName];'

Replace all words between brackets with the real database credentials.

Note there is no space between -p and the password. If you leave a space between them like other arguments, the command line will ask you to enter the password.


Yes Dude !!   you do.
Follow this link for installing the driver for your graphics card.

Also, You need to download the Linux version of the games which you play on windows.

If you are talking about some old PC games like counter strike which supported OpenGL, you can either:

Run their windows version using wine. wine can installed by simply

$ sudo apt-get install wine

run the windows installer directly by installing wine.
Find your game on steam


@rikz
Is your iOS device Jailbroken if yes? then download "Newterm 2" (Terminal for iphone) from Cydia.

check the ssh installed on iphone, if not download (ssh and vsftpd packages)from cydia.

before connecting to your iphone you should reset root password or use defauld password "alpine".

connect your iPhone in same wifi network and do the ssh from iPhone "Newterm 2"
ssh root@your ubuntu machine ip.


Error on system start 16.04: /usr/lib/systemback/sbsustart

I recommend you to reinstall ubuntu.
if that doesn't work then your hardware might not be compatible for ubuntu. (I think the core processor)
try xubuntu


wiki.ubuntu.com/Audio/Alsamixer

  PulseAudio controls underlying ALSA-level volume controls. To change
  the ALSA-level volume controls directly, you can do the following:

  Open a terminal. (The quickest way is the Ctrl-Alt-T shortcut.)
      Enter alsamixer and press the Enter key.
      You will now see a user interface. In this user interface, you can do the following:
          Select your correct sound card using F6 and select F5 to see recording controls as well
          Move around with left and right arrow keys.
          Increase and decrease volume with up and down arrow keys.
          Increase and decrease volume for left/right channel individually with Q, E, Z, and C keys.
          Mute/Unmute with the M key. An MM means muted, and QQ means unmuted.
          Exit from alsamixer with the Esc key.

  A caveat here: When you mute or unmute something, pulseaudio might
  pick it up and mute and unmute other controls, as well as PulseAudio's
  main mute.

  If you discover that you need to do something special here to make
  your sound work, it is likely a bug. Please report a bug using the
  ubuntu-bug audio command. Thanks!


3 questions = 3 answers....

1) Is PPTP a secure VPN-protocol? - The short answer is no.
PPTP has been the subject of many security analyses and serious security vulnerabilities have been found in the protocol. The known vulnerabilities relate to the underlying PPP authentication protocols used, the design of the MPPE protocol as well as the integration between MPPE and PPP authentication for session key establishment. More info on PPTP here

2) Can you get VPN-like functionality using SSH? - The short answer is yes: Use OpenVPN community edition. OpenVPN's community documentation is here, and it uses SSL. You should take your time to make sure that you understand how the server is set up (detailed config here) and likewise what you are doing to your client-machines (detailed config here).

3) Finally are passwords insecure? It depends on their length, but the long answer is written below. What I think is more important is whether the password was sent in clear text which in some implementations is - literally speaking - a disaster. There is an elaborate explanation on this blog, but to my knowledge attack frequency can be no higher than ping time, as a frequency of packages higher than this simply gets dropped by the ethernet card without any processing. So when I "ping" myself I get the limit:

Me@MyPC:~$ ping localhost
PING localhost.localdomain (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost.localdomain (127.0.0.1): icmp_req=1 ttl=64 time=0.149 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_req=2 ttl=64 time=0.110 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_req=3 ttl=64 time=0.113 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_req=4 ttl=64 time=0.142 ms
^C
--- localhost.localdomain ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2997ms
rtt min/avg/max/mdev = 0.110/0.128/0.149/0.020 ms

With 0.128 ms as average, equal to 0.000128 s per response the number of attacks possible per second:

1 second / 0.000128 second per ping is 7812.5 trials per second.

Dictionary words
If you use a word from a dictionary, your password can maximum take form of one of the 200,000 words in all the dictionaries in the world. This means that trying 200,000 words will take:

200,000 / 7812.5 = 25.6 seconds.

If you use two consecutive words, then the combinations possible are 200,000 ^ 2 whereby it can be cracked with guarantee within:

200,000^2 / 7812.5 = 40000000000 / 7812.5 = 5120000 seconds.

This equals: 59.259 hours of continuous attack, where I'm sure you router looked busy.

For respectively three, four and five word password that increases as follows, assuming 31536000 seconds per year:

200,000^1 / 7812.5 = 25.6 seconds

200,000^2 / 7812.5 = 5120000 seconds

200,000^3 / 7812.5 = 1.024 * 10^12 seconds = 32,470 years

200,000^4 / 7812.5 = 2.048 * 10^17 seconds = 6,494,165,398 years

200,000^5 / 7812.5 = 4.096 * 10^22 seconds = 1,298,833,079,654,997.5 years

Hereby it should be noticed that the age of the universe is assessed to 13.75 billion years = 4.336 * 10^17 seconds, so the technical answer to attempts to hacking a three-word password by brute force is "not feasible" :-)


How do I add a dyndns alias to my Iptables?

Some times ago, I was faced to the same problem, and my solution was to create a template iptables files of rules, to modify on the basis of the current dyndns retrieved IP, then setup the tables with iptable-restore. The routine tested the IP periodically and updated the firewall when required.

I abandoned such approach when a collegue asked to use the same ssh server, and setting up the system for two IPs, though not particularly difficult, make me change my mind.

I would suggest some other way to approach the problem.

A commonly used approach is to use software to detect and block attacks. For example fail2ban can analyze ssh logs at runtime and ban/unban suspicious hosts using firewall rules.

On the other part, denyhosts add suspicious hosts to /etc/hosts.deny, achieving the same target of fail2ban.

Yet another option is to use a third party public ssh server (see shellium, blinkensheel, etc.) as a bridge to reach your personal ssh server, in which you should trust the public server and no others, and which as a static IP.

I'm sure experts out there can suggest yet other solution better than what I suggest.


You can use either of the two methods to install tree 1.8.0:

Using Snap:

Tree is available as a snap package too. You can install it using

snap install tree

Verify version:

tree --version

Installing deb package:

Tree 1.8.0 is packed in Ubuntu 19.04 (Disco Dingo). Tree 1.8.0 depends on lib6 (>=2.17). In 18.04 lib6 v2.27 is available. You can download the deb package from Ubuntu pool and install that using dpkg.

Download deb package:

wget https://mirrors.edge.kernel.org/ubuntu/pool/universe/t/tree/tree_1.8.0-1_amd64.deb

Install using dpkg:

sudo dpkg -i tree_1.8.0-1_amd64.deb

Install any left dependency:

sudo apt install -f

Verify version:

tree --version

You must get an output like:

tree v1.8.0 (c) 1996 - 2018 by Steve Baker, Thomas Moore, Francesc Rocher, Florian Sesser, Kyosuke Tokoro

Further Reading:

Why don't the Ubuntu repositories have the latest versions of software?


Why is 13.10 delivered with java 6 instead of java 7?

First of all, lets analyze the dependencies of the ubuntu-restricted-extras packages:

apt-cache depends ubuntu-restricted-extras
ubuntu-restricted-extras
  Depends: ubuntu-restricted-addons
  Recommends: ttf-mscorefonts-installer
  Recommends: unrar
  Recommends: gstreamer0.10-plugins-bad-multiverse
  Recommends: libavcodec-extra-53
  Conflicts: ubuntu-restricted-extras:i386

Here, isn't java, lets analize depper the dependencies of ubuntu-restricted-addons:

apt-cache depends ubuntu-restricted-addons
ubuntu-restricted-addons
  Recommends: gstreamer0.10-plugins-ugly
  Recommends: gstreamer1.0-plugins-ugly
  Recommends: flashplugin-installer
    flashplugin-installer:i386
  Recommends: gstreamer0.10-plugins-bad
  Recommends: gstreamer1.0-plugins-bad
  Recommends: gstreamer0.10-ffmpeg
  Recommends: gstreamer1.0-libav
  Recommends: gstreamer0.10-fluendo-mp3
  Conflicts: ubuntu-restricted-addons:i386

Nope, ubuntu-restricted-extras do not install java. Actually, only could ever install it in a very roundabout manner.

$ aptitude why ubuntu-restricted-extras default-jdk
p   ubuntu-restricted-extras  Recommends ttf-mscorefonts-installer
i A ttf-mscorefonts-installer Depends    update-notifier-common (>= 0.119ubuntu2)
i A update-notifier-common    Depends    debconf
i   debconf                   Suggests   debconf-doc
p   debconf-doc               Suggests   debian-policy (>= 3.5)
p   debian-policy             Suggests   doc-base
i A doc-base                  Suggests   rarian-compat
p   rarian-compat             Depends    docbook-xml
p   docbook-xml               Suggests   docbook-xsl
p   docbook-xsl               Suggests   libsaxon-java
p   libsaxon-java             Suggests   libsaxon-java-doc
p   libsaxon-java-doc         Recommends default-jdk-doc
p   default-jdk-doc           Suggests   default-jdk
$ aptitude why ubuntu-restricted-extras default-jre
p   ubuntu-restricted-extras  Recommends ttf-mscorefonts-installer
i A ttf-mscorefonts-installer Depends    update-notifier-common (>= 0.119ubuntu2)
i A update-notifier-common    Depends    debconf
i   debconf                   Suggests   debconf-doc
p   debconf-doc               Suggests   debian-policy (>= 3.5)
p   debian-policy             Suggests   doc-base
i A doc-base                  Suggests   rarian-compat
p   rarian-compat             Depends    docbook-xml
p   docbook-xml               Suggests   docbook-xsl
p   docbook-xsl               Suggests   libxalan2-java
p   libxalan2-java            Suggests   libxsltc-java
p   libxsltc-java             Depends    jlex
p   jlex                      Depends    default-jre
$ aptitude why ubuntu-restricted-extras icedtea-plugin
p   ubuntu-restricted-extras  Recommends ttf-mscorefonts-installer
i A ttf-mscorefonts-installer PreDepends dpkg (>= 1.15.7.2)
i   dpkg                      Suggests   apt
i   apt                       Suggests   aptitude | synaptic | wajig
p   wajig                     Suggests   reportbug
i A reportbug                 Suggests   claws-mail (>= 3.8.0)
p   claws-mail                Depends    libenchant1c2a (>= 1.6)
i A libenchant1c2a            Depends    aspell-en | myspell-dictionary | aspell-dictionary | ispell-dictionary
                                         | hunspell-dictionary
p   myspell-uk                Provides   myspell-dictionary
p   myspell-uk                Suggests   libreoffice
p   libreoffice               Suggests   default-jre | gcj-jre | java-gcj-compat | openjdk-6-jre | openjdk-7-jre
                                          | sun-java5-jre | sun-java6-jre | java5-runtime | jre
p   openjdk-6-jre             Suggests   icedtea-plugin

So, unless you give more information ubuntu packages doesn't install java unless you manually specify it.


External Hard disk not workng on windows after I formatted it on Ubuntu

I tried to format my HDD using "diskpart" utility available on widows7. It is working now.

Just run "diskpart" on command-promt on diskpart select your HDD and run following commands:

CLEAN
CREATE PARTITION PRIMARY
SELECT PARTITION 1
ACTIVE
FORMAT FS=FAT32 QUICK
ASSIGN
EXIT


Ubuntu 12.04 VNC Server with Java Client

VNC is known to be slow. May I suggest using TeamViewer? With it you can set up unattended access by creating a static password. You can control the computers from Ubuntu, Debian, RedHat, CentOS, Fedora, SUSE, Mac, Windows, and mobile devices! Be sure to have TeamViewer run on startup.


When I verify a signed document with gpg, how does it know what public key to use?

gpg checks the signature against all the public keys you have.

If you have two private keys, you should also have the corresponding public keys. So, gpg will look through all the public keys you have, including your friend's keys, and figure out who signed the file.

If the file is signed by me and you don't have my public key, then gpg can't verify my signature, until you download my public key from a public key repository like https://pgp.mit.edu/

More detailed explanation below is from https://security.stackexchange.com/questions/82490/when-signing-email-with-gpg-how-does-verification-by-the-receiver-work

  There is a unique association between public and private key. That is,
  if the sender uses a certain private key to sign a message and you verify the signature using the corresponding public, then the
  signature verification will succeed only if the message has not been
  altered.

  The verification procedure and nature of the association between
  public and private varies with the cryptosystem you are considering
  (RSA, DSA, etc.), but the statement above holds true for any
  asymmetric scheme.

  What really matters is that the sender is the only one that can
  produce a valid signature because he/she is the only one who knows the
  private, but anyone knows the public, so anyone can verify the
  signature.

  Upon signing, GPG adds a token to the text message which can be used
  to verify that the message has not been altered in transit: that's the
  signature. You don't need GPG to read the message because the text
  itself is not encrypted, there is only an extra token, which could be
  either a radix64-encoded blob at the end of the message or a text
  attachment with a similar structure.

  GPG does not directly sign the message, it signs a cryptographic hash
  (SHA-1 or SHA-2 usually) of it. What happens upon verification is that
  the signature is verified using the public key of the sender to make
  sure the received hash was actually originated by the sender. If the
  hash calculated by the sender is considered authentic, it is compared
  with the hash calculated by the recipient. If both phases succeed,
  then the message is correctly signed.

Hope this helps


Everything in the Ubuntu repositories is already "in" apt-get.

tomcat7 is in the Universe repository (exception: 14.04 it's in
    Main).

Here are the steps:

Enable the Universe repository if needed.
Update your system's database of available software packages using the command

sudo apt-get update

Install the software and all required dependencies using

sudo apt-get install tomcat7


Windows doesn't boot from grub after installing on second drive

Create a new script file in /etc/grub.d, called 12_custom, with this code:

#!/bin/sh -e
echo "Adding Windows 10 to GRUB 2 menu"
cat << EOF
menuentry "Windows 10" {
     set root=(hd1,1)
     chainloader (hd1,1)+1
   }
EOF

The hd1 corresponds to disk 2, and /dev/sdb, but hd0 is disk 1, or /dev/sda. You may need root access to create the file. Make it executable with chmod +x 12_custom. Update your GRUB with sudo update-grub. Reboot to see if you get to choose between Ubuntu and Windows.


Ubuntu 12.04. How to set up dual monitor with Intel 2nd Generation Intel® Core™ Processors

I guess the Dell XPS15 l502x has an nvidia optimus chipset. Which has a real poor linux support at the moment.
I would suggest that you would use or at least try to use the "discrete graphic only" setting in bios and install the nvidia binary driver. (be careful this impacts your battery life)
Although you could try to use the latest nouveau module 1.0.9:
http://www.phoronix.com/scan.php?page=news_item&px=MTQyMzk

Please have a look at this question, may it helps you around your problem: How do I get HDMI output working on a Dell XPS 15 L502x?


Backup Ubuntu 19.10, upgrade to Ubuntu 20.04 and restore (if broken)

I use and love Clonezilla to make and restore images of system disks.  It's free to download and burn to CD/DVD or make a bootable USB stick.

It's from Taiwan, so the English is a bit lumpy, but correct.

I have used it to migrate several dual-boot systems from spinning disk to SSD and have never has a problem.

https://clonezilla.org/downloads.php


Adapted from one of Oli's answers:

rename -n 's/.+/our $i; $i++; sprintf("%014d_1.jpg", $i)/e' *

This takes every file in the current directory and renames it with a number with 14 digits (I hope I counted correctly) followed by _1.jpg. our $i introduces a global variable i, which is then increased by one and printed with sprintf. e commands rename to evaluate the right side of the replacement (= everything between the second and the third /) as an expression rather than literally. If you're happy with the results, remove -n to perform the renaming.

If you want to dive into perl expressions and their beauty, the perldoc is the way to go.


Wired networking issues 13.10 after 0-14 kernel update

I solved the problem by creating image specific resources using proprietary driver from here
After that I deleted /etc/resolv.conf which had a dns entry from my old isp and everything works straight up


I found one odd issue regarding Apache's .htaccess.

I setup an .htaccess file in the public html directory for basic authentication.  I also setup the requisite apache configuration, as directed by many instructional sites, pages, etc., so I know I had the setup mostly correct.

Regardless of how I had apache configured, I would never get an authentication prompt.

Since I had the password stored in the parent directory to the public html directory, I needed to include that directory in the apache definition.

Here is the original definition:

<Directory /srv/www/mysite/public_html>
  Options Indexes FollowSymLinks MultiViews
  AllowOverride All
  Require all granted
</Directory>`

I then changed the configuration code to the following:

<Directory /srv/www/mysite>
  Options Indexes FollowSymLinks MultiViews
  AllowOverride All
  Require all granted
</Directory>`

The password file is stored in /srv/www/mysite/access/.htpasswd.  Per the first configuration pattern, this directory was outside the configuration scope.

By backing up a directory (parent of public html), the "access" directory is now in scope.  Now apache presents a login prompt.


Only a different subnet and a virtual IP for it seems to work out to access my IP-cam

It finally turned out that it was because my router blocked certain ports. Everything works fine now with the new router my provider sent me.


May be you can try virtual box inside Windows.


How to disable fingerprint login timeout

Question was posted long time ago, so to whom it may concern (too):

To disable the timeout for fingerprint-logins (using fprintd), you've to edit the corresponding configuration file: /etc/pam.d/common-auth

open a terminal and enter:

sudo gedit /etc/pam.d/common-auth

you'll find the following config line:

auth    [success=2 default=ignore]  pam_fprintd.so max_tries=1 timeout=10 # debug

change the timeout to -1 like this (I adjusted max_tries too):

auth    [success=2 default=ignore]  pam_fprintd.so max_tries=2 timeout=-1 # debug

perhaps it won't work all the time / in all cases because of other pam.d settings - but to figure out that cause, you have to inspect all your pam.d configuration.

hth


Dualboot Windows & Ubuntu in SSD+HDD drive

This wasn't hard at all. All I did was follow this guide specifically on the "If you have disk that contains Windows installed" answer.

The only different thing I did different from the guide was that I made the swap and root / partitions in my SSD drive and the /home partition in my HDD drive.

Everything works smoothly now.


Is Apt-get Update Lag Related to Google Chrome?

This is a problem with Google's server, the bug is reported here.

As outlined many times in that report, there's no need to pollute the bug with +1 or "me too comments" as someone is working on it and that just spams everyone on the bug, clicking the star in the bug report to show it affects you is how you can help.

You can temporarily remove the repository by following these instructions, or you can just untick the box to temporarily disable it:

How to remove a repository?

However this also means you won't get Chrome updates, so what I do is disable it and then  reenable it once a week or so to check for updates.


I have seen these in when trying to build a cross compiler what does these mean

export PREFIX="$HOME/opt/cross"

The assigned path for HOME variable are added before /opt/cross and the whole path was assigned to variable PREFIX.

export PATH="$PREFIX/bin:$PATH"

Then the assigned path for PREFIX variable are added befor /bin and the whole path was exported to Environmental path.

export TARGET=i586-elf

i586-elf was assigned to TARGET variable.


In order to mount file systems grub needs to load modules. These modules are address by physical sector. Moving the root partition, moved these files; thus grub can no longer find them. You need to reinstall grub.
The simplest method:
Boot a LiveCD. and run boot repair. Double check what it wants to do.Some people have had difficulty with boot repair on an EFI system. Be sure the LiveCD boots in EFI mode.
Manually Boot from grub command prompt:
again be sure to boot EFI mode. In grub menu from the LiveCD, press C to get a command line prompt. then enter the following commands:
linux (hd1,3)/vmlinuz root=/dev/sda3
initrd (hd1,3)/initrd.img
boot

If your root partition isn't (hd1,3), then change all the drive references as needed. More detailed instructions can be found here: https://askubuntu.com/a/931327/694267


Check the following things:

Update your sources.list file. You can get a fresh copy from this website if you are in doubt.
If you are behind a proxy server, add -E with sudo to preserve the environment variables.
Use a different mirror

Now your commands will be

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


Identifying appimage program names for devilspie

To see information about the windows, including the application that owns it, you can use xlsclients. More information, including window class and icon, is provided by xclients -l. Much more info is provided by xprop. When you run that command, you must click the window on which you want information.


CTRL Keys not working in Samsung Ultra Book

This won't be a complete answer; as I have none. However

I'd start exploring your keyboard input using xev to see if the key is recognized by your OS.

Second to confirm it's not a problem with your installed Ubuntu 19.04 system, I would boot a 'live' distro (I'd go for something very different myself; different kernel, maybe even a non-debian based OS) and repeat the same tests there.   My hope is it'll confirm it's not a setup/config issue with your current OS/release or settings.

Compare the xev findings of the live' OS with your installed Ubuntu 19.04 to see if different.  If they are the same, it's far more likely a hardware issue.


Simple: check if volume group is found with a if

The if condition in this case is evaluated based on the exit code of awk, which is likely to be zero unless one of the previous commands in the pipeline failed to execute.

You could use the -q option for grep instead:

if vgdisplay | grep -q 'vg0'; then
  echo "Found"
else
  echo "Not found"
fi

The same could also be written as:

vgdisplay | grep -q 'vg0' && echo "Found" || echo "Not found"


How to install gcov that is compatible with gcc version 10.1?

I had a similar issue and I found a way to update gcov between gcc 7 and 8 which needed a gcov and gcovr update as well as different versions of python (python 3). see more details here: how-to-update-install-gcovr-to-match-my-updated-compiler-gcc
Hopefully this answers your question if you have not answered it yourself after 6 months :)


In addition to PrintScreen, there are other "default" actions provided in Settings > Shortcuts > Custom Shortcuts as shown in the image below:

PrintScreen opens the Spectacle GUI. If the application is already open but in the background or minimized, pressing PrintScreen doesn't bring the GUI back into focus or above other windows. As you noted, you'll need bring it to the front yourself.

If you want to take a full screen screenshot, instead of PrintScreen, use Shift+PrintScreen to immediately do so without invoking the Spectacle GUI.

Similarly, Control+Shift+PrintScreen lets you immediately screenshot the active window.

The fourth default option available is Meta+Control+PrintScreen if you want to select a particular area of the screen.

As you can see, if you want to carry out any of the options in 2, 3, or 4, you don't need to press just PrintScreen and then have to deal with Spectacle's GUI. The three options execute immediately without invoking Spectacle's GUI.
However, if you want to do something not covered by the three actions described above, you will need to use PrintScreen and Spectacle's GUI. Typical cases would be taking a delayed screenshot and wanting to include or exclude the mouse pointer.
Your Spectacle settings are saved in ~/.config/spectaclerc but it's advisable not to edit this file directly. Instead, use Spectacle's GUI where possible.

I'm guessing from

Can I make application activated on PrintScreen button?

that when you press PrintScreen, you want Spectacle to be focused if it is already open (but minimized). And if it isn't running, you want it to start when you press PrintScreen.
If you install wmctrl (available in the Universe repository), you can use
wmctrl -xa spectacle.spectacle || spectacle -g

as a shortcut. This command checks to see if Spectacle is running: if it is running, the Spectacle GUI is brought into focus. If Spectacle is not running, the command launches Spectacle.
If that is indeed what you want, make a new custom shortcut with Print as the trigger and the code above as the action. You'll be warned that there is a conflict and you'll be asked if you want to reassign the function. Do so.


Recent updates have fixed the problem, so I conclude it was a bug that has now been fixed.


Go into your BIOS/EUFI and make sure that your DVD drive is the first boot device, it sounds like your pc is going straight for your hard drive with the faulty ubuntu installation. Once you got the live dvd running reinstall Ubuntu.


Please do:

echo "options ath9k nohwcrypt=1" | sudo tee /etc/modprobe.d/ath9k.conf
sudo modprobe -rfv ath9k
sudo modprobe -v ath9k

Then:

echo -e '#!/bin/bash\n/sbin/iwconfig wlan0 power off' | sudo tee -a /etc/pm/power.d/wireless

Then set your wireless settings in network manager to match the images.
Then reboot.


What is the best way to shrink HD Quicktime MOV files

There are a number video transcoders that you could use to covert mov files to different formats suitable for uploading. Handbrake is a popular one that has both a GUI and command-line version (handbrake-gtk or handbrake-cli). To use Handbreak on Ubuntu, you need to add a PPA:

https://edge.launchpad.net/~handbrake-ubuntu/+archive/ppa or the more current https://launchpad.net/~stebbins/+archive/ubuntu/handbrake-releases

I personally like, transmageddon which is a GUI app with nice simple pre-sets. It's available in the archives.

Another option is arista, another GUI transcoder available in the archives. In fact, it is a "Featured Application" in Ubuntu Software Center.

ffmpeg is another command line option that offers a lot of flexibility but can be a bit complex.


You can adjust the amount of transparency in Guake's preferences.

Click on the whisker menu and search for guake and choose Guake Preferences.

In here click on --> Appearance and then at the bottom you can adjust the transparency.


Ubuntu 15.04 with two connections (WiFi & Wired) can't access internet

This seems to be a Bug which got fixed in the network-manger-0.9.10.0-4ubuntu18 which is in the ubuntu 15.10 repository. I was not successful to install the wily package on my vivid because of dependency issues. But maybe you can get it work.


Team fortress blue screen and random color pixels (13.4)

I had the exact same problem: Intel® Pentium(R) CPU P6200 @ 2.13GHz × 2
Intel® Ironlake Mobile x86/MMX/SSE2 on Ubuntu 13.04

Go to Ubuntu Software Center >edit >software sources... >other software >add...

add this line > deb http://ppa.launchpad.net/oibaf/graphics-drivers/ubuntu raring main

then go to the dash, software updater, install and reboot.

Enjoy your hats ;).


How to wipe clean an NTFS hard drive, with a hibernated Windows

You do not need to mount this drive in order to format it (wipe it clean) and begin using it for storage.  To format it, find it in the Disks utility, select it, click on the gears icon, and select Format.  Then follow the prompts.

You can also format it using the filesystem of your choice from the Terminal with mkfs.<fstype>.  For example, to format the disk using the ext4 filesystem, run:

sudo mkfs.ext4 /dev/sdb1

Assuming, of course, that sdb1 is the partition you are trying to wipe.


This issue is being tracked on Bug #762918, there seems to be some tricks that reduce the probability of getting screen freezes:

Install kernel 2.6.39 or superior
Disable sync to v_blank using compizconfig-setting-manager (its on General -> OpenGL)
Add pcie_aspm=force to the boot options. This should also lower power usage.

gksudo gedit /etc/default/grub
Add pcie_aspm=force in GRUB_CMDLINE_LINUX_DEFAULT
Run sudo update-grub and reboot.


How can I install Ubuntu over Fedora 15 without ending up with redundant options in the bootloader menu?

First I would suggest you try Ubuntu (live) and test your hardware as some of the problems you are having may be dependent on the kernel, and not Fedora vs Ubuntu.

Assuming you simply prefer Ubuntu and/or your hardware is working and you wish to install Ubuntu, use the advanced partitioning and install Ubuntu into the Fedora partition(s)

At the partitioning screen choose "Something else"

On the next screen, "specify partitions manually (advanced)"

That will replace your Fedora installation with Ubuntu.

See https://help.ubuntu.com/community/GraphicalInstall for a graphical walk through.


What are the settings to allow me to access the Ubuntu IRC from empathy?

Step by Step Guide to connect to an IRC room
Launch Empathy:

From the global menu Edit - Accounts click the + button and change the chat to IRC as shown.  Enter your nickname and click the Login button.

After a few seconds you should see the green icon now blinking indicating that you have connected to the server

Next action is to join a Room.
Enter the room name - all rooms start with # e.g. #ubuntu.  For a list of Ubuntu rooms, see the link below.

After joining the chat window should open displaying all chat-room users and the current chat activity.

Useful Link

https://wiki.ubuntu.com/IRC/ChannelList


This is an active bug in unity-control-center: https://bugs.launchpad.net/ubuntu/+source/unity-control-center/+bug/1575887


GIMP 2.8.22 font color rendering broken on Kubuntu 18.04

AFAIK this is due to sub-pixel rendering used when it shouldn't. One way is to disable the SPR for your desktop, but this point to another method (not tested):

Create a /etc/gimp/2.0/fonts.conf with contents:

<fontconfig>
  <match target="font">
    <edit name="rgba" mode="assign">
      <const>none</const>
   </edit>
  </match>
</fontconfig>


cannot boot ubuntu 12.04 after dual-boot installation on hp xw8200

I have the same problem trying to install Ubuntu 12.04 along side Windows 7 on a 2TB internal. I installed Windows 7, left 1TB for Ubuntu during the Windows 7 installation, but when I boot from the Ubuntu 12.04 CD there's no "install along side Windows 7" option, only "use entire disk" and "something else".

According to the disk manager in Windows 7, the layout of my Windows 7 partition is "simple", and the type is "basic".

Have noticed a number of posts from people experiencing the same problem, have yet to find any answers.


How do I drag-and-drop a file into a window that's not in the foreground?

You can press and hold the file with mouse click and then press Ctrl+Tab to bring that windows to foreground.
If you have Nautilus 3.4.2 or older, press F3 and then drag and drop file from one pane to other pane.


Move all files related to a Basename file in folders and subfolders

If all the files are in a single directory level, would suggest a simple shell loop that conditionally moves the files based on the grep exit status, like
for f in /log/users/*.txt; do
  grep -q unpaid "$f" && echo mv -t /tmp/ -- "$f" "${f%.txt}.pdf" "${f%.txt}.png"
done

(remove the echo once you are happy that it's doing the right thing).
If you need to recursively descend the parent directory with find, then similarly
find /log/users/ -name '*.txt' -exec sh -c '
  for f do grep -q unpaid "$f" && echo mv -t /tmp/ -- "$f" "${f%.txt}.pdf" "${f%.txt}.png"; done
' find-sh {} +


How to get apache to serve a site via VirtualBox?

If you need to allow other machines in your physical network reach your VM or if the VM needs Internet access, use bridged networking. Otherwise, stick to host-only networking.

Stop your VM and open the settings for it in the VirtualBox (OSE) Manager
Go to the Network tab
Select the network mode at your choice (bridged networking or host-only)

If you want to use bridged networking, you've to select the right network adapter at Name: ____________. For wired connections, you'd select something named like eth0. Wireless connections are usually named wlan0 (the numbers may vary).
Save the settings
Start the Ubuntu VM
When up, you can gather the IP address by running:

sudo ifconfig

The output should look similar to this:

eth0      Link encap:Ethernet  HWaddr 08:00:27:f4:c3:7b
          inet addr:192.168.1.4  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fef4:c37b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:20 errors:0 dropped:0 overruns:0 frame:0
          TX packets:25 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3244 (3.2 KB)  TX bytes:2512 (2.5 KB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

In the above output, 192.168.1.4 (on the second line) is the IP address that can be used in your Ubuntu host system to access your VM.
Now open the hosts file in Ubuntu host machine:

sudo gedit /etc/hosts

(If you don't want to use gedit, replace the word with the name of your favorite editor. E.g. vim, nano.)

Once the file is open, add this line, and save it:

192.168.1.4   my-dummy-site.com

Open any browser on your host machine and go to my-dummy-site.com to access your website, served right from VirtualBox.

( Special thanks to @iSeth for the help. Entirely based on this answer, bit is NOT the same. )


Is there a way to make Thunar display "recursive" file size?

I should explain a bit of Linux File System structure to explain this. Most linux file systems do something similar, but I assume ext4, which is the current default.
File System Structure

inode is the basic block that the file system understands as a logical unit.
A directory inode contains references to other inodes.
A file inode contains the metadata, actual data, and references to continuation blocks, in case the file had to be stored in a non contiguous manner.

Links

Ext4 supports two kinds of links. Hard and Soft.
A hard link is a reference to inode directly. Each file has atleast one hard-link, from the directory it belongs to.
Since a directory is just a inode, with information about group of inode references, it can reference itself, or a parent. In other words, a folder can be both child and parent to the same folder.

Okay, this may be getting confusing. Let me explain. Assume you have three folders, A,B,C as follows.
C is in B.
B is in A.

Now, the fun part is, C can point to the same inode as A, creating what is sometimes called a circular reference loop. If you try recursing, you will encounter a never ending loop.

Soft links are ordinary files that record the directory path to their target location. They are just marked on the filesystem that instead of a line of text, they should be interpreted as a link to some other location. Nautilus, for example, creates soft links when you use its 'Create link'/'Link here' options.

So What?
Hence, trying to calculate sizes recursively has its quirks. It is a bad idea to try and compute sizes recursively by default. However, properties dialogs of all decent file managers I know show recursively calculated total sizes, because that is what an ordinary user expects.
Windows has no problem?
Actually, windows uses a different file system format called NTFS, which maintains a list of all files and their size. So it can always tell the total size easily.
Then why don't we use NTFS?
It does not support the Unix notion of permissions (rwx for owner, group, and universe separately), and that single reason makes it unfit for use as a Linux file system. Ext4 brings a lot to the table that this minor inconvenience doesn't matter to many.
Alright. Gimme the size I need.
Did you try du?
How does du work?
du stands for disk usage. It actually counts the inode blocks, taking care to not double-count them. Add up the sizes, and you have the total size.
TL;DR
Use du -hs <foldername> to find the actual size of the folder on disk. Read man du for more info.


Unable to install Check Point VPN Client under Unbunt 20.04

The following libraries solved the issue.
sudo apt-get install libstdc++5:i386 libx11-6:i386 libpam0g:i386


How can I remove new kernel versions after downgrading?

There are 3 files you will need to remove, more if you are using a virtual machine too. But these are the main ones.

Open synaptic, use the search to find the installed kernels

linux-headers-3.2.x.x
linux-headers-3.2.x.x-generic (possibly generic-pae or i686)
linux-image-3.2.x.x

Should be easy enough to remove. Afterward run

sudo update-grub


Google reports dkim passing for invalid host

Turns out DKIM is vulnerable to replay attacks, as documented here:

http://www.zdnet.com/article/dkim-useless-or-just-disappointing/

SPF failed as intended and the message was flagged properly.


What do I need to do to start working with Launchpad again on a new computer?

On your old machine, you generated a SSH key and then added that to your Launchpad account. Bzr uses that key to acces launchpad. So if the key on your new machine doesn't match the one you uploaded to Launchpad, you will be unable to branch code from certain repositories on Launchpad.

Two solutions are possible. The first is of course to transfer your SSH keys from the old machine. You'd need to bring over two files: .ssh/id_rsa and .ssh/id_rsa.pub. Watch the permissions, as SSH is very strict about that.

The second solution, if you have no access to your old machine BUT you can log into your Launchpad account, is to add a new SSH key so that Launchpad will let the new machine access bzr branches, since it will identify the new key as belonging to you.

For this, on the Getting Set Up document you posted, follow the steps for "Create your SSH key" and "Upload your SSH key to Launchpad".

This will at least allow you to run bzr branch without problems.

So in a nutshell:

Run ssh-keygen -t rsa
Open .ssh/id_rsa.pub using a text editor (gedit will do)
Copy the entire contents of the file (one very long line).
Open https://launchpad.net/~/+editsshkeys on your browser
Under "Add an SSH key", paste the line from step 3, then click on "Import Key".


When I tried your install command it ask me for [J/n] (german version). So I called

echo n | sudo apt install docker.io

(because I didn't want to install) and it behaved as it was interactively, so accepting the "n" without need to push it. I expect the same for "J". Maybe something similar is working for you.


i solved my problem. I was choosing the wrong options in the Rufus program. It should be MBR for BIOS or UEFI and FAT32. This solved my problem.


ubuntu 13.10 liveboot/installer loads dots, then does nothing

When booting (on the Grub menu) edit the boot command and remove the "splash" flag from the command. That will let you boot into the live distro and install everything. Once installed, everything will work just fine.

More info here: https://wiki.ubuntu.com/X/Troubleshooting/BlankScreen


Please see http://maas.ubuntu.com/docs/nodes.html.

(this text is here to make up the ridiculous required minimum character count)


While using trial mode of live CD, if I install drivers, will it affect my main system?

When you boot any Ubuntu derivate in live mode, it stays in live mode as long as you don't mount any partitions from your disk into the file system. All data will be stored in a RAM disk. You can safely (lets say 99%) change everything you want, it will be gone by the next reboot.


How do I select a default sound card with alsa?

Find your desired card with:

cat /proc/asound/cards

and then create /etc/asound.conf with the following entries:

defaults.pcm.card 1
defaults.ctl.card 1

Replace 1 with number of your card determined above.
Source:
https://www.alsa-project.org/wiki/Setting_the_default_device


User session lost device settings or drivers while guest working fine

I think you need to read  this

To debug or resolve this, please try the following steps:

remove all users (including user 1000) from the groups audio, pulse, pulse-access then reboot (no user needs to be in these groups for audio!).

Is pulseaudio running? Watch out for errors when running the following in a terminal:

pulseaudio

log in to the Guest account. Does your guest user have sound?

From your affected user account issue the following command in a terminal:

mv ~/.pulse/ ~/.pulse.bak/  ## removes erroneous user audio settings
pulseaudio -k               ## restarts the sound server

Create a new test account to see if sound works there.

Do not run pulseaudio in system wide mode.

Is there an audio output sink at all? Read the output of the following command:

pacmd list-sinks

Remove all attached external sound devices including speakers, reboot and then plug them back in.

Further reading: Ubuntu Wiki: Audio


I had the same issue, but once I clicked in the small line at the bottom of the window which appeared to be showing a small part of the terminal interface, I was able to use the keyboard tab key to move to and highlight the  option, then press enter. This appears to have continued the installation process.


After adding PPA source for "skippy-xd", the package still cannot be found

LATEST EDIT: Short answer is: skippy-xd lacks a Build-Depends: dependency on the python package. That's why the PPA's automatic build fails and no package ends up being in the repository.

According to the PPA page the builds for raring amd64 and i386 failed february this year. Maybe you want to get in touch with the PPA owner or build the package yourself and see if you can fix it. You should be able to apt-get source skippy-xd and apt-get build-dep skippy-xd since the source packages are available through that PPA.

EDIT: Double checked, there are no binary packages for Raring inside that PPA. Quick hint on how to build yourself:

$ sudo apt-get install build-essential
$ sudo apt-get build-dep skippy-xd
$ apt-get source skippy-xd
$ cd skippy-xd-0.5.1~hg20111223
$ dpkg-buildpackage -us -uc -rfakeroot

Be prepared to see some mess. After all it did not compile on Launchpad compile farm and the PPA owner chose not to care about it.

EDIT2:

I just compiled it successfully on Linux Mint 15 (based on Ubuntu Raring) i386. Checking the build log on launchpad says:

dh build-arch
   dh_testdir -a
   dh_auto_configure -a
   dh_auto_build -a
make[1]: Entering directory `/build/buildd/skippy-xd-0.5.1~hg20111223'
python configure_environment_header.py
make[1]: python: Command not found
make[1]: *** [environment.h] Error 127
make[1]: Leaving directory `/build/buildd/skippy-xd-0.5.1~hg20111223'
dh_auto_build: make -j1 returned exit code 2
make: *** [build-arch] Error 2
dpkg-buildpackage: error: debian/rules build-arch gave error exit status 2
******************************************************************************
Build finished at 20130207-2027
FAILED [dpkg-buildpackage died]
******************************************************************************

It seems to me a mandatory Build-Dep is missing, which is a common error when the Build-Dep in question is available on the developers machine (python). That's one reason why there are build servers. Sadly the PPA owner did not care to check the build results.

CONCLUSION after the latest EDIT:

Build yourself and install the package by double clicking it with your favorite file browser. Create a bug ticket or contact PPA owner about this issue.

Have fun!!


What is installed by default that can be removed?

This question would be too long and broad to answer; on the other hand, uninstalling random packages is not really a good idea.

What you should do instead is (as suggested in the comments) perform a clean reinstall with a minimal ISO and select only the GUI amongst the packages to include (plus Inkscape, since you need it).


Accessing Windows files from Ubuntu live

Well, I've got nothing related to Ubuntu here but if anyone experiences the same booting problem, I managed to solve it after straight 12 hours trying and i guess i don't need to mention how accomplished I feel now :D. Well, I booted the PC with this Hiren's Boot
thingy and stumbled upon something when looking around. All I had to do was changing my disks' format back to GPT from MBR. I have no idea how they get to MBR in the first place. I haven't seen that as a fix anywhere so if you tried everything and couldn't solve the "reboot and insert a proper boot device" problem give this a shot. Also sorry for polluting the Ubuntu board with this but i hope this will do good for someone.


Yes, it does, it's called Terminal (gnome-terminal most likely). You can open it by searching for that name in the dash or by pressing CTRL + ALT + T.

You can also go into another TTY (your graphical session is running in one of them, probably number 7), to access them press CTRL + ALT + Fi (replace the i with whatever number you like, these are the function keys, so for your graphical system that would be F7).

If you want a tree of the directory and all of its sub-directories then I would suggest a tool called tree, it is not installed by default though so you will have to install it in Terminal with the command:

sudo apt-get install tree

Then it can be run with tree and you can find more information about how to use it in its manual page:

man tree

If you just want to list the contents of a directory then the pre-installed tool ls should do the trick for you (just run it with that). It also has a man page accessed in the same way as with tree.


Fresh Ubuntu 16.04 install hangs on reboot (i386 Server on Acer Travelmate laptop)

Who knows when/if this problem: "systemd-shutdown: Failed to finalize DM devices. ignoring." will ever be fixed on this old platform - nothing I've read would suggest it'll be anytime soon.

In the meantime, this work-around allows me to reboot my server without physically power cycling the machine.

All the following commands are under sudo:

Put these commands into a file such as ~/sysrq-reboot.sh
echo 1 > /proc/sys/kernel/sysrq
sync && echo b > /proc/sysrq-trigger
chmod +x the file to make it executable
then, to reboot just run the script with sudo ~/sysrq-reboot.sh

If running the script remotely via ssh, I find I also need to hard close my ssh window and re-establish a new ssh session (after waiting a minute for the machine to become reachable).


Make sure you have the latest version of Node installed! sudo apt install node doesn't install the latest version, it looks like you have version 4.2.6 and electron wants something newer or equal to version 4.5.0. Try installing node with this method:

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -

then type:

sudo apt-get install -y nodejs

(Source: https://nodejs.org/en/download/package-manager/)


The issue was resolved by connecting SATA DVD-ROM to a different SATA controller.

In the previous configuration DVD-ROM was connected to ASMedia SATA port, now it's connected to Z77 SATA. Apparently Ubuntu (and other Linux distros I've tried: openSUSE, CentOS) refused to boot with previous connection configuration. Windows (7, 10) had no obvious problems with old configuration.


Setting up JAVA_HOME and CLASSPATH correctly on 12.04

If I understand correctly the problem is not with java. The problem is in your log4j.xml file.

Inside the class org.apache.fop.util.ContentHandlerFactoryRegistry it would have a :
logger.error("Error Message/Exception") or
logger.debug . . .

something along these lines and it is trying to write it to your logger that you have set up.

Essentially, you want to have something like

<logger name="org.apache.fop">
  <level value="info"/>
</logger>

in your log file that will pick up logging messages from that class.

if you have multiple appenders then add

<appender-ref ref="appenderName" />

underneath the level tag.


Kubuntu bootloader overwritten by windows bootloader. Cant choose to run Kubuntu anymore!

Please follow this wiki tutorial:

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


You'll have to install the following packages to use SPICE in Ubuntu 12.04 / (tested up to 14.04):

python-spice-client-gtk          - GTK2 widget for SPICE clients (Python bindings)

This is needed for the graphical Virt-manager application.
qemu-kvm-spice                   - Full virtualization on amd64 hardware
spice-client                     - Implements the client side of the SPICE protocol
spice-client-gtk                 - Simple clients for interacting with SPICE

From the command line:

sudo apt-get install python-spice-client-gtk qemu-kvm-spice \
                     spice-client spice-client-gtk

Then reload the Libvirt service:

sudo service libvirt-bin restart

and don't forget to close and restart your Virt-manager application.


On my system, I do have a context menu key.

In a terminal, when I run xev, which should be present by default on your system as well, I see this output (in part):

KeyPress event, serial 48, synthetic NO, window 0x2000001,
    root 0x96, subw 0x0, time 12548175, (334,-138), root:(588,185),
    state 0x0, keycode 135 (keysym 0xff67, Menu), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 48, synthetic NO, window 0x2000001,
    root 0x96, subw 0x0, time 12548242, (334,-138), root:(588,185),
    state 0x0, keycode 135 (keysym 0xff67, Menu), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

If you want to know more about xev, this maybe informative: Weekend Project: Configure Your Keyboard Into Submission

I suggest you try to bind a convenient spare keyboard shortcut to "Menu" using whichever method your distro provides and see if that works for cases where you know or expect that the right-click effect isn't the same as pressing on the Menu key.


get dpkg --get-selections equivalent list from dpkg.status.0

Basically from what im thinking is that all applications in /var/backups/dpkg.status.0 have install ok installed line so you will only have to use this command to get same output of dpkg --get-selections: grep "Package" < /var/backups/dpkg.status.0 | awk '{print $2"\t\tinstall"}'. Check it.


Cause they messed up the URL. It should be http://releases.ubuntu.com/releases/trusty/

What you are looking for is:
http://releases.ubuntu.com/releases/trusty/ubuntu-14.04.1-server-amd64.iso


Wireless connection drops every 30 seconds on an Asus EEE PC with an Atheros card

I Had the same issue after upgrading to 12.04 where the Wireless connection was dropping every 30 secs.Here's what I did . Right click on the Wireless Icon on top of your screen ->Edit Connections -> Wirelss . Then Click on your Wireless Connection and Click on Edit the Wireless Security , Check the Available to all users box , make sure that the Network Key is entered , save the setting and come out . This fixed my problem. hope this helps.


How to convert /tmp partition in to other format ? also give some details about /tmp partition?

The directory /tmp is, as name might indicate, for temporary files. Do not store any data there, as it can be removed. Also, you probably do not need 100 Gb for temporary files.

Remove the /tmp entry from /etc/fstab. That way, /tmp will be just on the root partition (the one with the system files), and you will be able to use your 100 Gb partition for something else.

To do that, open a terminal and type

sudo cp /etc/fstab /root/fstab.backup

This makes a backup of your current fstab, should anything go wrong.

gksudo gedit /etc/fstab

Locate the line containing /tmp and replace /tmp with /data. Save the file.
Make sure that /tmp has the correct permissions:

sudo chmod a+rwxt /tmp

Create the mount point for data:

sudo mkdir /data

Now, your 100GB partition will be mounted under /data, and the contents of it will not be removed.

To use it as user, you need to give yourself permissions to write on this partition. For example, create a directory and change it's ownership to "muhammad" (assuming that is your username):

sudo mkdir /data/Videos
chown -R muhammad:muhammad /data/Videos


Maybe this side helps you: http://linuxtricksandtips.blogspot.de/2010/12/how-to-use-alcatel-one-touch-x220l-3g.html
I haven't tested the instructions given on that site but it looks right because the instructions are almost identical to the steps required to get an iPhone working as an 3g modem with ubuntu.


Displaying the system time in Empathy status

Hmm. I don't think it is. Have you had any success with that? I've been using Pidgin, and it doesn't work. I also tried Empathy, and no luck there either. I know that in iChat you used to be able to do that, but I haven't used a Mac in ages, and that doesn't answer your question. I don't think it's possible yet.


How to configure SSH username and pass on Ubuntu server 14.04.1

I just need to know how to configure username and password.

ssh uses the same usernames and passwords as the system it is running on.

In other words, a username and password that you can use to login to the system from the keyboard will also work when logging in via ssh.

(Some of this can be changed via the config files but you indicate that you are just using default configuration.)


Again go to Settings -> Display and reset the zoom level to 1.

As for knowing the version of Ubuntu go to Settings -> Details

First check the current scaling factor by : Open Terminal and type the following :

gsettings get com.ubuntu.user-interface scale-factor

This will produce something like this :
{'VGA1': 15} or {'HDMI-0': 16}

  (Note: There may be multiple values such as {'VGA1': 8, 'HDMI0': 8, 'DVI1':15})

If the value is something greater than 8, it should be set to 8. This represents the default scaling factor (zoom level - 1), as far as i have discerned. (In this case, DVI1 has to be set again to value 8)

Type the following in terminal :

gsettings set com.ubuntu.user-interface scale-factor "{'VGA1': 8}"

  ('VGA1' has to be replaced by the appropriate display port that you get in the previous step)


I think if you install the Hangouts Plugin that wont be a big problem any more.

This similar question might be helpful: My Google Hangouts is crashing on a fresh install of Ubuntu 14.04 on LightDM


sed add line (without spaces at the beginning ) after match (script using variables )

You need to escape the space, otherwise sed will ignore it because /pattern/atext and /pattern/a text and /pattern/a       text is interpreted the same.

Use this:

sed -e "/${search}/a${add// /\\ }" ./test.txt


Can not get .Trash-1000 working on NTFS auto mount?

You have uid-1000. It should be uid=1000.


Not able to copy any folder from samba share network

Can you specify the total size of the data after which the copying stops?
Also you can use the following:

mount -t smbfs -o lfs //server/share /localdir

lfs tag allows transfer of large files


Antivirus: pros and cons of quarantine and deleting (ClamAV particularity). Clean option

With quarantine, you can check the status of your quarantined items, restore or delete individual quarantined items, or simply empty the whole quarantine.

so if you found a false positive you can restore it.

This FQA is helpful: http://clamtk.sourceforge.net/faq.html

All antivirus does clean infected files with different degree based on the type of malware.


Is it possible to achieve HA using the rabbitmq-server juju charm?

I think there is a branch dedicated to the development of rabbitmq-server that supports mirrored queues:

https://code.launchpad.net/~openstack-charmers/charms/precise/rabbitmq-server/active-active

See iif this can help you


Prevent application from processing keyboard shortcut

I don't know if there's a way to force fullscreen Citrix to always ignore certain keyboard shortcuts, but here's a useful workaround:
Within a Citrix fullscreen session, Ctrl+F2 will pass (some? all? not sure) keyboard shortcuts through to the host OS, i.e. Ubuntu, for a short time. I use it for Super+Tab to switch app windows, and I confirmed that it works for Ctrl+Alt+Up/Down.
See Switch to host desktop from citrix session.


Login on 12.04 LTS slow after moving /home to separate HDD

how about Keeping the home folder on the SSD and deleting the music,doc dwnld and all the other folders that come in the home ..create a short cut to the HHD in the Home Folder and re create those doc. music. dwnld folders in the HHD

Pros -will solve your problem

Cons -it will be an extra click

..sometimes the simplest answer is the best one


Is it preferred to avoid use of "exit" in bash scripts as much as possible?

Quoting 'Code Complete'

  Use [exit] when it enhances readability In certain routines, once
  you know the answer, you want to [exit] to the calling routine
  immediately. If the routine is defined in such a way that it doesn’t
  require any further cleanup once it detects an error, not [exiting]
  immediately means that you have to write more code.

So normally one exit is preferred (people looking at your code don't have to find the correct exit statement), however with error checking (especially at the start of a program/routine having multiple exit statements is clearer.

Your example is borderline, however I would say that the second is preferred so that maintenance to your program/script can leave it tidy.

Your program currently is (in psudocode)

if error condition 1
    // Show error message 1
else
    // Do stuff
fi

or

if error condition 1
    // Show error message 1
    // exit
fi

// Do stuff

Once your program has grown, you realise some more ways that the program can fail. Your program now becomes

if error condition 1
    // Show error message 1
else
    if error condition 2
         // Show error message 2
    else
         if error condition 3
             // Show error message 3
         else
             // Do stuff
         fi
    fi
fi

or maybe

if error condition 1
    // Show error message 1
else if error condition 2
    // Show error message 2
else if error condition 3
    // Show error message 3
else
    // Do stuff
fi

versus

if error condition 1
    // Show error message 1
    // exit
else if error condition 2
    // Show error message 2
    // exit
else if error condition 3
    // Show error message 3
    // exit
fi

// Do stuff

In my mind, the last one is the clearest  in being able to spot which is the error cases and which is the main flow of the program. Now add returning different values (eg. 0 on success, 1 on error 1, 2 on error 2, etc.) and the difference will become more pronounced.


Libre office format and wps and ms office are not correct

The Google Docs web app does a better job of preserving the original formatting of an .odt document than LibreOffice Writer does when converting it from .odt to .docx format. Google Docs can also edit .docx documents natively in case you want to make any revisions in the document before downloading it. As you can see in the screenshot the document that I imported to Google Drive contains a spelling error that can be corrected in Google Docs before downloading the document.

Save the document in LibreOffice Writer so that it looks right in the default .odt format.
Visit your Google Drive webpage.
Import the .odt document to Google Drive.
Right-click the .odt document you imported and select Open with -> Google Docs.
In Google Docs select File -> Download -> Microsoft Word (.docx) which is marked by a red arrow in the below screenshot.


Path name with accented character and space

Yes. The accented character should not be an issue. Use "'s (double quotes) for the space.
path = "/home/Senis/Serveur/Batiment/BÂTIMENT-ICI 2020/D20-44 Ibalt"

Probably this will work too:
path = /home/Senis/Serveur/Batiment/BÂTIMENT-ICI%202020/D20-44%20Ibalt


Network bridge disconnects and reconnects to Xbox 360

check the auto connect settings under the ipv4/6 settings under your ethernet connection in network manager, if its set to "connect automatically" it will just keep connecting and disconnecting.

your other issue after you change that will be that your ethernet connection may say "connected" and then "disconnected" but not go back to connected. to fix this you need to set your dhcp stuff up properly (depending on what your setup is) if its anything like mine (usb wireless broadband modem, xbox connected via ethernet cable; then follow this tutorial: https://help.ubuntu.com/community/dhcp3-server

one thing though with the above tutorial is you will needlessly need to replace the code in the first file, i dont know why but i replaced it with the last section of code.

im using ubuntu 11.10

give that a go.


How to add MP3 encoder in sound Converter ubuntu 15.10, 14.10 or 14.04

You will get it by installing the gstreamer plugin containing the mp3 codec:

sudo apt-get install gstreamer0.10-plugins-ugly


How Do you set up numlockx at startup in ubuntu 14.04

Try adding this line:

greeter-setup-script=/usr/bin/numlockx on

to the file /usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf.

however this file will be overwritten when the unity-greeter is upgraded. For a more permanent solution, add these lines:

[SeatDefaults]
greeter-setup-script=/usr/bin/numlockx on

to a seperate .conf file that you create in either the /etc/lightdm/lightdm.conf.d/ or in the /usr/share/lightdm/lightdm.conf.d/ folder.

thanks Gunnar Hjalmarsson for pointing that out


Graphics in wine are behind by one update

Just call export vblank_mode=0 before runing wine sketchup


I installed OpenBoard but there's no way to open it

It seems this is a broken snap that appears in software centre. There seems to be someone building packages for the Ubuntu based MAX OS: https://github.com/OpenBoard-org/OpenBoard/issues/138#issuecomment-406240747


xbacklight works, system settings don't affect

Buggy driver. You can try adding the options acpi_osi=Linux acpi_backlight=vendor to grub

sudo gedit /etc/default/grub

Add the following parameters to grub configuration:

GRUB_CMDLINE_LINUX="acpi_osi=Linux acpi_backlight=vendor"

Update Grub:

sudo update-grub

reboot


I've just tried it while running a YouTube song in the background. Even after the screen got locked the song kept playing. Machine didn't switch to sleep.

So, yes. Screen Lock after 'X' minutes, just locks the screen but the process keeps going on unless the system sleeps.

PS: I don't have enough points to post a comment so, had to post this as an answer. Hopefully it helps.


Error when installing opencv (any version) on Ubuntu 18.04

This error means that the libavcodec (directly installed on your system or in-directly installed via FFmpeg) library present on your system is not built as a "shared library". And OpenCV by default has a cmake (configuration) option BUILD_SHARED_LIBS as ON on most platforms and on Ubuntu 18.04, its ON. You have at least 3 options to deal with this:

Configure and Build OpenCV as static by setting OpenCV's cmake configuration BUILD_SHARED_LIBS=OFF before executing make as follows:
  cmake -DBUILD_SHARED_LIBS=OFF ../opencv && make

Configure and Build OpenCV without FFmpeg (ON is the default build option on most platforms including Ubuntu 18.04) by setting OpenCV's cmake configuration WITH_FFMPEG=OFF before executing make as follows:
  cmake -DWITH_FFMPEG=OFF ../opencv && make

Build libavcodec as a "shared library". However, libavcodec is a part of FFmpeg and I know only how to build it along with FFmpeg. You can try searching for ways to build libavcodec alone as a shared library without building all the extras that come with FFmpeg, though I am not sure if OpenCV needs the rest of FFmpeg anyway as I only tried building the entire FFmpeg package along with OpenCV. Anyone who knows better, feel free to edit this answer. Since FFmpeg is very often built with other libraries, I am including steps to build libx264 also as a shared library as an example.. other libraries will probably have similar configuration steps to build it as a shared library. You may ignore the first line of command as well as the --enable-libx264 option in FFmpeg config if you don't need x264 encode support in FFmpeg. Here I am gonna install the X264 and FFmpeg libraries system wide but you may want to install to a local folder instead:
  git clone https://code.videolan.org/videolan/x264.git && cd x264 && git checkout remotes/origin/stable && ./configure --enable-shared && make -j12 && sudo make install-lib-shared -j12 && cd ../;
  git clone https://github.com/FFmpeg/FFmpeg.git && cd FFmpeg && git checkout remotes/origin/release/4.3 && ./configure --enable-gpl --enable-libx264 --enable-shared && make -j12 && sudo make install -j12 && cd ../;
  git clone https://github.com/opencv/opencv.git && cd opencv && git checkout 1363496 && mkdir build && cd build && mkdir install && cmake -DBUILD_SHARED_LIBS=ON ../ && cmake --build . --target install -- -j12 ;

In the commands above ../opencv is the path of the root directory of OpenCV source code and the command is being executed inside a temporary build directory. For more guidance refer here. Also, I have checked out the most recent stable release version for each package as on the original date of this answer.


How do i change genymotion installation location?

Running the installation script with ./genymotion-***.sh fixed the issue.


I don't know If I understand - you want host sites on ubuntu-server @ Virtualbox, but want to see it at host system (Windows)?

If yes - in your virtual machine settings (you must power off machine - not suspend - to change this), in network config, set Bridged or try another options - I'm tried this a year ago and I don't remember. But If you make correct settings, you're able to see webpage hosted in guest (Ubuntu Server) in host (Windows).

This is very dependend of configuration and, for example:

your network gate is router with DHCP
all machines connect to internet by router and got IP from DHCP

So:

in guest virtualbox config: set adapter mode to bridged and select correct interface from host
in guest OS set same settings as host OS

Now, your guest will be available same as real machines - you can access HTTP server in local network (example: 192.168.1.1xx).

Other way is internal network, maybe using VBox DHCP server. Read more at http://www.virtualbox.org/manual/ch08.html


evolution: how to change the subject format of forwarded emails

The default settings for replying and forwarding can be changed under

Edit ▸ Preferences ▸ Composer Preferences ▸ General ▸ Replies and Forwards ▸ Forward style


Will I be able to turn off unity launcher

You will be able to select the normal GNOME desktop at login, much like you now can select different installed Desktop Environments (like KDE, XFCE, ...).


Unity is locked, you can not remove icons or move them

You seems using unity-2d , just logoff and select unity-3d and try .

Logoff ---->

Click on the icon in the picture.

Choose 3d and login .

Now try , and reply .


Cannot install Skype due to dependency errors; dpkg doesn't install dependencies

Well, as far I as know, dpkg can not resolve dependencies, but because you have Ubuntu Lucid 10.04 installed , you can use "Gdebi" *(gui tool and resolve dependencies)*just doble click in the .deb package.

Another options is... you can run sudo dpkg -i package.deb (it will not a complete install with error dependencies).
After that you just run sudo apt-get -f install and the apt-get tool will correct the missing dependencies.

Hope this will useful!.


How can I see in Lubuntu what RAM modules I have?

One way to do this is installing lshw or lshw-gtk:

sudo apt-get install lshw-gtk

You can then run it (sudo lshw-gtk) and check your RAM entry:

As you can see in the image above, I have 2 RAM sticks installed, of 4GB each.

An other way is to use the command line version (showing partial output):

$ sudo lshw -class memory
*-memory
   description: System Memory
   physical id: 19
   slot: System board or motherboard
   size: 8GiB
 *-bank:0
      description: SODIMM DDR3 Synchronous 1067 MHz (0.9 ns)
      product: HMT351S6BFR8C-G7
      vendor: Hynix Semiconductor (Hyundai Electronics)
      physical id: 0
      serial: 3B3BD95E
      slot: DIMM_A
      size: 4GiB
      width: 64 bits
      clock: 1067MHz (0.9ns)
 *-bank:1
      description: SODIMM DDR3 Synchronous 1067 MHz (0.9 ns)
      product: HMT351S6BFR8C-G7
      vendor: Hynix Semiconductor (Hyundai Electronics)
      physical id: 1
      serial: 3F114A3B
      slot: DIMM_B
      size: 4GiB
      width: 64 bits
      clock: 1067MHz (0.9ns)


Playing audio stream not showing in pavucontrol

I got the solution, it was a simple case of the monitor being muted.
In pavucontrol go to input devices, then in the show button at the bottom switch it to All input devices. I believe it's normally set to all except monitors, so the monitor doesn't show up. In my case it was this monitor that was muted, but I could still hear sound because the internal audio wasn't muted.
Hope it helps someone


Udev rules start Application, but does not seem to persist

Although not a proper solution, I eventually worked around this issue by running a cron job every minute that checks if the app is running, and if not then starts it.


exFAT is not yet fully supported by the kernel.

Microsoft released the full specs of exFAT just recently and now the full implementation is being merged into the kernel, you'll probably have to wait for a full exFAT support, it's supposed to work with Linux kernel 5.4 while the current one is 5.3 and Ubuntu Eoan Ermine is using 5.2.

We're talking about 2020 for an Ubuntu version with full support.

sorry :(


Ubuntu 14.04: Installation of `vega` package of `npmjs`

The following commands fixed the problem.

sudo apt-get install libcairo2-dev
sudo apt-get install libjpeg-dev
sudo apt-get install libgif-dev


What program will display live stock quotes in the top bar?

plasma-widget-stockquote

  Displays stock quotes on the desktop pulled from the yahoo servers.

It is a KDE plasma widget.

Oh and in case you want it answered: Ubuntu switched from gnome to unity and that means the top bar is fairly locked to what it can do. Plasma widgets are a good looking alternative.


How to delete a file from the GRUB terminal?

This only affects your computer's ability to boot from the HDD. You can still boot into a live system from usb and delete it in the live session.


After updating i couldn't hear the sound

Have you gone into the Sound settings and ensured that the correct output is selected.  Go to "Dash" and search for "Sound."  In the list items try each one while sound is playing.  Or you can also use the "test sound" button as well.


How can we find which process is using a particular port?


Sadly, its a bug, but it can be solved. When You Login, before entering password, their will be setting icon. Click that select another Session & now do some changes then reboot & see your settings will be saved. I had same issues.


How to substitute the nth occurrence pattern in VI editor

Well, you could select the third line using 3 then use interactive mode (gc)

:3s/the/THE/gc

You get

replace with THE (y/n/a/q/l/^E/^Y)?

press n (no) n y (yes) q (quit)


Is it OK to delete uninstalled packages from Ubuntu?

If they're 'uninstalled', they're not present on your system, so don't need to be deleted.

This number is just the count of packages available in the repositories, but not present on your system.


Why linux Os automatically sleeps after 2 seconds and prompts a password to wake up?

Without knowing exactly what's failing it's hard to say what to do to fix it, but it sounds like a display or desktop / window manager problem. But try booting from a good live ISO first, maybe it's a hardware problem.

Reinstalling everything is rather extreme, but it could actually be faster depending on whether you can get to at least a text-only terminal and how familiar you are with terminal-only tools like apt, dpkg, and aptitude (it's a nicer gui-like terminal package manager.

First, backup any important data you wouldn't mind having deleted - reinstalling OS's and overwriting homes is rather high-risk for data loss.

If you can login to just a text-only terminal, try these:

It's possible some config files in your home are messing up your gui desktop, activating the screensaver & locking the desktop after a second or two. Try adding a new user with
sudo adduser newguy
then see if you can log in normally as newguy - if you can, then erase your old home config files and copy over the "good" ones from newguy.
Maybe only reinstalling the window manager is something to try, or the desktop packages? If you can log into just a text terminal, you could search with apt and/or dpkg and/or aptitude to see what's installed now, and remove & install again?

I don't know which ones you're using, but there are some "metapackages" for many desktops, like unity, lxde, xfce, xubuntu-desktop...
Or packages for just the display managers or window managers, like xfwm4 for xfce, or kwin-wayland or kwin-x11 for k.

Running dpkg -l should list all installed packages, with short descriptions too (save to file by adding > file or pipe to less with |less), looking in there should be enlightening as to what to try removing & re-installing. Try looking for "manager" or "window" or "desktop" or a common name like xfce, xfwm, unity...
See this other Q How to list all installed packages for more info, and there are other questions about "what desktop am I using" too.

Then try apt remove [package] or apt purge [package] followed by apt install [package] with some important-sounding packages.

Depending on the time it takes you to learn the search/install & the success you have, just backing up all data & re-installing the whole OS may be a tempting idea too.


Is it required to have two separate EFI partitions when dual booting with Windows?

You can and should use one EFI partition for all OSes installed.

The only concern is if you have many OSes that there is enough space on it. But in most cases this is not an issue since efi files are small.