I have used GNU/Linux for over a year on various distributions. I have done everything from edit text, programming, gaming, emulating, and modifying the look and feel of the desktop environment. To do so, I used a variety of useful tools which I will list below.
1 - GNU C Compiler
The GNU C Compiler, or GCC for short, allows you to compile programs written in the C programming language with gcc and C++ programming languages with g++. Non-programmers will also benefit from having gcc on their system, since a lot of the software mentioned will not come in a compiled package, so you must do it yourself.
sudo apt/yum/equo install gcc
2 - Firefox
Although not specific to gnu/linux, firefox is arguably the best web browser available. Firefox is free and open source, so anybody can edit and modify it to their needs. Firefox is also built on top of the second best plugin framework around (first being Eclipse), so it is highly extensible.
sudo apt/yum/equo install firefox
3 - Terminator
sudo apt/yum/equo install terminator
On most distros, xterm is the default terminal emulator. Terminator is a new terminal emulator with much added functionality, such as terminal groups and broadcasting.
4 - The Libreoffice suite
The Libreoffice suite can be seen as the open-source version of the Microsoft office suite, allowing the user to create presentations, documents, spreadsheets, databases, and drawings. Downloads are available at their website.
www.libreoffice.com
5 - zsh
Zsh, the Z-shell, is a replacement for BASH, the shell that is commonly found on Linux systems. Zsh brings multiple improvements to batch, especially with its advanced tab completion. Some of the attractions to zsh are its portability (since it doesn't rely on external programs), its backwards-compatibility with BASH, and the way it handles tab completion.
sudo apt/yum/equo install zsh
6 - GIMP
GIMP, the GNU Image Manipulation Program, is a photo editing program much like Photoshop. A debate continues to this day over which is better, but the fact that there is even question over which is superior is a telltale sign of GIMP's functionality. In the next major release, GIMP will become much easier to use and add additional features. That version of GIMP is available on Github right now.
sudo apt/yum/equo install gimp
7 - Avast Antivirus
Avast offers a free (gratis) antivirus program that can scan Linux systems for viruses. Although Linux is a very secure operating system, it has it's security holes. The primary usage for avast isn't for scanning your own system, but for scanning files you are planning on giving to another person.
www.avast.com
8 - vim
Vim is a text editor that runs from the command line. It is a vast improvement over its predecessor, vi, in multiple ways. It supports plugins, has syntax highlighting right out of the box, and has a more logical (and less painful) command system than emacs.
sudo apt/yum/equo install vim
8 - tint2
This program may seem trivial, but if you are using another dock such as gnome-panel or cairo-dock you may want to check this out. I used to use docky, but it was heavyweight and requires composting. Tint2, in contrast, is lightweight, simple, and attractive. It could also save you some time. Right clicking on a window will close it instead of bringing up a menu.
sudo apt/yum/equo install tint2
9 - mplayer2
Whenever I'm not doing something that requires too much concentration, I listen to music. Although, I found myself wondering why I needed a GUI to do so. mplayer2 allows you to play music and watch videos from the command line. It also supports playlists and streaming.
sudo apt/yum/equo install mplayer2
10 - Links2
While we're still on the theme of command line applications, I must mention links2. Links2 is an improvement over links and lynx, and allows the browsing of the web through the command line. In addition to browsing, links can also handle the downloading of files. With links2 there is also an extremely fast, graphical browser that supports pictures.
sudo apt/yum/equo install links2
There are programs I have not mentioned that I use every day, such as picasa and code::blocks, but I did not mention them since they wouldn't appeal to everybody.
Sunday, March 25, 2012
Saturday, March 17, 2012
Sabayon GNU/Linux
Gentoo, one of the most powerful Linux distributions around, has a reputation for being extremely hard to install and use. Sabayon makes it easy, coming with graphics by default and the Anaconda installer. Sabayon retains the functionality of Gentoo and portage, but also introduces some new features, the most noticeable being the Entropy package manager. Note that all the below information pertains to Sabayon 7
Entropy
Entropy is the binary package manager for Sabayon. It installs binary packages that the sabayon build server compiles from the portage tree, much like yum or apt could. Gentoo is a source-only distro, so this is a vast improvement if you have little knowledge of compiling packages. To invoke Entropy use the command equo. Equo has a beautiful command lines displays which are fully colorized for quick interpretation. Equo automatically handles dependencies, so installing a package is as easy as invoking equo.
Sulfur is the graphical interface to equo. It is not install by default, so you must use equo install sulfur as root to install it first. Then, you can use the sulfur command to start the package manager or use the "Entropy Store" link on your desktop. I would highly recommend the advanced mode that sulfur comes with as the non-advanced is a bit simplistic.
Remember, Sabayon is based on Gentoo, so you can still use portage. Just use the emerge command. Be warned, however, as mixing Entropy and Portage can severely damage your system. Pick one to carry out activities.
There is one thing to note, however, and that is that equo update updates the repositories, not the system. To update the system use equo upgrade. Updating the system will scan configuration files and replace them when it does and you allow it, so upgrading may fix breakage.
Graphics
Sabayon comes with a range of desktop environments (you can choose which .iso to download), but they are all installable via Entropy. Gnome 3 is the desktop environment that I chose, and I noticed something right away; sane defaults!
Gnome 3 comes with an icon-less desktop and only a close button, but in Sabayon it comes configured the way a normal person would use their windows. Gnome-tweak-tool is also installed by default, so if you prefer to use GNOME a different way you are free to. I have also tried e17 and rather enjoyed it, but a graphics problem disallowed me to continue using it. Whether or not it was a problem with the e17 package or my computer I never found out.
Aesthetics
This is one of the most noticeable things in Sabayon. The GRUB splash screen is both readable and pretty, as well as the boot. The boot process has probably the best display out of any Linux distribution I have used thus far. It shows a progress bar, text readout, and explains how to enter verbose mode. Even in verbose mode, the output is contained within the splash.
The terminal is even prettified. The default color scheme in the terminal has a great default color scheme: black background, green prompt, white text.
Stance on Freedom
Sabayon is not as freedom-heavy as other distros, but instead includes nonfree software from the get-go and has the nonfree repositories enabled by default. This means there is a great option of having driver support right out of the box, and if not, having it easily installable.
Preinstalled Software
You may have heard of The Arch Way, the arch linux philosophy on computing. Their ideal operating system is a bare-bones system where the user determines how it will be structured. Sabayon is exactly the opposite. Sabayon's goal is to create a distribution that includes all of the software you will need in their default installation. Personally, I loved the software that was installed (Chromium, GIMP, Libreoffice) but others feel that it adds unnecessary "bloat" to the system. On modern computers, a few extra hundred megabytes of information isn't too bad of a thing; and if it is, you can uninstall it with Equo.
Overall
Sabayon has quickly becoming my primary operating system. I choose Sabayon because package availability is great, it is based on Gentoo and has portage capabilities, the aesthetics are great, and the original installation will be enough for most users in terms of preincluded software. In all of my previous distributions I have had to put up with some minor error, and I usually end up breaking everything trying to fix it. In Sabayon, I have come across a few errors, but nothing that an update won't fix. Sabayon is also a bleeding edge, rolling distro, so I may never have to reinstall it. I would highly recommend it to a distro-hopper or someone looking to try something different and useful.
My Sabayon Linux (names crossed out)
Entropy
Entropy is the binary package manager for Sabayon. It installs binary packages that the sabayon build server compiles from the portage tree, much like yum or apt could. Gentoo is a source-only distro, so this is a vast improvement if you have little knowledge of compiling packages. To invoke Entropy use the command equo. Equo has a beautiful command lines displays which are fully colorized for quick interpretation. Equo automatically handles dependencies, so installing a package is as easy as invoking equo.
Sulfur is the graphical interface to equo. It is not install by default, so you must use equo install sulfur as root to install it first. Then, you can use the sulfur command to start the package manager or use the "Entropy Store" link on your desktop. I would highly recommend the advanced mode that sulfur comes with as the non-advanced is a bit simplistic.
Remember, Sabayon is based on Gentoo, so you can still use portage. Just use the emerge command. Be warned, however, as mixing Entropy and Portage can severely damage your system. Pick one to carry out activities.
There is one thing to note, however, and that is that equo update updates the repositories, not the system. To update the system use equo upgrade. Updating the system will scan configuration files and replace them when it does and you allow it, so upgrading may fix breakage.
Graphics
Sabayon comes with a range of desktop environments (you can choose which .iso to download), but they are all installable via Entropy. Gnome 3 is the desktop environment that I chose, and I noticed something right away; sane defaults!
Gnome 3 comes with an icon-less desktop and only a close button, but in Sabayon it comes configured the way a normal person would use their windows. Gnome-tweak-tool is also installed by default, so if you prefer to use GNOME a different way you are free to. I have also tried e17 and rather enjoyed it, but a graphics problem disallowed me to continue using it. Whether or not it was a problem with the e17 package or my computer I never found out.
Aesthetics
This is one of the most noticeable things in Sabayon. The GRUB splash screen is both readable and pretty, as well as the boot. The boot process has probably the best display out of any Linux distribution I have used thus far. It shows a progress bar, text readout, and explains how to enter verbose mode. Even in verbose mode, the output is contained within the splash.
The terminal is even prettified. The default color scheme in the terminal has a great default color scheme: black background, green prompt, white text.
Stance on Freedom
Sabayon is not as freedom-heavy as other distros, but instead includes nonfree software from the get-go and has the nonfree repositories enabled by default. This means there is a great option of having driver support right out of the box, and if not, having it easily installable.
Preinstalled Software
You may have heard of The Arch Way, the arch linux philosophy on computing. Their ideal operating system is a bare-bones system where the user determines how it will be structured. Sabayon is exactly the opposite. Sabayon's goal is to create a distribution that includes all of the software you will need in their default installation. Personally, I loved the software that was installed (Chromium, GIMP, Libreoffice) but others feel that it adds unnecessary "bloat" to the system. On modern computers, a few extra hundred megabytes of information isn't too bad of a thing; and if it is, you can uninstall it with Equo.
Overall
Sabayon has quickly becoming my primary operating system. I choose Sabayon because package availability is great, it is based on Gentoo and has portage capabilities, the aesthetics are great, and the original installation will be enough for most users in terms of preincluded software. In all of my previous distributions I have had to put up with some minor error, and I usually end up breaking everything trying to fix it. In Sabayon, I have come across a few errors, but nothing that an update won't fix. Sabayon is also a bleeding edge, rolling distro, so I may never have to reinstall it. I would highly recommend it to a distro-hopper or someone looking to try something different and useful.
My Sabayon Linux (names crossed out)
Monday, February 27, 2012
My opinions on *BSD
BSD, the Berkley Software Distribution, is one of the least-used variety of Operating System in the world. BSD has been around for a very long time, even before the times of Linux. It is a version of Unix, the grandfather of most Operating Systems. Technically, Mac OS X is a fork of BSD, which is what allows OS X to be POSIX compliant.
There are a few choices to choose from with your distribution of BSD. Like with GNU/Linux, hundreds of them exist. The more popular ones are FreeBSD, OpenBSD, and PC-BSD. PC-BSD is the only one of the bunch that comes with a graphical desktop environment installed by default, so it is considered the "newbie" BSD. Debian is creating a variant of their OS with the BSD kernel and intends to turn it into a major project, but it is still in early development.
FreeBSD is know for its speed. Speed and performance are the two major selling points for BSD; it even claims to run more efficiently than Linux. FreeBSD is not for the feint of heart, however, because it will take some expertise to get it running properly and to install graphics if that is what you wish to do. You will also have to deal with some outdated repositories, since porting them to BSD takes time.
OpenBSD is focused on providing an extremely secure operating system. I can't vouch for its security personally because I never used it on a server, but it seems to be the choice for companies or individuals who want a secure desktop or server.
PC-BSD is the most user friendly version of BSD. It is criticized for coming with a lot of "bloat" preinstalled. Other lightweight versions of BSD do not come with a lot of features installed, usually just a compiler, a text editor, and a few other tools that can be used from the command line. PC-BSD on the other hand comes with X, a graphical desktop environment, and a few graphical tools that other versions do not have preinstalled. If you are new to BSD, I would greatly recommend PC-BSD as a starting point.
Above are my opinions on some of the various distributions of BSD, but I feel differently towards BSD as a whole. I feel that BSD is far behind Linux in terms of support, package updating, and user-friendliness. The first kernel panic I ever experienced was actually in the LiveCD of PC-BSD. Also, the BSD license allows others to edit the source and turn it into proprietary software, which I don't support morally.
In conclusion, *BSD is great for heavy server use, but for practical desktop usage you should go with another alternative, like GNU/Linux.
There are a few choices to choose from with your distribution of BSD. Like with GNU/Linux, hundreds of them exist. The more popular ones are FreeBSD, OpenBSD, and PC-BSD. PC-BSD is the only one of the bunch that comes with a graphical desktop environment installed by default, so it is considered the "newbie" BSD. Debian is creating a variant of their OS with the BSD kernel and intends to turn it into a major project, but it is still in early development.
FreeBSD is know for its speed. Speed and performance are the two major selling points for BSD; it even claims to run more efficiently than Linux. FreeBSD is not for the feint of heart, however, because it will take some expertise to get it running properly and to install graphics if that is what you wish to do. You will also have to deal with some outdated repositories, since porting them to BSD takes time.
OpenBSD is focused on providing an extremely secure operating system. I can't vouch for its security personally because I never used it on a server, but it seems to be the choice for companies or individuals who want a secure desktop or server.
PC-BSD is the most user friendly version of BSD. It is criticized for coming with a lot of "bloat" preinstalled. Other lightweight versions of BSD do not come with a lot of features installed, usually just a compiler, a text editor, and a few other tools that can be used from the command line. PC-BSD on the other hand comes with X, a graphical desktop environment, and a few graphical tools that other versions do not have preinstalled. If you are new to BSD, I would greatly recommend PC-BSD as a starting point.
Above are my opinions on some of the various distributions of BSD, but I feel differently towards BSD as a whole. I feel that BSD is far behind Linux in terms of support, package updating, and user-friendliness. The first kernel panic I ever experienced was actually in the LiveCD of PC-BSD. Also, the BSD license allows others to edit the source and turn it into proprietary software, which I don't support morally.
In conclusion, *BSD is great for heavy server use, but for practical desktop usage you should go with another alternative, like GNU/Linux.
Saturday, February 25, 2012
Explaining Obfuscation
Obfuscation is the act of making computer programs more efficient by running through less processes. In this article I will explain how to obfuscate your computer programs. My code snippets are written in the Java programming language, but a lot of the functions are language agnostic.
1. Avoid variables
Variables are used to store information in RAM. RAM is very limited in how much it can hold, so making a lot of variables to store information is a bad idea. Below are two examples of avoiding variables.
boolean stopLooping=false;
bad
Your Computer Science professor will tell you that loops are controlled by the state of a boolean, so you might be tempted to do something like the above example. Instead, do something like this:
good
The above example still uses a boolean, but doesn't waste a variable on it. You could also use and if statement with a break, but since for contains functionality to do so it would waste processor resources.
2. Use centralized variables
Imagine that you are looking at somebody's code and then have 5 variables.
int x, y, a, b, c;
now, you come across this:
bad
You will be deciphering this for a while, so you should use a centralized variable. A centralized variables provides one place to store information, and then it is overwritten after it has been used.
good
In the above example, I could have just used System.out.println() with the number I wanted to display, but the point remains. It's better than initializing a bunch of variables to hold the information.
3) if-then-else cleanup
The last thing I will talk about is the reservation of using if-then statements. Let's say that you want to return true if x==4, or else return false.
bad
This is actually a very common approach, but here is how it should be done:
good
return x==4;
This approach overall shortens up the code and makes it ever so slightly more efficient. You could also use a conditional operator, but this would be a much better way of doing it.
1. Avoid variables
Variables are used to store information in RAM. RAM is very limited in how much it can hold, so making a lot of variables to store information is a bad idea. Below are two examples of avoiding variables.
boolean stopLooping=false;
bad
for(index=0; stopLooping==true; index++)
{
System.out.println(index);
if(index==5)
stopLooping=true;
}Your Computer Science professor will tell you that loops are controlled by the state of a boolean, so you might be tempted to do something like the above example. Instead, do something like this:
good
for(int index=0; index<5; index++)
System.out.println(index);The above example still uses a boolean, but doesn't waste a variable on it. You could also use and if statement with a break, but since for contains functionality to do so it would waste processor resources.
2. Use centralized variables
Imagine that you are looking at somebody's code and then have 5 variables.
int x, y, a, b, c;
now, you come across this:
bad
x=4;
System.out.println(x);
y=4;
System.out.println(y);
a=5;
System.out,println(a);
b=9 ;
System.out.println(b);
c=2;
System.out.println(c);You will be deciphering this for a while, so you should use a centralized variable. A centralized variables provides one place to store information, and then it is overwritten after it has been used.
good
int temp;
temp=4;
System.out.println(temp);
System.out.println(temp);
temp=5;
System.out.println(5);
temp=9;
System.out.println(9);
temp=2;
System.out.println(temp);In the above example, I could have just used System.out.println() with the number I wanted to display, but the point remains. It's better than initializing a bunch of variables to hold the information.
3) if-then-else cleanup
The last thing I will talk about is the reservation of using if-then statements. Let's say that you want to return true if x==4, or else return false.
bad
if(x==4)
return true;
else
return false;This is actually a very common approach, but here is how it should be done:
good
return x==4;
This approach overall shortens up the code and makes it ever so slightly more efficient. You could also use a conditional operator, but this would be a much better way of doing it.
Saturday, December 24, 2011
Technological ideas for Christmas
If you have someone in mind that may appreciate a technologically related gift here are a few good ideas that I have considered giving out to my family on this Christmas. This list is hardware inclusive.
1. Gnu/Linux - Software
Gnu/Linux is a free software operating system similar to Windows in a lot of ways, but completely amalgamated, giving the user full customizability over his/ her system. Hundreds of Gnu/Linux distributions are available for download on the internet, or you can opt to pay for a CD with the Operating System already burnt onto it.
2. Intel core 15 processor - Hardware
The first gift from the hardware category is intel's core i5 desktop processor. A part of Intel's newest line of processors, the sandy bridge series, it provides speeds in upwards of 3.4Ghz, 4 cores, and integrated graphics for about 100 bucks cheaper than the top-of-the-market i7. Buyers beware, Intel's next line of processor, the Ivy bridge, will be released in 2012, but for the time being the i5 is the choice to go with for reasonably priced power.
3. GIMP 2.7 - Software
The Gnu Image Manipulation Program, GIMP, has it's next version, 2.7, available for compilation. It is still a beta release, but it is offering some exciting features that older versions of gimp did not include; the one that most users notice right away is a static toolbox that remains in the main window. GIMP 2.7 includes all the features of older versions and adds a few new features while remaining relatively lightweight with few dependencies. GIMP can easily rival commercial software such as Adobe Photoshop. GIMP is also open-source, so users can edit it at their will.
4. Windows 8 - Software
This is the perfect gift for hardcore Microsoft fans.Windows 8 is still technically in development, but Microsoft is allowing people to download it at a highly reduced price for testing. Windows 8 is a fully rethought Windows, giving the optimal experience for tablet computers.
5. USB 2.0 Wireless Adapter - Hardware
One of the most recent great additions to my computer is a wireless adapter that connects right into a USB port to provide access to wireless networks. Since most computers come with a wireless card, this is a great gift for those with older computers that were released before the popularization of wireless networks.
5.1 - Wireless router
You wireless adapter won't be doing much without a wireless network. With a wireless router you can spread connection throughout all parts of your house. Wireless routers provide access to the internet if you have it connected to an internet connection and also allow local connection if you do not want internet connectivity.
6 - Libreoffice suite - software
Libreoffice is a suite designed for creating presentations, documents, spreadsheets, and databases. It is more-or-less designed to clone the functionality of Microsoft Office, and it does a great job of doing so. Libreoffice evolved from Openoffice, which was abandoned.
7 - LED lit keyboard - hardware
For the first two years of my computers life I used a keyboard that Dell sent with the prebuilt. It was a standard keyboard with letters painted on. About half a year ago I bought a 20 dollar keyboard with the ability to illuminate the letters with blue LED lights. I have never been a fan of LED lights on computer hardware, but it actually does serve a purpose at night when you are searching for an unfamiliar key.
The content in this post is public property
That is all on my list for now, sorry that I got it up just a day before Christmas.
1. Gnu/Linux - Software
Gnu/Linux is a free software operating system similar to Windows in a lot of ways, but completely amalgamated, giving the user full customizability over his/ her system. Hundreds of Gnu/Linux distributions are available for download on the internet, or you can opt to pay for a CD with the Operating System already burnt onto it.
2. Intel core 15 processor - Hardware
The first gift from the hardware category is intel's core i5 desktop processor. A part of Intel's newest line of processors, the sandy bridge series, it provides speeds in upwards of 3.4Ghz, 4 cores, and integrated graphics for about 100 bucks cheaper than the top-of-the-market i7. Buyers beware, Intel's next line of processor, the Ivy bridge, will be released in 2012, but for the time being the i5 is the choice to go with for reasonably priced power.
3. GIMP 2.7 - Software
The Gnu Image Manipulation Program, GIMP, has it's next version, 2.7, available for compilation. It is still a beta release, but it is offering some exciting features that older versions of gimp did not include; the one that most users notice right away is a static toolbox that remains in the main window. GIMP 2.7 includes all the features of older versions and adds a few new features while remaining relatively lightweight with few dependencies. GIMP can easily rival commercial software such as Adobe Photoshop. GIMP is also open-source, so users can edit it at their will.
4. Windows 8 - Software
This is the perfect gift for hardcore Microsoft fans.Windows 8 is still technically in development, but Microsoft is allowing people to download it at a highly reduced price for testing. Windows 8 is a fully rethought Windows, giving the optimal experience for tablet computers.
5. USB 2.0 Wireless Adapter - Hardware
One of the most recent great additions to my computer is a wireless adapter that connects right into a USB port to provide access to wireless networks. Since most computers come with a wireless card, this is a great gift for those with older computers that were released before the popularization of wireless networks.
5.1 - Wireless router
You wireless adapter won't be doing much without a wireless network. With a wireless router you can spread connection throughout all parts of your house. Wireless routers provide access to the internet if you have it connected to an internet connection and also allow local connection if you do not want internet connectivity.
6 - Libreoffice suite - software
Libreoffice is a suite designed for creating presentations, documents, spreadsheets, and databases. It is more-or-less designed to clone the functionality of Microsoft Office, and it does a great job of doing so. Libreoffice evolved from Openoffice, which was abandoned.
7 - LED lit keyboard - hardware
For the first two years of my computers life I used a keyboard that Dell sent with the prebuilt. It was a standard keyboard with letters painted on. About half a year ago I bought a 20 dollar keyboard with the ability to illuminate the letters with blue LED lights. I have never been a fan of LED lights on computer hardware, but it actually does serve a purpose at night when you are searching for an unfamiliar key.
The content in this post is public property
That is all on my list for now, sorry that I got it up just a day before Christmas.
How to install Minecraft on Fedora 19 and under
Minecraft is the only game which I still play on my computer. Minecraft is unique since it is made in a platform-independent programming language called Java. To install it on Fedora 15, you need to get a bit more involved than normal. Reading my previous post about BASH shell scripts may help you out a bit.
First, install sun's java runtime environment here (http://www.java.com/en/download/manual.jsp) Go to the Linux section and download the RPM. When it is finished it can be installed with the software install tool or rpm. That's have the challenge down. Now go to www.minecraft.net and download minecraft.jar. You will notice that when you try to run this .jar file it opens with the archive manager instead. Here is when the slightly harder part comes in.
Go to the directory you have minecraft.jar saved in and make a new document called "Minecraft.sh". In the next few commands replace [path] with the path to Minecraft.jar. Open Minecraft.sh and enter the following:
#! /bin/bash
java -jar [path]
save and close the file. Now make it executable by right clicking it and going to permissions, or using chmod +x from the command line. Double click the file and click "open in terminal". If the terminal opens and closes with quick succession, minecraft threw an exception. To find out what went wrong drag the Minecraft.sh file into a terminal that is already open and run it from there. Google the resulting text.
If everything did go according to plan, minecraft should start normally. If you enjoy mods, then you need to go back to step one and install jre 7 instead of jre 6. The reason I provided the jre 6 link is that it's considered the best option since most java developers are still using it to write their programs / mods.
Alternate Route
There is an alternate, slightly more advanced route to launching minecraft. Go to your desktop and make the text document "minecraft" or whatever you want to name it. Now, copy this information but, once again, change [path] to where your minecraft is located. USER_NAME should be replaced with your username. That entire string should be replaced with a path to the picture.
[Desktop Entry]
Version=1.0
Type=Application
Name=Minecraft
Comment=A game about moving blocks and killing monsters.
Exec=java -jar [path]
Icon=/home/USER_NAME/Pictures/Icons/Applications/Minecraft Icon.png
Path=
Terminal=false
Categories=Games
StartupNotify=false
When you are done, give the file a ".desktop" extension. This will directly launch the program with a double-click rather than asking you to run it. If you have permission to become root, you can copy this to /usr/share/applications or ~.local/share/applications. Now you can access it from programs like the gnome menu or any type of launcher for even quicker access.
The content in this post is public property
Happy mining
First, install sun's java runtime environment here (http://www.java.com/en/download/manual.jsp) Go to the Linux section and download the RPM. When it is finished it can be installed with the software install tool or rpm. That's have the challenge down. Now go to www.minecraft.net and download minecraft.jar. You will notice that when you try to run this .jar file it opens with the archive manager instead. Here is when the slightly harder part comes in.
Go to the directory you have minecraft.jar saved in and make a new document called "Minecraft.sh". In the next few commands replace [path] with the path to Minecraft.jar. Open Minecraft.sh and enter the following:
#! /bin/bash
java -jar [path]
save and close the file. Now make it executable by right clicking it and going to permissions, or using chmod +x from the command line. Double click the file and click "open in terminal". If the terminal opens and closes with quick succession, minecraft threw an exception. To find out what went wrong drag the Minecraft.sh file into a terminal that is already open and run it from there. Google the resulting text.
If everything did go according to plan, minecraft should start normally. If you enjoy mods, then you need to go back to step one and install jre 7 instead of jre 6. The reason I provided the jre 6 link is that it's considered the best option since most java developers are still using it to write their programs / mods.
Alternate Route
There is an alternate, slightly more advanced route to launching minecraft. Go to your desktop and make the text document "minecraft" or whatever you want to name it. Now, copy this information but, once again, change [path] to where your minecraft is located. USER_NAME should be replaced with your username. That entire string should be replaced with a path to the picture.
[Desktop Entry]
Version=1.0
Type=Application
Name=Minecraft
Comment=A game about moving blocks and killing monsters.
Exec=java -jar [path]
Icon=/home/USER_NAME/Pictures/Icons/Applications/Minecraft Icon.png
Path=
Terminal=false
Categories=Games
StartupNotify=false
When you are done, give the file a ".desktop" extension. This will directly launch the program with a double-click rather than asking you to run it. If you have permission to become root, you can copy this to /usr/share/applications or ~.local/share/applications. Now you can access it from programs like the gnome menu or any type of launcher for even quicker access.
The content in this post is public property
Happy mining
Bash Lesson one - Learn the Linux command line
Bourne Again SHell, or Bash, is the shell most commonly used on Linux systems. Bash can be installed on Windows, BSD, and other variants of Unix. Most of the functionality that Bash provides really isn't bash at all, but external programs. Some examples are sudo, vi, emacs, and espeak, just to name a few. To complete this lesson you will need either vi or emacs and sudo. Vi is run from the command line like emacs, but emacs also has a graphical mode that will boot when you launch it from a terminal. Make sure that you are in the sudoers file.
Let's get started. Open up a new terminal (xterm, terminator, yakakua, etc) and type "cd /" and press enter. Cd changes directory, so you just moved from home (or whatever location you booted the terminal from) to the root directory. Now, without the next command cd isn't much good since you would be flying blind. Type "ls". This will show you everything in your current folder in a color coded fashion.
Now, we are going to try something a bit more difficult. While in this directory type "cd bin" and press enter. You can type ls in here if you want, but be prepared because this is a huge folder. While in this folder type "sudo vi "myScript.sh"" Be sure to include the quotes even though they are not needed.
This will open Vim, VI improved.Hit i on the keyboard to enter the text insertion mode. Now type the following in the file just like I have it structured.
#! /bin/bash
cd /
mkdir success
I will explain mkdir a bit later. To save the file from vi hit the escape button once followed by a capital 'Z' twice. (ex: [esc] ZZ.)This will close vi and save the file. If you were choosing to use emacs you can go to file>save or use the command C-x C-s. Now you should be back at the command prompt. This is probably the step that gets messed up the most. Now type "chmod +x myScript.sh" This just makes the shell script (which is what you made) executable.
We are now ready to run the script, but what do you think it will do? The two commands in it were cd / which you already know and mkdir success. What this does is changes directory to root and makes a directory called success.
To test this out, type "sudo myScript.sh". Running it with administrative privileges is a must because of where it makes the folder. Now, type "cd /" again and "ls". If you have done everything correctly you should see blue letters that say "success" on them.
BASH gets much more confusing than this, but for now it's a good start.
The same exercise as a non-root user
This is the same exercise from above but I will use your home directory instead. If you have already read parts of it, you can skip over right to the commands.
Let's get started. Open up a new terminal (xterm, terminator, yakakua, etc) and type "cd" and press enter. Cd changes directory, so you just moved from home (or whatever location you booted the terminal from) to the home directory. That is useful if you get lost and need to get back to a checkpoint. Now, without the next command cd isn't much good since you would be flying blind. Type "ls". This will show you everything in your current folder in a color coded fashion.
Now, we are going to try something a bit more difficult. While in this folder type "sudo vi "myScript.sh"" Be sure to include the quotes even though they are not needed.
This will open Vim, VI improved.Hit i on the keyboard to enter the text insertion mode. Now type the following in the file just like I have it structured.
#! /bin/bash
cd
mkdir success
I will explain mkdir a bit later. To save the file from vi hit the escape button once followed by a capital 'Z' twice. (ex: [esc] ZZ.)This will close vi and save the file. If you were choosing to use emacs you can go to file>save or use the command C-x C-s. Now you should be back at the command prompt. This is probably the step that gets messed up the most. Now type "chmod +x myScript.sh" This just makes the shell script (which is what you made) executable.
We are now ready to run the script, but what do you think it will do? The two commands in it were cd which you already know and mkdir success. What this does is changes directory to home and makes a directory called success.
To test this out, type "myScript.sh". Now, type "cd" again and "ls". If you have done everything correctly you should see blue letters that say "success" on them.
Let's get started. Open up a new terminal (xterm, terminator, yakakua, etc) and type "cd /" and press enter. Cd changes directory, so you just moved from home (or whatever location you booted the terminal from) to the root directory. Now, without the next command cd isn't much good since you would be flying blind. Type "ls". This will show you everything in your current folder in a color coded fashion.
Now, we are going to try something a bit more difficult. While in this directory type "cd bin" and press enter. You can type ls in here if you want, but be prepared because this is a huge folder. While in this folder type "sudo vi "myScript.sh"" Be sure to include the quotes even though they are not needed.
This will open Vim, VI improved.Hit i on the keyboard to enter the text insertion mode. Now type the following in the file just like I have it structured.
#! /bin/bash
cd /
mkdir success
I will explain mkdir a bit later. To save the file from vi hit the escape button once followed by a capital 'Z' twice. (ex: [esc] ZZ.)This will close vi and save the file. If you were choosing to use emacs you can go to file>save or use the command C-x C-s. Now you should be back at the command prompt. This is probably the step that gets messed up the most. Now type "chmod +x myScript.sh" This just makes the shell script (which is what you made) executable.
We are now ready to run the script, but what do you think it will do? The two commands in it were cd / which you already know and mkdir success. What this does is changes directory to root and makes a directory called success.
To test this out, type "sudo myScript.sh". Running it with administrative privileges is a must because of where it makes the folder. Now, type "cd /" again and "ls". If you have done everything correctly you should see blue letters that say "success" on them.
BASH gets much more confusing than this, but for now it's a good start.
The same exercise as a non-root user
This is the same exercise from above but I will use your home directory instead. If you have already read parts of it, you can skip over right to the commands.
Let's get started. Open up a new terminal (xterm, terminator, yakakua, etc) and type "cd" and press enter. Cd changes directory, so you just moved from home (or whatever location you booted the terminal from) to the home directory. That is useful if you get lost and need to get back to a checkpoint. Now, without the next command cd isn't much good since you would be flying blind. Type "ls". This will show you everything in your current folder in a color coded fashion.
Now, we are going to try something a bit more difficult. While in this folder type "sudo vi "myScript.sh"" Be sure to include the quotes even though they are not needed.
This will open Vim, VI improved.Hit i on the keyboard to enter the text insertion mode. Now type the following in the file just like I have it structured.
#! /bin/bash
cd
mkdir success
I will explain mkdir a bit later. To save the file from vi hit the escape button once followed by a capital 'Z' twice. (ex: [esc] ZZ.)This will close vi and save the file. If you were choosing to use emacs you can go to file>save or use the command C-x C-s. Now you should be back at the command prompt. This is probably the step that gets messed up the most. Now type "chmod +x myScript.sh" This just makes the shell script (which is what you made) executable.
We are now ready to run the script, but what do you think it will do? The two commands in it were cd which you already know and mkdir success. What this does is changes directory to home and makes a directory called success.
To test this out, type "myScript.sh". Now, type "cd" again and "ls". If you have done everything correctly you should see blue letters that say "success" on them.
Subscribe to:
Posts (Atom)
