Difference between revisions of "Linux Programming Tips"

From Free Pascal wiki
Jump to navigationJump to search
(→‎How to...: daemons link)
m (Move Other Interfaces to end of content)
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
{{Linux_Programming_Tips}}
 +
 +
{{Platform only|Linux|Linux|Linux}}
 
__TOC__
 
__TOC__
{{Other Interfaces}}
+
 
 
==How to...==
 
==How to...==
 +
 
===Write a daemon===
 
===Write a daemon===
 +
 
To write a daemon (service application), please see [[Daemons and Services]]
 
To write a daemon (service application), please see [[Daemons and Services]]
  
 
===Get the list of mounted partitions===
 
===Get the list of mounted partitions===
 +
 
Read and parse the file /etc/mtab
 
Read and parse the file /etc/mtab
  
Line 21: Line 27:
  
 
===Perform text-to-speech (TTS) or how to let my computer speak===
 
===Perform text-to-speech (TTS) or how to let my computer speak===
See
 
* [http://lazarus.freepascal.org/index.php/topic,19723.0/topicseen.html] examples for calling espeak
 
  
'''to do: incorporate those examples'''  
+
See:
 +
 +
* [http://lazarus.freepascal.org/index.php/topic,19723.0/topicseen.html examples for calling espeak].
 +
 
 +
'''to do: incorporate those examples'''
  
 
===Install Lazarus on Raspberry Pi===
 
===Install Lazarus on Raspberry Pi===
Line 30: Line 38:
 
* [[Lazarus on Raspberry Pi]]
 
* [[Lazarus on Raspberry Pi]]
  
[[Category:Linux]]
+
===Test whether an application is already running===
[[Category:Raspberry Pi]]
+
 
 +
See [[AppIsRunning]].
 +
 
 +
{{Other Interfaces}}

Latest revision as of 08:39, 3 November 2021

English (en) français (fr)

Crystal 128 penguin.png

This article applies to Linux only.

See also: Multiplatform Programming Guide

How to...

Write a daemon

To write a daemon (service application), please see Daemons and Services

Get the list of mounted partitions

Read and parse the file /etc/mtab

An example of such a file:

/dev/sda5 / ext4 rw,commit=0 0 0
none /proc proc rw 0 0
/dev/sda7 /home ext4 rw,commit=0 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
gvfs-fuse-daemon /home/felipe/.gvfs fuse.gvfs-fuse-daemon rw,nosuid,nodev,user=felipe 0 0
truecrypt /tmp/.truecrypt_aux_mnt1 fuse.truecrypt rw,nosuid,nodev,allow_other 0 0
/dev/mapper/truecrypt1 /media/truecrypt1 vfat rw,uid=500,gid=500,umask=077 0 0

Perform text-to-speech (TTS) or how to let my computer speak

See:

to do: incorporate those examples

Install Lazarus on Raspberry Pi

Test whether an application is already running

See AppIsRunning.

Other Interfaces

Platform specific Tips

Interface Development Articles