Start applications in linux

Start applications

Move your mouse pointer to the Activities corner at the top left of the screen to show the Activities overview. This is where you can find all of your applications. You can also open the overview by pressing the Super key.

There are several ways of opening an application once you’re in the Activities overview:

  • Start typing the name of an application — searching begins instantly. (If this doesn’t happen, click the search bar at the top of the screen and start typing.) If you don’t know the exact name of an application, try to type an related term. Click the application’s icon to start it.
  • Some applications have icons in the dash , the horizontal strip of icons at the bottom of the Activities overview. Click one of these to start the corresponding application. If you have applications that you use very frequently, you can add them to the dash yourself.
  • Click the grid button (which has nine dots) in the dash. You will see the first page of all installed applications. To see more applications, press the dots at the bottom, above the dash, to view other applications. Press on the application to start it.
  • You can launch an application in a separate workspace by dragging its icon from the dash, and dropping it onto one of the workspaces. The application will open in the chosen workspace. You can launch an application in a new workspace by dragging its icon to an empty workspace, or to the small gap between two workspaces.

Quickly running a command

Another way of launching an application is to press Alt + F2 , enter its command name , and then press the Enter key.

For example, to launch Rhythmbox , press Alt + F2 and type ‘ rhythmbox ’ (without the single-quotes). The name of the app is the command to launch the program.

Use the arrow keys to quickly access previously run commands.

Источник

How to start program at Linux boot automatically

Linux startup consists of several stages, during which you can configure a program to start automatically. This can be a single command, a sequence of commands, or an executable shell script. However, startup procedures may vary between different Linux distributions and versions.

Modern Linux systems boot into systemd, while older Linux versions utilize System V init. Regardless, both systems will execute cron and rc.local before loading the desktop environment, such as GNOME or KDE. In contrast, server-based Linux distributions do not load a desktop environment and instead provide a login prompt at the console. After logging in, the default shell like Bash runs.

Читайте также:  Adobe flash player on linux firefox

Methods to automatically run program on Linux startup:

Running a program automatically on Linux startup via systemd

systemd is the standard system and service manager in modern Linux, responsible for executing and managing programs during startup, among other tasks. Compatible programs will include service unit files used by systemd to manage the program’s execution.

To configure systemd to run a program automatically during Linux startup, follow these steps:

$ sudo systemctl list-unit-files --type=service [sudo] password for user: UNIT FILE STATE accounts-daemon.service enabled apparmor.service enabled apport-autoreport.service static apport-forward@.service static apport.service generated apt-daily-upgrade.service static apt-daily.service static atd.service enabled autovt@.service enabled blk-availability.service enabled bootlogd.service masked bootlogs.service masked bootmisc.service masked checkfs.service masked checkroot-bootclean.service masked checkroot.service masked cloud-config.service enabled cloud-final.service enabled cloud-init-local.service enabled cloud-init.service enabled console-getty.service disabled ##### snipped #####

You’ll have to create your own service unit if it’s a custom program or if your program doesn’t come with one during installation
Related: Creating and modifying systemd unit files

$ sudo systemctl is-enabled mysql disabled
$ sudo systemctl enable mysql Synchronizing state of mysql.service with SysV service script with /lib/systemd/systemd-sysv-install. Executing: /lib/systemd/systemd-sysv-install enable mysql Created symlink /etc/systemd/system/multi-user.target.wants/mysql.service → /lib/systemd/system/mysql.service.
$ sudo systemctl is-enabled mysql enabled

Running a program automatically on Linux startup via cron

cron is a daemon used to execute scheduled commands stored in the cron job table (crontab), which is unique for each user in the system. It starts during system boot, either via systemd or System V init, and you can schedule your program to run during system boot by following these steps:

You’re required to select an editor for the crontab if this is the first time the user uses the command.

$ crontab -e no crontab for user - using an empty one Select an editor. To change later, run 'select-editor'. 1. /bin/nano 

A crontab will be created for the user running the command and will be executed using the privileges of the user. If you need your program to run as the root user, run crontab -e as the root user itself.

# m h dom mon dow command @reboot
@reboot /sbin/ip addr | grep inet\ | tail -n1 | awk '< print $2 >' > /etc/issue && echo "" >> /etc/issue
$ crontab -e crontab: installing new crontab $
$ crontab -l # m h dom mon dow command @reboot /sbin/ip addr | grep inet\ | tail -n1 | awk '< print $2 >' > /etc/issue && echo "" >> /etc/issue

Running a program automatically on Linux startup via rc.local

rc.local is a legacy script from the System V init system, executed before displaying a login screen for the desktop environment or terminal login prompt. It is typically a Bash shell script capable of running any commands.

To configure your rc.local script, follow these steps:

As the root user, open or create the /etc/rc.local file using your preferred editor if it doesn't exist.

#!/bin/bash /sbin/ip addr | grep inet\ | tail -n1 | awk '< print $2 >' > /etc/issue echo "" >> /etc/issue exit 0

Running a program automatically on GNOME startup

GNOME is the default desktop environment for Linux distributions like Ubuntu and Red Hat. You can configure GNOME to run programs upon user login by following the instructions in the linked article:

Running a program automatically on KDE startup

KDE is another popular Linux desktop environment and the default for Kubuntu and openSUSE. It can also be configured to run programs when a user logs in, as detailed in the related article:

Running a program automatically on new Bash session

A new shell program will be spawned when you start your terminal session. Bash is the default shell for most Linux distributions, and when started, it will look for the following files in the particular starting a terminal session, a new shell program will be spawned. Bash is the default shell for most Linux distributions and, when initiated, looks for and executes the following files in order:

/etc/profile ~/.bash_profile ~/.bash_login ~/.profile

These files contain commands and logic for setting up environment variables and running required programs in the Bash language. They are also typically configured to execute other files, such as /etc/bashrc, /etc/bash.bashrc, and ~/.bashrc.

You can edit any of these files to run your program when a Bash session is started. Below is a part of a typical ~/.bashrc file:

PS1='$\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\] \$ ' PATH=/home/user/bin:$PATH export EDITOR=/usr/bin/vim alias ll="ls -l"

Author: Mohd Shakir Zakaria
Mohd Shakir Zakaria, a proficient cloud architect, is deeply rooted in development, entrepreneurship, and open-source advocacy. As the founder of Simplified Guide, he combines these passions to help others navigate the intricate world of computing. His expertise simplifies complex tech concepts, making them accessible to everyone. Discuss the article:

Comment anonymously. Login not required.

Источник

5 Ways To Quickly Launch Programs On Linux Mint

In this article you can find the fastest ways(at least from my experience) how to start applications in Linux mint. You can find all the ways listed below:

  • Add apps to "quick launch" pannel
  • The new ALT+F2 autocomplete feature (Linux Mint 17.3 Cinnamon Edition)
  • Open application by using terminal - this method can be used for troubleshooting not working apps in Linux Mint
  • Using the start menu
  • Add Desktop shortcut
  • Bonus 1 - start (several) application(s) by using a script or schedule time
  • Bonus 2 - Use keyboard short cuts

Add apps to "quick launch" pannel

The fastest way in Linux Mint to open new application is by using: Panel Launchers. You can start any application or script by a single mouse click. The only problem might be the number of the apps you can add to the panel. Another problem is if you add to many application - you may be confused and spend extra time for search. That's why I prefer to group my application and add only the most important ones. This is how my panel looks like right now:

linux_mint_quick_launcher_panel

  • Right click on the panel that you want to be customized
  • Add applets to the panel
  • Select Panel Launchers
  • Customize by right mouse click the applet

In order to add new folder as shortcut to your Panel Launchers do:

  • Go to Menu
  • Select submenu Accessories
  • Find Files
  • Right click
    • Select Add to Panel
    • Select Edit
    • browse and select your favorite image
    • nemo %U - starts your user folder - /home/user
    • nemo %UDownloads - starts - /home/user/Downloads
    • nemo /home/user/Music - opens: /home/user/Music

    The application is nemo which is going to open your targeted folder.

    Note: For more information please check: Linux Mint 19 Add Shortcuts to Panel

    The new ALT+F2 autocomplete feature

    you can open the run dialog. A new feature - autocomplete - was intriduced for Linux Mint 17.3 Cinnamon Edition. In this way you can start new applications like Thunderbird or Libre Office by:

    • Run dialog - ALT + F2
    • Type thun
    • Press - Tab
    • Finally press Enter in order to open the app

    Open application by using terminal

    Next method is similar to the previous one. I prefer to use this method when there is a problem with the application or the application doesn't start at all. In this case you can start new terminal and check the errors raised by this application:

    • Start new terminal - CTRL + ALT + T
    • Type thun
    • Press - Tab
    • Finally press Enter in order to open the app
    • Check the terminal for errors and warnings. In my case I can see these warnings:
    $ thunderbird (thunderbird:32040): Gtk-WARNING **: 18:17:03.881: Theme parsing error: :1:34: Expected ')' in color definition (thunderbird:32040): Gtk-WARNING **: 18:17:03.881: Theme parsing error: :1:76: Expected ')' in color definition 

    Using the start menu

    Another way to start quickly applications is by using the start menu. This can be done by:

    • Press windows key - Win
    • Start typing the name of the app - libre
    • Click on the app icon - LibreCalc

    You can edit the Linux menu end customize it for your personal preferences. If you need more information how to edit Linux Mint menu you can find it here: Linux Mint 19 How to edit Main Menu

    Desktop shortcut

    The final way which I can think of is by creating a desktop shortcut. This is really simple task if you install the app by the Software center (or the app is added to the start menu). In this case you can:

    Personally I prefer to keep my desktop clean or add some desktlets on it. So this option is not my preferred one.

    Bonus 1 - start (several) application(s) by using a script or schedule time

    You can also create a script which can start multiple applications if needed or schedule a start of application at any given time. For example I'm starting several applications like:

    This can be done by simple script like:

    #!/bin/bash pycharm cd /home/user/notebooks source /home/user/environments/venv36/bin/activate jupyter notebook 

    If you like to schedule an application like your mail client you can do it via crontab. For example schedule mail client to start at 4 PM:

    check mails

    0 16 * * * DISPLAY=:0 thunderbird

    Bonus 2 - Use keyboard short cuts

    • start menu
    • type and open Keyboard
    • go to tab Shortcuts
    • then from the sidebar select Launchers
    • Now you can select the shortcuts for different keyboard shortcuts like mail client or calculater
    • If you like you have an option of Custom Shorts

    linux-mint-keyboard-shortcuts

    Conclusion

    As conclusion I'm trying to be more efficient and be able to start applications by few clicks and 1 if possible. This saves time and energy for more important things.

    Another benefit for me is keeping prioritisation on my applications and files. Knowing what is important and how to access it very quickly is a game changer if you want to work smart and not hard!

    By using SoftHints - Python, Linux, Pandas , you agree to our Cookie Policy.

    Источник

Оцените статью
Adblock
detector