ssh without opening the ports I usually provide solutions for my friends for fixing issues on their ubuntu machines. Most of them use shared internet connection over LAN where they cannot open ports for allowing me access their machines over ssh. Is it possible to ssh into a machine without opening ports. For example services like Teamviewer allow users to just accept a connection request from outside, and if the owner of the machine permits, then the machine can be used by authenticated users. So, similarly, if the owner of the machine permits, with some kind of authentication, one should be able to get ssh access to a machine without opening the ports on the NAT router.

You can do this over Empathy's backend (telepathy) through another application called ssh-contact.

I haven't used it personally, but it seems to me like a good way of getting two novices to SSH into each other.

Of course another method would be to have them SSH to you (I assume you're competent enough to manage your port forwarding) and forward a port back to a ssh server on their machine.

Get them to run:

ssh -R 48724:localhost:22 your_username@your_ip

You obviously might not want them logging in as your user so you could create another user and have that just for SSHing. There obviously has to be a modicum of trust between you and the other user.

And then you run:

ssh -p 48724 their_username@localhost

I'm using a high port so root privileges aren't required.

Of course, they'll need openssh-server installed for you to connect but that's a simple sudo apt-get install openssh-server

With straight-up ssh this is not possible.  However, there is likely some other tool that would accomplish what you are trying to do.


Popup during boot up initializations: "VBoxClient: the VirtualBox kernel service is not running. Exiting" Neither is my OS virtualized inside VirtualBox nor do I have any VirtualBox packages installed (at least no packages matching "virtual" or "vbox").

Still, on every boot up (in the end of the phase displaying the gnome foot and the 3 blinking dots) the following message pops up in the upper right corner:

VBoxClient: the VirtualBox kernel service is not running. Exiting

I believe this causes boot delays.

I had the same trouble. Because no virtualbox was installed, i typed on terminal as root " locate virtualbox" and I could see ' virtualbox-guest-utils' & 'virtualbox-guest-x11' VBox in '/etc/init.d. But the troubles remained, because there is another file to delete in /etc/X11/Xsession.d/98vboxadd-xclient. Only deleting it as root, I finally eliminate the message.
I suppose that the truble is connected with deleting wine ochanging it in some way

I just had the same problem, then realized that I didn't have the build-essential package installed. So the guest additions were only partially active.

sudo apt-get install build-essential

then
Mount your guest additions and run them. Double check the install log to see if it found make and gcc and was successful.

Then hopefully your error should be gone.


Restore previous applications on restart in Ubuntu 13.04 easily? How to restore previous applications when I restart the computer in Ubuntu 13.04? This post (How do I save/remember last-used window position and size for applications?) is not in 13.04 and I actually tried to use what Lucio suggested in the post, (i.e. dconf -> org -> gnome -> gnome-session and click on checkbox), but it didn't work at all. Even if what izx suggested in the post works on 13.04 too, which I don't know it does, do I have to spend three hours just setting the functionality of restoring previous applications on? OS X offers it either on default, or force you to just three minutes work. Is it feasible to do such a minimal work and still get what I wanted? Sorry but I don't think it is worth three hours to just set restoring my applications on.

Thanks.

I use CompizConfig Settings Manager to set my applications on specific workspaces on specific coordinates.  E.g. psensor always in the top-right corner of workspace (WS) 2, liferea always in the top left corner WS2, boinc in the lower left corner of WS3, ...

All these applications also get added to "Startup Applications" so that when I log on, everything is in the right place and open...

Instead of logging off I also use TuxOnIce to hibernate my machine so that ALL applications currently running get back where they were.

IMHO, if you spend 3 hours every time to set up your environment, you'd better spend that time configuring things...

Good enough??? ;)

If you are running Virtual Machines(either VMware or Hyper-V) you can just save the state of your VM.

Then when you restart it from your Hyper-V Server Manager, it will be at the same state it was before.

For instance:

Go to the Hyper-V Server Manager in Windows
select your running Ubuntu VM
Right click with mouse
Click Save
VM state will be saved
After it's saved when you restart it it will be @ the same place you
left it....

Then Bob's your uncle! :)


How to change Ubuntu 14.04 drum beat tone? I want to change the drum beat tone in my Ubuntu 14.04 and replace it with a new one. So I downloaded a new tone. I searched in Google to do this and I tried 4-5 links I found. But nothing happened, the drum is still beating. Actually is the drum beat start up tone or system ready tone ?

Can anyone tell the correct procedures to change the drum beat tone in 14.04 ?

I found the answer myself. The drum beat tone is actually system ready tone.

So I went to /usr/share/sounds/ubuntu/stereo and renamed "system-ready.ogg" to "system-ready.ogg.old" and copied new sound file.
The new sound file should have the name "system-ready.ogg".

During the next start up the new sound will be heard instead of drum beat.

Check this thread: How do I change startup sound. The steps are already posted.

If you are looking for new audio files, you can check these links.

http://www.omgubuntu.co.uk/2014/04/sam-hulick-ubuntu-start-sound


why sh and ./ providing diffent output for the same script $ sh emp1.sh
Enter the pattern to be searched:
$ ./emp1.sh
Enter the pattern to be searched: \c

Contents of emp1.sh script

$ cat emp1.sh
#!/bin/bash
#emp1.sh: interactive version uses read to take input

echo "Enter the pattern to be searched: \c"
read pname
echo "Enter the file to be used: \c"
read flname
echo "searching for the pattern $pname from the file $flname"
grep "$pname" $flname
echo "Selected records are shown above"

Provide me why their is difference in first line why \c is their in second line.

$ sh emp1.sh
Enter the pattern to be searched:
$ ./emp1.sh
Enter the pattern to be searched: \c

There are two different shells in fact. One is /bin/bash and other is /bin/dash. And /bin/sh is actually a softlink of /bin/dash. To verify it, write in terminal,

which sh

you will get output: /bin/sh

Next type ls -l /bin/sh in terminal, which will return something like,

lrwxrwxrwx 1 root root 4 May 16 20:23 /bin/sh -> dash

Which shows the fact that sh is a softlink of /bin/dash. you can try further which dash.

Actually bash is sh with more features and better syntax. Both of them have almost same commands, but they are different.

What is happening here

When you are running sh emp1.sh then script is handled by dash but when you run ./emp1.sh due to the shebang line(#!/bin/bash) on top of the script bash shell handles it. So you get slight different formatting in output. Keep in mind bash has some improved syntax.

The output is different because you are using two different programs.

In the first case sh emp1.sh you start a program named sh and tell it to execute the instructions in emp1.sh. That program sh is probably the bourne shell (sh), a bourne again shell (bash) trying to emulate the classic shell (and thus reacting differently from its native mode), dash or even anything else.

When you use ./emp1.sh you try to execute the script empt1.sh itself. Its first line contains a shebang and an interpreter (#!/bin/bash) telling it that it needs to use bash (and all its features).

That means you use a different program/mode than in the first case. And you get different output.

To verify this, try one of these two:

/bin/bash emp1.sh  (which should produce the same output as the ./emp1.sh)
Or change the first line to #!/bin/sh.


crippling repeating "pciehp card not present" notifications When using ubuntu (12.04, both installed and on a live usb) I get a lot of these messages:

pciehp 0000:00:1c.5:pcie04: Card not present on Slot(37)
pciehp 0000:00:1c.5:pcie04: Card present on Slot(37)

And with a lot I mean about 20 per second. This has a crippling effect, and I would like to get rid of it :)

The computer is a packard bell easynote  BG48-U-100 DC.

I tip I picked up from some fedora/redhat error here was to look at lspci -vnn. I have pasted the part about "00:1c.5" here: http://pastebin.com/0sfsiqW2
For what good it may do, here is the lsmod of my machine: http://pastebin.com/DQZy1kAL

From that first pastebin I think to conclude that it has to do with the module shpchp, which seems to me (aka: google) to have something to do with ACPI. That's as far as I've come in disecting this.

Can anyone help me along further? What can I do, check etc?

I did see this topic but my intentions are not to surpress the error message: I know how to do this (from that topic ;) ), but I'm looking for a real sollution.

Finding the problem on the internet does suspect me to believe it is neither an ubuntu specific nor a packard-bell specific problem.If you google the problem it seems that is present on several other distribution/hardware combo's as well, and it looks like the advice is to remove one of the drivers? I have no clue as to which driver I should look at and and what would be the effect of just removing it.

I have seen this topic which is old-ish, but describes my problem and is about a similar computer. The solution in this topic was to compile a new kernel using a spanish guide, which seems a bit extreme to me, so I'm kinda hoping for a better solution than that.

edit: I just tested on 12.10 which still has the problem

On the account of surpressing: I can surpress it in the syslog, but the IO still goes on. I do also see the mentions in dmesg, and in one of the consoles. Even a way to surpress all these things would be a help at this point.

Another test also shows that a quick Fedora boot has the same issues on this machine

I tried the following patch-methods, and listed why they didn't work for me:

Bios features: nothing I could do in the bios would effect the hotplug problems I have.
Suppressing errors. The blacklist didn't reliably work for some reason (I might have done something wrong, I admit) and as I said, it isn't a real sollution. The polling still would've been going on. Apart from that, the messages would also show up in the tty's, in the DMESG, etc.
Unloading modules: the modules were compiled into the kernel, so blacklisting or unloading those doesn't work.

In the end I did compile my own kernel, using this manual:

https://help.ubuntu.com/community/Kernel/Compile

and specifically the "alternative" method. There is no need for all the fancy different flavors if you just need to remove one thing, so I copied my old config (as explained), removed the hotplug stuff, and waited for the compile to complete.

Hit up the bios and disable your Power features. Cool N quiet/powernow and or whatever intel has.
Look for pcix powerstate features as well. Cause it does sound like a hotplug issue, that will at least troubleshoot that.


Install grub from live CD I have installed my Ubuntu onto a partition on the same drive where my windows is. I would like to install GRUB, but cannot access the Ubuntu installation as Windows starts instead. I am in the USB Live Version trying to install grub but I get this:

  grub-install dev\sda4

  cannot create directory /boot/grub/i386-pc permission denied

Please help me install GRUB.

NO NEED TO RE INSTALL!
You can use what is called a chroot to access your installed partition from a live CD. See How to chroot Ubuntu using Live CD to fix GRUB rescue prompt.
Basically how it works is you boot of the live CD and mount your Ubuntu install.  You run chroot, and you are dropped into a command prompt for the installed Ubuntu instance instead of the CD. The guide above should tells you what you need to do.

I thought that grub was installing automatically... Try re-installing. At the Ubuntu Set up choosing thing (where you can select dual-boot or replace windows) select the option with the gear. Now select the Ubuntu partition, remove it and re-create it. Re-install Ubuntu and grub will install automatically (I think, it did so with my installation).

The option with the gear is the bottom one (in ubuntu 12.04)


Wireless won't connect in Ubuntu 13.10 I have now worked a while with Ubuntu but still not really into it.

However everything worked fine after the Installation, now about after a weak I'm getting issues with my wifi. In the beginning all worked as it should.

But then it got slower and slower and even completely stopped sometimes, so that I had to reconnect to my network. But since yesterday I'm not able to connect to my network at all.

It just loads and loads and after a few minutes it says disconnected. Now I tried to delete it and reconnect to it and when I enter the passcode for my network and I click ok it tries to connect, but after a minute or two the box appears again but with my passcode already entered.

I am sure the passcode is right

So my question: How can I get my wifi back to work?

delete the connection
and run following command in terminal

sudo service networking restart


How to make the Unity Launcher to be transparent? How to make the Unity Launcher to be transparent ?

You can't but you can make the top panel transparent.

U can make the top panel transparent using compiz setting manager.
Compizconfig Setting Manager ---->ubuntu unity plugin ---> experimental tab.


run Ubuntu Touch Developer Preview on desktop? Is there a way to run the Ubuntu Touch Developer Preview in an emulator or VirtualBox on 13.04 desktop? Id like to develop a cross-platform app but I do not have a device I can flash the touch preview too for editing.

https://wiki.ubuntu.com/Touch/Emulator
This shuld work to create an Ubuntu Touch emulator, it did for me

Good luck!


Ubuntu 15.04 not loading after clean installation (hangs at "GRUB loading.") I bought a new Laptop. Lenovo Y500 with the Intel Quad and GT650 SLI configuration. (maybe this is important)

I set the whole thing up to load Legacy BIOS primary. As usual I installed on the HDD Windows. In parallel, I installed Ubuntu on the internal mSATA 16GB SSD. Creating only 2 partitions, root and swap, both in the SSD. Also the bootloader is placed on the SSD, so I manually decide on every boot which drive and for that which OS should be loaded.

After the installation Ubuntu keeps only loading a black screen. When I hold Shift while staring, I get a GRUB loading. and absolutely nothing more. I cannot even switch with Ctrl-Alt-F1/2/3... to any console. Odd thing is that Ubuntu runs fine, when I start it in live-mode directly from the USB-drive.

I'm kinda clueless how to solve this problem, cause I'm not that "pro" with Linux, but like to do little works with it. Just tried to install 15.04, the "beta" 15.10 and for variety a Mint distro with Cinnamon. All leading to the same problem.

Since nobody seems to have a clue, what's wrong with my book (which should truly not be a reproach) i just tried a few more things myself. Like using another tool to create a bootable USB drive, swap partition size, using another drive etc. Nothing seems to work...
Finnaly i found an unremarkable comment in a lenovo forum, which tells, that the problem is simply the UEFI system, which is always loaded first, even if you choose to use legacy BIOS only. For that you should use a full compatible UEFI Linux distro like Fedora. So i downloaded the newest image, burned it on my USB drive and got exact the same problem booting it the regular way. Not even the live mode works. But the Fedora image provides, in contrast to the Ubuntu image, another "EFI boot" menu entry. Booting this works fine and also after the installation it keeps working. You not even need to install any nVidia drivers or edit the boot options.
WiFi, Bluetooth, brightness control, SLI ... all this seems to be supported out of the box.
It's not the prefect solution, cause i'm Ubuntu fan, but if it's not working ... well, it's not working.
Hope this helps users of the same notebook-model, which can't get started with linux too, becase of the configuration.


How can I install on a non-PAE CPU? (error "Kernel requires features not present on the CPU: PAE") After burning Ubuntu 12.04 to a CD, I tried booting and got the message:

This kernel requires the following features not present on the CPU:
pae

Unable to boot - please use a kernel appropriate for your CPU.

What does this mean?

The error message means that your CPU does not support PAE extensions - that is a technique which allows a 32bit CPU to address more than 4GB of memory address space.

By default, 12.04 and later versions of Ubuntu expects a CPU with this capability:

  PAE is provided by Intel Pentium Pro and above CPUs, including all
  later Pentium-series processors (except the 400 MHz-bus versions of
  the Pentium M). It is also available on other processors with similar
  or more advanced versions of the same architecture, such as the AMD
  Athlon[dubious – discuss] and later AMD processor models.
  wikipedia

While the above is strictly true, old systems which have the memory controller on the motherboard may not "expose" the CPU's PAE support, effectively making them non-PAE.

There is a heated bug report about this; Canonical has decided that the default Ubuntu Desktop install will expect PAE support.

A few suggested workarounds:

Workaround 1: Install Lubuntu or Xubuntu, then install the regular Ubuntu Desktop

Install either Lubuntu 12.04 32-bit or Xubuntu 12.04 32-bit; both of these use a non-PAE kernel by default.
Once you boot into your new Lubuntu/Xubuntu, you can then switch to the default Unity desktop by installing the ubuntu-desktop package.

Workaround 2: Install an older version and then upgrade to 12.04

Install 10.04 or 11.10 and then upgrade to 12.04.  See the linked question below for 12.10.

Workaround 3: If you have a wired internet connection, use the "net install" mini-CD

You will need a reasonably fast wired connection for this method -- all packages will be downloaded over the internet.
Download the non-PAE netboot CD image mini.iso and burn it to a CD or USB.
Boot from it, follow the steps, and choose linux-generic when asked to choose a kernel, and ubuntu-desktop to get the "default" Ubuntu installation the regular Desktop CD would have given you, just with a non-PAE kernel.

You can also choose one of the other desktops. You should choose a desktop otherwise you will not have a GUI to play with after installation.

Workaround 4: Ubuntu 12.04.5 and 14.04 (or later) on Pentium M only

Ubuntu 12.04.5 and 14.04 support an option ("forcepae") to enable PAE on Pentium M CPUs (where it is disabled by default). To enable it:

Boot the 32-bit Ubuntu (or Xubuntu etc.) installer
When the image of the keyboard and little man in circle appears hit the Tab key
"Choose your language" popup appears. Use the cursor keys and hit the Enter key to choose your language
Press F6, a grey menu will popup with some boot options
Press escape to close the window
You will now see a line that says:

Boot Options file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz quiet splash --

Edit this line and add the forcepae parameter with spaces twice around the -- at the end:

Boot Options file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz quiet splash forcepae -- forcepae

forcepae -- forcepae note:

forcepae is required twice because it sets the boot parameters for two different kernel boots - the kernel that runs as part of the installer (left of --), and the kernel that runs on the installed system (right of --).

The text at the end should be -- forcepae not --forcepae. There is a space between -- and forcepae
Hit the Enter key, hopefully Ubuntu will boot and the rest of your install will be successful. If you have graphical problems with Unity, or just find it slow, try a more lightweight distribution like Xubuntu.

Linked Question:

How can I tell if a machine has PAE?
Will it be possible to use a non-pae kernel in recent versions of Ubuntu?

If you need support for non-pae ready systems, try lubuntu. If after installing you decide that you do not like the LXDE environment, you can install unity with this command:

sudo apt-get install ubuntu-desktop

To completely remove, and reinstall ubuntu, choose "Something else", and select the partition with ubuntu currently installed on it to be used as "/", ext4, and check the format box.


VirtualBox 5 is unable to create a host-only adapter on Ubuntu 16.04 Using Ubuntu 16.04 and installing VirtualBox 5 according to the prescribed method here for "Debian-based Linux distributions":

https://www.virtualbox.org/wiki/Linux_Downloads

This faces a problem with the kernel in this version that is solved as such:

https://askubuntu.com/a/768310/254069

Attempting to create a host-only adapter like so fails:

$ VBoxManage hostonlyif create
0%...
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg*)" at line 71 of file VBoxManageHostonly.cpp

It turns out that the solution to the networking problem is a separate module that must be signed to allow this specific function.  As stated in the signing solution here:  https://askubuntu.com/a/768310/254069

VBoxManage hostonlyif create needs the following modules to also be accessible (modprobe):

openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=MOK Signing/"

sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n vboxdrv)
sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n vboxnetflt)
sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n vboxnetadp)
sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n vboxpci)

sudo mokutil --import MOK.der

Restart and "Enroll MOK"

$ VBoxManage hostonlyif create
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interface 'vboxnet1' was successfully created

Run VirtualBox in Sandbox using Firejail as below:

firejail --noprofile virtualbox


Can't configure Wacom tablet stylus I'm using Ubuntu 18.04, installed it on a clean HDD 5 days ago.
I've just plugged in my Wacom tablet - which is Wacom Bamboo CTL-470, and it worked instantly - stylus moves the mouse around, applications can read pressure, and stylus's touching and both buttons are mapped to left, middle and right mouse button.

In system settings>Devices>Wacom Tablet, "Tablet" page works, but "Stylus" page doesn't - it says "No stylus found" no matter what - and yes, I did hover my stylus over the tablet - even tried holding it above the tablet while rebooting, and on bootup it still didn't find it.

I'd like to rebind one of the buttons to CTRL+Z, but with it not detecting the stylus it doesn't want to show me the settings.

Any attempts to look up this problem on the internet resulted only in me finding solutions for the problem when that tablet doesn't work completely, and for older versions of Ubuntu.

I found an alternative way of configuring stylus buttons if Ubuntu settings refuse to show the settings. The way is described here, in the "Wacom tablet" section on Ubuntu 16.04 for my digital painting workstation - David Revoy:

  In Cinnamon, the GUI for Wacom tablet offer minimal yet powerful set
  of options: set buttons, set proportions to the screen...etc... The
  GUI is limited because you can't assign buttons modifier like  ,
   and  ...

  Xsetwacom:    For those who really need a way to assign this key and do more, here is the (big) workaround involving command line,
  script and other dirty things a normal user shoudn't consider as
  something normal to setup an hardware (graphist needs a GUI and focus
  on making good graphism, not script/code):

  1.  Get your tablet device name:

xsetwacom --list

  This command returns the name of my Wacom device, useful for my
  script:

Wacom Intuos3 9x12 Pen stylus    id: 11 type: STYLUS
Wacom Intuos3 9x12 Pad pad       id: 12 type: PAD
Wacom Intuos3 9x12 Pen eraser    id: 15 type: ERASER
Wacom Intuos3 9x12 Pen cursor    id: 16 type: CURSOR

  Note for reference your tablet pad name, mine here is Wacom Intuos3
  9x12 Pad pad in this example. Select the name, then press
  ++C to copy it in your terminal.

  2. Create a Xsetwacom bash script    Open the file manager (Nemo) , and in the folder of your choice ( I use /home/deevad/Script on my
  installation ) create a new empty file with right-click , "create a
  new document">"Empty document". Name it tablet.sh , then open it with
  a text-editor (Gedit). Inside it write a script like this with your
  tablet name:

#! /bin/bash
xsetwacom set "Wacom Intuos3 9x12 Pad pad" Button 1 "key Shift_L"
xsetwacom set "Wacom Intuos3 9x12 Pad pad" Button 2 "key Control_L"

  This example script will map  to the button 1 of your tablet
  (resize brush in Krita) , and Control to the button 2 ( pick color on
  Krita/Gimp/Mypaint) of the tablet. The special keys use standard
  names, for assigning other type of key I paste here a list :
  http://pastebin.com/aXGDkJTU

  If you want to assign a modifier ( eg. Ctrl ) on the stylus button,
  it's also possible:

xsetwacom set "Wacom Intuos3 9x12 Pen stylus" Button 2 "key ctrl"

  You can test all your xsetwacom lines inside the Terminal before
  writing them in your script. This way you'll test if you have a Button
  5 , or Button 20... etc...     For my Intuos 3, the layout of the
  right side is like this ( I found it with guessing and trying ):

# ---------
# |   | 1 |
# | 3 |---|
# |   | 2 |
# |-------|
# |   8   |
# ---------

  When your script is finished you can save it. In the file-manager ;
  right-click on it again > Properties > Permissions > and in front of
  Execute check the box for 'Allow executing file as a program'.

  3. Run it, create a start-up     You can double click and run the script. Your key on tablet will be mapped. But all setup of the button
  will not last a reboot. That's why we made a script to execute it at
  each start-up. Go now on 'System Settings', then 'Start-up
  application' , press the 'Add' button , give the form a name of your
  choice, for the command pick your script via the 'Browse' button, and
  comment what you want about it.

  More informations about Xsetwacom:    http://linuxwacom.sourceforge.net/wiki/index.php/Xsetwacom

To get the stylus to work I grabbed an up-to-date version of the libwacom.stylus file and replaced the old version at /usr/share/libwacom/libwacom.stylus

You can find the up-to-date libwacom.stylus files on the Github: https://github.com/linuxwacom/libwacom/tree/master/data


Play video in ubuntu terminal without GUI So. I have this old laptop and I installed Ubuntu Server on it so I would have just the terminal to play with. Now I'm trying to play video without seeing/installing any GUI. I installed mplayer but mplayer needs a "display" (GUI?) to play video (no, ASCII-art isn't what I'm looking for)

Any suggestions? Is it possible to get mplayer working without any GUI?

PS
I don't mind installing GUI but I want to be able to create a program where you enter a password and then see a video in fullscreen, without seeing any GUI (so looks like a hacker screen).

You can use mplayer like so:

sudo apt-get install mplayer
mplayer -vo caca <yourvideo>


Strange UI after upgrading to 11.10 I just upgraded to 11.10 (from 11.04). I was using the 'Classic Ubuntu' login as default before. When I now log in, I don't get the top bar (where you have Applications, Places, System normally). Instead I get like a menu with File, Edit, View, Go, Bookmarks and Help.

I also do not get the launcher thing on the left side (I am now using 'Ubuntu' to log in). Any idea what might be wrong? Any commands I can run to help debug this?

regards,

Wim

Edit: This is a screenshot of what I see.

For me it seems to be a problem with Compiz because the "Ubuntu Unity Plugin" isn't activated. I think it was the upgrade from your classic session into "Oneiric" so compiz didn't activated the Unity.

But when you prefer the classic session, open up one of your desktop-folders i can see on your screenshot. Here you can navigate to

/usr/share/applications

Here you can find Ubuntu Software Center and the Terminal (and perhaps still Synaptic Package Manager). So, when you have this, open one of your preferred programms. Way 01, the Ubuntu Software Center: Just search for "gnome-session-fallback". Way 02, the Synaptics Package Manager: The same way as in Software-Center,

Way 03, the Terminal:

sudo apt-get install gnome-session-fallback

When you had installed the gnome fallback session try to logout. You'll find a "gnome-classic" session and the same without any effects.

By the way, in the applications folder (mentioned above) you can find "Compiz Config Settings Manager" Here you can activate the Ubuntu Unity Plugin and your unity experience will start.

I hope, I was able to help you correctly

There is nothing wrong. what you are experiencing is Ubuntu 11.10 Oneiric Ocelot.

We lost the top panel and the three menu choices when 11.04 was released but some people like you wanted to do things the old way and so you were given the choice to use Ubuntu Classic mode to make the transition to Ubuntu Unity easier. But that choice would only last until 11.10 was released. And now it has gone.

Move your mouse point to the top left of the screen and the Launcher will appear. Click the ubuntu icon at the top (also called the Big Funny Button) and the Dash will appear. In the search box type Help and click on the Help icon to load the Help documentation and learn how to use 11.10.

regards.


18.04 sudo prime-select intel gives ERROR the installed packages do not support PRIME 18.04 Dell XPS 15

sudo prime-select intel

gives ERROR the installed packages do not support PRIME

Where can I find out more about how to proceed?

Try
sudo apt install nvidia-prime

Also, you may need to do as described here:
sudo systemctl disable nvidia-fallback.service

Add
nouveau.blacklist=1

in /etc/default/grub in the line GRUB_CMD_LINUX_DEFAULT
sudo update-grub

Install bbswitch-dkms (sudo apt install bbswitch-dkms), and add bbswitch to /etc/modules.

I had the same issue with my gtx 1050 on Ubuntu 18.04.

Install the nvidia driver (in my case nvidia-driver-390)

Open /etc/default/grub and removed all options in GRUB_CMDLINE_LINUX_DEFAULT and in GRUB_CMDLINE_LINUX

Run sudo update-grub and then restart.

Now you can run sudo prime-select intel with no errors.
Also you can use nvidia settings GUI to define which gpu to use under PRIME Profiles


Kernel 4.12, virtualbox VM not working I get the error

  Kernel driver not installed (rc=-1908)

and that I should run as root modprobe vboxdrv.

Tried to do it and it didn't work. (says that the module dues not exists.) As mentioned over the web I've tried also:

apt-get update
sudo apt install --reinstall virtualbox-dkms

That also did not work:

------------------------------
Deleting module version: 5.1.6
completely from the DKMS tree.
------------------------------
Done.
Unpacking virtualbox-dkms (5.1.6-dfsg-2) over (5.1.6-dfsg-2) ...
Setting up virtualbox-dkms (5.1.6-dfsg-2) ...
Building only for 4.12.0-041200-generic
Building initial module for 4.12.0-041200-generic
ERROR (dkms apport): kernel package linux-headers-4.12.0-041200-generic is not supported
Error! Bad return status for module build on kernel: 4.12.0-041200-generic (x86_64)
Consult /var/lib/dkms/virtualbox/5.1.6/build/make.log for more information.

this worked on Ubuntu 16.04, x86_64 Kernel 4.12 (4.12.0-041200-generic)

Change to the Virtualbox source directory

cd /usr/share/virtualbox/src

get this patch and place it in /usr/share/virtualbox/src

sudo wget http://paste.siduction.org/20170629003423

apply patch

sudo patch -Np0 < 20170629003423

run vboxconfig by executing

/sbin/vboxconfig

have fun!

source: https://forum.siduction.org/index.php?topic=6769.0 plus my own experience

On the page linked by @koleygr, the patch linked by melmarker seems to work.  I'm able to compile on Gentoo Linux running 4.12, though I'm not sure about Ubuntu.

Patch:

diff -ruN vboxhost.orig/vboxdrv/linux/SUPDrv-linux.c vboxhost/vboxdrv/linux/SUPDrv-linux.c
--- vboxhost.orig/vboxdrv/linux/SUPDrv-linux.c  2016-08-22 00:00:00.000000000 +0200
+++ vboxhost/vboxdrv/linux/SUPDrv-linux.c   2017-05-31 19:00:22.887324690 +0200
@@ -1397,7 +1397,7 @@
 SUPR0DECL(uint32_t) SUPR0GetKernelFeatures(void)
 {
     uint32_t fFlags = 0;
-#ifdef CONFIG_PAX_KERNEXEC
+#if defined(CONFIG_PAX_KERNEXEC) || LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
     fFlags |= SUPKERNELFEATURES_GDT_READ_ONLY;
 #endif
 #if defined(VBOX_STRICT) || defined(VBOX_WITH_EFLAGS_AC_SET_IN_VBOXDRV)
diff -ruN vboxhost.orig/vboxdrv/r0drv/linux/alloc-r0drv-linux.c vboxhost/vboxdrv/r0drv/linux/alloc-r0drv-linux.c
--- vboxhost.orig/vboxdrv/r0drv/linux/alloc-r0drv-linux.c   2016-08-22 00:00:00.000000000 +0200
+++ vboxhost/vboxdrv/r0drv/linux/alloc-r0drv-linux.c    2017-05-31 19:03:32.465413475 +0200
@@ -35,7 +35,10 @@
 #include <iprt/assert.h>
 #include <iprt/err.h>
 #include "r0drv/alloc-r0drv.h"
-
+#include <linux/kmemleak.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
+#include <asm/set_memory.h>
+#endif

 #if (defined(RT_ARCH_AMD64) || defined(DOXYGEN_RUNNING)) && !defined(RTMEMALLOC_EXEC_HEAP)
 # if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 23)
diff -ruN vboxhost.orig/vboxdrv/r0drv/linux/memobj-r0drv-linux.c vboxhost/vboxdrv/r0drv/linux/memobj-r0drv-linux.c
--- vboxhost.orig/vboxdrv/r0drv/linux/memobj-r0drv-linux.c  2017-02-02 16:54:00.000000000 +0100
+++ vboxhost/vboxdrv/r0drv/linux/memobj-r0drv-linux.c   2017-05-31 19:23:05.187059423 +0200
@@ -899,6 +899,9 @@
     unsigned long   pfn;
     struct page    *pPage;
     pte_t          *pEntry;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
+    p4d_t           p4d;
+#endif
     union
     {
         pgd_t       Global;
@@ -917,9 +920,18 @@
     u.Global = *pgd_offset(current->active_mm, ulAddr);
     if (RT_UNLIKELY(pgd_none(u.Global)))
         return NULL;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
+    p4d = *p4d_offset(&u.Global, ulAddr);
+    if (RT_UNLIKELY(p4d_none(p4d) || p4d_large(p4d) || !p4d_present(p4d)))
+        return NULL;
+#endif

 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
+    u.Upper = *pud_offset(&p4d, ulAddr);
+#else
     u.Upper = *pud_offset(&u.Global, ulAddr);
+#endif
     if (RT_UNLIKELY(pud_none(u.Upper)))
         return NULL;
 # if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
@@ -1463,13 +1475,23 @@
 {
     int rc = -ENOMEM;
     pgd_t *pgd;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
+    p4d_t *p4d;
+#endif

     spin_lock(&mm->page_table_lock);

     pgd = pgd_offset(mm, ulAddr);
     if (!pgd_none(*pgd) && !pgd_bad(*pgd))
     {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
+        p4d = p4d_offset(*pgd, ulAddr);
+        if (p4d_none(*p4d))
+            goto exit;
+        pmd_t *pmd = pmd_offset(p4d, ulAddr);
+#else
         pmd_t *pmd = pmd_offset(pgd, ulAddr);
+#endif
         if (!pmd_none(*pmd))
         {
             pte_t *ptep = pte_offset_map(pmd, ulAddr);
@@ -1487,6 +1509,9 @@
         }
     }

+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
+exit:
+#endif
     spin_unlock(&mm->page_table_lock);
     return rc;
 }


Why is the hard disk drive too hot? The Hard disk drive got too hot after a while of running Ubuntu. I've checked the system monitor and there weren't any thing strange.

I have Packard Bell EasyNote TJ75 with ATI card 512MB core i5.

Are u facing the issue on laptop or desktop?

I faced this issue and after much struggle, I am able to resolve the issue. I was not able to use my laptop as my HDD was getting too hot.

Do the following and come back with the result.

install powertop
run it in sudo and go to the last tab in that application.
Check if you are seeing some thing like "SATA Link..." as bad power setting.

If you see as above reply to this mail. I will provide the solution.

Good you have the same problem. Try these

Follow the link to install TLP TLP
Once installed open the file /etc/default/tlp
Search for SATA in that file.

make the changes as follow:

#SATA aggressive link power management (ALPM):

#min_power/medium_power/max_performance

SATA_LINKPWR_ON_AC=min_power

SATA_LINKPWR_ON_BAT=min_power

If you still want more optimization follow these
a. Add noatime,nodiratime to your root mount disk property in /etc/fstab

Here is my example:

UUID=2961c207-9781-425e-9e6e-18641b21e52c /               ext4    errors=remount-ro,noatime,nodiratime  0       1

Reboot the machine for all changes to take effect.

Do this you HDD will cool down. :)

It may be that the hard drive is dying, I worked in a computer repair store and the general point of no return is when you touch the drive and practically burn yourself, I would reccomend getting a new hard drive ASAP, @Ethan Turkeltaub, It is very rare for a hard drive to overheat enough to be noticed just because of the way the computer is designed, if such were the case, then the drive would die within a year of being new, just from excessive heat!!


Error while trying to install ATI/AMD proprietary drivers (post-release update) I tried to install the proprietary driver which is available for my graphics card. There are 2 available drivers;

"ATI/AMD proprietary FGLRX graphics driver (post-release updates)"

and

"ATI/AMD proprietary FGLRX graphics driver".

As the updates most likely were to improve something, I chose post-release updates version. However, when I click "Activate", the installation fails after download. The following message is shown to me:

Sorry, the installation of this driver failed.
Please have a look at the log file for details /var/log/jockey.log

Full jockey.log is available here: http://pastebin.com/HsZaJXeQ

Is there any way I could get this "post-release updates" working? Or should I try installing the older version?

I had the same problem, in my case reinstall command helped. Paste this in terminal:

sudo apt-get install fglrx-updates --reinstall

If it doesn't work uninstall FGLRX:

sudo sh /usr/share/ati/fglrx-uninstall.sh
sudo apt-get remove --purge fglrx fglrx_* fglrx-amdcccle* fglrx-dev* xorg-driver-fglrx

Then install driver using terminal:

sudo apt-get install fglrx-updates

If that doesn't work uninstall everything again and try using official script, just follow those commands:

cd /tmp && wget -O amd-driver-installer-12-8-x86.x86_64.zip http://www2.ati.com/drivers/linux/amd-driver-installer-12-8-x86.x86_64.zip
unzip amd-driver-installer-12-8-x86.x86_64.zip
chmod +x amd-driver-installer-8.982-x86.x86_64.run
sudo sh amd-driver-installer-8.982-x86.x86_64.run

Windows will popup and you can start installing drivers. When you finish type:

sudo aticonfig --initial -f

and reboot.

The link is for the ATI 12.8 64bit drivers, to get a newer version replace it with a link provided to you by official AMD site, just select your harware.

You just installed something (updates, some App from Software Center) at the moment the download of the driver package was complete and tried to install. Just try it again and make sure that there is nothing being installed at the same time ;)


How to bring back GUI in Ubuntu 18.04 LTS I was using Ubuntu quite well. Then I have mistakenly deleted all the lightdm folder file. Now my GUI is lost. Please help me to recover my GUI. Thank you.

For more information: Installing Lightdm again not working.

And these not working too:

sudo -i
dpkg --configure -a
apt-get -f install
apt-get update
apt-get dist-upgrade
apt-get install --reinstall ubuntu-desktop
apt-get autoremove
apt-get clean

What worked for me was:

sudo apt-get install --reinstall lightdm

(As N0rbert suggested in a comment.)

You broke your package system. The system does not know what packages you removed. Therefore, reinstalling ubuntu-desktop does not work, as it has not been removed, and as it is not known to the system which dependent packages are missing.

You can however reinstall an Ubuntu system without losing current settings and data. Boot with the Ubuntu 18.04 installation CD or USB. Start the install procedure. Select "Something else" on the screen that offers you a few choices on how to proceed. This will bring you to a screen that allows you to control partitioning and mount points yourself. Here, indicate that your current system partition should be mounted to "/". The important point here is to make sure that the format checkbox is unchecked. This way, the partition will not be erased. All system files will be overwritten, but not your user data and configuration.

If you have a partition schema different from the default of Ubuntu 18.04 (only a root partition), then you will need to indicate mount points for other partitions (possibly a swap or a separate /home) as well.


undelete files on ext4 My mother has placed some important files on her /tmp per accident. Now, of course, they are gone.

This happened yesterday (2 boots of the machine since)

I want to try to undelete the files. They were on /tmp, which was on the same partition as the rest of / , so I need a tool that runs on a mounted system (or maybe I could use a livecd ...)

Right now, I am trying testdisk on a systemrescuecd that I just downloaded. I can get some files from /tmp, but not all. (is it the right tool ? What exactly are those "red" files ? are only some of them recoverable ?)

You can also use extundelete

First unmount (umount) the file system where the files have been deleted.
Then read the chapter What to do if you've deleted a file.

You can install extundelete from classic Ubuntu repository:

sudo apt-get install extundelete

Or better, you can download the latest version and compile it:

cd ~/Download
tar -xf extundelete-*.*.*-.tar.bz2  #Replace *.*.* by the version
cd      extundelete-*.*.*
sudo apt-get install e2fslibs-dev   #Required for compilation
./configure
make
sudo make install
extundelete --version               #Should be your *.*.* version

Example of usage: restore all deleted files from directory Images into new created directory restore

sudo extundelete --restore-directory Images/ -o restore /dev/sda3

Bad news if you see your file XXXX within the following format:

Unable to restore inode NNN (Images/XXXX): Space has been reallocated.

See all restored files (look for your file):

find restore -name '*'

Backup your file(s) and remove this temporary directory restore

cp restore/Images/XXXX MY_BACKUP_DIRECTORY
sudo rm -rf restore

I could not recover my crontab file by using ext4magic or extundelete.

On Debian, the crontab for root is here:

/var/spool/cron/crontabs/root

But, by using the following command, I was able to at least manually recover my crontab from the logs.

 grep CRON /var/log/syslog.* -i| awk -F " CMD " {'print $2;'} |sort | uniq

It will output only the executed cron jobs (no timings), but at least this is a lot more than starting from scratch.

If you don't remember how often certain cron jobs run, take a full log e.g. syslog.1 and this will give you the count for runs trough the day:

grep CRON /var/log/syslog.1 -i| awk -F " CMD " {'print $2;'} |sort | uniq -c |sort -n


Disk Usage Very Strange Just today, my Ubuntu 11.04 started prompting me that my HDD is full ... I know I am filling up my HDD fast, but its the storage partition I expect to be filling up not my 60+GB OS Partition. So I did a Disk Usage Analysis and got the below:

/labs is actually the Storage partition

First, my home folder /home/jiewmeng is said to use 58.8GB? but the biggest few files, don't appear to sum up to that? Counting quickly, it looks like ~1.5GB only?

Looking at the 2nd image, my HDD doesn't seem to be all that full at all? Is it a mistake?

UPDATE (df -Th output)

Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/sda1     ext4     68G   65G  4.0K 100% /
none      devtmpfs    3.9G  680K  3.9G   1% /dev
none         tmpfs    3.9G  220K  3.9G   1% /dev/shm
none         tmpfs    3.9G  392K  3.9G   1% /var/run
none         tmpfs    3.9G     0  3.9G   0% /var/lock
/dev/sda2     ext4    764G  561G  165G  78% /labs
/dev/sda3     ext4     69G  180M   65G   1% /ex

You could delete the .xsession-errors.old file entering sudo rm ~/.xsession-errors.old in terminal.

This file was the 99% of my drive space :)

Chances are if the first few files don't add up, the disk analyzer is missing something, the filesystem is corrupt, or you have several hundred thousand 10mb files in there somewhere.

try:
- running fdisk

looking manually into the folder with high usage and checking how many files there are.
using a different usage analyzer that could show the hidden files or those with a bad entry in directory listings(try Jdiskreport)


Bluez Installation - configuration error for DBUS 1.6 I am trying to install bluez 5.2 libraries on Ubuntu 12.04. while running ./configure, I received error for GLib2.0, I was able to resolve by using sudo apt get-install for GLib2. Now I am receiving the error "configure: error: D-Bus >= 1.6 is required". I have downloaded DBUS 1.8.6 and installed. but still I am receiving the same error. when checked in /etc folder i still find dbus-1.
is there any installation error?

Installing libdbus-1-dev fixed it for me.

Sorted out this problem. First of all I ran

sh -x ./configure 2>errors.txt

The errors.txt showed me what command was failing which was

/usr/bin/pkg-config --short-errors --print-errors --cflag --libs 'dbus-1 >= 1.6'

After further digging it seems a file dbus-1.pc was not where it was supposed to be

After locating the file and copying to the correct location

/usr/lib/pkgconfig/

Hope this helps


Ubuntu 18.04 with nvidia-390 - user sessions not starting After upgrading to ubuntu 18.04, my nvidia driver was updated to version nvidia-390 and now I'm unable to login from lightdm with regular users. I tried other display managers, but I have the same issue.

What is really odd, is that I'm actually able to login with root and nvidia driver enabled.

Check https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-390/+bug/1773113

Currently there is no solution but I've just posted a suggestion that needs verifying, try creating a file with these lines:

$ cat /etc/modprobe.d/zz-nvidia.conf
options nvidia_390_drm modeset=1
options nvidia_drm modeset=1

I have an Intel GPU and am experiencing the same issues.

lightdm and gdm3 do not work

Though lxdm does work with LXDE. And even that eventually dies.

I haven't tried logging in as root yet.


What is a command to compile and run C++ programs? I am  new to Linux. I am using Ubuntu 11.04 and do not know how to compile and execute C++ program in it. I need to know the commands to Compile and Execute a C++ program in Linux.

To compile your c++ code, use:
g++ foo.cpp

foo.cpp in the example is the name of the program to be compiled.
This will produce an executable in the same directory called a.out which you can run by typing this in your terminal:
./a.out

g++ should already be in your $PATH, so you don't need to call /usr/bin/g++ explicitly, but you can use the latter in any case.
foo.cpp should be in the same directory you're running the command from.  If there is any doubt, you can make sure you are in the same directory by typing ls foo.cpp or head foo.cpp (if you need to verify you're working with the correct foo.)
As noted by @con-f-use, the compiler will usually make this file executable, but if not, you can do this yourself (so the command to execute, ./a.out or equivalent, will work):
chmod +x ./a.out

To specify the name of the compiled output file, so that it is not named a.out, use -o with your g++ command.
E.g.
g++ -o output foo.cpp

This will compile foo.cpp to the binary file named output, and you can type ./output to run the compiled code.

You need g++, for gcc may not compile cpp file easily.
You also need to learn vim or emacs to write C code.
Just try this on your terminal:

Type a test program and save it:

$vim hello.cc

Compile hello.cc with g++:

$g++ hello.cc -o hello

Execute it:

$./hello

Here the ./ means the exe file is under the current dir.


Copy files from a directory to a sub-directory (excluding the sub-directory itself) I have created a folder (directory) named  Parent which contains several files (namely file1 file2 ... file100) and subdirectories (Folder2, Folder3 etc) and a particular sub-directory named Child1 which itself may contain files and folders.
Now, I want to copy all the contents of Parent excluding Child1 into the folder Child1.

The final content of 'Child1' should be something like this:

 Old content of Child1
 file1 ... file100 + Folder2 Folder3 + etc.

How can I achieve this?

Assuming you are using bash as your interactive shell, you can enable extglob which allows you to specify "all files except these ones".

shopt -s extglob
cd Parent
cp !(Child1) Child1/

You can use ls to list the contents of "Parent",

pipe the result to grep -v to filter out "Child1",

and then send the resulting list to cp.

This should do the trick: (from within the "Parent" dir)

cp `ls | grep -v '^Child1$'` Child1


Bitcoin miner for Ubuntu? I use Ubuntu 14.04 LTS and I was wondering if there are any good Bitcoin mining software with a GUI that is easy to understand. Can anyone help me out?

You can give bitcoin-qt a try.

Add the repository

sudo add-apt-repository ppa:bitcoin/bitcoin

Update Software List

sudo apt-get update

Install the application

sudo apt-get install bitcoin-qt


14.04 System hangs and IO errors To my surprise, after todays fresh Ubuntu 14.04 install (fully updated as of today) I'm getting various problems like random hangs and I/O errors when copying/moving files (moving backup from HDD to SSD - checked both drives and there aren't any bad sectors). I heard 14.04 enabled TRIM by default and I'm not sure if it's causing the problem or not.

Im pretty sure my system hangs due to I/O problems, any idea?
Using Ubuntu since 11.04 and never had problem like that before.

Partitions:

SSD:

sda1 - EXT4 - /              18GB
sda2 - EXT4 - /home         110GB

HDD:

sdb1 - EXT4 - /media/Misc   600GB
sdb2 - EXT4 - /media/Games  400GB

Specs:

Intel i7-3770k
8GB Ram
nVidia GTX770 4GB (331 driver blob installed from drivers menu)
ADATA 128GB SSD | 1TB Segate HDD.

When I installed the latest OS upgrade I had the same issue, I just ran though the full set of sudo apt-get commands then I did a software update check and after all that i ran sudo apt-get autoremove and and autoclean and it fixed the issue


Ubuntu 16.04 touchpad stops working after login I've just installed Ubuntu 16.04 on an Acer Aspire E5-552-T574 and I'm dual booting with Windows 10.

Touchpad works just fine in Windows but in Ubuntu it only works before I log in and for a few seconds after that but then it just stops working. Plugging in a usb mouse works fine though.

xinput gives me the following output for my touchpad:

~$ xinput list
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer            id=4    [slave  pointer  (2)]
⎜   ↳ Areson USB Device                     id=11   [slave  pointer  (2)]
⎜   ↳ Areson USB Device                     id=12   [slave  pointer  (2)]
⎜   ↳ SYN1B81:01 06CB:2970 Touchpad         id=13   [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard           id=5    [slave  keyboard (3)]
    ↳ Power Button                          id=6    [slave  keyboard (3)]
    ↳ Video Bus                             id=7    [slave  keyboard (3)]
    ↳ Power Button                          id=8    [slave  keyboard (3)]
    ↳ Sleep Button                          id=9    [slave  keyboard (3)]
    ↳ HD WebCam                             id=10   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard          id=14   [slave  keyboard (3)]
    ↳ Acer WMI hotkeys                      id=15   [slave  keyboard (3)]

Also here is the relevant touchpad info:

~$ cat /proc/bus/input/devices
...
...
I: Bus=0018 Vendor=06cb Product=2970 Version=0100
N: Name="SYN1B81:01 06CB:2970 Touchpad"
P: Phys=i2c-SYN1B81:01
S: Sysfs=/devices/platform/AMD0010:00/i2c-6/i2c-SYN1B81:01/0018:06CB:2970.0003/input/input13
U: Uniq=
H: Handlers=mouse1 event13
B: PROP=5
B: EV=b
B: KEY=6420 10000 0 0 0 0
B: ABS=260800000000003

Some people have been suggesting running the following command:

gconftool-2 --set --type boolean /desktop/gnome/peripherals/touchpad/touchpad_enabled true

also this command:

gconftool -s -t bool /desktop/gnome/peripherals/touchpad/touchpad_enabled true

That didn't seem to work for me. Then I went into the grub and added "i8042.reset" to the line "GRUB_CMDLINE_LINUX_DEFAULT" and then updated the grub:

~$ sudo nano /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="i8042.reset quiet splash"
~$ sudo update-grub

That didn't work so I tried to disable and enable the touchpad:

xinput --disable [id]
xinput --enable [id]

Just replaced "[id]" with 13 in my case... but that didn't work either.

I'm not really sure what more I can try, anyone got any suggestions?

EDIT:
I can use the touchpad if I change it from Advanced to Basic in the BIOS but that's not much of a solution since scrolling and tapping don't work that way.

I had the same problem (trackpad stops working after login). On my Asus SonicMaster laptop, pressing Fn-F9 fixed it (it was apparently disabled and Fn-F9 re-enabled it).

On Lenovo Thinkpad x220 press (Fn + F8) to re-enable it.


Black screen after GRUB, can't install. UEFI I know there are tons of threads like this and I've tried everything i can think of that has been given as an answer in those threads.

The problem: I select the USB flash drive as my boot device, and it loads a GRUB menu, that says something like "Try Ubuntu without installing" "Install Ubuntu" "OEM Installation". I click any one of them, and I just get a black screen. I can control alt delete to restart, so my PC is not hanging.

If i change UEFI mode to Legacy in the BIOS, then it SKIPS the GRUB menu and goes straight to a graphical ubuntu installer.

I need to install as UEFI as my Windows 8 installation is as such. I can't boot it if it's set to legacy.

Note that Secure Boot and UEFI are different in my bios, I can disable secure boot without disabling UEFI. However, i still get the black screen.

Things I've tried:

1) nvidia.modeset = 0
2) GRUB_GFXMODE = 1024x768x32
3) GRUB_GFXMODE=vga=vesa
4) vga=vesa
5) A different monitor via hdmi
6) A different monitor via vga
7) Different formats of my flash drive
EDIT: Some more things i've tried
8) Confirmed md5 is correct
9) Downloaded Linux Secure Remix 12.10, no difference.
10) Tried drm_kms_helper.poll = 0
11) Tried acpi_osi=Linux
12) Tried acpi_backlight=vendor

Nothing works yet.

NONE of these work, I still get the black screen.

My laptop is a MSI GE-70 with the following specs:
Intel i7 3630QM
Nvidia GTX-660M with Optimus GDDR5
8GB DDR3 RAM
OS: Windows 8 installed as UEFI.

I believe this NOT to be a duplicate since I have tried EVERYTHING i can find, and nothing seems to work.

Does anyone have any idea what it could be?

I installed it via legacy mode. I could not get it to install via UEFI.

However, I patched the install once booted, thus enabling it to be booted in UEFI, by doing this:

  Converting Ubuntu into UEFI mode

  Note: Do not follow this procedure if your computer is already booting correctly. Use this procedure only if you believe you've accidentally installed Ubuntu in BIOS/CSM/legacy mode and you want it to boot in UEFI/UEFI mode.

  Start Boot-Repair, click on "Advanced options", go to the "GRUB location" tab.
  If you do not see a "Separate /boot/efi partition" line, this means that your PC does not have any UEFI partition. In this case, exit Boot-Repair, then create an UEFI partition (see the "Creating an UEFI partition" paragraph above).
  If you see a "Separate /boot/efi partition" line, tick it then click the "Apply" button.
  Set up your BIOS so that it boots the HDD in UEFI mode (see the ""Set up the BIOS in UEFI or Legacy mode" paragraph above).

From http://help.ubuntu.com/community/UEFI.

I managed to get back into the BIOS,  by plugging my monitor directly into my mother board instead of the graphics card. Hope that helps


Compiz / Unity permission problem? I have a big problem here.
So the problem in short: I can't change my background, and the Compiz Launcher won't save stuff I put there.

What happened before this happened you might ask?
Well I reinstalled Ubuntu from 13.04 to 12.04 LTS because it refused to let me login.

My setup: I have 3 HDD's

One mounted on / (12.04 LTS)
And one mounted on /home
And Windows 7 C: I don't really use it. (only for Windows games
that can't be played though wine)

I reinstalled Ubuntu Tons of times (and used it) so my /home/(user) is filled with configuration files of programs.

I also have my /home encrypted.

Why do I think it's a permission problem?
Because it seems I have no permission to change my background or save thing on Compiz Launcher.

Any kind of help would be much appreciated.
Thanks for reading.

you'll only get this problem when you have /home mounted some where in a other partition,

  WARNING: this worked for ME this is how I fixed it, it doesn't mean it
  works for YOU,
    This won't break your OS but WILL remove all your config files
  (unless you made a back-up)

Back-up your web browser data (and other config files that you may have there)
Firefox:
Backup ~/.mozilla (a hidden folder with bookmarks and history and cookies of Firefox)

Chromium:
No idea (Some one add this please, I think "~/.config/chromium" please confirm)

chrome:
No idea (Some one add this please, I think "~/.config/google-chrome" please confirm)

then remove every .(name) folder in your or back them up somewhere.
Point is they can't be in /home/user/* (or further).


sudo apt-get install will not work I am sorry, I may be repeating a question, but whenever I try sudo apt-get install (something), I cannot get it to work. This is the outcome.

Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 guake : Depends: python-glade2 but it is not going to be installed
         Depends: python-keybinder but it is not going to be installed
         Depends: python-vte but it is not going to be installed
 kde-telepathy-minimal : Depends: kde-config-telepathy-accounts (>=
15.04.0) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

So I tried: sudo apt-get -f install which still does not work. Please help.

How should I get either one of them to work?

It would be great if I got an answer back. Thank you!

sudo apt-get autoclean

remove sources.list file.and create new sources.list...

sudo rm /etc/apt/sources.list

Then, type in

sudo software-properties-gtk

This will open software-properties-gtk and a newsources.list will be created automatically.

Then change the server to US or to any other server of your choice. You must enable repositories from the new dialog in order to create new sources.list.

Tick all the boxes then click on Revert then click close.

Need to restore default repositories

 sudo apt-get update && sudo apt-get dist-upgrade -y

(it is good practice to backup this file before installing to recover if such things happen)

Now install anything!

You tried installing the Kubuntu-desktop package?
You should not try installing that again.It seems to be broken in Ubuntu 16.04 since it seems that the package doesn't actually include dependencies for the Telepathy IM client,resulting in broken dependencies,which results in broken apt.
It's a good idea to have Synaptic package manager installed to be able to deal more easily with these kind of issues.
But,back to the point,
Open the terminal and type in:

sudo dpkg -P unity-scope-gdrive account-plugin-google account-plugin-facebook
sudo apt-get install -f


How can I disable an audio HDMI device? powertop reports that Intel CougarPoint HDMI is 100% active and there are reports that this device consumes a lot of power. If that is so, I would like to disable it as I never use it. Is there a way I can disable it?

I am using Ubuntu 11.10

I had the same issue when I updated to Ubuntu 19.10.

Open PulseAudio Volume Control. I believe it's already installed by default.
Click the Configuration tab.
Find your HDMI device and set the Profile to Off.

If it's not install, you can install the PulseAudio control panel using:

sudo apt install pavucontrol

To disable the audio device (not just mute) run in terminal

sudo alsa force-unload

alsa options are

unload|reload|force-unload|force-reload|suspend|resume

In case you require the audio device at a later stage.


How do I disable the Cinnamon 2 lock screen? When my computer is locked, I am presented with the default Ubuntu lockscreen. When I enter my password and unlock it, I am presented with the Cinnamon 2 lock screen and I have to enter my password again.

How can I disable the Cinnamon 2 lock screen?

Note: I've installed Cinnamon 2 with these commands:

sudo add-apt-repository ppa:gwendal-lebihan-dev/cinnamon-stable
sudo apt-get update
sudo apt-get install cinnamon

After a bit of searching in dconf-editor (inspired by the other answers and not gconf), I found the schema

org → cinnamon → desktop → lockdown

which contains a key called disable-lock-screen, set that to true (checked) to disable the Cinnamon lock screen.

Command Line
To turn lock screen off:
gsettings set org.cinnamon.desktop.lockdown disable-lock-screen true

To turn back on:
gsettings set org.cinnamon.desktop.lockdown disable-lock-screen false

Or do this:

sudo chmod -wx /usr/bin/cinnamon-screensaver


Upgrade from 10.10 to 11.04 to 11.10. X starts, Unity desktop not there I upgraded my Ubuntu Desktop 10.10 system to 11.04 and then 11.10.

Now, when I start Ubuntu, the Unity desktop doesn't start correctly. Here's what I do:

Start computer
I log in via the GUI login screen
The X Window System starts. I can see an arrow icon for the mouse, and can move it around the screen.

Nothing else starts. There are no desktop icons, no launcher, no taskbar, etc. Right clicking on desktop does nothing. I've tried some common keyboard shortcuts ("Alt-tab" "Ctrl-Alt-T" "Ctrl-Alt-Backspace") but nothing happens.

If I go to another Virtual Console, and run the command unity, the Unity desktop will start on my primary X desktop. However I'm seeing many problems like windows which are only half-drawn, some applications run without the familiar "Minimize, Maximize, Close"

What's happening here? It seems that the X Window System started, but Unity did not start?

How can I debug this?

Solved it.

In my case, I was running the proprietary ATI drivers (fglrx) for my ATI/Radeon graphics card. At some point during the upgrade, Ubuntu installed the open source ati/radeon drivers. However, these two drivers cannot exist alongside one another  See bug 285603.

From what I can tell, the proprietary ATI drivers cause problems with Xorg especially if they exist alongside the opensource ATI drivers.

This is a common problem, and the steps are pretty well documented.

To fix this, I uninstalled the proprietary ATI drivers (fglrx) using these instructions. I had to use the section called "Problem: Need to fully remove -fglrx and reinstall -ati from scratch".

Then, I installed the open-source ATI drivers instead. The open-source drivers are called 'ati' or 'radeon'. I followed these instructions:

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

If anyone really wants the proprietary fglrx  driver, you should still consider replacing the proprietary drivers with the Radeon drivers first, so that you can make your system stable first. Once the system is stable, then try experimenting with the ATI proprietary drivers starting from a stable system.

Do a clean install of ubuntu 11.10 backup all of your files and format your drive, upgrades don't go very well sometimes. it happen to me once.


What is a web based vpn for Ubuntu? Does anyone know of a VPN that works through the web. Specifically, suppose that there are two computers such the only open port is 80 on each of them. Also, you can't open any other ports. How do you simulate an open port, such that it is like they are on the same local network with whatever open ports are wished. It should also (obviously) work with Ubuntu. The reason why I want this, is so that I could show my dad how to set up ssh at places he can't open ports.

Note: It shouldn't break port 80 for other purposes, such as web browsing. Preferably, it should just act like a normal web connection using normal web protocols, but use those  protocols to send information that would go over other ports.

If you can find a vpn client supporting the SOCKS protocol, then you could use this in the middle:

http://http-tunnel.sourceforge.net/

OpenVPN might work as the VPN software.  I haven't had time to try this but my motivation (when I researched it) was the same as your dad.

The other thing you might do is to run ssh-in-a-browser on your own box, or here:

http://www.serfish.com/console/

Free VPN Type: PPTP VPN US

Server Host: us.websitevpn.com

VPN Username: websitevpn.com

VPN Password: freevpn

UK Server Host: uk.websitevpn.com

VPN Username: websitevpn.com

VPN Password: freevpn

Via web:

http://anonymouse.org/anonwww.html

http://proxy.org/cgi_proxies.shtml

If you need something more advanced you need an openVPN provider and install openVPN in ubuntu:

sudo apt-get install openvpn bridge-utils


How to get the GPU info? I'm looking for a command that would give me the same info as:

cat /proc/cpuinfo

Except for the GPU (type of the chip and memory, frequency).

I do not know of a direct equivalent, but lshw should give you the info you want, try:

sudo lshw -C display

(it also works without sudo but the info may be less complete/accurate)

You can also install the package lshw-gtk to get a GUI.

Like in Chromium, if you have Firefox: about:support


How do I create an animated gif from still images (preferably with the command line)? I want make a .gif animated picture from a given set of .jpg pictures.

I would prefer to do it from the command line, so command line tools would be very welcome.

You can use ImageMagick package. Install it using the command:

sudo apt-get install imagemagick

Now you can create a gif from number of pictures(jpg) using:

convert -delay 20 -loop 0 *.jpg myimage.gif

You can use a program called convert included in the imagemagick package. It is command line driven, but very easy to use. Install it either through the software center, or go to a command prompt and type

sudo apt-get install imagemagick

Now to create the .gif.

convert -delay 100  -size 100x100 xc:SkyBlue \
          -page +5+10  balloon.gif   -page +35+30 medical.gif  \
          -page +62+50 present.gif   -page +10+55 shading.gif  \
          -loop 0  animation.gif

*Note the above example is straight from Image Magick Examples


Why's this shutdown one-liner command not working It works fine from terminal, but when called from a thread in python, it fails.

history -d $((HISTCMD-1)) && echo 'password' | sudo -S shutdown -h 08:00

from python, here's what I did:

halt = "history -d $((HISTCMD-1)) && echo 'password' | sudo -S shutdown -h 08:00"
thread.start_new_thread(lambda: commands.getoutput(halt),())

I used lambda after trying it for other commands like opening nautilus or gedit, which works fine, but shutdown command isn't!

This:

history -d $((HISTCMD-1)) && echo 'password' | sudo -S shutdown -h 08:00

is not actually a command, it's a fragment of shell script. So you need to have the shell execute it. Something like this:

import os
halt = "history -d $((HISTCMD-1)) && echo 'password' | sudo -S shutdown -h 08:00"
os.system(halt)

From man sudo:

  The -S (stdin) option causes sudo to read the password from the
  standard input instead of the terminal device. The password must be
  followed by a newline character.

So, after the -S, it's waiting for a NEWLINE character which you provided when using the terminal.


How to revert a do-release-upgrade? I can update my Ubuntu to the new LTS version. As you can think, its not a highly important server since I run 13.10 (not a LTS version). Anyway - I actually want to upgrade my server, but would like to be able to revert this upgrade.

I would be able to reinstall Ubuntu 13.10 and overwrite it with my backup. But I want to know if there is a more comfortable way to do this. TBH I guess theres no command as undo-release-upgrade but I thought it would be worth to ask for it.

This is my current daily backup script

tar cvpzf $backup_file --exclude=/proc --exclude=/lost+found --exclude=$backup_file --exclude=/mnt --exclude=/sys --exclude=/media --exclude=/tmp /

As Faheem said in comments, you can't revert/downgrade the version of Ubuntu once you upgrade it. The only possibility is to do an image of the system, or complete backup and then installing it over. You can also test in a VM as derobert suggest.

I think you could use Clonzilla to backup the disk/partition. Then just restore the created image to go back to your previous config if something is wrong with 14.04.
Best


Unable to use WPA security when using laptop as hotspot with an Intel 3945ABG When I use my laptop running Ubuntu 12.04 as hotspot, I am only allowed to use WEP security instead of WPA.

I dual boot Ubuntu with Windows on this laptop and when I use Windows to create the hotspot I am allowed to use WPA security so it is not a hardware issue.

I use Intel PRO/Wireless 3945ABG wireless connection.

I researched for an answer for almost an hour, and was unable to find anything. It appears that the ubuntu built-in hotspot service doesn't support WPA.

(I could be wrong; in fact, I hope I'm wrong. The built-in hotspot service should support WPA, and if it doesn't then they should definitely update it.)

At this point I think the only way to create a hotspot with WPA security capabilities would be to use third-party software.

The other option would be to use WEP. It has some serious problems as far as security, but if security isn't a big concern then it could be an answer.

Choose wep 40/128 mode, not Wpa.
Detail info: http://tumutanzi.com/archives/8195


"SystemError: E:Syntax error /etc/apt/apt.conf.d/70debconf:4: Extra junk at end of file" causing package manager to break I have a problem with ubuntu software center. When I try to launch it from the dock the icon blinks and then closes. If I try to launch it from terminal I get this message.

gksarkis@ubuntu:~$ gksudo software-center

(gksudo:2919): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(gksudo:2919): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(gksudo:2919): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(gksudo:2919): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
  File "/usr/bin/software-center", line 44, in <module>
    from softwarecenter.utils import ExecutionTime
  File "/usr/share/software-center/softwarecenter/utils.py", line 682, in <module>
    from softwarecenter.db.pkginfo import get_pkg_info
  File "/usr/share/software-center/softwarecenter/db/__init__.py", line 2, in <module>
    from debfile import DebFileApplication
  File "/usr/share/software-center/softwarecenter/db/debfile.py", line 21, in <module>
    from apt import Cache
  File "/usr/lib/python2.7/dist-packages/apt/__init__.py", line 35, in <module>
    apt_pkg.init()
SystemError: E:Syntax error /etc/apt/apt.conf.d/70debconf:4: Extra junk at end of file
sarkis@ubuntu:~$

Also when I try to install a software from terminal I get this message.

sarkis@ubuntu:~$ sudo apt-get cheese
[sudo] password for sarkis:
E: Syntax error /etc/apt/apt.conf.d/70debconf:4: Extra junk at end of file
sarkis@ubuntu:~$

What should I do?

Thanks in advance for your help.

*There is a red button at the top bar that displays:
An error occurred, please run Package Manager from the right-click menu or apt-get in a terminal to see what's wrong.
The error message was 'Unkown Error': '(E: Syntax error /etc/apt/apt.conf.d/70debconf:4: Extra junk at end of file)'

http://pastebin.ubuntu.com/1453196/

Command line error:

sudo apt-get install <application>

sudo apt-get remove <application>

I would suggest trying synaptic to reinstall the software center


What file search tool can be used to track files based on creation date? I am using Ubuntu (MATE) 16.04.

I am looking for a GUI search tool to search by creation date. I'd appreciate any suggestions.

I've tried:

MATE search tool - can only search by modified date, by using "Date modified less than" / "...greater than"
Tracker ("Desktop search") will only permit keyword search (on file names or content).
Recoll only indicates "file date" search, which matches modification date only.

None of the above can show the creation date in search results (column fields can't be added).

I'd appreciate any suggestions.
Is there a too

I think you should try search functionality of

Krusader (sudo apt-get install krusader)
or
DoubleCommander (sudo apt-get install doublecmd-gtk).


Lubuntu - Move panel across monitors Well, I switched to Lubuntu because Unity was too slow. How would I move the panel across monitors? I tried looking at the settings for the panel, but I can't move it across monitors. How can I acomplish this?

On a side note, what are some ways to snaz up Lubuntu and get a dark theme?

If you right-click in the panel and select "Panel Settings", on the "Geometry" tab, there is a "Monitor" selection box. This allows you to choose which monitor the panel displays on, and also has an "All" option, which will stretch it across multiple displays. There doesn't appear to be a way (in this settings UI) to duplicate it on every display, but this covers most use cases.

Extending the lxpanel across two monitors can be done easily,  See http://lxlinux.com/#14.  It has a step by step explanation of how to set up your two monitors and the lxpanel either on the bottom or the top of the screens. To establish dual monitors with LXDE, install Arandr from Synaptics. Arandr can set-up placement, orientation and resolution for each monitor. Before saving, set up the geometry of any horizontal panels. For a bottom panel across both monitors, align the bottoms of the displays as in the image on the right; for a top panel, align the tops. A second horizontal panel can be only set-up on the display whose unaligned edge is outermost, since any extension onto the smaller display will be hidden. Otherwise, the horizontal placement and geometry in general can be achieved in the usual way. For an lxpanel, right click an open spot on the panel and choose Panel Settings.
With regard to your second question, there are several themes that have a dark appearance.  Try them all.  Menu->preferences->Openbox Configuration Manager.


ntfs partition missing when I installed ubuntu mate 14.4 I had a Windows 8.1 installed on C partition of my laptop. I had 2 partitions, C and D. Recently I installed Ubuntu Mate 14.04. but I don't know how to find my files on D partition. Should I mount or something?

Any help would be appreciated...

I think the following information would help :

sudo fdisk -l:

Disk /dev/sda: 750.2 GB, 750156374016 bytes 255 heads, 63
sectors/track, 91201 cylinders, total 1465149168 sectors Units =
sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512
bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00087858

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      499711      248832   83  Linux
/dev/sda2          501758  1465147391   732322817    5  Extended
Partition 2 does not start on physical sector boundary. /dev/sda5
501760  1465147391   732322816   8e  Linux LVM

Disk /dev/mapper/ubuntu--vg-root: 745.8 GB, 745789194240 bytes 255
heads, 63 sectors/track, 90670 cylinders, total 1456619520 sectors
Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical):
512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096
bytes Disk identifier: 0x00000000

Disk /dev/mapper/ubuntu--vg-root doesn't contain a valid partition
table

Disk /dev/mapper/ubuntu--vg-swap_1: 4106 MB, 4106223616 bytes 255
heads, 63 sectors/track, 499 cylinders, total 8019968 sectors Units =
sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512
bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/ubuntu--vg-swap_1 doesn't contain a valid partition
table

df -h:

Filesystem                   Size  Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-root  684G  3.3G  646G   1% /
none                         4.0K     0  4.0K   0% /sys/fs/cgroup
udev                         1.9G  4.0K  1.9G   1% /dev
tmpfs                        388M  1.2M  386M   1% /run
none                         5.0M     0  5.0M   0% /run/lock
none                         1.9G  292K  1.9G   1% /run/shm
none                         100M   48K  100M   1% /run/user
/dev/sda1                    236M   36M  188M  17% /boot

sudo blkid:

/dev/sda1: UUID="56fa0875-40d6-4bbd-ae2a-f3e85341c44a" TYPE="ext2"
/dev/sda5: UUID="tQJELc-qT2m-xBFV-RfHJ-f7Vj-LIIn-KpAQ0Q" TYPE="LVM2_member"
/dev/mapper/ubuntu--vg-root: UUID="8f775671-a8d4-42b1-9ea4-90a7b7899c36" TYPE="ext4"
/dev/mapper/ubuntu--vg-swap_1: UUID="61daad35-5ff4-4417-b3b6-cbd0943e6a0f" TYPE="swap"

fdisk -l | grep NTFS:

Disk /dev/mapper/ubuntu--vg-root doesn't contain a valid partition         table
Disk /dev/mapper/ubuntu--vg-swap_1 doesn't contain a valid partition table

Unless you've got another physical disk, it looks like you've accidentally overwritten your Windows installation, including both C: and D: partitions.

If you have good backups, now is the time to use them.

If you do not have good backups, shut down and stop using the disk immediately! Your best hope for recovery is to use a tool like PhotoRec, which can recover files from badly damaged filesystems. (I've heard that some Windows tools can do a better job than PhotoRec on NTFS, but I don't remember the specifics or have pointers to these tools.) You'll need a second disk with sufficient capacity to hold your recovered files, and you'll need to boot to an emergency system to run PhotoRec (or whatever you use instead of it).

You need to mount /dev/sda5 to access D: drive.

Best way to do it temporarily is -

mkdir ~/myDdrive
sudo mount /dev/sda5 ~/myDdrive

To do it permanently, and for all users (and guest), make a /myDdrive (or whatever name you wish) directory in root

sudo mkdir /myDdrive

Then in your /etc/fstab file, add the mount line, that will executed every time, so you always have the drive mounted

/dev/sda5       /myDdrive      ntfs    rw


How can I improve performance and user experience in 11.10 (boot + shutdown time, graphics, ...) I've been dual-booting with Ubuntu and Windows since Ubuntu 9.04. This was the first time I used Ubuntu and was really happy with it. The boot and shutdown time was very nice and much shorter than on Windows Vista. I was pretty satisfied with the general performance of Ubuntu back then. As the versions passed, I noticed, that with every new release the performance is getting worse. I believe one reason could be Unity, since it is still under development. I'm also not really happy with this new UI direction everyone (Win8, Unity, Gnome 3) is heading now. These big buttons and text fields as my screen would be a touchscreen. I would prefer the old (but fast) GNOME 2.x. However this is a complete other topic. I read somewhere that the slow boot and shutdown could be about the network manager.

The second thing is the graphic performance. Unity and the general desktop environment is pretty slow, not that it's unusable, but when I press or click somewhere I notice a little delay. Games, compared to Windows 7, Minecraft runs much smoother than on Ubuntu. And a few other games too.

I would like to know if there are any tweaks or something that I can improve the boot and shutdown time, graphics performance, etc.

Edit:

Bootchart (large image)

My system:

Dell XPS M1530
Ubuntu 11.10 32Bit
Intel(R) Core(TM)2 Duo CPU T9300 @ 2.50GHz
GeForce 8600M GT
4GB RAM

Did you install additional drivers for your graphics card? Try to install one using jocky-gtk.
Install preload which loads recently loaded(but not running now) programs data in the background so your system can load that program faster when you want to start it again.
Go to ccsm > Unity plugin>experimental . Change dash bar to static or no blur. Which reduces the delay of unity dash.
Must use swap, at least 1GB. If you did not keep a partition for swap then don't worry, you can create swap file without delete or create a new partition. Check here  Just copy paste the commands in terminal.
Remove unnecessary programs from you startup list.

sudo sed --in-place 's/NoDisplay=true/NoDisplay=false/g' /etc/xdg/autostart/*.desktop

Run the command first which will display all of your applications in "start up application"
Install laptop-mode-tools which will increase your laptop's battery life.
Add the line in /etc/sysctl.conf

sudo gedit /etc/sysctl.conf

vm.swappiness=10  [add the line at the end of the file]

This means your system will keep the cache in ram instead of swap as much as possible and your system's performance will increase.

Ubuntu 11 is buggy and performs weak in most computers below than Core i3 processors. It's mainly because of Unity desktop. My advice is to downgrade to 10 and wait until the next LTS release (Ubuntu 12--April 2012).


How can I enable remote control/desktop sharing on lubuntu What do I need to do to enable desktop sharing on (lubuntu)
I want to control it from Ubuntu 11.10, if possible to also do it from a Windows pc would be great. But not if it uses more load or might make the system unstable though.

The right way to configure screen sharing in Lubuntu/LXDE is to install x11vnc and create an auto-start file.

1) install x11vnc:

sudo apt-get update && sudo apt-get install x11vnc

2) set password:

brian@localhost:~# x11vnc -storepasswd
Enter VNC password: ********
Verify password: ********
Write password to /home/brian/.vnc/passwd?  [y]/n y
Password written to: /home/brian/.vnc/passwd

3) Start the vnc server:

sudo x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /home/brian/.vnc/passwd -rfbport 5900 -shared &

4) Create the autostart file in /etc/init sudo vi /etc/init/x11vnc.conf

# description "Start x11vnc on system boot"

description "x11vnc"

start on runlevel [2345]
stop on runlevel [^2345]

console log

respawn
respawn limit 20 5

exec /usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /home/brian/.vnc/passwd -rfbport 5900 -shared

Now every time you reboot the server will be running and you can connect to it from another system with a vnc viewer program:

sudo apt-get update && sudo apt-get install vncviewer

First, update your installed packages then install openssh-server. Run the following commands in terminal:

sudo apt-get update && sudo apt-get upgrade
sudo apt-get install openssh-server

After this you can play remotely. It's awesome.


Ubuntu 12.04 server install fails with debootstrap warning Have made several attempts to download and create iso on CD and USB of 12.04 server 64-bit. Install attempts on a few different machines always hits several "Debootstrap Warning - "......deb file was corrupt" errors. iso passes MD5checksum

I had a similar problem and I solved it with workarround described here: http://cirrus.ucsd.edu/~pierce/fix_ubuntu_usb/


Is there any program similar to Guitar pro available ? http://www.guitar-pro.com/en/index.php
The official site.

Guitar Pro has native Linux version. Similar open-source app is Tuxguitar. You can install it from the Software Center.

Wine and PlayOnLinux (Both available on the Software Center) will allow the program to run.

(I have tried GP5 but not 6...I know for a fact 5 works)


Accidentally changed shell in gnome-terminal, no longer opens I wanted to make screenfetch start at terminal startup.

But I realized that I changed the shell from bash to screenfetch and of course gnome terminal doesn't startup.

I have installed MATE terminal just so I can use a terminal. But I want to use the gnome terminal

So any configurations I can remove or anything?

Install the dconf-editor

sudo apt-get install dconf-editor

Start the application and navigate to

org.gnome.terminal.legacy

Open the category profiles: and select the wrong profile, or check all profiles.

In the right hand pane you will see a key custom-command. Remove the value or use the Button Set to Default in the lower pane.

Try running this in MATE:

sudo apt-get purge gnome-terminal; sudo apt-get update; sudo apt-get install gnome-terminal

This will uninstall and purge the configs, then reinstall the latest version.


Apt-get update failure I keep getting this error every time I run sudo apt-get update and also I'm getting a red notification in the top right of my computer that says my

  update information is outdated

This is the result of update command:

Fetched 132 kB in 3s (42.5 kB/s)
W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release  Unable to find expected entry 'main/binary-i386/Packages' in Release file (Wrong sources.list entry or malformed file)

E: Some index files failed to download. They have been ignored, or old ones used instead.

Try this command for 64 Bit Linux:

sudo sed -i -e 's/deb http/deb [arch=amd64] http/' "/etc/apt/sources.list.d/google-chrome.list"

This error is because google has stopped support for chrome 32bit for linux.
There is two solution for this problem:

Remove chrome and use chromium or some other browser(If your are running in a 32 bit os)
Add Chrome 64 bit ppa(If you are using 64 bit os)

  sudo sed -i -e 's/deb http/deb [arch=amd64] http/' "/etc/apt/sources.list.d/google-chrome.list" "/opt/google/chrome/cron/google-chrome"


How to execute a specific command on opening a terminal I would like to execute the shell command "cmatrix" whenever I open a terminal. How to go about achieving this?

You can add cmatrix command in your ~/.bashrc file located at home folder:

echo 'cmatrix' >> ~/.bashrc

NOTE: Please ensure that you use >>, the append operator. If you use >, it will replace your whole ~/.bashrc with cmatrix only.

I'm using Fedora with XFCE desktop. I encountered problems when Fedora boots, by using the solution provided by @snoop, and the solution provided by @AB gave me the "Failed to execute child process (no such file or directory)" error. Searching for a solution, finally I used a script saved as ~/bin/cmatrix_launcher.sh with this content:

#!/bin/bash
cmatrix -baC cyan
/bin/bash

throwing then it as a custom command in the xfce4-terminal settings (screenshot attached)


DNS Routing Fails for VPN Connections on Ubuntu 16.04 Out-of-the-Box I would like to report some odd behavior, and my solution. I am left extremely unsatisfied as it relies on custom scripts and non-standard packages. I would like the community's help in figuring out a better fix for this.

Problem

I heavily rely on OpenVPN for all of my servers. After I upgrading to Ubuntu 16.04.1 from 14.04.5, I stopped being able to access any websites and most services.

My OpenVPN servers continued to tunnel traffic just fine for Mac OS X, Windows, and Ubuntu 12.04/14.04 clients.

System Details

My out-of-the-box resolv.conf file looked like:

nameserver 68.105.28.16
nameserver 68.105.29.16

My routes indicated that I was routing through a router at 192.168.0.1 and was assigned the dynamic IP address of 192.168.0.3. Shown by the commands:

ip r
ip a

My traffic would function normally (internet, XMCP, IRC, etc...) until I connected to my OpenVPN Server via the terminal with the command

sudo openvpn ~/client.ovpn

Once connected, it will immediately stop all traffic.

A new adapter (tun0) was created for this connection. Shown by the command:

ip a

Connecting with Wireshark revealed dozens of DNS calls aimed at my original DNS servers, even though the configuration was set to tunnel all traffic through my OpenVPN servers.

My Solution

After a full week of reading many dozens of bug-reports, blog posts, and tutorials, I still had no success. But, this is a DNS issue and DNS is managed by resolv.

Finally, I stumbled upon this GitHub library and my problem was resolved.

masterkorp/openvpn-update-resolv-conf

To implement these scripts, I cloned the repo into my home directory with:

git clone https://github.com/masterkorp/openvpn-update-resolv-conf.git

I copied those scripts to /etc/openvpn with:

sudo chmod +x *.sh && sudo mv *.sh /etc/openvpn

Next, I installed openresolv, nscd, and unbound with:

sudo apt-get install openresolv nscd unbound

Then, I edited my OpenVPN Client Configuration file (*.ovpn or *.conf) and appended the following lines at the end of the configuration directives, but before the "ca" tag (your inline certs, if any):

script-security 2
up "/etc/openvpn/update-resolv-conf.sh /etc/openvpn/update-systemd-network.sh"
down "/etc/openvpn/update-resolv-conf.sh /etc/openvpn/update-systemd-network.sh"

This allowed me to connect successfully to the VPN and tunnel my traffic.

My resolv.conf file now looks like:

# Generated by resolvconf
nameserver 127.0.0.1
nameserver 127.0.1.1

Discussion and Need for Better Solution

It appears to me that Ubuntu's DNS records are not being properly updated. The purpose of the above code and the new entries is to rewrite a malfunctioning update process of the internal DNS server records. I have read some bug reports on Launchpad that suggest that 16.04 relies on some old network management update code that was written and working in 14.04, and was never properly migrated to the new 16.04 framework.

There must be a better way of handling this process. I don't like the idea that I need to use custom scripts to patch problematic OS behavior.

Anyone have any insight in this?

Set your DNS servers in /etc/resolv.conf  then try this in the terminal as root:

chattr +i /etc/resolv.conf

then reboot


Bash remove first and last characters from a string I have a string like that:

|abcdefg|

And I want to get a new string called in someway (like string2) with the original string without the two | characters at the start and at the end of it so that I will have this:

abcdefg

Is that possible in bash?

You can do

string="|abcdefg|"
string2=${string#"|"}
string2=${string2%"|"}
echo $string2

Or if your string length is constant, you can do

string="|abcdefg|"
string2=${string:1:7}
echo $string2

Also, this should work

echo "|abcdefg|" | cut -d "|" -f 2

Also this

echo "|abcdefg|" | sed 's/^|\(.*\)|$/\1/'

You can use this:

echo "|abcdefg|" | tr -d "|"

With this line of code, you remove all |->(pipe) in the string.


Install Ruby, Rails, Gems, Passenger for 1.8.7 on Ubuntu 14.04 I am trying to move a Ruby site to a new host that's running Ubuntu 14.04, but it needs Ruby 1.8.7.  I can use rvm to install 1.8.7, but I'm unsure of how to get rails, gems, and passenger working for this version as well.

What do I need to run to set up rails, gems, and passenger for ruby 1.8.7 on my new Ubuntu machine?

You should check gems versions that match the Ruby version.

Example:

https://rubygems.org/gems/passenger

That "Ruby Dependency >= 0" It means it will work on any version.

Another example:

Rake gem 10.2.1 depends of Ruby >= 1.9: https://rubygems.org/gems/rake/versions/10.2.1

But click on another version like this: https://rubygems.org/gems/rake/versions/10.2.2 and it says ">= 1.8.7" and it should work in your case.

So, you need to manually check for the right version of each gem.


Wine won't follow Symbolic links I can't get Wine to follow some symbolic links I have in my home folder or in applications. Is there a way to enable this? This is on Wine-1.5.18.

Edit: Just in case it helps, I'm trying to use a symbolic link to share the save data from my Fallout 1, between my netbook and my Desktop via Dropbox.

Edit 2: Apparently, there was a option in the wine config file in the past, but I can't find it in the new registry. Anyone have any idea?

When symbolic linking to something you wish to run, you need to use the full path instead of path shortcut notation. Wine will not expand the notation and tries to follow as a relative path. i.e. use /home/user instead of ~/.

See this answer for more details: https://ubuntuforums.org/showthread.php?t=2001697

I'd establish both directories as drives inside wine using winecfg (do it for this program specifically not globally) Then you can just copy from E: to F: (your letters may be different)


How to back up to a FreeNAS box? I have a FreeNAS box running 8.3, with a password protected SMB share. How would I set up deja dup to work with that share? I can switch to an AFP or NFS share, if need be.

I also have a FreeNAS system on my network, and I used the built-in Ubuntu backup (deja-dup) to back up to the FreeNAS via SSH. (I tried using SMB too, but I couldn't get it to work. This workaround may work for you.)
First, I added a new user to FreeNAS just for backing up Ubuntu. You can add this user via the FreeNAS administration GUI. Since I just need this user to do the one thing, I just named the new FreeNAS user the name of my test machine. If you need a step-by-step on how to do this, please check here: http://doc.freenas.org/index.php/Users
Second, I created a ZFS Dataset where the backup will happen. Again, I just named it after the machine. Here is more info on how to create a ZFS Dataset: http://doc.freenas.org/index.php/Volumes#Creating_ZFS_Datasets - I set a cap on the space available to that dataset (twice the size of the hard drive should be more than I'll ever need, but your mileage may vary). After that, I changed permissions so that the new user is the owner of this ZFS Dataset.
Then, I generated an SSH key on my Ubuntu machine. This Ask Ubuntu thread shows how in great detail: How can I set up password-less SSH login? - I didn't set a password for my key, because I don't think deja dup can handle that.
Next, I copied the SSH public key into the appropriate box in the FreeNAS User control panel for that user. Make sure your public and private keys are in your /home/(username)/.ssh/ directory on your Ubuntu machine. At the same time, I also set the ZFS Dataset I created as this user's home directory.
Finally, I set up the backup settings. Here's how my settings look:

Backup location: SSH (available in the dropdown menu)
Server: 192.168.x.x (type in the IP address of your FreeNAS device)
Folder: /mnt/(Pool)/(ZFS Dataset) (Use the full path of the ZFS Dataset you created.)
Username: (use the username you set up in FreeNAS)

Test it by trying to "Back Up Now". If you want it to back up automatically, don't set a password for the back-up. Finally, to schedule the backup to repeat, set the frequency on the "Schedule" tab in DejaDup and turn Automatic Backups to "On" in the Overview tab.
If for some reason it doesn't work, double-check your:

SSH private key is in the correct location on Ubuntu
SSH public key is in the correct location on FreeNAS
FreeNAS user has the correct permissions for the ZFS dataset

I took screenshots, and I have more links to stuff, but it seems like this I'm not allowed to add more with limited reputation. I'll see if someone else can try to add them. Good luck!

I don't know this box but I suggest nfs if you back up from Linux, http://ubuntuforums.org/showthread.php?t=2104468


Installing WLAN driver to laptop w/ no internet I am trying to install a WLAN driver in order to get internet access on my laptop. I can only add files to this laptop via a USB stick, there is no other way to connect to the internet using this laptop until I have a WLAN connection. As such, I cannot use repositories to install anything.

WLAN is: Dell Wireless 1390 WLAN Mini-Card BCM4311 [14e4:4311]
Laptop is: Inspiron 1520 (32 bit)
Ubuntu Version is: 16.04 LTS

Please can someone talk me through how to install the driver via USB. I have tried Broadcom's advice (http://www.broadcom.com/docs/linux_sta/README_6.30.223.271.txt) but it assumes you already have an internet connection.

Try ip command.

$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether XX:XX:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
    link/ether XX:XX:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff

if wlan0 appear, you can continue.

$ ip link set wlan0 up
RTNETLINK answers: Operation not permitted
$ sudo ip link set wlan0 up
[sudo] password for user:
$ whatis ip
ip (8)               - show / manipulate routing, devices, policy routing and tunnels
ip (7)               - Linux IPv4 protocol implementation
$ ifconfig wlan0
bash: ifconfig: command not found
$ sudo ifconfig wlan0
wlan0     Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX
          UP BROADCAST MULTICAST  MTU:1500  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:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

  XX:XX:XX:XX:XX:XX : your hardware mac