razuberi
Posts: 18
Joined: Wed Jun 26, 2013 4:28 am

Configure LXTerminal

Tue Jul 23, 2013 4:37 pm

I feel like my search probably missed some results, on the other hand I haven't been able to find what I want to know ;)

Can anyone tell me the location of the lxterminal config file?

I would like to set the default font and window size.

Hope you can help!

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 4947
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: Configure LXTerminal

Tue Jul 23, 2013 5:12 pm

razuberi wrote:I feel like my search probably missed some results, on the other hand I haven't been able to find what I want to know ;)

Can anyone tell me the location of the lxterminal config file?

I would like to set the default font and window size.

Hope you can help!
Don't think there is one (or rather I can't find one). There's no mention in lxterminal's man pages. However this option:

Code: Select all

       --geometry=CHARACTERSxLINES
           Set the terminal's size in characters and lines.
sets the window size when "lxterminal" is launched from the command line. Maybe if "lxterminal.desktop" in the "Desktop" directory is modified to include that option the "default window size" can be changed, but I can't find anything w.r.t. fonts.
Trev.
Still running Raspbian Jessie on some older Pi's (an A, B1, B2, B+, P2B, 3xP0, P0W) but Stretch on my 2xP3A+, P3B+, P3B, B+, A+ and a B2. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

User avatar
bob_binz
Posts: 441
Joined: Thu Feb 02, 2012 7:58 pm
Location: Stockport, UK

Re: Configure LXTerminal

Tue Jul 23, 2013 5:34 pm

FTrevorGowen wrote: Don't think there is one (or rather I can't find one). ...
Trev.
I think a simple one lives at ~/.config/lxterminal/lxterminal.conf, but looking at the source code, it doesn't support geometry settings. They can only be set as a passed parameter, as you've specified.

User avatar
mad-hatter
Posts: 419
Joined: Sun Feb 26, 2012 2:58 pm
Location: By the UK seaside

Re: Configure LXTerminal

Tue Jul 23, 2013 6:01 pm

Hello,

If you right click the lxterminal window and select preferences you can change font size and font style,
then shut down and remove power and restart, the settings are remembered, so there must be a settings file somewhere.
Where I don't know. Works locally or from a remote pc. Applies to the root terminal as well.

Regards

razuberi
Posts: 18
Joined: Wed Jun 26, 2013 4:28 am

Re: Configure LXTerminal

Fri Jul 26, 2013 11:54 am

mad-hatter wrote:Hello,

If you right click the lxterminal window and select preferences you can change font size and font style,
then shut down and remove power and restart, the settings are remembered, so there must be a settings file somewhere.
Where I don't know. Works locally or from a remote pc. Applies to the root terminal as well.

Regards
Yup, i stumbled on that after hours looking for a cli method.

Nevertheless combine that knowledge with what ftrev says and i'm half way to a non-gui method.
kinda useful.

Thanks.

jadonovan3000
Posts: 2
Joined: Sun Aug 18, 2013 1:58 am

Re: Configure LXTerminal

Sun Jan 12, 2014 1:09 am

If you right-click and choose Open Leafpad, then add the desired flags to the line 'Exec=lxterminal' near the file bottom and save you should be good to go.

I changed it to "Exec=lxterminal --geometry=80x50" and it's surviving rebooting.

sdjf
Posts: 1395
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: Configure LXTerminal

Sun Jan 12, 2014 3:49 am

The above suggestion for the Exec line would be in the lxterminal.desktop file which I think is in /usr/share/applications/.

but another place where geometry for X applications can be set is in ~/.Xdefaults where I have set the geometry for my virtual keyboard. I am just not sure how to enter more than one application in that file, but it is another place.
FORUM TIP: To view someone's posting history, sign in, click on their user name, then on "Search User's Posts." || Running ArchLinuxArm on Model 2B and 512MB Model B

frodo
Posts: 63
Joined: Wed Dec 18, 2013 2:36 pm

Re: Configure LXTerminal

Sun Jan 12, 2014 11:24 am

Code: Select all

[email protected] $ find /home/pi/ -name *xterm*
/home/pi/.config/lxterminal
/home/pi/.config/lxterminal/lxterminal.conf
/home/pi/Desktop/lxterminal.desktop
;)

kangus
Posts: 18
Joined: Tue Aug 07, 2012 12:05 am

Re: Configure LXTerminal

Thu Mar 27, 2014 4:52 am

Use File Manager to browse to /usr/share/applications than right mouse click on the lxterminal icon and edit with Leafpad
add below the existing Exec:
Exec=lxterminal --geometry=200x60

If you have a short cut on your desktop, right click then click Leafpad

m00se
Posts: 1
Joined: Sat Mar 07, 2015 2:00 am
Location: Alaska

Re: Configure LXTerminal

Sat Apr 04, 2015 6:12 pm

I wanted to change my default size for lxterminal today and found none of the mentioned methods worked.

Right clicking on the lxterminal icon and displaying its properties shows that:

Code: Select all

/usr/share/raspi-ui-overrides/applications/lxterminal.desktop
controls the startup of lxtrerminal currently.

Code: Select all

sudo nano /usr/share/raspi-ui-overrides/applications/lxterminal.desktop
Scroll down and add the following as a new line after "Exec=lxterminal" replacing my numerical values with those you desire to use.

Code: Select all

Exec=lxterminal --geometry=80x55
Save and exit nano.

xiard
Posts: 2
Joined: Mon Aug 01, 2016 12:20 pm

Re: Configure LXTerminal

Mon Aug 01, 2016 12:26 pm

I have successfully modified the default Terminal size using the method described above (editing the lxterminal.desktop file). However, that only modifies the Terminal size when clicking on the Terminal icon in Menu > Accessories. It doesn't affect the size of the Terminal that is brought up using Ctrl+Alt+T.

When you use Ctrl+Alt+T, what is actually running? I searched all of /usr for lxterminal.desktop files, and I found one under /share/applications as well as /share/raspi-ui-overrides/applications. I modified both of them, and Ctrl+Alt+T wasn't affected.

User avatar
paulwratt
Posts: 83
Joined: Fri Jun 12, 2015 12:15 am

Re: Configure LXTerminal

Fri Aug 25, 2017 8:59 am

for anyone interested:

the terminal pulled up by Ctrl+Alt+T is probably here:

Code: Select all

ls -l /etc/alternatives/x-terminal-emulator
/etc/alternatives/x-terminal-emulator -> /usr/bin/lxterminal
Its a soft link, so you can re-link it manually to the terminal of your choice:

Code: Select all

cd /etc/alternatives
sudo rm x-terminal-emulator*
sudo ln -s /usr/bin/lxterminal x-terminal-emulator
sudo ln -s /usr/share/man/man1/lxterminal.1.gz x-terminal-emulator.1.gz
The second link is the man page (help text). or use the alternatives tool:

Code: Select all

sudo update-alternatives --config x-terminal-emulator


FYI: this link may help to:
If you use LXDE, open box, and you want to bind ctrl+alt+t to open the LXTerminal, you need to add

Code: Select all

<!-- Launch LXTerminal with Ctrl+Alt+t-->
    <keybind key="C-A-t">
      <action name="Execute">
        <command>lxterminal</command>
      </action>
    </keybind>
to ~/.config/openbox/lxde-rc.xml

Key bindings are found in the <keyboard> section of your rc.xml configuration file. Any bindings outside of that section are not valid and will be ignored.


Alternatively you can set the default for any TERM=xterm in /usr/share/vte/termcap/xterm:

Code: Select all

:co#80:it#8:li#24:\
for example:

Code: Select all

:co#132:it#8:li#24:\

Paul

Return to “Beginners”