SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2012-10-17 22:54:10

globetrotterdk
#! CrunchBanger
From: Copenhagen, Denmark
Registered: 2009-02-01
Posts: 135

CLI boot for #! testing.

I have a #! Wheezy system installed on my Acer Aspire One 725 with openbox and ratpoison sessions to choose from, but I do a lot of my work on my laptop with tmux and don't really need a GUI session very often. Therefore the following questions:

1) I have tried setting the system to boot sans GUI, but I have yet to find the correct way of doing this. How do I start with a CLI boot and then get into SLim to choose a session by running the "startx" command?

2) Since the system is on a laptop and much of the work I do is on the Internet, how do I get wireless networking started in the CLI and the battery script used in tint2 to display inside tmux?


#! Waldorf - Openbox - Acer Aspire One 725
Military justice is to justice what military music is to music. - Groucho Marx

Offline

Be excellent to each other!

#2 2012-10-18 00:33:22

pidsley
#! Die Hard
Registered: 2012-05-23
Posts: 1,348

Re: CLI boot for #! testing.

1. See this post by el_koraco. If you are using Waldorf, replace "gdm" with "slim" in the code. Once you have removed slim, you will log in at the command line when you reboot. When you type "startx", the X server will start, and the .xinitrc script will run. To change "sessions", simply edit .xinitrc. I have several lines in my .xinitrc, and I just switch comments to change window managers. The code at the top of my xinitrc file loads my .Xresources file, sets the X cursor, turns off the system beep and sets the desktop background. It's all optional. I mount drives manually, so I don't use consolekit.

#!/bin/sh

xrdb ~/.Xresources &
xsetroot -cursor_name left_ptr &
xset b off &
eval $(cat ~/.fehbg)

exec ratpoison
#exec spectrwm
#exec sithwm

You can also get fancy with .xinitrc and call it with an argument to start a different session. See this topic for more information.

Last edited by pidsley (2012-10-18 00:43:21)

Offline

#3 2012-10-18 08:52:18

globetrotterdk
#! CrunchBanger
From: Copenhagen, Denmark
Registered: 2009-02-01
Posts: 135

Re: CLI boot for #! testing.

Thanks. I had to add the following in my .xinitrc file to get things to work as before in Openbox:

exec openbox-session

This loads the wallpaper and startup programs (clipit, network manager, dropbox, radiotray, etc.). Interestingly, when I choose "exit" from the Openbox menu, neither the reboot no shutdown commands work. I have to execute them from a teminal.

Last edited by globetrotterdk (2012-10-18 08:53:03)


#! Waldorf - Openbox - Acer Aspire One 725
Military justice is to justice what military music is to music. - Groucho Marx

Offline

#4 2012-10-18 09:04:15

xaos52
The Good Doctor
From: Planet of the @s
Registered: 2011-06-24
Posts: 4,271

Re: CLI boot for #! testing.

eval `dbus-launch --sh-syntax --exit-with-session`
exec ck-launch-session openbox-session

See el_koraco's post

Replace the line  'exec openbox-session' by the 2 lines above.

Online

#5 2012-10-18 10:02:32

globetrotterdk
#! CrunchBanger
From: Copenhagen, Denmark
Registered: 2009-02-01
Posts: 135

Re: CLI boot for #! testing.

xaos52 wrote:
eval `dbus-launch --sh-syntax --exit-with-session`
exec ck-launch-session openbox-session

See el_koraco's post

Replace the line  'exec openbox-session' by the 2 lines above.

Thanks. That did the trick.


#! Waldorf - Openbox - Acer Aspire One 725
Military justice is to justice what military music is to music. - Groucho Marx

Offline

#6 2012-10-18 16:49:21

globetrotterdk
#! CrunchBanger
From: Copenhagen, Denmark
Registered: 2009-02-01
Posts: 135

Re: CLI boot for #! testing.

Any ideas about displaying the battery level and getting the wireless working?


#! Waldorf - Openbox - Acer Aspire One 725
Military justice is to justice what military music is to music. - Groucho Marx

Offline

#7 2012-10-18 16:59:38

pidsley
#! Die Hard
Registered: 2012-05-23
Posts: 1,348

Re: CLI boot for #! testing.

I don't use wireless very much, but there are several command-line wireless connectivity tools. Ceni works well, and wicd has a command-line interface. You can always do things manually with iwconfig and wpasupplicant. See this post for more details.

here are some topics that discuss command-line battery monitoring:
http://www.brighthub.com/computing/linu … 13876.aspx
http://effectif.com/system-administrati … us-in-tmux

(I found these by searching for "battery level tmux" in ixquick)

Last edited by pidsley (2012-10-18 17:04:21)

Offline

#8 2012-10-18 20:56:04

globetrotterdk
#! CrunchBanger
From: Copenhagen, Denmark
Registered: 2009-02-01
Posts: 135

Re: CLI boot for #! testing.

I have run into problems. I ran

sudo apt-get install wicd-curses

and

sudo apt-get purge network-manager

python-wicd wicd-daemon and wicd-curses are installed.

$ wicd-curses

reports "no wireless network found" and "not connected".

I have tried the following:

ifconfig wlan0 up

iwconfig wlan0 essid "my wireless network"

but no luck.

Last edited by globetrotterdk (2012-10-18 20:56:44)


#! Waldorf - Openbox - Acer Aspire One 725
Military justice is to justice what military music is to music. - Groucho Marx

Offline

#9 2012-10-18 21:01:18

pidsley
#! Die Hard
Registered: 2012-05-23
Posts: 1,348

Re: CLI boot for #! testing.

Sorry, I'm not a wireless wizard. I've actually had more luck with ceni than wicd, or using the manual techniques in the post I linked (here). If you're using a WPA connection you also need to set up /etc/network/interfaces (read the whole first post). El_koraco and xaos52 are the wireless gurus here -- eventually one of them will probably show up.

Did you try battery monitoring yet?

Last edited by pidsley (2012-10-18 21:03:44)

Offline

#10 2012-10-18 21:07:07

globetrotterdk
#! CrunchBanger
From: Copenhagen, Denmark
Registered: 2009-02-01
Posts: 135

Re: CLI boot for #! testing.

Cheers. Not yet. I have gotten an ethernet connection working, though.


#! Waldorf - Openbox - Acer Aspire One 725
Military justice is to justice what military music is to music. - Groucho Marx

Offline

#11 2012-10-18 21:11:58

snowpine
#!-a-roo
Registered: 2008-11-24
Posts: 2,554

Re: CLI boot for #! testing.

I use Ceni as well, it's really quite easy (and makes me nostalgic for my sidux days).


/hugged

Offline

#12 2012-10-18 21:36:08

globetrotterdk
#! CrunchBanger
From: Copenhagen, Denmark
Registered: 2009-02-01
Posts: 135

Re: CLI boot for #! testing.

snowpine wrote:

I use Ceni as well, it's really quite easy (and makes me nostalgic for my sidux days).

I have used wicd with Salix OS and really like it. My wireless card worked fine under Network Manager...

Does Ceni support 3G?


#! Waldorf - Openbox - Acer Aspire One 725
Military justice is to justice what military music is to music. - Groucho Marx

Offline

#13 2012-10-19 08:51:12

globetrotterdk
#! CrunchBanger
From: Copenhagen, Denmark
Registered: 2009-02-01
Posts: 135

Re: CLI boot for #! testing.

OK, the latest news is that
1) I can connect the laptop to an ethernet connection, which works and shows up in wicd-curses.
2) I have run the following and am able to scan for wireless networks:

$ sudo iwlist wlan0 scan

3) I uninstalled and re-installed wicd.

Wicd is still giving me grief and refusing to cooperate.


#! Waldorf - Openbox - Acer Aspire One 725
Military justice is to justice what military music is to music. - Groucho Marx

Offline

#14 2012-10-19 09:51:37

el_koraco
#!/loony/bun
From: inside Ed
Registered: 2011-07-25
Posts: 4,643

Re: CLI boot for #! testing.

You have to specify which adapter you're using for wireless in wicd. It's usually wlan0. Look somewhere in the properties page, I'm not completely sure where it's located.

Offline

#15 2012-10-19 10:55:06

globetrotterdk
#! CrunchBanger
From: Copenhagen, Denmark
Registered: 2009-02-01
Posts: 135

Re: CLI boot for #! testing.

el_koraco wrote:

You have to specify which adapter you're using for wireless in wicd. It's usually wlan0. Look somewhere in the properties page, I'm not completely sure where it's located.

That did it. Much obliged.


#! Waldorf - Openbox - Acer Aspire One 725
Military justice is to justice what military music is to music. - Groucho Marx

Offline

#16 2012-10-20 16:10:43

globetrotterdk
#! CrunchBanger
From: Copenhagen, Denmark
Registered: 2009-02-01
Posts: 135

Re: CLI boot for #! testing.

I am still looking for a battery solution, but am first trying to figure out what I should do to get wicd-curses started at boot, without X. I have been thinking about .bashrc, but I don't think that would work if I needed to use more than one virtual console.


#! Waldorf - Openbox - Acer Aspire One 725
Military justice is to justice what military music is to music. - Groucho Marx

Offline

#17 2012-10-20 16:12:05

el_koraco
#!/loony/bun
From: inside Ed
Registered: 2011-07-25
Posts: 4,643

Re: CLI boot for #! testing.

Can't you simply start the wicd daemon???

Offline

#18 2012-10-20 18:38:52

SabreWolfy
#! Die Hard
Registered: 2009-03-09
Posts: 1,269

Re: CLI boot for #! testing.

Install acpid, acpitool and acpi-support (not sure if you need them all) and then run acpi for power information on the console. Or use xfce4-power-manager if you want a GUI solution. wicd-curses works well for me for console-only access to wireless and wired.


Support #!Waldorf • Debian sid • Xubuntu • siduction • Peppermint • OpenBox • Xfce • LXDE •

Offline

#19 2012-10-20 20:12:54

globetrotterdk
#! CrunchBanger
From: Copenhagen, Denmark
Registered: 2009-02-01
Posts: 135

Re: CLI boot for #! testing.

el_koraco wrote:

Can't you simply start the wicd daemon???

I think the wicd daemon is set to start by default at the beginning of each session after it is installed, isn't it? For some reason, I need to run" wicd-curses" manually before I can get a connection.


#! Waldorf - Openbox - Acer Aspire One 725
Military justice is to justice what military music is to music. - Groucho Marx

Offline

#20 2012-10-20 20:18:11

SabreWolfy
#! Die Hard
Registered: 2009-03-09
Posts: 1,269

Re: CLI boot for #! testing.

^ Yes, I think this is the case. I run wicd-curses to choose a connection after booting. You can use wicd-cli to automate this possibly...?


Support #!Waldorf • Debian sid • Xubuntu • siduction • Peppermint • OpenBox • Xfce • LXDE •

Offline

#21 2012-10-20 20:18:32

globetrotterdk
#! CrunchBanger
From: Copenhagen, Denmark
Registered: 2009-02-01
Posts: 135

Re: CLI boot for #! testing.

SabreWolfy wrote:

Install acpid, acpitool and acpi-support (not sure if you need them all) and then run acpi for power information on the console. Or use xfce4-power-manager if you want a GUI solution. wicd-curses works well for me for console-only access to wireless and wired.

Interesting, thanks. Is it possible to call acpi from tmux every "x" minutes in the statusbar like:
set -g status-right ----
set -g status-interval 60
???


#! Waldorf - Openbox - Acer Aspire One 725
Military justice is to justice what military music is to music. - Groucho Marx

Offline

#22 2012-10-20 20:20:32

SabreWolfy
#! Die Hard
Registered: 2009-03-09
Posts: 1,269

Re: CLI boot for #! testing.

I use byobu instead of screen/tmux and it has a battery notification under it's F9 menu, but I guess you could parse the output of acpi as needed.

[Having said that, the battery status is not showing in byobu now for some reason. Ah, it does not show if it's 100% full and plugged into power. I removed power and it appeared.]

Last edited by SabreWolfy (2012-10-20 20:22:14)


Support #!Waldorf • Debian sid • Xubuntu • siduction • Peppermint • OpenBox • Xfce • LXDE •

Offline

#23 2012-10-21 02:13:24

PackRat
#! Die Hard
From: USA
Registered: 2011-03-03
Posts: 733

Re: CLI boot for #! testing.

globetrotterdk wrote:

Is it possible to call acpi from tmux every "x" minutes in the statusbar like:
set -g status-right ----
set -g status-interval 60
???

Yes, the default update for the status bar is 15 seconds but you can change it to 60 with the status-interval command.

I use:

set -g status-right '#[fg=brightyellow]#(acpi -b | cut -d" " -f4 | cut -d"," -f1) | %a %e %b %k:%M'

to put battery % and date in my tmux status bar.

Last edited by PackRat (2012-10-21 02:38:56)


"It does not require many words to speak the truth." - Chief Joseph, Nez Perce tribe

Online

#24 2012-10-21 10:52:06

globetrotterdk
#! CrunchBanger
From: Copenhagen, Denmark
Registered: 2009-02-01
Posts: 135

Re: CLI boot for #! testing.

Many thanks for that PackRat smile I just discovered that my "problem" with the wicd daemon wasn't really a problem after all. It appears that my network was acting up and wicd was just having a difficult timing finding the connection to log into.


#! Waldorf - Openbox - Acer Aspire One 725
Military justice is to justice what military music is to music. - Groucho Marx

Offline

Be excellent to each other!

#25 2012-10-21 13:39:14

PackRat
#! Die Hard
From: USA
Registered: 2011-03-03
Posts: 733

Re: CLI boot for #! testing.

You're welcome.

Also, if you are going to boot to the command line, a handy program to have (assuming you don't) is:

sysv-rc-conf

It is in the repos, so you can install with apt. It is a handy tool that lets you configure the run-level services (needs to be run as root). For example, in your original scenario, you could disable Slim from the default run level for wheezy (2 I think) to boot to the command line. Then there are several ways to start your X-session if you want - there is a thread about how people start X in this forum; lots of creative ways to do it, check it out.

To verify your default run level look for these lines:

# The default runlevel.
id:2:initdefault:

in /etc/tab file - view it as a regular user to avoid messing up and editing it.


"It does not require many words to speak the truth." - Chief Joseph, Nez Perce tribe

Online

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo