can`t create anew solution with mono? i installed mono develop with his all Packages . when i tried to create anew solution , an error message appeared to me.
what should i do?
this is the text which bothered me:

Error while trying to load the project '/home/theghost/Desktop/3333/3333/3333.vbproj': Project does not support framework '.NETFramework,Version=v4.0'

What version of ubuntu are you on?

Ubuntu tries to limit itself to one version of each library on the system. This means only one version of mono is available on ubuntu. The version of ubuntu you have, will determine what version of .net is supported.

For example on ubuntu 12.04, only .net 4.0 applications will run, .net 2.0 applications will not run / compile by default.

You should also be aware that vb.net is not well supported in mono. c# is really the language of choice for mono. The mono runtime itself will run vb.net applications quite well but the compiler may not work. If you want to run a vb.net application on ubuntu you really need to build it on windows and then run it on Ubuntu.

Check your config file for any attribute that tells the framework to be 4.0. Try using a lower framework. Mono Develop is not good enough in linux.


Test that I have correctly added someone's public key to authorized_keys I've been through quite a few rounds of this over the years:

Someone gives me their id_rsa.pub
I copy it into .ssh/authorized_keys
I ask them to test
Some time later, they test and report it doesn't work.
I mess around with line feeds, permissions etc, go back to step 3.

Is there any way (obviously without asking for their private key) to verify that a public key has been installed correctly?

TROUBLESHOOTING

On your remote server, run the following:

ls -la ~/.ssh | grep "authorized_keys"

You should see output similar to the following:

-rw-------  1 example.com example.com 398 Jul 15 10:32 authorized_keys

Note that the directory needs to include the file called authorized_keys with -rw------- (600) permissions.

Finally, run this command to check the permissions on your .ssh directory:

$ ls -ld ~/.ssh
drwx------   2 example.com example.com     3 Jul 15 10:32 .ssh

You should have a folder called .ssh with drwx------ (700) permissions.

If for either of these tests, you get blank output, or a message similar to the following:

ls: /root/.ssh: No such file or directory

Please repeat Steps 1 and 4-5 above.

Found this here


Grub always fails to install, furthest I get is grub> prompt Tried to install 10.10 yesterday and eventually got an error that Grub had failed to install. Asked me to select another partition, cancel install or continue without a bootloader.

Everytime I selected another partition the error would just pop back up immediately (not convinced it even tried writing anything to disk).

I did do some partitioning when I was in the installer - shrunk an ntfs partition and grew the Linux one to make up for it - the defaults were set to place at beginning of drive and logical (as opposed to primary), so I left it with that.

The first time grub just went to the recovery prompt - but most of the commands that were 'supposed' to work, didn't (been reading articles and how-tos). After another reinstall and an attempt to install manually I got through to the grub> prompt, but have failed to get much further.

I've checked the grub directory and there's no grub.cfg anywhere, but it's definitely 1.9x that's installed. There should be no Legacy Grub installations anymore, that I'm aware of.

Have gone through various methods to try and load a kernel or configure grub but they've all been unsuccessful.
For example: http://ubuntuforums.org/showthread.php?t=1195275

EDIT:

Sorry, you're right, I should have been clearer, left a lot of space for assumptions there. Was writing it while researching/rebooting.

I have actually managed to work around it, but I will get back with that partition table 'cause I'm pretty sure something is wrong somewhere - still unable to get the distro installer to install grub, as it should.

Using Ubuntu Linux. Was failing to get past the grub> prompt because I wasn't loading the initrd image. Did that and I was flying. Just ran update-grub once I got into Ubuntu proper.

In my opinion, you try to install by selecting 'continue without a bootloader', when you finish, reboot your computer with a liveCD or LiveUSB again. after being on the desktop, try to reinstall grub with the steps:
mount ubuntu partition that you installed earlier. you can click on places > your-ubuntu-partition
open terminal, run:

sudo chroot /media/your-ubuntu-partition
sudo grub-install /dev/sda
sudo update-grub

close the terminal, and try to reboot it.

Here's the piece I was missing. You have to make sure your /boot/grub/device.map
is correct before you do: grub-install:

what:/boot/grub# cat device.map

(hd0) /dev/cciss/c0d0

i had to correct to:

(hd0) /dev/sda

before I could run:

/sbin/grub-install /dev/sda

for grub version .97 (1)


Screen turns black but doesn't lock when I press Ctrl+Alt+L I am unable to lock my desktop in Ubuntu 11.10 with

Ctrl + Alt + L

If I press the above key sequence the screen turns black and the little lock icon appears at the top right of my screen.

However, if I press a key or move my mouse, the black screen disappears and my desktop appears again.

Does anyone know why?

If you create a password in "user accounts" then Ctrl + Alt + L will lock with a password. If you don't want to have to type in a password for log on then simply enable automatic log on. Hope this helps. :)

It maybe a god function in windows OS,and you get used to it,probably.but it cannot keep you private safe,after all lock screen with passwords just do it.


What is the standard for naming deb file name? I want to find out the standard for the deb file names. For example I have file with the name foo_1.0.0-1_all.deb. As I have found out in Debian FAQ there is such convention:

<foo>_<VersionNumber>-<DebianRevisionNumber>_<DebianArchitecture>.deb

But this is not a standard. It does not answer to a a lot of questions. For example: how long can be ? What are the permitted characters in ? What values can be in ?

Is there any standard that describes deb file name in detail?

Well, as you said, the name foo_VVV-RRR_AAA.deb for a deb file is just a convention for naming .deb files, where VVV, RRR and AAA are the version, revision and architecture of the package foo.
Also, this convention is suggested (dictated) when building packages with debuild or git-buildpackage.
If you agree with this convention is ok, if not, you can rename your .deb files as you wish, but only by following these rules (in this case maybe you must to run dpkg --info <deb_file> to find a simple information that normaly you can get using the above convention for a deb file name).
Now, as you can read at Filename - Wikipedia:

There is no general encoding standard for filenames.
Because file names have to be exchanged between software environments (think network file transfer, file system storage, backup and file synchronization software, configuration management, data compression and archiving, etc.) it is very important not to lose file name information between applications. This led to wide adoption of Unicode as a standard for encoding file names, although legacy software might be non-Unicode-aware.
[...] Filename maximum length is not standard and might depend on the code unit size. Although it is a serious issue, in most cases this is a limited one.

So, if there is no standard for file names in general, I am almost sure that there is not a special standard for .deb file names. Or, if you are still confused, take the convention as a standard, and follow these rules.

Here are some thoughts about naming conventions:

  If you've used Debian for any amount of time, you might have noticed that Debian package files all follow certain naming conventions. Every Debian binary package should have a filename that follows this format: packagename_version_arch.deb, where "packagename" is the name of the package, "version" is the package version with major, minor, and revision numbers, and "arch" is the architecture for the package. <..>

From IBM.com

  Although this one is for RPM, it has a pretty nice naming convention aswell:
  name-version-release.architecture.rpm

  where:

  name is a name describing the packaged software.
  version is the version of the packaged software.
  release is the number of times this version of the software has been packaged.
  architecture is a shorthand name describing the type of computer hardware the packaged software is meant to run on. It may also be the string src, or nosrc. Both of these strings indicate the file is an RPM source package. The nosrc string means that the file contains only package building files, while the src string means the file contains the necessary package building files and the software's source code.

From RPM.org


SAP ADT 'installing software' has encountered a problem - Eclipse IDE When installing 'new software' in Eclipse IDE (Help → Install New Software...) and following exactly the steps as described here, I encounter this problem (at steps 8 - 9):

Here is the full error output:
An error occurred while collecting items to be installed session context was:(profile=_home_mohammad_eclipse_java-2020-12_eclipse, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
Unable to read repository at https://tools.hana.ondemand.com/2020-12/plugins/com.sap.adt.abap.prog.rap.doc.dev_3.14.100.jar.
Connection reset
Unable to read repository at https://tools.hana.ondemand.com/2020-12/plugins/com.sap.adt.abapdev.guide.doc.user_3.14.100.jar.
Connection reset
Unable to read repository at https://tools.hana.ondemand.com/2020-12/plugins/com.sap.adt.hana.guide.doc.user_3.14.100.jar.
Connection reset
Unable to read repository at https://tools.hana.ondemand.com/2020-12/plugins/com.sap.docu.bpc4hana.help_1.23.0.jar.
Connection reset
Unable to read repository at https://tools.hana.ondemand.com/2020-12/plugins/com.sap.docu.bpc4hana2.help_1.23.0.jar.
Connection reset
Unable to read repository at https://tools.hana.ondemand.com/2020-12/plugins/com.sap.docu.bw.help_1.23.0.jar.
Read timed out
Unable to read repository at https://tools.hana.ondemand.com/2020-12/plugins/com.sap.docu.bw4hana2.help_1.23.0.jar.
Connection reset
Unable to read repository at https://tools.hana.ondemand.com/2020-12/plugins/com.sap.mts.processintegration.guide.doc.user_1.124.0.jar.
Connection reset

I had exactly the same issue on Windows, and It was because Eclipse was installed in Windows drive/Program Files. So I just needed to provide admin permission or move eclipse out of Program Files.
But on Ubuntu 20.04 LTS (Focal Fossa), I don't know what to do.
Any suggestions would be really appreciated.

Could you try starting Eclipse with these following arguments :
-vmargs -Djava.net.preferIPv4Stack=true


Why is my Bluetooth headset not working now? I have an FSL Zero Bluetooth headset which was working fine with Ubuntu until a recent update. I'm on Ubuntu 15.04. The headset is recognised as a Bluetooth device and gets connected but doesn't appear in Sound Settings. When I execute the following command, it appears in the Sound Settings but then cannot be switched to A2DP (even though the option is presented), making it unusable:

sudo -i pactl load-module module-bluetooth-discover

I have tested the headset with other devices to ensure that the headset is not at fault.

How should I get the headset to appear automatically in Sound Settings, as it did before recent updates? How can I get the headset to be used with A2DP?

I had the same problem and for several months I have tried all possible solutions I could find to no avail,... until today!

I found the solution in post #17 in the following https://bbs.archlinux.org/viewtopic.php?pid=1526534#p1526534 (tnx SimFox3)

What I did:

First copy the files I edited

sudo cp /etc/bluetooth/audio.conf /etc/bluetooth/audio.conf_tmp
sudo cp /etc/pulse/default.pa /etc/pulse/default.pa_tmp
sudo cp /usr/bin/start-pulseaudio-x11 /usr/bin/start-pulseaudio-x11_tmp

Edit /etc/bluetooth/audio.conf

sudo nano /etc/bluetooth/audio.conf

This is in my audio.conf

# Configuration file for the audio service
# This section contains options which are not specific to any
# particular interface
[General]
Enable=Gateway,Source

# Switch to master role for incoming connections (defaults to true)
Master=true

# If we want to disable support for specific services
# Defaults to supporting all implemented services
#Disable=Gateway,Source,Socket
Disable=Socket

# SCO routing. Either PCM or HCI (in which case audio is routed to/from ALSA)
# Defaults to HCI
#SCORouting=HCI

# Automatically connect both A2DP and HFP/HSP profiles for incoming
# connections. Some headsets that support both profiles will only connect the
# other one automatically so the default setting of true is usually a good
# idea.
AutoConnect=true

# Headset interface specific options (i.e. options which affect how the audio
# service interacts with remote headset devices)
[Headset]

# Set to true to support HFP, false means only HSP is supported
# Defaults to true
HFP=true

# Maximum number of connected HSP/HFP devices per adapter. Defaults to 1
MaxConnected=2

# Set to true to enable use of fast connectable mode (faster page scanning)
# for HFP when incoming call starts. Default settings are restored after
# call is answered or rejected. Page scan interval is much shorter and page
# scan type changed to interlaced. Such allows faster connection initiated
# by a headset.
FastConnectable=true

# Just an example of potential config options for the other interfaces
#[A2DP]
#SBCSources=1
#MPEG12Sources=0

Edit /etc/pulse/default.pa

sudo nano /etc/pulse/default.pa

comment out (with an # at the beginning of the line) the following line
    #load-module module-bluetooth-discover

now edit /usr/bin/start-pulseaudio-x11

sudo nano /usr/bin/start-pulseaudio-x11

and after the lines

if [ x”$SESSION_MANAGER” != x ] ; then
        /usr/bin/pactl load-module module-x11-xsmp “display=$DISPLAY session_manager=$SESSION_MANAGER” > /dev/null
fi

add the following

/usr/bin/pactl load-module module-bluetooth-discover

Restarted and I was finally able tot switch to A2DP

Hope it works for you too.

Sorry for the delay but I hope my post will helped someone.

Obviously, for my part, on ubuntu-mate 14.04 the problem was an old version of blueman (the gui bluetooth manager)

I have just install the ppa of blueman and install the latest version for my version of ubuntu.

Voilà


What would be the concept behind the password not being echoed on cli I am curious to know why the password characters(special characters) are not echoed when we login to the system via a terminal.

But we can see the password characters(special characters) while we login to the system via GUI.

The only reason i can think of is that the total number of characters in my password wouldn't be revealed to someone who's spying over my system/password.

Any suggestions/ides?

One possible explanation is that command line logins have been around for much longer than GUIs. I think the dots that replace characters are a relatively new idea that have been implemented in GUIs. On the command line, however, nothing was originally shown and it has stayed this way over the years.

The simple answer is that back when we had to go to a "node" to access a "terminal" in a roomfull of them, you had to consider that someone next to you might be watching.  Kinda like copying your homework.

Back then, the University would "charge" for your time on the system (there was no real money involved unless you were a grad student with a grant, but it limited the time students had to use before having to go mother-may-I to get more).

Thus came about the idea of hacking other peoples' passwords simply to get more computer time.

This is similar to what Bill Gates and Paul Allen were doing when they wrote the first BASIC for the Altair.  They snuck in at night and used system consoles (no password needed) so they could get computer time to do the development of an emulator then write their interpreter then punch it on paper tape.  They were using ASR-33 teletypes that ran at 110 baud.

Back to the node situation and the CRT character-based terminals didn't echo anything, or maybe they echoed *, the rationale is that it is much harder to watch your fingers on the keyboard than to read it on the screen.

The original reason that most login passwords show up as asterisks or dots as you type was so you know your keyboard is working.  When you walked up to a terminal you never knew until you saw it respond.  Often the room would be full of users and the one terminal that nobody was sitting at was down for some reason or other.  Maybe it would work long enough to take your login name and prompt you for a password then "CP DISCONNECT" on its own (Honeywell 66/40).

I remember using LA-120 DECwriter printing terminals on a Honeywell mainframe at UACN where after you typed your password (which would print on the paper) the carriage would go back and overwrite it a few times with asterisks and hash marks so the dumpster divers couldn't get it.

The idea of having no echo at all came about so nobody can get the length of your password, which might help them guess it.  They'd start with your girlfriend's name, or your pet, etc.  Having the length would help if that was their approach.

sudo is used a lot more often than personal logins, and by then you know your keyboard it working, so it made sense to the developers to have no echo at all.  If you get it wrong it just tells you and you try again.

Plus, sudo requires the root password, which is much more precious to a hacker than your personal login password length.

I know you wrote this question 5 years ago (it is Aug 2017 as I type), but I am describing the late 70s and early 80s.  Do the math.  Many moons ago.

Lots of things like this have a rich history that people never think to write about or even ask about.  Most of the time people don't really think about why they are doing what they're doing.  They just do things they have been taught, by rote.

Thanks for asking the question the way you did.  It is rare to get to do this kind of an answer.

When I began cranking out children I discovered their favorite word was "Why?" - but people don't really use that word very much these days.  So it is fun to get a chance to take a breather and remember the good old days.

It is fun to remember all the things we could get those old machines to do.  Myself, I used that same behemoth to do dynamic simulations of the solar wind being affected by the earth's magnetic field and predicting where the magnetopause was where it was more affected by the interplanetary magnetic field about 80 earth radii on the back side, for instance.  The results came out as large plots on paper done by a CalComp Plotter.  The program took about 3 hours to run for each plot.

Also simulated forest fires and how the trees would need x number of hours to dry out and burn.  Some trees were 1-hour fuels, some 10-hour, and 100-hour, etc, depending on their diameter.

Everything was in FORTRAN.

I can't help but wonder how fast it would run on these computers we have now.

Enjoy.


How to backup and restore Firefox bookmarks from command line? Is there an easy way to backup Firefox bookmarks to a file with command line. Running a find command, I managed to find this file: /.mozilla/firefox/9a5j5dbb.default/bookmarkbackups/bookmarks-2013-05-22.json which appears to have my latest data. However, I dont know if the folder under Firefox (currently 9a5j5dbb.default) will keep changing, and I'm pretty sure the date will.

Rather than a more advanced shell script to dynamically calculate the path based on today's date and looking for the only xxxxx.default folder under ~/.mozilla.

Is there a simpler/more-robust way to save/copy your current Firefox bookmarks to a specified file?

Using sqlite:
Firefox uses sqlite to store its data. Bookmarks are stored in ~/.mozilla/firefox/profile_name/places.sqlite. So we can use sqlite to backup and restore Firefox bookmarks.
Hit Ctrl+Alt+T to open terminal and run following command to install sqlite3:
apt-get install sqlite3

Now you can one following command to backup/restore Firefox bookmarks, make sure to close Firefox before running any of following commands.
Backup:
sqlite3 ~/.mozilla/firefox/user.profile/places.sqlite ".backup /path/to/directory"

Restore:
sqlite3 ~/.mozilla/firefox/user.profile/places.sqlite ".restore /path/to/backup/file"

Change user.profile with your default profile name.
Simple Backup:
If you don't want to install any additional packages use following command to copy latest bookmarks backup from Firefox profile:
cp $(find ~/.mozilla/firefox/fvy8ug06.default/bookmarkbackups | sort | tail -n1) .

In mozilla there is a option for taking the Backup of Bookmarks in JSON format.

You can follow these steps:-

open all bookmarks (shift+ctrl+o)
select 'Import and Backup' option (alt+i)
Select 'Backup' option

here you can get all bookmark backup in json format.


"Could not open moddep file '/lib/modules/3.XX-generic/modules.dep.bin'" when mounting using a loop Running 14.04 in virtualbox 4.3.8

Unable to detect the guest additions.iso when i selected the guest additions.iso in the IDE Secondary Master.

No problem, so I used wget and downloaded the iso into the guest ubuntu headless.

when I attempt to load the iso from inside using these commands:

sudo mkdir /media/iso
sudo modprobe loop
sudo mount filename.iso /media/iso -t iso9660 -o loop

At the sudo modprobe loop, I got the following error:

modprobe: ERROR: ../libkmod/libkmod.c:556 kmod_search_moddep() could not open moddep file '/lib/modules/3.13.0-24-generic/modules.dep.bin'

Here are my lsb_release -a:

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04 LTS
Release:    14.04
Codename:   trusty

EDIT:

When I typed

ls /lib/modules/*/modules.dep.bin

I get back

/lib/modules/3.11.0-20-generic/modules.dep.bin  /lib/modules/3.13.0-24-generic/modules.dep.bin /lib/modules/3.5.0-49-generic/modules.dep.bin

Thanks to Braiam comments, I have solved it using

sudo apt-get install --reinstall linux-image-3.13.0

If you can't access the network you can do

dpkg-reconfigure linux-image-$(uname -r)

It worked for me


How do I upgrade a 15.10 Wily Werewolf machine directly to 16.10 Yakkety Yak? My Ubuntu 15.10 system only reminds me to install Ubuntu 16.04, but I wish to install 16.10 version.

How could I upgrade to 16.10 directly?

You may have to upgrade to 16.04 first, and after this upgrade is completed, upgrade to 16.10.

I think possible to upgrade while skipping a version, but I wouldn't recommend doing so, as it could result in various problems after the upgrade.

Try this,

sudo apt-get update && sudo apt-get dist-upgrade
sudo update-manager -d

This last command should open the Update Manager tool where you’ll need to press a shiny ‘upgrade’ button. Do comment in case you run in trouble while doing this.


why ubuntu-13.04-desktop-i386.iso file not running when mount it on windows 7 32bit ? I am trying to install ubuntu-13.04-desktop-i386.iso on my windows 7 32bit os but when i mount ISO file and run wubi.exe , it's not running, same problem in ubunatu 14.04.1 -desktop-i386.iso anybody please help me....i how can i fix this problem ?

You should not use Wubi. It has been discontinued as of Ubuntu 13.04. It had many bugs and was unstable in general.

However, if you really want to, you can still run Wubi. Note that you will need to have Windows 7 to run these steps. Wubi is not tested/supported on Windows 8. They do not play nice.

Start by copying the Wubi.exe file from the ISO image to your desktop.
Double-click it.
Follow the install wizard.
???
Profit.

If you can, always install Ubuntu on its own partition. It'll be faster, stabler, and easier to fix if problems come up. There is no guarantee that Wubi will work as expected (or even work at all). You have been warned!

Wubi is no longer supported as of ubuntu 12.10 (I believe) except for special situations. Instead of just mounting it like that I suggest creating a live usb or dvd and booting up a full live session.

Also, if you were trying to use wubi to install so you can use ubuntu from within windows 7 then my recommendation is to use a virtual machine as you can make a full virtualized installation from wubi.


Where do deb packages install to I installed a deb package via the commandline like this:

sudo dpkg -i dbeaver_2.1.0_i386.deb

I want to install some drivers for the software and to do so I need to place them in the root directory of the application, so where did the package install to?

As stated on the comments, that concept of application root directory generally don't apply to Ubuntu packages, but to compressed archives (.tar.gz or .zip, for example) that you can extract to somewhere you want. There the root directory may be the directory you extracted (if the compressed file contains a directory).

In your specific case, the application root seems to be in /usr/share/dbeaver. You can try to place there the files but you will need root permission. Also it is not a very good solution, so check one of the following options first.

In your case, you seem to be trying to install this, and the manual driver installation should only be needed if you downloaded the .zip version. From the website:

  Note: Generally you don’t need to download this archive. It may be useful if you are going to use DBeaver in an environment without internet access.

So check if the application don't comes already with those drivers. If not check if it has not a functionality inside the application to install them.

Indeed the application allows you to install the drivers, but for some reason the installation always fails (on the .deb version, maybe because of no write permission). So you have two options:

Download the .zip version and uninstall the .deb version: after you download just extract the folder contained on that archive and place it wherever you want. The root directory of the application will be that directory so you just place there the needed .jar's. If it doesn't work try place them on the plugins subdir.
You will have to specify the paths to the drivers on the application. Go to "Database" -> "Driver manager". There select the driver you want and press "Edit". You will see something asking you to install the driver. Press "OK".

It will then probably fail but press "Ignore". You will see the following screen:

delete the red item (by selecting it and pressing "Delete") and use "Add Folder" to specify the location where you extracted the JDBC drivers.

Hope it helps.


How to kill only if process is running? Currently I use line like this in my sh script file:

kill `ps aux | grep -F 'myServer' | grep -v -F 'grep' | awk '{ print $2 }'`

But I wonder how to call it only if process (myServer here) is running?

I usually just use pgrep and pkill

if pgrep myServer; then pkill myServer; fi

try using:

sudo kill `pidof process_name`

where process_name is the name of the process you want to kill. What's great about this is that pidof will list the pid's of all processes matching the given name. Since kill accepts multiple pid's, it will kill of all of them in a single whim.

Let me know if this helps.


Create a new SSH user on Ubuntu Server Just created a new virtual Ubuntu server and I'm in the process of hardening it for production use. I currently have a root account. I want to do the following:

Create a new user (let's call them jim for the rest of this). I want them to have a /home/ directory.
Give jim SSH access.
Allow jim to su to root but not perform sudo operations.
Turn off root SSH access.
Move SSHd off to a non-standard port to help stop brute-attacks.

My problem lies with the first two items. I've already found useradd but for some reason, I can't log in as a user created with it over SSH. Do I need to beat SSHd to allow this?

SSH is very picky about the directory and file permissions. Make sure that:

The directory /home/username/.ssh has permission "700" and is owned by the user (not root!)
The /home/username/ssh/authorized_keys has permission "600" and is owned by the user

Copy your public key into the authorized_keys file.

sudo chown -R username:username /home/username/.ssh
sudo chmod 0700 /home/username/.ssh
sudo chmod 0600 /home/username/.ssh/authorized_keys

There is NO need to add the user to /etc/ssh/ssh_config.

There might be some instances that the PasswordAuthentication is disabled by default.

Kindly check /etc/ssh/sshd_config and ensure that the PasswordAuthentication attribute is set to yes.


Cut and store a string untill a word is found in bash I have this string

/path/to/www/continued/xyz

I want to cut the string till www means I want the string

/path/to/www

How can I do this in bash

sed  's/www.*$/www/' file

where file is the file containing this type of strings.

pilot6@Pilot6:~$ sed  's/www.*$/www/' <<< "/path/to/www/continued/xyz"
/path/to/www

If you have the string in a variable var then run

echo $var | sed  's/www.*$/www/'

Just write the following command in bash.It will do the work.

  cut -c1-12

And for more information check out this link.You will be clear after that.

  http://www.folkstalk.com/2012/02/cut-command-in-unix-linux-examples.html


Steam error missing libGL.so.1 when downloading steam to my amd64 bit ubuntu pc i get the error-you are missing the following 32-bit libraries and steam may not run: libGL.so.1

any fixes would be much appreciated

I noticed that the package was in the /app-install/ library, so I used the Upgrade command, everything was installed and I was able to login.

sudo apt-get upgrade steam -f

I tried installing steam with the file I downloaded from their website but got that error.
I uninstalled steam and then reinstalled it with the command sudo apt-get install steam and now it works fine.


Xubuntu 13.10 And Ubuntu 13.10 both show WPA Supplicant error? Why am I getting this error. How do I fix it?

sudo lshw -C network
*-network
       description: Wireless interface
       product: AR9485 Wireless Network Adapter
       vendor: Qualcomm Atheros
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: wlan0
       version: 01
       serial: 74:e5:43:f2:18:cd
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list rom ethernet physical wireless
       configuration: broadcast=yes driver=ath9k driverversion=3.11.0-12-generic firmware=N/A ip=192.168.1.154 latency=0 link=yes multicast=yes wireless=IEEE 802.11bgn
       resources: irq:17 memory:f7d00000-f7d7ffff memory:f7d80000-f7d8ffff
  *-network
       description: Ethernet interface
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0.2
       bus info: pci@0000:03:00.2
       logical name: eth0
       version: 0a
       serial: 08:60:6e:04:ac:b6
       size: 10Mbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half firmware=rtl8411-1_0.0.3 06/18/12 latency=0 link=no multicast=yes port=MII speed=10Mbit/s
       resources: irq:42 ioport:e000(size=256) memory:f0004000-f0004fff memory:f0000000-f0003fff

Using ifconfig:

 ifconfig
    eth0      Link encap:Ethernet  HWaddr 08:60:6e:04:ac:b6
              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)

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

    wlan0     Link encap:Ethernet  HWaddr 74:e5:43:f2:18:cd
              inet addr:192.168.1.154  Bcast:192.168.1.255  Mask:255.255.255.0
              inet6 addr: fe80::76e5:43ff:fef2:18cd/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:253274 errors:0 dropped:2 overruns:0 frame:0
              TX packets:134379 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:348427070 (348.4 MB)  TX bytes:13362722 (13.3 MB)

Error Message:

http://s16.postimg.org/6vtwca0v9/Screenshot_10312013_08_07_03_PM.png

http://s12.postimg.org/cwcw0ydl9/Screenshot_10312013_08_07_57_PM.png

The following command seems to fix the error, well at least at first reboot the error does not appear.

sudo apt-get --reinstall install network-manager-gnome network-manager-pptp

I hope this helps.


How to run sudo command with no password? How does the ubuntu user on the AWS images for Ubuntu Server 12.04 have passwordless sudo for all commands when there is no configuration for it in /etc/sudoers?

I'm using Ubuntu server 12.04 on Amazon. I want to add a new user that has the same behavior as the default Ubuntu user. Specifically I want passwordless sudo for this new user.

So I've added a new user and went to edit /etc/sudoers (using visudo of course). From reading that file it seemed like the default ubuntu user was getting it's passwordless sudo from being a member of the admin group. So I added my new user to that. Which didn't work. Then I tried adding the NOPASSWD directive to sudoers. Which also didn't work.

Anyway, now I'm just curious. How does the ubuntu user get passwordless privileges if they aren't defined in /etc/sudoers. What is the mechanism that allows this?

Okay, I have discovered the answer so may as well put it here for completeness. At the end of /etc/sudoers there is what I thought was just a comment:

#includedir /etc/sudoers.d

However this actually includes the contents of that directory. Inside of which is the file
/etc/sudoers.d/90-cloudimg-ubuntu. Which has the expected contents

# ubuntu user is default user in cloud-images.
# It needs passwordless sudo functionality.
ubuntu ALL=(ALL) NOPASSWD:ALL

So that is where the sudo configuration for the default ubuntu user lives.

You should edit this file using visudo. The following command will let you edit the correct file with visudo.

sudo visudo -f /etc/sudoers.d/90-cloudimg-ubuntu

And add a line like:

aychedee ALL=(ALL) NOPASSWD:ALL

At the end.

As I was researching this, I realized that there's a line in the /etc/sudoers file that is not a comment, but a directive that makes any file or folder under the directory /etc/sudoers/* override the contents of /etc/sudoers.

This is a sneaky little directive, as it appears to be a commented line upon first glance. It looks like this:

#includedir /etc/sudoers.d

This is how I've implemented the non-root, passwordless user in an ephemeral Docker Image for use in a CICD pipeline with the base image of ubuntu:18.04:

RUN \
  useradd -U foo -m -s /bin/bash -p foo -G sudo && passwd -d foo && passwd -d root && \
  sed -i /etc/sudoers -re 's/^%sudo.*/%sudo ALL=(ALL:ALL) NOPASSWD: ALL/g' && \
  sed -i /etc/sudoers -re 's/^root.*/root ALL=(ALL:ALL) NOPASSWD: ALL/g' && \
  sed -i /etc/sudoers -re 's/^#includedir.*/## Removed the #include directive! ##"/g' && \
  echo "Customized the sudoers file for passwordless access!" && \
  echo "foo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
  echo "root ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
  echo "foo user:";  su foo -c 'whoami && id' && \
  echo "root user:"; su root -c 'whoami && id'

What happens with the above code:

The user and group foo is created.
The user foo is added to the both the foo and sudo group.
The home directory is set to /home/foo.
The shell is set to /bin/bash.
The passwords for both foo and root are deleted.
The sed command does inline updates to the /etc/sudoers file to allow foo and root users passwordless access to the sudo command.
The sed command disables the #includedir directive that would allow any files in subdirectories to override these inline updates.


FGLRX doesn't show in Additional Drivers I have Dell Studio 15 with ATI mobility HD 4500 Series graphics card.

In Ubuntu 10.10 I used the FLGRX driver which I installed from the Additional Drivers program, I need this because the open source driver runs my computer dangerously hot.

In 11.04 FGLRX is not available in the Additional Drivers program.

Why is FGLRX not showing in Additional Drivers and how do I install it?

Maybe because they are not installed? I have these drivers in Additional Driver application.

You can just install fglrx package using some package manager or just type in console:

sudo apt-get install fglrx

If you want use the newest version of these driver you have to also add PPA repository:

sudo add-apt-repository ppa:ubuntu-x-swat/x-updates

I was in exactly the same situation, having a radeon hd 3450 card, in 12.04. After a normal x.org update (possibly from the backports repository?), suddenly the fglrx driver appeared in jockey, and I was able to install it successfully.


Command to list services that start on startup? Is there a command to list services that run on startup? I imagine it would involve parsing /etc/init.d/, and the various /etc/rc.* directories.

The quick answer is:  It depends on your init system.

The long answer is:  For current versions of Ubuntu, you probably have a mix of Upstart, and SystemV.  Newer versions of Ubuntu after 15.04 "Vivid Vervet" (and other Linux distros like RHEL/CentOS 7) are moving to use SystemD.

Upstart

Upstart Documentation

To list all services:

sudo initctl list

To list all Upstart services and run initctl show-config on them, this one-liner may be helpful:

sudo initctl list | awk '{ print $1 }' | xargs -n1 initctl show-config

System V

SysV Runlevels Documentation

To list all services:

sudo service --status-all

OR:

# for init scripts:
ls /etc/init.d/

# for runlevel symlinks:
ls /etc/rc*.d/

SystemD

SystemD for Upstart Users
FedoraProject SystemD Documentation
RHEL 7: Managing Services with SystemD
RedHat: SystemD Overview

To list all services:

sudo systemctl list-unit-files --type=service

OR:

ls /lib/systemd/system/*.service /etc/systemd/system/*.service


installing pip3 (for python3) on ubuntu 16.04 LTS using a proxy I have tried entering:

sudo apt install python3-pip

The error I get is:

$ sudo apt install python3-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
    libexpat1-dev libpython3-dev libpython3.5-dev python-pip-whl python3-dev python3-wheel python3.5-dev
The following NEW packages will be installed:
    libexpat1-dev libpython3-dev libpython3.5-dev python-pip-whl python3-dev python3-pip python3-wheel python3.5-dev 0 to upgrade, 8 to newly install, 0 to remove and 0 not to upgrade.
Need to get 1,219 kB/39.1 MB of archives.
After this operation, 56.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Ign:1 au.archive.ubuntu.com/ubuntu xenial-updates/universe i386 python-pip-whl all 8.1.1-2ubuntu0.1
Ign:2 au.archive.ubuntu.com/ubuntu xenial-updates/universe i386 python3-pip all 8.1.1-2ubuntu0.1
Err:1 au.archive.ubuntu.com/ubuntu xenial-updates/universe i386 python-pip-whl all 8.1.1-2ubuntu0.1
    404  Not Found
Err:2 au.archive.ubuntu.com/ubuntu xenial-updates/universe i386 python3-pip all 8.1.1-2ubuntu0.1
    404  Not Found
E: Failed to fetch http://au.archive.ubuntu.com/ubuntu/pool/universe/p/python-pip/python-pip-whl_8.1.1-2ubuntu0.1_all.deb
    404  Not Found
E: Failed to fetch http://au.archive.ubuntu.com/ubuntu/pool/universe/p/python-pip/python3-pip_8.1.1-2ubuntu0.1_all.deb
    404  Not Found
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

I believe we have bypassed the proxy, so I'm not sure why I'm getting '404 file not found'.

The first procedure you followed is correct

sudo apt-get -y install python3-pip

But before installing try to update using command

sudo apt-get update

If first did not work then you can also do this using curl

curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
python3 get-pip.py --user

Then to verify installation try

pip3 --help

For checking version :

pip3 --version

I fixed such problem by changing Server in "Software & Updates" -> Download from:
there I chose different address and  404 disappeared.


Modprobe not working So I did

modprobe ./speakup_dummy.ko

in drivers/staging/speakup directory and didn't get any error message. However when I check with

lsmod | grep "speakup"

the module hasn't been loaded. What am I missing here?

You should let linux manage the process of determining which version of the module to load, as it must be the one for the kernel you are running. So, from any directory, just do (and for example):

$ lsmod | grep "speakup"
$ sudo modprobe speakup_dummy
[sudo] password for doug:
modprobe: ERROR: could not insert 'speakup_dummy': No such device
$ lsmod | grep "speakup"
speakup               102400  0
$


Ubuntu 18.04.3 Ethernet Issues I downloaded Ubuntu 18.04.3 LTS two days ago on a PC build, but cannot get the ethernet to work. It detects the connection and says the speed is 1000mb/s, but the connection will not work.

I have an ASRock B450M Pro4 motherboard, and an AMD7 Ryzen CPU, and am not sure if this could be affecting it.

using lshw -C network

*-network
    description: Ethernet interface
    product: RTL8111//8168/8411 PCI Express Gigabit Ethernet Controller
    vendor: Realtek Semiconductor Co., Ltd.
    physical id: 0
    bus info: pci@0000:05:00.0
    logical name: enp5s0
    version: 15
    serial: 70:85:c2:ff:c8:f8
    size: 1Gbit/s
    width: 64 bits
    clock: 33MHz
    capabilities: bus_master cap_list ethernet physical tp mii 10bt 10bt-fd
100bt 100bt-fd 1000bt-fd autonegation
    configuration: autonegation=on broadcast=yes driver=r8169 duplex=full
firmware=rtl8168h-2_0.0.2 02/26/15 latency=0 link=yes multicast=yes port=MII speed=1Gbit/s
    resources: irq:34 ioport:f000(size=256) memory:fcb04000-fcb04fff memory:fcb00000-fcb03fff

Using ip -c a

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp5s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 70:85:c2:ff:c8:f8 brd ff:ff:ff:ff:ff:ff

Any help would be appreciated!

Run:

sudo apt-get install r8168-dkms

Then reboot your PC.


Fortran runtime error: No space left on device while running a GAMESS calculation I am getting an error msg for no space left on the devce. I am running a calculatioon on GAMESS software and it unexpectedly ends with the message "Fortran runtime error: No space left on device"
Please see image attached.snapshot of the end of the calculation
snapshot of df command

I'm guessing that your application fills up your /, and notices it's out of space, deletes the files and exits.

The output you provide shows that it writes to /tmp, which is on the root file system, where you have approx. 6 GiB free.

You should look into how much space the software you're running needs, and if the location of temporary data can be changed, say to /home/username/tmp, where you have over 400 GiB free.

You have too many snaps installed on your device. Your problem is how to remove those old versions.
You already have a thread to resolve that in Super User: How to remove old version of installed snaps


Left mouse button not working in Xubuntu session I recent changed from Ubuntu to Xubuntu 12.04. The install worked great for a few days, but suddenly the left mouse button stopped working. The right click and scroll bars work fine.

After a bit of experimenting I discovered that the problem only happens when I set the session to Xubuntu at login. The mouse also works fine in my dual-booted Windows vista.

What could make my mouse stop working like that?

Check if you have xserver-xorg-input-evdev installed on your system:

sudo dpkg -s xserver-xorg-input-evdev

If yes, do:

sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get upgrade

If no, do:

sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install xserver-xorg-input-evdev

Reboot.

Freantique's solution does not work for my Samsung N210 with Xubuntu 12.04. I find a solution that it works and I posted a step by step tutorial here: http://ubuntuforums.org/showthread.php?p=12489693#post12489693


Why dd is not a reliable command to write bootable .iso files to USB thumb drive? One answer here indicates that Ubuntu .iso s are not expected to boot if copied with dd to a USB thumb drive. Why do some Linux distributions have the option to directly write their bootable .iso file to a thumb drive with dd, but others (Ubuntu?) do not?

In Ubuntu I think it has to be converted to .img first.  Is this true?

Is it for some architectural difference in .isos? Or is it due to any limitation of dd itself?I don't know if it is off-topic here. I can move it to a more proper place if the community thinks so or suggests one. Some explanation would be appreciable.

With Ubuntu 12.04 it is possible to dd the .iso file to a disk to create a bootable disk. It only works with some isos (including Ubuntu 12.04, but not earlier Ubuntu versions) because booting from CD and booting from a disk are handled differently on BIOS based systems.

Among other things, for a hard drive to be bootable it must contain boot code in the first sector, for a CD to be bootable it must contain boot code "at sector 11 (17 decimal) in the last session on the CD" according to the El Torito specification. Since the boot code, at least the initial portion loaded by the BIOS, is stored in different places for CDs and hard drives, a disk image can have boot code in both places so that the bootloader is loaded if the image is booted as a hard drive or as a CD.

Most iso files are only designed to be bootable as CDs, and so they contain no boot code in the first sector of the image and thus a hard drive containing such an image won't have boot code in its first sector and won't be bootable.

Notes that have no changes on the above posted accepted solution.

The question was posed as reliable, bootable iso and using dd.

In most cases linux users use the phrase iso to mean a special image of an optical disc. Bootable in that case could be one of a few methods that bios or uefi understands and allows to run from optical disc.

dd is generally considered reliable however it could fail for many reasons on it's own and have nothing to do with the source or output. In most case it seems to fail only because it doesn't ask "Are you sure you want to wipe that out??"

Modern computers tend to view a usb as a real internal hard drive.

One could use a tool like 7z also to copy over some iso's to a fat32 flash drive.

This all assumes some modern hardware and a modern usb flash drive.

In the future we will have to be creating uefi bootable media in most cases.


Wifi problem, Windows works, tried a lot! authenticating -> associating I can not connect to my Wi-Fi, can someone please help or give a hint? I googled a lot. The network manager gets stuck at: "configuring interface".

After a lots of tries I get two messages: 1. wireless network deactivated. 2. no secrets were provided. It also keeps repeating to enter the password.

Wifi chip: Intel 3160 rev cb OS: Ubuntu 15.04

Log file with only the important part: http://s000.tinyupload.com/?file_id=71320239466069844799

I tried changing some settings in OpenWRT:
Tried different width (20 Mhz to 40 Mhz)
Tried different channels (11 and 13)
Tried accesspoint, ad hoc
Tried no ecryption, wpa-psk (with force CCMP (AES) and auto), wpa2-psk

I think this part from the logfile is most important:

kernel: [ 1064.946076] wlan0: authenticate with 74:ea:3a:db:21:52
kernel: [ 1064.948713] wlan0: send auth to 74:ea:3a:db:21:52 (try 1/3)

NetworkManager[661]: <info> (wlan0): supplicant interface state: scanning -> authenticating
kernel: [ 1065.044535] wlan0: send auth to 74:ea:3a:db:21:52 (try 2/3)
kernel: [ 1065.116197] wlan0: send auth to 74:ea:3a:db:21:52 (try 3/3)
May 14 22:32:57 laptop kernel: [ 1065.199438] wlan0: authentication with 74:ea:3a:db:21:52 timed out

wpa_supplicant[809]: wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="Home" auth_failures=1 duration=10

NetworkManager[661]: <info> (wlan0): supplicant interface state: authenticating -> disconnected

wpa_supplicant[809]: wlan0: CTRL-EVENT-SCAN-STARTED
NetworkManager[661]: <info> (wlan0): supplicant interface state: disconnected -> scanning

NetworkManager[661]: <warn> Activation (wlan0/wireless): association took too long, failing activation.

NetworkManager[661]: <info> (wlan0): device state change: config -> failed (reason 'ssid-not-found') [50 120 53]

First, check the settings in the router. WPA2-AES is preferred; not any WPA and WPA2 mixed mode and certainly not TKIP. Second, if your router is capable of N speeds, you may have better connectivity with a channel width of 20 MHz in the 2.4 GHz band instead of automatic 20/40 MHz, although it is likely to affect N speeds. I also have better luck with a fixed channel, either 1, 6 or 11, rather than automatic channel selection. Also, be certain the router is not set to use N speeds only; auto B, G and N is preferred. After making these changes, reboot the router.

Next, I recommend that your regulatory domain be set explicitly. Check yours:

sudo iw reg get

If you get 00, that is a one-size-maybe-fits-all setting. Find yours here: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 Then set it temporarily:

sudo iw reg set IS

Of course, substitute your country code if not Iceland. Set it permanently:

gksudo gedit /etc/default/crda

Use nano or kate or leafpad if you don't have the text editor gedit. Change the last line to read:

REGDOMAIN=IS

Proofread carefully, save and close the text editor.

Next, I'd set IPv6 to Ignore in Network Manager: http://docs.fedoraproject.org/en-US/Fedora/18/html/Installation_Guide/images/netconfig/network-connections-ipv6-ignore.png  This example is for ethernet, but you want wireless.

If these changes do not help, please try:

sudo -i
echo "options iwlwifi 11n_disable=8"  >>  /etc/modprobe.d/iwlwifi.conf
exit

Reboot and tell us if connectivity is improved.

Possible, you have configured Mac Filter on you WiFi router.

In your log I see:

May 14 22:32:45 laptop kernel: [ 1053.150123] wlan0: authenticate with 74:ea:3a:db:21:52
May 14 22:32:45 laptop kernel: [ 1053.152547] wlan0: send auth to 74:ea:3a:db:21:52 (try 1/3)

This means your wifi adapter trying to send it's mac address to router for authenticate.

Disable Mac filtering on your router or allow device with mac address "74:ea:3a:db:21:52" to get access.

After that, reconnect to your "Home" network.


Ubuntu full install on 64gb usb3.0 sandisk So I'm aware that it isn't recommended to run a full Ubuntu install on USB sticks due to the limited read/write cycles as compared to traditional SSDs or hard disks, and the USB connection limits write speeds etc..

I just wanted to know if this applies to newer drives like the one listed above,
The read speed is 130mb/s so it's faster than traditional hard drives.

But I'm unsure about the longevity I can get from this newer USB flash

Is it OK to run a full Ubuntu install from it?

I currently have two windows OS installs on my dedicated hard drive, this is why I rather run Ubuntu straight off my USB.. It's quickly becoming my default OS .

I use ms office web apps when I need to edit docx, deezer.com for music, and overall Ubuntu proves to be pretty awesome.

I game on windows 8.1 and run my piano software on Windows.

It doesn't make sense to use an expensive 64GB USB 3.0 flash drive for a full installation of Ubuntu due to the limited read/write cycles as you mentioned. All you need for it is an inexpensive 16GB USB flash drive. How do I install Ubuntu to a USB key? (without using Startup Disk Creator).

OK, lets do the math;

Size 64 GB

Write speed 50 MB/s

No of writes 10000 to 100000.

64GB x 10000 / 0.05 GB/s = 12800000s or 417 eight hour days

64GB x 100000 / 0.05 GB/s = 128000000s or 4167 eight hour days

Of course it is only written to a small percentage of the time and reading is not detrimental to the drive, so the above figures are an absolute minimum.

My last 64GB USB3 flash drive cost me about $25, the cost works out to about 6 cents a day max.


Why can't I login to the GUI via lxdm after upgrading to lubuntu 13.04? When I boot to the login screen, I can put in my credentials but nothing happens after that. I left my laptop over night and it still didn't log in. The only thing I can do is hit ctrl, alt f2 to get a terminal and run startx which required me to install gnome shell (ugh). If I run startlxde, I get an error saying that it can't connect to the display.

Edited: It seems the issue is with lxdm. LightDM allows me to login just fine.

Try using lightdm instead of lxdm as display manager. That worked for me.

Although I can't explain why it fails with lxdm, only found some "cannot connect to X" messages at .cache/lxsession/LXDE/run.log.

Try:

Ctrl + Alt + F1 and log in.

sudo mv -v .Xauthority .Xauthoritybak
sudo shutdown now -r

It should now work.


"Ubuntu is an ancient african word, meaning 'I can't configure Debian.'" -- why did they write that? From urban dictionary ubuntu is defined as "Ubuntu is an ancient african word, meaning "I can't configure Debian"".

http://www.urbandictionary.com/define.php?term=ubuntu

I'm confused for that... How true is this sentence? Are really Ubuntu and Debian so close to each other?

No, this is a joke.

Ubuntu (the word) "is an ethic or humanist philosophy focusing on people's allegiances and relations with each other". It is often translated directly as "humanity towards others. The word has its origin in the Bantu languages of southern Africa".

Ubuntu (The OS) is built on the foundation of Debian. It is a fork of the Debian project. Ubuntu shares many of the packages and components of Debian.

Ubuntu's goal is to be a user friendly Linux distributions for those unfamiliar with Linux in general. "Ubuntu has a strong focus on usability and ease of installation" whereas "Debian is known for relatively strict adherence to the Unix and free software philosophies" and will sacrifice user friendliness in favour of those ideals.

Hence the formulation of the joke. If you are new to Linux and are unable to configure Debian, you may instead choose Ubuntu. They have taken a inconsequential fact about the Ubuntu distro (it's naming based on an African word) and altered it to poke fun at the project goals, just like advanced users often ridicule beginners (or newbies) in many areas of proficiency.

UrbanDicionary.com - In their own words "A website with a brilliant concept that could have become great if it hadn't been overrun by a mob of losers, who spend their days trying to feel important and popular by insulting everything else on God's green earth."

Thought I would throw in this short clip of Nelson Mandela's definition of Ubuntu.


Change default "open with" for Documents directory My Documents directory is automatically open with vlc.

How can I change this so that I can see my .doc files in Ubuntu 11.04?

If you have trouble opening any folder and therefor can not use "RightClick (Documents) > Open With Other Application... > File Browser" you can use this from command line

mimeopen -d ~/Downloads/

You will get a choice of options that are related to directories. Nautilus will be #1 in this list:

Please choose a default application for files of type inode/directory

    1) Open Folder  (nautilus-folder-handler)
    2) Other...

Make sure it says inode/directory and not inode/mount!

After choosing 1 all folders will be opened by Nautilus.

Ofcourse this list will have more options when you have more filemanagers have installed.

Have seen this with other applications Items On Places Menu Opens VLC


How to create a new folder on List view on nautilus? This is a really small problem, although it seems to be like a pretty big design issue.

When the folder is full of files, for example, there's no empty space left to right click on, so how do I create a new folder? Or a new document? There's absolutely no space to click.

Here's an example:

If I right click anywhere, it just opens the file right click menu.

Use the File->New Folder or the Ctrl+Shift+N shortcut.

Under the File menu you can find the New Document option as well.

I find that if I right click on the open space to the right of the file name, not on the highlighted line (for example on the line where your .steam directory is) that the submenu with  New Folder appears.

I am using Nemo for a file manager, and the behaviour of Nemo is slightly different in this area.


how to install gstreamer0.10-plugins-bad? WONT INSTALL hello AskUbuntu Ive been having trouble for a few days with AUDIO.Mid files for a few games i play like fallout 3 where i need to play AUDIO.mid files

what happens is when i try to play mid files it says needs gstreamer0.10-plugins-bad i click install nothing happens.

i tried searching the plug in on https://apps.ubuntu.com/cat/applications/saucy/gstreamer0.10-plugins-bad/ but it says package is virtual.

Ive tried googling for a deb but no such deb exists.

Any help would be appreciated thanks.

UBUNTU 16.04 XENIAL

I found a package installer for this issue:

http://www.linuxfromscratch.org/blfs/view/svn/multimedia/gst10-plugins-base.html


Ubuntu 14.10 not available through software updater? I'm in Ubuntu 14.04 LTS, and I've enabled the "notify me for every new release" option. I still am not able to upgrade through software updater.

Check again ;)

It is now (@~18:30 UTC 2014) officially released.

Utopic Unicorn has not been released yet.

Wait a couple of minutes, check out the website, stay awake because it's close to happen!

If it still doesn't show up go to 'Settings' and under 'Software & Updates' click the 'Updates' tab and for 'Notify me of a new Ubuntu version'' make sure it's set to 'For any new version', click ok and check for updates and it should be there.


How to not install recommended and suggested packages? I use Ubuntu 12.04 64-bit, I did the following: sudo gedit /etc/apt/apt.conf and added

APT::Install-Recommends "false";
APT::Install-Suggests "false";

But it did not work. When I try to install a package, it still wants to install the suggested and recommended packages. How can I solve this?

If you do not want to install recomended packages you can run apt-get with the --no-install-recommends flag or aptitude with the --without-recommends/-R flag.

If you want these flags to always be enabled (I do NOT recommend this) put the following lines in your /etc/apt/apt.conf file:

APT::Get::Install-Recommends "false";
APT::Get::Install-Suggests "false";

Remember that these packages are recommended for a reason and it is probably not a good idea to ignore it at all times. You would be better off using the flags in the cases where you know that the recommended packages are wrong.

I would recommend creating /etc/apt/apt.conf.d/60user file with the single line:

APT::Install-Recommends "false";

This works fine for me on 12.04.


Missing libxmlrpc-c3 dependency while installing Boxee anyone can help me to installing boxee in ubuntu natty 11.04, there is an error
"Dependency is not satisfiable: libxmlrpc-c3"

Looking at the forums, this is a known issue with the version of Boxee which you have downloaded from the vendor's website.

The consensus is that the vendor does update the version of boxee when a new distribution such as Natty is released, but you may have to wait a few days/weeks

Assuming that you are unwilling to wait :-)

There is a workaround to "correct" the dependency that can no longer be satisfied in Natty (i.e. that library in your screenshot).

Open you text editor and save the contents of the the following (thanks to this forum post):

#!/bin/bash

EDITOR=gedit

if [[ -z "$1" ]]; then
  echo "Syntax: $0 debfile"
  exit 1
fi

DEBFILE="$1"
TMPDIR=`mktemp -d /tmp/deb.XXXXXXXXXX` || exit 1
OUTPUT=`basename "$DEBFILE" .deb`.modfied.deb

if [[ -e "$OUTPUT" ]]; then
  echo "$OUTPUT exists."
  rm -r "$TMPDIR"
  exit 1
fi

dpkg-deb -x "$DEBFILE" "$TMPDIR"
dpkg-deb --control "$DEBFILE" "$TMPDIR"/DEBIAN

if [[ ! -e "$TMPDIR"/DEBIAN/control ]]; then
  echo DEBIAN/control not found.

  rm -r "$TMPDIR"
  exit 1
fi

CONTROL="$TMPDIR"/DEBIAN/control

MOD=`stat -c "%y" "$CONTROL"`
$EDITOR "$CONTROL"

if [[ "$MOD" == `stat -c "%y" "$CONTROL"` ]]; then
  echo Not modfied.
else
  echo Building new deb...
  dpkg -b "$TMPDIR" "$OUTPUT"
fi

rm -r "$TMPDIR"

Save the file as "edit-deb-control.sh" into your Downloads directory.

Open a terminal and type the following

cd Downloads

sh edit-deb-control.sh boxee<tab>

N.B. press the  key will autocomplete the full file name

This will open a text editor with the contents similar to the screen-shot below

change the value of libxmlrpc-3 found in the file to the value shown in the screenshot:

Save the file in the text editor and close the file.

This will create (after a while) a new .deb file in the Downloads folder.  You will see the name as boxee...modified.deb

Double click that file in File Manager (nautilus) - it should open the software-center, but this time, the dependencies error should no longer be there.

Here's a tutorial to install boxee on ubuntu 11.10 and solves the dependency problem:
http://lauziere.net/how-to-install-boxee-ubuntu-11.10


wine is not opening battlefront 2 I'm using Ubuntu 14.04.

I've downloaded wine and wine Q4 and I've made sure that i have all the components for wine. I'm trying to play battlefront 2 (it's an exe file which I downloaded online). I have the original cd but I can't play in on my laptop as my disk drive is broken.

When I try to open the file with wine it acts as if it's about to open but then closes down and changes my screen resolution. I know the file works because I've used it before on windows 7.

The file also has .dll and .bink.32 which I think it needs to run.

How can I get it working?

According to Star Wars - Battlefront II WineHQ page only the "Steam 1.1" version really works (Platinum).

Keep this in mind for future reference: Anything below "Gold" is probably a waste of time. Software may install but then don't run or run partially and may have several other issues and limitations.

In conclusion, an Wine emulated Star Wars - Battleship II is doable if, and only if, it's running through Steam (for Windows). Any other installer gives mixed results and should be expected not to work.

Go to folder containing the game. There is a folder GameData. And inside is BattlefrontII.exe. Open it.


How Can I connect USB Printer in Virtual Box OSE Win XP How Can I Connect USB Printer in win XP installed within VirtualBox OSE.

Help also needed to connect any usb device in above set-up.

I use UBUNTU 10.10.

After having installed Virtual Box together with the Oracle Extension Pack and the Guest Additions we are able to activate USB devices attached to the host by right clicking the little icon on the right bottom of Virtual Box Manager to select the USB device:

By doing so the USB device will be deactivated from the host. After installing the appropriate drivers on the guest you will have full access to the device from the guest.

Note: On the host users need to be in the group vboxusers to allow access on USB devices from the guest. Run sudo usermod -a -G vboxusers <YOUR_USER_NAME>, logout and login again to get the effective change.

An alternative method to enable printing without use of USB is to enable network printing in the host and add the new network printer to the guest.

I believe that the USB component of virtual box is proprietary and non-free. There for Ubuntu cannot ship it with the OS. You may need to install the proprietary version ( or possibly only a proprietary extension these days ) in order to get that functionality.

I don't use that feature myself, however I believe that Oracle have some documentation on their Virtualbox website which may assist you.


Run root script or command as root in startup application in Ubuntu 14.04 I have a wireless adapter that used to work in ubuntu 13.10 (dwa 171) after installing drivers for it. Now it won't work the same way anymore since I upgraded to ubuntu 14.04.

I've found the only way to make it work properly is to run the command sudo service network-manager restart I already tried putting this command in rc.local, rc2.local and rc3.local with no real luck. I want this command to run automatically right after login in with startup application program. Please tell me how to.

The sudo command expects you to enter your password via a command prompt. Use gksudo instead, and you will be shown a GUI prompt to type your password in.

So the command to add to your startup applications would be:

gksu service network-manager restart

You might also want to delay that command from running right away, to give your desktop a chance to load:

sleep 15s; gksu service network-manager restart

Hi everyone thanks for trying to answer my question. I have found a permanent fix for my network adapter that the newer release of ubuntu broke. My solution involved getting this ppa: deb http://ppa.launchpad.net/mathieu-tl/nm/ubuntu saucy main it has Ubuntu's 13.10 network manager package and wpasupplicant package. I went to synaptic and downgraded only the wpasupplicant package. I never have to run the command sudo service network-manager restart again.


Ubuntu 16.04 ssh: sign_and_send_pubkey: signing failed: agent refused operation I just upgraded my Ubuntu System from 15.10 to 16.04 by completely wiping the Ubuntu 15 partition from my system.

After installing Ubuntu 16.04 I recreated my ssh keys as I forgot to back them up, but whenever I attempt to use ssh I get sign_and_send_pubkey: signing failed: agent refused operation this is slightly annoying as it lets me through to my ssh server, but git refuses to push code using ssh.

I have already pushed the keys to the server by using ssh-copy-id.

The Server I am connecting to is a Ubuntu 16.04 Server upgraded through the do-release-upgrade command. Any help will be greatly appreciated.

Looks like an ssh-agent is running already but it can not find any keys attached. To solve this add the private key identities to the authentication agent like so:

ssh-add

Then you can ssh into your server.

in addition, you can see the list of fingerprints of all identities currently added by:

ssh-add -l

I tried a couple of things, among others ssh-add, resetting SSH (deleting .ssh/ on the server, and such, but no luck. So it turned out I just had to sleep over it for one night. It helped! Why? I guess the ssh-agent running on the server had something in its cache which was refreshed later that night with the now proper values. Anyhow, it now works like a charm. To wrap up, it did this (Ubuntu 16.04 on localhost, 14.04 on server).

# on local host:
$ ssh-keygen
# (yes, overwrite the default file, and let the passphrase be empty)
$ ssh-copy-id ***.***.*.**
# (insert proper server IP address)
# now test
$ ssh ***.***.*.**
# this should have erected in .ssh/ on the server:
# -rw------- 1 *** *** 2000 aug.  11 09:55 authorized_keys
# no other magic going on! :)


How to stop the double cursor from appearing? The mouse cursor when I try to move something dragging and dropping it it may split into two cursors or it may be one cursor with two arrows! I can't take a screenshot ..

I'm able to make it disappear without locking screen .. but I don't want it to appear suddenly .. is there a solution to prevent it from reappearing? I'm using lubuntu "Ubuntu 14.10" ..

it's an old thread but if trying the code above, new gsettings is in this format:
gsettings set "SCHEMA" "KEY" "VALUE"

so will be the following:
gsettings set org.gnome.settings.daemon-plugins.cursor active false

i have always hated how gnome renders the double cursor or cursor over cursor.

you could try this from the terminal and enter this in:

 gsettings org.gnome.settings.daemon-plugins.cursor -KEY=active -VALUE=false

and it might work fine this way.


Cannot install Ubuntu with UNetBootin I have tried several times to install Natty on its own partition on my laptop (WinXP, Intel x86) using UNetBootin, but it always fail.

There is a dialog box:

Failed to unmount partitions

The installer needs to commit changes to partition tables,
but cannot do so because partitions on the following could
not be unmounted.

/cdrom

Please close any applications using these mount points.

Would you like the installer to try to unmount these partitions again?

If I click on "continue" Ubiquity will hang up, that is, the slideshow will play forever. I do not have a built-in optical drive and I'm not currently using any peripheral.

I have tried sudo umount /cdrom it says that cdrom is busy. Then the command fuser /cdrom returns "Stale NFS file handle".

How can I work around this to install Ubuntu?

I have also spent hours trying to fix this, even though my problem did not start with UNetBootin. However I got the same result: the installer just quit and said that thing about not being able to unmount /cdrom

Finally the right solution was found at https://help.ubuntu.com/community/Installation/FromLinux

Specifically, do this:

  Note2: Instead of using 'workaround', an alternative is to modify the file /etc/mtab by erasing the line that specifies the partition where the cdrom is mounted. This way the kernel thinks thats the /cdrom is not mounted and will not show the advice when installing ubuntu. I think this procedure is less dangerous than the one in the previus note.

Do this before you start the installer. If that does not work, try to do this right before you press the "Install Now" button.

I had the same issue with both unebootin and rufus. I fixed this by turning on USB 3.0 legacy mode or usb3.0 configuration in pre-os in BIOS.


Unity: How do I revert Alt-tab behavior to switch between windows on the current workspace? Enabling Bias alt-tab sorting to prefer windows on the current viewport as described here made no difference. How can I get back the exact same behavior as 11.04, so that alt-tab only switches between windows on the current workspace?

Simply disabling the alt-tab and shift-alt-tab keybindings on the unity switcher seems to have helped, but it still switches workspaces on me sometimes.  For example, if I give a terminal window focus then press alt-tab, it switches to another terminal window on any workspace before trying to switch on the same workspace. Also, the Unity switcher still shows up when I alt-tab then hold alt even though I removed its alt-tab keybinding.

You can revert back to the older style of window switcher by enabling the Static Application Switcher plugin in CompizConfig Settings Manager:

Warning: What are some of the issues with CCSM and why would I want to avoid it?

Steps:

CompizConfig Manager is gotten through sudo apt-get install compizconfig-settings-manager (thanks to @donbright)
sudo apt-get install compiz-plugins to get the static application switcher to show up. (thanks to @Milimetric)
CompizConfig Manager is started by typing ccsm in terminal (thanks to @donbright)
Disable the keyboard shortcuts for Unity's switcher by unchecking CompizConfig Settings Manager ▸ Desktop ▸ Ubuntu Unity Plugin ▸ Switcher ▸ Key to start the switcher ▸ Enabled and Key to start the switcher in reverse ▸ Enabled
Enable the Static Application Switcher by checking CompizConfig Settings Manager ▸ Window Management ▸ Static Application Switcher ▸ Enable Static Application Switcher

To make task switcher only display windows in current workspace run this command from terminal (CTRL+ALT+T):

dconf write /org/gnome/shell/app-switcher/current-workspace-only 'true'

To revert back to switching between windows on all workspaces:

dconf write /org/gnome/shell/app-switcher/current-workspace-only 'false'

This is confirmed working in Ubuntu 17.10.


How do I enable the ALT + F10,F9 shortcuts? Helo, why there is no ALT+F10 (maximize) or ALT+F9(minimize) shotcut in ubuntu 12.04?  Or can i enable them somewhere?

If you are on unity, then click the cog in the upper- right corner and choose System Settings

Now find the Keyboard entry, there you will be able to edit all your shortcuts.

You are looking for Maximize window and Minimize window they can be found under Windows. Just set the shortcut to whatever you want it to be.

Real working solution is in here https://bbs.archlinux.org/viewtopic.php?id=129872 and then htop or mc works as before!


How to check RAM size? What is the command to find the RAM size in computer? I want to see result in MB.

From a terminal you should be able to use:
free -m

From man page:

-m, --mebi Display the amount of memory in mebibytes.
--mega Display the amount of memory in megabytes. Implies --si.

Note: A kilobyte (kB) is 1000 Bytes.

Physical memory available in MiB:

echo $(($(getconf _PHYS_PAGES) * $(getconf PAGE_SIZE) / (1024 * 1024)))

Virtual memory available in MB:

echo $(($(getconf _AVPHYS_PAGES) * $(getconf PAGE_SIZE) / (1024 * 1024)))

..or use /proc/meminfo:

grep MemTotal /proc/meminfo | awk '{print $2 / 1024}'

To see the physical chip information, you can use dmidecode to extract the DMI type 17 (Memory Device) tagged information:

sudo dmidecode -t 17

this informs you about all the memory devices installed, including the type, speed, manufacturer, form factor and a lot more besides. Yo also have sudo dmidecode -t memory which give a little bit more information.


How can I add more disk space to /boot for update When I perform an update, then informed me that I do not have enough disk space.

I have plenty of hard drive space so I just need to increase space on the partition that is allowed for ubuntu to use for operating system and updates.

The error message reads

The upgrade needs a total of 26.7 M free space on disk '/boot'. Please free at least an additional 10.5 M of disk space on '/boot'. Empty your trash and remove temporary packages of former installations using 'sudo apt-get clean

I have done sudo apt-get clean and still not enough space.

I have tried sudo apt-get autoclean then sudo apt-get update & sudo apt-get upgrade

I'm going to guess that Update Manager is trying to load a new kernel in /boot and there's not enough room, so we can free up space by removing older kernels.

Firstly and foremost, please be careful.

Let's look at what's in the /boot partition - I'll use Nautilus as Super User from my computer to provide an example.

lkristie@TinMan:~$ sudo nautilus
[sudo] password for lkristie:

This is the procedure I follow when I need space for new kernels.

Open /boot when Nautilus comes up (screenshot below).

Note the tagged objects are all of the same version - delete them; I'd recommend this: free up the disk space you need and that's it.

If you're tempted to do some housekeeping here, understand the impact of whatever it is you decide to do and - if you're not sure - do the required reading before taking any action.

Leland

Try:

sudo apt-get autoclean

To get rid of old downloaded packages. Then, try to install the updates:

sudo apt-get update && sudo apt-get upgrade


Unable to launch 'zoom'-meeting app on ubuntu 16.04.7 I am trying to use the zoom videoconferencing application on ubuntu 16.04.7, but it does not seem to work.
I installed the probably latest version of zoom using the command
sudo apt install ./zoom_amd64.deb

which might have installed the version 5.3.465578.0920. At the end of the install process I got the message on the terminal
N: Can't drop privileges for downloading as file '/home/alex/Downloads/zoom_amd64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)

Not the slightest idea what it means, and if this is maybe the cause of the problem.
However, I am able to 'start' zoom by typing
zoom

This opens a window:

I click on "Sign In" then choose "Sign In with SSO", and here I choose the company domain and click on "Continue".
This opens a web-page which looks like follows:

Here I click on "Open xdg-open" and briefly an icon appears on the screen

which vanishes after about 5 seconds.
If I then click on "Launch zoom" the same pop-up appears, with no change. I uninstalled and reinstalled zoom.
Is there a way to fix this? Or does zoom just not work on ubuntu?

It turns out there was another instance of zoom (?) running.
To fix this problem you can do
ps -ef | grep zoom

and kill every instance you find. Then restart the zoom application!

Check your dependencies. From the official Zoom support page:

If the dependencies are not installed when using the terminal or
graphical installer, run this command to update the package database,
then try installing Zoom again.
sudo apt update

If you have issues installing, make sure you have the following
dependencies installed:
libglib2.0-0
libgstreamer-plugins-base0.10-0
libxcb-shape0
libxcb-shm0
libxcb-xfixes0
libxcb-randr0
libxcb-image0
libfontconfig1
libgl1-mesa-glx
libxi6
libsm6
libxrender1
libpulse0
libxcomposite1
libxslt1.1
libsqlite3-0
libxcb-keysyms1
libxcb-xtest0


How do I install Flashtool 0.91 on Ubuntu 14.04 LTS? http://www.flashtool.net/download.php

try to give me a guide or something(with pictures or a video if possible)

Check first if Java is already installed:

java -version

If the reply states a positive one (as shown below)

java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)

Then you're in luck mate! You can continue to the next step

If not,then;  (I use WebUpd8 Team's PPA for ease of installing)

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

After installing Java7,extract the FlashTool tar.gz,then the tar to some folder (In this case,I will use Desktop)

sudo bash
cd Desktop
cd FlashTool
./ FlashTool

enjoy and remember - Exit the terminal after exiting Flashtool

someone with Flashtool in their machines please just follow this link https://help.ubuntu.com/community/Repositories/Personal and add Flashtool to the Ubuntu repositories


How to use manual partitioning during installation? I'd like to see the full How-To on how to use manual partitioning during Ubuntu installation. The existing guides (at least those I found here) cover only automatic part and leave untouched the manual part (or extremely short and contain no pictures).

I'd like to cover such situations:

If you have blank disk
If your disk contains Windows installed
If your disk contains other systems:
If it is GPT, RAID or LVM
If you have a OEM-preinstalled copy of Windows 8

If you have blank disk

Boot into Ubuntu Installation media. This can be either CD or USB stick.
Start the installation. Proceed to Step 4 and choose "Something else":

You will see your disk as /dev/sda or /dev/mapper/pdc_* (RAID case, * means that your letters are different from ours)

Click "New Partition Table..." You will see that you have free space on your disk now:

(Recommended) Create partition for swap. Swap is the partition for keeping unneeded memory pages, like Windows swap. Also it can be used for hibernation.

Select free space and click +
Set parameters like on the picture below:

Notice that you should set swap size more than you have physical memory in order to use hibernation. Also, you can place it in the end of disk, but thus it will be slow.
Create partition for / (root fs). This is the filesystem that contains your kernel, boot files, system files, command-line utilities, libraries, system-wide configuration files and logs.

Select free space and click +
Set parameters like on the picture below:

10 – 20 GiB should be enough
Create partition for /home. This is the filesystem for your user's files: documents, images, music and videos. It's much more like Users folder in Windows.

You can do this just like in step 5 and even choose other fs type (though I recommend use ext4 instead of reiserfs. Simply, the first is much more flexible and the second is quicker)
(Optional) Create separate partitions for /boot, /tmp and /var. Set their size according to your needs:

/boot should be 100 – 500 MiB
/var and /tmp should be > 5 GiB

If you doubt about which device for boot loader installation to choose, leave it default. It would be set by installer. But sometimes it does mistakes. Let me guide you how to deal with it:

If you use only one hard disk, select or leave /dev/sda intact.
If you use more than one hard disk with no RAID, select the one from which your system does boot. You can also select other disk and set BIOS to boot from it.
If you have RAID from which your system starts, it will be /dev/mapper/...

Be sure that you select entire disk, not a single partition!

After all, you should see your disk like this:

As LiveWireBT noticed in comments, it is recommended to place root partition onto primary partition on MBR scheme disks. However, it belongs to personal taste. Sometimes it's even better to put /boot directory on primary and leave root on logical partition.

That's all! You can now click Install Now and proceed to the installation.

Partition shows "unknown" Used in GParted

This happened to me on 17.10 because my Windows 10 Lenovo P51 used a Logical Disk Manager (LDM) Partition.

The solution was to shrink the partition from inside Windows as shown at: https://askubuntu.com/a/521195/52975

You can then install Ubuntu on the free space allocated.

Cannot shrink disk fully

Then I hit the second problem: Windows said I had 400Gb of free space in the partition, but I could only shrink 250Gb.

The solution was to go inside Windows and:

Disable Page File (AKA Windows' swap)
Disable System Protection

as mentioned at: https://superuser.com/questions/1017764/how-to-shrink-a-windows-10-partition/1060508#1060508

Then after the reboot, it let me shrink it all the way.


Hiding output of a command I have a script where it checks whether a package is installed or not and whether the port 8080 is being used by a particular process or not. I am not experienced at all with bash, so I did something like this:

if dpkg -s net-tools; then
    if  netstat -tlpn | grep 8080 | grep java; then
        echo "Shut down server before executing this script"
        exit
    fi
else
    echo "If the server is running please shut it down before continuing with the execution of this script"
fi

# the rest of the script...

However when the script is executed I get both the dpkg -s net-tools and the netstat -tlpn | grep 8080 | grep java outputs in the terminal, and I don't want that, how can I hide the output and just stick with the result of the ifs?

Also, is there a more elegant way to do what I'm doing? And is there a more elegant way to know what process is using the port 8080 (not just if it's being used), if any?

To hide the output of any command usually the stdout and stderr are redirected to /dev/null.

command > /dev/null 2>&1

Explanation:

1.command > /dev/null: redirects the output of command(stdout) to /dev/null
2.2>&1: redirects stderr to stdout, so errors (if any) also goes to /dev/null

Note

&>/dev/null: redirects both stdout and stderr to /dev/null. one can use it as an alternate of /dev/null 2>&1

Silent grep: grep -q "string" match the string silently or quietly without anything to standard output. It also can be used to hide the output.

In your case, you can use it like,

if dpkg -s net-tools > /dev/null 2>&1; then
    if  netstat -tlpn | grep 8080 | grep java > /dev/null 2>&1; then
    #rest thing
else
    echo "your message"
fi

Here the if conditions will be checked as it was before but there will not be any output.

Reply to the comment:

netstat -tlpn | grep 8080 | grep java > /dev/null 2>&1: It is redirecting the output raised from grep java after the second pipe. But the message you are getting from netstat -tlpn. The solution is use second if as,

if  [[ `netstat -tlpn | grep 8080 | grep java` ]] &>/dev/null; then

While flushing the output to /dev/null is probably the easiest way, sometimes /dev/null has file permissions set so that non-root cannot flush the output there. So, another non-root way to do this is by

command | grep -m 1 -o "abc" | grep -o "123"

This double-grep setup finds the matching lines with abc in them and since -o is set ONLY abc is printed and only once because of -m 1. Then the output which is either empty or abc is sent to grep to find only the parts of the string which match 123 and since the last command only outputs abc the empty string is returned. Hope that helps!


How can I reverse the 'fn' key on an Apple Keyboard so that F1, F2, F3... are used as default? To be more clear, right now the volume and brightness keys are used and I have to hold 'fn' in order to execute an F1, F2, F3, F4, F5... command. Can I reverse this so it's function key by default and holding 'fn' enables the volume and other special controls?

This is described on the Ubuntu Community Wiki:
https://help.ubuntu.com/community/AppleKeyboard#Change_Function_Key_behavior
You can try:
sudo bash -c "echo 2 > /sys/module/hid_apple/parameters/fnmode"

If it works you can change this permanently (per the linked wiki page):
echo options hid_apple fnmode=2 | sudo tee -a /etc/modprobe.d/hid_apple.conf
sudo update-initramfs -u -k all
sudo reboot # optional

On older Apple laptop hardware, this is accomplished by a configuration setting of PBButtonsd.  You would need to add this line to the config file /etc/pbbuttonsd.conf:

KBDMode = fkeysfirst

PBButtonsd works on iBooks and PowerBooks (PowerPC-based) and MacBooks (Intel-based); the native Ubuntu package seems to have disappeared after Dapper Drake


Is the current version of Ubuntu usable on a PPC mac? Is the current version of Ubuntu usable on a PPC mac?

I've got a "lamp shade" mac from 2003 that I'd like to recycle into my first Linux computer.  I'm not a programmer.  So it appeals to me that Ubuntu is a download/upload kind of thing.

Apple iMac G4 1.25GHz

Any suggestions?

download the Desktop version for ppc computers from here.
Then just make a bootable usb or CD, and install it from there.

How do I get my Mac to boot from an Ubuntu USB key? will help you further.
This is the ppc wiki by Ubuntu.

A PPC Mac is a loose expression, I can't speak for your computer. You wont know until you try. But, if you look at the recommended system requirements and see that your PPC Mac fits that description, then go for it! Remember make a backup of your original system so you can go back if it doesn't fit your needs in terms of performance and such.

To quote the download site:

  installs on systems with less than about 384MiB of RAM (although note
  that low-memory systems may not be able to run a full desktop
  environment reasonably).

The download link: (check alternate install)

http://cdimage.ubuntu.com/releases/12.04/release/

I'm also totally beginner and know nothing about Linux command lines etc. After getting an eMAC recently, 1ghz processor and 1gb of ram, and seeing how slow OSx 10.4 is, I thought, cool lets try Linux. Many suggested Debian for PPC because its lightweight. Well, after a netinstall cd and successful net update and installation of the GUI, I couldnt get it to boot beyond a black screen. Eventually with some fiddling got to a command prompt I could see. Back to the net, I found and downloaded the Live desktop version Ubuntu 12.04.5 LTS for powerpc, burnt the image using poweriso on a windows machine onto Cd and it wouldnt boot to the disc, then burnt the image to a dvd and it booted the live session and from there it installed with no issues and is currently running. But word of caution, it's damn s-l-o-w on these low specs. Might not be worth it in the end. I cant watch movies beyond say 300MB size without hiccups and you wait for your life to pass while it opens anything. Maybe there are lighter weight versions? Good luck.


Segmentation fault when I try to launch unity-control-center When I enter the command unity-control-center it returns:

unity-control-center
libEGL warning: DRI2: failed to authenticate
Segmentation fault (core dumped)

The error is possibly due to nvidia graphic card.
To mitigate the error I used the following command:
prime-select intel.

Try opening the unity-control-center now. My unity-control-center was working fine under nvidia graphic drivers but stopped when I changed the xorg.conf by switching to intel graphic drivers for screen. It might be the possible cause of introduction of this error.

use "sudo unity-control-center" and enter your password

But why you do that through terminal?

Hope it helps


Cant resize or make new partition I just install my first Ubuntu and now want to resize or make new partition, i try with gparted and usb, but they didnt help me. what to do?

Because of the choices that you made during the installation of Ubuntu, you can't use gparted to modify the partition structure. You need to use LVM utilities instead.

In terminal type apropos lvm and you'll see some of the CLI (command-line-interface) tools to use. Type man tool_nameto get help on any specific tool. These can be quite terse and complicated to use.

Another way to manage LVM partitions is to use a graphic interface tool like system-config-lvm.

Here's the description:

System-config-lvm provides a graphical interface to the LVM tools (and related utilities, including fsck and resize2fs) which is good for non-emergency storage administration. It enables you to manage your logical volume and filesystem configuration with a few mouse clicks, and it prevents potentially-disasterous command-line mistakes such as reducing a logical volume size before reducing the filesystem contained within that volume.

To install system-config-lvm:

In terminal...

sudo apt-get update

sudo apt-get install system-config-lvm

Then type lvm into the Unity dashboard search to start this tool.

To get more help on LVM, please see https://wiki.ubuntu.com/Lvm

You cannot move, resize, or delete partitions while they are mounted.

At boot of your OS, the partition it's automatically mounted, so the GParted shipped with your distro cannot operate on your Ubuntu partition.

You can create a Gparted or Live bootable USB/CD or an Ubuntu Live USB/CD in order to operate on the drive with your OS installed.


Performance being really choppy with ATI drivers I just updated to the latest version (11.04) yesterday, and ever since then, the system has been really choppy.

I used to have 10.10 installed, and that was running smooth.

Anyone also experiencing this? Any fixes?

I'm only running Chrome and Netbeans...

Install CompizConfig SettingsManager

sudo apt-get install compizconfig-settings-manager

Warning: What are some of the issues with CCSM and why would I want to avoid it?

Click on the Composite tab, and
un-check Detect refresh rate.

Click on the OpenGL tab, and un-check Sync to Vblank.

This link aways help me with my Radeon

http://wiki.cchtml.com/index.php/Ubuntu_Natty_Installation_Guide#Removing_Catalyst.2Ffglrx


"no such file to load -- zlib" error when installing a gem When I decided to install gem in ubuntu yesterday ( with this command : sudo gem install algorithms ) , bash gave me an error. How can I install gem in ubuntu like that installing on windows ?

************** This is a screenshot from my Terminal ********************

thanks

"No such file to load -- zlib" - gem cannot be installed because it needs library dependency to be installed first. In this case:

sudo apt-get install zlib1g zlib1g-dev

Then try to install the algorithms gem again, it should work.

Install rvm on you ubuntu and install  ruby 1.9.2 or any. then you can create a gemset with

rvm 1.9.2@blabla --create

and run gem install algorithms


Failure to boot in Ubuntu for only-Ubuntu + Nvidia laptop Problem

I just received the Nvidia laptop I ordered specifically for coding and deep learning. So I just erased Windows while installing Ubuntu.

The installation procedures follow Ubuntu community listed below.

Create a bootable USB stick on Windows
Installation Guide
Disk Space

I initially thought there would be no much pain since I do not need dual boot (as I said, I ordered this machine solely for coding and deep learning). However, I am get stuck in purple screen that looks like

It seems that this issue is releated to Nvidia GPU driver, which governs the display. However, all the workarounds I could find assume users could access GRUB, which is not my case since I erased Windows.

Could some help me? Thank you in advance!

Update

I would like to clarify several things

I burned the USB correctly, and could see GRUB like the following, and finally could boot into USB by setting nouveau.modeset=0

I completed all the steps in the Ubuntu installation and probably installed it correctly.
After the Ubuntu installation, I tried to reboot the machine but initially it is all purple, and then the image shown before.

An Ubuntu image is a "live" iso, so "burned" on a stick you can first check if it starts, without installing anything. So that's what I would do:

Take the correctly "burned" usb stick and put it into an usb slot. Power up the machine and "tell" the bios from where to boot (..the usb stick)
if you can't see the initial Ubuntu screen you may see an error message.Then your Iso hasn't been saved correctly
if you can see that screen, start Ubuntu - but thats a sure sign that linux can cope with your graphics card.
If installed Ubuntu usually uses the non proprietary nouveau driver. It might lag and looks grizzly. Now you would have to install the correct nvida driver for your card.

Maybe you did all these things, but didn't tell ;-). Then you probably installed an nvidia driver that is not working for your laptop

.


Black screen on upgrading to 15.04 Recently I upgraded from Ubuntu 14.04 to 15.04, and I get a black screen after the grub screen on selecting Ubuntu. I read a post that suggested I close the lid and open it again, and this actually solves the problem.

But I need to do this every time.

My machine is a HP Pavilion g6 with AMD Quad-Core A6-3420M  with Radeon 6520G graphics card.

I tried several options, which I describe below.

Removed 14.04 and reinstalled Ubuntu Gnome 15.04 from a bootable stick. Black screen appeared after grub screen. I tried to install proprietary drivers from Software Sources -> Additional Drivers. After this, even closing and opening the lid stopped working.
Reinstalled 14.04.
Ran upgrade from the command prompt using sudo do-release-upgrade
This upgraded the system to 14.10, but this also produced the black screen. Closing lid and opening worked though.
Brimming with hope, I ran the upgrade command again.
Upgraded to 15.04, but black-screen remained, with the lid closing and opening still working.
Based on another post, stopped lightdm, ran dpkg-reconfigure xserver-xorg, restarted lightdm. Rebooted machine. Nothing changed.
Per another post, (did not keep track of the URL), I moved .local, .cache, .kde and .config to .local.old etc and restarted. The black screen still comes, the lid closing routine works, but my desktop looks messed up and the resolutions have gone awry.
Tried another method. I had my home and root on different partitions, and I was leaving home untouched till now. I formatted both partitions and tried again from an ubuntu 15.04 ISO download, from which I created a bootable startup stick. The result is still the same: black screen, but lid closing works.

All my fonts and icons have become bigger than before, and the fonts are not sharp either.

The black screen is certainly a video/graphics problem and not a boot problem because I can hear the sound played by Ubuntu on bringing up the login screen.

Awaiting some help!

As per release notes of 14.10,

  Machines with ATI/AMD video cards may be getting blank or entirely turned off screen at boot. The screen will switch on when the X server starts. If you need it to turn on prior to that, for example to unlock an encrypted harddisk hitting ESC twice should reset the video card to a working state.

My problem was finally solved after I applied the latest updates from Ubuntu a couple of days ago. I am unable to get hold of any version number to say which update I am running - if anyone has suggestions on how to get that, I'll be glad to post that information also.

Before applying the updates, I had tried out one more option: adding nomodeset to the Grub start-up script, as described here. That did not help me though. Now I don't know if it is a combination of both which works, but I don't want to play around to find out, as you can well imagine!

Hope this helps others too.

I upgraded to 15.04 from 14.04 and didn't have any issues until I updated and then I was having the same issue, but closing lid didn't fix it. I tried a clean install of 15.04 and found that it started happening after an update of the kernel to 3.19.0-22. Upgrading my kernel (following these instructions: http://www.yourownlinux.com/2015/07/how-to-install-linux-kernel-4-1-2-in-linux.html) to 4.1.2 solved this problem for me, although my wireless card needed to be reinstalled but don't have any issues now