Showing posts with label Terminal. Show all posts
Showing posts with label Terminal. Show all posts

Sunday, December 20, 2015

The Strange Chromebook XFCE Glitch

This morning, I had some trouble with my version of XFCE on my Chromebook. Tab-Alt stopped working, the menu bar had vanished, the programs opened would not keep focus and the cursor was either X or invisible.

How I hate messing with a perfectly good distro. The solution is rather easy. Delete your ~/.cache/sessions directory and the functions come back after logoff/reboot. How simple.


Of course, I forgot you can't rm directories and needed to try three times before I remembered the rm -r modifier. So the actual command is above.

Whew! Thank god for Ubuntu and XFCE's easy of use. If this was Windows, I'd be screwed.

Sunday, May 31, 2015

Incantato, il mio vecchio amico Alsamixer!

If you use Duolingo on a chromebook, you may have microphone problems. I tinkered around with the settings and chromebooks do not allow websites to access your microphone and camera by default. Change that by going into settings and Privacy.
Now for the surprise. This didn’t completely fix my problem. I did a little more searching and found that Alsamixer is the key. Press crtl+alt+t to pop open a new crosh tab. Type shell and enter.

Bamb! Alsamixer almost like linux. That shouldn’t be a surprise. One issue I did encounter was the function keys wouldn’t work even when I used the function key. Not all is lost. For some reason the search key needs to be pressed to invoke the function keys.
No problem. Press it with your desired function key. Escape to exit. 
I like Duoling to keep up on my Spanish, but it occurs to me that it is also useful for my horrible Italian. Duolingo lets you select multiple languages at the same time. I have no idea if there is a limit to the number, but I thought that I would stick to the two I know pretty well. 

New chromebooks are much better than the one I have. I'm going to start shopping for a new one soon. 

Friday, April 24, 2015

Why use Terminal? (GIMP Install)

Linux has come a long way over the years. Nearly every variant has a software manager, a graphical interface for adding software. Why bother with the Terminal any more?
First, the terminal will display everything it does. Second, there are many versions of Linux and all of them have Terminal as an option. No matter what version of Linux, Terminal experience will server you well.
Here is a quick example of how to install GIMP using the Terminal.
Install GIMP:
sudo apt-get update && sudo apt-get install gimp
The && combos two commands, update and install. The first checks your repositories to make sure they are up to date and the second installs GIMP.
You can follow this with autoclean and clean:
sudo apt-get autoclean && sudo apt-get clean
These commands remove .deb files not used by your system. Autoclean removes the cache information. This is good for systems with low disk space, however the penalty is you will need to download these again if you need to update or install software.

Thursday, April 23, 2015

Eye on the Pi

I have my eye on the Raspberry Pi. This little machine has a vibrant community and help is available all around the web.
This morning, I found The Errant Scientist blog; Matthew takes a walk through the set up process and installation of software via the LXTerminal.

Sunday, April 19, 2015

LXTerminal Cheatsheet

LXTerminal is daunting for the beginner. It can feel like a big black hole. Using a few basic commands everyday will help you learn the ropes. Lets take a look at the easy ones.
pwd
Displays the current directory path.
ls
Displays the directory and files within the current directory.
cd /home
Changes the directory, but needs a target and at least one /. This is the first time you will note that capitalisation is important in Linux. /home and /Home are two different locations.
help
Some help that was, it blew right by so fast I couldn’t read it. We will fix that shortly.
mkdir exampleMake a directory.
cal
Displays a calendar.
date
Displays the current date and time.
gedit filename.txt
Opens gedit with the file name in question. Be aware that you cannot close the terminal while gedit is open.
command > filename.txt
The > character tells the terminal to send the text that would normally appear on-screen to a file. The file can either be one that exists, in which case the text in it will be replace with the current text. Alternatively, you can make up a new name and write to that new file.
command >> filename.txt
A double > or >> will append information to the end of the file in question. Oddly, if that file does not exist the console will create it for you. Handy, eh?
command | tee example.txt
The pipe, | and the modifier tee will tell the terminal to print the information on-screen and to a file.
There are three more pseudo commands you need to know. The up arrow will display the last command you entered, you can do this to hop backwards through every command you entered. Of course, you will overshoot the one you want. Down arrow goes the other direction. To paste text into the terminal, press shift ctrl+V. Ctrl+V on its own does nothing.
So, let’s make a cheat sheet for this lesson. Open the LXTerminal.
Enter pwd to check that you are in a safe directory. For Mint that is /home/.
Enter ls to view the contents of /home/name.
Type mkdir cheatsheet.
Go to that directory with cd cheatsheet
To rehash:
pwd
ls
mkdir cheatsheet
cd cheatsheet
From here on out, I will not explain in detail. Each command will be entered one after the other. Remember to press enter after each.
cal | tee >> cheatsheet.txt
date | tee >> cheatsheet.txt
pwd | tee >> cheatsheet.txt
ls | tee >> cheatsheet.txt
help | tee >> cheatsheet.txt
gedit cheatsheet.txt
Now you have your own cheatsheet. Go ahead and print it.
Extra credit assignment. You can paste all the above commands into the terminal at a single go. The terminal will execute them as if you did them one by one.
More LXTerminal usage to come. Enjoy.

Thursday, April 9, 2015

Next → Stupid Saucy and XFCE Minecraft Trick

Installing Minecraft on a Chromebook is simple. Get Crouton, install Saucy and XFCE then get stuck. Why stuck?
You need to change the permissions of the Minecraft.jar to be an executable.
On many versions of Ubuntu, it is a simple matter of right clicking and checking the “make executable” check box. Using the standard Thunar XFCE file manager, that isn’t an option.
You have a couple of choices here. Installing a new file manager is a possibility, but if you are running XFCE or other light version of Linux, maybe you simply don’t want to do that.
This is a great chance to use the terminal to do what you want. The command needed is “sudo chmod +x”.


As you can see from the screenshot, I am using XFCE on a Chromebook, so my directory line is a little different.


Sunday, February 15, 2015

Terminal Refresh - Chromebook Users and Terminal

Years ago, I wrote a terminal cheat sheet over on pretendertothepower.com I think it is time for an update.
One command that I misunderstood from the beginning was sudo. This concept troubled me as there is a root account, which is sort of analogous to being an admin on Windows. Windows is bad news, because the admin account is so handy, or worse, required to do many standard things. This is not the case in all the various forms of Linux. xPud is a notable exception as you are always logged in as root.
By way of example, in Windows, the Admin account will not allow you to delete critical files from your system. At least, not without a lot of effort. Linux will happily allow the root user to delete ANYTHING!
Linux Rule One: If you don't know what outcome you need, root is NOT the tool for you.
On the other hand, you can gain temporary access to elevated privileges with the sudo command. This is actually the correct method for gaining privileges. Let's say you want to install some software, and you intend for all users to access it. The sudo command allows a user to gain privileges using their own password, not the root account password. The process creates a log of what is done in /var/log/auth.log; if mistakes are made, you can easily figure out what and when it was done.
In this example of sudo, we are going to install gedit. But we need to get ready for it.
sudo apt-get update
This command will tell your system to go and check what versions you have against what versions are available on the servers. It installs nothing. This is very important, because your linux computer has a local list of software available and it could be out of date. Update, update, Update!
The command for installing is:
sudo apt-get install gedit
Linux is made up of packages of software, in discrete chunks to make it more useable. The command apt-get install will put these packages on your system and make them useable.
You can go ahead and try to run both commands without the sudo. It will throw a nasty looking error.
Ok. Now we have gedit installed. We can open gedit without the sudo command. Type
gedit
As you can see, gedit is a very basic editor. We are going to use our elevated privileges and use gedit to do something a normal user cannot do. I am using a Chromebook with Crouton and I would like my Linux system to default to the $HOME/Downloads directory.
Let's fix this. Type sudo gedit .config/user-dirs.dirs to open the protected .config file.
What is not shown is all the activity in the terminal. At this point, since terminal opened gedit with elevated privileges, you should not close the terminal window.
Go ahead and change the text $Home/Desktop to $Home/Downloads.
I changed them all, but obviously you don't need to do that. Click save. You should see some activities in the terminal window.
Tomorrow we will look at using sudo for other purposes.