Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Sunday, November 27, 2022

Some hotkeys in the GNU/Linux console CLI

ALT + b (move cursor to the previous word)

ALT + BACKSPACE = remove one word
ALT + f (move cursor to the next word)
ALT-b ALT-f (move between words)
ALT-y (after C-y, roll the the previous cutted things)
CTRL + ALT + Del : reboot the system
CTRL + a (go to the start of line)
CTRL + C = abort
CTRL + d = exit shell
CTRL + e (go end of the line)
CTRL + K = delete right side line (cut from cursor to the end)
CTRL + L (clear the screen)
CTRL + p (search in fish shell history)
CTRL + PgUp & PgDn = switch the terminal tab
CTRL + r (recall bash history)
CTRL + shift + C = copy text
CTRL + shift + V = paste text
CTRL + U = delete left side line
CTRL + u (cut the line)
CTRL + w (cut last word)
CTRL + Y = Undo
CTRL + y (paste)
<CTRL-ALT-E> which expands to the previous argument on this line.
CTRL+BACKSPACE = Reinicia entorno gráfico (no lo soportan todas las distros pero se puede rehabilitar).
CTRL+s in addition to CTRL-r (it browses the historic forward)
CTRL-u or CTRL-k (cut the line starting from the beginning/the point)
CTRL-y (past the last thing that was cutted)
<Esc> . aka Meta-. aka ALT-. to get the last argument from the previous line,
Fn + left,right arrow keys = jump on first and last line

Friday, September 11, 2020

Enjoy your internal speaker with beep again in Ubuntu or Debian

Latest GNU/Linux distros do not load by default the module to sound the internal beeper of the computer.
If you want to listen to it again you have to type the following commands:
sudo modprobe pcspkr
sudo apt-get install beep
Now you can listen to it until you reboot your computer beep.

If you want to make the change permanent you must edit the file /etc/modprobe.d/blacklist.conf and comment out the line that disables the internal speaker:
blacklist pcspkr
Now you get:
# blacklist pcspkr

Now you can enjoy the shrill and charming sound of the internal speaker again ;-)


 

Saturday, March 09, 2019

How to install Celestia in Ubuntu 18.04 or Debian 9

Latest Debian based distros don't include Celestia in their repositories and you need to compile the software to enjoy it.
Just need to type the following commands in your console (Ubuntu and derivates distros):
sudo apt-get install libglew-dev libjpeg-dev libpng-dev libtheora-dev libgl1-mesa-dev libeigen3-dev libfmt-dev qtbase5-dev qtbase5-dev-tools and libqt5opengl5-dev freeglut3-dev libgtkglext1-dev liblua5.2-dev git
git clone https://github.com/CelestiaProject/Celestia
cd Celestia/
mkdir build
cd build/
cmake .. -DENABLE_QT=ON
make
sudo make install
If you use Debian type first su - and then type the same commands as Ubuntu case but don't type sudo

Thursday, December 20, 2018

PCem, old PCs emulator for GNU/Linux

PCem, is an old PCs emulator than simulate certain old machines like los Amstrad PC for example, this is not emulate only DOS system like DosBOX do so good.


Let's go to install and configure it.

Download and instalation

  1. Install all the necessary libraries:
    sudo apt-get install libsdl2-dev libopenal-dev libwxbase3.0-dev libwxgtk3.0-dev automake
  2. Download  latest available version of code from bitbucket.
  3. Create a folder and uncompress in it:
    mkdir pcem
    cd pcem
    tar -zxvf ../PCemV14Linux.tar.gz
  4. Compile and install:
    sudo chmod +x ./configure
    ./configure --enable-release
    make
    sudo make install

Configuration

Run emulator a first time:
pcem
You get an error because you haven't any BIOS but .pcem folder will be created in your $HOME with all the folder structure to add all the files you need:

FolderContents
configsEach system configuration file.
logsemulator logs (errors and warnings).
nvrnvr
romsESSENTIAL: the roms you need for each system.
This folder contains a folder for each PC type to emulate.
screenshotsScreenshots.
Other foldersYou can create HD and DSK folders to add HD or floppy images for example.

If we have a configuración of a Windows pcemu for example, we need to copy configuration in .pcem folder.

We can change some things in emulation while machine is running clicking with right button into the emulation window.


Or we can use dialog boxes we can see when pcem start with any roms files included. This allow us add more configuration profiles or change the ones we have.


Important: check that all configuration files have the right path.

Sunday, September 23, 2018

Open alternatives to propietary software (XI): double panel explorers (NC clones)

Double panel explorer, similars to old Norton Commander in DOS, are very easy to use and useful to navigate in different devices and paths (HDD, DVD-ROM, etc...).

There is a lot of clones of NC and a lot of them are open source, these are my recomendations:

mc (midnight commander)

The ideal solution for browsing the GNU/Linux paths from the console, it is one of the first programs I install in any distro.



You can install it from your distro software center or from console with these commands as root:
apt-get install mc # Debian, ubuntu or similar
yum install mc # Red hat, Centos, Fedora or similar

gnome-commander

Very useful in gnome or any other graphic enviroment.



You can install it from your distro software center or from console with these commands as root:
apt-get install gnome-commander mild # Debian, ubuntu or similar
yum install gnome-commander # Red hat, Centos, Fedora or similar

All these software can do, at least, these operations with files and folders: copy, move, delete, edit, search content, change permissions and ownership and much more.

But there is a lot of open source clones I still don't prove it.

Original article

Tuesday, July 10, 2018

Multi-construction LDraw configuration kit: install tools to make your TENTE and LEGO models in your computer with Ubuntu

Multi-construction LDraw configuration kit installs and configured these applications to create and see 3D models of several construction systems:
  • MLCad 3.40
  • BMP2LDraw
  • LDDesignPad
  • LD4DStudio
  • ldglite_1.3.1
  • ldraw_2017.01
  • ldview_4.3-ubuntu18.04
  • leocad_17.07
  • lpub_4.0
  • povray 3.7
  • Blender

Other resources:

Ubuntu Linux installation

  1. Download this kit in any folder.
  2. Open console and select this folder.
  3. Type: sudo ./install.sh

Windows installation

For now you need to install this set manually in Windows:
  1. Download LDView and install it.
  2. Make the folder C:\LDRAW and uncompress this kit in this folder.
  3. Uncompress these set of pieces in these folders:
  4. Uncompress these software in these folders:
  5. Copy in Desktop the files of this folder C:\ldraw\software\accesos-directos-Windows.
Artículo original en castellano

Monday, June 25, 2018

Linapple y The Octalyzer: Apple II emulators for GNU/Linux

Linapple

Linapple is an emulator of the mythical Apple II quite simple and intuitive to use:
  

Instalation

Follow these steps to install it in GNU/Linux (Debian, Raspbian or Ubuntu):
  • Download the source code from sourceforge.
  • Uncompress it.
  • Install all the necessary packages to compile it.
    sudo apt-get install zlib1g-dev libcurl3 libzip-dev libsdl1.2-dev libcurl4-gnutls-dev
  • Compile it:
    cd src
    make
    sudo make install

Use

To run the emulator just type 'linapple' in the linux console.
Press F1 and you get information about all the function keys:


The Octalyzer

Other amazing Apple ][ emulator is The Octalyzer:
  • Multisystem: available for GNU/Linux (32 & 64 bits), Windows (32 & 64 bits) and OSX.
  • It's a unique binary file, you only need copy it to /usr/local/lib and run octalizer to enjoy it.
  • Drag and drop disk images to the windows, to open them.
  • Can render the images to 3D

Enjoy both emulators :)
Artículo original en castellano

Thursday, May 31, 2018

Open alternative to propietary software (IX): ClamWin/ClamAV the open source antiviral software

Windows users need an antiviral software to get a minimal security, although given how vulnerable this system none of them is completely effective.
Privative antivirus usually eat a lot of resources of your computer, run for a short time because the licence expires and requires more money to update it (an non-update antivirus is useless), dirts your system, complete uninstall is very difficult, etc...
Clamwin is a different antiviral software: it can run on a pentium II without hang it, you can update the database viruses everyday and free and you can uninstall when you like as any other Windows software and it's open source.

The fact that it is a free program is a guarantee against suspicions, more judicious than paranoid, about the true intentions of most antiviruses and to what extent they protect or are part of the problem: a free antivirus does not benefit as much from the proliferation of viruses as the private ones that make their business go very well.
There is also a GNU/Linux version called Clamav.
I personally do not see any sense to have an antivirus in a system in which viruses do not pass theoretical experiments without practical danger.

You can keep safe your GNU/Linux updating the system and a bit of common sense.
Artículo original en castellano

Tuesday, May 15, 2018

How to compile and install povray in Ubuntu, Debian and distro derivates

Povray is a ray tracer available for several systems, although on unix systems you need to compile it, but it's easy following these steps:

Compile and install

Install the libraries you need to compile:
sudo apt-get install zlib1g-dev libpng12-dev libjpeg-dev libtiff5-dev libopenexr-dev libsdl1.2-dev libboost-system1.55-dev libboost1.55-dev git
Download the latest source code:
git clone https://github.com/POV-Ray/povray.git povray
Compile and install:
cd povray/unix
./prebuild.sh
cd ..
./configure COMPILED_BY="your name" LIBS="-lboost_system -lboost_thread"
make
sudo make install
Now, povray is installed in your computer.

Note: You needn't LIBS="-lboost_system -lboost_thread" in Debian.

How to use

You can generate a Full HD image with this command:
povray -W1920 -H1024 file.pov

Pov file is a text file with all the instructions in povray language to render a image (may be a very big file).

You can get amazing images like this:

Artículo original en castellano

Monday, April 30, 2018

Open alternatives to propietary software (VIII): Transmission, the bittorrent client

Transmission is the bittorrent client included in a lot of GNU/Linux distros.
You only need open a .torrent file and the software add the petition to the queue.
You can run Transmission and work with your computer as usual because this software doesn't cannibalize your computer resources like other bittorrent clients.

 

Are still anybody than says that GNU/Linux is not easy?
Artículo original en castellano

Sunday, April 15, 2018

How to install your favourite GNU/Linux distro on a USB stick as if were an internal hard disk

No, we are not going to make a live pendrive, but install a Linux distro on a pendrive as if installing it on the internal disk of the computer, this will give us mobility like a live usb and versatility like a complete installation.

Preliminaries

We can do this in many ways but to make it easy and safe even for the most newbies users we will use VirtualBox.

Virtual machine setup

  1. Start assistant to create a new virtual machine (New button).
  2. Type: Linux.
  3. Version: Ubuntu 64 bits.
  4. Memory size: enought but not to much (select intro the green stripe).
    An example: my computer has 8Gb RAM, then select 3Gb.
  5. Hard drive: WE DO NOT ADD ANYONE (we see why later).
  6. Clic on Create.
After the virtual machine is created we ajust some parameters. We clic with right button over virtual machine and select Configuration:
  1. Storage: select CD and then CD with arrow icon to select the distro iso file like virtual CD.
  2. System: select Start order and move optical device as first one.
  3. USB: Enable USB controller (use 2.0).
    Add usb stick where we are goint to install the distro (it must be plug to the computer).
  4. Accept changes and double click on virtual machine to start instalation.

Installing OS

  • Follow the assistant instructions (very easy in any Ubuntu or derivatives).
  • Select delete all the drive and use all of it. So it will create all the partitions in the right way for most types of computers.
  • When installing ends it ask us to remove the CD and then play any key. We do it and switch the virtual machine off when we see BIOS screen.
    At this point following operations must make in a real computer due to VirtualBox can boot usb devices.
  • Close virtualbox and switch our computer off.

Use

  • First configure computer BIOS to boot from USB devices (In most computers you can access to the BIOS pressing ESC or F2).
  • The computer will start like it was installed in internal disc, you can update the system, add software or files, configure whan you need... all will be there when you start this again in any computer.

Advantages and disadvantages

Advantages

  • This is a normal instalation and you can do all you can if you install it in the internal disc.
  • If you need a driver like wifi one, you can start from another computer, install it and then start in your computer and wifi works.
  • Your computer in your pocket, you can use it if there is a computer than you can boot from USB.
  • You can clone it to another USB or internal disc with dd or tools like etcher.

Disadvantages

  • USB stick are usually smaller than internal disc, this limit you if you want to install a lot of software or add big files.
  • Remember than USB stick is a solid state device. Don't complete fill to avoid writing in the same sectors all the time.
  • USB ports are less faster than internal SATA ones, I recoment use USB 3.0 devices and ports.
  • Don't remove the USB until the system finish to switch off. USB stick are more delicate than internal disc in this case.
  • You can install the system in an internal disc with an easy assistant, you can use tools like systemback or clone it with clonezilla, for example.
Artículo original en castellano

Wednesday, February 28, 2018

Clone a microsd in another slightly smaller one

I clone a microsd in another slightly smaller one using gparted following these steps:
  1. After get the error in the destination microsd plugged in my Linux PC, start gparted as root.
  2. Unmount all the microsd partitions. We see some warning, ignore them.
  3. Reduce last partition and the extended where it is.
  4. After the operation is ended, run sync twice and then extract the microsd. Might be stopped warning messages.
If you haven't GNU/Linux in your PC you can use gparted-live.

Tip: if your graphic image burner tool can burn images bigger than your microsd try dd in GNU/Linux.
Artículo original en castellano

Tuesday, February 06, 2018

Open alternatives to privative software (VI): evince, the PDF reader

Adobe reader users see this software get bigger and bigger, now is an enormous monster just for reading pdf files.

Fortunately there are a lot of alternative programs that can do this work with a few sizes and more reasonable requirements for this simple mission.
 Evince is one of them, the pdf reader included in most new GNU/Linux distros.
This software open files much faster because it is light software.

Can read all these formats:
  • PDF
  • Postscript
  • djvu
  • tiff
  • dvi
  • XPS
  • SyncTex support with gedit
  • comics books (cbz, cbr, cb7 and cbt)
Available in a lot of languages:



This an exclusive GNU/Linux software and a good reason to join to tux, anyway there is a lot of alternatives for other systems.Artículo original en castellano

Friday, January 26, 2018

How configure WiFi in recalbox?

To configure WiFi in recalbox just follow these steps:
    Trucos Recalbox
  1. Start your raspberry pi recalbox with a keyboard connected to your raspberry pi.
  2. Press Enter to access to menu.
  3. Move cursor keys until you select Network configuration and then press A key.
  4. Move cursor keys until you select SSID Wifi and then press A key.
  5. Use the cursor keys to focus over text area, then press A key, write your SSID name, press Enter, move cursor keys until you select OK and then press A key.
  6. Move cursor keys until you select Wifi password and  then press A key.
  7. Use the cursor keys to focus over text area, then press A key, write your Wifi password, press Enter, move cursor keys until you select OK and then press A key.
  8. Move cursor keys until you select Activate Wifi and change to ON use the A key.
  9. Move cursor keys until you select Return and  then press A key.
  10. Wait for a seconds and you'll see a dialog box than shows "Activated WiFi". You can close this dialog with A key. 
Your raspberry pi might be connected to wifi.

Problems?

If your raspberry still isn't connect, may be in one of these cases:
  • Remember than SSID name and wifi password are case sensitive.
  • If you use strange caracters in SSID name or wifi password then use wire connection and access to share network resource.
    Search the file system/recalbox.conf and edit wifi values.
  • Use channels allowed in France or recalbox doesn't see your wifi network (example: in Spain channel 12 is allowed but not in France, this selection won't work).
    The solution is change wifi channel in your router.

Source

Monday, December 25, 2017

LDraw viewers and editors in Ubuntu 16.04. Your favourite construction game, now virtual in your PC

The last Ubuntu LTS version has many new features, but some exotic programs have stopped working and you have to compile them or wait for versions to run them on this version.

Just follow this guide if you want make your own Tente(R), Lego(R), Exin Castillos(R), etc... 3D models with the open format LDraw.

LDraw editors: MLCad & LeoCAD

You can install both of them without any problem, MLCad is a Windows sofware than run very well with wine, so if you want to use in any GNU/Linux install first wine and them MLCad like any other Windows application.


LDraw viewer: LDView

You can install the new special versions for Ubuntu 16.04 , 64 bits or 32 bits.

Then you can install it with commands like this:
sudo dpkg -i ldview-4.2-ubuntu-16.04.XXX.deb
sudo apt-get install -f

Professional screenshots: povray

You can get screenshots like a 3D professional:
  • Export the model to povray form LDVIEW
  • You can get a Full HD screenshot with a command like this:
povray my_model.pov -W1920 -H1080
The problem is that if we install the povray package in the Ubuntu 16.04 repositories it does not work because of a problem in a library, so we have to recompile it ... ugh! how difficult! That it is enough that you copy and paste in your console the following commands:
sudo apt-get install git build-essential libvips-dev libboost-system1.58-dev libboost-thread1.58-dev libc6-dev libgcc1 libilmbase12 libjpeg8-dev libopenexr22 libpng12-dev libsdl1.2-dev libstdc++6-4.7-dev libtiff5-dev zlib1g-dev
./configure COMPILED_BY="tu nombre y correo" --disable-io-restrictions
git clone https://github.com/POV-Ray/povray
cd unix
./prebuild.sh
cd ..
make check
sudo make install
And now you get it.

Set of pieces

You need the set of the pieces of the constuction game you want to use: TENTE(R), LEGO(R) or EXIN CASTILLOS(R).
Then unzip them in differents folders, for example:
  • /home/your_user/ldraw/tente
  • /home/your_user/ldraw/lego
  • /home/your_user/ldraw/exincastillos
Then we can run LDView with this parameter:
LDView -LDrawDir=path_to_set_of_pieces
For more details see the Tente 3D wiki.
Note: The artwork is my construction in Tente 3D of the famous building of the comic 13, Rue del Percebe, the first tentexpress quiz I won :)
Artículo original en castellano

Wednesday, November 15, 2017

Copy midnight commander (mc) from raspbian to recalbox

Midnight commander is the best double-panel file manager for GNU/Linux console. This is a very useful tool for newbies and lazy users like myself, by example using ssh protocol:



The easier way to get mc in recalbox is "steal" it to a raspbian we previously installed it.
These are the files and folders you need to copy:


Rasbian►►►Recalbox
/usr/bin/mc.../usr/bin/mc
/usr/lib/mc.../usr/lib/mc
/etc/mc.../etc/mc
/usr/share/mc.../usr/share/mc
/usr/lib/arm-linux-gnueabihf/libgpm.so.2.../lib/libgpm.so.2
/usr/lib/arm-linux-gnueabihf/libssh2.so.1.../lib/libssh2.so.1

You can copy the files by ssh, using the same mc if you have GNU/Linux in your PC (plug the cart to the PC), from raspbian if you have this system and recalbox, WinSCP if you use Windows, etc...

If you haven't raspbian here you are all the necesary files, each in the correct path.

Warning: you probably need copy again each time Recalbox will be updated (This is a fast and simple operation and Recalbox is updated every long time).
Anyway, if you want mc will be part of recalbox you can join to the request I asked in the official forum.
Artículo original en castellano

Sunday, October 22, 2017

How to run DOS games in Batocera or Recalbox 4.1

You can run fullscreen DOS games in Batocera or Recalbox (4.1 or newer).
You need copy them like this:
  1. Select /recalbox/share/roms/dos/
  2. Create a folder with the name of the game adding ".pc" (like  galaxia.pc)
  3. Copy all the files of the game to this folder.
  4. Create a dosbox.bat file, these file must content the fullname of the executable file (like GALAXIA.EXE).
  5. Update games in recalbox/batocera menu.
We need repeat steps 1 to 4 for each game we add, and do the step 5 when we finished.
Artículo original en castellano
Note: Don't use notepad for Windows because this buggy software can add strange and invisible characters. Better use a good text edit like jEdit.

Tuesday, October 03, 2017

Manage recalbox from your PC browser: configuration, file upload, virtual remote control and kodi

Recalbox is surprising me every day with its ease of use and power, today I will talk about the wide possibilities of use from your PC browser.

Access to your configuration: http://recalbox.local

You can do here:
  • Configure the Recalbox OS.
  • Upload files dragging them.
  • Monitory the activity and see logs.

Virtual Game Pad: http://recalbox.local:8080 

If you click on Use Virtual Game Pad or input this url in your browser you see an image of a SNES virtual controller you can use like a real one.

You can use it with a mobile phone or tablet with access to your wifi.
Warning: Do not expect a high speed response due to limitations in your screen device.
 

Kodi: http://recalbox.local:8081 

You are probably asking for Kodi web service, can I use?
Yes, you can, but in recalbox use the 8081 port, and you can access if Kodi is running and the service activated.
So we can access from your PC web browser to your raspberry pi mediacenter, send youtube videos with Send to Kodi or use the mobile like a remote control with Yatse or any similar app.


Advice: If you can't access from these URLs, use your IP instead of recalbox.local
Artículo original en castellano

Tuesday, September 26, 2017

Add your favorites apps in raspbian aplications panel

You can change your favourites apps in aplications panel editing the file /home/pi/.config/lxpanel/LXDE-pi/panels/panel 

Modify the zone with these line at the beginning:
Plugin {
   type=launchbar

There must be a content like this:
Plugin {
  type=launchbar
  Config {
    Button {
      id=/usr/share/applications/iceweasel.desktop
    }
    Button {
      id=/usr/share/raspi-ui-overrides/applications/pcmanfm.desktop
    }
    Button {
      id=/usr/share/raspi-ui-overrides/applications/lxterminal.desktop
    }
    Button {
      id=/usr/share/applications/kodi.desktop
    }
  }
}
Here we define like our favorites apps iceweasel web browser, pcmanfm file explorer, lxterminal and kodi:


You need restart rasbian or at least X server:
sudo /etc/init.d/lightdm restart


Artículo original en castellano

Saturday, September 09, 2017

Compiling LeoCAD in any GNU/Linux

LeoCAD is a LDraw file editor, a open format to make LEGO(R), TENTE(R), EXIN CASTILLOS(R), etc... virtual models.

I follow this steps to compile Leocad:
  1. Install subversion and the necesary libraries to compile QT code:
    sudo apt-get install git libqt4-dev zlib1g-dev
  2. Download the lastest version of code in a folder, for example $HOME
    cd $HOME
    git clone https://github.com/leozide/leocad/
  3. Change to this directory, compile and install:
    cd leocad
    qmake leocad.pro
    make
    sudo make install 
  4. If we use the LEGO library we might launch the software with this command (I suppose you download the library in /opt/ldraw/lego):
    leocad -l /opt/ldraw/lego/
You can also use the Tente® 3D library, then the comand to run might be:
leocad -l /opt/ldraw/tente
If you compile in a raspberry pi, use qmake-qt4 leocad.pro instead of qmake leocad.pro.

Original articles